Index: test/cctest/interpreter/bytecode-expectations-printer.h |
diff --git a/test/cctest/interpreter/bytecode-expectations-printer.h b/test/cctest/interpreter/bytecode-expectations-printer.h |
index 51e183fd8b72532df561fc6e62c8e80393a6357b..89f79d3b4009652e583a7cdc8458c1a6f92043f6 100644 |
--- a/test/cctest/interpreter/bytecode-expectations-printer.h |
+++ b/test/cctest/interpreter/bytecode-expectations-printer.h |
@@ -28,6 +28,7 @@ class BytecodeExpectationsPrinter final { |
public: |
explicit BytecodeExpectationsPrinter(v8::Isolate* i) |
: isolate_(i), |
+ module_(false), |
wrap_(true), |
top_level_(false), |
test_function_name_(kDefaultTopFunctionName) {} |
@@ -35,6 +36,9 @@ class BytecodeExpectationsPrinter final { |
void PrintExpectation(std::ostream& stream, // NOLINT |
const std::string& snippet) const; |
+ void set_module(bool module) { module_ = module; } |
+ bool module() const { return module_; } |
+ |
void set_wrap(bool wrap) { wrap_ = wrap; } |
bool wrap() const { return wrap_; } |
@@ -80,10 +84,13 @@ class BytecodeExpectationsPrinter final { |
std::string WrapCodeInFunction(const char* function_name, |
const std::string& function_body) const; |
- v8::Local<v8::Script> Compile(const char* program) const; |
+ v8::Local<v8::Script> CompileScript(const char* program) const; |
+ v8::Local<v8::Module> CompileModule(const char* program) const; |
void Run(v8::Local<v8::Script> script) const; |
i::Handle<i::BytecodeArray> GetBytecodeArrayForGlobal( |
const char* global_name) const; |
+ i::Handle<v8::internal::BytecodeArray> GetBytecodeArrayForModule( |
+ v8::Local<v8::Module> module) const; |
i::Handle<v8::internal::BytecodeArray> GetBytecodeArrayForScript( |
v8::Local<v8::Script> script) const; |
@@ -92,6 +99,7 @@ class BytecodeExpectationsPrinter final { |
} |
v8::Isolate* isolate_; |
+ bool module_; |
bool wrap_; |
bool top_level_; |
std::string test_function_name_; |