mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2025-12-28 18:26:54 +01:00
Add OpDecorate
This commit is contained in:
parent
54cc7d06ce
commit
1458bd2c1c
6 changed files with 49 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue