| 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/node-properties-inl.h" | 8 #include "src/compiler/node-properties-inl.h" |
| 9 #include "src/compiler/simplified-operator.h" | 9 #include "src/compiler/simplified-operator.h" |
| 10 #include "test/unittests/compiler/compiler-test-utils.h" | 10 #include "test/unittests/compiler/compiler-test-utils.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 int SmiValueSize() const { | 59 int SmiValueSize() const { |
| 60 return Is32() ? SmiTagging<4>::SmiValueSize() | 60 return Is32() ? SmiTagging<4>::SmiValueSize() |
| 61 : SmiTagging<8>::SmiValueSize(); | 61 : SmiTagging<8>::SmiValueSize(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 Node* Parameter(int32_t index = 0) { | 64 Node* Parameter(int32_t index = 0) { |
| 65 return graph()->NewNode(common()->Parameter(index), graph()->start()); | 65 return graph()->NewNode(common()->Parameter(index), graph()->start()); |
| 66 } | 66 } |
| 67 | 67 |
| 68 Reduction Reduce(Node* node) { | 68 Reduction Reduce(Node* node) { |
| 69 MachineOperatorBuilder machine(WordRepresentation()); | 69 MachineOperatorBuilder machine(zone(), WordRepresentation()); |
| 70 JSOperatorBuilder javascript(zone()); | 70 JSOperatorBuilder javascript(zone()); |
| 71 JSGraph jsgraph(graph(), common(), &javascript, &machine); | 71 JSGraph jsgraph(graph(), common(), &javascript, &machine); |
| 72 CompilationInfo info(isolate(), zone()); | 72 CompilationInfo info(isolate(), zone()); |
| 73 Linkage linkage(zone(), &info); | 73 Linkage linkage(zone(), &info); |
| 74 ChangeLowering reducer(&jsgraph, &linkage); | 74 ChangeLowering reducer(&jsgraph, &linkage); |
| 75 return reducer.Reduce(node); | 75 return reducer.Reduce(node); |
| 76 } | 76 } |
| 77 | 77 |
| 78 SimplifiedOperatorBuilder* simplified() { return &simplified_; } | 78 SimplifiedOperatorBuilder* simplified() { return &simplified_; } |
| 79 | 79 |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 IsIfTrue(AllOf(CaptureEq(&branch), | 447 IsIfTrue(AllOf(CaptureEq(&branch), |
| 448 IsBranch(IsUint32LessThanOrEqual( | 448 IsBranch(IsUint32LessThanOrEqual( |
| 449 val, IsInt32Constant(SmiMaxValue())), | 449 val, IsInt32Constant(SmiMaxValue())), |
| 450 graph()->start()))), | 450 graph()->start()))), |
| 451 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch)))))); | 451 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch)))))); |
| 452 } | 452 } |
| 453 | 453 |
| 454 } // namespace compiler | 454 } // namespace compiler |
| 455 } // namespace internal | 455 } // namespace internal |
| 456 } // namespace v8 | 456 } // namespace v8 |
| OLD | NEW |