Lines Matching refs:wasm

23   const capi = sqlite3.capi, wasm = sqlite3.wasm, util = sqlite3.util;
24 self.WhWasmUtilInstaller(wasm);
31 heap: 0 ? wasm.memory : wasm.heap8u,
32 alloc: wasm.alloc,
33 dealloc: wasm.dealloc,
34 functionTable: wasm.functionTable,
35 bigIntEnabled: wasm.bigIntEnabled,
43 const argPointer = wasm.xWrap.argAdapter('*');
44 wasm.xWrap.argAdapter('StructType', (v)=>{
48 return wasm.isPtr(v)
56 const xString = wasm.xWrap.argAdapter('string');
57 wasm.xWrap.argAdapter(
70 const aPtr = wasm.xWrap.argAdapter('*');
71 wasm.xWrap.argAdapter('sqlite3*', aPtr)
77 wasm.xWrap.resultAdapter('sqlite3*', aPtr)
87 for(const e of wasm.bindingSignatures){
88 capi[e[0]] = wasm.xWrap.apply(null, e);
90 for(const e of wasm.bindingSignatures.wasm){
91 wasm[e[0]] = wasm.xWrap.apply(null, e);
101 for(const e of wasm.bindingSignatures.int64){
102 capi[e[0]] = wasm.bigIntEnabled
103 ? wasm.xWrap.apply(null, e)
109 delete wasm.bindingSignatures;
111 if(wasm.exports.sqlite3_wasm_db_error){
112 util.sqlite3_wasm_db_error = wasm.xWrap(
168 const __exec = wasm.xWrap("sqlite3_exec", "int",
183 for( ; i < nCols; offset += (wasm.ptrSizeof * ++i) ){
184 aVals.push( wasm.cstringToJs(wasm.getPtrValue(pColVals + offset)) );
185 aNames.push( wasm.cstringToJs(wasm.getPtrValue(pColNames + offset)) );
201 pFunc = wasm.installFunction("ipipp", cbwrap);
207 if(pFunc) wasm.uninstallFunction(pFunc);
215 const sqlite3CreateFunction = wasm.xWrap(
221 const sqlite3CreateWindowFunction = wasm.xWrap(
239 if(wasm.bigIntEnabled){
264 const pBlob = wasm.allocFromTypedArray(val);
267 wasm.exports[sqlite3.config.deallocExportName]
281 pVal = wasm.getPtrValue(pArgv + (wasm.ptrSizeof * i));
292 if(wasm.bigIntEnabled){
310 arg = n ? wasm.heap8u().slice(pBlob, pBlob + Number(n)) : null;
381 fArg = wasm.installFunction(w.sig, w.f(fArg));
411 wasm.uninstallFunction(v);
452 wasm.uninstallFunction(v);
530 __prepare.basic = wasm.xWrap('sqlite3_prepare_v3',
546 __prepare.full = wasm.xWrap('sqlite3_prepare_v3',
576 const cJson = wasm.xCall('sqlite3_wasm_enum_json');
581 wasm.ctype = JSON.parse(wasm.cstringToJs(cJson));
589 for(const e of Object.entries(wasm.ctype[t])){
597 for(const e of Object.entries(wasm.ctype[t])){
615 for(const s of wasm.ctype.structs){
626 wasm.exports.sqlite3_wasm_kvvfs_methods()
630 const kvvfsMakeKey = wasm.exports.sqlite3_wasm_kvvfsMakeKeyOnPstack,
631 pstack = wasm.pstack,
632 pAllocRaw = wasm.exports.sqlite3_wasm_pstack_alloc;
635 ((115/*=='s'*/===wasm.getMemValue(zClass))
647 astack = wasm.scopedAllocPush();
651 const jKey = wasm.cstringToJs(zXKey);
659 wasm.setMemValue(zBuf, 0);
662 const zV = wasm.scopedAllocCString(jV);
664 wasm.heap8u().copyWithin(zBuf, zV, zV + nBuf - 1);
665 wasm.setMemValue(zBuf + nBuf - 1, 0);
672 wasm.scopedAllocPop(astack);
680 const jKey = wasm.cstringToJs(zXKey);
681 kvvfsStorage(zClass).setItem(jKey, wasm.cstringToJs(zData));
695 kvvfsStorage(zClass).removeItem(wasm.cstringToJs(zXKey));
707 wasm.installFunction(