From 9570363aec35e187e2395b1760a4b94e71580ac9 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 29 Jul 2015 15:55:05 -0700 Subject: 1885 --- html/023jump.cc.html | 71 ++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 36 deletions(-) (limited to 'html/023jump.cc.html') diff --git a/html/023jump.cc.html b/html/023jump.cc.html index 16a89563..472a964b 100644 --- a/html/023jump.cc.html +++ b/html/023jump.cc.html @@ -13,16 +13,15 @@ pre { white-space: pre-wrap; font-family: monospace; color: #eeeeee; background-color: #080808; } body { font-family: monospace; color: #eeeeee; background-color: #080808; } * { font-size: 1.05em; } -.traceAbsent { color: #c00000; } -.Constant { color: #00a0a0; } +.traceContains { color: #008000; } .cSpecial { color: #008000; } -.Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Special { color: #ff6060; } +.Constant { color: #00a0a0; } +.traceAbsent { color: #c00000; } .Comment { color: #9090ff; } .Delimiter { color: #a04060; } +.Special { color: #ff6060; } .CommentedCode { color: #6c6c6c; } .Identifier { color: #804000; } -.traceContains { color: #008000; } --> @@ -40,10 +39,10 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } #? % Trace_stream->dump_layer = "all"; #? 1 recipe main [ jump 1:offset - 1:number <- copy 1:literal + 1:number <- copy 1 ] +run: jump 1:offset --run: 1:number <- copy 1:literal +-run: 1:number <- copy 1 -mem: storing 1 in location 1 :(before "End Primitive Recipe Declarations") @@ -51,12 +50,12 @@ JUMP, :(before "End Primitive Recipe Numbers") Recipe_ordinal["jump"] = JUMP; :(before "End Primitive Recipe Implementations") -case JUMP: { - if (SIZE(ingredients) != 1) { +case JUMP: { + if (SIZE(ingredients) != 1) { raise << current_recipe_name() << ": 'jump' requires exactly one ingredient, but got " << current_instruction().to_string() << '\n' << end(); break; } - if (!scalar(ingredients.at(0))) { + if (!scalar(ingredients.at(0))) { raise << current_recipe_name() << ": first ingredient of 'jump' should be a label or offset, but got " << current_instruction().ingredients.at(0).original_string << '\n' << end(); break; } @@ -86,21 +85,21 @@ JUMP_IF, :(before "End Primitive Recipe Numbers") Recipe_ordinal["jump-if"] = JUMP_IF; :(before "End Primitive Recipe Implementations") -case JUMP_IF: { - if (SIZE(ingredients) != 2) { +case JUMP_IF: { + if (SIZE(ingredients) != 2) { raise << current_recipe_name() << ": 'jump-if' requires exactly two ingredients, but got " << current_instruction().to_string() << '\n' << end(); break; } - if (!scalar(ingredients.at(0))) { + if (!scalar(ingredients.at(0))) { raise << current_recipe_name() << ": 'jump-if' requires a boolean for its first ingredient, but got " << current_instruction().ingredients.at(0).original_string << '\n' << end(); break; } - if (!scalar(ingredients.at(1))) { + if (!scalar(ingredients.at(1))) { raise << current_recipe_name() << ": 'jump-if' requires a label or offset for its second ingredient, but got " << current_instruction().ingredients.at(0).original_string << '\n' << end(); break; } assert(current_instruction().ingredients.at(1).initialized); - if (!ingredients.at(0).at(0)) { + if (!ingredients.at(0).at(0)) { trace(Primitive_recipe_depth, "run") << "jump-if fell through" << end(); break; } @@ -111,22 +110,22 @@ Recipe_ordinal["jump-if"] = JUMP_IF:(scenario jump_if) recipe main [ - jump-if 999:literal, 1:offset - 123:number <- copy 1:literal + jump-if 999, 1:offset + 123:number <- copy 1 ] -+run: jump-if 999:literal, 1:offset ++run: jump-if 999, 1:offset +run: jumping to instruction 2 --run: 1:number <- copy 1:literal +-run: 1:number <- copy 1 -mem: storing 1 in location 123 :(scenario jump_if_fallthrough) recipe main [ - jump-if 0:literal, 1:offset - 123:number <- copy 1:literal + jump-if 0, 1:offset + 123:number <- copy 1 ] -+run: jump-if 0:literal, 1:offset ++run: jump-if 0, 1:offset +run: jump-if fell through -+run: 123:number <- copy 1:literal ++run: 123:number <- copy 1 +mem: storing 1 in location 123 :(before "End Primitive Recipe Declarations") @@ -134,21 +133,21 @@ JUMP_UNLESS, :(before "End Primitive Recipe Numbers") Recipe_ordinal["jump-unless"] = JUMP_UNLESS; :(before "End Primitive Recipe Implementations") -case JUMP_UNLESS: { - if (SIZE(ingredients) != 2) { +case JUMP_UNLESS: { + if (SIZE(ingredients) != 2) { raise << current_recipe_name() << ": 'jump-unless' requires exactly two ingredients, but got " << current_instruction().to_string() << '\n' << end(); break; } - if (!scalar(ingredients.at(0))) { + if (!scalar(ingredients.at(0))) { raise << current_recipe_name() << ": 'jump-unless' requires a boolean for its first ingredient, but got " << current_instruction().ingredients.at(0).original_string << '\n' << end(); break; } - if (!scalar(ingredients.at(1))) { + if (!scalar(ingredients.at(1))) { raise << current_recipe_name() << ": 'jump-unless' requires a label or offset for its second ingredient, but got " << current_instruction().ingredients.at(0).original_string << '\n' << end(); break; } assert(current_instruction().ingredients.at(1).initialized); - if (ingredients.at(0).at(0)) { + if (ingredients.at(0).at(0)) { trace(Primitive_recipe_depth, "run") << "jump-unless fell through" << end(); break; } @@ -159,22 +158,22 @@ Recipe_ordinal["jump-unless"] = JUMP_UNL :(scenario jump_unless) recipe main [ - jump-unless 0:literal, 1:offset - 123:number <- copy 1:literal + jump-unless 0, 1:offset + 123:number <- copy 1 ] -+run: jump-unless 0:literal, 1:offset ++run: jump-unless 0, 1:offset +run: jumping to instruction 2 --run: 123:number <- copy 1:literal +-run: 123:number <- copy 1 -mem: storing 1 in location 123 :(scenario jump_unless_fallthrough) recipe main [ - jump-unless 999:literal, 1:offset - 123:number <- copy 1:literal + jump-unless 999, 1:offset + 123:number <- copy 1 ] -+run: jump-unless 999:literal, 1:offset ++run: jump-unless 999, 1:offset +run: jump-unless fell through -+run: 123:number <- copy 1:literal ++run: 123:number <- copy 1 +mem: storing 1 in location 123 -- cgit 1.4.1-2-gfad0