Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bytecodealliance/cranelift-jit-demo
/ functions
Functions
20 in github.com/bytecodealliance/cranelift-jit-demo
⨍
Functions
20
◇
Types & classes
3
↓ 10 callers
Method
translate_expr
When you write out instructions in Cranelift, you get back `Value`s. You can then use these references in other instructions.
src/jit.rs:197
↓ 6 callers
Method
translate_icmp
(&mut self, cmp: IntCC, lhs: Expr, rhs: Expr)
src/jit.rs:261
↓ 4 callers
Function
run_code
Executes the given code using the cranelift JIT compiler. Feeds the given input into the JIT compiled function and returns the resulting output. # S
src/bin/toy.rs:45
↓ 3 callers
Function
declare_variable
Declare a single variable declaration.
src/jit.rs:454
↓ 1 callers
Method
compile
Compile a string in the toy language into machine code.
src/jit.rs:53
↓ 1 callers
Method
create_data
Create a zero-initialized data section.
src/jit.rs:96
↓ 1 callers
Function
declare_variables
( int: types::Type, builder: &mut FunctionBuilder, params: &[String], the_return: &str, st
src/jit.rs:398
↓ 1 callers
Function
declare_variables_in_stmt
Recursively descend through the AST, translating all implicit variable declarations.
src/jit.rs:426
↓ 1 callers
Function
run_hello
(jit: &mut jit::JIT)
src/bin/toy.rs:32
↓ 1 callers
Method
translate
Translate from toy-language AST nodes into Cranelift IR.
src/jit.rs:116
↓ 1 callers
Method
translate_assign
(&mut self, name: String, expr: Expr)
src/jit.rs:251
↓ 1 callers
Method
translate_call
(&mut self, name: String, args: Vec<Expr>)
src/jit.rs:360
↓ 1 callers
Method
translate_global_data_addr
(&mut self, name: String)
src/jit.rs:386
↓ 1 callers
Method
translate_if_else
( &mut self, condition: Expr, then_body: Vec<Expr>, else_body: Vec<Expr>,
src/jit.rs:267
↓ 1 callers
Method
translate_while_loop
(&mut self, condition: Expr, loop_body: Vec<Expr>)
src/jit.rs:328
Method
default
()
src/jit.rs:29
Function
main
()
src/bin/toy.rs:4
Function
run_foo
(jit: &mut jit::JIT)
src/bin/toy.rs:20
Function
run_iterative_fib_code
(jit: &mut jit::JIT, input: isize)
src/bin/toy.rs:28
Function
run_recursive_fib_code
(jit: &mut jit::JIT, input: isize)
src/bin/toy.rs:24