| 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/generic-node-inl.h" | 5 #include "src/compiler/generic-node-inl.h" |
| 6 #include "src/compiler/js-graph.h" | 6 #include "src/compiler/js-graph.h" |
| 7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
| 8 #include "src/compiler/simplified-operator-reducer.h" | 8 #include "src/compiler/simplified-operator-reducer.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 if (m.IsChangeUint32ToTagged()) { | 62 if (m.IsChangeUint32ToTagged()) { |
| 63 return Change(node, machine()->ChangeUint32ToFloat64(), | 63 return Change(node, machine()->ChangeUint32ToFloat64(), |
| 64 m.node()->InputAt(0)); | 64 m.node()->InputAt(0)); |
| 65 } | 65 } |
| 66 break; | 66 break; |
| 67 } | 67 } |
| 68 case IrOpcode::kChangeTaggedToInt32: { | 68 case IrOpcode::kChangeTaggedToInt32: { |
| 69 Float64Matcher m(node->InputAt(0)); | 69 Float64Matcher m(node->InputAt(0)); |
| 70 if (m.HasValue()) return ReplaceInt32(DoubleToInt32(m.Value())); | 70 if (m.HasValue()) return ReplaceInt32(DoubleToInt32(m.Value())); |
| 71 if (m.IsChangeFloat64ToTagged()) { | 71 if (m.IsChangeFloat64ToTagged()) { |
| 72 return Change(node, machine()->TruncateFloat64ToInt32(), | 72 return Change(node, machine()->ChangeFloat64ToInt32(), |
| 73 m.node()->InputAt(0)); | 73 m.node()->InputAt(0)); |
| 74 } | 74 } |
| 75 if (m.IsChangeInt32ToTagged()) return Replace(m.node()->InputAt(0)); | 75 if (m.IsChangeInt32ToTagged()) return Replace(m.node()->InputAt(0)); |
| 76 break; | 76 break; |
| 77 } | 77 } |
| 78 case IrOpcode::kChangeTaggedToUint32: { | 78 case IrOpcode::kChangeTaggedToUint32: { |
| 79 Float64Matcher m(node->InputAt(0)); | 79 Float64Matcher m(node->InputAt(0)); |
| 80 if (m.HasValue()) return ReplaceUint32(DoubleToUint32(m.Value())); | 80 if (m.HasValue()) return ReplaceUint32(DoubleToUint32(m.Value())); |
| 81 if (m.IsChangeFloat64ToTagged()) { | 81 if (m.IsChangeFloat64ToTagged()) { |
| 82 return Change(node, machine()->TruncateFloat64ToInt32(), | 82 return Change(node, machine()->ChangeFloat64ToUint32(), |
| 83 m.node()->InputAt(0)); | 83 m.node()->InputAt(0)); |
| 84 } | 84 } |
| 85 if (m.IsChangeUint32ToTagged()) return Replace(m.node()->InputAt(0)); | 85 if (m.IsChangeUint32ToTagged()) return Replace(m.node()->InputAt(0)); |
| 86 break; | 86 break; |
| 87 } | 87 } |
| 88 case IrOpcode::kChangeUint32ToTagged: { | 88 case IrOpcode::kChangeUint32ToTagged: { |
| 89 Uint32Matcher m(node->InputAt(0)); | 89 Uint32Matcher m(node->InputAt(0)); |
| 90 if (m.HasValue()) return ReplaceNumber(FastUI2D(m.Value())); | 90 if (m.HasValue()) return ReplaceNumber(FastUI2D(m.Value())); |
| 91 break; | 91 break; |
| 92 } | 92 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 Graph* SimplifiedOperatorReducer::graph() const { return jsgraph()->graph(); } | 127 Graph* SimplifiedOperatorReducer::graph() const { return jsgraph()->graph(); } |
| 128 | 128 |
| 129 | 129 |
| 130 Heap* SimplifiedOperatorReducer::heap() const { | 130 Heap* SimplifiedOperatorReducer::heap() const { |
| 131 return jsgraph()->isolate()->heap(); | 131 return jsgraph()->isolate()->heap(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 } // namespace compiler | 134 } // namespace compiler |
| 135 } // namespace internal | 135 } // namespace internal |
| 136 } // namespace v8 | 136 } // namespace v8 |
| OLD | NEW |