| 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 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 @@
|
|
|
| private:
|
| Isolate* isolate_;
|
| - Zone* zone_;
|
| const char* script_;
|
|
|
| Handle<JSFunction> GetFunction(const char* functionName) {
|
| @@ -123,7 +122,7 @@
|
|
|
| // 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 @@
|
| 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 @@
|
| 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(BytecodeGraphBuilderPrimitiveExpressions) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -239,7 +236,7 @@
|
| 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(BytecodeGraphBuilderTwoParameterTests) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<2> snippets[] = {
|
| @@ -297,7 +293,7 @@
|
| 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(BytecodeGraphBuilderNamedLoad) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<1> snippets[] = {
|
| @@ -341,7 +336,7 @@
|
| 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(BytecodeGraphBuilderKeyedLoad) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<2> snippets[] = {
|
| @@ -397,7 +391,7 @@
|
| 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 @@
|
| 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 @@
|
| 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 @@
|
| 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 @@
|
| 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 @@
|
| 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 @@
|
| 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(BytecodeGraphBuilderCallNew) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -580,7 +570,7 @@
|
| };
|
|
|
| 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(BytecodeGraphBuilderCreateClosure) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -618,7 +607,7 @@
|
| };
|
|
|
| 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(BytecodeGraphBuilderCallRuntime) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<1> snippets[] = {
|
| @@ -645,7 +633,7 @@
|
| };
|
|
|
| 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(BytecodeGraphBuilderInvokeIntrinsic) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<1> snippets[] = {
|
| @@ -667,7 +654,7 @@
|
| };
|
|
|
| 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 @@
|
| 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 @@
|
|
|
| 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(BytecodeGraphBuilderToName) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -767,7 +752,7 @@
|
| 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(BytecodeGraphBuilderLogicalNot) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<1> snippets[] = {
|
| @@ -798,7 +782,7 @@
|
| 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(BytecodeGraphBuilderTypeOf) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<1> snippets[] = {
|
| @@ -835,7 +818,7 @@
|
| 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(BytecodeGraphBuilderCountOperation) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<1> snippets[] = {
|
| @@ -889,7 +871,7 @@
|
| 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(BytecodeGraphBuilderDelete) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<1> snippets[] = {
|
| @@ -928,7 +909,7 @@
|
| 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(BytecodeGraphBuilderDeleteGlobal) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -981,7 +961,7 @@
|
| 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(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 @@
|
| 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(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 @@
|
| 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(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 @@
|
| 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 @@
|
| 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(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 @@
|
| 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 @@
|
| 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(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 @@
|
| 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(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 @@
|
| 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(BytecodeGraphBuilderEval) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -1282,7 +1255,7 @@
|
| 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(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 @@
|
| 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(BytecodeGraphBuilderEvalGlobal) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -1338,7 +1309,7 @@
|
| };
|
|
|
| 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 @@
|
| 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 @@
|
| 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(BytecodeGraphBuilderTestIn) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<2> snippets[] = {
|
| @@ -1473,7 +1442,7 @@
|
| 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(BytecodeGraphBuilderTestInstanceOf) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<1> snippets[] = {
|
| @@ -1505,7 +1473,7 @@
|
| 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(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 @@
|
| 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(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 @@
|
| 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(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 @@
|
| 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(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 @@
|
| 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(BytecodeGraphBuilderContext) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -1687,7 +1650,7 @@
|
| 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(BytecodeGraphBuilderLoadContext) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<1> snippets[] = {
|
| @@ -1752,7 +1714,7 @@
|
| 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(BytecodeGraphBuilderCreateArgumentsNoParameters) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -1784,7 +1745,7 @@
|
| 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(BytecodeGraphBuilderCreateArguments) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<3> snippets[] = {
|
| @@ -1827,7 +1787,7 @@
|
| 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(BytecodeGraphBuilderCreateRestArguments) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<3> snippets[] = {
|
| @@ -1870,7 +1829,7 @@
|
| 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(BytecodeGraphBuilderRegExpLiterals) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -1909,7 +1867,7 @@
|
| 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(BytecodeGraphBuilderArrayLiterals) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -1949,7 +1906,7 @@
|
| 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(BytecodeGraphBuilderObjectLiterals) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -2013,7 +1969,7 @@
|
| 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(BytecodeGraphBuilderIf) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<1> snippets[] = {
|
| @@ -2122,7 +2077,7 @@
|
| 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(BytecodeGraphBuilderConditionalOperator) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<1> snippets[] = {
|
| @@ -2153,7 +2107,7 @@
|
| 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(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 @@
|
| 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(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 @@
|
| 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(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 @@
|
| 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(BytecodeGraphBuilderBreakableBlocks) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -2352,7 +2302,7 @@
|
| 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(BytecodeGraphBuilderWhile) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -2401,7 +2350,7 @@
|
| 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(BytecodeGraphBuilderDo) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -2450,7 +2398,7 @@
|
| 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(BytecodeGraphBuilderFor) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -2544,7 +2491,7 @@
|
| 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(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 @@
|
| 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(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 @@
|
| 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 @@
|
| 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 @@
|
| 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 @@
|
| 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(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 @@
|
| 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(BytecodeGraphBuilderConstDeclaration) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -2868,7 +2809,7 @@
|
| 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 @@
|
| 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(BytecodeGraphBuilderConstDeclarationLookupSlots) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
| Factory* factory = isolate->factory();
|
|
|
| ExpectedSnippet<0> snippets[] = {
|
| @@ -2910,7 +2850,7 @@
|
| 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 @@
|
| 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(BytecodeGraphBuilderConstInLookupContextChain) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
|
|
| const char* prologue =
|
| "function OuterMost() {\n"
|
| @@ -2970,7 +2909,7 @@
|
| 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(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 @@
|
| 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 @@
|
| 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 @@
|
| TEST(BytecodeGraphBuilderDebuggerStatement) {
|
| HandleAndZoneScope scope;
|
| Isolate* isolate = scope.main_isolate();
|
| - Zone* zone = scope.main_zone();
|
|
|
| v8::Debug::SetDebugEventListener(CcTest::isolate(), DebugEventCounter);
|
|
|
| @@ -3047,7 +2984,7 @@
|
| "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();
|
|
|
|
|