diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-07-10 21:08:26 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-07-10 21:08:26 -0700 |
commit | 34dd228eb2706674f3ce06297997ce11f42768c8 (patch) | |
tree | 8578333485d415c465cb8b7ea6f98586491dbc2c /131table.subx | |
parent | c532373e29928f1b8a2085038b000c3213ce4523 (diff) | |
download | mu-34dd228eb2706674f3ce06297997ce11f42768c8.tar.gz |
6627
Diffstat (limited to '131table.subx')
-rw-r--r-- | 131table.subx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/131table.subx b/131table.subx index 4507b10d..018e37ef 100644 --- a/131table.subx +++ b/131table.subx @@ -23,7 +23,7 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes # if no row is found, abort -get: # table: (addr stream {(handle array byte), T}), key: (addr array byte), row-size: int, abort-message-prefix: (addr array byte) -> eax: (addr T) +get: # table: (addr stream {(handle array byte), T}), key: (addr array byte), row-size: int, abort-message-prefix: (addr array byte) -> result/eax: (addr T) # pseudocode: # curr = table->data # max = &table->data[table->write] @@ -207,7 +207,7 @@ $test-get:end: c3/return # if no row is found, abort -get-slice: # table: (addr stream {(handle array byte), T}), key: (addr slice), row-size: int, abort-message-prefix: (addr array byte) -> eax: (addr T) +get-slice: # table: (addr stream {(handle array byte), T}), key: (addr slice), row-size: int, abort-message-prefix: (addr array byte) -> result/eax: (addr T) # pseudocode: # curr = table->data # max = &table->data[table->write] @@ -418,7 +418,7 @@ $test-get-slice:end: # if no row is found, save 'key' to the next available row # if there are no rows free, abort # return the address of the value -get-or-insert: # table: (addr stream {(handle array byte), T}), key: (addr array byte), row-size: int, ad: (addr allocation-descriptor) -> eax: (addr T) +get-or-insert: # table: (addr stream {(handle array byte), T}), key: (addr array byte), row-size: int, ad: (addr allocation-descriptor) -> result/eax: (addr T) # pseudocode: # curr = table->data # max = &table->data[table->write] @@ -703,7 +703,7 @@ $test-get-or-insert:end: # if no row is found, save 'key' to the next available row # if there are no rows free, abort # return the address of the value -get-or-insert-handle: # table: (addr stream {(handle array byte), T}), key: (handle array byte), row-size: int -> eax: (addr T) +get-or-insert-handle: # table: (addr stream {(handle array byte), T}), key: (handle array byte), row-size: int -> result/eax: (addr T) # pseudocode: # var curr: (addr handle stream) = table->data # var max: (addr byte) = &table->data[table->write] @@ -1019,7 +1019,7 @@ $test-get-or-insert-handle:end: # if no row is found, save 'key' in the next available row # if there are no rows free, abort -get-or-insert-slice: # table: (addr stream {(handle array byte), T}), key: (addr slice), row-size: int, ad: (addr allocation-descriptor) -> eax: (addr T) +get-or-insert-slice: # table: (addr stream {(handle array byte), T}), key: (addr slice), row-size: int, ad: (addr allocation-descriptor) -> result/eax: (addr T) # pseudocode: # curr = table->data # max = &table->data[table->write] @@ -1324,7 +1324,7 @@ $test-get-or-insert-slice:end: # if no row is found, stop(ed) get-or-stop: # table: (addr stream {(handle array byte), T}), key: (addr array byte), row-size: int, # abort-message-prefix: (addr array byte), err: (addr buffered-file), ed: (addr exit-descriptor) - # -> eax: (addr T) + # -> result/eax: (addr T) # pseudocode: # curr = table->data # max = &table->data[table->write] @@ -1550,7 +1550,7 @@ $test-get-or-stop:end: # if no row is found, stop(ed) get-slice-or-stop: # table: (addr stream {(handle array byte), _}), key: (addr slice), row-size: int, # abort-message-prefix: (addr string), err: (addr buffered-file), ed: (addr exit-descriptor) - # -> eax: (addr _) + # -> result/eax: (addr _) # pseudocode: # curr = table->data # max = &table->data[table->write] @@ -1797,7 +1797,7 @@ $test-get-slice-or-stop:end: c3/return # if no row is found, return null (0) -maybe-get: # table: (addr stream {(handle array byte), T}), key: (addr array byte), row-size: int -> eax: (addr T) +maybe-get: # table: (addr stream {(handle array byte), T}), key: (addr array byte), row-size: int -> result/eax: (addr T) # pseudocode: # curr = table->data # max = &table->data[table->write] @@ -1962,7 +1962,7 @@ $test-maybe-get:end: c3/return # if no row is found, return null (0) -maybe-get-slice: # table: (addr stream {(handle array byte), T}), key: (addr slice), row-size: int -> eax: (addr T) +maybe-get-slice: # table: (addr stream {(handle array byte), T}), key: (addr slice), row-size: int -> result/eax: (addr T) # pseudocode: # curr = table->data # max = &table->data[table->write] |