From 991d76f32817f5515fb8db25a7d5ca2912cfe4ac Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 23 Apr 2016 14:51:20 -0700 Subject: 2860 - rename 'index-address' to 'put-index' --- 079table.mu | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to '079table.mu') diff --git a/079table.mu b/079table.mu index 2ef03fa6..9040f6ce 100644 --- a/079table.mu +++ b/079table.mu @@ -53,11 +53,12 @@ def put table:address:shared:table:_key:_value, key:_key, value:_value -> table: _, hash <- divide-with-remainder hash, capacity hash <- abs hash # in case hash overflows into a negative integer table-data:address:shared:array:table_row:_key:_value <- get *table, data:offset - x:address:table_row:_key:_value <- index-address *table-data, hash - occupied?:boolean <- get *x, occupied?:offset + x:table_row:_key:_value <- index *table-data, hash + occupied?:boolean <- get x, occupied?:offset not-occupied?:boolean <- not occupied?:boolean assert not-occupied?, [can't handle collisions yet] - *x <- merge 1/true, key, value + new-row:table_row:_key:_value <- merge 1/true, key, value + *table-data <- put-index *table-data, hash, new-row ] def abs n:number -> result:number [ -- cgit 1.4.1-2-gfad0