diff options
Diffstat (limited to 'program.cpp')
-rw-r--r-- | program.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/program.cpp b/program.cpp index 153246c..1d7f31b 100644 --- a/program.cpp +++ b/program.cpp @@ -2,6 +2,10 @@ #include "value.h" +program::program() : + num_private_regs(0) + { } + register_address program::add_immediate(float value) { @@ -14,3 +18,9 @@ program::add_instruction(instruction * inst) { m_instructions.push_back(inst); } + +register_address +program::alloc_private_reg() +{ + return register_address(REGISTER_TYPE_PRIVATE, num_private_regs++); +} |