MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / isDynamicDynCall

Function isDynamicDynCall

tools/acorn-optimizer.mjs:523–531  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

521// as that prefix means we may be constructing a dynamic dyncall name
522// (dynCall and embind's requireFunction do this internally).
523function isDynamicDynCall(node) {
524 return (
525 (node.type === 'CallExpression' &&
526 node.callee.type === 'Identifier' &&
527 node.callee.name === 'dynCall' &&
528 !isLiteralString(node.arguments[0])) ||
529 (isLiteralString(node) && node.value === 'dynCall_')
530 );
531}
532
533//
534// Emit the DCE graph, to help optimize the combined JS+wasm.

Callers 1

visitNodeFunction · 0.85

Calls 1

isLiteralStringFunction · 0.85

Tested by

no test coverage detected