const toss = (...args)=>{throw new Error(args.join(' '))};
/**
- Pointers in WASM are currently assumed to be 32-bit, but someday
- that will certainly change.
-
- 2025-09-19: work has started in getting this library to work with
- Emscripten's -sMEMORY64=1.
+ As of 2025-09-21, this library works with 64-bit WASM modules
+ built with Emscripten's -sMEMORY64=1.
*/
if( target.pointerSizeof && !target.pointerIR ){
target.pointerIR = (4===target.pointerSizeof ? 'i32' : 'i64');
if( 'i32'!==ptrIR && 'i64'!==ptrIR ){
toss("Invalid pointerIR:",ptrIR);
- }
- if( 8!==ptrSizeof && 4!==ptrSizeof ){
+ }else if( 8!==ptrSizeof && 4!==ptrSizeof ){
toss("Invalid pointerSizeof:",ptrSizeof);
}
target.NullPtr = __NullPtr;
- /**
- The typeof X value for target.NullPtr
- */
- //target.pointerTypeof = typeof __NullPtr;
-
- /*********
- alloc()/dealloc() auto-install...
-
- This would be convenient but it can also cause us to pick up
- malloc() even when the client code is using a different exported
- allocator (who, me?), which is bad. malloc() may be exported even
- if we're not explicitly using it and overriding the malloc()
- function, linking ours first, is not always feasible when using a
- malloc() proxy, as it can lead to recursion and stack overflow
- (who, me?). So... we really need the downstream code to set up
- target.alloc/dealloc() itself.
- ******/
- /******
- if(target.exports){
- //Maybe auto-install alloc()/dealloc()...
- if(!target.alloc && target.exports.malloc){
- target.alloc = function(n){
- const m = this(n);
- return m || toss("Allocation of",n,"byte(s) failed.");
- }.bind(target.exports.malloc);
- }
-
- if(!target.dealloc && target.exports.free){
- target.dealloc = function(ptr){
- if(ptr) this(ptr);
- }.bind(target.exports.free);
- }
- }*******/
-
/**
Expects any number of numeric arguments, each one of either type
Number or BigInt. It sums them up (from an implicit starting
target.ptrAdd = __ptrAdd;
-
if(!target.exports){
Object.defineProperty(target, 'exports', {
enumerable: true, configurable: true,
- get: ()=>(target?.instance?.exports)
+ get: ()=>(target.instance?.exports)
});
}
-C Minor\scleanup\sin\ssqlite3.wasm.ptrAdd().
-D 2025-09-21T11:15:00.738
+C Remove\ssome\sdead\scode.
+D 2025-09-21T11:39:53.946
F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F ext/wasm/common/SqliteTestUtil.js 7adaeffef757d8708418dc9190f72df22367b531831775804b31598b44f6aa51
F ext/wasm/common/emscripten.css 11bd104b6c0d597c67d40cc8ecc0a60dae2b965151e3b6a37fa5708bac3acd15
F ext/wasm/common/testing.css e97549bab24126c24e0daabfe2de9bb478fb0a69fdb2ddd0a73a992c091aad6f
-F ext/wasm/common/whwasmutil.js 247ad907511230d2f4240a2881d328eae13935acfe8a38c10b6c7894f1d251f6
+F ext/wasm/common/whwasmutil.js 97364d44356a93f7ef1db0c0c6fd5bd44cd41a287e8bc329eb2d5dce190f479a
F ext/wasm/config.make.in c424ae1cc3c89274520ad312509d36c4daa34a3fce5d0c688e5f8f4365e1049a
F ext/wasm/demo-123-worker.html a0b58d9caef098a626a1a1db567076fca4245e8d60ba94557ede8684350a81ed
F ext/wasm/demo-123.html 8c70a412ce386bd3796534257935eb1e3ea5c581e5d5aea0490b8232e570a508
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 1ad0169b022b280bcaaf94a7fa231591be96b514230ab5c98fbf15cd7df842dd
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P c7cc374ff5ccd8b8f0a6cd0acada2a713626b5447cf014db12e18327fccfd36b
-R 47593b5819b0fd7d8976480214290d8e
+P f659595d2e9e019a77d0c86803dbeb4bd728221a665825896ec29f7c0c0bdc65
+R c09e7437d99ea1f361f074521cdd8c64
U stephan
-Z 332f26eb18dae596a346e4a59225882f
+Z 66b1d8dc32baab60071a95a93ae10cab
# Remove this line to create a well-formed Fossil manifest.