Add global variables

This commit is contained in:
ReinUsesLisp 2018-10-20 02:52:55 -03:00
parent a3022e4969
commit 54cc7d06ce
3 changed files with 28 additions and 18 deletions

View file

@ -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;