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

Function makeEval

src/parseTools.mjs:781–795  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

779}
780
781function makeEval(code) {
782 if (DYNAMIC_EXECUTION == 0) {
783 // Treat eval as error.
784 return "abort('DYNAMIC_EXECUTION=0 was set, cannot eval');";
785 }
786 let ret = '';
787 if (DYNAMIC_EXECUTION == 2) {
788 // Warn on evals, but proceed.
789 ret +=
790 "err('Warning: DYNAMIC_EXECUTION=2 was set, but calling eval in the following location:');\n";
791 ret += 'err(stackTrace());\n';
792 }
793 ret += code;
794 return ret;
795}
796
797// Add code that runs before the wasm modules is loaded. This is the first
798// point at which the global `Module` object is guaranteed to exist. This hook

Callers 3

addEmAsmFunction · 0.85
addEmJsFunction · 0.85
libcore.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected