Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Unified Diff: test/cctest/interpreter/bytecode-expectations-printer.h

Issue 2393453003: [interpreter] Add some bytecode tests for modules. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/cctest/interpreter/bytecode-expectations-printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | test/cctest/interpreter/bytecode-expectations-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698