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/015boolean | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'cpp/015boolean') diff --git a/cpp/015boolean b/cpp/015boolean index 2b85d9a4..6c677f7e 100644 --- a/cpp/015boolean +++ b/cpp/015boolean @@ -1,10 +1,8 @@ -:(before "End Globals") +:(before "End Primitive Recipe Declarations") // Boolean ops. -const int AND = 7; +AND, :(before "End Primitive Recipe Numbers") Recipe_number["and"] = AND; -assert(Next_recipe_number == AND); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case AND: { trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name; @@ -34,12 +32,10 @@ recipe main [ +run: product 0 is 0 +mem: storing 0 in location 3 -:(before "End Globals") -const int OR = 8; +:(before "End Primitive Recipe Declarations") +OR, :(before "End Primitive Recipe Numbers") Recipe_number["or"] = OR; -assert(Next_recipe_number == OR); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case OR: { trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name; @@ -69,12 +65,10 @@ recipe main [ +run: product 0 is 1 +mem: storing 1 in location 3 -:(before "End Globals") -const int NOT = 9; +:(before "End Primitive Recipe Declarations") +NOT, :(before "End Primitive Recipe Numbers") Recipe_number["not"] = NOT; -assert(Next_recipe_number == NOT); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case NOT: { trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name; -- cgit 1.4.1-2-gfad0