about summary refs log tree commit diff stats
path: root/cpp/016jump
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/016jump
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/016jump')
-rw-r--r--cpp/016jump18
1 files changed, 6 insertions, 12 deletions
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<int> 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<int> arg0 = read_memory(instructions[pc].ingredients[0]);