From cdf2822743b3beeb37ebc3deea8e08b6130698c5 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 12 May 2018 10:22:26 -0700 Subject: 4242 - get rid of refcounts entirely We're going to lean back into the experiment of commit 4179 back in Jan. If we delete memory it's up to us to ensure no pointers into it survive. Since deep-copy depends on our refcounting infrastructure, it's gone as well. So we're going to have to start watching out for pointers shared over channels. --- html/070table.mu.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'html/070table.mu.html') diff --git a/html/070table.mu.html b/html/070table.mu.html index 6e1c73f7..f8e12f73 100644 --- a/html/070table.mu.html +++ b/html/070table.mu.html @@ -104,7 +104,7 @@ if ('onhashchange' in window) { 43 44 container table:_key:_value [ 45 length:num - 46 capacity:num + 46 capacity:num 47 data:&:@:table-row:_key:_value 48 ] 49 @@ -114,12 +114,12 @@ if ('onhashchange' in window) { 53 value:_value 54 ] 55 - 56 def new-table capacity:num -> result:&:table:_key:_value [ + 56 def new-table capacity:num -> result:&:table:_key:_value [ 57 local-scope 58 load-inputs 59 result <- new {(table _key _value): type} - 60 data:&:@:table-row:_key:_value <- new {(table-row _key _value): type}, capacity - 61 *result <- merge 0/length, capacity, data + 60 data:&:@:table-row:_key:_value <- new {(table-row _key _value): type}, capacity + 61 *result <- merge 0/length, capacity, data 62 ] 63 64 # todo: tag results as /required so that call-sites are forbidden from ignoring them @@ -129,8 +129,8 @@ if ('onhashchange' in window) { 68 load-inputs 69 hash:num <- hash key 70 hash <- abs hash - 71 capacity:num <- get *table, capacity:offset - 72 _, hash-key:num <- divide-with-remainder hash, capacity + 71 capacity:num <- get *table, capacity:offset + 72 _, hash-key:num <- divide-with-remainder hash, capacity 73 hash-key <- abs hash-key # in case hash overflows from a double into a negative integer inside 'divide-with-remainder' above 74 table-data:&:@:table-row:_key:_value <- get *table, data:offset 75 x:table-row:_key:_value <- index *table-data, hash-key @@ -146,8 +146,8 @@ if ('onhashchange' in window) { 85 load-inputs 86 hash:num <- hash key 87 hash <- abs hash - 88 capacity:num <- get *table, capacity:offset - 89 _, hash-key:num <- divide-with-remainder hash, capacity + 88 capacity:num <- get *table, capacity:offset + 89 _, hash-key:num <- divide-with-remainder hash, capacity 90 hash-key <- abs hash-key # in case hash overflows from a double into a negative integer inside 'divide-with-remainder' above 91 table-data:&:@:table-row:_key:_value <- get *table, data:offset 92 x:table-row:_key:_value <- index *table-data, hash-key -- cgit 1.4.1-2-gfad0