• Home
  • Raw
  • Download

Lines Matching refs:instr

471 void LChunk::AddInstruction(LInstruction* instr, HBasicBlock* block) {  in AddInstruction()  argument
474 if (instr->IsControl()) { in AddInstruction()
477 instructions_.Add(instr); in AddInstruction()
480 instructions_.Add(instr); in AddInstruction()
483 if (instr->HasPointerMap()) { in AddInstruction()
484 pointer_maps_.Add(instr->pointer_map()); in AddInstruction()
485 instr->pointer_map()->set_lithium_position(index); in AddInstruction()
664 HInstruction* instr = HInstruction::cast(value); in Use() local
665 VisitInstruction(instr); in Use()
673 LInstruction* LChunkBuilder::Define(LTemplateInstruction<1, I, T>* instr, in Define() argument
676 instr->set_result(result); in Define()
677 return instr; in Define()
683 LTemplateInstruction<1, I, T>* instr) { in DefineAsRegister() argument
684 return Define(instr, in DefineAsRegister()
691 LTemplateInstruction<1, I, T>* instr, in DefineAsSpilled() argument
693 return Define(instr, in DefineAsSpilled()
700 LTemplateInstruction<1, I, T>* instr) { in DefineSameAsFirst() argument
701 return Define(instr, in DefineSameAsFirst()
707 LInstruction* LChunkBuilder::DefineFixed(LTemplateInstruction<1, I, T>* instr, in DefineFixed() argument
709 return Define(instr, ToUnallocated(reg)); in DefineFixed()
715 LTemplateInstruction<1, I, T>* instr, in DefineFixedDouble() argument
717 return Define(instr, ToUnallocated(reg)); in DefineFixedDouble()
721 LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) { in AssignEnvironment() argument
724 instr->set_environment(CreateEnvironment(hydrogen_env, in AssignEnvironment()
726 return instr; in AssignEnvironment()
731 LInstruction* instr, int ast_id) { in SetInstructionPendingDeoptimizationEnvironment() argument
734 instruction_pending_deoptimization_environment_ = instr; in SetInstructionPendingDeoptimizationEnvironment()
736 return instr; in SetInstructionPendingDeoptimizationEnvironment()
746 LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr, in MarkAsCall() argument
750 instr->VerifyCall(); in MarkAsCall()
752 instr->MarkAsCall(); in MarkAsCall()
753 instr = AssignPointerMap(instr); in MarkAsCall()
758 instr = SetInstructionPendingDeoptimizationEnvironment( in MarkAsCall()
759 instr, sim->ast_id()); in MarkAsCall()
769 if (needs_environment && !instr->HasEnvironment()) { in MarkAsCall()
770 instr = AssignEnvironment(instr); in MarkAsCall()
773 return instr; in MarkAsCall()
777 LInstruction* LChunkBuilder::MarkAsSaveDoubles(LInstruction* instr) { in MarkAsSaveDoubles() argument
778 instr->MarkAsSaveDoubles(); in MarkAsSaveDoubles()
779 return instr; in MarkAsSaveDoubles()
783 LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) { in AssignPointerMap() argument
784 ASSERT(!instr->HasPointerMap()); in AssignPointerMap()
785 instr->set_pointer_map(new(zone()) LPointerMap(position_)); in AssignPointerMap()
786 return instr; in AssignPointerMap()
813 LInstruction* LChunkBuilder::DoBlockEntry(HBlockEntry* instr) { in DoBlockEntry() argument
814 return new(zone()) LLabel(instr->block()); in DoBlockEntry()
818 LInstruction* LChunkBuilder::DoSoftDeoptimize(HSoftDeoptimize* instr) { in DoSoftDeoptimize() argument
823 LInstruction* LChunkBuilder::DoDeoptimize(HDeoptimize* instr) { in DoDeoptimize() argument
829 HBitwiseBinaryOperation* instr) { in DoShift() argument
830 if (instr->representation().IsTagged()) { in DoShift()
831 ASSERT(instr->left()->representation().IsTagged()); in DoShift()
832 ASSERT(instr->right()->representation().IsTagged()); in DoShift()
834 LOperand* left = UseFixed(instr->left(), rdx); in DoShift()
835 LOperand* right = UseFixed(instr->right(), rax); in DoShift()
837 return MarkAsCall(DefineFixed(result, rax), instr); in DoShift()
840 ASSERT(instr->representation().IsInteger32()); in DoShift()
841 ASSERT(instr->left()->representation().IsInteger32()); in DoShift()
842 ASSERT(instr->right()->representation().IsInteger32()); in DoShift()
843 LOperand* left = UseRegisterAtStart(instr->left()); in DoShift()
845 HValue* right_value = instr->right(); in DoShift()
861 for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) { in DoShift()
876 HArithmeticBinaryOperation* instr) { in DoArithmeticD() argument
877 ASSERT(instr->representation().IsDouble()); in DoArithmeticD()
878 ASSERT(instr->left()->representation().IsDouble()); in DoArithmeticD()
879 ASSERT(instr->right()->representation().IsDouble()); in DoArithmeticD()
881 LOperand* left = UseRegisterAtStart(instr->left()); in DoArithmeticD()
882 LOperand* right = UseRegisterAtStart(instr->right()); in DoArithmeticD()
889 HArithmeticBinaryOperation* instr) { in DoArithmeticT() argument
895 HValue* left = instr->left(); in DoArithmeticT()
896 HValue* right = instr->right(); in DoArithmeticT()
903 return MarkAsCall(DefineFixed(result, rax), instr); in DoArithmeticT()
974 LInstruction* instr = current->CompileToLithium(this); in VisitInstruction() local
976 if (instr != NULL) { in VisitInstruction()
977 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { in VisitInstruction()
978 instr = AssignPointerMap(instr); in VisitInstruction()
980 if (FLAG_stress_environments && !instr->HasEnvironment()) { in VisitInstruction()
981 instr = AssignEnvironment(instr); in VisitInstruction()
983 instr->set_hydrogen_value(current); in VisitInstruction()
984 chunk_->AddInstruction(instr, current_block_); in VisitInstruction()
1033 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { in DoGoto() argument
1034 return new(zone()) LGoto(instr->FirstSuccessor()->block_id()); in DoGoto()
1038 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { in DoBranch() argument
1039 HValue* value = instr->value(); in DoBranch()
1044 ? instr->FirstSuccessor() in DoBranch()
1045 : instr->SecondSuccessor(); in DoBranch()
1061 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) { in DoCompareMap() argument
1062 ASSERT(instr->value()->representation().IsTagged()); in DoCompareMap()
1063 LOperand* value = UseRegisterAtStart(instr->value()); in DoCompareMap()
1078 LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) { in DoInstanceOf() argument
1079 LOperand* left = UseFixed(instr->left(), rax); in DoInstanceOf()
1080 LOperand* right = UseFixed(instr->right(), rdx); in DoInstanceOf()
1082 return MarkAsCall(DefineFixed(result, rax), instr); in DoInstanceOf()
1087 HInstanceOfKnownGlobal* instr) { in DoInstanceOfKnownGlobal() argument
1089 new(zone()) LInstanceOfKnownGlobal(UseFixed(instr->left(), rax), in DoInstanceOfKnownGlobal()
1091 return MarkAsCall(DefineFixed(result, rax), instr); in DoInstanceOfKnownGlobal()
1095 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { in DoWrapReceiver() argument
1096 LOperand* receiver = UseRegister(instr->receiver()); in DoWrapReceiver()
1097 LOperand* function = UseRegisterAtStart(instr->function()); in DoWrapReceiver()
1103 LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) { in DoApplyArguments() argument
1104 LOperand* function = UseFixed(instr->function(), rdi); in DoApplyArguments()
1105 LOperand* receiver = UseFixed(instr->receiver(), rax); in DoApplyArguments()
1106 LOperand* length = UseFixed(instr->length(), rbx); in DoApplyArguments()
1107 LOperand* elements = UseFixed(instr->elements(), rcx); in DoApplyArguments()
1112 return MarkAsCall(DefineFixed(result, rax), instr, CAN_DEOPTIMIZE_EAGERLY); in DoApplyArguments()
1116 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { in DoPushArgument() argument
1118 LOperand* argument = UseOrConstant(instr->argument()); in DoPushArgument()
1123 LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) { in DoThisFunction() argument
1124 return instr->HasNoUses() in DoThisFunction()
1130 LInstruction* LChunkBuilder::DoContext(HContext* instr) { in DoContext() argument
1131 return instr->HasNoUses() ? NULL : DefineAsRegister(new(zone()) LContext); in DoContext()
1135 LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) { in DoOuterContext() argument
1136 LOperand* context = UseRegisterAtStart(instr->value()); in DoOuterContext()
1141 LInstruction* LChunkBuilder::DoDeclareGlobals(HDeclareGlobals* instr) { in DoDeclareGlobals() argument
1142 return MarkAsCall(new(zone()) LDeclareGlobals, instr); in DoDeclareGlobals()
1146 LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) { in DoGlobalObject() argument
1151 LInstruction* LChunkBuilder::DoGlobalReceiver(HGlobalReceiver* instr) { in DoGlobalReceiver() argument
1152 LOperand* global_object = UseRegisterAtStart(instr->value()); in DoGlobalReceiver()
1158 HCallConstantFunction* instr) { in DoCallConstantFunction() argument
1159 argument_count_ -= instr->argument_count(); in DoCallConstantFunction()
1160 return MarkAsCall(DefineFixed(new(zone()) LCallConstantFunction, rax), instr); in DoCallConstantFunction()
1164 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { in DoInvokeFunction() argument
1165 LOperand* function = UseFixed(instr->function(), rdi); in DoInvokeFunction()
1166 argument_count_ -= instr->argument_count(); in DoInvokeFunction()
1168 return MarkAsCall(DefineFixed(result, rax), instr, CANNOT_DEOPTIMIZE_EAGERLY); in DoInvokeFunction()
1172 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { in DoUnaryMathOperation() argument
1173 BuiltinFunctionId op = instr->op(); in DoUnaryMathOperation()
1175 LOperand* input = UseFixedDouble(instr->value(), xmm1); in DoUnaryMathOperation()
1177 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); in DoUnaryMathOperation()
1179 LOperand* input = UseRegisterAtStart(instr->value()); in DoUnaryMathOperation()
1200 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { in DoCallKeyed() argument
1201 ASSERT(instr->key()->representation().IsTagged()); in DoCallKeyed()
1202 LOperand* key = UseFixed(instr->key(), rcx); in DoCallKeyed()
1203 argument_count_ -= instr->argument_count(); in DoCallKeyed()
1205 return MarkAsCall(DefineFixed(result, rax), instr); in DoCallKeyed()
1209 LInstruction* LChunkBuilder::DoCallNamed(HCallNamed* instr) { in DoCallNamed() argument
1210 argument_count_ -= instr->argument_count(); in DoCallNamed()
1211 return MarkAsCall(DefineFixed(new(zone()) LCallNamed, rax), instr); in DoCallNamed()
1215 LInstruction* LChunkBuilder::DoCallGlobal(HCallGlobal* instr) { in DoCallGlobal() argument
1216 argument_count_ -= instr->argument_count(); in DoCallGlobal()
1217 return MarkAsCall(DefineFixed(new(zone()) LCallGlobal, rax), instr); in DoCallGlobal()
1221 LInstruction* LChunkBuilder::DoCallKnownGlobal(HCallKnownGlobal* instr) { in DoCallKnownGlobal() argument
1222 argument_count_ -= instr->argument_count(); in DoCallKnownGlobal()
1223 return MarkAsCall(DefineFixed(new(zone()) LCallKnownGlobal, rax), instr); in DoCallKnownGlobal()
1227 LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) { in DoCallNew() argument
1228 LOperand* constructor = UseFixed(instr->constructor(), rdi); in DoCallNew()
1229 argument_count_ -= instr->argument_count(); in DoCallNew()
1231 return MarkAsCall(DefineFixed(result, rax), instr); in DoCallNew()
1235 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { in DoCallFunction() argument
1236 LOperand* function = UseFixed(instr->function(), rdi); in DoCallFunction()
1237 argument_count_ -= instr->argument_count(); in DoCallFunction()
1239 return MarkAsCall(DefineFixed(result, rax), instr); in DoCallFunction()
1243 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { in DoCallRuntime() argument
1244 argument_count_ -= instr->argument_count(); in DoCallRuntime()
1245 return MarkAsCall(DefineFixed(new(zone()) LCallRuntime, rax), instr); in DoCallRuntime()
1249 LInstruction* LChunkBuilder::DoShr(HShr* instr) { in DoShr() argument
1250 return DoShift(Token::SHR, instr); in DoShr()
1254 LInstruction* LChunkBuilder::DoSar(HSar* instr) { in DoSar() argument
1255 return DoShift(Token::SAR, instr); in DoSar()
1259 LInstruction* LChunkBuilder::DoShl(HShl* instr) { in DoShl() argument
1260 return DoShift(Token::SHL, instr); in DoShl()
1264 LInstruction* LChunkBuilder::DoBitwise(HBitwise* instr) { in DoBitwise() argument
1265 if (instr->representation().IsInteger32()) { in DoBitwise()
1266 ASSERT(instr->left()->representation().IsInteger32()); in DoBitwise()
1267 ASSERT(instr->right()->representation().IsInteger32()); in DoBitwise()
1269 LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand()); in DoBitwise()
1270 LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand()); in DoBitwise()
1273 ASSERT(instr->representation().IsTagged()); in DoBitwise()
1274 ASSERT(instr->left()->representation().IsTagged()); in DoBitwise()
1275 ASSERT(instr->right()->representation().IsTagged()); in DoBitwise()
1277 LOperand* left = UseFixed(instr->left(), rdx); in DoBitwise()
1278 LOperand* right = UseFixed(instr->right(), rax); in DoBitwise()
1279 LArithmeticT* result = new(zone()) LArithmeticT(instr->op(), left, right); in DoBitwise()
1280 return MarkAsCall(DefineFixed(result, rax), instr); in DoBitwise()
1285 LInstruction* LChunkBuilder::DoBitNot(HBitNot* instr) { in DoBitNot() argument
1286 ASSERT(instr->value()->representation().IsInteger32()); in DoBitNot()
1287 ASSERT(instr->representation().IsInteger32()); in DoBitNot()
1288 LOperand* input = UseRegisterAtStart(instr->value()); in DoBitNot()
1294 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { in DoDiv() argument
1295 if (instr->representation().IsDouble()) { in DoDiv()
1296 return DoArithmeticD(Token::DIV, instr); in DoDiv()
1297 } else if (instr->representation().IsInteger32()) { in DoDiv()
1301 LOperand* dividend = UseFixed(instr->left(), rax); in DoDiv()
1302 LOperand* divisor = UseRegister(instr->right()); in DoDiv()
1306 ASSERT(instr->representation().IsTagged()); in DoDiv()
1307 return DoArithmeticT(Token::DIV, instr); in DoDiv()
1312 LInstruction* LChunkBuilder::DoMod(HMod* instr) { in DoMod() argument
1313 if (instr->representation().IsInteger32()) { in DoMod()
1314 ASSERT(instr->left()->representation().IsInteger32()); in DoMod()
1315 ASSERT(instr->right()->representation().IsInteger32()); in DoMod()
1318 if (instr->HasPowerOf2Divisor()) { in DoMod()
1319 ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero)); in DoMod()
1320 LOperand* value = UseRegisterAtStart(instr->left()); in DoMod()
1322 new(zone()) LModI(value, UseOrConstant(instr->right()), NULL); in DoMod()
1328 LOperand* value = UseFixed(instr->left(), rax); in DoMod()
1329 LOperand* divisor = UseRegister(instr->right()); in DoMod()
1334 return (instr->CheckFlag(HValue::kBailoutOnMinusZero) || in DoMod()
1335 instr->CheckFlag(HValue::kCanBeDivByZero)) in DoMod()
1338 } else if (instr->representation().IsTagged()) { in DoMod()
1339 return DoArithmeticT(Token::MOD, instr); in DoMod()
1341 ASSERT(instr->representation().IsDouble()); in DoMod()
1345 LOperand* left = UseFixedDouble(instr->left(), xmm2); in DoMod()
1346 LOperand* right = UseFixedDouble(instr->right(), xmm1); in DoMod()
1348 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); in DoMod()
1353 LInstruction* LChunkBuilder::DoMul(HMul* instr) { in DoMul() argument
1354 if (instr->representation().IsInteger32()) { in DoMul()
1355 ASSERT(instr->left()->representation().IsInteger32()); in DoMul()
1356 ASSERT(instr->right()->representation().IsInteger32()); in DoMul()
1357 LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand()); in DoMul()
1358 LOperand* right = UseOrConstant(instr->MostConstantOperand()); in DoMul()
1360 if (instr->CheckFlag(HValue::kCanOverflow) || in DoMul()
1361 instr->CheckFlag(HValue::kBailoutOnMinusZero)) { in DoMul()
1365 } else if (instr->representation().IsDouble()) { in DoMul()
1366 return DoArithmeticD(Token::MUL, instr); in DoMul()
1368 ASSERT(instr->representation().IsTagged()); in DoMul()
1369 return DoArithmeticT(Token::MUL, instr); in DoMul()
1374 LInstruction* LChunkBuilder::DoSub(HSub* instr) { in DoSub() argument
1375 if (instr->representation().IsInteger32()) { in DoSub()
1376 ASSERT(instr->left()->representation().IsInteger32()); in DoSub()
1377 ASSERT(instr->right()->representation().IsInteger32()); in DoSub()
1378 LOperand* left = UseRegisterAtStart(instr->left()); in DoSub()
1379 LOperand* right = UseOrConstantAtStart(instr->right()); in DoSub()
1382 if (instr->CheckFlag(HValue::kCanOverflow)) { in DoSub()
1386 } else if (instr->representation().IsDouble()) { in DoSub()
1387 return DoArithmeticD(Token::SUB, instr); in DoSub()
1389 ASSERT(instr->representation().IsTagged()); in DoSub()
1390 return DoArithmeticT(Token::SUB, instr); in DoSub()
1395 LInstruction* LChunkBuilder::DoAdd(HAdd* instr) { in DoAdd() argument
1396 if (instr->representation().IsInteger32()) { in DoAdd()
1397 ASSERT(instr->left()->representation().IsInteger32()); in DoAdd()
1398 ASSERT(instr->right()->representation().IsInteger32()); in DoAdd()
1399 LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand()); in DoAdd()
1400 LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand()); in DoAdd()
1403 if (instr->CheckFlag(HValue::kCanOverflow)) { in DoAdd()
1407 } else if (instr->representation().IsDouble()) { in DoAdd()
1408 return DoArithmeticD(Token::ADD, instr); in DoAdd()
1410 ASSERT(instr->representation().IsTagged()); in DoAdd()
1411 return DoArithmeticT(Token::ADD, instr); in DoAdd()
1417 LInstruction* LChunkBuilder::DoPower(HPower* instr) { in DoPower() argument
1418 ASSERT(instr->representation().IsDouble()); in DoPower()
1421 Representation exponent_type = instr->right()->representation(); in DoPower()
1422 ASSERT(instr->left()->representation().IsDouble()); in DoPower()
1423 LOperand* left = UseFixedDouble(instr->left(), xmm2); in DoPower()
1425 UseFixedDouble(instr->right(), xmm1) : in DoPower()
1427 UseFixed(instr->right(), rdx); in DoPower()
1429 UseFixed(instr->right(), rdi); in DoPower()
1432 return MarkAsCall(DefineFixedDouble(result, xmm3), instr, in DoPower()
1437 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) { in DoRandom() argument
1438 ASSERT(instr->representation().IsDouble()); in DoRandom()
1439 ASSERT(instr->global_object()->representation().IsTagged()); in DoRandom()
1441 LOperand* global_object = UseFixed(instr->global_object(), rcx); in DoRandom()
1443 LOperand* global_object = UseFixed(instr->global_object(), rdi); in DoRandom()
1446 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); in DoRandom()
1450 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { in DoCompareGeneric() argument
1451 ASSERT(instr->left()->representation().IsTagged()); in DoCompareGeneric()
1452 ASSERT(instr->right()->representation().IsTagged()); in DoCompareGeneric()
1453 LOperand* left = UseFixed(instr->left(), rdx); in DoCompareGeneric()
1454 LOperand* right = UseFixed(instr->right(), rax); in DoCompareGeneric()
1456 return MarkAsCall(DefineFixed(result, rax), instr); in DoCompareGeneric()
1461 HCompareIDAndBranch* instr) { in DoCompareIDAndBranch() argument
1462 Representation r = instr->GetInputRepresentation(); in DoCompareIDAndBranch()
1464 ASSERT(instr->left()->representation().IsInteger32()); in DoCompareIDAndBranch()
1465 ASSERT(instr->right()->representation().IsInteger32()); in DoCompareIDAndBranch()
1466 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); in DoCompareIDAndBranch()
1467 LOperand* right = UseOrConstantAtStart(instr->right()); in DoCompareIDAndBranch()
1471 ASSERT(instr->left()->representation().IsDouble()); in DoCompareIDAndBranch()
1472 ASSERT(instr->right()->representation().IsDouble()); in DoCompareIDAndBranch()
1475 if (instr->left()->IsConstant() && instr->right()->IsConstant()) { in DoCompareIDAndBranch()
1476 left = UseRegisterOrConstantAtStart(instr->left()); in DoCompareIDAndBranch()
1477 right = UseRegisterOrConstantAtStart(instr->right()); in DoCompareIDAndBranch()
1479 left = UseRegisterAtStart(instr->left()); in DoCompareIDAndBranch()
1480 right = UseRegisterAtStart(instr->right()); in DoCompareIDAndBranch()
1488 HCompareObjectEqAndBranch* instr) { in DoCompareObjectEqAndBranch() argument
1489 LOperand* left = UseRegisterAtStart(instr->left()); in DoCompareObjectEqAndBranch()
1490 LOperand* right = UseRegisterAtStart(instr->right()); in DoCompareObjectEqAndBranch()
1496 HCompareConstantEqAndBranch* instr) { in DoCompareConstantEqAndBranch() argument
1497 LOperand* value = UseRegisterAtStart(instr->value()); in DoCompareConstantEqAndBranch()
1502 LInstruction* LChunkBuilder::DoIsNilAndBranch(HIsNilAndBranch* instr) { in DoIsNilAndBranch() argument
1503 ASSERT(instr->value()->representation().IsTagged()); in DoIsNilAndBranch()
1504 LOperand* temp = instr->kind() == kStrictEquality ? NULL : TempRegister(); in DoIsNilAndBranch()
1505 return new(zone()) LIsNilAndBranch(UseRegisterAtStart(instr->value()), temp); in DoIsNilAndBranch()
1509 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { in DoIsObjectAndBranch() argument
1510 ASSERT(instr->value()->representation().IsTagged()); in DoIsObjectAndBranch()
1511 return new(zone()) LIsObjectAndBranch(UseRegisterAtStart(instr->value())); in DoIsObjectAndBranch()
1515 LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { in DoIsStringAndBranch() argument
1516 ASSERT(instr->value()->representation().IsTagged()); in DoIsStringAndBranch()
1517 LOperand* value = UseRegisterAtStart(instr->value()); in DoIsStringAndBranch()
1523 LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) { in DoIsSmiAndBranch() argument
1524 ASSERT(instr->value()->representation().IsTagged()); in DoIsSmiAndBranch()
1525 return new(zone()) LIsSmiAndBranch(Use(instr->value())); in DoIsSmiAndBranch()
1530 HIsUndetectableAndBranch* instr) { in DoIsUndetectableAndBranch() argument
1531 ASSERT(instr->value()->representation().IsTagged()); in DoIsUndetectableAndBranch()
1532 LOperand* value = UseRegisterAtStart(instr->value()); in DoIsUndetectableAndBranch()
1539 HStringCompareAndBranch* instr) { in DoStringCompareAndBranch() argument
1541 ASSERT(instr->left()->representation().IsTagged()); in DoStringCompareAndBranch()
1542 ASSERT(instr->right()->representation().IsTagged()); in DoStringCompareAndBranch()
1543 LOperand* left = UseFixed(instr->left(), rdx); in DoStringCompareAndBranch()
1544 LOperand* right = UseFixed(instr->right(), rax); in DoStringCompareAndBranch()
1548 return MarkAsCall(result, instr); in DoStringCompareAndBranch()
1553 HHasInstanceTypeAndBranch* instr) { in DoHasInstanceTypeAndBranch() argument
1554 ASSERT(instr->value()->representation().IsTagged()); in DoHasInstanceTypeAndBranch()
1555 LOperand* value = UseRegisterAtStart(instr->value()); in DoHasInstanceTypeAndBranch()
1561 HGetCachedArrayIndex* instr) { in DoGetCachedArrayIndex() argument
1562 ASSERT(instr->value()->representation().IsTagged()); in DoGetCachedArrayIndex()
1563 LOperand* value = UseRegisterAtStart(instr->value()); in DoGetCachedArrayIndex()
1570 HHasCachedArrayIndexAndBranch* instr) { in DoHasCachedArrayIndexAndBranch() argument
1571 ASSERT(instr->value()->representation().IsTagged()); in DoHasCachedArrayIndexAndBranch()
1572 LOperand* value = UseRegisterAtStart(instr->value()); in DoHasCachedArrayIndexAndBranch()
1578 HClassOfTestAndBranch* instr) { in DoClassOfTestAndBranch() argument
1579 LOperand* value = UseRegister(instr->value()); in DoClassOfTestAndBranch()
1586 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) { in DoJSArrayLength() argument
1587 LOperand* array = UseRegisterAtStart(instr->value()); in DoJSArrayLength()
1593 HFixedArrayBaseLength* instr) { in DoFixedArrayBaseLength() argument
1594 LOperand* array = UseRegisterAtStart(instr->value()); in DoFixedArrayBaseLength()
1599 LInstruction* LChunkBuilder::DoElementsKind(HElementsKind* instr) { in DoElementsKind() argument
1600 LOperand* object = UseRegisterAtStart(instr->value()); in DoElementsKind()
1605 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { in DoValueOf() argument
1606 LOperand* object = UseRegister(instr->value()); in DoValueOf()
1612 LInstruction* LChunkBuilder::DoDateField(HDateField* instr) { in DoDateField() argument
1613 LOperand* object = UseFixed(instr->value(), rax); in DoDateField()
1614 LDateField* result = new LDateField(object, instr->index()); in DoDateField()
1615 return MarkAsCall(DefineFixed(result, rax), instr); in DoDateField()
1619 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { in DoBoundsCheck() argument
1620 LOperand* value = UseRegisterOrConstantAtStart(instr->index()); in DoBoundsCheck()
1621 LOperand* length = Use(instr->length()); in DoBoundsCheck()
1626 LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { in DoAbnormalExit() argument
1633 LInstruction* LChunkBuilder::DoThrow(HThrow* instr) { in DoThrow() argument
1634 LOperand* value = UseFixed(instr->value(), rax); in DoThrow()
1635 return MarkAsCall(new(zone()) LThrow(value), instr); in DoThrow()
1639 LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) { in DoUseConst() argument
1652 LInstruction* LChunkBuilder::DoChange(HChange* instr) { in DoChange() argument
1653 Representation from = instr->from(); in DoChange()
1654 Representation to = instr->to(); in DoChange()
1657 LOperand* value = UseRegister(instr->value()); in DoChange()
1662 LOperand* value = UseRegister(instr->value()); in DoChange()
1663 bool needs_check = !instr->value()->type().IsSmi(); in DoChange()
1665 bool truncating = instr->CanTruncateToInt32(); in DoChange()
1675 LOperand* value = UseRegister(instr->value()); in DoChange()
1684 LOperand* value = UseRegister(instr->value()); in DoChange()
1689 HValue* val = instr->value(); in DoChange()
1699 LOperand* value = Use(instr->value()); in DoChange()
1708 LInstruction* LChunkBuilder::DoCheckNonSmi(HCheckNonSmi* instr) { in DoCheckNonSmi() argument
1709 LOperand* value = UseRegisterAtStart(instr->value()); in DoCheckNonSmi()
1714 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { in DoCheckInstanceType() argument
1715 LOperand* value = UseRegisterAtStart(instr->value()); in DoCheckInstanceType()
1721 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { in DoCheckPrototypeMaps() argument
1728 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { in DoCheckSmi() argument
1729 LOperand* value = UseRegisterAtStart(instr->value()); in DoCheckSmi()
1734 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { in DoCheckFunction() argument
1735 LOperand* value = UseRegisterAtStart(instr->value()); in DoCheckFunction()
1740 LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) { in DoCheckMap() argument
1741 LOperand* value = UseRegisterAtStart(instr->value()); in DoCheckMap()
1747 LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { in DoClampToUint8() argument
1748 HValue* value = instr->value(); in DoClampToUint8()
1768 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { in DoReturn() argument
1769 return new(zone()) LReturn(UseFixed(instr->value(), rax)); in DoReturn()
1773 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { in DoConstant() argument
1774 Representation r = instr->representation(); in DoConstant()
1789 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { in DoLoadGlobalCell() argument
1791 return instr->RequiresHoleCheck() in DoLoadGlobalCell()
1797 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { in DoLoadGlobalGeneric() argument
1798 LOperand* global_object = UseFixed(instr->global_object(), rax); in DoLoadGlobalGeneric()
1800 return MarkAsCall(DefineFixed(result, rax), instr); in DoLoadGlobalGeneric()
1804 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { in DoStoreGlobalCell() argument
1805 LOperand* value = UseRegister(instr->value()); in DoStoreGlobalCell()
1808 return instr->RequiresHoleCheck() in DoStoreGlobalCell()
1814 LInstruction* LChunkBuilder::DoStoreGlobalGeneric(HStoreGlobalGeneric* instr) { in DoStoreGlobalGeneric() argument
1815 LOperand* global_object = UseFixed(instr->global_object(), rdx); in DoStoreGlobalGeneric()
1816 LOperand* value = UseFixed(instr->value(), rax); in DoStoreGlobalGeneric()
1819 return MarkAsCall(result, instr); in DoStoreGlobalGeneric()
1823 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { in DoLoadContextSlot() argument
1824 LOperand* context = UseRegisterAtStart(instr->value()); in DoLoadContextSlot()
1827 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; in DoLoadContextSlot()
1831 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { in DoStoreContextSlot() argument
1835 if (instr->NeedsWriteBarrier()) { in DoStoreContextSlot()
1836 context = UseTempRegister(instr->context()); in DoStoreContextSlot()
1837 value = UseTempRegister(instr->value()); in DoStoreContextSlot()
1840 context = UseRegister(instr->context()); in DoStoreContextSlot()
1841 value = UseRegister(instr->value()); in DoStoreContextSlot()
1845 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; in DoStoreContextSlot()
1849 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { in DoLoadNamedField() argument
1850 ASSERT(instr->representation().IsTagged()); in DoLoadNamedField()
1851 LOperand* obj = UseRegisterAtStart(instr->object()); in DoLoadNamedField()
1857 HLoadNamedFieldPolymorphic* instr) { in DoLoadNamedFieldPolymorphic() argument
1858 ASSERT(instr->representation().IsTagged()); in DoLoadNamedFieldPolymorphic()
1859 if (instr->need_generic()) { in DoLoadNamedFieldPolymorphic()
1860 LOperand* obj = UseFixed(instr->object(), rax); in DoLoadNamedFieldPolymorphic()
1863 return MarkAsCall(DefineFixed(result, rax), instr); in DoLoadNamedFieldPolymorphic()
1865 LOperand* obj = UseRegisterAtStart(instr->object()); in DoLoadNamedFieldPolymorphic()
1873 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { in DoLoadNamedGeneric() argument
1874 LOperand* object = UseFixed(instr->object(), rax); in DoLoadNamedGeneric()
1876 return MarkAsCall(DefineFixed(result, rax), instr); in DoLoadNamedGeneric()
1881 HLoadFunctionPrototype* instr) { in DoLoadFunctionPrototype() argument
1883 new(zone()) LLoadFunctionPrototype(UseRegister(instr->function())))); in DoLoadFunctionPrototype()
1887 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) { in DoLoadElements() argument
1888 LOperand* input = UseRegisterAtStart(instr->value()); in DoLoadElements()
1894 HLoadExternalArrayPointer* instr) { in DoLoadExternalArrayPointer() argument
1895 LOperand* input = UseRegisterAtStart(instr->value()); in DoLoadExternalArrayPointer()
1901 HLoadKeyedFastElement* instr) { in DoLoadKeyedFastElement() argument
1902 ASSERT(instr->representation().IsTagged()); in DoLoadKeyedFastElement()
1903 ASSERT(instr->key()->representation().IsInteger32()); in DoLoadKeyedFastElement()
1904 LOperand* obj = UseRegisterAtStart(instr->object()); in DoLoadKeyedFastElement()
1905 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); in DoLoadKeyedFastElement()
1907 if (instr->RequiresHoleCheck()) AssignEnvironment(result); in DoLoadKeyedFastElement()
1913 HLoadKeyedFastDoubleElement* instr) { in DoLoadKeyedFastDoubleElement() argument
1914 ASSERT(instr->representation().IsDouble()); in DoLoadKeyedFastDoubleElement()
1915 ASSERT(instr->key()->representation().IsInteger32()); in DoLoadKeyedFastDoubleElement()
1916 LOperand* elements = UseRegisterAtStart(instr->elements()); in DoLoadKeyedFastDoubleElement()
1917 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); in DoLoadKeyedFastDoubleElement()
1925 HLoadKeyedSpecializedArrayElement* instr) { in DoLoadKeyedSpecializedArrayElement() argument
1926 ElementsKind elements_kind = instr->elements_kind(); in DoLoadKeyedSpecializedArrayElement()
1928 (instr->representation().IsInteger32() && in DoLoadKeyedSpecializedArrayElement()
1931 (instr->representation().IsDouble() && in DoLoadKeyedSpecializedArrayElement()
1934 ASSERT(instr->key()->representation().IsInteger32()); in DoLoadKeyedSpecializedArrayElement()
1935 LOperand* external_pointer = UseRegister(instr->external_pointer()); in DoLoadKeyedSpecializedArrayElement()
1936 LOperand* key = UseRegisterOrConstant(instr->key()); in DoLoadKeyedSpecializedArrayElement()
1947 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { in DoLoadKeyedGeneric() argument
1948 LOperand* object = UseFixed(instr->object(), rdx); in DoLoadKeyedGeneric()
1949 LOperand* key = UseFixed(instr->key(), rax); in DoLoadKeyedGeneric()
1952 return MarkAsCall(DefineFixed(result, rax), instr); in DoLoadKeyedGeneric()
1957 HStoreKeyedFastElement* instr) { in DoStoreKeyedFastElement() argument
1958 bool needs_write_barrier = instr->NeedsWriteBarrier(); in DoStoreKeyedFastElement()
1959 ASSERT(instr->value()->representation().IsTagged()); in DoStoreKeyedFastElement()
1960 ASSERT(instr->object()->representation().IsTagged()); in DoStoreKeyedFastElement()
1961 ASSERT(instr->key()->representation().IsInteger32()); in DoStoreKeyedFastElement()
1963 LOperand* obj = UseTempRegister(instr->object()); in DoStoreKeyedFastElement()
1965 ? UseTempRegister(instr->value()) in DoStoreKeyedFastElement()
1966 : UseRegisterAtStart(instr->value()); in DoStoreKeyedFastElement()
1968 ? UseTempRegister(instr->key()) in DoStoreKeyedFastElement()
1969 : UseRegisterOrConstantAtStart(instr->key()); in DoStoreKeyedFastElement()
1975 HStoreKeyedFastDoubleElement* instr) { in DoStoreKeyedFastDoubleElement() argument
1976 ASSERT(instr->value()->representation().IsDouble()); in DoStoreKeyedFastDoubleElement()
1977 ASSERT(instr->elements()->representation().IsTagged()); in DoStoreKeyedFastDoubleElement()
1978 ASSERT(instr->key()->representation().IsInteger32()); in DoStoreKeyedFastDoubleElement()
1980 LOperand* elements = UseRegisterAtStart(instr->elements()); in DoStoreKeyedFastDoubleElement()
1981 LOperand* val = UseTempRegister(instr->value()); in DoStoreKeyedFastDoubleElement()
1982 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); in DoStoreKeyedFastDoubleElement()
1989 HStoreKeyedSpecializedArrayElement* instr) { in DoStoreKeyedSpecializedArrayElement() argument
1990 ElementsKind elements_kind = instr->elements_kind(); in DoStoreKeyedSpecializedArrayElement()
1992 (instr->value()->representation().IsInteger32() && in DoStoreKeyedSpecializedArrayElement()
1995 (instr->value()->representation().IsDouble() && in DoStoreKeyedSpecializedArrayElement()
1998 ASSERT(instr->external_pointer()->representation().IsExternal()); in DoStoreKeyedSpecializedArrayElement()
1999 ASSERT(instr->key()->representation().IsInteger32()); in DoStoreKeyedSpecializedArrayElement()
2001 LOperand* external_pointer = UseRegister(instr->external_pointer()); in DoStoreKeyedSpecializedArrayElement()
2006 ? UseTempRegister(instr->value()) in DoStoreKeyedSpecializedArrayElement()
2007 : UseRegister(instr->value()); in DoStoreKeyedSpecializedArrayElement()
2008 LOperand* key = UseRegisterOrConstant(instr->key()); in DoStoreKeyedSpecializedArrayElement()
2016 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { in DoStoreKeyedGeneric() argument
2017 LOperand* object = UseFixed(instr->object(), rdx); in DoStoreKeyedGeneric()
2018 LOperand* key = UseFixed(instr->key(), rcx); in DoStoreKeyedGeneric()
2019 LOperand* value = UseFixed(instr->value(), rax); in DoStoreKeyedGeneric()
2021 ASSERT(instr->object()->representation().IsTagged()); in DoStoreKeyedGeneric()
2022 ASSERT(instr->key()->representation().IsTagged()); in DoStoreKeyedGeneric()
2023 ASSERT(instr->value()->representation().IsTagged()); in DoStoreKeyedGeneric()
2027 return MarkAsCall(result, instr); in DoStoreKeyedGeneric()
2032 HTransitionElementsKind* instr) { in DoTransitionElementsKind() argument
2033 if (instr->original_map()->elements_kind() == FAST_SMI_ONLY_ELEMENTS && in DoTransitionElementsKind()
2034 instr->transitioned_map()->elements_kind() == FAST_ELEMENTS) { in DoTransitionElementsKind()
2035 LOperand* object = UseRegister(instr->object()); in DoTransitionElementsKind()
2042 LOperand* object = UseFixed(instr->object(), rax); in DoTransitionElementsKind()
2049 return MarkAsCall(DefineFixed(result, rax), instr); in DoTransitionElementsKind()
2054 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { in DoStoreNamedField() argument
2055 bool needs_write_barrier = instr->NeedsWriteBarrier(); in DoStoreNamedField()
2058 ? UseTempRegister(instr->object()) in DoStoreNamedField()
2059 : UseRegisterAtStart(instr->object()); in DoStoreNamedField()
2062 ? UseTempRegister(instr->value()) in DoStoreNamedField()
2063 : UseRegister(instr->value()); in DoStoreNamedField()
2067 LOperand* temp = (!instr->is_in_object() || needs_write_barrier) in DoStoreNamedField()
2074 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { in DoStoreNamedGeneric() argument
2075 LOperand* object = UseFixed(instr->object(), rdx); in DoStoreNamedGeneric()
2076 LOperand* value = UseFixed(instr->value(), rax); in DoStoreNamedGeneric()
2079 return MarkAsCall(result, instr); in DoStoreNamedGeneric()
2083 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { in DoStringAdd() argument
2084 LOperand* left = UseOrConstantAtStart(instr->left()); in DoStringAdd()
2085 LOperand* right = UseOrConstantAtStart(instr->right()); in DoStringAdd()
2087 instr); in DoStringAdd()
2091 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) { in DoStringCharCodeAt() argument
2092 LOperand* string = UseTempRegister(instr->string()); in DoStringCharCodeAt()
2093 LOperand* index = UseTempRegister(instr->index()); in DoStringCharCodeAt()
2099 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { in DoStringCharFromCode() argument
2100 LOperand* char_code = UseRegister(instr->value()); in DoStringCharFromCode()
2106 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { in DoStringLength() argument
2107 LOperand* string = UseRegisterAtStart(instr->value()); in DoStringLength()
2112 LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) { in DoAllocateObject() argument
2118 LInstruction* LChunkBuilder::DoFastLiteral(HFastLiteral* instr) { in DoFastLiteral() argument
2119 return MarkAsCall(DefineFixed(new(zone()) LFastLiteral, rax), instr); in DoFastLiteral()
2123 LInstruction* LChunkBuilder::DoArrayLiteral(HArrayLiteral* instr) { in DoArrayLiteral() argument
2124 return MarkAsCall(DefineFixed(new(zone()) LArrayLiteral, rax), instr); in DoArrayLiteral()
2128 LInstruction* LChunkBuilder::DoObjectLiteral(HObjectLiteral* instr) { in DoObjectLiteral() argument
2129 return MarkAsCall(DefineFixed(new(zone()) LObjectLiteral, rax), instr); in DoObjectLiteral()
2133 LInstruction* LChunkBuilder::DoRegExpLiteral(HRegExpLiteral* instr) { in DoRegExpLiteral() argument
2134 return MarkAsCall(DefineFixed(new(zone()) LRegExpLiteral, rax), instr); in DoRegExpLiteral()
2138 LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) { in DoFunctionLiteral() argument
2139 return MarkAsCall(DefineFixed(new(zone()) LFunctionLiteral, rax), instr); in DoFunctionLiteral()
2143 LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) { in DoDeleteProperty() argument
2144 LOperand* object = UseAtStart(instr->object()); in DoDeleteProperty()
2145 LOperand* key = UseOrConstantAtStart(instr->key()); in DoDeleteProperty()
2147 return MarkAsCall(DefineFixed(result, rax), instr); in DoDeleteProperty()
2151 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { in DoOsrEntry() argument
2153 current_block_->last_environment()->set_ast_id(instr->ast_id()); in DoOsrEntry()
2158 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { in DoParameter() argument
2159 int spill_index = chunk()->GetParameterStackSlot(instr->index()); in DoParameter()
2164 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { in DoUnknownOSRValue() argument
2174 LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) { in DoCallStub() argument
2175 argument_count_ -= instr->argument_count(); in DoCallStub()
2176 return MarkAsCall(DefineFixed(new(zone()) LCallStub, rax), instr); in DoCallStub()
2180 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) { in DoArgumentsObject() argument
2189 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { in DoAccessArgumentsAt() argument
2190 LOperand* arguments = UseRegister(instr->arguments()); in DoAccessArgumentsAt()
2191 LOperand* length = UseTempRegister(instr->length()); in DoAccessArgumentsAt()
2192 LOperand* index = Use(instr->index()); in DoAccessArgumentsAt()
2199 LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) { in DoToFastProperties() argument
2200 LOperand* object = UseFixed(instr->value(), rax); in DoToFastProperties()
2202 return MarkAsCall(DefineFixed(result, rax), instr); in DoToFastProperties()
2206 LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) { in DoTypeof() argument
2207 LTypeof* result = new(zone()) LTypeof(UseAtStart(instr->value())); in DoTypeof()
2208 return MarkAsCall(DefineFixed(result, rax), instr); in DoTypeof()
2212 LInstruction* LChunkBuilder::DoTypeofIsAndBranch(HTypeofIsAndBranch* instr) { in DoTypeofIsAndBranch() argument
2213 return new(zone()) LTypeofIsAndBranch(UseTempRegister(instr->value())); in DoTypeofIsAndBranch()
2218 HIsConstructCallAndBranch* instr) { in DoIsConstructCallAndBranch() argument
2223 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { in DoSimulate() argument
2227 env->set_ast_id(instr->ast_id()); in DoSimulate()
2229 env->Drop(instr->pop_count()); in DoSimulate()
2230 for (int i = 0; i < instr->values()->length(); ++i) { in DoSimulate()
2231 HValue* value = instr->values()->at(i); in DoSimulate()
2232 if (instr->HasAssignedIndexAt(i)) { in DoSimulate()
2233 env->Bind(instr->GetAssignedIndexAt(i), value); in DoSimulate()
2241 if (pending_deoptimization_ast_id_ == instr->ast_id()) { in DoSimulate()
2254 LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) { in DoStackCheck() argument
2255 if (instr->is_function_entry()) { in DoStackCheck()
2256 return MarkAsCall(new(zone()) LStackCheck, instr); in DoStackCheck()
2258 ASSERT(instr->is_backwards_branch()); in DoStackCheck()
2264 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { in DoEnterInlined() argument
2267 HEnvironment* inner = outer->CopyForInlining(instr->closure(), in DoEnterInlined()
2268 instr->arguments_count(), in DoEnterInlined()
2269 instr->function(), in DoEnterInlined()
2271 instr->call_kind(), in DoEnterInlined()
2272 instr->is_construct()); in DoEnterInlined()
2273 if (instr->arguments() != NULL) { in DoEnterInlined()
2274 inner->Bind(instr->arguments(), graph()->GetArgumentsObject()); in DoEnterInlined()
2277 chunk_->AddInlinedClosure(instr->closure()); in DoEnterInlined()
2282 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { in DoLeaveInlined() argument
2290 LInstruction* LChunkBuilder::DoIn(HIn* instr) { in DoIn() argument
2291 LOperand* key = UseOrConstantAtStart(instr->key()); in DoIn()
2292 LOperand* object = UseOrConstantAtStart(instr->object()); in DoIn()
2294 return MarkAsCall(DefineFixed(result, rax), instr); in DoIn()
2298 LInstruction* LChunkBuilder::DoForInPrepareMap(HForInPrepareMap* instr) { in DoForInPrepareMap() argument
2299 LOperand* object = UseFixed(instr->enumerable(), rax); in DoForInPrepareMap()
2301 return MarkAsCall(DefineFixed(result, rax), instr, CAN_DEOPTIMIZE_EAGERLY); in DoForInPrepareMap()
2305 LInstruction* LChunkBuilder::DoForInCacheArray(HForInCacheArray* instr) { in DoForInCacheArray() argument
2306 LOperand* map = UseRegister(instr->map()); in DoForInCacheArray()
2312 LInstruction* LChunkBuilder::DoCheckMapValue(HCheckMapValue* instr) { in DoCheckMapValue() argument
2313 LOperand* value = UseRegisterAtStart(instr->value()); in DoCheckMapValue()
2314 LOperand* map = UseRegisterAtStart(instr->map()); in DoCheckMapValue()
2319 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { in DoLoadFieldByIndex() argument
2320 LOperand* object = UseRegister(instr->object()); in DoLoadFieldByIndex()
2321 LOperand* index = UseTempRegister(instr->index()); in DoLoadFieldByIndex()