aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/common/whwasmutil.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2023-07-13 14:08:30 +0000
committerstephan <stephan@noemail.net>2023-07-13 14:08:30 +0000
commitcc336321f83404e5e970874e184c6505079479dc (patch)
tree08b1dd61de93b8e26646e8fd4a42d741f1c4b927 /ext/wasm/common/whwasmutil.js
parentd41d454fc1e95a6b8d92dd143667392f8effd5d6 (diff)
downloadsqlite-cc336321f83404e5e970874e184c6505079479dc.tar.gz
sqlite-cc336321f83404e5e970874e184c6505079479dc.zip
Significant surgery on the wasm build on the way to incorporating wasmfs as a first-class build option.
FossilOrigin-Name: 215c37fce38cf647e073480689b79d952af7eb8165ae08c7f5caed27003fecfc
Diffstat (limited to 'ext/wasm/common/whwasmutil.js')
-rw-r--r--ext/wasm/common/whwasmutil.js44
1 files changed, 25 insertions, 19 deletions
diff --git a/ext/wasm/common/whwasmutil.js b/ext/wasm/common/whwasmutil.js
index aea484787..f48e8a7d2 100644
--- a/ext/wasm/common/whwasmutil.js
+++ b/ext/wasm/common/whwasmutil.js
@@ -1656,25 +1656,11 @@ globalThis.WhWasmUtilInstaller = function(target){
? opt.callProxy : undefined;
}
- /** If true, the constructor emits a warning. The intent is that
- this be set to true after bootstrapping of the higher-level
- client library is complete, to warn downstream clients that
- they shouldn't be relying on this implemenation detail which
- does not have a stable interface. */
- static warnOnUse = false;
-
- /** If true, convertArg() will FuncPtrAdapter.debugOut() when it
- (un)installs a function binding to/from WASM. Note that
- deinstallation of bindScope=transient bindings happens
- via scopedAllocPop() so will not be output. */
- static debugFuncInstall = false;
-
- /** Function used for debug output. */
- static debugOut = console.debug.bind(console);
-
- static bindScopes = [
- 'transient', 'context', 'singleton', 'permanent'
- ];
+ /**
+ Note that static class members are defined outside of the class
+ to work around an emcc toolchain build problem: one of the
+ tools in emsdk v3.1.42 does not support the static keyword.
+ */
/* Dummy impl. Overwritten per-instance as needed. */
contextKey(argv,argIndex){
@@ -1761,6 +1747,26 @@ globalThis.WhWasmUtilInstaller = function(target){
}/*convertArg()*/
}/*FuncPtrAdapter*/;
+ /** If true, the constructor emits a warning. The intent is that
+ this be set to true after bootstrapping of the higher-level
+ client library is complete, to warn downstream clients that
+ they shouldn't be relying on this implemenation detail which
+ does not have a stable interface. */
+ xArg.FuncPtrAdapter.warnOnUse = false;
+
+ /** If true, convertArg() will FuncPtrAdapter.debugOut() when it
+ (un)installs a function binding to/from WASM. Note that
+ deinstallation of bindScope=transient bindings happens
+ via scopedAllocPop() so will not be output. */
+ xArg.FuncPtrAdapter.debugFuncInstall = false;
+
+ /** Function used for debug output. */
+ xArg.FuncPtrAdapter.debugOut = console.debug.bind(console);
+
+ xArg.FuncPtrAdapter.bindScopes = [
+ 'transient', 'context', 'singleton', 'permanent'
+ ];
+
const __xArgAdapterCheck =
(t)=>xArg.get(t) || toss("Argument adapter not found:",t);