MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / store_name

Method store_name

compiler/src/modules/parser/mod.rs:146–155  ·  view source on GitHub ↗
(&mut self, name: String)

Source from the content-addressed store, hash-verified

144 }
145
146 pub(super) fn store_name(&mut self, name: String) {
147 if self.globals_decl.contains(&name) {
148 let i = self.chunk.push_name(&name);
149 self.chunk.emit(OpCode::StoreGlobal, i);
150 return;
151 }
152 let ver = self.increment_version(&name);
153 let i = self.push_ssa_name(&name, ver);
154 self.chunk.emit(OpCode::StoreName, i);
155 }
156
157 pub(super) fn with_fresh_chunk(&mut self, f: impl FnOnce(&mut Self)) -> SSAChunk {
158 let saved_chunk = core::mem::take(&mut self.chunk);

Callers 7

stmtMethod · 0.80
name_stmtMethod · 0.80
assignMethod · 0.80
comprehension_loopMethod · 0.80
for_stmt_innerMethod · 0.80
try_stmtMethod · 0.80
with_stmt_innerMethod · 0.80

Calls 5

push_nameMethod · 0.80
emitMethod · 0.80
increment_versionMethod · 0.80
push_ssa_nameMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected