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-lowering.h" | 5 #include "src/compiler/simplified-lowering.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1231 ElementAccess access = ElementAccessOf(node->op()); | 1231 ElementAccess access = ElementAccessOf(node->op()); |
1232 ProcessInput(node, 0, UseInfoForBasePointer(access)); // base | 1232 ProcessInput(node, 0, UseInfoForBasePointer(access)); // base |
1233 ProcessInput(node, 1, UseInfo::TruncatingWord32()); // index | 1233 ProcessInput(node, 1, UseInfo::TruncatingWord32()); // index |
1234 ProcessInput(node, 2, | 1234 ProcessInput(node, 2, |
1235 TruncatingUseInfoFromRepresentation( | 1235 TruncatingUseInfoFromRepresentation( |
1236 access.machine_type.representation())); // value | 1236 access.machine_type.representation())); // value |
1237 ProcessRemainingInputs(node, 3); | 1237 ProcessRemainingInputs(node, 3); |
1238 SetOutput(node, NodeOutputInfo::None()); | 1238 SetOutput(node, NodeOutputInfo::None()); |
1239 break; | 1239 break; |
1240 } | 1240 } |
1241 case IrOpcode::kObjectIsNumber: | 1241 case IrOpcode::kObjectIsNumber: { |
1242 case IrOpcode::kObjectIsReceiver: | |
1243 case IrOpcode::kObjectIsSmi: | |
1244 case IrOpcode::kObjectIsUndetectable: { | |
1245 ProcessInput(node, 0, UseInfo::AnyTagged()); | 1242 ProcessInput(node, 0, UseInfo::AnyTagged()); |
1246 SetOutput(node, NodeOutputInfo::Bool()); | 1243 SetOutput(node, NodeOutputInfo::Bool()); |
1247 break; | 1244 break; |
| 1245 } |
| 1246 case IrOpcode::kObjectIsReceiver: { |
| 1247 ProcessInput(node, 0, UseInfo::AnyTagged()); |
| 1248 SetOutput(node, NodeOutputInfo::Bool()); |
| 1249 break; |
| 1250 } |
| 1251 case IrOpcode::kObjectIsSmi: { |
| 1252 ProcessInput(node, 0, UseInfo::AnyTagged()); |
| 1253 SetOutput(node, NodeOutputInfo::Bool()); |
| 1254 break; |
1248 } | 1255 } |
1249 | 1256 |
1250 //------------------------------------------------------------------ | 1257 //------------------------------------------------------------------ |
1251 // Machine-level operators. | 1258 // Machine-level operators. |
1252 //------------------------------------------------------------------ | 1259 //------------------------------------------------------------------ |
1253 case IrOpcode::kLoad: { | 1260 case IrOpcode::kLoad: { |
1254 // TODO(jarin) Eventually, we should get rid of all machine stores | 1261 // TODO(jarin) Eventually, we should get rid of all machine stores |
1255 // from the high-level phases, then this becomes UNREACHABLE. | 1262 // from the high-level phases, then this becomes UNREACHABLE. |
1256 LoadRepresentation rep = LoadRepresentationOf(node->op()); | 1263 LoadRepresentation rep = LoadRepresentationOf(node->op()); |
1257 ProcessInput(node, 0, UseInfo::AnyTagged()); // tagged pointer | 1264 ProcessInput(node, 0, UseInfo::AnyTagged()); // tagged pointer |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1901 ReplaceEffectUses(node, comparison); | 1908 ReplaceEffectUses(node, comparison); |
1902 node->ReplaceInput(0, comparison); | 1909 node->ReplaceInput(0, comparison); |
1903 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); | 1910 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); |
1904 node->TrimInputCount(2); | 1911 node->TrimInputCount(2); |
1905 NodeProperties::ChangeOp(node, machine()->IntLessThanOrEqual()); | 1912 NodeProperties::ChangeOp(node, machine()->IntLessThanOrEqual()); |
1906 } | 1913 } |
1907 | 1914 |
1908 } // namespace compiler | 1915 } // namespace compiler |
1909 } // namespace internal | 1916 } // namespace internal |
1910 } // namespace v8 | 1917 } // namespace v8 |
OLD | NEW |