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

Unified Diff: test/cctest/compiler/test-run-bytecode-graph-builder.cc

Issue 2632123006: Reland: [Parse] ParseInfo owns the parsing Zone. (Closed)
Patch Set: Rebase Created 3 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
« no previous file with comments | « test/cctest/compiler/test-loop-assignment-analysis.cc ('k') | test/cctest/parsing/test-preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-run-bytecode-graph-builder.cc
diff --git a/test/cctest/compiler/test-run-bytecode-graph-builder.cc b/test/cctest/compiler/test-run-bytecode-graph-builder.cc
index ea7fcd64492ae06cdd0ddb182bcabfcca4cad766..d9bcd20d2a7c72955535a8d6713a8a76a8316ad5 100644
--- a/test/cctest/compiler/test-run-bytecode-graph-builder.cc
+++ b/test/cctest/compiler/test-run-bytecode-graph-builder.cc
@@ -74,9 +74,9 @@ class BytecodeGraphCallable {
class BytecodeGraphTester {
public:
- BytecodeGraphTester(Isolate* isolate, Zone* zone, const char* script,
+ BytecodeGraphTester(Isolate* isolate, const char* script,
const char* filter = kFunctionName)
- : isolate_(isolate), zone_(zone), script_(script) {
+ : isolate_(isolate), script_(script) {
i::FLAG_ignition = true;
i::FLAG_always_opt = false;
i::FLAG_allow_natives_syntax = true;
@@ -108,7 +108,6 @@ class BytecodeGraphTester {
private:
Isolate* isolate_;
- Zone* zone_;
const char* script_;
Handle<JSFunction> GetFunction(const char* functionName) {
@@ -123,7 +122,7 @@ class BytecodeGraphTester {
// TODO(mstarzinger): We should be able to prime CompilationInfo without
// having to instantiate a ParseInfo first. Fix this!
- ParseInfo parse_info(zone_, handle(function->shared()));
+ ParseInfo parse_info(handle(function->shared()));
CompilationInfo compilation_info(&parse_info, function);
compilation_info.SetOptimizing();
@@ -187,7 +186,6 @@ struct ExpectedSnippet {
TEST(BytecodeGraphBuilderReturnStatements) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -212,7 +210,7 @@ TEST(BytecodeGraphBuilderReturnStatements) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -223,7 +221,6 @@ TEST(BytecodeGraphBuilderReturnStatements) {
TEST(BytecodeGraphBuilderPrimitiveExpressions) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -239,7 +236,7 @@ TEST(BytecodeGraphBuilderPrimitiveExpressions) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -250,7 +247,6 @@ TEST(BytecodeGraphBuilderPrimitiveExpressions) {
TEST(BytecodeGraphBuilderTwoParameterTests) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<2> snippets[] = {
@@ -297,7 +293,7 @@ TEST(BytecodeGraphBuilderTwoParameterTests) {
SNPrintF(script, "function %s(p1, p2) { %s }\n%s(0, 0);", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>, Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0), snippets[i].parameter(1))
@@ -310,7 +306,6 @@ TEST(BytecodeGraphBuilderTwoParameterTests) {
TEST(BytecodeGraphBuilderNamedLoad) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<1> snippets[] = {
@@ -341,7 +336,7 @@ TEST(BytecodeGraphBuilderNamedLoad) {
SNPrintF(script, "function %s(p1) { %s };\n%s(0);", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0)).ToHandleChecked();
@@ -353,7 +348,6 @@ TEST(BytecodeGraphBuilderNamedLoad) {
TEST(BytecodeGraphBuilderKeyedLoad) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<2> snippets[] = {
@@ -397,7 +391,7 @@ TEST(BytecodeGraphBuilderKeyedLoad) {
SNPrintF(script, "function %s(p1, p2) { %s };\n%s(0);", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>, Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0), snippets[i].parameter(1))
@@ -409,7 +403,6 @@ TEST(BytecodeGraphBuilderKeyedLoad) {
void TestBytecodeGraphBuilderNamedStore(size_t shard) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<1> snippets[] = {
@@ -447,7 +440,7 @@ void TestBytecodeGraphBuilderNamedStore(size_t shard) {
SNPrintF(script, "function %s(p1) { %s };\n%s({});", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0)).ToHandleChecked();
@@ -460,7 +453,6 @@ SHARD_TEST_BY_2(BytecodeGraphBuilderNamedStore)
void TestBytecodeGraphBuilderKeyedStore(size_t shard) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<2> snippets[] = {
@@ -506,7 +498,7 @@ void TestBytecodeGraphBuilderKeyedStore(size_t shard) {
SNPrintF(script, "function %s(p1, p2) { %s };\n%s({});", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0)).ToHandleChecked();
@@ -519,7 +511,6 @@ SHARD_TEST_BY_2(BytecodeGraphBuilderKeyedStore)
TEST(BytecodeGraphBuilderPropertyCall) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<1> snippets[] = {
@@ -541,7 +532,7 @@ TEST(BytecodeGraphBuilderPropertyCall) {
SNPrintF(script, "function %s(p1) { %s };\n%s({func() {}});", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0)).ToHandleChecked();
@@ -553,7 +544,6 @@ TEST(BytecodeGraphBuilderPropertyCall) {
TEST(BytecodeGraphBuilderCallNew) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -580,7 +570,7 @@ TEST(BytecodeGraphBuilderCallNew) {
};
for (size_t i = 0; i < arraysize(snippets); i++) {
- BytecodeGraphTester tester(isolate, zone, snippets[i].code_snippet);
+ BytecodeGraphTester tester(isolate, snippets[i].code_snippet);
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -591,7 +581,6 @@ TEST(BytecodeGraphBuilderCallNew) {
TEST(BytecodeGraphBuilderCreateClosure) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -618,7 +607,7 @@ TEST(BytecodeGraphBuilderCreateClosure) {
};
for (size_t i = 0; i < arraysize(snippets); i++) {
- BytecodeGraphTester tester(isolate, zone, snippets[i].code_snippet);
+ BytecodeGraphTester tester(isolate, snippets[i].code_snippet);
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -629,7 +618,6 @@ TEST(BytecodeGraphBuilderCreateClosure) {
TEST(BytecodeGraphBuilderCallRuntime) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<1> snippets[] = {
@@ -645,7 +633,7 @@ TEST(BytecodeGraphBuilderCallRuntime) {
};
for (size_t i = 0; i < arraysize(snippets); i++) {
- BytecodeGraphTester tester(isolate, zone, snippets[i].code_snippet);
+ BytecodeGraphTester tester(isolate, snippets[i].code_snippet);
auto callable = tester.GetCallable<Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0)).ToHandleChecked();
@@ -656,7 +644,6 @@ TEST(BytecodeGraphBuilderCallRuntime) {
TEST(BytecodeGraphBuilderInvokeIntrinsic) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<1> snippets[] = {
@@ -667,7 +654,7 @@ TEST(BytecodeGraphBuilderInvokeIntrinsic) {
};
for (size_t i = 0; i < arraysize(snippets); i++) {
- BytecodeGraphTester tester(isolate, zone, snippets[i].code_snippet);
+ BytecodeGraphTester tester(isolate, snippets[i].code_snippet);
auto callable = tester.GetCallable<Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0)).ToHandleChecked();
@@ -678,7 +665,6 @@ TEST(BytecodeGraphBuilderInvokeIntrinsic) {
void TestBytecodeGraphBuilderGlobals(size_t shard) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -717,7 +703,7 @@ void TestBytecodeGraphBuilderGlobals(size_t shard) {
for (size_t i = 0; i < arraysize(snippets); i++) {
if ((i % 2) != shard) continue;
- BytecodeGraphTester tester(isolate, zone, snippets[i].code_snippet);
+ BytecodeGraphTester tester(isolate, snippets[i].code_snippet);
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -734,7 +720,6 @@ TEST(BytecodeGraphBuilderToObject) {
TEST(BytecodeGraphBuilderToName) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -767,7 +752,7 @@ TEST(BytecodeGraphBuilderToName) {
SNPrintF(script, "function %s() { %s }\n%s({});", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -778,7 +763,6 @@ TEST(BytecodeGraphBuilderToName) {
TEST(BytecodeGraphBuilderLogicalNot) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<1> snippets[] = {
@@ -798,7 +782,7 @@ TEST(BytecodeGraphBuilderLogicalNot) {
SNPrintF(script, "function %s(p1) { %s }\n%s({});", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0)).ToHandleChecked();
@@ -810,7 +794,6 @@ TEST(BytecodeGraphBuilderLogicalNot) {
TEST(BytecodeGraphBuilderTypeOf) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<1> snippets[] = {
@@ -835,7 +818,7 @@ TEST(BytecodeGraphBuilderTypeOf) {
SNPrintF(script, "function %s(p1) { %s }\n%s({});", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0)).ToHandleChecked();
@@ -847,7 +830,6 @@ TEST(BytecodeGraphBuilderTypeOf) {
TEST(BytecodeGraphBuilderCountOperation) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<1> snippets[] = {
@@ -889,7 +871,7 @@ TEST(BytecodeGraphBuilderCountOperation) {
SNPrintF(script, "function %s(p1) { %s }\n%s({});", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0)).ToHandleChecked();
@@ -901,7 +883,6 @@ TEST(BytecodeGraphBuilderCountOperation) {
TEST(BytecodeGraphBuilderDelete) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<1> snippets[] = {
@@ -928,7 +909,7 @@ TEST(BytecodeGraphBuilderDelete) {
SNPrintF(script, "function %s(p1) { %s }\n%s({});", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0)).ToHandleChecked();
@@ -940,7 +921,6 @@ TEST(BytecodeGraphBuilderDelete) {
TEST(BytecodeGraphBuilderDeleteGlobal) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -981,7 +961,7 @@ TEST(BytecodeGraphBuilderDeleteGlobal) {
ScopedVector<char> script(1024);
SNPrintF(script, "%s %s({});", snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -992,7 +972,6 @@ TEST(BytecodeGraphBuilderDeleteGlobal) {
TEST(BytecodeGraphBuilderDeleteLookupSlot) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
// TODO(mythria): Add more tests when we have support for LdaLookupSlot.
@@ -1018,7 +997,7 @@ TEST(BytecodeGraphBuilderDeleteLookupSlot) {
SNPrintF(script, "%s %s %s", function_prologue, snippets[i].code_snippet,
function_epilogue);
- BytecodeGraphTester tester(isolate, zone, script.start(), "t");
+ BytecodeGraphTester tester(isolate, script.start(), "t");
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -1029,7 +1008,6 @@ TEST(BytecodeGraphBuilderDeleteLookupSlot) {
TEST(BytecodeGraphBuilderLookupSlot) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
const char* function_prologue = "var f;"
@@ -1059,7 +1037,7 @@ TEST(BytecodeGraphBuilderLookupSlot) {
SNPrintF(script, "%s %s %s", function_prologue, snippets[i].code_snippet,
function_epilogue);
- BytecodeGraphTester tester(isolate, zone, script.start(), "t");
+ BytecodeGraphTester tester(isolate, script.start(), "t");
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -1069,7 +1047,6 @@ TEST(BytecodeGraphBuilderLookupSlot) {
TEST(BytecodeGraphBuilderLookupContextSlot) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
// Testing with eval called in the current context.
@@ -1087,7 +1064,7 @@ TEST(BytecodeGraphBuilderLookupContextSlot) {
inner_eval_prologue, inner_eval_snippets[i].code_snippet,
inner_eval_epilogue, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*inner_eval_snippets[i].return_value()));
@@ -1109,7 +1086,7 @@ TEST(BytecodeGraphBuilderLookupContextSlot) {
outer_eval_prologue, outer_eval_snippets[i].code_snippet,
outer_eval_epilogue, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*outer_eval_snippets[i].return_value()));
@@ -1119,7 +1096,6 @@ TEST(BytecodeGraphBuilderLookupContextSlot) {
TEST(BytecodeGraphBuilderLookupGlobalSlot) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
// Testing with eval called in the current context.
@@ -1137,7 +1113,7 @@ TEST(BytecodeGraphBuilderLookupGlobalSlot) {
inner_eval_prologue, inner_eval_snippets[i].code_snippet,
inner_eval_epilogue, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*inner_eval_snippets[i].return_value()));
@@ -1159,7 +1135,7 @@ TEST(BytecodeGraphBuilderLookupGlobalSlot) {
outer_eval_prologue, outer_eval_snippets[i].code_snippet,
outer_eval_epilogue, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*outer_eval_snippets[i].return_value()));
@@ -1169,7 +1145,6 @@ TEST(BytecodeGraphBuilderLookupGlobalSlot) {
TEST(BytecodeGraphBuilderLookupSlotWide) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
const char* function_prologue =
@@ -1201,7 +1176,7 @@ TEST(BytecodeGraphBuilderLookupSlotWide) {
SNPrintF(script, "%s %s %s", function_prologue, snippets[i].code_snippet,
function_epilogue);
- BytecodeGraphTester tester(isolate, zone, script.start(), "t");
+ BytecodeGraphTester tester(isolate, script.start(), "t");
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -1212,7 +1187,6 @@ TEST(BytecodeGraphBuilderLookupSlotWide) {
TEST(BytecodeGraphBuilderCallLookupSlot) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
ExpectedSnippet<0> snippets[] = {
{"g = function(){ return 2 }; eval(''); return g();",
@@ -1230,7 +1204,7 @@ TEST(BytecodeGraphBuilderCallLookupSlot) {
ScopedVector<char> script(1024);
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -1241,7 +1215,6 @@ TEST(BytecodeGraphBuilderCallLookupSlot) {
TEST(BytecodeGraphBuilderEval) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -1282,7 +1255,7 @@ TEST(BytecodeGraphBuilderEval) {
ScopedVector<char> script(1024);
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -1293,7 +1266,6 @@ TEST(BytecodeGraphBuilderEval) {
TEST(BytecodeGraphBuilderEvalParams) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
ExpectedSnippet<1> snippets[] = {
{"var x = 10; return eval('x + p1;');",
@@ -1310,7 +1282,7 @@ TEST(BytecodeGraphBuilderEvalParams) {
ScopedVector<char> script(1024);
SNPrintF(script, "function %s(p1) { %s }\n%s(0);", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0)).ToHandleChecked();
@@ -1322,7 +1294,6 @@ TEST(BytecodeGraphBuilderEvalParams) {
TEST(BytecodeGraphBuilderEvalGlobal) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -1338,7 +1309,7 @@ TEST(BytecodeGraphBuilderEvalGlobal) {
};
for (size_t i = 0; i < arraysize(snippets); i++) {
- BytecodeGraphTester tester(isolate, zone, snippets[i].code_snippet);
+ BytecodeGraphTester tester(isolate, snippets[i].code_snippet);
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -1400,7 +1371,6 @@ const char* get_code_snippet(Token::Value opcode) {
TEST(BytecodeGraphBuilderCompare) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
Handle<Object> lhs_values[] = {
factory->NewNumberFromInt(10), factory->NewHeapNumber(3.45),
@@ -1419,7 +1389,7 @@ TEST(BytecodeGraphBuilderCompare) {
SNPrintF(script, "function %s(p1, p2) { %s }\n%s({}, {});", kFunctionName,
get_code_snippet(kCompareOperators[i]), kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>, Handle<Object>>();
for (size_t j = 0; j < arraysize(lhs_values); j++) {
for (size_t k = 0; k < arraysize(rhs_values); k++) {
@@ -1437,7 +1407,6 @@ TEST(BytecodeGraphBuilderCompare) {
TEST(BytecodeGraphBuilderTestIn) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<2> snippets[] = {
@@ -1473,7 +1442,7 @@ TEST(BytecodeGraphBuilderTestIn) {
SNPrintF(script, "function %s(p1, p2) { %s }\n%s({}, {});", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>, Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0), snippets[i].parameter(1))
@@ -1486,7 +1455,6 @@ TEST(BytecodeGraphBuilderTestIn) {
TEST(BytecodeGraphBuilderTestInstanceOf) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<1> snippets[] = {
@@ -1505,7 +1473,7 @@ TEST(BytecodeGraphBuilderTestInstanceOf) {
SNPrintF(script, "function %s(p1) { %s }\n%s({});", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0)).ToHandleChecked();
@@ -1516,7 +1484,6 @@ TEST(BytecodeGraphBuilderTestInstanceOf) {
TEST(BytecodeGraphBuilderTryCatch) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
ExpectedSnippet<0> snippets[] = {
{"var a = 1; try { a = 2 } catch(e) { a = 3 }; return a;",
@@ -1535,7 +1502,7 @@ TEST(BytecodeGraphBuilderTryCatch) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -1545,7 +1512,6 @@ TEST(BytecodeGraphBuilderTryCatch) {
TEST(BytecodeGraphBuilderTryFinally1) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
ExpectedSnippet<0> snippets[] = {
{"var a = 1; try { a = a + 1; } finally { a = a + 2; }; return a;",
@@ -1573,7 +1539,7 @@ TEST(BytecodeGraphBuilderTryFinally1) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -1583,7 +1549,6 @@ TEST(BytecodeGraphBuilderTryFinally1) {
TEST(BytecodeGraphBuilderTryFinally2) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
ExpectedSnippet<0, const char*> snippets[] = {
{"var a = 1; try { a = 2; throw 23; } finally { a = 3 }; return a;",
@@ -1597,7 +1562,7 @@ TEST(BytecodeGraphBuilderTryFinally2) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
v8::Local<v8::String> message = tester.CheckThrowsReturnMessage()->Get();
v8::Local<v8::String> expected_string = v8_str(snippets[i].return_value());
CHECK(
@@ -1609,7 +1574,6 @@ TEST(BytecodeGraphBuilderTryFinally2) {
TEST(BytecodeGraphBuilderThrow) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
// TODO(mythria): Add more tests when real try-catch and deoptimization
// information are supported.
@@ -1626,7 +1590,7 @@ TEST(BytecodeGraphBuilderThrow) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
v8::Local<v8::String> message = tester.CheckThrowsReturnMessage()->Get();
v8::Local<v8::String> expected_string = v8_str(snippets[i].return_value());
CHECK(
@@ -1639,7 +1603,6 @@ TEST(BytecodeGraphBuilderThrow) {
TEST(BytecodeGraphBuilderContext) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -1687,7 +1650,7 @@ TEST(BytecodeGraphBuilderContext) {
ScopedVector<char> script(1024);
SNPrintF(script, "%s", snippets[i].code_snippet);
- BytecodeGraphTester tester(isolate, zone, script.start(), "f");
+ BytecodeGraphTester tester(isolate, script.start(), "f");
auto callable = tester.GetCallable<>("f");
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -1698,7 +1661,6 @@ TEST(BytecodeGraphBuilderContext) {
TEST(BytecodeGraphBuilderLoadContext) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<1> snippets[] = {
@@ -1752,7 +1714,7 @@ TEST(BytecodeGraphBuilderLoadContext) {
ScopedVector<char> script(1024);
SNPrintF(script, "%s", snippets[i].code_snippet);
- BytecodeGraphTester tester(isolate, zone, script.start(), "*");
+ BytecodeGraphTester tester(isolate, script.start(), "*");
auto callable = tester.GetCallable<Handle<Object>>("f");
Handle<Object> return_value =
callable(snippets[i].parameter(0)).ToHandleChecked();
@@ -1764,7 +1726,6 @@ TEST(BytecodeGraphBuilderLoadContext) {
TEST(BytecodeGraphBuilderCreateArgumentsNoParameters) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -1784,7 +1745,7 @@ TEST(BytecodeGraphBuilderCreateArgumentsNoParameters) {
ScopedVector<char> script(1024);
SNPrintF(script, "%s\n%s();", snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -1795,7 +1756,6 @@ TEST(BytecodeGraphBuilderCreateArgumentsNoParameters) {
TEST(BytecodeGraphBuilderCreateArguments) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<3> snippets[] = {
@@ -1827,7 +1787,7 @@ TEST(BytecodeGraphBuilderCreateArguments) {
ScopedVector<char> script(1024);
SNPrintF(script, "%s\n%s();", snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable =
tester.GetCallable<Handle<Object>, Handle<Object>, Handle<Object>>();
Handle<Object> return_value =
@@ -1841,7 +1801,6 @@ TEST(BytecodeGraphBuilderCreateArguments) {
TEST(BytecodeGraphBuilderCreateRestArguments) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<3> snippets[] = {
@@ -1870,7 +1829,7 @@ TEST(BytecodeGraphBuilderCreateRestArguments) {
ScopedVector<char> script(1024);
SNPrintF(script, "%s\n%s();", snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable =
tester.GetCallable<Handle<Object>, Handle<Object>, Handle<Object>>();
Handle<Object> return_value =
@@ -1884,7 +1843,6 @@ TEST(BytecodeGraphBuilderCreateRestArguments) {
TEST(BytecodeGraphBuilderRegExpLiterals) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -1909,7 +1867,7 @@ TEST(BytecodeGraphBuilderRegExpLiterals) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -1920,7 +1878,6 @@ TEST(BytecodeGraphBuilderRegExpLiterals) {
TEST(BytecodeGraphBuilderArrayLiterals) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -1949,7 +1906,7 @@ TEST(BytecodeGraphBuilderArrayLiterals) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -1960,7 +1917,6 @@ TEST(BytecodeGraphBuilderArrayLiterals) {
TEST(BytecodeGraphBuilderObjectLiterals) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -2013,7 +1969,7 @@ TEST(BytecodeGraphBuilderObjectLiterals) {
ScopedVector<char> script(4096);
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -2024,7 +1980,6 @@ TEST(BytecodeGraphBuilderObjectLiterals) {
TEST(BytecodeGraphBuilderIf) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<1> snippets[] = {
@@ -2122,7 +2077,7 @@ TEST(BytecodeGraphBuilderIf) {
SNPrintF(script, "function %s(p1) { %s };\n%s(0);", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0)).ToHandleChecked();
@@ -2134,7 +2089,6 @@ TEST(BytecodeGraphBuilderIf) {
TEST(BytecodeGraphBuilderConditionalOperator) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<1> snippets[] = {
@@ -2153,7 +2107,7 @@ TEST(BytecodeGraphBuilderConditionalOperator) {
SNPrintF(script, "function %s(p1) { %s };\n%s(0);", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0)).ToHandleChecked();
@@ -2165,7 +2119,6 @@ TEST(BytecodeGraphBuilderConditionalOperator) {
TEST(BytecodeGraphBuilderSwitch) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
const char* switch_code =
@@ -2201,7 +2154,7 @@ TEST(BytecodeGraphBuilderSwitch) {
SNPrintF(script, "function %s(p1) { %s };\n%s(0);", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0)).ToHandleChecked();
@@ -2212,7 +2165,6 @@ TEST(BytecodeGraphBuilderSwitch) {
TEST(BytecodeGraphBuilderSwitchMerge) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
const char* switch_code =
@@ -2250,7 +2202,7 @@ TEST(BytecodeGraphBuilderSwitchMerge) {
SNPrintF(script, "function %s(p1) { %s };\n%s(0);", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0)).ToHandleChecked();
@@ -2261,7 +2213,6 @@ TEST(BytecodeGraphBuilderSwitchMerge) {
TEST(BytecodeGraphBuilderNestedSwitch) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
const char* switch_code =
@@ -2309,7 +2260,7 @@ TEST(BytecodeGraphBuilderNestedSwitch) {
SNPrintF(script, "function %s(p1, p2) { %s };\n%s(0, 0);", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<Handle<Object>, Handle<Object>>();
Handle<Object> return_value =
callable(snippets[i].parameter(0), snippets[i].parameter(1))
@@ -2322,7 +2273,6 @@ TEST(BytecodeGraphBuilderNestedSwitch) {
TEST(BytecodeGraphBuilderBreakableBlocks) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -2352,7 +2302,7 @@ TEST(BytecodeGraphBuilderBreakableBlocks) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -2363,7 +2313,6 @@ TEST(BytecodeGraphBuilderBreakableBlocks) {
TEST(BytecodeGraphBuilderWhile) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -2401,7 +2350,7 @@ TEST(BytecodeGraphBuilderWhile) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -2412,7 +2361,6 @@ TEST(BytecodeGraphBuilderWhile) {
TEST(BytecodeGraphBuilderDo) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -2450,7 +2398,7 @@ TEST(BytecodeGraphBuilderDo) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -2461,7 +2409,6 @@ TEST(BytecodeGraphBuilderDo) {
TEST(BytecodeGraphBuilderFor) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -2544,7 +2491,7 @@ TEST(BytecodeGraphBuilderFor) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -2555,7 +2502,6 @@ TEST(BytecodeGraphBuilderFor) {
TEST(BytecodeGraphBuilderForIn) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
{"var sum = 0;\n"
@@ -2616,7 +2562,7 @@ TEST(BytecodeGraphBuilderForIn) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -2627,7 +2573,6 @@ TEST(BytecodeGraphBuilderForIn) {
TEST(BytecodeGraphBuilderForOf) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
{" var r = 0;\n"
@@ -2709,7 +2654,7 @@ TEST(BytecodeGraphBuilderForOf) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -2745,8 +2690,7 @@ void TestJumpWithConstantsAndWideConstants(size_t shard) {
HandleAndZoneScope scope;
auto isolate = scope.main_isolate();
auto factory = isolate->factory();
- auto zone = scope.main_zone();
- BytecodeGraphTester tester(isolate, zone, script.c_str());
+ BytecodeGraphTester tester(isolate, script.c_str());
auto callable = tester.GetCallable<Handle<Object>>();
for (int a = 0; a < 3; a++) {
Handle<Object> return_val =
@@ -2764,7 +2708,6 @@ TEST(BytecodeGraphBuilderDoExpressions) {
FLAG_harmony_do_expressions = true;
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
{"var a = do {}; return a;", {factory->undefined_value()}},
@@ -2782,7 +2725,7 @@ TEST(BytecodeGraphBuilderDoExpressions) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -2794,7 +2737,6 @@ TEST(BytecodeGraphBuilderDoExpressions) {
TEST(BytecodeGraphBuilderWithStatement) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
ExpectedSnippet<0> snippets[] = {
{"with({x:42}) return x;", {handle(Smi::FromInt(42), isolate)}},
@@ -2821,7 +2763,7 @@ TEST(BytecodeGraphBuilderWithStatement) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -2831,7 +2773,6 @@ TEST(BytecodeGraphBuilderWithStatement) {
TEST(BytecodeGraphBuilderConstDeclaration) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -2868,7 +2809,7 @@ TEST(BytecodeGraphBuilderConstDeclaration) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -2880,7 +2821,7 @@ TEST(BytecodeGraphBuilderConstDeclaration) {
SNPrintF(script, "function %s() {'use strict'; %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -2890,7 +2831,6 @@ TEST(BytecodeGraphBuilderConstDeclaration) {
TEST(BytecodeGraphBuilderConstDeclarationLookupSlots) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
Factory* factory = isolate->factory();
ExpectedSnippet<0> snippets[] = {
@@ -2910,7 +2850,7 @@ TEST(BytecodeGraphBuilderConstDeclarationLookupSlots) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -2922,7 +2862,7 @@ TEST(BytecodeGraphBuilderConstDeclarationLookupSlots) {
SNPrintF(script, "function %s() {'use strict'; %s }\n%s();", kFunctionName,
snippets[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*snippets[i].return_value()));
@@ -2932,7 +2872,6 @@ TEST(BytecodeGraphBuilderConstDeclarationLookupSlots) {
TEST(BytecodeGraphBuilderConstInLookupContextChain) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
const char* prologue =
"function OuterMost() {\n"
@@ -2970,7 +2909,7 @@ TEST(BytecodeGraphBuilderConstInLookupContextChain) {
SNPrintF(script, "%s %s %s", prologue, const_decl[i].code_snippet,
epilogue);
- BytecodeGraphTester tester(isolate, zone, script.start(), "*");
+ BytecodeGraphTester tester(isolate, script.start(), "*");
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
CHECK(return_value->SameValue(*const_decl[i].return_value()));
@@ -2980,7 +2919,6 @@ TEST(BytecodeGraphBuilderConstInLookupContextChain) {
TEST(BytecodeGraphBuilderIllegalConstDeclaration) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
ExpectedSnippet<0, const char*> illegal_const_decl[] = {
{"const x = x = 10 + 3; return x;",
@@ -3003,7 +2941,7 @@ TEST(BytecodeGraphBuilderIllegalConstDeclaration) {
SNPrintF(script, "function %s() { %s }\n%s();", kFunctionName,
illegal_const_decl[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
v8::Local<v8::String> message = tester.CheckThrowsReturnMessage()->Get();
v8::Local<v8::String> expected_string =
v8_str(illegal_const_decl[i].return_value());
@@ -3018,7 +2956,7 @@ TEST(BytecodeGraphBuilderIllegalConstDeclaration) {
SNPrintF(script, "function %s() {'use strict'; %s }\n%s();", kFunctionName,
illegal_const_decl[i].code_snippet, kFunctionName);
- BytecodeGraphTester tester(isolate, zone, script.start());
+ BytecodeGraphTester tester(isolate, script.start());
v8::Local<v8::String> message = tester.CheckThrowsReturnMessage()->Get();
v8::Local<v8::String> expected_string =
v8_str(illegal_const_decl[i].return_value());
@@ -3036,7 +2974,6 @@ static void DebugEventCounter(const v8::Debug::EventDetails& event_details) {
TEST(BytecodeGraphBuilderDebuggerStatement) {
HandleAndZoneScope scope;
Isolate* isolate = scope.main_isolate();
- Zone* zone = scope.main_zone();
v8::Debug::SetDebugEventListener(CcTest::isolate(), DebugEventCounter);
@@ -3047,7 +2984,7 @@ TEST(BytecodeGraphBuilderDebuggerStatement) {
"f();",
{isolate->factory()->undefined_value()}};
- BytecodeGraphTester tester(isolate, zone, snippet.code_snippet);
+ BytecodeGraphTester tester(isolate, snippet.code_snippet);
auto callable = tester.GetCallable<>();
Handle<Object> return_value = callable().ToHandleChecked();
« no previous file with comments | « test/cctest/compiler/test-loop-assignment-analysis.cc ('k') | test/cctest/parsing/test-preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698