about summary refs log tree commit diff stats
path: root/cpp/024brace
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/024brace')
-rw-r--r--cpp/024brace12
1 files changed, 6 insertions, 6 deletions
diff --git a/cpp/024brace b/cpp/024brace
index fdcf12e6..ec6171f7 100644
--- a/cpp/024brace
+++ b/cpp/024brace
@@ -60,7 +60,7 @@ void transform_braces(const recipe_number r) {
       ;  // do nothing
     else if (inst.operation == Recipe_number["loop"]) {
       inst.operation = Recipe_number["jump"];
-      if (inst.ingredients.size() > 0 && inst.ingredients[0].types[0] == 0) {
+      if (inst.ingredients.size() > 0 && isa_literal(inst.ingredients[0])) {
         // explicit target; a later phase will handle it
         trace("after-brace") << "jump " << inst.ingredients[0].name << ":offset";
       }
@@ -75,7 +75,7 @@ void transform_braces(const recipe_number r) {
     }
     else if (inst.operation == Recipe_number["break"]) {
       inst.operation = Recipe_number["jump"];
-      if (inst.ingredients.size() > 0 && inst.ingredients[0].types[0] == 0) {
+      if (inst.ingredients.size() > 0 && isa_literal(inst.ingredients[0])) {
         // explicit target; a later phase will handle it
         trace("after-brace") << "jump " << inst.ingredients[0].name << ":offset";
       }
@@ -88,7 +88,7 @@ void transform_braces(const recipe_number r) {
     }
     else if (inst.operation == Recipe_number["loop-if"]) {
       inst.operation = Recipe_number["jump-if"];
-      if (inst.ingredients.size() > 1 && inst.ingredients[1].types[0] == 0) {
+      if (inst.ingredients.size() > 1 && isa_literal(inst.ingredients[1])) {
         // explicit target; a later phase will handle it
         trace("after-brace") << "jump " << inst.ingredients[1].name << ":offset";
       }
@@ -101,7 +101,7 @@ void transform_braces(const recipe_number r) {
     }
     else if (inst.operation == Recipe_number["break-if"]) {
       inst.operation = Recipe_number["jump-if"];
-      if (inst.ingredients.size() > 1 && inst.ingredients[1].types[0] == 0) {
+      if (inst.ingredients.size() > 1 && isa_literal(inst.ingredients[1])) {
         // explicit target; a later phase will handle it
         trace("after-brace") << "jump " << inst.ingredients[1].name << ":offset";
       }
@@ -114,7 +114,7 @@ void transform_braces(const recipe_number r) {
     }
     else if (inst.operation == Recipe_number["loop-unless"]) {
       inst.operation = Recipe_number["jump-unless"];
-      if (inst.ingredients.size() > 1 && inst.ingredients[1].types[0] == 0) {
+      if (inst.ingredients.size() > 1 && isa_literal(inst.ingredients[1])) {
         // explicit target; a later phase will handle it
         trace("after-brace") << "jump " << inst.ingredients[1].name << ":offset";
       }
@@ -127,7 +127,7 @@ void transform_braces(const recipe_number r) {
     }
     else if (inst.operation == Recipe_number["break-unless"]) {
       inst.operation = Recipe_number["jump-unless"];
-      if (inst.ingredients.size() > 1 && inst.ingredients[1].types[0] == 0) {
+      if (inst.ingredients.size() > 1 && isa_literal(inst.ingredients[1])) {
         // explicit target; a later phase will handle it
         trace("after-brace") << "jump " << inst.ingredients[1].name << ":offset";
       }