about summary refs log tree commit diff stats
path: root/022arithmetic.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-09-30 01:57:23 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-09-30 01:57:23 -0700
commit4e49b29e63b0d369b81318ac822dc06ce06786b5 (patch)
treed78b822660f33f40eea08c6747245fb729877073 /022arithmetic.cc
parenta0d7a15594990974808cc613a4814d1f86471b5e (diff)
downloadmu-4e49b29e63b0d369b81318ac822dc06ce06786b5.tar.gz
2221
Diffstat (limited to '022arithmetic.cc')
-rw-r--r--022arithmetic.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/022arithmetic.cc b/022arithmetic.cc
index 9eca7e11..66aefbc8 100644
--- a/022arithmetic.cc
+++ b/022arithmetic.cc
@@ -6,6 +6,7 @@ ADD,
 Recipe_ordinal["add"] = ADD;
 :(before "End Primitive Recipe Type Checks")
 case ADD: {
+  // primary goal of these checks is to forbid address arithmetic
   for (long long int i = 0; i < SIZE(inst.ingredients); ++i) {
     if (!is_mu_number(inst.ingredients.at(i))) {
       raise << Recipe[r].name << ": 'add' requires number ingredients, but got " << inst.ingredients.at(i).original_string << '\n' << end();
@@ -78,7 +79,7 @@ case SUBTRACT: {
     break;
   }
   for (long long int i = 0; i < SIZE(inst.ingredients); ++i) {
-    if (is_raw(inst.ingredients.at(i))) continue;  // offsets in tests
+    if (is_raw(inst.ingredients.at(i))) continue;  // permit address offset computations in tests
     if (!is_mu_number(inst.ingredients.at(i))) {
       raise << Recipe[r].name << ": 'subtract' requires number ingredients, but got " << inst.ingredients.at(i).original_string << '\n' << end();
       goto finish_checking_instruction;