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

Side by Side Diff: test/unittests/compiler/bytecode-graph-builder-unittest.cc

Issue 1467473002: Install ConstructNonConstructable as construct stub for non-constructables. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <iostream> 5 #include <iostream>
6 6
7 #include "src/compiler/bytecode-graph-builder.h" 7 #include "src/compiler/bytecode-graph-builder.h"
8 #include "src/compiler/common-operator.h" 8 #include "src/compiler/common-operator.h"
9 #include "src/compiler/graph-visualizer.h" 9 #include "src/compiler/graph-visualizer.h"
10 #include "src/compiler/instruction.h" 10 #include "src/compiler/instruction.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 zone(), kMachPtr, InstructionSelector::SupportedMachineOperatorFlags()); 71 zone(), kMachPtr, InstructionSelector::SupportedMachineOperatorFlags());
72 CommonOperatorBuilder* common = new (zone()) CommonOperatorBuilder(zone()); 72 CommonOperatorBuilder* common = new (zone()) CommonOperatorBuilder(zone());
73 JSOperatorBuilder* javascript = new (zone()) JSOperatorBuilder(zone()); 73 JSOperatorBuilder* javascript = new (zone()) JSOperatorBuilder(zone());
74 Graph* graph = new (zone()) Graph(zone()); 74 Graph* graph = new (zone()) Graph(zone());
75 JSGraph* jsgraph = new (zone()) 75 JSGraph* jsgraph = new (zone())
76 JSGraph(isolate(), graph, common, javascript, nullptr, machine); 76 JSGraph(isolate(), graph, common, javascript, nullptr, machine);
77 77
78 Handle<String> name = factory()->NewStringFromStaticChars("test"); 78 Handle<String> name = factory()->NewStringFromStaticChars("test");
79 Handle<String> script = factory()->NewStringFromStaticChars("test() {}"); 79 Handle<String> script = factory()->NewStringFromStaticChars("test() {}");
80 Handle<SharedFunctionInfo> shared_info = 80 Handle<SharedFunctionInfo> shared_info =
81 factory()->NewSharedFunctionInfo(name, MaybeHandle<Code>()); 81 factory()->NewSharedFunctionInfo(name, MaybeHandle<Code>(), true);
82 shared_info->set_script(*factory()->NewScript(script)); 82 shared_info->set_script(*factory()->NewScript(script));
83 if (!feedback_vector.is_null()) { 83 if (!feedback_vector.is_null()) {
84 shared_info->set_feedback_vector(*feedback_vector.ToHandleChecked()); 84 shared_info->set_feedback_vector(*feedback_vector.ToHandleChecked());
85 } 85 }
86 86
87 ParseInfo parse_info(zone(), shared_info); 87 ParseInfo parse_info(zone(), shared_info);
88 parse_info.set_language_mode(language_mode); 88 parse_info.set_language_mode(language_mode);
89 CompilationInfo info(&parse_info); 89 CompilationInfo info(&parse_info);
90 info.shared_info()->set_function_data(*bytecode_array); 90 info.shared_info()->set_function_data(*bytecode_array);
91 91
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 construct_inputs.push_back(IsParameter(4)); 803 construct_inputs.push_back(IsParameter(4));
804 construct_inputs.push_back(IsParameter(1)); 804 construct_inputs.push_back(IsParameter(1));
805 Matcher<Node*> call_construct = 805 Matcher<Node*> call_construct =
806 IsJSCallConstruct(construct_inputs, start, start); 806 IsJSCallConstruct(construct_inputs, start, start);
807 EXPECT_THAT(ret, IsReturn(call_construct, call_construct, IsIfSuccess(_))); 807 EXPECT_THAT(ret, IsReturn(call_construct, call_construct, IsIfSuccess(_)));
808 } 808 }
809 809
810 } // namespace compiler 810 } // namespace compiler
811 } // namespace internal 811 } // namespace internal
812 } // namespace v8 812 } // namespace v8
OLDNEW
« no previous file with comments | « test/mjsunit/regress/regress-inline-arrow-as-construct.js ('k') | test/webkit/class-syntax-call.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698