| 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 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 virtual MachineType WordRepresentation() const = 0; | 30 virtual MachineType WordRepresentation() const = 0; |
| 31 | 31 |
| 32 protected: | 32 protected: |
| 33 bool Is32() const { return WordRepresentation() == kRepWord32; } | 33 bool Is32() const { return WordRepresentation() == kRepWord32; } |
| 34 bool Is64() const { return WordRepresentation() == kRepWord64; } | 34 bool Is64() const { return WordRepresentation() == kRepWord64; } |
| 35 | 35 |
| 36 Reduction Reduce(Node* node) { | 36 Reduction Reduce(Node* node) { |
| 37 MachineOperatorBuilder machine(zone(), WordRepresentation()); | 37 MachineOperatorBuilder machine(zone(), WordRepresentation()); |
| 38 JSOperatorBuilder javascript(zone()); | 38 JSOperatorBuilder javascript(zone()); |
| 39 JSGraph jsgraph(isolate(), graph(), common(), &javascript, &machine); | 39 JSGraph jsgraph(isolate(), graph(), common(), &javascript, nullptr, |
| 40 &machine); |
| 40 ChangeLowering reducer(&jsgraph); | 41 ChangeLowering reducer(&jsgraph); |
| 41 return reducer.Reduce(node); | 42 return reducer.Reduce(node); |
| 42 } | 43 } |
| 43 | 44 |
| 44 SimplifiedOperatorBuilder* simplified() { return &simplified_; } | 45 SimplifiedOperatorBuilder* simplified() { return &simplified_; } |
| 45 | 46 |
| 46 Matcher<Node*> IsAllocateHeapNumber(const Matcher<Node*>& effect_matcher, | 47 Matcher<Node*> IsAllocateHeapNumber(const Matcher<Node*>& effect_matcher, |
| 47 const Matcher<Node*>& control_matcher) { | 48 const Matcher<Node*>& control_matcher) { |
| 48 return IsCall( | 49 return IsCall( |
| 49 _, IsHeapConstant(AllocateHeapNumberStub(isolate()).GetCode()), | 50 _, IsHeapConstant(AllocateHeapNumberStub(isolate()).GetCode()), |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 CaptureEq(&branch), | 460 CaptureEq(&branch), |
| 460 IsBranch(IsUint32LessThanOrEqual( | 461 IsBranch(IsUint32LessThanOrEqual( |
| 461 value, IsInt32Constant(Smi::kMaxValue)), | 462 value, IsInt32Constant(Smi::kMaxValue)), |
| 462 graph()->start()))), | 463 graph()->start()))), |
| 463 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch)))))); | 464 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch)))))); |
| 464 } | 465 } |
| 465 | 466 |
| 466 } // namespace compiler | 467 } // namespace compiler |
| 467 } // namespace internal | 468 } // namespace internal |
| 468 } // namespace v8 | 469 } // namespace v8 |
| OLD | NEW |