Lines Matching refs:instr
473 void LChunk::AddInstruction(LInstruction* instr, HBasicBlock* block) { in AddInstruction() argument
476 if (instr->IsControl()) { in AddInstruction()
479 instructions_.Add(instr); in AddInstruction()
482 instructions_.Add(instr); in AddInstruction()
485 if (instr->HasPointerMap()) { in AddInstruction()
486 pointer_maps_.Add(instr->pointer_map()); in AddInstruction()
487 instr->pointer_map()->set_lithium_position(index); in AddInstruction()
666 HInstruction* instr = HInstruction::cast(value); in Use() local
667 VisitInstruction(instr); in Use()
675 LInstruction* LChunkBuilder::Define(LTemplateInstruction<1, I, T>* instr, in Define() argument
678 instr->set_result(result); in Define()
679 return instr; in Define()
685 LTemplateInstruction<1, I, T>* instr) { in DefineAsRegister() argument
686 return Define(instr, in DefineAsRegister()
693 LTemplateInstruction<1, I, T>* instr, in DefineAsSpilled() argument
695 return Define(instr, in DefineAsSpilled()
702 LTemplateInstruction<1, I, T>* instr) { in DefineSameAsFirst() argument
703 return Define(instr, in DefineSameAsFirst()
709 LInstruction* LChunkBuilder::DefineFixed(LTemplateInstruction<1, I, T>* instr, in DefineFixed() argument
711 return Define(instr, ToUnallocated(reg)); in DefineFixed()
717 LTemplateInstruction<1, I, T>* instr, in DefineFixedDouble() argument
719 return Define(instr, ToUnallocated(reg)); in DefineFixedDouble()
723 LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) { in AssignEnvironment() argument
726 instr->set_environment(CreateEnvironment(hydrogen_env, in AssignEnvironment()
728 return instr; in AssignEnvironment()
733 LInstruction* instr, int ast_id) { in SetInstructionPendingDeoptimizationEnvironment() argument
736 instruction_pending_deoptimization_environment_ = instr; in SetInstructionPendingDeoptimizationEnvironment()
738 return instr; in SetInstructionPendingDeoptimizationEnvironment()
748 LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr, in MarkAsCall() argument
752 instr->VerifyCall(); in MarkAsCall()
754 instr->MarkAsCall(); in MarkAsCall()
755 instr = AssignPointerMap(instr); in MarkAsCall()
760 instr = SetInstructionPendingDeoptimizationEnvironment( in MarkAsCall()
761 instr, sim->ast_id()); in MarkAsCall()
771 if (needs_environment && !instr->HasEnvironment()) { in MarkAsCall()
772 instr = AssignEnvironment(instr); in MarkAsCall()
775 return instr; in MarkAsCall()
779 LInstruction* LChunkBuilder::MarkAsSaveDoubles(LInstruction* instr) { in MarkAsSaveDoubles() argument
780 instr->MarkAsSaveDoubles(); in MarkAsSaveDoubles()
781 return instr; in MarkAsSaveDoubles()
785 LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) { in AssignPointerMap() argument
786 ASSERT(!instr->HasPointerMap()); in AssignPointerMap()
787 instr->set_pointer_map(new(zone()) LPointerMap(position_)); in AssignPointerMap()
788 return instr; in AssignPointerMap()
817 LInstruction* LChunkBuilder::DoBlockEntry(HBlockEntry* instr) { in DoBlockEntry() argument
818 return new(zone()) LLabel(instr->block()); in DoBlockEntry()
822 LInstruction* LChunkBuilder::DoSoftDeoptimize(HSoftDeoptimize* instr) { in DoSoftDeoptimize() argument
827 LInstruction* LChunkBuilder::DoDeoptimize(HDeoptimize* instr) { in DoDeoptimize() argument
833 HBitwiseBinaryOperation* instr) { in DoShift() argument
834 if (instr->representation().IsTagged()) { in DoShift()
835 ASSERT(instr->left()->representation().IsTagged()); in DoShift()
836 ASSERT(instr->right()->representation().IsTagged()); in DoShift()
838 LOperand* context = UseFixed(instr->context(), esi); in DoShift()
839 LOperand* left = UseFixed(instr->left(), edx); in DoShift()
840 LOperand* right = UseFixed(instr->right(), eax); in DoShift()
842 return MarkAsCall(DefineFixed(result, eax), instr); in DoShift()
845 ASSERT(instr->representation().IsInteger32()); in DoShift()
846 ASSERT(instr->left()->representation().IsInteger32()); in DoShift()
847 ASSERT(instr->right()->representation().IsInteger32()); in DoShift()
848 LOperand* left = UseRegisterAtStart(instr->left()); in DoShift()
850 HValue* right_value = instr->right(); in DoShift()
866 for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) { in DoShift()
881 HArithmeticBinaryOperation* instr) { in DoArithmeticD() argument
882 ASSERT(instr->representation().IsDouble()); in DoArithmeticD()
883 ASSERT(instr->left()->representation().IsDouble()); in DoArithmeticD()
884 ASSERT(instr->right()->representation().IsDouble()); in DoArithmeticD()
886 LOperand* left = UseRegisterAtStart(instr->left()); in DoArithmeticD()
887 LOperand* right = UseRegisterAtStart(instr->right()); in DoArithmeticD()
894 HArithmeticBinaryOperation* instr) { in DoArithmeticT() argument
900 HValue* left = instr->left(); in DoArithmeticT()
901 HValue* right = instr->right(); in DoArithmeticT()
904 LOperand* context = UseFixed(instr->context(), esi); in DoArithmeticT()
909 return MarkAsCall(DefineFixed(result, eax), instr); in DoArithmeticT()
980 LInstruction* instr = current->CompileToLithium(this); in VisitInstruction() local
982 if (instr != NULL) { in VisitInstruction()
983 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { in VisitInstruction()
984 instr = AssignPointerMap(instr); in VisitInstruction()
986 if (FLAG_stress_environments && !instr->HasEnvironment()) { in VisitInstruction()
987 instr = AssignEnvironment(instr); in VisitInstruction()
989 instr->set_hydrogen_value(current); in VisitInstruction()
990 chunk_->AddInstruction(instr, current_block_); in VisitInstruction()
1039 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { in DoGoto() argument
1040 return new(zone()) LGoto(instr->FirstSuccessor()->block_id()); in DoGoto()
1044 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { in DoBranch() argument
1045 HValue* value = instr->value(); in DoBranch()
1050 ? instr->FirstSuccessor() in DoBranch()
1051 : instr->SecondSuccessor(); in DoBranch()
1063 ToBooleanStub::Types expected = instr->expected_input_types(); in DoBranch()
1073 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) { in DoCompareMap() argument
1074 ASSERT(instr->value()->representation().IsTagged()); in DoCompareMap()
1075 LOperand* value = UseRegisterAtStart(instr->value()); in DoCompareMap()
1090 LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) { in DoInstanceOf() argument
1091 LOperand* left = UseFixed(instr->left(), InstanceofStub::left()); in DoInstanceOf()
1092 LOperand* right = UseFixed(instr->right(), InstanceofStub::right()); in DoInstanceOf()
1093 LOperand* context = UseFixed(instr->context(), esi); in DoInstanceOf()
1095 return MarkAsCall(DefineFixed(result, eax), instr); in DoInstanceOf()
1100 HInstanceOfKnownGlobal* instr) { in DoInstanceOfKnownGlobal() argument
1103 UseFixed(instr->context(), esi), in DoInstanceOfKnownGlobal()
1104 UseFixed(instr->left(), InstanceofStub::left()), in DoInstanceOfKnownGlobal()
1106 return MarkAsCall(DefineFixed(result, eax), instr); in DoInstanceOfKnownGlobal()
1110 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { in DoWrapReceiver() argument
1111 LOperand* receiver = UseRegister(instr->receiver()); in DoWrapReceiver()
1112 LOperand* function = UseRegisterAtStart(instr->function()); in DoWrapReceiver()
1120 LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) { in DoApplyArguments() argument
1121 LOperand* function = UseFixed(instr->function(), edi); in DoApplyArguments()
1122 LOperand* receiver = UseFixed(instr->receiver(), eax); in DoApplyArguments()
1123 LOperand* length = UseFixed(instr->length(), ebx); in DoApplyArguments()
1124 LOperand* elements = UseFixed(instr->elements(), ecx); in DoApplyArguments()
1129 return MarkAsCall(DefineFixed(result, eax), instr, CAN_DEOPTIMIZE_EAGERLY); in DoApplyArguments()
1133 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { in DoPushArgument() argument
1135 LOperand* argument = UseAny(instr->argument()); in DoPushArgument()
1140 LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) { in DoThisFunction() argument
1141 return instr->HasNoUses() in DoThisFunction()
1147 LInstruction* LChunkBuilder::DoContext(HContext* instr) { in DoContext() argument
1148 return instr->HasNoUses() ? NULL : DefineAsRegister(new(zone()) LContext); in DoContext()
1152 LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) { in DoOuterContext() argument
1153 LOperand* context = UseRegisterAtStart(instr->value()); in DoOuterContext()
1158 LInstruction* LChunkBuilder::DoDeclareGlobals(HDeclareGlobals* instr) { in DoDeclareGlobals() argument
1159 LOperand* context = UseFixed(instr->context(), esi); in DoDeclareGlobals()
1160 return MarkAsCall(new(zone()) LDeclareGlobals(context), instr); in DoDeclareGlobals()
1164 LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) { in DoGlobalObject() argument
1165 LOperand* context = UseRegisterAtStart(instr->value()); in DoGlobalObject()
1170 LInstruction* LChunkBuilder::DoGlobalReceiver(HGlobalReceiver* instr) { in DoGlobalReceiver() argument
1171 LOperand* global_object = UseRegisterAtStart(instr->value()); in DoGlobalReceiver()
1177 HCallConstantFunction* instr) { in DoCallConstantFunction() argument
1178 argument_count_ -= instr->argument_count(); in DoCallConstantFunction()
1179 return MarkAsCall(DefineFixed(new(zone()) LCallConstantFunction, eax), instr); in DoCallConstantFunction()
1183 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { in DoInvokeFunction() argument
1184 LOperand* context = UseFixed(instr->context(), esi); in DoInvokeFunction()
1185 LOperand* function = UseFixed(instr->function(), edi); in DoInvokeFunction()
1186 argument_count_ -= instr->argument_count(); in DoInvokeFunction()
1188 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); in DoInvokeFunction()
1192 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { in DoUnaryMathOperation() argument
1193 BuiltinFunctionId op = instr->op(); in DoUnaryMathOperation()
1195 ASSERT(instr->representation().IsDouble()); in DoUnaryMathOperation()
1196 ASSERT(instr->value()->representation().IsDouble()); in DoUnaryMathOperation()
1197 LOperand* context = UseAny(instr->context()); // Not actually used. in DoUnaryMathOperation()
1198 LOperand* input = UseRegisterAtStart(instr->value()); in DoUnaryMathOperation()
1203 LOperand* context = UseFixed(instr->context(), esi); in DoUnaryMathOperation()
1204 LOperand* input = UseFixedDouble(instr->value(), xmm1); in DoUnaryMathOperation()
1207 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); in DoUnaryMathOperation()
1209 LOperand* input = UseRegisterAtStart(instr->value()); in DoUnaryMathOperation()
1210 LOperand* context = UseAny(instr->context()); // Deferred use by MathAbs. in DoUnaryMathOperation()
1235 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { in DoCallKeyed() argument
1236 ASSERT(instr->key()->representation().IsTagged()); in DoCallKeyed()
1237 LOperand* context = UseFixed(instr->context(), esi); in DoCallKeyed()
1238 LOperand* key = UseFixed(instr->key(), ecx); in DoCallKeyed()
1239 argument_count_ -= instr->argument_count(); in DoCallKeyed()
1241 return MarkAsCall(DefineFixed(result, eax), instr); in DoCallKeyed()
1245 LInstruction* LChunkBuilder::DoCallNamed(HCallNamed* instr) { in DoCallNamed() argument
1246 LOperand* context = UseFixed(instr->context(), esi); in DoCallNamed()
1247 argument_count_ -= instr->argument_count(); in DoCallNamed()
1249 return MarkAsCall(DefineFixed(result, eax), instr); in DoCallNamed()
1253 LInstruction* LChunkBuilder::DoCallGlobal(HCallGlobal* instr) { in DoCallGlobal() argument
1254 LOperand* context = UseFixed(instr->context(), esi); in DoCallGlobal()
1255 argument_count_ -= instr->argument_count(); in DoCallGlobal()
1257 return MarkAsCall(DefineFixed(result, eax), instr); in DoCallGlobal()
1261 LInstruction* LChunkBuilder::DoCallKnownGlobal(HCallKnownGlobal* instr) { in DoCallKnownGlobal() argument
1262 argument_count_ -= instr->argument_count(); in DoCallKnownGlobal()
1263 return MarkAsCall(DefineFixed(new(zone()) LCallKnownGlobal, eax), instr); in DoCallKnownGlobal()
1267 LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) { in DoCallNew() argument
1268 LOperand* context = UseFixed(instr->context(), esi); in DoCallNew()
1269 LOperand* constructor = UseFixed(instr->constructor(), edi); in DoCallNew()
1270 argument_count_ -= instr->argument_count(); in DoCallNew()
1272 return MarkAsCall(DefineFixed(result, eax), instr); in DoCallNew()
1276 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { in DoCallFunction() argument
1277 LOperand* context = UseFixed(instr->context(), esi); in DoCallFunction()
1278 LOperand* function = UseFixed(instr->function(), edi); in DoCallFunction()
1279 argument_count_ -= instr->argument_count(); in DoCallFunction()
1281 return MarkAsCall(DefineFixed(result, eax), instr); in DoCallFunction()
1285 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { in DoCallRuntime() argument
1286 argument_count_ -= instr->argument_count(); in DoCallRuntime()
1287 LOperand* context = UseFixed(instr->context(), esi); in DoCallRuntime()
1288 return MarkAsCall(DefineFixed(new(zone()) LCallRuntime(context), eax), instr); in DoCallRuntime()
1292 LInstruction* LChunkBuilder::DoShr(HShr* instr) { in DoShr() argument
1293 return DoShift(Token::SHR, instr); in DoShr()
1297 LInstruction* LChunkBuilder::DoSar(HSar* instr) { in DoSar() argument
1298 return DoShift(Token::SAR, instr); in DoSar()
1302 LInstruction* LChunkBuilder::DoShl(HShl* instr) { in DoShl() argument
1303 return DoShift(Token::SHL, instr); in DoShl()
1307 LInstruction* LChunkBuilder::DoBitwise(HBitwise* instr) { in DoBitwise() argument
1308 if (instr->representation().IsInteger32()) { in DoBitwise()
1309 ASSERT(instr->left()->representation().IsInteger32()); in DoBitwise()
1310 ASSERT(instr->right()->representation().IsInteger32()); in DoBitwise()
1312 LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand()); in DoBitwise()
1313 LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand()); in DoBitwise()
1316 ASSERT(instr->representation().IsTagged()); in DoBitwise()
1317 ASSERT(instr->left()->representation().IsTagged()); in DoBitwise()
1318 ASSERT(instr->right()->representation().IsTagged()); in DoBitwise()
1320 LOperand* context = UseFixed(instr->context(), esi); in DoBitwise()
1321 LOperand* left = UseFixed(instr->left(), edx); in DoBitwise()
1322 LOperand* right = UseFixed(instr->right(), eax); in DoBitwise()
1324 new(zone()) LArithmeticT(instr->op(), context, left, right); in DoBitwise()
1325 return MarkAsCall(DefineFixed(result, eax), instr); in DoBitwise()
1330 LInstruction* LChunkBuilder::DoBitNot(HBitNot* instr) { in DoBitNot() argument
1331 ASSERT(instr->value()->representation().IsInteger32()); in DoBitNot()
1332 ASSERT(instr->representation().IsInteger32()); in DoBitNot()
1333 LOperand* input = UseRegisterAtStart(instr->value()); in DoBitNot()
1339 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { in DoDiv() argument
1340 if (instr->representation().IsDouble()) { in DoDiv()
1341 return DoArithmeticD(Token::DIV, instr); in DoDiv()
1342 } else if (instr->representation().IsInteger32()) { in DoDiv()
1346 LOperand* dividend = UseFixed(instr->left(), eax); in DoDiv()
1347 LOperand* divisor = UseRegister(instr->right()); in DoDiv()
1351 ASSERT(instr->representation().IsTagged()); in DoDiv()
1352 return DoArithmeticT(Token::DIV, instr); in DoDiv()
1357 LInstruction* LChunkBuilder::DoMod(HMod* instr) { in DoMod() argument
1358 if (instr->representation().IsInteger32()) { in DoMod()
1359 ASSERT(instr->left()->representation().IsInteger32()); in DoMod()
1360 ASSERT(instr->right()->representation().IsInteger32()); in DoMod()
1363 if (instr->HasPowerOf2Divisor()) { in DoMod()
1364 ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero)); in DoMod()
1365 LOperand* value = UseRegisterAtStart(instr->left()); in DoMod()
1367 new(zone()) LModI(value, UseOrConstant(instr->right()), NULL); in DoMod()
1373 LOperand* value = UseFixed(instr->left(), eax); in DoMod()
1374 LOperand* divisor = UseRegister(instr->right()); in DoMod()
1379 return (instr->CheckFlag(HValue::kBailoutOnMinusZero) || in DoMod()
1380 instr->CheckFlag(HValue::kCanBeDivByZero)) in DoMod()
1383 } else if (instr->representation().IsTagged()) { in DoMod()
1384 return DoArithmeticT(Token::MOD, instr); in DoMod()
1386 ASSERT(instr->representation().IsDouble()); in DoMod()
1390 LOperand* left = UseFixedDouble(instr->left(), xmm2); in DoMod()
1391 LOperand* right = UseFixedDouble(instr->right(), xmm1); in DoMod()
1393 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); in DoMod()
1398 LInstruction* LChunkBuilder::DoMul(HMul* instr) { in DoMul() argument
1399 if (instr->representation().IsInteger32()) { in DoMul()
1400 ASSERT(instr->left()->representation().IsInteger32()); in DoMul()
1401 ASSERT(instr->right()->representation().IsInteger32()); in DoMul()
1402 LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand()); in DoMul()
1403 LOperand* right = UseOrConstant(instr->MostConstantOperand()); in DoMul()
1405 if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) { in DoMul()
1409 if (instr->CheckFlag(HValue::kCanOverflow) || in DoMul()
1410 instr->CheckFlag(HValue::kBailoutOnMinusZero)) { in DoMul()
1414 } else if (instr->representation().IsDouble()) { in DoMul()
1415 return DoArithmeticD(Token::MUL, instr); in DoMul()
1417 ASSERT(instr->representation().IsTagged()); in DoMul()
1418 return DoArithmeticT(Token::MUL, instr); in DoMul()
1423 LInstruction* LChunkBuilder::DoSub(HSub* instr) { in DoSub() argument
1424 if (instr->representation().IsInteger32()) { in DoSub()
1425 ASSERT(instr->left()->representation().IsInteger32()); in DoSub()
1426 ASSERT(instr->right()->representation().IsInteger32()); in DoSub()
1427 LOperand* left = UseRegisterAtStart(instr->left()); in DoSub()
1428 LOperand* right = UseOrConstantAtStart(instr->right()); in DoSub()
1431 if (instr->CheckFlag(HValue::kCanOverflow)) { in DoSub()
1435 } else if (instr->representation().IsDouble()) { in DoSub()
1436 return DoArithmeticD(Token::SUB, instr); in DoSub()
1438 ASSERT(instr->representation().IsTagged()); in DoSub()
1439 return DoArithmeticT(Token::SUB, instr); in DoSub()
1444 LInstruction* LChunkBuilder::DoAdd(HAdd* instr) { in DoAdd() argument
1445 if (instr->representation().IsInteger32()) { in DoAdd()
1446 ASSERT(instr->left()->representation().IsInteger32()); in DoAdd()
1447 ASSERT(instr->right()->representation().IsInteger32()); in DoAdd()
1448 LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand()); in DoAdd()
1449 LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand()); in DoAdd()
1452 if (instr->CheckFlag(HValue::kCanOverflow)) { in DoAdd()
1456 } else if (instr->representation().IsDouble()) { in DoAdd()
1457 return DoArithmeticD(Token::ADD, instr); in DoAdd()
1459 ASSERT(instr->representation().IsTagged()); in DoAdd()
1460 return DoArithmeticT(Token::ADD, instr); in DoAdd()
1465 LInstruction* LChunkBuilder::DoPower(HPower* instr) { in DoPower() argument
1466 ASSERT(instr->representation().IsDouble()); in DoPower()
1469 Representation exponent_type = instr->right()->representation(); in DoPower()
1470 ASSERT(instr->left()->representation().IsDouble()); in DoPower()
1471 LOperand* left = UseFixedDouble(instr->left(), xmm2); in DoPower()
1473 UseFixedDouble(instr->right(), xmm1) : in DoPower()
1474 UseFixed(instr->right(), eax); in DoPower()
1476 return MarkAsCall(DefineFixedDouble(result, xmm3), instr, in DoPower()
1481 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) { in DoRandom() argument
1482 ASSERT(instr->representation().IsDouble()); in DoRandom()
1483 ASSERT(instr->global_object()->representation().IsTagged()); in DoRandom()
1484 LOperand* global_object = UseFixed(instr->global_object(), eax); in DoRandom()
1486 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); in DoRandom()
1490 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { in DoCompareGeneric() argument
1491 ASSERT(instr->left()->representation().IsTagged()); in DoCompareGeneric()
1492 ASSERT(instr->right()->representation().IsTagged()); in DoCompareGeneric()
1493 LOperand* context = UseFixed(instr->context(), esi); in DoCompareGeneric()
1494 LOperand* left = UseFixed(instr->left(), edx); in DoCompareGeneric()
1495 LOperand* right = UseFixed(instr->right(), eax); in DoCompareGeneric()
1497 return MarkAsCall(DefineFixed(result, eax), instr); in DoCompareGeneric()
1502 HCompareIDAndBranch* instr) { in DoCompareIDAndBranch() argument
1503 Representation r = instr->GetInputRepresentation(); in DoCompareIDAndBranch()
1505 ASSERT(instr->left()->representation().IsInteger32()); in DoCompareIDAndBranch()
1506 ASSERT(instr->right()->representation().IsInteger32()); in DoCompareIDAndBranch()
1507 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); in DoCompareIDAndBranch()
1508 LOperand* right = UseOrConstantAtStart(instr->right()); in DoCompareIDAndBranch()
1512 ASSERT(instr->left()->representation().IsDouble()); in DoCompareIDAndBranch()
1513 ASSERT(instr->right()->representation().IsDouble()); in DoCompareIDAndBranch()
1516 if (instr->left()->IsConstant() && instr->right()->IsConstant()) { in DoCompareIDAndBranch()
1517 left = UseRegisterOrConstantAtStart(instr->left()); in DoCompareIDAndBranch()
1518 right = UseRegisterOrConstantAtStart(instr->right()); in DoCompareIDAndBranch()
1520 left = UseRegisterAtStart(instr->left()); in DoCompareIDAndBranch()
1521 right = UseRegisterAtStart(instr->right()); in DoCompareIDAndBranch()
1529 HCompareObjectEqAndBranch* instr) { in DoCompareObjectEqAndBranch() argument
1530 LOperand* left = UseRegisterAtStart(instr->left()); in DoCompareObjectEqAndBranch()
1531 LOperand* right = UseAtStart(instr->right()); in DoCompareObjectEqAndBranch()
1537 HCompareConstantEqAndBranch* instr) { in DoCompareConstantEqAndBranch() argument
1539 UseRegisterAtStart(instr->value())); in DoCompareConstantEqAndBranch()
1543 LInstruction* LChunkBuilder::DoIsNilAndBranch(HIsNilAndBranch* instr) { in DoIsNilAndBranch() argument
1545 LOperand* temp = instr->kind() == kStrictEquality ? NULL : TempRegister(); in DoIsNilAndBranch()
1546 return new(zone()) LIsNilAndBranch(UseRegisterAtStart(instr->value()), temp); in DoIsNilAndBranch()
1550 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { in DoIsObjectAndBranch() argument
1551 ASSERT(instr->value()->representation().IsTagged()); in DoIsObjectAndBranch()
1553 return new(zone()) LIsObjectAndBranch(UseRegister(instr->value()), temp); in DoIsObjectAndBranch()
1557 LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { in DoIsStringAndBranch() argument
1558 ASSERT(instr->value()->representation().IsTagged()); in DoIsStringAndBranch()
1560 return new LIsStringAndBranch(UseRegister(instr->value()), temp); in DoIsStringAndBranch()
1564 LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) { in DoIsSmiAndBranch() argument
1565 ASSERT(instr->value()->representation().IsTagged()); in DoIsSmiAndBranch()
1566 return new(zone()) LIsSmiAndBranch(Use(instr->value())); in DoIsSmiAndBranch()
1571 HIsUndetectableAndBranch* instr) { in DoIsUndetectableAndBranch() argument
1572 ASSERT(instr ->value()->representation().IsTagged()); in DoIsUndetectableAndBranch()
1574 UseRegisterAtStart(instr->value()), TempRegister()); in DoIsUndetectableAndBranch()
1579 HStringCompareAndBranch* instr) { in DoStringCompareAndBranch() argument
1580 ASSERT(instr->left()->representation().IsTagged()); in DoStringCompareAndBranch()
1581 ASSERT(instr->right()->representation().IsTagged()); in DoStringCompareAndBranch()
1582 LOperand* context = UseFixed(instr->context(), esi); in DoStringCompareAndBranch()
1583 LOperand* left = UseFixed(instr->left(), edx); in DoStringCompareAndBranch()
1584 LOperand* right = UseFixed(instr->right(), eax); in DoStringCompareAndBranch()
1589 return MarkAsCall(result, instr); in DoStringCompareAndBranch()
1594 HHasInstanceTypeAndBranch* instr) { in DoHasInstanceTypeAndBranch() argument
1595 ASSERT(instr->value()->representation().IsTagged()); in DoHasInstanceTypeAndBranch()
1597 UseRegisterAtStart(instr->value()), in DoHasInstanceTypeAndBranch()
1603 HGetCachedArrayIndex* instr) { in DoGetCachedArrayIndex() argument
1604 ASSERT(instr->value()->representation().IsTagged()); in DoGetCachedArrayIndex()
1605 LOperand* value = UseRegisterAtStart(instr->value()); in DoGetCachedArrayIndex()
1612 HHasCachedArrayIndexAndBranch* instr) { in DoHasCachedArrayIndexAndBranch() argument
1613 ASSERT(instr->value()->representation().IsTagged()); in DoHasCachedArrayIndexAndBranch()
1615 UseRegisterAtStart(instr->value())); in DoHasCachedArrayIndexAndBranch()
1620 HClassOfTestAndBranch* instr) { in DoClassOfTestAndBranch() argument
1621 ASSERT(instr->value()->representation().IsTagged()); in DoClassOfTestAndBranch()
1622 return new(zone()) LClassOfTestAndBranch(UseRegister(instr->value()), in DoClassOfTestAndBranch()
1628 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) { in DoJSArrayLength() argument
1629 LOperand* array = UseRegisterAtStart(instr->value()); in DoJSArrayLength()
1635 HFixedArrayBaseLength* instr) { in DoFixedArrayBaseLength() argument
1636 LOperand* array = UseRegisterAtStart(instr->value()); in DoFixedArrayBaseLength()
1641 LInstruction* LChunkBuilder::DoElementsKind(HElementsKind* instr) { in DoElementsKind() argument
1642 LOperand* object = UseRegisterAtStart(instr->value()); in DoElementsKind()
1647 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { in DoValueOf() argument
1648 LOperand* object = UseRegister(instr->value()); in DoValueOf()
1654 LInstruction* LChunkBuilder::DoDateField(HDateField* instr) { in DoDateField() argument
1655 LOperand* date = UseFixed(instr->value(), eax); in DoDateField()
1657 new(zone()) LDateField(date, FixedTemp(ecx), instr->index()); in DoDateField()
1658 return MarkAsCall(DefineFixed(result, eax), instr); in DoDateField()
1662 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { in DoBoundsCheck() argument
1664 UseRegisterOrConstantAtStart(instr->index()), in DoBoundsCheck()
1665 UseAtStart(instr->length()))); in DoBoundsCheck()
1669 LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { in DoAbnormalExit() argument
1676 LInstruction* LChunkBuilder::DoThrow(HThrow* instr) { in DoThrow() argument
1677 LOperand* context = UseFixed(instr->context(), esi); in DoThrow()
1678 LOperand* value = UseFixed(instr->value(), eax); in DoThrow()
1679 return MarkAsCall(new(zone()) LThrow(context, value), instr); in DoThrow()
1683 LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) { in DoUseConst() argument
1696 LInstruction* LChunkBuilder::DoChange(HChange* instr) { in DoChange() argument
1697 Representation from = instr->from(); in DoChange()
1698 Representation to = instr->to(); in DoChange()
1701 LOperand* value = UseRegister(instr->value()); in DoChange()
1703 LOperand* temp = instr->deoptimize_on_minus_zero() in DoChange()
1710 LOperand* value = UseRegister(instr->value()); in DoChange()
1711 bool needs_check = !instr->value()->type().IsSmi(); in DoChange()
1713 bool truncating = instr->CanTruncateToInt32(); in DoChange()
1726 LOperand* value = UseRegister(instr->value()); in DoChange()
1735 bool truncating = instr->CanTruncateToInt32(); in DoChange()
1738 UseTempRegister(instr->value()) : UseRegister(instr->value()); in DoChange()
1745 HValue* val = instr->value(); in DoChange()
1756 new(zone()) LInteger32ToDouble(Use(instr->value()))); in DoChange()
1764 LInstruction* LChunkBuilder::DoCheckNonSmi(HCheckNonSmi* instr) { in DoCheckNonSmi() argument
1765 LOperand* value = UseAtStart(instr->value()); in DoCheckNonSmi()
1770 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { in DoCheckInstanceType() argument
1771 LOperand* value = UseRegisterAtStart(instr->value()); in DoCheckInstanceType()
1778 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { in DoCheckPrototypeMaps() argument
1785 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { in DoCheckSmi() argument
1786 LOperand* value = UseAtStart(instr->value()); in DoCheckSmi()
1791 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { in DoCheckFunction() argument
1796 LOperand* value = Isolate::Current()->heap()->InNewSpace(*instr->target()) in DoCheckFunction()
1797 ? UseRegisterAtStart(instr->value()) in DoCheckFunction()
1798 : UseAtStart(instr->value()); in DoCheckFunction()
1803 LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) { in DoCheckMap() argument
1804 LOperand* value = UseRegisterAtStart(instr->value()); in DoCheckMap()
1810 LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { in DoClampToUint8() argument
1811 HValue* value = instr->value(); in DoClampToUint8()
1831 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { in DoReturn() argument
1832 return new(zone()) LReturn(UseFixed(instr->value(), eax)); in DoReturn()
1836 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { in DoConstant() argument
1837 Representation r = instr->representation(); in DoConstant()
1841 double value = instr->DoubleValue(); in DoConstant()
1855 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { in DoLoadGlobalCell() argument
1857 return instr->RequiresHoleCheck() in DoLoadGlobalCell()
1863 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { in DoLoadGlobalGeneric() argument
1864 LOperand* context = UseFixed(instr->context(), esi); in DoLoadGlobalGeneric()
1865 LOperand* global_object = UseFixed(instr->global_object(), eax); in DoLoadGlobalGeneric()
1868 return MarkAsCall(DefineFixed(result, eax), instr); in DoLoadGlobalGeneric()
1872 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { in DoStoreGlobalCell() argument
1874 new(zone()) LStoreGlobalCell(UseRegister(instr->value())); in DoStoreGlobalCell()
1875 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; in DoStoreGlobalCell()
1879 LInstruction* LChunkBuilder::DoStoreGlobalGeneric(HStoreGlobalGeneric* instr) { in DoStoreGlobalGeneric() argument
1880 LOperand* context = UseFixed(instr->context(), esi); in DoStoreGlobalGeneric()
1881 LOperand* global_object = UseFixed(instr->global_object(), edx); in DoStoreGlobalGeneric()
1882 LOperand* value = UseFixed(instr->value(), eax); in DoStoreGlobalGeneric()
1885 return MarkAsCall(result, instr); in DoStoreGlobalGeneric()
1889 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { in DoLoadContextSlot() argument
1890 LOperand* context = UseRegisterAtStart(instr->value()); in DoLoadContextSlot()
1893 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; in DoLoadContextSlot()
1897 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { in DoStoreContextSlot() argument
1900 LOperand* context = UseRegister(instr->context()); in DoStoreContextSlot()
1901 if (instr->NeedsWriteBarrier()) { in DoStoreContextSlot()
1902 value = UseTempRegister(instr->value()); in DoStoreContextSlot()
1905 value = UseRegister(instr->value()); in DoStoreContextSlot()
1909 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; in DoStoreContextSlot()
1913 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { in DoLoadNamedField() argument
1914 ASSERT(instr->representation().IsTagged()); in DoLoadNamedField()
1915 LOperand* obj = UseRegisterAtStart(instr->object()); in DoLoadNamedField()
1921 HLoadNamedFieldPolymorphic* instr) { in DoLoadNamedFieldPolymorphic() argument
1922 ASSERT(instr->representation().IsTagged()); in DoLoadNamedFieldPolymorphic()
1923 if (instr->need_generic()) { in DoLoadNamedFieldPolymorphic()
1924 LOperand* context = UseFixed(instr->context(), esi); in DoLoadNamedFieldPolymorphic()
1925 LOperand* obj = UseFixed(instr->object(), eax); in DoLoadNamedFieldPolymorphic()
1928 return MarkAsCall(DefineFixed(result, eax), instr); in DoLoadNamedFieldPolymorphic()
1930 LOperand* context = UseAny(instr->context()); // Not actually used. in DoLoadNamedFieldPolymorphic()
1931 LOperand* obj = UseRegisterAtStart(instr->object()); in DoLoadNamedFieldPolymorphic()
1939 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { in DoLoadNamedGeneric() argument
1940 LOperand* context = UseFixed(instr->context(), esi); in DoLoadNamedGeneric()
1941 LOperand* object = UseFixed(instr->object(), eax); in DoLoadNamedGeneric()
1943 return MarkAsCall(DefineFixed(result, eax), instr); in DoLoadNamedGeneric()
1948 HLoadFunctionPrototype* instr) { in DoLoadFunctionPrototype() argument
1950 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function()), in DoLoadFunctionPrototype()
1955 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) { in DoLoadElements() argument
1956 LOperand* input = UseRegisterAtStart(instr->value()); in DoLoadElements()
1962 HLoadExternalArrayPointer* instr) { in DoLoadExternalArrayPointer() argument
1963 LOperand* input = UseRegisterAtStart(instr->value()); in DoLoadExternalArrayPointer()
1969 HLoadKeyedFastElement* instr) { in DoLoadKeyedFastElement() argument
1970 ASSERT(instr->representation().IsTagged()); in DoLoadKeyedFastElement()
1971 ASSERT(instr->key()->representation().IsInteger32()); in DoLoadKeyedFastElement()
1972 LOperand* obj = UseRegisterAtStart(instr->object()); in DoLoadKeyedFastElement()
1973 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); in DoLoadKeyedFastElement()
1975 if (instr->RequiresHoleCheck()) AssignEnvironment(result); in DoLoadKeyedFastElement()
1981 HLoadKeyedFastDoubleElement* instr) { in DoLoadKeyedFastDoubleElement() argument
1982 ASSERT(instr->representation().IsDouble()); in DoLoadKeyedFastDoubleElement()
1983 ASSERT(instr->key()->representation().IsInteger32()); in DoLoadKeyedFastDoubleElement()
1984 LOperand* elements = UseRegisterAtStart(instr->elements()); in DoLoadKeyedFastDoubleElement()
1985 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); in DoLoadKeyedFastDoubleElement()
1993 HLoadKeyedSpecializedArrayElement* instr) { in DoLoadKeyedSpecializedArrayElement() argument
1994 ElementsKind elements_kind = instr->elements_kind(); in DoLoadKeyedSpecializedArrayElement()
1996 (instr->representation().IsInteger32() && in DoLoadKeyedSpecializedArrayElement()
1999 (instr->representation().IsDouble() && in DoLoadKeyedSpecializedArrayElement()
2002 ASSERT(instr->key()->representation().IsInteger32()); in DoLoadKeyedSpecializedArrayElement()
2003 LOperand* external_pointer = UseRegister(instr->external_pointer()); in DoLoadKeyedSpecializedArrayElement()
2004 LOperand* key = UseRegisterOrConstant(instr->key()); in DoLoadKeyedSpecializedArrayElement()
2017 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { in DoLoadKeyedGeneric() argument
2018 LOperand* context = UseFixed(instr->context(), esi); in DoLoadKeyedGeneric()
2019 LOperand* object = UseFixed(instr->object(), edx); in DoLoadKeyedGeneric()
2020 LOperand* key = UseFixed(instr->key(), eax); in DoLoadKeyedGeneric()
2024 return MarkAsCall(DefineFixed(result, eax), instr); in DoLoadKeyedGeneric()
2029 HStoreKeyedFastElement* instr) { in DoStoreKeyedFastElement() argument
2030 bool needs_write_barrier = instr->NeedsWriteBarrier(); in DoStoreKeyedFastElement()
2031 ASSERT(instr->value()->representation().IsTagged()); in DoStoreKeyedFastElement()
2032 ASSERT(instr->object()->representation().IsTagged()); in DoStoreKeyedFastElement()
2033 ASSERT(instr->key()->representation().IsInteger32()); in DoStoreKeyedFastElement()
2035 LOperand* obj = UseRegister(instr->object()); in DoStoreKeyedFastElement()
2037 ? UseTempRegister(instr->value()) in DoStoreKeyedFastElement()
2038 : UseRegisterAtStart(instr->value()); in DoStoreKeyedFastElement()
2040 ? UseTempRegister(instr->key()) in DoStoreKeyedFastElement()
2041 : UseRegisterOrConstantAtStart(instr->key()); in DoStoreKeyedFastElement()
2047 HStoreKeyedFastDoubleElement* instr) { in DoStoreKeyedFastDoubleElement() argument
2048 ASSERT(instr->value()->representation().IsDouble()); in DoStoreKeyedFastDoubleElement()
2049 ASSERT(instr->elements()->representation().IsTagged()); in DoStoreKeyedFastDoubleElement()
2050 ASSERT(instr->key()->representation().IsInteger32()); in DoStoreKeyedFastDoubleElement()
2052 LOperand* elements = UseRegisterAtStart(instr->elements()); in DoStoreKeyedFastDoubleElement()
2053 LOperand* val = UseTempRegister(instr->value()); in DoStoreKeyedFastDoubleElement()
2054 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); in DoStoreKeyedFastDoubleElement()
2061 HStoreKeyedSpecializedArrayElement* instr) { in DoStoreKeyedSpecializedArrayElement() argument
2062 ElementsKind elements_kind = instr->elements_kind(); in DoStoreKeyedSpecializedArrayElement()
2064 (instr->value()->representation().IsInteger32() && in DoStoreKeyedSpecializedArrayElement()
2067 (instr->value()->representation().IsDouble() && in DoStoreKeyedSpecializedArrayElement()
2070 ASSERT(instr->external_pointer()->representation().IsExternal()); in DoStoreKeyedSpecializedArrayElement()
2071 ASSERT(instr->key()->representation().IsInteger32()); in DoStoreKeyedSpecializedArrayElement()
2073 LOperand* external_pointer = UseRegister(instr->external_pointer()); in DoStoreKeyedSpecializedArrayElement()
2074 LOperand* key = UseRegisterOrConstant(instr->key()); in DoStoreKeyedSpecializedArrayElement()
2080 val = UseFixed(instr->value(), eax); in DoStoreKeyedSpecializedArrayElement()
2082 val = UseRegister(instr->value()); in DoStoreKeyedSpecializedArrayElement()
2091 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { in DoStoreKeyedGeneric() argument
2092 LOperand* context = UseFixed(instr->context(), esi); in DoStoreKeyedGeneric()
2093 LOperand* object = UseFixed(instr->object(), edx); in DoStoreKeyedGeneric()
2094 LOperand* key = UseFixed(instr->key(), ecx); in DoStoreKeyedGeneric()
2095 LOperand* value = UseFixed(instr->value(), eax); in DoStoreKeyedGeneric()
2097 ASSERT(instr->object()->representation().IsTagged()); in DoStoreKeyedGeneric()
2098 ASSERT(instr->key()->representation().IsTagged()); in DoStoreKeyedGeneric()
2099 ASSERT(instr->value()->representation().IsTagged()); in DoStoreKeyedGeneric()
2103 return MarkAsCall(result, instr); in DoStoreKeyedGeneric()
2108 HTransitionElementsKind* instr) { in DoTransitionElementsKind() argument
2109 if (instr->original_map()->elements_kind() == FAST_SMI_ONLY_ELEMENTS && in DoTransitionElementsKind()
2110 instr->transitioned_map()->elements_kind() == FAST_ELEMENTS) { in DoTransitionElementsKind()
2111 LOperand* object = UseRegister(instr->object()); in DoTransitionElementsKind()
2118 LOperand* object = UseFixed(instr->object(), eax); in DoTransitionElementsKind()
2125 return MarkAsCall(DefineFixed(result, eax), instr); in DoTransitionElementsKind()
2130 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { in DoStoreNamedField() argument
2131 bool needs_write_barrier = instr->NeedsWriteBarrier(); in DoStoreNamedField()
2135 obj = instr->is_in_object() in DoStoreNamedField()
2136 ? UseRegister(instr->object()) in DoStoreNamedField()
2137 : UseTempRegister(instr->object()); in DoStoreNamedField()
2139 obj = UseRegisterAtStart(instr->object()); in DoStoreNamedField()
2143 ? UseTempRegister(instr->value()) in DoStoreNamedField()
2144 : UseRegister(instr->value()); in DoStoreNamedField()
2148 LOperand* temp = (!instr->is_in_object() || needs_write_barrier) in DoStoreNamedField()
2156 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { in DoStoreNamedGeneric() argument
2157 LOperand* context = UseFixed(instr->context(), esi); in DoStoreNamedGeneric()
2158 LOperand* object = UseFixed(instr->object(), edx); in DoStoreNamedGeneric()
2159 LOperand* value = UseFixed(instr->value(), eax); in DoStoreNamedGeneric()
2163 return MarkAsCall(result, instr); in DoStoreNamedGeneric()
2167 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { in DoStringAdd() argument
2168 LOperand* context = UseFixed(instr->context(), esi); in DoStringAdd()
2169 LOperand* left = UseOrConstantAtStart(instr->left()); in DoStringAdd()
2170 LOperand* right = UseOrConstantAtStart(instr->right()); in DoStringAdd()
2172 return MarkAsCall(DefineFixed(string_add, eax), instr); in DoStringAdd()
2176 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) { in DoStringCharCodeAt() argument
2177 LOperand* string = UseTempRegister(instr->string()); in DoStringCharCodeAt()
2178 LOperand* index = UseTempRegister(instr->index()); in DoStringCharCodeAt()
2179 LOperand* context = UseAny(instr->context()); in DoStringCharCodeAt()
2186 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { in DoStringCharFromCode() argument
2187 LOperand* char_code = UseRegister(instr->value()); in DoStringCharFromCode()
2188 LOperand* context = UseAny(instr->context()); in DoStringCharFromCode()
2195 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { in DoStringLength() argument
2196 LOperand* string = UseRegisterAtStart(instr->value()); in DoStringLength()
2201 LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) { in DoAllocateObject() argument
2202 LOperand* context = UseFixed(instr->context(), esi); in DoAllocateObject()
2209 LInstruction* LChunkBuilder::DoFastLiteral(HFastLiteral* instr) { in DoFastLiteral() argument
2210 LOperand* context = UseFixed(instr->context(), esi); in DoFastLiteral()
2212 DefineFixed(new(zone()) LFastLiteral(context), eax), instr); in DoFastLiteral()
2216 LInstruction* LChunkBuilder::DoArrayLiteral(HArrayLiteral* instr) { in DoArrayLiteral() argument
2217 LOperand* context = UseFixed(instr->context(), esi); in DoArrayLiteral()
2219 DefineFixed(new(zone()) LArrayLiteral(context), eax), instr); in DoArrayLiteral()
2223 LInstruction* LChunkBuilder::DoObjectLiteral(HObjectLiteral* instr) { in DoObjectLiteral() argument
2224 LOperand* context = UseFixed(instr->context(), esi); in DoObjectLiteral()
2226 DefineFixed(new(zone()) LObjectLiteral(context), eax), instr); in DoObjectLiteral()
2230 LInstruction* LChunkBuilder::DoRegExpLiteral(HRegExpLiteral* instr) { in DoRegExpLiteral() argument
2231 LOperand* context = UseFixed(instr->context(), esi); in DoRegExpLiteral()
2233 DefineFixed(new(zone()) LRegExpLiteral(context), eax), instr); in DoRegExpLiteral()
2237 LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) { in DoFunctionLiteral() argument
2238 LOperand* context = UseFixed(instr->context(), esi); in DoFunctionLiteral()
2240 DefineFixed(new(zone()) LFunctionLiteral(context), eax), instr); in DoFunctionLiteral()
2244 LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) { in DoDeleteProperty() argument
2245 LOperand* context = UseFixed(instr->context(), esi); in DoDeleteProperty()
2246 LOperand* object = UseAtStart(instr->object()); in DoDeleteProperty()
2247 LOperand* key = UseOrConstantAtStart(instr->key()); in DoDeleteProperty()
2249 return MarkAsCall(DefineFixed(result, eax), instr); in DoDeleteProperty()
2253 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { in DoOsrEntry() argument
2255 current_block_->last_environment()->set_ast_id(instr->ast_id()); in DoOsrEntry()
2260 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { in DoParameter() argument
2261 int spill_index = chunk()->GetParameterStackSlot(instr->index()); in DoParameter()
2266 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { in DoUnknownOSRValue() argument
2276 LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) { in DoCallStub() argument
2277 LOperand* context = UseFixed(instr->context(), esi); in DoCallStub()
2278 argument_count_ -= instr->argument_count(); in DoCallStub()
2280 return MarkAsCall(DefineFixed(result, eax), instr); in DoCallStub()
2284 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) { in DoArgumentsObject() argument
2293 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { in DoAccessArgumentsAt() argument
2294 LOperand* arguments = UseRegister(instr->arguments()); in DoAccessArgumentsAt()
2295 LOperand* length = UseTempRegister(instr->length()); in DoAccessArgumentsAt()
2296 LOperand* index = Use(instr->index()); in DoAccessArgumentsAt()
2303 LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) { in DoToFastProperties() argument
2304 LOperand* object = UseFixed(instr->value(), eax); in DoToFastProperties()
2306 return MarkAsCall(DefineFixed(result, eax), instr); in DoToFastProperties()
2310 LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) { in DoTypeof() argument
2311 LOperand* context = UseFixed(instr->context(), esi); in DoTypeof()
2312 LOperand* value = UseAtStart(instr->value()); in DoTypeof()
2314 return MarkAsCall(DefineFixed(result, eax), instr); in DoTypeof()
2318 LInstruction* LChunkBuilder::DoTypeofIsAndBranch(HTypeofIsAndBranch* instr) { in DoTypeofIsAndBranch() argument
2319 return new(zone()) LTypeofIsAndBranch(UseTempRegister(instr->value())); in DoTypeofIsAndBranch()
2324 HIsConstructCallAndBranch* instr) { in DoIsConstructCallAndBranch() argument
2329 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { in DoSimulate() argument
2333 env->set_ast_id(instr->ast_id()); in DoSimulate()
2335 env->Drop(instr->pop_count()); in DoSimulate()
2336 for (int i = 0; i < instr->values()->length(); ++i) { in DoSimulate()
2337 HValue* value = instr->values()->at(i); in DoSimulate()
2338 if (instr->HasAssignedIndexAt(i)) { in DoSimulate()
2339 env->Bind(instr->GetAssignedIndexAt(i), value); in DoSimulate()
2348 ASSERT(pending_deoptimization_ast_id_ == instr->ast_id()); in DoSimulate()
2361 LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) { in DoStackCheck() argument
2362 if (instr->is_function_entry()) { in DoStackCheck()
2363 LOperand* context = UseFixed(instr->context(), esi); in DoStackCheck()
2364 return MarkAsCall(new(zone()) LStackCheck(context), instr); in DoStackCheck()
2366 ASSERT(instr->is_backwards_branch()); in DoStackCheck()
2367 LOperand* context = UseAny(instr->context()); in DoStackCheck()
2374 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { in DoEnterInlined() argument
2377 HEnvironment* inner = outer->CopyForInlining(instr->closure(), in DoEnterInlined()
2378 instr->arguments_count(), in DoEnterInlined()
2379 instr->function(), in DoEnterInlined()
2381 instr->call_kind(), in DoEnterInlined()
2382 instr->is_construct()); in DoEnterInlined()
2383 if (instr->arguments() != NULL) { in DoEnterInlined()
2384 inner->Bind(instr->arguments(), graph()->GetArgumentsObject()); in DoEnterInlined()
2387 chunk_->AddInlinedClosure(instr->closure()); in DoEnterInlined()
2392 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { in DoLeaveInlined() argument
2400 LInstruction* LChunkBuilder::DoIn(HIn* instr) { in DoIn() argument
2401 LOperand* context = UseFixed(instr->context(), esi); in DoIn()
2402 LOperand* key = UseOrConstantAtStart(instr->key()); in DoIn()
2403 LOperand* object = UseOrConstantAtStart(instr->object()); in DoIn()
2405 return MarkAsCall(DefineFixed(result, eax), instr); in DoIn()
2409 LInstruction* LChunkBuilder::DoForInPrepareMap(HForInPrepareMap* instr) { in DoForInPrepareMap() argument
2410 LOperand* context = UseFixed(instr->context(), esi); in DoForInPrepareMap()
2411 LOperand* object = UseFixed(instr->enumerable(), eax); in DoForInPrepareMap()
2413 return MarkAsCall(DefineFixed(result, eax), instr, CAN_DEOPTIMIZE_EAGERLY); in DoForInPrepareMap()
2417 LInstruction* LChunkBuilder::DoForInCacheArray(HForInCacheArray* instr) { in DoForInCacheArray() argument
2418 LOperand* map = UseRegister(instr->map()); in DoForInCacheArray()
2424 LInstruction* LChunkBuilder::DoCheckMapValue(HCheckMapValue* instr) { in DoCheckMapValue() argument
2425 LOperand* value = UseRegisterAtStart(instr->value()); in DoCheckMapValue()
2426 LOperand* map = UseRegisterAtStart(instr->map()); in DoCheckMapValue()
2431 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { in DoLoadFieldByIndex() argument
2432 LOperand* object = UseRegister(instr->object()); in DoLoadFieldByIndex()
2433 LOperand* index = UseTempRegister(instr->index()); in DoLoadFieldByIndex()