about summary refs log tree commit diff stats
path: root/043space.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-03-13 20:26:47 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-03-13 20:26:47 -0700
commitb24eb4766ad12eceaafa2ee0d620e070e21a3293 (patch)
treed7efc84bce7cf75fa18792d02bceb15480690a2d /043space.cc
parent95b2a140094697dec176167154f9b3b31c2ef70f (diff)
downloadmu-b24eb4766ad12eceaafa2ee0d620e070e21a3293.tar.gz
2773 - switch to 'int'
This should eradicate the issue of 2771.
Diffstat (limited to '043space.cc')
-rw-r--r--043space.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/043space.cc b/043space.cc
index cd91bd8d..c65f456f 100644
--- a/043space.cc
+++ b/043space.cc
@@ -45,7 +45,7 @@ if (s == "default-space") return true;
 
 //:: now implement space support
 :(before "End call Fields")
-long long int default_space;
+int default_space;
 :(before "End call Constructor")
 default_space = 0;
 
@@ -63,15 +63,15 @@ void absolutize(reagent& x) {
   assert(is_raw(x));
 }
 
-long long int space_base(const reagent& x) {
+int space_base(const reagent& x) {
   // temporary stub; will be replaced in a later layer
   return current_call().default_space ? (current_call().default_space+/*skip refcount*/1) : 0;
 }
 
-long long int address(long long int offset, long long int base) {
+int address(int offset, int base) {
   assert(offset >= 0);
   if (base == 0) return offset;  // raw
-  long long int size = get_or_insert(Memory, base);
+  int size = get_or_insert(Memory, base);
   if (offset >= size) {
     // todo: test
     raise << "location " << offset << " is out of bounds " << size << " at " << base << '\n' << end();
@@ -242,9 +242,9 @@ void try_reclaim_locals() {
   // reclaim any local variables unless they're being returned
   vector<double> zero;
   zero.push_back(0);
-  for (long long int i = /*leave default space for last*/1; i < SIZE(exiting_recipe.steps); ++i) {
+  for (int i = /*leave default space for last*/1; i < SIZE(exiting_recipe.steps); ++i) {
     const instruction& inst = exiting_recipe.steps.at(i);
-    for (long long int i = 0; i < SIZE(inst.products); ++i) {
+    for (int i = 0; i < SIZE(inst.products); ++i) {
       if (!is_mu_address(inst.products.at(i))) continue;
       // local variables only
       if (has_property(inst.products.at(i), "space")) continue;
@@ -312,7 +312,7 @@ Hide_missing_default_space_errors = false;
 
 :(code)
 bool contains_non_special_name(const recipe_ordinal r) {
-  for (map<string, long long int>::iterator p = Name[r].begin(); p != Name[r].end(); ++p) {
+  for (map<string, int>::iterator p = Name[r].begin(); p != Name[r].end(); ++p) {
     if (p->first.empty()) continue;
     if (p->first.find("stash_") == 0) continue;  // generated by rewrite_stashes_to_text (cross-layer)
     if (!is_special_name(p->first))
@@ -329,7 +329,7 @@ bool operator==(const reagent& a, const reagent& b) {
 }
 
 bool operator<(const reagent& a, const reagent& b) {
-  long long int aspace = 0, bspace = 0;
+  int aspace = 0, bspace = 0;
   if (has_property(a, "space")) aspace = to_integer(property(a, "space")->value);
   if (has_property(b, "space")) bspace = to_integer(property(b, "space")->value);
   if (aspace != bspace) return aspace < bspace;