MCPcopy Create free account

hub / github.com/bytecodealliance/cranelift-jit-demo / functions

Functions20 in github.com/bytecodealliance/cranelift-jit-demo

↓ 10 callersMethodtranslate_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 callersMethodtranslate_icmp
(&mut self, cmp: IntCC, lhs: Expr, rhs: Expr)
src/jit.rs:261
↓ 4 callersFunctionrun_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 callersFunctiondeclare_variable
Declare a single variable declaration.
src/jit.rs:454
↓ 1 callersMethodcompile
Compile a string in the toy language into machine code.
src/jit.rs:53
↓ 1 callersMethodcreate_data
Create a zero-initialized data section.
src/jit.rs:96
↓ 1 callersFunctiondeclare_variables
( int: types::Type, builder: &mut FunctionBuilder, params: &[String], the_return: &str, st
src/jit.rs:398
↓ 1 callersFunctiondeclare_variables_in_stmt
Recursively descend through the AST, translating all implicit variable declarations.
src/jit.rs:426
↓ 1 callersFunctionrun_hello
(jit: &mut jit::JIT)
src/bin/toy.rs:32
↓ 1 callersMethodtranslate
Translate from toy-language AST nodes into Cranelift IR.
src/jit.rs:116
↓ 1 callersMethodtranslate_assign
(&mut self, name: String, expr: Expr)
src/jit.rs:251
↓ 1 callersMethodtranslate_call
(&mut self, name: String, args: Vec<Expr>)
src/jit.rs:360
↓ 1 callersMethodtranslate_global_data_addr
(&mut self, name: String)
src/jit.rs:386
↓ 1 callersMethodtranslate_if_else
( &mut self, condition: Expr, then_body: Vec<Expr>, else_body: Vec<Expr>,
src/jit.rs:267
↓ 1 callersMethodtranslate_while_loop
(&mut self, condition: Expr, loop_body: Vec<Expr>)
src/jit.rs:328
Methoddefault
()
src/jit.rs:29
Functionmain
()
src/bin/toy.rs:4
Functionrun_foo
(jit: &mut jit::JIT)
src/bin/toy.rs:20
Functionrun_iterative_fib_code
(jit: &mut jit::JIT, input: isize)
src/bin/toy.rs:28
Functionrun_recursive_fib_code
(jit: &mut jit::JIT, input: isize)
src/bin/toy.rs:24