diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-03-26 16:40:56 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-03-26 16:40:56 -0700 |
commit | c63e2811a14344801950d075ca89c3601e73f065 (patch) | |
tree | d8b103c69b69987086cc85f6fcab1815acddd681 | |
parent | e853b94e93f0a525c857eff97b5ed3d7e9fecdac (diff) | |
download | mu-c63e2811a14344801950d075ca89c3601e73f065.tar.gz |
972
-rw-r--r-- | cpp/013run | 3 | ||||
-rw-r--r-- | cpp/019address | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/cpp/013run b/cpp/013run index fa7e3468..5173f6f3 100644 --- a/cpp/013run +++ b/cpp/013run @@ -118,8 +118,9 @@ recipes_added_by_test.clear(); //: beware: overridden in later layers vector<int> read_memory(reagent x) { //? cout << "read_memory: " << x.to_string() << '\n'; //? 1 + static const int LITERAL = Type_number["literal"]; vector<int> result; - if (x.types[0] == 0) { // literal + if (x.types[0] == LITERAL) { result.push_back(x.value); return result; } diff --git a/cpp/019address b/cpp/019address index 6d697cb5..28fa4515 100644 --- a/cpp/019address +++ b/cpp/019address @@ -75,8 +75,9 @@ bool has_property(reagent x, string name) { reagent deref(reagent x) { //? cout << "deref\n"; //? 1 + static const int ADDRESS = Type_number["address"]; reagent result(""); - assert(x.types[0] == 2); // address + assert(x.types[0] == ADDRESS); // compute value result.set_value(Memory[x.value]); |