mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2026-01-03 13:15:36 +01:00
Add global variables
This commit is contained in:
parent
a3022e4969
commit
54cc7d06ce
3 changed files with 28 additions and 18 deletions
|
|
@ -62,6 +62,13 @@ class Module {
|
|||
*/
|
||||
Ref Emit(Ref op);
|
||||
|
||||
/**
|
||||
* Adds a global variable
|
||||
* @param variable Global variable to add.
|
||||
* @return Returns variable.
|
||||
*/
|
||||
Ref AddGlobalVariable(Ref variable);
|
||||
|
||||
// Types
|
||||
|
||||
/// Returns type void.
|
||||
|
|
@ -233,6 +240,8 @@ class Module {
|
|||
|
||||
std::vector<std::unique_ptr<Op>> declarations;
|
||||
|
||||
std::vector<Ref> global_variables;
|
||||
|
||||
std::vector<Ref> code;
|
||||
|
||||
std::vector<std::unique_ptr<Op>> code_store;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue