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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 void VisitInt64Binop(Node* node) { VisitBinop(node, kMachInt64, kMachInt64); } | 292 void VisitInt64Binop(Node* node) { VisitBinop(node, kMachInt64, kMachInt64); } |
293 void VisitUint64Binop(Node* node) { | 293 void VisitUint64Binop(Node* node) { |
294 VisitBinop(node, kMachUint64, kMachUint64); | 294 VisitBinop(node, kMachUint64, kMachUint64); |
295 } | 295 } |
296 void VisitFloat64Cmp(Node* node) { VisitBinop(node, kMachFloat64, kRepBit); } | 296 void VisitFloat64Cmp(Node* node) { VisitBinop(node, kMachFloat64, kRepBit); } |
297 void VisitInt32Cmp(Node* node) { VisitBinop(node, kMachInt32, kRepBit); } | 297 void VisitInt32Cmp(Node* node) { VisitBinop(node, kMachInt32, kRepBit); } |
298 void VisitUint32Cmp(Node* node) { VisitBinop(node, kMachUint32, kRepBit); } | 298 void VisitUint32Cmp(Node* node) { VisitBinop(node, kMachUint32, kRepBit); } |
299 void VisitInt64Cmp(Node* node) { VisitBinop(node, kMachInt64, kRepBit); } | 299 void VisitInt64Cmp(Node* node) { VisitBinop(node, kMachInt64, kRepBit); } |
300 void VisitUint64Cmp(Node* node) { VisitBinop(node, kMachUint64, kRepBit); } | 300 void VisitUint64Cmp(Node* node) { VisitBinop(node, kMachUint64, kRepBit); } |
301 | 301 |
| 302 // Helper for handling selects. |
| 303 // TODO(turbofan): Share some code with VisitPhi() below? |
| 304 void VisitSelect(Node* node, MachineTypeUnion use, |
| 305 SimplifiedLowering* lowering) { |
| 306 ProcessInput(node, 0, kRepBit); |
| 307 |
| 308 // Selects adapt to the output representation their uses demand, pushing |
| 309 // representation changes to their inputs. |
| 310 Type* upper = NodeProperties::GetBounds(node).upper; |
| 311 MachineType output = kMachNone; |
| 312 MachineType propagate = kMachNone; |
| 313 |
| 314 if (upper->Is(Type::Signed32()) || upper->Is(Type::Unsigned32())) { |
| 315 // legal = kRepTagged | kRepFloat64 | kRepWord32; |
| 316 if ((use & kRepMask) == kRepTagged) { |
| 317 // only tagged uses. |
| 318 output = kRepTagged; |
| 319 propagate = kRepTagged; |
| 320 } else if ((use & kRepMask) == kRepFloat64) { |
| 321 // only float64 uses. |
| 322 output = kRepFloat64; |
| 323 propagate = kRepFloat64; |
| 324 } else { |
| 325 // multiple uses. |
| 326 output = kRepWord32; |
| 327 propagate = kRepWord32; |
| 328 } |
| 329 } else if (upper->Is(Type::Boolean())) { |
| 330 // legal = kRepTagged | kRepBit; |
| 331 if ((use & kRepMask) == kRepTagged) { |
| 332 // only tagged uses. |
| 333 output = kRepTagged; |
| 334 propagate = kRepTagged; |
| 335 } else { |
| 336 // multiple uses. |
| 337 output = kRepBit; |
| 338 propagate = kRepBit; |
| 339 } |
| 340 } else if (upper->Is(Type::Number())) { |
| 341 // legal = kRepTagged | kRepFloat64; |
| 342 if ((use & kRepMask) == kRepTagged) { |
| 343 // only tagged uses. |
| 344 output = kRepTagged; |
| 345 propagate = kRepTagged; |
| 346 } else { |
| 347 // multiple uses. |
| 348 output = kRepFloat64; |
| 349 propagate = kRepFloat64; |
| 350 } |
| 351 } else { |
| 352 // legal = kRepTagged; |
| 353 output = kRepTagged; |
| 354 propagate = kRepTagged; |
| 355 } |
| 356 |
| 357 MachineType output_type = |
| 358 static_cast<MachineType>(changer_->TypeFromUpperBound(upper) | output); |
| 359 SetOutput(node, output_type); |
| 360 |
| 361 if (lower()) { |
| 362 // Update the select operator. |
| 363 SelectParameters p = SelectParametersOf(node->op()); |
| 364 MachineType type = static_cast<MachineType>(output_type); |
| 365 if (type != p.type()) { |
| 366 node->set_op(lowering->common()->Select(type, p.hint())); |
| 367 } |
| 368 |
| 369 // Convert inputs to the output representation of this select. |
| 370 ProcessInput(node, 1, output_type); |
| 371 ProcessInput(node, 2, output_type); |
| 372 } else { |
| 373 // Propagate {use} of the select to value inputs. |
| 374 MachineType use_type = |
| 375 static_cast<MachineType>((use & kTypeMask) | propagate); |
| 376 ProcessInput(node, 1, use_type); |
| 377 ProcessInput(node, 2, use_type); |
| 378 } |
| 379 } |
| 380 |
302 // Helper for handling phis. | 381 // Helper for handling phis. |
303 void VisitPhi(Node* node, MachineTypeUnion use, | 382 void VisitPhi(Node* node, MachineTypeUnion use, |
304 SimplifiedLowering* lowering) { | 383 SimplifiedLowering* lowering) { |
305 // Phis adapt to the output representation their uses demand, pushing | 384 // Phis adapt to the output representation their uses demand, pushing |
306 // representation changes to their inputs. | 385 // representation changes to their inputs. |
307 Type* upper = NodeProperties::GetBounds(node).upper; | 386 Type* upper = NodeProperties::GetBounds(node).upper; |
308 MachineType output = kMachNone; | 387 MachineType output = kMachNone; |
309 MachineType propagate = kMachNone; | 388 MachineType propagate = kMachNone; |
310 | 389 |
311 if (upper->Is(Type::Signed32()) || upper->Is(Type::Unsigned32())) { | 390 if (upper->Is(Type::Signed32()) || upper->Is(Type::Unsigned32())) { |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 case IrOpcode::kIfFalse: | 553 case IrOpcode::kIfFalse: |
475 case IrOpcode::kReturn: | 554 case IrOpcode::kReturn: |
476 case IrOpcode::kMerge: | 555 case IrOpcode::kMerge: |
477 case IrOpcode::kThrow: | 556 case IrOpcode::kThrow: |
478 return VisitInputs(node); // default visit for all node inputs. | 557 return VisitInputs(node); // default visit for all node inputs. |
479 | 558 |
480 case IrOpcode::kBranch: | 559 case IrOpcode::kBranch: |
481 ProcessInput(node, 0, kRepBit); | 560 ProcessInput(node, 0, kRepBit); |
482 Enqueue(NodeProperties::GetControlInput(node, 0)); | 561 Enqueue(NodeProperties::GetControlInput(node, 0)); |
483 break; | 562 break; |
| 563 case IrOpcode::kSelect: |
| 564 return VisitSelect(node, use, lowering); |
484 case IrOpcode::kPhi: | 565 case IrOpcode::kPhi: |
485 return VisitPhi(node, use, lowering); | 566 return VisitPhi(node, use, lowering); |
486 | 567 |
487 //------------------------------------------------------------------ | 568 //------------------------------------------------------------------ |
488 // JavaScript operators. | 569 // JavaScript operators. |
489 //------------------------------------------------------------------ | 570 //------------------------------------------------------------------ |
490 // For now, we assume that all JS operators were too complex to lower | 571 // For now, we assume that all JS operators were too complex to lower |
491 // to Simplified and that they will always require tagged value inputs | 572 // to Simplified and that they will always require tagged value inputs |
492 // and produce tagged value outputs. | 573 // and produce tagged value outputs. |
493 // TODO(turbofan): it might be possible to lower some JSOperators here, | 574 // TODO(turbofan): it might be possible to lower some JSOperators here, |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1050 WriteBarrierKind kind = ComputeWriteBarrierKind( | 1131 WriteBarrierKind kind = ComputeWriteBarrierKind( |
1051 access.base_is_tagged, access.machine_type, access.type); | 1132 access.base_is_tagged, access.machine_type, access.type); |
1052 node->set_op( | 1133 node->set_op( |
1053 machine()->Store(StoreRepresentation(access.machine_type, kind))); | 1134 machine()->Store(StoreRepresentation(access.machine_type, kind))); |
1054 Node* offset = jsgraph()->Int32Constant(access.offset - access.tag()); | 1135 Node* offset = jsgraph()->Int32Constant(access.offset - access.tag()); |
1055 node->InsertInput(zone(), 1, offset); | 1136 node->InsertInput(zone(), 1, offset); |
1056 } | 1137 } |
1057 | 1138 |
1058 | 1139 |
1059 Node* SimplifiedLowering::ComputeIndex(const ElementAccess& access, | 1140 Node* SimplifiedLowering::ComputeIndex(const ElementAccess& access, |
1060 Node* index) { | 1141 Node* const key) { |
1061 int element_size = ElementSizeOf(access.machine_type); | 1142 Node* index = key; |
| 1143 const int element_size = ElementSizeOf(access.machine_type); |
1062 if (element_size != 1) { | 1144 if (element_size != 1) { |
1063 index = graph()->NewNode(machine()->Int32Mul(), | 1145 index = graph()->NewNode(machine()->Int32Mul(), index, |
1064 jsgraph()->Int32Constant(element_size), index); | 1146 jsgraph()->Int32Constant(element_size)); |
1065 } | 1147 } |
1066 int fixed_offset = access.header_size - access.tag(); | 1148 const int fixed_offset = access.header_size - access.tag(); |
1067 if (fixed_offset == 0) return index; | 1149 if (fixed_offset != 0) { |
1068 return graph()->NewNode(machine()->Int32Add(), index, | 1150 index = graph()->NewNode(machine()->Int32Add(), index, |
1069 jsgraph()->Int32Constant(fixed_offset)); | 1151 jsgraph()->Int32Constant(fixed_offset)); |
| 1152 } |
| 1153 // TODO(bmeurer): 64-Bit |
| 1154 // if (machine()->Is64()) { |
| 1155 // index = graph()->NewNode(machine()->ChangeInt32ToInt64(), index); |
| 1156 // } |
| 1157 return index; |
1070 } | 1158 } |
1071 | 1159 |
1072 | 1160 |
| 1161 namespace { |
| 1162 |
| 1163 intptr_t AddressForOutOfBoundsLoad(MachineType type) { |
| 1164 switch (RepresentationOf(type)) { |
| 1165 case kRepFloat32: { |
| 1166 static const float dummy = std::numeric_limits<float>::quiet_NaN(); |
| 1167 return bit_cast<intptr_t>(&dummy); |
| 1168 } |
| 1169 case kRepFloat64: { |
| 1170 static const double dummy = std::numeric_limits<double>::quiet_NaN(); |
| 1171 return bit_cast<intptr_t>(&dummy); |
| 1172 } |
| 1173 case kRepBit: |
| 1174 case kRepWord8: |
| 1175 case kRepWord16: |
| 1176 case kRepWord32: { |
| 1177 static const int32_t dummy = 0; |
| 1178 return bit_cast<intptr_t>(&dummy); |
| 1179 } |
| 1180 default: |
| 1181 break; |
| 1182 } |
| 1183 UNREACHABLE(); |
| 1184 return 0; |
| 1185 } |
| 1186 |
| 1187 |
| 1188 intptr_t AddressForOutOfBoundsStore() { |
| 1189 static volatile double dummy = 0; |
| 1190 return bit_cast<intptr_t>(&dummy); |
| 1191 } |
| 1192 |
| 1193 } // namespace |
| 1194 |
| 1195 |
1073 void SimplifiedLowering::DoLoadElement(Node* node, MachineType output_type) { | 1196 void SimplifiedLowering::DoLoadElement(Node* node, MachineType output_type) { |
1074 const ElementAccess& access = ElementAccessOf(node->op()); | 1197 const ElementAccess& access = ElementAccessOf(node->op()); |
1075 const Operator* op = machine()->Load(access.machine_type); | 1198 const Operator* op = machine()->Load(access.machine_type); |
1076 Node* key = node->InputAt(1); | 1199 Node* key = node->InputAt(1); |
| 1200 Node* index = ComputeIndex(access, key); |
1077 Node* effect = node->InputAt(3); | 1201 Node* effect = node->InputAt(3); |
1078 Node* index = ComputeIndex(access, key); | |
1079 if (access.bounds_check == kNoBoundsCheck) { | 1202 if (access.bounds_check == kNoBoundsCheck) { |
1080 DCHECK_EQ(access.machine_type, output_type); | 1203 DCHECK_EQ(access.machine_type, output_type); |
1081 node->set_op(op); | 1204 node->set_op(op); |
1082 node->ReplaceInput(1, index); | 1205 node->ReplaceInput(1, index); |
1083 node->ReplaceInput(2, effect); | 1206 node->ReplaceInput(2, effect); |
1084 node->ReplaceInput(3, graph()->start()); | 1207 node->ReplaceInput(3, graph()->start()); |
1085 } else { | 1208 } else { |
1086 DCHECK_EQ(kTypedArrayBoundsCheck, access.bounds_check); | 1209 DCHECK_EQ(kTypedArrayBoundsCheck, access.bounds_check); |
1087 | 1210 |
1088 Node* base = node->InputAt(0); | 1211 Node* base = node->InputAt(0); |
1089 Node* length = node->InputAt(2); | 1212 Node* length = node->InputAt(2); |
| 1213 Node* check = graph()->NewNode(machine()->Uint32LessThan(), key, length); |
1090 | 1214 |
1091 Node* check = graph()->NewNode(machine()->Uint32LessThan(), key, length); | 1215 IntPtrMatcher mbase(base); |
1092 Node* branch = graph()->NewNode(common()->Branch(BranchHint::kTrue), check, | 1216 if (mbase.HasValue() && (output_type & kRepTagged) == 0) { |
1093 graph()->start()); | 1217 Node* select = graph()->NewNode( |
| 1218 common()->Select(kMachIntPtr, BranchHint::kTrue), check, index, |
| 1219 jsgraph()->IntPtrConstant(AddressForOutOfBoundsLoad(output_type) - |
| 1220 mbase.Value())); |
1094 | 1221 |
1095 Node* if_true = graph()->NewNode(common()->IfTrue(), branch); | 1222 node->set_op(op); |
1096 Node* load = graph()->NewNode(op, base, index, effect, if_true); | 1223 node->ReplaceInput(1, select); |
1097 Node* result = load; | 1224 node->ReplaceInput(2, effect); |
1098 if (output_type & kRepTagged) { | 1225 node->ReplaceInput(3, graph()->start()); |
1099 // TODO(turbofan): This is ugly as hell! | 1226 } else { |
1100 SimplifiedOperatorBuilder simplified(graph()->zone()); | 1227 Node* branch = graph()->NewNode(common()->Branch(BranchHint::kTrue), |
1101 RepresentationChanger changer(jsgraph(), &simplified, | 1228 check, graph()->start()); |
1102 graph()->zone()->isolate()); | 1229 |
1103 result = changer.GetTaggedRepresentationFor(result, access.machine_type); | 1230 Node* if_true = graph()->NewNode(common()->IfTrue(), branch); |
| 1231 Node* load = graph()->NewNode(op, base, index, effect, if_true); |
| 1232 Node* result = load; |
| 1233 if (output_type & kRepTagged) { |
| 1234 // TODO(turbofan): This is ugly as hell! |
| 1235 SimplifiedOperatorBuilder simplified(graph()->zone()); |
| 1236 RepresentationChanger changer(jsgraph(), &simplified, |
| 1237 graph()->zone()->isolate()); |
| 1238 result = |
| 1239 changer.GetTaggedRepresentationFor(result, access.machine_type); |
| 1240 } |
| 1241 |
| 1242 Node* if_false = graph()->NewNode(common()->IfFalse(), branch); |
| 1243 Node* undefined; |
| 1244 if (output_type & kRepTagged) { |
| 1245 DCHECK_EQ(0, access.machine_type & kRepTagged); |
| 1246 undefined = jsgraph()->UndefinedConstant(); |
| 1247 } else if (output_type & kRepFloat32) { |
| 1248 undefined = |
| 1249 jsgraph()->Float32Constant(std::numeric_limits<float>::quiet_NaN()); |
| 1250 } else if (output_type & kRepFloat64) { |
| 1251 undefined = jsgraph()->Float64Constant( |
| 1252 std::numeric_limits<double>::quiet_NaN()); |
| 1253 } else { |
| 1254 undefined = jsgraph()->Int32Constant(0); |
| 1255 } |
| 1256 |
| 1257 Node* merge = graph()->NewNode(common()->Merge(2), if_true, if_false); |
| 1258 Node* phi = graph()->NewNode(common()->EffectPhi(2), load, effect, merge); |
| 1259 |
| 1260 // Replace effect uses of node with the effect phi. |
| 1261 for (UseIter i = node->uses().begin(); i != node->uses().end();) { |
| 1262 if (NodeProperties::IsEffectEdge(i.edge())) { |
| 1263 i = i.UpdateToAndIncrement(phi); |
| 1264 } else { |
| 1265 ++i; |
| 1266 } |
| 1267 } |
| 1268 |
| 1269 node->set_op(common()->Phi(output_type, 2)); |
| 1270 node->ReplaceInput(0, result); |
| 1271 node->ReplaceInput(1, undefined); |
| 1272 node->ReplaceInput(2, merge); |
| 1273 node->TrimInputCount(3); |
1104 } | 1274 } |
1105 | |
1106 Node* if_false = graph()->NewNode(common()->IfFalse(), branch); | |
1107 Node* undefined; | |
1108 if (output_type & kRepTagged) { | |
1109 DCHECK(!(access.machine_type & kRepTagged)); | |
1110 undefined = jsgraph()->UndefinedConstant(); | |
1111 } else if (output_type & kRepFloat32) { | |
1112 undefined = | |
1113 jsgraph()->Float32Constant(std::numeric_limits<float>::quiet_NaN()); | |
1114 } else if (output_type & kRepFloat64) { | |
1115 undefined = | |
1116 jsgraph()->Float64Constant(std::numeric_limits<double>::quiet_NaN()); | |
1117 } else { | |
1118 undefined = jsgraph()->Int32Constant(0); | |
1119 } | |
1120 | |
1121 Node* merge = graph()->NewNode(common()->Merge(2), if_true, if_false); | |
1122 Node* phi = graph()->NewNode(common()->EffectPhi(2), load, effect, merge); | |
1123 | |
1124 // Replace effect uses of node with the effect phi. | |
1125 for (UseIter i = node->uses().begin(); i != node->uses().end();) { | |
1126 if (NodeProperties::IsEffectEdge(i.edge())) { | |
1127 i = i.UpdateToAndIncrement(phi); | |
1128 } else { | |
1129 ++i; | |
1130 } | |
1131 } | |
1132 | |
1133 node->set_op(common()->Phi(output_type, 2)); | |
1134 node->ReplaceInput(0, result); | |
1135 node->ReplaceInput(1, undefined); | |
1136 node->ReplaceInput(2, merge); | |
1137 node->TrimInputCount(3); | |
1138 } | 1275 } |
1139 } | 1276 } |
1140 | 1277 |
1141 | 1278 |
1142 void SimplifiedLowering::DoStoreElement(Node* node) { | 1279 void SimplifiedLowering::DoStoreElement(Node* node) { |
1143 const ElementAccess& access = ElementAccessOf(node->op()); | 1280 const ElementAccess& access = ElementAccessOf(node->op()); |
1144 const Operator* op = machine()->Store(StoreRepresentation( | 1281 const Operator* op = machine()->Store(StoreRepresentation( |
1145 access.machine_type, | 1282 access.machine_type, |
1146 ComputeWriteBarrierKind(access.base_is_tagged, access.machine_type, | 1283 ComputeWriteBarrierKind(access.base_is_tagged, access.machine_type, |
1147 access.type))); | 1284 access.type))); |
1148 Node* key = node->InputAt(1); | 1285 Node* key = node->InputAt(1); |
1149 Node* index = ComputeIndex(access, key); | 1286 Node* index = ComputeIndex(access, key); |
1150 if (access.bounds_check == kNoBoundsCheck) { | 1287 if (access.bounds_check == kNoBoundsCheck) { |
1151 node->set_op(op); | 1288 node->set_op(op); |
1152 node->ReplaceInput(1, index); | 1289 node->ReplaceInput(1, index); |
1153 node->RemoveInput(2); | 1290 node->RemoveInput(2); |
1154 } else { | 1291 } else { |
1155 DCHECK_EQ(kTypedArrayBoundsCheck, access.bounds_check); | 1292 DCHECK_EQ(kTypedArrayBoundsCheck, access.bounds_check); |
1156 | 1293 |
1157 Node* base = node->InputAt(0); | 1294 Node* base = node->InputAt(0); |
1158 Node* length = node->InputAt(2); | 1295 Node* length = node->InputAt(2); |
1159 Node* value = node->InputAt(3); | 1296 Node* value = node->InputAt(3); |
1160 Node* effect = node->InputAt(4); | 1297 Node* effect = node->InputAt(4); |
1161 Node* control = node->InputAt(5); | 1298 Node* control = node->InputAt(5); |
| 1299 Node* check = graph()->NewNode(machine()->Uint32LessThan(), key, length); |
1162 | 1300 |
1163 Node* check = graph()->NewNode(machine()->Uint32LessThan(), key, length); | 1301 IntPtrMatcher mbase(base); |
1164 Node* branch = | 1302 if (mbase.HasValue()) { |
1165 graph()->NewNode(common()->Branch(BranchHint::kTrue), check, control); | 1303 Node* select = graph()->NewNode( |
| 1304 common()->Select(kMachIntPtr, BranchHint::kTrue), check, index, |
| 1305 jsgraph()->IntPtrConstant(AddressForOutOfBoundsStore() - |
| 1306 mbase.Value())); |
1166 | 1307 |
1167 Node* if_true = graph()->NewNode(common()->IfTrue(), branch); | 1308 node->set_op(op); |
1168 Node* store = graph()->NewNode(op, base, index, value, effect, if_true); | 1309 node->ReplaceInput(1, select); |
| 1310 node->RemoveInput(2); |
| 1311 } else { |
| 1312 Node* branch = |
| 1313 graph()->NewNode(common()->Branch(BranchHint::kTrue), check, control); |
1169 | 1314 |
1170 Node* if_false = graph()->NewNode(common()->IfFalse(), branch); | 1315 Node* if_true = graph()->NewNode(common()->IfTrue(), branch); |
| 1316 Node* store = graph()->NewNode(op, base, index, value, effect, if_true); |
1171 | 1317 |
1172 Node* merge = graph()->NewNode(common()->Merge(2), if_true, if_false); | 1318 Node* if_false = graph()->NewNode(common()->IfFalse(), branch); |
1173 | 1319 |
1174 node->set_op(common()->EffectPhi(2)); | 1320 Node* merge = graph()->NewNode(common()->Merge(2), if_true, if_false); |
1175 node->ReplaceInput(0, store); | 1321 |
1176 node->ReplaceInput(1, effect); | 1322 node->set_op(common()->EffectPhi(2)); |
1177 node->ReplaceInput(2, merge); | 1323 node->ReplaceInput(0, store); |
1178 node->TrimInputCount(3); | 1324 node->ReplaceInput(1, effect); |
| 1325 node->ReplaceInput(2, merge); |
| 1326 node->TrimInputCount(3); |
| 1327 } |
1179 } | 1328 } |
1180 } | 1329 } |
1181 | 1330 |
1182 | 1331 |
1183 void SimplifiedLowering::DoStringAdd(Node* node) { | 1332 void SimplifiedLowering::DoStringAdd(Node* node) { |
1184 Callable callable = CodeFactory::StringAdd( | 1333 Callable callable = CodeFactory::StringAdd( |
1185 zone()->isolate(), STRING_ADD_CHECK_NONE, NOT_TENURED); | 1334 zone()->isolate(), STRING_ADD_CHECK_NONE, NOT_TENURED); |
1186 CallDescriptor::Flags flags = CallDescriptor::kNoFlags; | 1335 CallDescriptor::Flags flags = CallDescriptor::kNoFlags; |
1187 CallDescriptor* desc = | 1336 CallDescriptor* desc = |
1188 Linkage::GetStubCallDescriptor(callable.descriptor(), 0, flags, zone()); | 1337 Linkage::GetStubCallDescriptor(callable.descriptor(), 0, flags, zone()); |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1368 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); | 1517 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); |
1369 } | 1518 } |
1370 | 1519 |
1371 | 1520 |
1372 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { | 1521 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { |
1373 node->set_op(machine()->IntLessThanOrEqual()); | 1522 node->set_op(machine()->IntLessThanOrEqual()); |
1374 node->ReplaceInput(0, StringComparison(node, true)); | 1523 node->ReplaceInput(0, StringComparison(node, true)); |
1375 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); | 1524 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); |
1376 } | 1525 } |
1377 | 1526 |
1378 | |
1379 } // namespace compiler | 1527 } // namespace compiler |
1380 } // namespace internal | 1528 } // namespace internal |
1381 } // namespace v8 | 1529 } // namespace v8 |
OLD | NEW |