| 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/simplified-operator-reducer.h" | 5 #include "src/compiler/simplified-operator-reducer.h" |
| 6 | 6 |
| 7 #include "src/compiler/js-graph.h" | 7 #include "src/compiler/js-graph.h" |
| 8 #include "src/compiler/machine-operator.h" | 8 #include "src/compiler/machine-operator.h" |
| 9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
| 10 #include "src/compiler/operator-properties.h" | 10 #include "src/compiler/operator-properties.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 } | 40 } |
| 41 case IrOpcode::kChangeBoolToBit: { | 41 case IrOpcode::kChangeBoolToBit: { |
| 42 HeapObjectMatcher m(node->InputAt(0)); | 42 HeapObjectMatcher m(node->InputAt(0)); |
| 43 if (m.HasValue()) return ReplaceInt32(m.Value()->BooleanValue()); | 43 if (m.HasValue()) return ReplaceInt32(m.Value()->BooleanValue()); |
| 44 if (m.IsChangeBitToBool()) return Replace(m.InputAt(0)); | 44 if (m.IsChangeBitToBool()) return Replace(m.InputAt(0)); |
| 45 break; | 45 break; |
| 46 } | 46 } |
| 47 case IrOpcode::kChangeFloat64ToTagged: { | 47 case IrOpcode::kChangeFloat64ToTagged: { |
| 48 Float64Matcher m(node->InputAt(0)); | 48 Float64Matcher m(node->InputAt(0)); |
| 49 if (m.HasValue()) return ReplaceNumber(m.Value()); | 49 if (m.HasValue()) return ReplaceNumber(m.Value()); |
| 50 if (m.IsChangeTaggedToFloat64()) return Replace(m.node()->InputAt(0)); |
| 50 break; | 51 break; |
| 51 } | 52 } |
| 52 case IrOpcode::kChangeInt32ToTagged: { | 53 case IrOpcode::kChangeInt32ToTagged: { |
| 53 Int32Matcher m(node->InputAt(0)); | 54 Int32Matcher m(node->InputAt(0)); |
| 54 if (m.HasValue()) return ReplaceNumber(m.Value()); | 55 if (m.HasValue()) return ReplaceNumber(m.Value()); |
| 55 break; | 56 break; |
| 56 } | 57 } |
| 57 case IrOpcode::kChangeTaggedToFloat64: { | 58 case IrOpcode::kChangeTaggedToFloat64: { |
| 58 NumberMatcher m(node->InputAt(0)); | 59 NumberMatcher m(node->InputAt(0)); |
| 59 if (m.HasValue()) return ReplaceFloat64(m.Value()); | 60 if (m.HasValue()) return ReplaceFloat64(m.Value()); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 Graph* SimplifiedOperatorReducer::graph() const { return jsgraph()->graph(); } | 159 Graph* SimplifiedOperatorReducer::graph() const { return jsgraph()->graph(); } |
| 159 | 160 |
| 160 | 161 |
| 161 MachineOperatorBuilder* SimplifiedOperatorReducer::machine() const { | 162 MachineOperatorBuilder* SimplifiedOperatorReducer::machine() const { |
| 162 return jsgraph()->machine(); | 163 return jsgraph()->machine(); |
| 163 } | 164 } |
| 164 | 165 |
| 165 } // namespace compiler | 166 } // namespace compiler |
| 166 } // namespace internal | 167 } // namespace internal |
| 167 } // namespace v8 | 168 } // namespace v8 |
| OLD | NEW |