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

Side by Side Diff: test/unittests/compiler/js-intrinsic-lowering-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 "src/compiler/access-builder.h" 5 #include "src/compiler/access-builder.h"
6 #include "src/compiler/diamond.h" 6 #include "src/compiler/diamond.h"
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/js-intrinsic-lowering.h" 8 #include "src/compiler/js-intrinsic-lowering.h"
9 #include "src/compiler/js-operator.h" 9 #include "src/compiler/js-operator.h"
10 #include "test/unittests/compiler/graph-unittest.h" 10 #include "test/unittests/compiler/graph-unittest.h"
(...skipping 14 matching lines...) Expand all
25 25
26 class JSIntrinsicLoweringTest : public GraphTest { 26 class JSIntrinsicLoweringTest : public GraphTest {
27 public: 27 public:
28 JSIntrinsicLoweringTest() : GraphTest(3), javascript_(zone()) {} 28 JSIntrinsicLoweringTest() : GraphTest(3), javascript_(zone()) {}
29 ~JSIntrinsicLoweringTest() override {} 29 ~JSIntrinsicLoweringTest() override {}
30 30
31 protected: 31 protected:
32 Reduction Reduce(Node* node, MachineOperatorBuilder::Flags flags = 32 Reduction Reduce(Node* node, MachineOperatorBuilder::Flags flags =
33 MachineOperatorBuilder::kNoFlags) { 33 MachineOperatorBuilder::kNoFlags) {
34 MachineOperatorBuilder machine(zone(), kMachPtr, flags); 34 MachineOperatorBuilder machine(zone(), kMachPtr, flags);
35 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine); 35 JSGraph jsgraph(isolate(), graph(), common(), javascript(), nullptr,
36 &machine);
36 // TODO(titzer): mock the GraphReducer here for better unit testing. 37 // TODO(titzer): mock the GraphReducer here for better unit testing.
37 GraphReducer graph_reducer(zone(), graph()); 38 GraphReducer graph_reducer(zone(), graph());
38 JSIntrinsicLowering reducer(&graph_reducer, &jsgraph, 39 JSIntrinsicLowering reducer(&graph_reducer, &jsgraph,
39 JSIntrinsicLowering::kDeoptimizationEnabled); 40 JSIntrinsicLowering::kDeoptimizationEnabled);
40 return reducer.Reduce(node); 41 return reducer.Reduce(node);
41 } 42 }
42 43
43 Node* EmptyFrameState() { 44 Node* EmptyFrameState() {
44 MachineOperatorBuilder machine(zone()); 45 MachineOperatorBuilder machine(zone());
45 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine); 46 JSGraph jsgraph(isolate(), graph(), common(), javascript(), nullptr,
47 &machine);
46 return jsgraph.EmptyFrameState(); 48 return jsgraph.EmptyFrameState();
47 } 49 }
48 50
49 JSOperatorBuilder* javascript() { return &javascript_; } 51 JSOperatorBuilder* javascript() { return &javascript_; }
50 52
51 private: 53 private:
52 JSOperatorBuilder javascript_; 54 JSOperatorBuilder javascript_;
53 }; 55 };
54 56
55 57
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 CaptureEq(&if_false0)))))), 457 CaptureEq(&if_false0)))))),
456 IsMerge( 458 IsMerge(
457 IsIfTrue(AllOf(CaptureEq(&branch0), 459 IsIfTrue(AllOf(CaptureEq(&branch0),
458 IsBranch(IsObjectIsSmi(input), control))), 460 IsBranch(IsObjectIsSmi(input), control))),
459 AllOf(CaptureEq(&if_false0), IsIfFalse(CaptureEq(&branch0)))))); 461 AllOf(CaptureEq(&if_false0), IsIfFalse(CaptureEq(&branch0))))));
460 } 462 }
461 463
462 } // namespace compiler 464 } // namespace compiler
463 } // namespace internal 465 } // namespace internal
464 } // namespace v8 466 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/js-context-relaxation-unittest.cc ('k') | test/unittests/compiler/js-type-feedback-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698