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

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

Issue 1698403002: [Interpreter] generate-bytecode-expectations improvements. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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
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 62ff63eb6a76afb1b1d28a49b7d2ed4644031c2b..c01fe2fda6f2217a1e858d974a63fd05df1bbf8d 100644
--- a/test/cctest/interpreter/bytecode-expectations-printer.h
+++ b/test/cctest/interpreter/bytecode-expectations-printer.h
@@ -32,7 +32,11 @@ class BytecodeExpectationsPrinter final {
BytecodeExpectationsPrinter(v8::Isolate* i,
ConstantPoolType t = ConstantPoolType::kMixed)
- : isolate_(i), const_pool_type_(t) {}
+ : isolate_(i),
+ const_pool_type_(t),
+ execute_(true),
+ wrap_(true),
+ top_function_name_("__genbckexp_wrapper__") {}
void PrintExpectation(std::ostream& stream, // NOLINT
const std::string& snippet) const;
@@ -40,6 +44,15 @@ class BytecodeExpectationsPrinter final {
void set_constant_pool_type(ConstantPoolType t) { const_pool_type_ = t; }
ConstantPoolType constant_pool_type() const { return const_pool_type_; }
+ void set_execute(bool e) { execute_ = e; }
rmcilroy 2016/02/16 16:43:48 don't abbreviate -> /s/e/execute/ Also pleas updat
Stefano Sanfilippo 2016/02/16 20:28:26 Done.
+ bool execute() const { return execute_; }
+
+ void set_wrap(bool w) { wrap_ = w; }
rmcilroy 2016/02/16 16:43:48 ditto
Stefano Sanfilippo 2016/02/16 20:28:26 Done.
+ bool wrap() const { return wrap_; }
+
+ void set_top_function_name(const std::string& s) { top_function_name_ = s; }
rmcilroy 2016/02/16 16:43:48 ditto
Stefano Sanfilippo 2016/02/16 20:28:26 Done.
+ std::string top_function_name() const { return top_function_name_; }
+
private:
void PrintEscapedString(std::ostream& stream, // NOLINT
const std::string& string) const;
@@ -63,12 +76,15 @@ class BytecodeExpectationsPrinter final {
void PrintBytecodeArray(std::ostream& stream, // NOLINT
const std::string& body,
i::Handle<i::BytecodeArray> bytecode_array) const;
+ void PrintHandlers(std::ostream& stream, // NOLINT
+ i::Handle<i::BytecodeArray> bytecode_array) const;
v8::Local<v8::String> V8StringFromUTF8(const char* data) const;
std::string WrapCodeInFunction(const char* function_name,
const std::string& function_body) const;
- v8::Local<v8::Value> CompileAndRun(const char* program) const;
+ v8::Local<v8::Script> Compile(const char* program) const;
+ v8::Local<v8::Value> Run(v8::Local<v8::Script> script) const;
i::Handle<i::BytecodeArray> GetBytecodeArrayForGlobal(
const char* global_name) const;
@@ -78,6 +94,9 @@ class BytecodeExpectationsPrinter final {
v8::Isolate* isolate_;
ConstantPoolType const_pool_type_;
+ bool execute_;
+ bool wrap_;
+ std::string top_function_name_;
};
} // namespace interpreter

Powered by Google App Engine
This is Rietveld 408576698