From c82d01762778baeb71c26365479e3c1cddcfbf13 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 26 Mar 2015 17:03:07 -0700 Subject: 973 --- cpp/018record | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'cpp/018record') 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) { -- cgit 1.4.1-2-gfad0