MCPcopy Create free account
hub / github.com/amber-lang/amber / add_declaration

Method add_declaration

src/utils/function_cache.rs:40–50  ·  view source on GitHub ↗

Adds a new function declaration to the cache

(&mut self, id: usize, context: Context, block: Block)

Source from the content-addressed store, hash-verified

38
39 /// Adds a new function declaration to the cache
40 pub fn add_declaration(&mut self, id: usize, context: Context, block: Block) {
41 self.funs.insert(
42 id,
43 FunctionCacheEntry {
44 instances: Vec::new(),
45 context,
46 block,
47 first_pass_done: false,
48 },
49 );
50 }
51
52 /// Adds a new function instance to the cache
53 pub fn add_instance(&mut self, id: usize, mut fun: FunctionInstance) -> usize {

Calls

no outgoing calls