about summary refs log tree commit diff stats
path: root/043space.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 /043space.cc
parent3663ca6c2d4c42c4a7bf6af4b2edf71dd8d10dd7 (diff)
downloadmu-827898fc1b41e1974bf4ec2eebbd97fe23ff3d08.tar.gz
1357 - temporarily revert floating-point support
Diffstat (limited to '043space.cc')
-rw-r--r--043space.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/043space.cc b/043space.cc
index 24d63505..b0ee7f85 100644
--- a/043space.cc
+++ b/043space.cc
@@ -42,7 +42,7 @@ reagent absolutize(reagent x) {
 //?   cout << "not raw: " << x.to_string() << '\n'; //? 1
   assert(x.initialized);
   reagent r = x;
-  r.set_value(mu_integer(address(r.value, space_base(r))));  // must be a positive integer
+  r.set_value(address(r.value, space_base(r)));
 //?   cout << "after absolutize: " << r.value << '\n'; //? 1
   r.properties.push_back(pair<string, vector<string> >("raw", vector<string>()));
   assert(is_raw(r));
@@ -100,11 +100,11 @@ index_t space_base(const reagent& x) {
 index_t address(index_t offset, index_t base) {
   if (base == 0) return offset;  // raw
 //?   cout << base << '\n'; //? 2
-  if (value(offset) >= value(Memory[base])) {
+  if (offset >= static_cast<index_t>(Memory[base])) {
     // todo: test
-    raise << "location " << value(offset) << " is out of bounds " << value(Memory[base]) << '\n';
+    raise << "location " << offset << " is out of bounds " << Memory[base] << '\n';
   }
-  return value(base)+1 + value(offset);
+  return base+1 + offset;
 }
 
 :(after "void write_memory(reagent x, vector<long long int> data)")