Lines Matching refs:cache

230   const cache = Object.create(null);
233 cache.heapSize = 0;
237 cache.memory = null;
240 cache.freeFuncIndexes = [];
244 cache.scopedAlloc = [];
246 cache.utf8Decoder = new TextDecoder();
247 cache.utf8Encoder = new TextEncoder('utf-8');
255 if(!cache.memory){
256 cache.memory = (target.memory instanceof WebAssembly.Memory)
258 }else if(cache.heapSize === cache.memory.buffer.byteLength){
259 return cache;
262 const b = cache.memory.buffer;
263 cache.HEAP8 = new Int8Array(b); cache.HEAP8U = new Uint8Array(b);
264 cache.HEAP16 = new Int16Array(b); cache.HEAP16U = new Uint16Array(b);
265 cache.HEAP32 = new Int32Array(b); cache.HEAP32U = new Uint32Array(b);
267 cache.HEAP64 = new BigInt64Array(b); cache.HEAP64U = new BigUint64Array(b);
269 cache.HEAP32F = new Float32Array(b); cache.HEAP64F = new Float64Array(b);
270 cache.heapSize = b.byteLength;
271 return cache;
327 const c = (cache.memory && cache.heapSize === cache.memory.buffer.byteLength)
328 ? cache : heapWrappers();
543 while(cache.freeFuncIndexes.length){
544 ptr = cache.freeFuncIndexes.pop();
562 if(ptr===oldLen) cache.freeFuncIndexes.push(oldLen);
570 if(ptr===oldLen) cache.freeFuncIndexes.push(oldLen);
586 const fi = cache.freeFuncIndexes;
646 const c = (cache.memory && cache.heapSize === cache.memory.buffer.byteLength)
647 ? cache : heapWrappers();
679 const c = (cache.memory && cache.heapSize === cache.memory.buffer.byteLength)
680 ? cache : heapWrappers();
744 return cache.utf8Decoder.decode(
906 return cache.utf8Encoder.encode(addNul ? (str+"\0") : str);
1004 cache.scopedAlloc.push(a);
1033 ? cache.scopedAlloc.indexOf(state)
1034 : cache.scopedAlloc.length-1;
1036 if(0===arguments.length) state = cache.scopedAlloc[n];
1037 cache.scopedAlloc.splice(n,1);
1058 if(!cache.scopedAlloc.length){
1062 cache.scopedAlloc[cache.scopedAlloc.length-1].push(p);
1068 get: ()=>cache.scopedAlloc.length,
1230 cache.xWrap = Object.create(null);
1231 const xcv = cache.xWrap.convert = Object.create(null);
1233 cache.xWrap.convert.arg = Object.create(null);
1235 cache.xWrap.convert.result = Object.create(null);
1317 cache.xWrap.convertArg = (t,v)=>__xArgAdapterCheck(t)(v);
1318 cache.xWrap.convertResult =
1486 : cache.xWrap.convertResult(resultType, xf.call(null)));
1492 const rc = xf.apply(null,args.map((v,i)=>cache.xWrap.convertArg(argTypes[i], v)));
1493 return cache.xWrap.convertResult(resultType, rc);