Add OpDecorate

This commit is contained in:
ReinUsesLisp 2018-10-23 04:45:56 -03:00
parent 54cc7d06ce
commit 1458bd2c1c
6 changed files with 49 additions and 4 deletions

View file

@ -55,7 +55,7 @@ std::vector<u8> Module::Assemble() const {
WriteSet(stream, entry_points);
// TODO write execution mode
WriteSet(stream, debug);
// TODO write annotations
WriteSet(stream, annotations);
WriteSet(stream, declarations);
WriteSet(stream, global_variables);
WriteSet(stream, code);
@ -99,6 +99,7 @@ Ref Module::AddGlobalVariable(Ref variable) {
}
Ref Module::AddCode(Op* op) {
assert(op);
code_store.push_back(std::unique_ptr<Op>(op));
return op;
}
@ -121,4 +122,10 @@ Ref Module::AddDeclaration(Op* op) {
}
}
Ref Module::AddAnnotation(Op* op) {
assert(op);
annotations.push_back(std::unique_ptr<Op>(op));
return op;
}
} // namespace Sirit