about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-02-22 00:29:45 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-02-22 00:29:45 -0800
commitc1297a364b233375aa790e4440719e958c800892 (patch)
tree6ddd43957419d39ea3582f22a6a773dc5e7bfa87
parent333777c693463e56f6560bf184db8eca832834d1 (diff)
downloadmu-c1297a364b233375aa790e4440719e958c800892.tar.gz
816
-rw-r--r--cpp/017record3
1 files changed, 3 insertions, 0 deletions
diff --git a/cpp/017record b/cpp/017record
index 3f5d9889..89516672 100644
--- a/cpp/017record
+++ b/cpp/017record
@@ -34,6 +34,7 @@ case GET: {
   trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name;
   int base_address = to_int(instructions[pc].ingredients[0].name);
   int base_type = instructions[pc].ingredients[0].types[0];
+  assert(Type[base_type].is_record);
   trace("run") << "ingredient 1 is " << instructions[pc].ingredients[1].name;
   assert(instructions[pc].ingredients[1].types.size() == 1);
   assert(instructions[pc].ingredients[1].types[0] == 0);  // must be literal
@@ -109,6 +110,8 @@ Next_recipe_number++;
 case GET_ADDRESS: {
   trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name;
   int base_address = to_int(instructions[pc].ingredients[0].name);
+  int base_type = instructions[pc].ingredients[0].types[0];
+  assert(Type[base_type].is_record);
   trace("run") << "ingredient 1 is " << instructions[pc].ingredients[1].name;
   assert(instructions[pc].ingredients[1].types.size() == 1);
   assert(instructions[pc].ingredients[1].types[0] == 0);  // must be literal