From 3ba6357924e1098a28e43c94a4573a3d2978b5e9 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 17 Mar 2015 11:23:29 -0700 Subject: 949 - paving the way for jumps to labels Addresses for reagents are now computed after all transforms. --- cpp/016jump | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cpp/016jump') diff --git a/cpp/016jump b/cpp/016jump index 2ce18859..827e70f4 100644 --- a/cpp/016jump +++ b/cpp/016jump @@ -8,7 +8,7 @@ Next_recipe_number++; :(before "End Primitive Recipe Implementations") case JUMP: { trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name; - pc += to_int(instructions[pc].ingredients[0].name); + pc += instructions[pc].ingredients[0].value; break; } @@ -49,7 +49,7 @@ case JUMP_IF: { break; } trace("run") << "ingredient 1 is " << instructions[pc].ingredients[1].name; - pc += to_int(instructions[pc].ingredients[1].name); + pc += instructions[pc].ingredients[1].value; trace("run") << "jumping to instruction " << pc+1; break; } @@ -91,7 +91,7 @@ case JUMP_UNLESS: { break; } trace("run") << "ingredient 1 is " << instructions[pc].ingredients[1].name; - pc += to_int(instructions[pc].ingredients[1].name); + pc += instructions[pc].ingredients[1].value; trace("run") << "jumping to instruction " << pc+1; break; } -- cgit 1.4.1-2-gfad0