| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 MachineOperatorBuilder machine(WordRepresentation()); | 77 MachineOperatorBuilder machine(WordRepresentation()); |
| 78 JSOperatorBuilder javascript(zone()); | 78 JSOperatorBuilder javascript(zone()); |
| 79 JSGraph jsgraph(graph(), common(), &javascript, &typer, &machine); | 79 JSGraph jsgraph(graph(), common(), &javascript, &typer, &machine); |
| 80 CompilationInfo info(isolate(), zone()); | 80 CompilationInfo info(isolate(), zone()); |
| 81 Linkage linkage(&info); | 81 Linkage linkage(&info); |
| 82 ChangeLowering reducer(&jsgraph, &linkage, &machine); | 82 ChangeLowering reducer(&jsgraph, &linkage); |
| 83 return reducer.Reduce(node); | 83 return reducer.Reduce(node); |
| 84 } | 84 } |
| 85 | 85 |
| 86 SimplifiedOperatorBuilder* simplified() { return &simplified_; } | 86 SimplifiedOperatorBuilder* simplified() { return &simplified_; } |
| 87 | 87 |
| 88 Matcher<Node*> IsAllocateHeapNumber(const Matcher<Node*>& effect_matcher, | 88 Matcher<Node*> IsAllocateHeapNumber(const Matcher<Node*>& effect_matcher, |
| 89 const Matcher<Node*>& control_matcher) { | 89 const Matcher<Node*>& control_matcher) { |
| 90 return IsCall( | 90 return IsCall( |
| 91 _, IsHeapConstant(Unique<HeapObject>::CreateImmovable( | 91 _, IsHeapConstant(Unique<HeapObject>::CreateImmovable( |
| 92 CEntryStub(isolate(), 1).GetCode())), | 92 CEntryStub(isolate(), 1).GetCode())), |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 IsIfTrue(AllOf(CaptureEq(&branch), | 467 IsIfTrue(AllOf(CaptureEq(&branch), |
| 468 IsBranch(IsUint32LessThanOrEqual( | 468 IsBranch(IsUint32LessThanOrEqual( |
| 469 val, IsInt32Constant(SmiMaxValue())), | 469 val, IsInt32Constant(SmiMaxValue())), |
| 470 graph()->start()))), | 470 graph()->start()))), |
| 471 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch)))))); | 471 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch)))))); |
| 472 } | 472 } |
| 473 | 473 |
| 474 } // namespace compiler | 474 } // namespace compiler |
| 475 } // namespace internal | 475 } // namespace internal |
| 476 } // namespace v8 | 476 } // namespace v8 |
| OLD | NEW |