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

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

Issue 1409993002: [turbofan] Move SimplifiedOperatorBuilder into JSGraph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilderTest); 44 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilderTest);
45 }; 45 };
46 46
47 47
48 Graph* BytecodeGraphBuilderTest::GetCompletedGraph() { 48 Graph* BytecodeGraphBuilderTest::GetCompletedGraph() {
49 MachineOperatorBuilder* machine = new (zone()) MachineOperatorBuilder( 49 MachineOperatorBuilder* machine = new (zone()) MachineOperatorBuilder(
50 zone(), kMachPtr, InstructionSelector::SupportedMachineOperatorFlags()); 50 zone(), kMachPtr, InstructionSelector::SupportedMachineOperatorFlags());
51 CommonOperatorBuilder* common = new (zone()) CommonOperatorBuilder(zone()); 51 CommonOperatorBuilder* common = new (zone()) CommonOperatorBuilder(zone());
52 JSOperatorBuilder* javascript = new (zone()) JSOperatorBuilder(zone()); 52 JSOperatorBuilder* javascript = new (zone()) JSOperatorBuilder(zone());
53 Graph* graph = new (zone()) Graph(zone()); 53 Graph* graph = new (zone()) Graph(zone());
54 JSGraph* jsgraph = 54 JSGraph* jsgraph = new (zone())
55 new (zone()) JSGraph(isolate(), graph, common, javascript, machine); 55 JSGraph(isolate(), graph, common, javascript, nullptr, machine);
56 56
57 Handle<String> name = factory()->NewStringFromStaticChars("test"); 57 Handle<String> name = factory()->NewStringFromStaticChars("test");
58 Handle<String> script = factory()->NewStringFromStaticChars("test() {}"); 58 Handle<String> script = factory()->NewStringFromStaticChars("test() {}");
59 Handle<SharedFunctionInfo> shared_info = 59 Handle<SharedFunctionInfo> shared_info =
60 factory()->NewSharedFunctionInfo(name, MaybeHandle<Code>()); 60 factory()->NewSharedFunctionInfo(name, MaybeHandle<Code>());
61 shared_info->set_script(*factory()->NewScript(script)); 61 shared_info->set_script(*factory()->NewScript(script));
62 62
63 ParseInfo parse_info(zone(), shared_info); 63 ParseInfo parse_info(zone(), shared_info);
64 CompilationInfo info(&parse_info); 64 CompilationInfo info(&parse_info);
65 Handle<BytecodeArray> bytecode_array = array_builder()->ToBytecodeArray(); 65 Handle<BytecodeArray> bytecode_array = array_builder()->ToBytecodeArray();
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 EXPECT_EQ(1, end->InputCount()); 241 EXPECT_EQ(1, end->InputCount());
242 Node* ret = end->InputAt(0); 242 Node* ret = end->InputAt(0);
243 EXPECT_THAT( 243 EXPECT_THAT(
244 ret, IsReturn(IsJSAdd(IsNumberConstant(kLeft), IsNumberConstant(kRight)), 244 ret, IsReturn(IsJSAdd(IsNumberConstant(kLeft), IsNumberConstant(kRight)),
245 _, _)); 245 _, _));
246 } 246 }
247 247
248 } // namespace compiler 248 } // namespace compiler
249 } // namespace internal 249 } // namespace internal
250 } // namespace v8 250 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-simplified-lowering.cc ('k') | test/unittests/compiler/change-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698