From 6f5d7864f6c0c62b8849349cb182c61f8dbed452 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 25 Feb 2015 01:24:11 -0800 Subject: 832 - call-stack for C++ version These #defines and references now span many different layers. Let's see if the lack of encapsulation causes problems. Also interesting to run into a case where I need to modify a foundational layer and touch every single scenario/trace. Only alternative was to duplicate all the different layers that add instructions. Sign of problems with this model? --- cpp/015jump | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'cpp/015jump') diff --git a/cpp/015jump b/cpp/015jump index 99b333dd..26861166 100644 --- a/cpp/015jump +++ b/cpp/015jump @@ -16,9 +16,9 @@ recipe main [ jump 1:offset 1:integer <- copy 1:literal ] -+run: instruction 0 ++run: instruction main/0 +run: ingredient 0 is 1 --run: instruction 1 +-run: instruction main/1 -mem: storing in location 1 :(scenario "jump_backward") @@ -27,9 +27,9 @@ recipe main [ jump 1:offset // | 1 +-+ jump -2:offset // 2 +-->+ | ] // 3 \/ -+run: instruction 0 -+run: instruction 2 -+run: instruction 1 ++run: instruction main/0 ++run: instruction main/2 ++run: instruction main/1 :(before "End Globals") const int JUMP_IF = 11; @@ -56,10 +56,10 @@ recipe main [ jump-if 999:literal 1:offset 1:integer <- copy 1:literal ] -+run: instruction 0 ++run: instruction main/0 +run: ingredient 1 is 1 +run: jumping to instruction 2 --run: instruction 1 +-run: instruction main/1 -mem: storing in location 1 :(scenario "jump_if_fallthrough") @@ -67,9 +67,9 @@ recipe main [ jump-if 0:literal 1:offset 123:integer <- copy 1:literal ] -+run: instruction 0 ++run: instruction main/0 +run: jump-if fell through -+run: instruction 1 ++run: instruction main/1 +mem: storing in location 123 :(before "End Globals") @@ -97,10 +97,10 @@ recipe main [ jump-unless 0:literal 1:offset 1:integer <- copy 1:literal ] -+run: instruction 0 ++run: instruction main/0 +run: ingredient 1 is 1 +run: jumping to instruction 2 --run: instruction 1 +-run: instruction main/1 -mem: storing in location 1 :(scenario "jump_unless_fallthrough") @@ -108,8 +108,8 @@ recipe main [ jump-unless 999:literal 1:offset 123:integer <- copy 1:literal ] -+run: instruction 0 ++run: instruction main/0 +run: ingredient 0 is 999 +run: jump-unless fell through -+run: instruction 1 ++run: instruction main/1 +mem: storing in location 123 -- cgit 1.4.1-2-gfad0