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/017compare | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'cpp/017compare') diff --git a/cpp/017compare b/cpp/017compare index 45deab06..145feaa2 100644 --- a/cpp/017compare +++ b/cpp/017compare @@ -1,10 +1,8 @@ -:(before "End Globals") +:(before "End Primitive Recipe Declarations") // Comparison ops. -const int EQUAL = 13; +EQUAL, :(before "End Primitive Recipe Numbers") Recipe_number["equal"] = EQUAL; -assert(Next_recipe_number == EQUAL); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case EQUAL: { trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name; @@ -46,12 +44,10 @@ recipe main [ +run: product 0 is 1 +mem: storing 1 in location 3 -:(before "End Globals") -const int GREATER_THAN = 14; +:(before "End Primitive Recipe Declarations") +GREATER_THAN, :(before "End Primitive Recipe Numbers") Recipe_number["greater-than"] = GREATER_THAN; -assert(Next_recipe_number == GREATER_THAN); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case GREATER_THAN: { trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name; @@ -95,12 +91,10 @@ recipe main [ +run: product 0 is 0 +mem: storing 0 in location 3 -:(before "End Globals") -const int LESSER_THAN = 15; +:(before "End Primitive Recipe Declarations") +LESSER_THAN, :(before "End Primitive Recipe Numbers") Recipe_number["lesser-than"] = LESSER_THAN; -assert(Next_recipe_number == LESSER_THAN); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case LESSER_THAN: { trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name; @@ -144,12 +138,10 @@ recipe main [ +run: product 0 is 0 +mem: storing 0 in location 3 -:(before "End Globals") -const int GREATER_OR_EQUAL = 16; +:(before "End Primitive Recipe Declarations") +GREATER_OR_EQUAL, :(before "End Primitive Recipe Numbers") Recipe_number["greater-or-equal"] = GREATER_OR_EQUAL; -assert(Next_recipe_number == GREATER_OR_EQUAL); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case GREATER_OR_EQUAL: { trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name; @@ -207,12 +199,10 @@ recipe main [ +run: product 0 is 0 +mem: storing 0 in location 3 -:(before "End Globals") -const int LESSER_OR_EQUAL = 17; +:(before "End Primitive Recipe Declarations") +LESSER_OR_EQUAL, :(before "End Primitive Recipe Numbers") Recipe_number["lesser-or-equal"] = LESSER_OR_EQUAL; -assert(Next_recipe_number == LESSER_OR_EQUAL); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case LESSER_OR_EQUAL: { trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name; -- cgit 1.4.1-2-gfad0