]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Remove some dead code.
authorstephan <stephan@noemail.net>
Sun, 21 Sep 2025 11:39:53 +0000 (11:39 +0000)
committerstephan <stephan@noemail.net>
Sun, 21 Sep 2025 11:39:53 +0000 (11:39 +0000)
FossilOrigin-Name: 1c2cd58d1a86d85e79ac912270e762e22f43f1d41d81a19ecd0ae6b2656c71b4

ext/wasm/common/whwasmutil.js
manifest
manifest.uuid

index eff8b76e0ceee04f5e517f25b06f8b3cf60ea056..39b0a58feee6dda9d0a52cd71dd3c1422e3e4a13 100644 (file)
@@ -194,11 +194,8 @@ globalThis.WhWasmUtilInstaller = function(target){
   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');
@@ -209,8 +206,7 @@ globalThis.WhWasmUtilInstaller = function(target){
 
   if( 'i32'!==ptrIR && 'i64'!==ptrIR ){
     toss("Invalid pointerIR:",ptrIR);
-  }
-  if( 8!==ptrSizeof && 4!==ptrSizeof ){
+  }else if( 8!==ptrSizeof && 4!==ptrSizeof ){
     toss("Invalid pointerSizeof:",ptrSizeof);
   }
 
@@ -236,40 +232,6 @@ globalThis.WhWasmUtilInstaller = function(target){
 
   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
@@ -288,11 +250,10 @@ globalThis.WhWasmUtilInstaller = function(target){
 
   target.ptrAdd = __ptrAdd;
 
-
   if(!target.exports){
     Object.defineProperty(target, 'exports', {
       enumerable: true, configurable: true,
-      get: ()=>(target?.instance?.exports)
+      get: ()=>(target.instance?.exports)
     });
   }
 
index 2ce856e1585957e99da755beb3cbc0d4c7b7604a..24f0fce141d3a439db21f2bcc5e276aa40c48d22 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-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
@@ -618,7 +618,7 @@ F ext/wasm/c-pp.c cca55c5b55ebd8d29916adbedb0e40baa12caa9a2e8429f812683c308f9b0e
 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
@@ -2175,8 +2175,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
 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.
index 8f803d1dfc2190c082853028eb8dc10111fbf870..ad8d0266c4e58696255c25b67e003cef7a974cf5 100644 (file)
@@ -1 +1 @@
-f659595d2e9e019a77d0c86803dbeb4bd728221a665825896ec29f7c0c0bdc65
+1c2cd58d1a86d85e79ac912270e762e22f43f1d41d81a19ecd0ae6b2656c71b4