entelechy-jit自动生成
层:后端层 · 代码行数:7,787 · 集成测试文件:3
JIT 后端:通过 Cranelift 把 IR 编译为本机代码,或在 WebAssembly 环境中编译为 WebAssembly。
JIT backend: compiles Entelechy IR to native code through Cranelift, or to WebAssembly where Entelechy is WebAssembly, and runs it on the CPU
JIT backend.
Compiles a Validated module’s functions with Cranelift when the
Kernel is prepared and runs them on as many threads as pay off. The
contract is the CPU interpreter’s, bit for bit: word layout, integer
checks, reads through the scope’s gate, and libm. Native operations
run on the wrapped CPU backend.
When Entelechy is itself WebAssembly, the code is WebAssembly (wasm),
loaded into Entelechy’s function table; a table index stands for a
function pointer.
| 内部依赖 | entelechy-abi, entelechy-ir, entelechy-rules |
| 外部依赖 | — |
| 源码 | crates/backends/jit |
| 名称 | 简述 |
|---|---|
View |
One input as the compiled code sees it: its memory and its extent. |
Ctx |
What the compiled entry reads besides its arguments: inputs, parameters as words, context, output domain, and the failure slot. |
JitBackend |
The JIT backend: a target ISA to compile for. |
crates/backends/jit/src/lib.rs#L38
One input as the compiled code sees it: its memory and its extent.
crates/backends/jit/src/lib.rs#L68
What the compiled entry reads besides its arguments: inputs, parameters as words, context, output domain, and the failure slot.
JitBackend
Section titled “JitBackend”crates/backends/jit/src/lib.rs#L132
The JIT backend: a target ISA to compile for.
方法
| 函数 | 说明 |
|---|---|
fn new() -> Result<Self, String> |
Opens the backend for this machine. |
fn target(&self) -> String |
The target the code is compiled for, for diagnostics. |
实现的 Trait: Backend, Debug

