From 1848b18f02b158861008214efd19708585bfcbe5 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 17 Apr 2015 10:31:17 -0700 Subject: 1073 - stop fixing the values of primitive recipes In the process I give up trace stability when I move files around, but I gain in exchange the ability to move files around. --- cpp/016jump | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'cpp/016jump') diff --git a/cpp/016jump b/cpp/016jump index 80f7aa8d..669c7258 100644 --- a/cpp/016jump +++ b/cpp/016jump @@ -1,10 +1,8 @@ -:(before "End Globals") +:(before "End Primitive Recipe Declarations") // Jump ops. -const int JUMP = 10; +JUMP, :(before "End Primitive Recipe Numbers") Recipe_number["jump"] = JUMP; -assert(Next_recipe_number == JUMP); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case JUMP: { trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].value; @@ -34,12 +32,10 @@ recipe main [ +run: instruction main/2 +run: instruction main/1 -:(before "End Globals") -const int JUMP_IF = 11; +:(before "End Primitive Recipe Declarations") +JUMP_IF, :(before "End Primitive Recipe Numbers") Recipe_number["jump-if"] = JUMP_IF; -assert(Next_recipe_number == JUMP_IF); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case JUMP_IF: { vector arg0 = read_memory(instructions[pc].ingredients[0]); @@ -76,12 +72,10 @@ recipe main [ +run: instruction main/1 +mem: storing 1 in location 123 -:(before "End Globals") -const int JUMP_UNLESS = 12; +:(before "End Primitive Recipe Declarations") +JUMP_UNLESS, :(before "End Primitive Recipe Numbers") Recipe_number["jump-unless"] = JUMP_UNLESS; -assert(Next_recipe_number == JUMP_UNLESS); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case JUMP_UNLESS: { vector arg0 = read_memory(instructions[pc].ingredients[0]); -- cgit 1.4.1-2-gfad0