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

Function addReach

tools/acorn-optimizer.mjs:831–845  ·  view source on GitHub ↗
(reached)

Source from the content-addressed store, hash-verified

829 }
830 if (reached) {
831 function addReach(reached) {
832 if (defunInfo) {
833 defunInfo.reaches.add(reached); // defun reaches it
834 } else {
835 if (infos[reached]) {
836 infos[reached].root = true; // in global scope, root it
837 } else {
838 // An info might not exist for the identifier if it is missing, for
839 // example, we might call Module.dynCall_vi in library code, but it
840 // won't exist in a standalone (non-JS) build anyhow. We can ignore
841 // it in that case as the JS won't be used, but warn to be safe.
842 trace('metadce: missing declaration for ' + reached);
843 }
844 }
845 }
846 if (typeof reached === 'string') {
847 addReach(reached);
848 } else {

Callers 1

visitNodeFunction · 0.85

Calls 2

traceFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected