about summary refs log tree commit diff stats
path: root/cpp/017compare
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-17 10:31:17 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-17 10:31:17 -0700
commit1848b18f02b158861008214efd19708585bfcbe5 (patch)
tree3b5ddc0355f9b2b099156a668761cf45edefefb1 /cpp/017compare
parent9da1b126cc017e14035b94c4615d211e5bc4bb21 (diff)
downloadmu-1848b18f02b158861008214efd19708585bfcbe5.tar.gz
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.
Diffstat (limited to 'cpp/017compare')
-rw-r--r--cpp/017compare30
1 files changed, 10 insertions, 20 deletions
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;