MCPcopy Index your code
hub / github.com/sql-js/sql.js / getFuncWrapper

Function getFuncWrapper

js/sql-debug.js:378–403  ·  view source on GitHub ↗
(func, sig)

Source from the content-addressed store, hash-verified

376var funcWrappers = {};
377
378function getFuncWrapper(func, sig) {
379 if (!func) return; // on null pointer, return undefined
380 assert(sig);
381 if (!funcWrappers[sig]) {
382 funcWrappers[sig] = {};
383 }
384 var sigCache = funcWrappers[sig];
385 if (!sigCache[func]) {
386 // optimize away arguments usage in common cases
387 if (sig.length === 1) {
388 sigCache[func] = function dynCall_wrapper() {
389 return dynCall(sig, func);
390 };
391 } else if (sig.length === 2) {
392 sigCache[func] = function dynCall_wrapper(arg) {
393 return dynCall(sig, func, [arg]);
394 };
395 } else {
396 // general case
397 sigCache[func] = function dynCall_wrapper() {
398 return dynCall(sig, func, Array.prototype.slice.call(arguments));
399 };
400 }
401 }
402 return sigCache[func];
403}
404
405
406function makeBigInt(low, high, unsigned) {

Callers

nothing calls this directly

Calls 2

assertFunction · 0.70
dynCallFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…