Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/diatom-lang/diatom
/ functions
Functions
290 in github.com/diatom-lang/diatom
⨍
Functions
290
◇
Types & classes
108
↓ 2 callers
Method
decompile
Show decompiled byte code for given source code. If compilation failed, `Err` will be returned.
diatom-core/src/interpreter/mod.rs:294
↓ 2 callers
Method
enter_function
(&mut self, func_id: usize)
diatom-core/src/interpreter/register_table.rs:134
↓ 2 callers
Method
gen_sym
Generate an unique symbol
diatom-core/src/interpreter/register_table.rs:60
↓ 2 callers
Method
get_ast
(&self, fid: usize)
diatom-core/src/file_manager/mod.rs:76
↓ 2 callers
Method
get_obj_mut
Get a mutable reference by reference id Return None if id is invalid. If id is provided by parameters, it can never be invalid and thus is safe to un
diatom-core/src/interpreter/ffi/mod.rs:47
↓ 2 callers
Method
get_table_key
(&self, key: impl AsRef<str>)
diatom-core/src/gc/mod.rs:201
↓ 2 callers
Method
get_unchecked_raw
(&self, idx: usize)
diatom-core/src/gc/pool.rs:50
↓ 2 callers
Method
is_ext_name
(&mut self, name: impl AsRef<str>)
diatom-core/src/file_manager/mod.rs:47
↓ 2 callers
Method
load_std
(&mut self)
diatom/src/lib.rs:101
↓ 2 callers
Method
look_up_key
(&self, id: usize)
diatom-core/src/gc/key_pool.rs:19
↓ 2 callers
Method
patch_backward
Insert jump from current loc to previous
diatom-core/src/interpreter/mod.rs:59
↓ 2 callers
Method
pause
(&mut self)
diatom-core/src/gc/mod.rs:580
↓ 2 callers
Method
pop_call_stack
None if there is no more call stack
diatom-core/src/gc/mod.rs:360
↓ 2 callers
Method
print
(&self, reg: &Reg)
diatom-core/src/gc/mod.rs:409
↓ 2 callers
Method
resolve_mod
(&mut self, mod_path: &[String])
diatom-core/src/frontend/parser/mod.rs:424
↓ 2 callers
Method
resume
(&mut self)
diatom-core/src/gc/mod.rs:584
↓ 2 callers
Method
scan_const
(&mut self, constant: &Const)
diatom-core/src/interpreter/scanner/const_scanner.rs:88
↓ 2 callers
Method
set_module_return
(&mut self, fid: usize, ref_id: usize)
diatom-core/src/gc/mod.rs:189
↓ 2 callers
Function
try_read_path
(path: PathBuf, file_manager: &mut FileManager)
diatom-core/src/frontend/parser/path_resolver.rs:19
↓ 1 callers
Method
add
(self, rhs: Loc)
diatom-core/src/file_manager/util.rs:24
↓ 1 callers
Method
alloc_str_pinned
(&mut self, s: String)
diatom-core/src/gc/mod.rs:221
↓ 1 callers
Function
cast_to_duration
( state: &'a State<Buffer>, value: &DiatomValue, )
diatom-std-os/src/lib.rs:37
↓ 1 callers
Method
clean_call_stack
(&mut self)
diatom-core/src/gc/mod.rs:400
↓ 1 callers
Method
clear_diagnoses
(&mut self)
diatom-core/src/file_manager/mod.rs:105
↓ 1 callers
Method
clear_marks
(&mut self)
diatom-core/src/gc/mod.rs:528
↓ 1 callers
Method
collect_garbage
Immediately collect garbage
diatom-core/src/interpreter/ffi/mod.rs:102
↓ 1 callers
Method
compile_ast
if compile succeeded, return last expression's reg id
diatom-core/src/interpreter/mod.rs:425
↓ 1 callers
Method
compile_closure
Return (func_id, parameters len, captured_regs, reg_size)
diatom-core/src/interpreter/mod.rs:1656
↓ 1 callers
Method
compile_infix
( &mut self, op: &OpInfix, lhs: usize, rhs: usize, loc: Loc, t
diatom-core/src/interpreter/mod.rs:1511
↓ 1 callers
Method
compile_prefix
( &mut self, op: &OpPrefix, rhs: usize, loc: Loc, target: Option<usize
diatom-core/src/interpreter/mod.rs:1630
↓ 1 callers
Function
compose_path
(path: PathBuf)
diatom-core/src/frontend/parser/path_resolver.rs:5
↓ 1 callers
Method
consume_block
(&mut self, iter: &mut TokenIterator)
diatom-core/src/frontend/parser/mod.rs:752
↓ 1 callers
Method
consume_def
(&mut self, iter: &mut TokenIterator)
diatom-core/src/frontend/parser/mod.rs:698
↓ 1 callers
Method
consume_fn
(&mut self, iter: &mut TokenIterator)
diatom-core/src/frontend/parser/mod.rs:656
↓ 1 callers
Method
consume_for
(&mut self, iter: &mut TokenIterator)
diatom-core/src/frontend/parser/mod.rs:582
↓ 1 callers
Method
consume_if
(&mut self, iter: &mut TokenIterator)
diatom-core/src/frontend/parser/mod.rs:294
↓ 1 callers
Method
consume_import
(&mut self, iter: &mut TokenIterator)
diatom-core/src/frontend/parser/mod.rs:442
↓ 1 callers
Method
consume_loop
(&mut self, iter: &mut TokenIterator)
diatom-core/src/frontend/parser/mod.rs:617
↓ 1 callers
Method
consume_table
(&mut self, iter: &mut TokenIterator)
diatom-core/src/frontend/parser/mod.rs:779
↓ 1 callers
Method
declare_captured_variable
Declare a captured variable This function alloc a new register instead of recycle old one
diatom-core/src/interpreter/register_table.rs:86
↓ 1 callers
Method
decompile
Show decompiled byte code for given source code. If compilation failed, `Err` will be returned.
diatom/src/lib.rs:174
↓ 1 callers
Method
exec
Run a piece of diatom source code # Parameters `code` - Source code `source` - name of source code file or where it is from `is_phony` - Whether sour
diatom-core/src/interpreter/mod.rs:383
↓ 1 callers
Function
fib
(n)
benches/fibonacci/fib.py:1
↓ 1 callers
Method
get
(&self, idx: usize)
diatom-core/src/interpreter/ffi/obj_mut.rs:79
↓ 1 callers
Method
get_file
(&self, fid: usize)
diatom-core/src/file_manager/mod.rs:67
↓ 1 callers
Method
get_key
(&self, key: impl AsRef<str>)
diatom-core/src/gc/key_pool.rs:23
↓ 1 callers
Method
get_module_return
(&self, fid: usize)
diatom-core/src/gc/mod.rs:185
↓ 1 callers
Method
get_or_insert
(&mut self, key: impl Into<String> + AsRef<str>)
diatom-core/src/gc/key_pool.rs:9
↓ 1 callers
Method
get_string_by_id
Get string by string id Return None if id is invalid. If id is provided by parameters, it can never be invalid and thus is safe to unwrap.
diatom-core/src/interpreter/ffi/mod.rs:27
↓ 1 callers
Method
highlight
(&self, line: &str, _cursor: usize)
diatom-cli/src/cli/highlighter.rs:51
↓ 1 callers
Method
input_can_continue
(&self)
diatom-core/src/file_manager/mod.rs:80
↓ 1 callers
Function
is_func
(s: &str)
diatom-cli/src/cli/highlighter.rs:26
↓ 1 callers
Function
is_key
(s: &str)
diatom-cli/src/cli/highlighter.rs:18
↓ 1 callers
Function
is_key_value
(s: &str)
diatom-cli/src/cli/highlighter.rs:22
↓ 1 callers
Function
join_search_path
(search_path: impl Into<PathBuf>, import: &[String])
diatom-core/src/frontend/parser/path_resolver.rs:13
↓ 1 callers
Method
load_ext
(&mut self, extension: Extension<Buffer>)
diatom-core/src/interpreter/mod.rs:250
↓ 1 callers
Method
load_ext
Load an rust extension. Return the extension if its namespace is already occupied
diatom/src/lib.rs:186
↓ 1 callers
Method
look_up_fid
(&self, path: impl Into<OsString>)
diatom-core/src/file_manager/mod.rs:63
↓ 1 callers
Method
lookup_variable_
(reg_id, depth, loc)
diatom-core/src/interpreter/register_table.rs:94
↓ 1 callers
Method
mark_roots
(&mut self)
diatom-core/src/gc/mod.rs:534
↓ 1 callers
Method
new_ext
(&mut self, name: String)
diatom-core/src/file_manager/mod.rs:43
↓ 1 callers
Function
os_extension
()
diatom-std-os/src/lib.rs:124
↓ 1 callers
Method
parse_file_phony
Parse a phony file
diatom-core/src/frontend/parser/mod.rs:97
↓ 1 callers
Method
pause_gc
Pause garbage collection Do nothing if gc is already paused.
diatom-core/src/interpreter/ffi/mod.rs:109
↓ 1 callers
Function
precedence_infix
(op: OpInfix)
diatom-core/src/frontend/parser/mod.rs:23
↓ 1 callers
Function
precedence_postfix
()
diatom-core/src/frontend/parser/mod.rs:45
↓ 1 callers
Function
precedence_prefix
()
diatom-core/src/frontend/parser/mod.rs:41
↓ 1 callers
Method
print
(&self, value: &DiatomValue)
diatom-core/src/interpreter/ffi/mod.rs:97
↓ 1 callers
Method
print_reg
(&self, reg: &Reg, visited: &mut BTreeSet<usize>, buffer: &mut String)
diatom-core/src/gc/mod.rs:416
↓ 1 callers
Method
repl
Enable or disable REPL mode (print last value to output buffer)
diatom-core/src/interpreter/mod.rs:138
↓ 1 callers
Method
reset_ip
(&mut self)
diatom-core/src/vm/mod.rs:118
↓ 1 callers
Method
resume_gc
Resume garbage collection Do nothing if gc is not paused.
diatom-core/src/interpreter/ffi/mod.rs:116
↓ 1 callers
Method
run
Run this console
diatom-cli/src/cli/mod.rs:28
↓ 1 callers
Method
scan_const
(&mut self, constant: &Const)
diatom-core/src/interpreter/scanner/capture_scanner.rs:197
↓ 1 callers
Method
set_ast
(&mut self, fid: usize, ast: Vec<Stmt>)
diatom-core/src/file_manager/mod.rs:71
↓ 1 callers
Method
share_reg
(&mut self, id: usize)
diatom-core/src/gc/mod.rs:277
↓ 1 callers
Function
std_lib
()
diatom-std-core/src/lib.rs:62
↓ 1 callers
Function
to_diagnostic
(error: ErrorCode, loc: Loc)
diatom-core/src/frontend/lexer/error.rs:22
↓ 1 callers
Method
traverse_ext
( &mut self, path_stack: &mut Vec<String>, Extension { name, kind }: Extension<Buffer>
diatom-core/src/interpreter/mod.rs:206
↓ 1 callers
Method
verify_input_completeness
Check if input is completeness Incomplete input usually contains unclosed parentheses, quotes or open expression.
diatom-core/src/interpreter/mod.rs:284
↓ 1 callers
Method
with_search_path
Add module search path
diatom-core/src/interpreter/mod.rs:144
Function
built_in_extension
()
diatom-std-core/src/built_in.rs:3
Method
clear_marks
(&mut self)
diatom-core/src/gc/pool.rs:70
Method
collect
(&mut self)
diatom-core/src/gc/pool.rs:74
Method
consume_escape
(iter: &mut FileIterator)
diatom-core/src/frontend/lexer/mod.rs:364
Method
consume_hex_escape
Consume a hex escape sequence with n character exactly
diatom-core/src/frontend/lexer/mod.rs:366
Method
consume_id_or_key
Consume keyword or Identifier
diatom-core/src/frontend/lexer/mod.rs:309
Method
consume_int
(s: &str)
diatom-core/src/frontend/lexer/mod.rs:112
Method
consume_next_2_char
(iter: &mut FileIterator)
diatom-core/src/frontend/lexer/mod.rs:461
Method
consume_num
Consume numeric types, aka int & float.
diatom-core/src/frontend/lexer/mod.rs:111
Method
consume_op
Consume operators
diatom-core/src/frontend/lexer/mod.rs:460
Method
consume_string
Consume string token
diatom-core/src/frontend/lexer/mod.rs:363
Method
decompile
(&self, decompiled: &mut String, _gc: &Gc<Buffer>)
diatom-core/src/vm/op.rs:59
Method
default
()
diatom-core/src/gc/pool.rs:87
Method
default
()
diatom-core/src/gc/mod.rs:37
Method
exec
( &self, ip: Ip, gc: &mut Gc<Buffer>, _out: &mut Buffer, )
diatom-core/src/vm/op.rs:46
Method
fields
(&self)
diatom-core/src/interpreter/ffi/obj_mut.rs:36
Method
fields
(&self)
diatom-core/src/interpreter/ffi/obj.rs:25
Function
float_extension
()
diatom-std-core/src/float.rs:24
Method
fmt
(&self, f: &mut std::fmt::Formatter<'_>)
diatom-core/src/frontend/lexer/token.rs:129
← previous
next →
101–200 of 290, ranked by callers