about summary refs log tree commit diff stats
path: root/030container.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-12 17:00:56 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-12 17:10:33 -0700
commit827898fc1b41e1974bf4ec2eebbd97fe23ff3d08 (patch)
tree437518c84d6df812c6af440c79f578e0949a5c8e /030container.cc
parent3663ca6c2d4c42c4a7bf6af4b2edf71dd8d10dd7 (diff)
downloadmu-827898fc1b41e1974bf4ec2eebbd97fe23ff3d08.tar.gz
1357 - temporarily revert floating-point support
Diffstat (limited to '030container.cc')
-rw-r--r--030container.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/030container.cc b/030container.cc
index 042c0b5a..edde3395 100644
--- a/030container.cc
+++ b/030container.cc
@@ -110,8 +110,7 @@ Recipe_number["get"] = GET;
 :(before "End Primitive Recipe Implementations")
 case GET: {
   reagent base = 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 == container);
   assert(isa_literal(current_instruction().ingredients.at(1)));
@@ -127,7 +126,7 @@ case GET: {
   type_number src_type = Type[base_type].elements.at(offset).at(0);
   trace("run") << "its type is " << src_type;
   reagent tmp;
-  tmp.set_value(mu_integer(src));
+  tmp.set_value(src);
   tmp.types.push_back(src_type);
   products.push_back(read_memory(tmp));
   break;
@@ -175,8 +174,7 @@ Recipe_number["get-address"] = GET_ADDRESS;
 :(before "End Primitive Recipe Implementations")
 case GET_ADDRESS: {
   reagent base = 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 == container);
   assert(isa_literal(current_instruction().ingredients.at(1)));
@@ -188,6 +186,6 @@ case GET_ADDRESS: {
   }
   trace("run") << "address to copy is " << result;
   products.resize(1);
-  products.at(0).push_back(mu_integer(result));  // address must be a positive integer
+  products.at(0).push_back(result);
   break;
 }