From ce9b2b0515eaf92a9c68c8608fd9bf392c941d50 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 15 Jun 2018 22:16:09 -0700 Subject: 4258 - undo 4257 --- 085scenario_console.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to '085scenario_console.cc') diff --git a/085scenario_console.cc b/085scenario_console.cc index 31aa4fe7..2c3ab4bc 100644 --- a/085scenario_console.cc +++ b/085scenario_console.cc @@ -34,7 +34,7 @@ scenario keyboard-in-scenario [ ] :(before "End Scenario Globals") -extern const int CONSOLE = next_predefined_global_for_scenarios(/*size_of(address:console)*/2); +extern const int CONSOLE = Next_predefined_global_for_scenarios++; //: give 'console' a fixed location in scenarios :(before "End Special Scenario Variable Names(r)") Name[r]["console"] = CONSOLE; @@ -61,8 +61,8 @@ case ASSUME_CONSOLE: { int size = /*length*/1 + num_events*size_of_event(); int event_data_address = allocate(size); // store length - put(Memory, event_data_address+/*skip alloc id*/1, num_events); - int curr_address = event_data_address + /*skip alloc id*/1 + /*skip length*/1; + put(Memory, event_data_address, num_events); + int curr_address = event_data_address + /*skip length*/1; for (int i = 0; i < SIZE(r.steps); ++i) { const instruction& inst = r.steps.at(i); if (inst.name == "left-click") { @@ -113,13 +113,13 @@ case ASSUME_CONSOLE: { } } } - assert(curr_address == event_data_address+/*skip alloc id*/1+size); + assert(curr_address == event_data_address+size); // wrap the array of events in a console object int console_address = allocate(size_of_console()); trace("mem") << "storing console in " << console_address << end(); - put(Memory, CONSOLE+/*skip alloc id*/1, console_address); + put(Memory, CONSOLE, console_address); trace("mem") << "storing console data in " << console_address+/*offset of 'data' in container 'events'*/1 << end(); - put(Memory, console_address+/*skip alloc id*/1+/*offset of 'data' in container 'events'*/1+/*skip alloc id of 'data'*/1, event_data_address); + put(Memory, console_address+/*offset of 'data' in container 'events'*/1, event_data_address); break; } -- cgit 1.4.1-2-gfad0