From 827898fc1b41e1974bf4ec2eebbd97fe23ff3d08 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 12 May 2015 17:00:56 -0700 Subject: 1357 - temporarily revert floating-point support --- 034exclusive_container.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to '034exclusive_container.cc') diff --git a/034exclusive_container.cc b/034exclusive_container.cc index 5b849916..b2855f79 100644 --- a/034exclusive_container.cc +++ b/034exclusive_container.cc @@ -89,20 +89,19 @@ Recipe_number["maybe-convert"] = MAYBE_CONVERT; :(before "End Primitive Recipe Implementations") case MAYBE_CONVERT: { reagent base = canonize(current_instruction().ingredients.at(0)); - assert(!is_negative(base.value)); - index_t base_address = value(base.value); + index_t base_address = base.value; type_number base_type = base.types.at(0); assert(Type[base_type].kind == exclusive_container); assert(isa_literal(current_instruction().ingredients.at(1))); index_t tag = current_instruction().ingredients.at(1).value; long long int result; - if (tag == static_cast(value(Memory[base_address]))) { + if (tag == static_cast(Memory[base_address])) { result = base_address+1; } else { result = 0; } products.resize(1); - products.at(0).push_back(mu_integer(result)); // address must be a positive integer + products.at(0).push_back(result); break; } -- cgit 1.4.1-2-gfad0