| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 if (m.HasValue()) return ReplaceInt32(DoubleToInt32(m.Value())); | 119 if (m.HasValue()) return ReplaceInt32(DoubleToInt32(m.Value())); |
| 120 if (m.IsChangeInt31ToTaggedSigned() || m.IsChangeInt32ToTagged() || | 120 if (m.IsChangeInt31ToTaggedSigned() || m.IsChangeInt32ToTagged() || |
| 121 m.IsChangeUint32ToTagged()) { | 121 m.IsChangeUint32ToTagged()) { |
| 122 return Replace(m.InputAt(0)); | 122 return Replace(m.InputAt(0)); |
| 123 } | 123 } |
| 124 if (m.IsChangeFloat64ToTagged()) { | 124 if (m.IsChangeFloat64ToTagged()) { |
| 125 return Change(node, machine()->TruncateFloat64ToWord32(), m.InputAt(0)); | 125 return Change(node, machine()->TruncateFloat64ToWord32(), m.InputAt(0)); |
| 126 } | 126 } |
| 127 break; | 127 break; |
| 128 } | 128 } |
| 129 case IrOpcode::kCheckedTaggedToInt32: |
| 129 case IrOpcode::kCheckedTaggedSignedToInt32: { | 130 case IrOpcode::kCheckedTaggedSignedToInt32: { |
| 130 NodeMatcher m(node->InputAt(0)); | 131 NodeMatcher m(node->InputAt(0)); |
| 131 if (m.IsConvertTaggedHoleToUndefined()) { | 132 if (m.IsConvertTaggedHoleToUndefined()) { |
| 132 node->ReplaceInput(0, m.InputAt(0)); | 133 node->ReplaceInput(0, m.InputAt(0)); |
| 133 return Changed(node); | 134 return Changed(node); |
| 134 } | 135 } |
| 135 break; | 136 break; |
| 136 } | 137 } |
| 137 case IrOpcode::kCheckIf: { | 138 case IrOpcode::kCheckIf: { |
| 138 HeapObjectMatcher m(node->InputAt(0)); | 139 HeapObjectMatcher m(node->InputAt(0)); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 return jsgraph()->isolate(); | 250 return jsgraph()->isolate(); |
| 250 } | 251 } |
| 251 | 252 |
| 252 MachineOperatorBuilder* SimplifiedOperatorReducer::machine() const { | 253 MachineOperatorBuilder* SimplifiedOperatorReducer::machine() const { |
| 253 return jsgraph()->machine(); | 254 return jsgraph()->machine(); |
| 254 } | 255 } |
| 255 | 256 |
| 256 } // namespace compiler | 257 } // namespace compiler |
| 257 } // namespace internal | 258 } // namespace internal |
| 258 } // namespace v8 | 259 } // namespace v8 |
| OLD | NEW |