Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TomBebbington/jit.rs
/ functions
Functions
244 in github.com/TomBebbington/jit.rs
⨍
Functions
244
◇
Types & classes
41
↓ 130 callers
Method
into
(self)
src/types.rs:356
↓ 36 callers
Function
from_ptr
(ptr: *mut c_void)
src/util.rs:52
↓ 31 callers
Method
clone
Make a copy of the type descriptor by increasing its reference count.
src/types.rs:321
↓ 26 callers
Method
insn_unop
(&self, value: &'a Val, f: unsafe extern "C" fn(
src/function.rs:910
↓ 24 callers
Method
insn_binop
(&self, v1: &'a Val, v2: &'a Val, f: unsafe extern "C" fn(
src/function.rs:898
↓ 15 callers
Function
simple_type
(cx: &mut ExtCtxt, name: &'static str, as_cow:bool)
macro/src/macros.rs:26
↓ 12 callers
Function
from_ptr_opt
(ptr: *mut c_void)
src/util.rs:36
↓ 11 callers
Method
iter
Iterate through the instructions
src/insn.rs:120
↓ 9 callers
Method
insn_label
Make an instruction that sets a label
src/function.rs:547
↓ 5 callers
Method
get_kind
Get a value that indicates the kind of this type. This allows callers to quickly classify a type to determine how it should be handled further.
src/types.rs:417
↓ 5 callers
Method
insn_call_native
Make an instruction that calls a native function that has the signature given with some arguments
src/function.rs:770
↓ 5 callers
Method
insn_store_relative
Make an instruction that stores the `value` at the address `dest + offset`, where `dest` must be a pointer
src/function.rs:537
↓ 5 callers
Function
run
(cmd: &mut Command, text: Option<&str>)
sys/build.rs:89
↓ 5 callers
Function
type_expr
(cx: &mut ExtCtxt, sp: Span, ty: P<Ty>, as_cow: bool)
macro/src/macros.rs:35
↓ 4 callers
Function
count
(func: &UncompiledFunction<'a>, code: &mut Peekable<I>, curr:char)
examples/brainfuck.rs:39
↓ 4 callers
Method
fields
Iterate over the type's fields ```rust use jit::*; let pos_t = get::<(f64, f64)>(); let f64_t = get::<f64>(); for field in pos_t.fields() { assert_eq
src/types.rs:471
↓ 4 callers
Method
insn_branch
Make an instruction that branches to a certain label
src/function.rs:554
↓ 4 callers
Method
insn_branch_if_not
Make an instruction that branches to a certain label if the value is false
src/function.rs:568
↓ 4 callers
Method
insn_load_relative
Make an instruction that loads a value of the given type from `value + offset`, where `value` must be a pointer
src/function.rs:513
↓ 4 callers
Method
next
(&mut self)
src/elf.rs:34
↓ 3 callers
Method
compile
Compile the function
src/function.rs:1004
↓ 3 callers
Function
compile_expr
(cx: &mut ExtCtxt, ctx: &ExprCtxt, expr: P<Expr>)
macro/src/macros.rs:318
↓ 3 callers
Function
exists
PathExt::exists isn't stable, so fake it by querying file metadata.
sys/build.rs:25
↓ 3 callers
Method
get_type
Get the type of the value
src/value.rs:34
↓ 3 callers
Method
insn_of
Make an instructional representation of a Rust value ```rust use jit::*; let mut ctx = Context::<()>::new(); let func = UncompiledFunction::new(&mut c
src/function.rs:315
↓ 3 callers
Method
params
Iterate over the function signature's parameters ```rust use jit::*; let sig_t = get::<fn(i32, i32) -> i32>(); let i32_t = get::<i32>(); for param in
src/types.rs:485
↓ 3 callers
Method
size_hint
(&self)
src/types.rs:238
↓ 3 callers
Method
write
Write to the filename given (not implemented by LibJIT yet, so there's no point to this yet but I'm sure GNU will hear the people sing the songs of an
src/elf.rs:172
↓ 2 callers
Function
from_ptr_oom
(ptr: *mut c_void)
src/util.rs:43
↓ 2 callers
Method
insn_convert
Make an instruction that converts the value to the type given
src/function.rs:296
↓ 2 callers
Method
insn_store
Make an instruction that stores the contents of `val` into `dest`, where `dest` is a temporary value or local value
src/function.rs:529
↓ 2 callers
Method
is_pointer
Check if this is a pointer ```rust use jit::*; assert!(get::<&'static u8>().is_pointer()); ```
src/types.rs:578
↓ 2 callers
Function
run
(ctx: &mut Context, code: &str)
examples/brainfuck.rs:126
↓ 2 callers
Method
set_optimization_level
Set the optimization level of the function, where the bigger the level, the more effort should be spent optimising
src/function.rs:971
↓ 2 callers
Method
set_recompilable
Make this function a candidate for recompilation
src/function.rs:985
↓ 2 callers
Method
with
Run a closure with the compiled function as an argument
src/function.rs:100
↓ 1 callers
Function
compile
(func: &UncompiledFunction<'a>, code: &str)
examples/brainfuck.rs:48
↓ 1 callers
Method
deref
(&self)
src/types.rs:338
↓ 1 callers
Method
end
(&mut self, func: &UncompiledFunction<'a>)
examples/brainfuck.rs:30
↓ 1 callers
Method
functions
Iterate through the functions contained inside this context
src/context.rs:76
↓ 1 callers
Method
get_return
Get the type returned by this function type.
src/types.rs:431
↓ 1 callers
Method
insn_branch_if
Make an instruction that branches to a certain label if the value is true
src/function.rs:561
↓ 1 callers
Method
insn_call_native0
Make an instruction that calls a Rust function that has the signature given with no arguments and expects a return value
src/function.rs:806
↓ 1 callers
Method
insn_call_native1
Make an instruction that calls a Rust function that has the signature given with a single argument and expects a return value
src/function.rs:816
↓ 1 callers
Method
insn_default_return
Return from the function
src/function.rs:342
↓ 1 callers
Method
is_float
Check if this is a floating-point number ```rust use jit::*; assert!(get::<f64>().is_float()); assert!(!get::<i16>().is_float()); ```
src/types.rs:526
↓ 1 callers
Method
is_primitive
Check if this is a primitive ```rust use jit::*; assert!(get::<i16>().is_primitive()); assert!(!get::<(i16, i16)>().is_primitive()); ```
src/types.rs:513
↓ 1 callers
Method
is_signature
Check if this is a signature ```rust use jit::*; assert!(get::<fn(i16) -> i16>().is_signature()); ```
src/types.rs:566
↓ 1 callers
Function
mul_add_tutorial
An [example from the libjit manual][example], translated to Rust. We compile and call a function equivalent to: ```c int mul_add(int x, int y, int z
sys/examples/mul_add.rs:18
Method
add_function
Add a function to the ELF
src/elf.rs:180
Method
add_needed
Add a dependency to the ELF
src/elf.rs:188
Method
add_to_context
(&self, ctx:&Context)
src/elf.rs:129
Function
bench_gcd
(b: &mut Bencher)
benches/gcd.rs:11
Function
bench_raw_gcd
(b: &mut Bencher)
benches/gcd.rs:26
Method
borrow
(&self)
src/types.rs:298
Method
compile
(self, func:&UncompiledFunction<'a>)
src/compile.rs:22
Method
compile_with
Compile the function and call a closure with it directly
src/function.rs:1017
Method
default
()
src/function.rs:37
Method
default
()
tests/compile.rs:59
Method
deref
(&self)
src/label.rs:34
Method
deref
(&self)
src/function.rs:82
Method
deref_mut
(&mut self)
src/types.rs:345
Method
deref_mut
(&mut self)
src/label.rs:39
Method
deref_mut
(&mut self)
src/function.rs:87
Method
description
(&self)
src/elf.rs:82
Method
dest_is_value
Get if the destination value is a value
src/insn.rs:31
Method
drop
Free a type descriptor by decreasing its reference count.
src/types.rs:330
Method
drop
(&mut self)
src/elf.rs:148
Method
drop
(&mut self)
src/function.rs:220
Method
drop
(&mut self)
src/context.rs:96
Method
drop
(&mut self)
tests/tags.rs:28
Function
dump
(cb: F)
src/util.rs:5
Method
ends_in_dead
Check if the block ends in dead code
src/insn.rs:114
Function
expand_derive_compile
(cx: &mut ExtCtxt, sp: Span, _meta: &MetaItem, item: &Annotatable, push: &mut FnMut(Annotatable))
macro/src/macros.rs:75
Function
expand_jit
(cx: &mut ExtCtxt, sp: Span, tt: &[TokenTree])
macro/src/macros.rs:432
Method
float32_value
(&mut self)
sys/lib.rs:239
Method
float64_value
(&mut self)
sys/lib.rs:242
Method
fmt
(&self, fmt: &mut fmt::Formatter)
src/value.rs:17
Method
fmt
(&self, fmt: &mut fmt::Formatter)
src/types.rs:45
Method
fmt
(&self, fmt:&mut fmt::Formatter)
src/insn.rs:70
Method
fmt
(&self, fmt:&mut fmt::Formatter)
src/label.rs:16
Method
fmt
(&self, fmt: &mut fmt::Formatter)
src/elf.rs:72
Method
fmt
(&self, fmt: &mut fmt::Formatter)
src/function.rs:92
Function
free_data
(data: *mut c_void)
src/jit.rs:72
Method
from
Convert from a native pointer
src/types.rs:612
Method
from
Convert to a native pointer
src/function.rs:173
Function
gcd
(x: usize, y: usize)
benches/gcd.rs:27
Function
get
Get the Rust type given as a type descriptor
src/types.rs:671
Method
get_alignment
Get the alignment of this type in bytes.
src/types.rs:409
Method
get_current
Get the current block of this function
src/function.rs:997
Method
get_dest
Get the destination value
src/insn.rs:25
Method
get_entry
Get the entry block of this function
src/function.rs:991
Method
get_field
Find the field/parameter index for a particular name.
src/types.rs:490
Method
get_function
Get the function which made this value
src/value.rs:40
Method
get_function
Get the function containing this value
src/insn.rs:49
Method
get_max_optimization_level
Get the max optimization level
src/function.rs:978
Method
get_name
Get the field's name or none if it lacks one
src/types.rs:177
Method
get_name
Get the name of the instruction
src/insn.rs:61
Method
get_name
Get the name of this ELF binary
src/elf.rs:122
Method
get_offset
Get the offset of the field
src/types.rs:197
next →
1–100 of 244, ranked by callers