summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/stages/bytecode.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/stages/bytecode.rs b/src/stages/bytecode.rs
index db6ff6d..4b50327 100644
--- a/src/stages/bytecode.rs
+++ b/src/stages/bytecode.rs
@@ -38,12 +38,14 @@ impl<'a> BytecodeGenerator<'a> {
let mut labels = HashMap::new();
for (name, definition) in definitions {
if let DefinitionKind::LabelDefinition = definition.kind {
- labels.insert(name, LabelInformation { address: 0, slots: Vec::new() });
+ let key = name.to_string();
+ let value = LabelInformation { address: 0, slots: Vec::new() };
+ labels.insert(key, value);
}
}
Self {
definitions,
- labels: HashMap::new(),
+ labels,
stack: Vec::new(),
bytecode: Vec::new(),
}