diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-03-26 17:03:07 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-03-26 17:03:07 -0700 |
commit | c82d01762778baeb71c26365479e3c1cddcfbf13 (patch) | |
tree | 846100fbc599414b520d5049ffa14182318a5451 /cpp/018record | |
parent | c63e2811a14344801950d075ca89c3601e73f065 (diff) | |
download | mu-c82d01762778baeb71c26365479e3c1cddcfbf13.tar.gz |
973
Diffstat (limited to 'cpp/018record')
-rw-r--r-- | cpp/018record | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cpp/018record b/cpp/018record index 64cedb7a..91e142a3 100644 --- a/cpp/018record +++ b/cpp/018record @@ -39,8 +39,7 @@ case GET: { 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 + assert(isa_literal(instructions[pc].ingredients[1])); size_t offset = instructions[pc].ingredients[1].value; int src = base_address; for (size_t i = 0; i < offset; ++i) { @@ -118,8 +117,7 @@ case GET_ADDRESS: { 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 + assert(isa_literal(instructions[pc].ingredients[1])); size_t offset = instructions[pc].ingredients[1].value; int src = base_address; for (size_t i = 0; i < offset; ++i) { |