aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/common/whwasmutil.js
diff options
context:
space:
mode:
authordrh <>2024-06-27 14:54:15 +0000
committerdrh <>2024-06-27 14:54:15 +0000
commitc96e47c80e67d3a21c591ccb3432f3c18153f8aa (patch)
tree2b1d1087e7a55cb08e9fe8dfe4d5aad3d674dc31 /ext/wasm/common/whwasmutil.js
parent620a00ee32c64944289bc8ff8c37b23bb4e220a1 (diff)
parent105c20648e1b05839fd0638686b95f2e3998abcb (diff)
downloadsqlite-c96e47c80e67d3a21c591ccb3432f3c18153f8aa.tar.gz
sqlite-c96e47c80e67d3a21c591ccb3432f3c18153f8aa.zip
Merge the latest trunk enhancements into the exists-to-join branch.
FossilOrigin-Name: fc643f8a12e9b7448136b281f798e18dfebe0a3df5115d930b965c8a33933e2d
Diffstat (limited to 'ext/wasm/common/whwasmutil.js')
-rw-r--r--ext/wasm/common/whwasmutil.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/ext/wasm/common/whwasmutil.js b/ext/wasm/common/whwasmutil.js
index b8a2a8774..25400d48e 100644
--- a/ext/wasm/common/whwasmutil.js
+++ b/ext/wasm/common/whwasmutil.js
@@ -156,8 +156,7 @@
- 'dealloc()` must behave like C's `free()`, accepting either a
pointer returned from its allocation counterpart or the values
- null/0 (for which it must be a no-op). allocating N bytes of
- memory and returning its pointer. In Emscripten this is
+ null/0 (for which it must be a no-op). In Emscripten this is
conventionally made available via `Module['_free']`.
APIs which require allocation routines are explicitly documented as
@@ -730,22 +729,23 @@ globalThis.WhWasmUtilInstaller = function(target){
};
/**
- The counterpart of peek(), this sets a numeric value at
- the given WASM heap address, using the type to define how many
- bytes are written. Throws if given an invalid type. See
- peek() for details about the type argument. If the 3rd
- argument ends with `*` then it is treated as a pointer type and
- this function behaves as if the 3rd argument were `i32`.
+ The counterpart of peek(), this sets a numeric value at the given
+ WASM heap address, using the 3rd argument to define how many
+ bytes are written. Throws if given an invalid type. See peek()
+ for details about the `type` argument. If the 3rd argument ends
+ with `*` then it is treated as a pointer type and this function
+ behaves as if the 3rd argument were `i32`.
If the first argument is an array, it is treated like a list
of pointers and the given value is written to each one.
- Returns `this`. (Prior to 2022-12-09 it returns this function.)
+ Returns `this`. (Prior to 2022-12-09 it returned this function.)
- ACHTUNG: calling this often, e.g. in a loop, can have a noticably
- painful impact on performance. Rather than doing so, use
- heapForSize() to fetch the heap object and assign directly to it
- or use the heap's set() method.
+ ACHTUNG: calling this often, e.g. in a loop to populate a large
+ chunk of memory, can have a noticably painful impact on
+ performance. Rather than doing so, use heapForSize() to fetch the
+ heap object and assign directly to it or use the heap's set()
+ method.
*/
target.poke = function(ptr, value, type='i8'){
if (type.endsWith('*')) type = ptrIR;