diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-10-25 21:42:18 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-10-25 21:42:18 -0700 |
commit | c6034af30882b6a0a38bcf1fe546ed3dfd3bed04 (patch) | |
tree | d63634d44163ad21ddbbabf9a9386adf697a7aa2 /075scenario_console.cc | |
parent | f5dfb7f7374c7e78575d0c205db391814be1b434 (diff) | |
download | mu-c6034af30882b6a0a38bcf1fe546ed3dfd3bed04.tar.gz |
2277 - reagents now have a tree of types
Diffstat (limited to '075scenario_console.cc')
-rw-r--r-- | 075scenario_console.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/075scenario_console.cc b/075scenario_console.cc index ab6aba94..11438bf4 100644 --- a/075scenario_console.cc +++ b/075scenario_console.cc @@ -104,10 +104,10 @@ case ASSUME_CONSOLE: { } } assert(Current_routine->alloc == event_data_address+size); - // wrap the array of events in an event object - ensure_space(size_of_events()); + // wrap the array of events in a console object + ensure_space(size_of_console()); Memory[CONSOLE] = Current_routine->alloc; - Current_routine->alloc += size_of_events(); + Current_routine->alloc += size_of_console(); Memory[Memory[CONSOLE]+/*offset of 'data' in container 'events'*/1] = event_data_address; break; } @@ -266,19 +266,19 @@ long long int size_of_event() { // memoize result if already computed static long long int result = 0; if (result) return result; - vector<type_ordinal> type; - type.push_back(Type_ordinal["event"]); + type_tree* type = new type_tree(Type_ordinal["event"]); result = size_of(type); + delete type; return result; } -long long int size_of_events() { +long long int size_of_console() { // memoize result if already computed static long long int result = 0; if (result) return result; - vector<type_ordinal> type; assert(Type_ordinal["console"]); - type.push_back(Type_ordinal["console"]); + type_tree* type = new type_tree(Type_ordinal["console"]); result = size_of(type); + delete type; return result; } |