From 430353b1e36c62a867415d46e3470c54b3920e20 Mon Sep 17 00:00:00 2001 From: Tacodiva <27910867+Tacodiva@users.noreply.github.com> Date: Sun, 28 Jul 2024 20:36:24 +1000 Subject: [PATCH] Re-add JSGenerator.unstable_exports and expose enums as unsupported APIs --- src/compiler/jsgen.js | 12 ++++++++++++ src/virtual-machine.js | 3 +++ 2 files changed, 15 insertions(+) diff --git a/src/compiler/jsgen.js b/src/compiler/jsgen.js index 2f3c88e7327..03cd375bdf1 100644 --- a/src/compiler/jsgen.js +++ b/src/compiler/jsgen.js @@ -1179,6 +1179,18 @@ class JSGenerator { } } +// For extensions. +JSGenerator.unstable_exports = { + factoryNameVariablePool, + functionNameVariablePool, + generatorNameVariablePool, + VariablePool, + PEN_EXT, + PEN_STATE, + Frame, + sanitize +}; + // Test hook used by automated snapshot testing. JSGenerator.testingApparatus = null; diff --git a/src/virtual-machine.js b/src/virtual-machine.js index 4ed5ebf09fc..419bf3bd855 100644 --- a/src/virtual-machine.js +++ b/src/virtual-machine.js @@ -233,6 +233,9 @@ class VirtualMachine extends EventEmitter { IntermediateStack: require('./compiler/intermediate.js').IntermediateStack, IntermediateScript: require('./compiler/intermediate.js').IntermediateScript, IntermediateRepresentation: require('./compiler/intermediate.js').IntermediateRepresentation, + StackOpcode: require('./compiler/enums.js').StackOpcode, + InputOpcode: require('./compiler/enums.js').InputOpcode, + InputType: require('./compiler/enums.js').InputType, Thread: require('./engine/thread.js'), execute: require('./engine/execute.js') });