mirror of
https://github.com/sqlite/sqlite.git
synced 2025-10-24 09:53:10 +03:00
A minor optimization in wasm.realloc().
FossilOrigin-Name: 6a070f450ac9ee3d4d6a3e05ef8fa2071a684181ea160805e236c3bba226510a
This commit is contained in:
@@ -938,8 +938,7 @@ globalThis.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
|
||||
};
|
||||
wasm.alloc.impl = wasm.exports[keyAlloc];
|
||||
wasm.realloc = function f(m,n){
|
||||
m = wasm.ptr.coerce(m)/*tag:64bit*/;
|
||||
const m2 = f.impl(m,n);
|
||||
const m2 = f.impl(wasm.ptr.coerce(m)/*tag:64bit*/,n);
|
||||
return n ? (m2 || WasmAllocError.toss("Failed to reallocate",n," bytes.")) : wasm.ptr.null;
|
||||
};
|
||||
wasm.realloc.impl = wasm.exports[keyRealloc];
|
||||
|
||||
Reference in New Issue
Block a user