diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-06-24 09:16:17 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-06-24 09:18:20 -0700 |
commit | 23d3a02226973f80188e84fa5dcedb14413c5b7f (patch) | |
tree | 3c73284cb795e74d78e53b72df470cafca4c70cf /069hash.cc | |
parent | 377b00b045289a3fa8e88d4b2f129d797c687e2f (diff) | |
download | mu-23d3a02226973f80188e84fa5dcedb14413c5b7f.tar.gz |
4266 - space for alloc-id in heap allocations
This has taken me almost 6 weeks :(
Diffstat (limited to '069hash.cc')
-rw-r--r-- | 069hash.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/069hash.cc b/069hash.cc index 8a698d38..c810f98b 100644 --- a/069hash.cc +++ b/069hash.cc @@ -62,7 +62,7 @@ size_t hash_mu_address(size_t h, reagent& r) { } size_t hash_mu_text(size_t h, const reagent& r) { - string input = read_mu_text(get_or_insert(Memory, r.value)); + string input = read_mu_text(get_or_insert(Memory, r.value+/*skip alloc id*/1)); for (int i = 0; i < SIZE(input); ++i) { h = hash_iter(h, static_cast<size_t>(input.at(i))); //? cerr << i << ": " << h << '\n'; @@ -319,11 +319,11 @@ def main [ :(scenario hash_matches_old_version) def main [ 1:text <- new [abc] - 2:num <- hash 1:text - 3:num <- hash_old 1:text - 4:bool <- equal 2:num, 3:num + 3:num <- hash 1:text + 4:num <- hash_old 1:text + 5:bool <- equal 3:num, 4:num ] -+mem: storing 1 in location 4 ++mem: storing 1 in location 5 :(before "End Primitive Recipe Declarations") HASH_OLD, @@ -343,7 +343,7 @@ case HASH_OLD: { } :(before "End Primitive Recipe Implementations") case HASH_OLD: { - string input = read_mu_text(ingredients.at(0).at(0)); + string input = read_mu_text(ingredients.at(0).at(/*skip alloc id*/1)); size_t h = 0 ; for (int i = 0; i < SIZE(input); ++i) { |