From b24eb4766ad12eceaafa2ee0d620e070e21a3293 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 13 Mar 2016 20:26:47 -0700 Subject: 2773 - switch to 'int' This should eradicate the issue of 2771. --- 043space.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to '043space.cc') 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 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::iterator p = Name[r].begin(); p != Name[r].end(); ++p) { + for (map::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; -- cgit 1.4.1-2-gfad0