OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/change-lowering.h" | 5 #include "src/compiler/change-lowering.h" |
6 #include "src/compiler/compiler-test-utils.h" | 6 #include "src/compiler/compiler-test-utils.h" |
7 #include "src/compiler/graph-unittest.h" | 7 #include "src/compiler/graph-unittest.h" |
8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.h" |
9 #include "src/compiler/node-properties-inl.h" | 9 #include "src/compiler/node-properties-inl.h" |
10 #include "src/compiler/simplified-operator.h" | 10 #include "src/compiler/simplified-operator.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 Node* Parameter(int32_t index = 0) { | 71 Node* Parameter(int32_t index = 0) { |
72 return graph()->NewNode(common()->Parameter(index), graph()->start()); | 72 return graph()->NewNode(common()->Parameter(index), graph()->start()); |
73 } | 73 } |
74 | 74 |
75 Reduction Reduce(Node* node) { | 75 Reduction Reduce(Node* node) { |
76 Typer typer(zone()); | 76 Typer typer(zone()); |
77 JSGraph jsgraph(graph(), common(), &typer); | 77 JSGraph jsgraph(graph(), common(), &typer); |
78 CompilationInfo info(isolate(), zone()); | 78 CompilationInfo info(isolate(), zone()); |
79 Linkage linkage(&info); | 79 Linkage linkage(&info); |
80 MachineOperatorBuilder machine(zone(), WordRepresentation()); | 80 MachineOperatorBuilder machine(WordRepresentation()); |
81 ChangeLowering reducer(&jsgraph, &linkage, &machine); | 81 ChangeLowering reducer(&jsgraph, &linkage, &machine); |
82 return reducer.Reduce(node); | 82 return reducer.Reduce(node); |
83 } | 83 } |
84 | 84 |
85 SimplifiedOperatorBuilder* simplified() { return &simplified_; } | 85 SimplifiedOperatorBuilder* simplified() { return &simplified_; } |
86 | 86 |
87 Matcher<Node*> IsAllocateHeapNumber(const Matcher<Node*>& effect_matcher, | 87 Matcher<Node*> IsAllocateHeapNumber(const Matcher<Node*>& effect_matcher, |
88 const Matcher<Node*>& control_matcher) { | 88 const Matcher<Node*>& control_matcher) { |
89 return IsCall( | 89 return IsCall( |
90 _, IsHeapConstant(Unique<HeapObject>::CreateImmovable( | 90 _, IsHeapConstant(Unique<HeapObject>::CreateImmovable( |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 IsIfTrue(AllOf(CaptureEq(&branch), | 466 IsIfTrue(AllOf(CaptureEq(&branch), |
467 IsBranch(IsUint32LessThanOrEqual( | 467 IsBranch(IsUint32LessThanOrEqual( |
468 val, IsInt32Constant(SmiMaxValue())), | 468 val, IsInt32Constant(SmiMaxValue())), |
469 graph()->start()))), | 469 graph()->start()))), |
470 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch)))))); | 470 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch)))))); |
471 } | 471 } |
472 | 472 |
473 } // namespace compiler | 473 } // namespace compiler |
474 } // namespace internal | 474 } // namespace internal |
475 } // namespace v8 | 475 } // namespace v8 |
OLD | NEW |