Skip to content

Commit

Permalink
Re-add JSGenerator.unstable_exports and expose enums as unsupported APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
Tacodiva committed Jul 28, 2024
1 parent 59cc74c commit 430353b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/compiler/jsgen.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 3 additions & 0 deletions src/virtual-machine.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
});
Expand Down

0 comments on commit 430353b

Please sign in to comment.