Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/adam-mcdaniel/sage
/ functions
Functions
1,185 in github.com/adam-mcdaniel/sage
⨍
Functions
1,185
◇
Types & classes
113
↓ 1,282 callers
Method
clone
(&self)
src/lir/expr/ops/mod.rs:590
↓ 330 callers
Method
op
(&mut self, op: CoreOp)
src/vm/std.rs:45
↓ 247 callers
Function
whitespace
( input: &'a str, )
src/frontend/parse.rs:1338
↓ 151 callers
Method
get_type
Get the type associated with a value under a given environment.
src/lir/types/inference.rs:20
↓ 130 callers
Method
eval
Evaluate this constant expression at compile time, and get the result.
src/lir/expr/const_expr.rs:201
↓ 127 callers
Method
resolve
Resolve the global variables in a location to produce an addressable location.
src/asm/globals.rs:48
↓ 122 callers
Method
get
(&self, src: Input, result: &mut dyn VirtualMachineProgram)
src/asm/location.rs:1086
↓ 110 callers
Method
deref
Dereference this expression (i.e. get the value it points to).
src/lir/expr/expression.rs:760
↓ 92 callers
Method
insert
(name,id,tailTable)
docs/static.files/search-92e6798f.js:1
↓ 68 callers
Method
offset
Get the location offset by a constant number of cells from a starting location. For example, `Offset(Address(8), -2)` is equivalent to `Address(6)`.
src/asm/location.rs:199
↓ 63 callers
Method
get_size
Get the size of something in memory (number of cells).
src/lir/types/size.rs:33
↓ 57 callers
Method
contains
(keyvalue)
docs/static.files/search-92e6798f.js:1
↓ 57 callers
Method
equals
(&self, other: &Self, env: &Env)
src/lir/expr/const_expr.rs:108
↓ 55 callers
Method
annotate
An annotated expression with some metadata.
src/lir/expr/expression.rs:458
↓ 49 callers
Method
reg_mut_vector
(&mut self)
src/vm/interpreter/std.rs:84
↓ 48 callers
Method
can_decay_to
Can a pointer of this mutability decay to a pointer of another mutability? Mutable pointers can decay to immutable pointers, but immutable pointers ca
src/lir/types/mod.rs:44
↓ 45 callers
Method
std_op
(&mut self, op: StandardOp)
src/vm/std.rs:96
↓ 43 callers
Method
from
Move the pointer from this location.
src/asm/location.rs:278
↓ 43 callers
Method
reg_mut_vector
(&mut self)
examples/web/src/interpreter.rs:71
↓ 42 callers
Method
to
Move the pointer to this location.
src/asm/location.rs:260
↓ 36 callers
Method
simplify_until_concrete
Simplify until the type is concrete.
src/lir/types/mod.rs:985
↓ 35 callers
Function
unsupported
(op: StandardOp)
src/asm/std.rs:460
↓ 34 callers
Method
assemble
Assemble the program into a virtual machine program. The `allowed_recursion_depth` is the size of the frame pointer stack. The frame pointer stack is
src/asm/std.rs:70
↓ 33 callers
Function
addClass
(elem,className)
docs/static.files/storage-59e33391.js:1
↓ 32 callers
Function
onEachLazy
(lazyArray,func)
docs/static.files/storage-59e33391.js:1
↓ 32 callers
Method
reg_mut_vector
(&mut self)
src/vm/interpreter/core.rs:73
↓ 32 callers
Method
set
This cell = a constant value.
src/asm/location.rs:1010
↓ 29 callers
Method
run
Run a core program using this interpreter and its device.
src/vm/interpreter/std.rs:265
↓ 28 callers
Method
add
This cell += source cell.
src/asm/location.rs:892
↓ 28 callers
Function
assert_parse_expr
(input: &str, expr: Option<Expr>)
src/frontend/parse.rs:4422
↓ 28 callers
Method
field
Get a field from a structure, union, or tuple. For tuples, use an `Int` constant expression to access the nth field (zero indexed). For unions or str
src/lir/expr/expression.rs:641
↓ 26 callers
Function
getSettingValue
(settingName)
docs/static.files/storage-59e33391.js:1
↓ 26 callers
Method
std_op
( &self, op: vm::StandardOp, result: &mut dyn VirtualMachineProgram, )
src/asm/location.rs:1027
↓ 25 callers
Function
as_float
A function to reinterpret the bits of an integer as a float.
src/vm/interpreter/std.rs:10
↓ 25 callers
Method
compile_args
Compile a list of arguments, accounting for the fact that the stack is growing as we compile arguments. Use this to compile arguments to an operator,
src/lir/env.rs:1256
↓ 25 callers
Method
deref
Get the location of the value pointed to by this location.
src/asm/location.rs:217
↓ 25 callers
Method
join
Merge two declarations into one, while preserving the order of the declarations. This will not mutate the declaration, but will return a new declarati
src/lir/expr/declaration.rs:384
↓ 25 callers
Method
op
Add a core operation to the program.
src/asm/std.rs:161
↓ 25 callers
Method
reg_vector
(&self)
src/vm/interpreter/std.rs:80
↓ 25 callers
Method
reg_vector
(&self)
examples/web/src/interpreter.rs:67
↓ 25 callers
Method
with
Return this expression, but with a given declaration in scope.
src/lir/expr/expression.rs:470
↓ 24 callers
Method
define_type
Define a type with a given name under this environment.
src/lir/env.rs:1001
↓ 24 callers
Method
get_type
Get a type definition from this environment.
src/lir/env.rs:1045
↓ 24 callers
Function
hasClass
(elem,className)
docs/static.files/storage-59e33391.js:1
↓ 24 callers
Function
removeClass
(elem,className)
docs/static.files/storage-59e33391.js:1
↓ 24 callers
Method
simplify
Simplify an expression while maintaining structural equality.
src/lir/mod.rs:85
↓ 23 callers
Function
as_float
A function to reinterpret the bits of an integer as a float.
examples/web/src/lib.rs:18
↓ 22 callers
Method
as_symbol
Try to get this constant expression as a symbol (like in LISP).
src/lir/expr/const_expr.rs:579
↓ 22 callers
Method
substitute
Substitute all occurences of a symbol with another type. This will not traverse into let-bindings when the symbol is overshadowed.
src/lir/types/mod.rs:1154
↓ 21 callers
Method
refer
Reference this expression (i.e. get a pointer to it).
src/lir/expr/expression.rs:755
↓ 20 callers
Method
unpack
(data,index,bitsPerValue)
docs/static.files/search-92e6798f.js:6
↓ 19 callers
Function
as_int
A function to reinterpret the bits of a float as an integer.
src/vm/interpreter/std.rs:15
↓ 19 callers
Function
assert_parse_const
(input: &str, expected: Option<ConstExpr>)
src/frontend/parse.rs:4361
↓ 19 callers
Function
assert_parse_type
(input: &str, expected: Option<Type>)
src/frontend/parse.rs:4383
↓ 19 callers
Method
binop
(self, op: impl ToString, other: impl Into<Self>)
src/lir/expr/expression.rs:586
↓ 19 callers
Method
compile_expr
(self, env: &mut Env, output: &mut dyn AssemblyProgram)
src/lir/expr/procedure/ffi.rs:59
↓ 19 callers
Method
vec_restore_from
(&self, size: usize, result: &mut dyn VirtualMachineProgram)
src/asm/location.rs:361
↓ 19 callers
Method
vec_save_to
(&self, size: usize, result: &mut dyn VirtualMachineProgram)
src/asm/location.rs:367
↓ 18 callers
Method
annotate
Annotate an error with some metadata.
src/lir/error.rs:143
↓ 18 callers
Method
next
Take the pointer value of this location, and make it point `count` number of cells to the right of its original position.
src/asm/location.rs:301
↓ 17 callers
Method
copy_to
Store the value of this cell into another cell.
src/asm/location.rs:1119
↓ 17 callers
Method
display
Formats the operation for display.
src/lir/expr/ops/mod.rs:177
↓ 16 callers
Function
block
(shortty,id,longty)
docs/static.files/main-5f194d8c.js:1
↓ 16 callers
Method
equals
Are two types structurally equal?
src/lir/types/mod.rs:1551
↓ 16 callers
Method
get_associated_const
(&self, ty: &Type, name: &str)
src/lir/env.rs:369
↓ 16 callers
Method
save
(&mut self)
src/vm/mod.rs:131
↓ 15 callers
Function
as_int
A function to reinterpret the bits of a float as an integer.
examples/web/src/lib.rs:23
↓ 15 callers
Method
restore
(&mut self)
src/vm/mod.rs:127
↓ 15 callers
Function
updateLocalStorage
(name,value)
docs/static.files/storage-59e33391.js:1
↓ 15 callers
Method
vec_binop
( &self, op: vm::CoreOp, src: &Self, size: usize, result: &mut dyn Vir
src/asm/location.rs:685
↓ 14 callers
Method
binop
Perform a `CoreOp` as an abstract binary operation. Essentially, if you pass an instruction such as `Add`, `Sub`, etc., then the corresponding operati
src/asm/location.rs:718
↓ 14 callers
Method
is_const_param
Is this type a constant parameter? This will recursively detect if the subtypes are constant parameters as well
src/lir/types/mod.rs:226
↓ 14 callers
Method
is_none
Is this annotation none?
src/lir/annotate.rs:55
↓ 14 callers
Method
simplify_until_const_param
Simplify until the type is concrete.
src/lir/types/mod.rs:997
↓ 13 callers
Method
bind
Bind the pattern to the given expression. This will take the given `ret` expression, and return a new expression which will evaluate to the same valu
src/lir/expr/pattern.rs:910
↓ 13 callers
Method
buildTypeMapIndex
(name,isAssocType)
docs/static.files/search-92e6798f.js:1
↓ 13 callers
Method
compile
Compile the expression into an assembly program. On success, this will return an Ok value containing either a successfully compiled core assembly pro
src/lir/compile.rs:32
↓ 13 callers
Method
compile
Compile a declaration with a body in a new scope. This will copy the old environment, and add the declaration to the new environment.
src/lir/expr/declaration.rs:225
↓ 13 callers
Method
flatten
Flatten a core program so that all of its functions are defined sequentially at the beginning.
src/vm/std.rs:121
↓ 13 callers
Method
sub
This cell -= source cell.
src/asm/location.rs:897
↓ 13 callers
Method
type_check
Typechecks the operation on the given expression.
src/lir/expr/ops/mod.rs:144
↓ 12 callers
Method
assign
Perform an AssignOp on this expression.
src/lir/expr/expression.rs:776
↓ 12 callers
Method
clone_box
Clone this operation into a box.
src/lir/expr/ops/io.rs:73
↓ 12 callers
Method
copy_address_to
Copy the address of this location to another location.
src/asm/location.rs:254
↓ 12 callers
Method
is_mutable
Can this data be accessed mutably?
src/lir/types/mod.rs:55
↓ 12 callers
Method
monomorphize
(self, ty_args: Vec<Type>)
src/lir/expr/const_expr.rs:104
↓ 12 callers
Method
mul
This cell *= source cell.
src/asm/location.rs:902
↓ 12 callers
Method
restore_from
Restore the value from this location into the virtual machine's register.
src/asm/location.rs:337
↓ 12 callers
Method
return_type
Get the type of the result of applying this unary operation to the given type.
src/lir/expr/ops/io.rs:30
↓ 11 callers
Method
append
Merge two declarations into one, while preserving the order of the declarations. This will merge the declarations into a multi-declaration.
src/lir/expr/declaration.rs:392
↓ 11 callers
Method
apply
Apply this template type with some type arguments.
src/lir/types/mod.rs:701
↓ 11 callers
Method
store_vector
(&mut self, n: usize)
src/vm/mod.rs:103
↓ 10 callers
Method
add_compile_time_declaration
Add all the compile-time declarations to this environment. These are declarations for types, constants, and procedures that are defined at compile-tim
src/lir/env.rs:697
↓ 10 callers
Method
call
Call the Nth function defined in the program, where N is the value of the register.
src/vm/interpreter/std.rs:123
↓ 10 callers
Function
compile_frontend_file
(filename: &str)
benches/frontend.rs:20
↓ 10 callers
Method
deref_mut
Dereference this expression (i.e. get the value it points to), and write another expression to its position in memory.
src/lir/expr/expression.rs:766
↓ 10 callers
Function
getSettingsButton
()
docs/static.files/main-5f194d8c.js:1
↓ 10 callers
Method
get_type_of_associated_const
Get the type of an associated constant of a type.
src/lir/env.rs:245
↓ 10 callers
Method
unop
Apply a unary operation to this expression.
src/lir/expr/expression.rs:511
↓ 9 callers
Method
current_instruction
Get the current instruction number.
src/asm/std.rs:253
next →
1–100 of 1,185, ranked by callers