MCPcopy
hub / github.com/pixijs/pixijs / callRuntimeCallbacks

Function callRuntimeCallbacks

transcoders/basis/basis_transcoder.js:263–278  ·  view source on GitHub ↗
(callbacks)

Source from the content-addressed store, hash-verified

261
262 if (Module.wasmMemory) { wasmMemory = Module.wasmMemory; }
263 else { wasmMemory = new WebAssembly.Memory({ initial: INITIAL_INITIAL_MEMORY / WASM_PAGE_SIZE }); } if (wasmMemory) { buffer = wasmMemory.buffer; }INITIAL_INITIAL_MEMORY = buffer.byteLength; updateGlobalBufferAndViews(buffer); HEAP32[DYNAMICTOP_PTR >> 2] = DYNAMIC_BASE; function callRuntimeCallbacks(callbacks)
264 {
265 while (callbacks.length > 0)
266 {
267 const callback = callbacks.shift();
268
269 if (typeof callback === 'function') { callback(); continue; } const func = callback.func;
270
271 if (typeof func === 'number')
272 {
273 if (callback.arg === undefined) { Module.dynCall_v(func); }
274 else { Module.dynCall_vi(func, callback.arg); }
275 }
276 else { func(callback.arg === undefined ? null : callback.arg); }
277 }
278 } const __ATPRERUN__ = []; const __ATINIT__ = []; const __ATMAIN__ = []; const __ATPOSTRUN__ = []; let runtimeInitialized = false;
279
280 function preRun() { if (Module.preRun) { if (typeof Module.preRun === 'function')Module.preRun = [Module.preRun]; while (Module.preRun.length) { addOnPreRun(Module.preRun.shift()); } }callRuntimeCallbacks(__ATPRERUN__); } function initRuntime() { runtimeInitialized = true; callRuntimeCallbacks(__ATINIT__); } function preMain() { callRuntimeCallbacks(__ATMAIN__); } function postRun() { if (Module.postRun) { if (typeof Module.postRun === 'function')Module.postRun = [Module.postRun]; while (Module.postRun.length) { addOnPostRun(Module.postRun.shift()); } }callRuntimeCallbacks(__ATPOSTRUN__); } function addOnPreRun(cb) { __ATPRERUN__.unshift(cb); } function addOnPostRun(cb) { __ATPOSTRUN__.unshift(cb); } const Math_ceil = Math.ceil; const Math_floor = Math.floor; let runDependencies = 0; let runDependencyWatcher = null; let dependenciesFulfilled = null;
281

Callers 4

preRunFunction · 0.70
initRuntimeFunction · 0.70
preMainFunction · 0.70
postRunFunction · 0.70

Calls 1

funcFunction · 0.85

Tested by

no test coverage detected