diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-09-30 01:57:23 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-09-30 01:57:23 -0700 |
commit | 4e49b29e63b0d369b81318ac822dc06ce06786b5 (patch) | |
tree | d78b822660f33f40eea08c6747245fb729877073 /022arithmetic.cc | |
parent | a0d7a15594990974808cc613a4814d1f86471b5e (diff) | |
download | mu-4e49b29e63b0d369b81318ac822dc06ce06786b5.tar.gz |
2221
Diffstat (limited to '022arithmetic.cc')
-rw-r--r-- | 022arithmetic.cc | 3 |
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; |