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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 if (m.HasValue()) return ReplaceInt32(m.Value()->BooleanValue()); | 60 if (m.HasValue()) return ReplaceInt32(m.Value()->BooleanValue()); |
61 if (m.IsChangeBitToTagged()) return Replace(m.InputAt(0)); | 61 if (m.IsChangeBitToTagged()) return Replace(m.InputAt(0)); |
62 break; | 62 break; |
63 } | 63 } |
64 case IrOpcode::kChangeFloat64ToTagged: { | 64 case IrOpcode::kChangeFloat64ToTagged: { |
65 Float64Matcher m(node->InputAt(0)); | 65 Float64Matcher m(node->InputAt(0)); |
66 if (m.HasValue()) return ReplaceNumber(m.Value()); | 66 if (m.HasValue()) return ReplaceNumber(m.Value()); |
67 if (m.IsChangeTaggedToFloat64()) return Replace(m.node()->InputAt(0)); | 67 if (m.IsChangeTaggedToFloat64()) return Replace(m.node()->InputAt(0)); |
68 break; | 68 break; |
69 } | 69 } |
70 case IrOpcode::kChangeInt31ToTaggedSigned: | 70 case IrOpcode::kChangeInt31ToTaggedSigned: { |
71 Int32Matcher m(node->InputAt(0)); | |
Michael Starzinger
2016/08/22 12:59:46
nit: Seems like a copy of the below, why the expan
mvstanton
2016/08/24 16:06:28
Done.
| |
72 if (m.HasValue()) return ReplaceNumber(m.Value()); | |
73 if (m.IsChangeTaggedToInt32() || m.IsChangeTaggedSignedToInt32()) { | |
74 return Replace(m.InputAt(0)); | |
75 } | |
76 break; | |
77 } | |
71 case IrOpcode::kChangeInt32ToTagged: { | 78 case IrOpcode::kChangeInt32ToTagged: { |
72 Int32Matcher m(node->InputAt(0)); | 79 Int32Matcher m(node->InputAt(0)); |
73 if (m.HasValue()) return ReplaceNumber(m.Value()); | 80 if (m.HasValue()) return ReplaceNumber(m.Value()); |
74 if (m.IsChangeTaggedToInt32() || m.IsChangeTaggedSignedToInt32()) { | 81 if (m.IsChangeTaggedToInt32() || m.IsChangeTaggedSignedToInt32()) { |
75 return Replace(m.InputAt(0)); | 82 return Replace(m.InputAt(0)); |
76 } | 83 } |
77 break; | 84 break; |
78 } | 85 } |
79 case IrOpcode::kChangeTaggedToFloat64: | 86 case IrOpcode::kChangeTaggedToFloat64: |
80 case IrOpcode::kTruncateTaggedToFloat64: { | 87 case IrOpcode::kTruncateTaggedToFloat64: { |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
233 return jsgraph()->isolate(); | 240 return jsgraph()->isolate(); |
234 } | 241 } |
235 | 242 |
236 MachineOperatorBuilder* SimplifiedOperatorReducer::machine() const { | 243 MachineOperatorBuilder* SimplifiedOperatorReducer::machine() const { |
237 return jsgraph()->machine(); | 244 return jsgraph()->machine(); |
238 } | 245 } |
239 | 246 |
240 } // namespace compiler | 247 } // namespace compiler |
241 } // namespace internal | 248 } // namespace internal |
242 } // namespace v8 | 249 } // namespace v8 |
OLD | NEW |