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/code-stubs.h" | 5 #include "src/code-stubs.h" |
6 #include "src/compiler/change-lowering.h" | 6 #include "src/compiler/change-lowering.h" |
7 #include "src/compiler/js-graph.h" | 7 #include "src/compiler/js-graph.h" |
8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
10 #include "src/compiler/simplified-operator.h" | 10 #include "src/compiler/simplified-operator.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 } | 35 } |
36 bool Is64() const { | 36 bool Is64() const { |
37 return WordRepresentation() == MachineRepresentation::kWord64; | 37 return WordRepresentation() == MachineRepresentation::kWord64; |
38 } | 38 } |
39 | 39 |
40 Reduction Reduce(Node* node) { | 40 Reduction Reduce(Node* node) { |
41 MachineOperatorBuilder machine(zone(), WordRepresentation()); | 41 MachineOperatorBuilder machine(zone(), WordRepresentation()); |
42 JSOperatorBuilder javascript(zone()); | 42 JSOperatorBuilder javascript(zone()); |
43 JSGraph jsgraph(isolate(), graph(), common(), &javascript, nullptr, | 43 JSGraph jsgraph(isolate(), graph(), common(), &javascript, nullptr, |
44 &machine); | 44 &machine); |
45 GraphReducer graph_reducer(zone(), graph()); | 45 ChangeLowering reducer(&jsgraph); |
46 ChangeLowering reducer(&graph_reducer, &jsgraph); | |
47 return reducer.Reduce(node); | 46 return reducer.Reduce(node); |
48 } | 47 } |
49 | 48 |
50 SimplifiedOperatorBuilder* simplified() { return &simplified_; } | 49 SimplifiedOperatorBuilder* simplified() { return &simplified_; } |
51 | 50 |
52 Matcher<Node*> IsAllocateHeapNumber(const Matcher<Node*>& effect_matcher, | 51 Matcher<Node*> IsAllocateHeapNumber(const Matcher<Node*>& effect_matcher, |
53 const Matcher<Node*>& control_matcher) { | 52 const Matcher<Node*>& control_matcher) { |
54 return IsCall( | 53 return IsCall( |
55 _, IsHeapConstant(AllocateHeapNumberStub(isolate()).GetCode()), | 54 _, IsHeapConstant(AllocateHeapNumberStub(isolate()).GetCode()), |
56 IsNumberConstant(BitEq(0.0)), effect_matcher, control_matcher); | 55 IsNumberConstant(BitEq(0.0)), effect_matcher, control_matcher); |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 CaptureEq(&branch), | 619 CaptureEq(&branch), |
621 IsBranch(IsUint32LessThanOrEqual( | 620 IsBranch(IsUint32LessThanOrEqual( |
622 value, IsInt32Constant(Smi::kMaxValue)), | 621 value, IsInt32Constant(Smi::kMaxValue)), |
623 graph()->start()))), | 622 graph()->start()))), |
624 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch)))))); | 623 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch)))))); |
625 } | 624 } |
626 | 625 |
627 } // namespace compiler | 626 } // namespace compiler |
628 } // namespace internal | 627 } // namespace internal |
629 } // namespace v8 | 628 } // namespace v8 |
OLD | NEW |