Lines Matching refs:instr
206 void LCodeGen::DoPrologue(LPrologue* instr) { in DoPrologue() argument
323 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) { in GenerateBodyInstructionPre() argument
324 if (instr->IsCall()) { in GenerateBodyInstructionPre()
327 if (!instr->IsLazyBailout() && !instr->IsGap()) { in GenerateBodyInstructionPre()
330 FlushX87StackIfNecessary(instr); in GenerateBodyInstructionPre()
334 void LCodeGen::GenerateBodyInstructionPost(LInstruction* instr) { in GenerateBodyInstructionPost() argument
336 if (instr->IsCall() && instr->ClobbersDoubleRegisters(isolate())) { in GenerateBodyInstructionPost()
337 bool double_result = instr->HasDoubleRegisterResult(); in GenerateBodyInstructionPost()
348 if (instr->IsGoto()) { in GenerateBodyInstructionPost()
349 x87_stack_.LeavingBlock(current_block_, LGoto::cast(instr), this); in GenerateBodyInstructionPost()
351 !instr->IsGap() && !instr->IsReturn()) { in GenerateBodyInstructionPost()
352 if (instr->ClobbersDoubleRegisters(isolate())) { in GenerateBodyInstructionPost()
353 if (instr->HasDoubleRegisterResult()) { in GenerateBodyInstructionPost()
450 code->instr()->hydrogen_value()->id(), in GenerateDeferredCode()
451 code->instr()->Mnemonic()); in GenerateDeferredCode()
697 void LCodeGen::X87Stack::FlushIfNecessary(LInstruction* instr, LCodeGen* cgen) { in FlushIfNecessary() argument
698 if (stack_depth_ > 0 && instr->ClobbersDoubleRegisters(isolate())) { in FlushIfNecessary()
699 bool double_inputs = instr->HasDoubleRegisterInput(); in FlushIfNecessary()
706 if (double_inputs && instr->IsDoubleInput(reg, cgen)) { in FlushIfNecessary()
713 if (instr->IsReturn()) { in FlushIfNecessary()
974 LInstruction* instr, in CallCodeGeneric() argument
976 DCHECK(instr != NULL); in CallCodeGeneric()
978 RecordSafepointWithLazyDeopt(instr, safepoint_mode); in CallCodeGeneric()
991 LInstruction* instr) { in CallCode() argument
992 CallCodeGeneric(code, mode, instr, RECORD_SIMPLE_SAFEPOINT); in CallCode()
997 LInstruction* instr, SaveFPRegsMode save_doubles) { in CallRuntime() argument
998 DCHECK(instr != NULL); in CallRuntime()
999 DCHECK(instr->HasPointerMap()); in CallRuntime()
1003 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT); in CallRuntime()
1027 LInstruction* instr, in CallRuntimeFromDeferred() argument
1033 instr->pointer_map(), argc, Safepoint::kNoLazyDeopt); in CallRuntimeFromDeferred()
1076 void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr, in DeoptimizeIf() argument
1079 LEnvironment* environment = instr->environment(); in DeoptimizeIf()
1139 Deoptimizer::DeoptInfo deopt_info = MakeDeoptInfo(instr, deopt_reason); in DeoptimizeIf()
1165 void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr, in DeoptimizeIf() argument
1170 DeoptimizeIf(cc, instr, deopt_reason, bailout_type); in DeoptimizeIf()
1175 LInstruction* instr, SafepointMode safepoint_mode) { in RecordSafepointWithLazyDeopt() argument
1177 RecordSafepoint(instr->pointer_map(), Safepoint::kLazyDeopt); in RecordSafepointWithLazyDeopt()
1181 instr->pointer_map(), 0, Safepoint::kLazyDeopt); in RecordSafepointWithLazyDeopt()
1277 void LCodeGen::DoInstructionGap(LInstructionGap* instr) { in DoInstructionGap() argument
1278 DoGap(instr); in DoInstructionGap()
1282 void LCodeGen::DoParameter(LParameter* instr) { in DoParameter() argument
1287 void LCodeGen::DoCallStub(LCallStub* instr) { in DoCallStub() argument
1288 DCHECK(ToRegister(instr->context()).is(esi)); in DoCallStub()
1289 DCHECK(ToRegister(instr->result()).is(eax)); in DoCallStub()
1290 switch (instr->hydrogen()->major_key()) { in DoCallStub()
1293 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); in DoCallStub()
1298 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); in DoCallStub()
1307 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { in DoUnknownOSRValue() argument
1312 void LCodeGen::DoModByPowerOf2I(LModByPowerOf2I* instr) { in DoModByPowerOf2I() argument
1313 Register dividend = ToRegister(instr->dividend()); in DoModByPowerOf2I()
1314 int32_t divisor = instr->divisor(); in DoModByPowerOf2I()
1315 DCHECK(dividend.is(ToRegister(instr->result()))); in DoModByPowerOf2I()
1323 HMod* hmod = instr->hydrogen(); in DoModByPowerOf2I()
1334 DeoptimizeIf(zero, instr, Deoptimizer::kMinusZero); in DoModByPowerOf2I()
1345 void LCodeGen::DoModByConstI(LModByConstI* instr) { in DoModByConstI() argument
1346 Register dividend = ToRegister(instr->dividend()); in DoModByConstI()
1347 int32_t divisor = instr->divisor(); in DoModByConstI()
1348 DCHECK(ToRegister(instr->result()).is(eax)); in DoModByConstI()
1351 DeoptimizeIf(no_condition, instr, Deoptimizer::kDivisionByZero); in DoModByConstI()
1361 HMod* hmod = instr->hydrogen(); in DoModByConstI()
1366 DeoptimizeIf(less, instr, Deoptimizer::kMinusZero); in DoModByConstI()
1372 void LCodeGen::DoModI(LModI* instr) { in DoModI() argument
1373 HMod* hmod = instr->hydrogen(); in DoModI()
1375 Register left_reg = ToRegister(instr->left()); in DoModI()
1377 Register right_reg = ToRegister(instr->right()); in DoModI()
1380 Register result_reg = ToRegister(instr->result()); in DoModI()
1388 DeoptimizeIf(zero, instr, Deoptimizer::kDivisionByZero); in DoModI()
1399 DeoptimizeIf(equal, instr, Deoptimizer::kMinusZero); in DoModI()
1418 DeoptimizeIf(zero, instr, Deoptimizer::kMinusZero); in DoModI()
1427 void LCodeGen::DoDivByPowerOf2I(LDivByPowerOf2I* instr) { in DoDivByPowerOf2I() argument
1428 Register dividend = ToRegister(instr->dividend()); in DoDivByPowerOf2I()
1429 int32_t divisor = instr->divisor(); in DoDivByPowerOf2I()
1430 Register result = ToRegister(instr->result()); in DoDivByPowerOf2I()
1435 HDiv* hdiv = instr->hydrogen(); in DoDivByPowerOf2I()
1438 DeoptimizeIf(zero, instr, Deoptimizer::kMinusZero); in DoDivByPowerOf2I()
1443 DeoptimizeIf(zero, instr, Deoptimizer::kOverflow); in DoDivByPowerOf2I()
1450 DeoptimizeIf(not_zero, instr, Deoptimizer::kLostPrecision); in DoDivByPowerOf2I()
1465 void LCodeGen::DoDivByConstI(LDivByConstI* instr) { in DoDivByConstI() argument
1466 Register dividend = ToRegister(instr->dividend()); in DoDivByConstI()
1467 int32_t divisor = instr->divisor(); in DoDivByConstI()
1468 DCHECK(ToRegister(instr->result()).is(edx)); in DoDivByConstI()
1471 DeoptimizeIf(no_condition, instr, Deoptimizer::kDivisionByZero); in DoDivByConstI()
1476 HDiv* hdiv = instr->hydrogen(); in DoDivByConstI()
1479 DeoptimizeIf(zero, instr, Deoptimizer::kMinusZero); in DoDivByConstI()
1489 DeoptimizeIf(not_equal, instr, Deoptimizer::kLostPrecision); in DoDivByConstI()
1495 void LCodeGen::DoDivI(LDivI* instr) { in DoDivI() argument
1496 HBinaryOperation* hdiv = instr->hydrogen(); in DoDivI()
1497 Register dividend = ToRegister(instr->dividend()); in DoDivI()
1498 Register divisor = ToRegister(instr->divisor()); in DoDivI()
1499 Register remainder = ToRegister(instr->temp()); in DoDivI()
1502 DCHECK(ToRegister(instr->result()).is(eax)); in DoDivI()
1509 DeoptimizeIf(zero, instr, Deoptimizer::kDivisionByZero); in DoDivI()
1518 DeoptimizeIf(sign, instr, Deoptimizer::kMinusZero); in DoDivI()
1528 DeoptimizeIf(zero, instr, Deoptimizer::kOverflow); in DoDivI()
1539 DeoptimizeIf(not_zero, instr, Deoptimizer::kLostPrecision); in DoDivI()
1544 void LCodeGen::DoFlooringDivByPowerOf2I(LFlooringDivByPowerOf2I* instr) { in DoFlooringDivByPowerOf2I() argument
1545 Register dividend = ToRegister(instr->dividend()); in DoFlooringDivByPowerOf2I()
1546 int32_t divisor = instr->divisor(); in DoFlooringDivByPowerOf2I()
1547 DCHECK(dividend.is(ToRegister(instr->result()))); in DoFlooringDivByPowerOf2I()
1560 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { in DoFlooringDivByPowerOf2I()
1561 DeoptimizeIf(zero, instr, Deoptimizer::kMinusZero); in DoFlooringDivByPowerOf2I()
1566 if (instr->hydrogen()->CheckFlag(HValue::kLeftCanBeMinInt)) { in DoFlooringDivByPowerOf2I()
1567 DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow); in DoFlooringDivByPowerOf2I()
1573 if (!instr->hydrogen()->CheckFlag(HValue::kLeftCanBeMinInt)) { in DoFlooringDivByPowerOf2I()
1588 void LCodeGen::DoFlooringDivByConstI(LFlooringDivByConstI* instr) { in DoFlooringDivByConstI() argument
1589 Register dividend = ToRegister(instr->dividend()); in DoFlooringDivByConstI()
1590 int32_t divisor = instr->divisor(); in DoFlooringDivByConstI()
1591 DCHECK(ToRegister(instr->result()).is(edx)); in DoFlooringDivByConstI()
1594 DeoptimizeIf(no_condition, instr, Deoptimizer::kDivisionByZero); in DoFlooringDivByConstI()
1599 HMathFloorOfDiv* hdiv = instr->hydrogen(); in DoFlooringDivByConstI()
1602 DeoptimizeIf(zero, instr, Deoptimizer::kMinusZero); in DoFlooringDivByConstI()
1616 Register temp = ToRegister(instr->temp3()); in DoFlooringDivByConstI()
1634 void LCodeGen::DoFlooringDivI(LFlooringDivI* instr) { in DoFlooringDivI() argument
1635 HBinaryOperation* hdiv = instr->hydrogen(); in DoFlooringDivI()
1636 Register dividend = ToRegister(instr->dividend()); in DoFlooringDivI()
1637 Register divisor = ToRegister(instr->divisor()); in DoFlooringDivI()
1638 Register remainder = ToRegister(instr->temp()); in DoFlooringDivI()
1639 Register result = ToRegister(instr->result()); in DoFlooringDivI()
1649 DeoptimizeIf(zero, instr, Deoptimizer::kDivisionByZero); in DoFlooringDivI()
1658 DeoptimizeIf(sign, instr, Deoptimizer::kMinusZero); in DoFlooringDivI()
1668 DeoptimizeIf(zero, instr, Deoptimizer::kOverflow); in DoFlooringDivI()
1686 void LCodeGen::DoMulI(LMulI* instr) { in DoMulI() argument
1687 Register left = ToRegister(instr->left()); in DoMulI()
1688 LOperand* right = instr->right(); in DoMulI()
1690 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { in DoMulI()
1691 __ mov(ToRegister(instr->temp()), left); in DoMulI()
1705 } else if (!instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) { in DoMulI()
1739 if (instr->hydrogen()->representation().IsSmi()) { in DoMulI()
1745 if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) { in DoMulI()
1746 DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow); in DoMulI()
1749 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { in DoMulI()
1756 DeoptimizeIf(no_condition, instr, Deoptimizer::kMinusZero); in DoMulI()
1758 __ cmp(ToRegister(instr->temp()), Immediate(0)); in DoMulI()
1759 DeoptimizeIf(less, instr, Deoptimizer::kMinusZero); in DoMulI()
1763 __ or_(ToRegister(instr->temp()), ToOperand(right)); in DoMulI()
1764 DeoptimizeIf(sign, instr, Deoptimizer::kMinusZero); in DoMulI()
1771 void LCodeGen::DoBitI(LBitI* instr) { in DoBitI() argument
1772 LOperand* left = instr->left(); in DoBitI()
1773 LOperand* right = instr->right(); in DoBitI()
1774 DCHECK(left->Equals(instr->result())); in DoBitI()
1780 instr->hydrogen()->representation()); in DoBitI()
1781 switch (instr->op()) { in DoBitI()
1800 switch (instr->op()) { in DoBitI()
1818 void LCodeGen::DoShiftI(LShiftI* instr) { in DoShiftI() argument
1819 LOperand* left = instr->left(); in DoShiftI()
1820 LOperand* right = instr->right(); in DoShiftI()
1821 DCHECK(left->Equals(instr->result())); in DoShiftI()
1826 switch (instr->op()) { in DoShiftI()
1835 if (instr->can_deopt()) { in DoShiftI()
1837 DeoptimizeIf(sign, instr, Deoptimizer::kNegativeValue); in DoShiftI()
1850 switch (instr->op()) { in DoShiftI()
1852 if (shift_count == 0 && instr->can_deopt()) { in DoShiftI()
1854 DeoptimizeIf(sign, instr, Deoptimizer::kNegativeValue); in DoShiftI()
1867 } else if (instr->can_deopt()) { in DoShiftI()
1869 DeoptimizeIf(sign, instr, Deoptimizer::kNegativeValue); in DoShiftI()
1874 if (instr->hydrogen_value()->representation().IsSmi() && in DoShiftI()
1875 instr->can_deopt()) { in DoShiftI()
1880 DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow); in DoShiftI()
1894 void LCodeGen::DoSubI(LSubI* instr) { in DoSubI() argument
1895 LOperand* left = instr->left(); in DoSubI()
1896 LOperand* right = instr->right(); in DoSubI()
1897 DCHECK(left->Equals(instr->result())); in DoSubI()
1901 ToImmediate(right, instr->hydrogen()->representation())); in DoSubI()
1905 if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) { in DoSubI()
1906 DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow); in DoSubI()
1911 void LCodeGen::DoConstantI(LConstantI* instr) { in DoConstantI() argument
1912 __ Move(ToRegister(instr->result()), Immediate(instr->value())); in DoConstantI()
1916 void LCodeGen::DoConstantS(LConstantS* instr) { in DoConstantS() argument
1917 __ Move(ToRegister(instr->result()), Immediate(instr->value())); in DoConstantS()
1921 void LCodeGen::DoConstantD(LConstantD* instr) { in DoConstantD() argument
1922 uint64_t const bits = instr->bits(); in DoConstantD()
1925 DCHECK(instr->result()->IsDoubleRegister()); in DoConstantD()
1929 X87Register reg = ToX87Register(instr->result()); in DoConstantD()
1935 void LCodeGen::DoConstantE(LConstantE* instr) { in DoConstantE() argument
1936 __ lea(ToRegister(instr->result()), Operand::StaticVariable(instr->value())); in DoConstantE()
1940 void LCodeGen::DoConstantT(LConstantT* instr) { in DoConstantT() argument
1941 Register reg = ToRegister(instr->result()); in DoConstantT()
1942 Handle<Object> object = instr->value(isolate()); in DoConstantT()
1948 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) { in DoMapEnumLength() argument
1949 Register result = ToRegister(instr->result()); in DoMapEnumLength()
1950 Register map = ToRegister(instr->value()); in DoMapEnumLength()
1974 void LCodeGen::DoSeqStringGetChar(LSeqStringGetChar* instr) { in DoSeqStringGetChar() argument
1975 String::Encoding encoding = instr->hydrogen()->encoding(); in DoSeqStringGetChar()
1976 Register result = ToRegister(instr->result()); in DoSeqStringGetChar()
1977 Register string = ToRegister(instr->string()); in DoSeqStringGetChar()
1993 Operand operand = BuildSeqStringOperand(string, instr->index(), encoding); in DoSeqStringGetChar()
2002 void LCodeGen::DoSeqStringSetChar(LSeqStringSetChar* instr) { in DoSeqStringSetChar() argument
2003 String::Encoding encoding = instr->hydrogen()->encoding(); in DoSeqStringSetChar()
2004 Register string = ToRegister(instr->string()); in DoSeqStringSetChar()
2007 Register value = ToRegister(instr->value()); in DoSeqStringSetChar()
2008 Register index = ToRegister(instr->index()); in DoSeqStringSetChar()
2012 instr->hydrogen()->encoding() == String::ONE_BYTE_ENCODING in DoSeqStringSetChar()
2017 Operand operand = BuildSeqStringOperand(string, instr->index(), encoding); in DoSeqStringSetChar()
2018 if (instr->value()->IsConstantOperand()) { in DoSeqStringSetChar()
2019 int value = ToRepresentation(LConstantOperand::cast(instr->value()), in DoSeqStringSetChar()
2030 Register value = ToRegister(instr->value()); in DoSeqStringSetChar()
2040 void LCodeGen::DoAddI(LAddI* instr) { in DoAddI() argument
2041 LOperand* left = instr->left(); in DoAddI()
2042 LOperand* right = instr->right(); in DoAddI()
2044 if (LAddI::UseLea(instr->hydrogen()) && !left->Equals(instr->result())) { in DoAddI()
2047 instr->hydrogen()->representation()); in DoAddI()
2048 __ lea(ToRegister(instr->result()), MemOperand(ToRegister(left), offset)); in DoAddI()
2051 __ lea(ToRegister(instr->result()), address); in DoAddI()
2056 ToImmediate(right, instr->hydrogen()->representation())); in DoAddI()
2060 if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) { in DoAddI()
2061 DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow); in DoAddI()
2067 void LCodeGen::DoMathMinMax(LMathMinMax* instr) { in DoMathMinMax() argument
2068 LOperand* left = instr->left(); in DoMathMinMax()
2069 LOperand* right = instr->right(); in DoMathMinMax()
2070 DCHECK(left->Equals(instr->result())); in DoMathMinMax()
2071 HMathMinMax::Operation operation = instr->hydrogen()->operation(); in DoMathMinMax()
2072 if (instr->hydrogen()->representation().IsSmiOrInteger32()) { in DoMathMinMax()
2079 Immediate immediate = ToImmediate(LConstantOperand::cast(instr->right()), in DoMathMinMax()
2080 instr->hydrogen()->representation()); in DoMathMinMax()
2093 DCHECK(instr->hydrogen()->representation().IsDouble()); in DoMathMinMax()
2099 X87PrepareBinaryOp(left_reg, right_reg, ToX87Register(instr->result())); in DoMathMinMax()
2117 Register scratch_reg = ToRegister(instr->temp()); in DoMathMinMax()
2149 void LCodeGen::DoArithmeticD(LArithmeticD* instr) { in DoArithmeticD() argument
2150 X87Register left = ToX87Register(instr->left()); in DoArithmeticD()
2151 X87Register right = ToX87Register(instr->right()); in DoArithmeticD()
2152 X87Register result = ToX87Register(instr->result()); in DoArithmeticD()
2153 if (instr->op() != Token::MOD) { in DoArithmeticD()
2158 switch (instr->op()) { in DoArithmeticD()
2197 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { in DoArithmeticT() argument
2198 DCHECK(ToRegister(instr->context()).is(esi)); in DoArithmeticT()
2199 DCHECK(ToRegister(instr->left()).is(edx)); in DoArithmeticT()
2200 DCHECK(ToRegister(instr->right()).is(eax)); in DoArithmeticT()
2201 DCHECK(ToRegister(instr->result()).is(eax)); in DoArithmeticT()
2204 CodeFactory::BinaryOpIC(isolate(), instr->op(), instr->strength()).code(); in DoArithmeticT()
2205 CallCode(code, RelocInfo::CODE_TARGET, instr); in DoArithmeticT()
2210 void LCodeGen::EmitBranch(InstrType instr, Condition cc) { in EmitBranch() argument
2211 int left_block = instr->TrueDestination(chunk_); in EmitBranch()
2212 int right_block = instr->FalseDestination(chunk_); in EmitBranch()
2230 void LCodeGen::EmitTrueBranch(InstrType instr, Condition cc) { in EmitTrueBranch() argument
2231 int true_block = instr->TrueDestination(chunk_); in EmitTrueBranch()
2241 void LCodeGen::EmitFalseBranch(InstrType instr, Condition cc) { in EmitFalseBranch() argument
2242 int false_block = instr->FalseDestination(chunk_); in EmitFalseBranch()
2251 void LCodeGen::DoBranch(LBranch* instr) { in DoBranch() argument
2252 Representation r = instr->hydrogen()->value()->representation(); in DoBranch()
2254 Register reg = ToRegister(instr->value()); in DoBranch()
2256 EmitBranch(instr, not_zero); in DoBranch()
2258 X87Register reg = ToX87Register(instr->value()); in DoBranch()
2262 EmitBranch(instr, not_zero); in DoBranch()
2265 Register reg = ToRegister(instr->value()); in DoBranch()
2266 HType type = instr->hydrogen()->value()->type(); in DoBranch()
2270 EmitBranch(instr, equal); in DoBranch()
2274 EmitBranch(instr, not_equal); in DoBranch()
2277 EmitBranch(instr, no_condition); in DoBranch()
2283 EmitBranch(instr, not_equal); in DoBranch()
2285 ToBooleanStub::Types expected = instr->hydrogen()->expected_input_types(); in DoBranch()
2291 __ j(equal, instr->FalseLabel(chunk_)); in DoBranch()
2296 __ j(equal, instr->TrueLabel(chunk_)); in DoBranch()
2299 __ j(equal, instr->FalseLabel(chunk_)); in DoBranch()
2304 __ j(equal, instr->FalseLabel(chunk_)); in DoBranch()
2310 __ j(equal, instr->FalseLabel(chunk_)); in DoBranch()
2311 __ JumpIfSmi(reg, instr->TrueLabel(chunk_)); in DoBranch()
2315 DeoptimizeIf(zero, instr, Deoptimizer::kSmi); in DoBranch()
2320 map = ToRegister(instr->temp()); in DoBranch()
2328 __ j(not_zero, instr->FalseLabel(chunk_)); in DoBranch()
2335 __ j(above_equal, instr->TrueLabel(chunk_)); in DoBranch()
2344 __ j(not_zero, instr->TrueLabel(chunk_)); in DoBranch()
2345 __ jmp(instr->FalseLabel(chunk_)); in DoBranch()
2352 __ j(equal, instr->TrueLabel(chunk_)); in DoBranch()
2358 __ j(equal, instr->TrueLabel(chunk_)); in DoBranch()
2370 __ j(zero, instr->FalseLabel(chunk_)); in DoBranch()
2371 __ jmp(instr->TrueLabel(chunk_)); in DoBranch()
2378 DeoptimizeIf(no_condition, instr, Deoptimizer::kUnexpectedObject); in DoBranch()
2392 void LCodeGen::DoClobberDoubles(LClobberDoubles* instr) { in DoClobberDoubles() argument
2396 void LCodeGen::DoGoto(LGoto* instr) { in DoGoto() argument
2397 EmitGoto(instr->block_id()); in DoGoto()
2433 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { in DoCompareNumericAndBranch() argument
2434 LOperand* left = instr->left(); in DoCompareNumericAndBranch()
2435 LOperand* right = instr->right(); in DoCompareNumericAndBranch()
2437 instr->is_double() || in DoCompareNumericAndBranch()
2438 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) || in DoCompareNumericAndBranch()
2439 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32); in DoCompareNumericAndBranch()
2440 Condition cc = TokenToCondition(instr->op(), is_unsigned); in DoCompareNumericAndBranch()
2446 int next_block = EvalComparison(instr->op(), left_val, right_val) ? in DoCompareNumericAndBranch()
2447 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); in DoCompareNumericAndBranch()
2450 if (instr->is_double()) { in DoCompareNumericAndBranch()
2455 __ j(parity_even, instr->FalseLabel(chunk_)); in DoCompareNumericAndBranch()
2459 ToImmediate(right, instr->hydrogen()->representation())); in DoCompareNumericAndBranch()
2462 ToImmediate(left, instr->hydrogen()->representation())); in DoCompareNumericAndBranch()
2469 EmitBranch(instr, cc); in DoCompareNumericAndBranch()
2474 void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) { in DoCmpObjectEqAndBranch() argument
2475 Register left = ToRegister(instr->left()); in DoCmpObjectEqAndBranch()
2477 if (instr->right()->IsConstantOperand()) { in DoCmpObjectEqAndBranch()
2478 Handle<Object> right = ToHandle(LConstantOperand::cast(instr->right())); in DoCmpObjectEqAndBranch()
2481 Operand right = ToOperand(instr->right()); in DoCmpObjectEqAndBranch()
2484 EmitBranch(instr, equal); in DoCmpObjectEqAndBranch()
2488 void LCodeGen::DoCmpHoleAndBranch(LCmpHoleAndBranch* instr) { in DoCmpHoleAndBranch() argument
2489 if (instr->hydrogen()->representation().IsTagged()) { in DoCmpHoleAndBranch()
2490 Register input_reg = ToRegister(instr->object()); in DoCmpHoleAndBranch()
2492 EmitBranch(instr, equal); in DoCmpHoleAndBranch()
2497 X87Register src = ToX87Register(instr->object()); in DoCmpHoleAndBranch()
2505 EmitFalseBranch(instr, no_condition); in DoCmpHoleAndBranch()
2517 EmitBranch(instr, equal); in DoCmpHoleAndBranch()
2521 void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) { in DoCompareMinusZeroAndBranch() argument
2522 Representation rep = instr->hydrogen()->value()->representation(); in DoCompareMinusZeroAndBranch()
2526 X87Register input = ToX87Register(instr->value()); in DoCompareMinusZeroAndBranch()
2529 EmitBranch(instr, equal); in DoCompareMinusZeroAndBranch()
2531 Register value = ToRegister(instr->value()); in DoCompareMinusZeroAndBranch()
2533 __ CheckMap(value, map, instr->FalseLabel(chunk()), DO_SMI_CHECK); in DoCompareMinusZeroAndBranch()
2536 EmitFalseBranch(instr, no_overflow); in DoCompareMinusZeroAndBranch()
2539 EmitBranch(instr, equal); in DoCompareMinusZeroAndBranch()
2558 void LCodeGen::DoIsStringAndBranch(LIsStringAndBranch* instr) { in DoIsStringAndBranch() argument
2559 Register reg = ToRegister(instr->value()); in DoIsStringAndBranch()
2560 Register temp = ToRegister(instr->temp()); in DoIsStringAndBranch()
2563 instr->hydrogen()->value()->type().IsHeapObject() in DoIsStringAndBranch()
2567 reg, temp, instr->FalseLabel(chunk_), check_needed); in DoIsStringAndBranch()
2569 EmitBranch(instr, true_cond); in DoIsStringAndBranch()
2573 void LCodeGen::DoIsSmiAndBranch(LIsSmiAndBranch* instr) { in DoIsSmiAndBranch() argument
2574 Operand input = ToOperand(instr->value()); in DoIsSmiAndBranch()
2577 EmitBranch(instr, zero); in DoIsSmiAndBranch()
2581 void LCodeGen::DoIsUndetectableAndBranch(LIsUndetectableAndBranch* instr) { in DoIsUndetectableAndBranch() argument
2582 Register input = ToRegister(instr->value()); in DoIsUndetectableAndBranch()
2583 Register temp = ToRegister(instr->temp()); in DoIsUndetectableAndBranch()
2585 if (!instr->hydrogen()->value()->type().IsHeapObject()) { in DoIsUndetectableAndBranch()
2587 __ JumpIfSmi(input, instr->FalseLabel(chunk_)); in DoIsUndetectableAndBranch()
2592 EmitBranch(instr, not_zero); in DoIsUndetectableAndBranch()
2616 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { in DoStringCompareAndBranch() argument
2617 DCHECK(ToRegister(instr->context()).is(esi)); in DoStringCompareAndBranch()
2618 DCHECK(ToRegister(instr->left()).is(edx)); in DoStringCompareAndBranch()
2619 DCHECK(ToRegister(instr->right()).is(eax)); in DoStringCompareAndBranch()
2622 CallCode(code, RelocInfo::CODE_TARGET, instr); in DoStringCompareAndBranch()
2625 EmitBranch(instr, ComputeCompareCondition(instr->op())); in DoStringCompareAndBranch()
2629 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { in TestType() argument
2630 InstanceType from = instr->from(); in TestType()
2631 InstanceType to = instr->to(); in TestType()
2638 static Condition BranchCondition(HHasInstanceTypeAndBranch* instr) { in BranchCondition() argument
2639 InstanceType from = instr->from(); in BranchCondition()
2640 InstanceType to = instr->to(); in BranchCondition()
2649 void LCodeGen::DoHasInstanceTypeAndBranch(LHasInstanceTypeAndBranch* instr) { in DoHasInstanceTypeAndBranch() argument
2650 Register input = ToRegister(instr->value()); in DoHasInstanceTypeAndBranch()
2651 Register temp = ToRegister(instr->temp()); in DoHasInstanceTypeAndBranch()
2653 if (!instr->hydrogen()->value()->type().IsHeapObject()) { in DoHasInstanceTypeAndBranch()
2654 __ JumpIfSmi(input, instr->FalseLabel(chunk_)); in DoHasInstanceTypeAndBranch()
2657 __ CmpObjectType(input, TestType(instr->hydrogen()), temp); in DoHasInstanceTypeAndBranch()
2658 EmitBranch(instr, BranchCondition(instr->hydrogen())); in DoHasInstanceTypeAndBranch()
2662 void LCodeGen::DoGetCachedArrayIndex(LGetCachedArrayIndex* instr) { in DoGetCachedArrayIndex() argument
2663 Register input = ToRegister(instr->value()); in DoGetCachedArrayIndex()
2664 Register result = ToRegister(instr->result()); in DoGetCachedArrayIndex()
2674 LHasCachedArrayIndexAndBranch* instr) { in DoHasCachedArrayIndexAndBranch() argument
2675 Register input = ToRegister(instr->value()); in DoHasCachedArrayIndexAndBranch()
2679 EmitBranch(instr, equal); in DoHasCachedArrayIndexAndBranch()
2730 void LCodeGen::DoClassOfTestAndBranch(LClassOfTestAndBranch* instr) { in DoClassOfTestAndBranch() argument
2731 Register input = ToRegister(instr->value()); in DoClassOfTestAndBranch()
2732 Register temp = ToRegister(instr->temp()); in DoClassOfTestAndBranch()
2733 Register temp2 = ToRegister(instr->temp2()); in DoClassOfTestAndBranch()
2735 Handle<String> class_name = instr->hydrogen()->class_name(); in DoClassOfTestAndBranch()
2737 EmitClassOfTest(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_), in DoClassOfTestAndBranch()
2740 EmitBranch(instr, equal); in DoClassOfTestAndBranch()
2744 void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) { in DoCmpMapAndBranch() argument
2745 Register reg = ToRegister(instr->value()); in DoCmpMapAndBranch()
2746 __ cmp(FieldOperand(reg, HeapObject::kMapOffset), instr->map()); in DoCmpMapAndBranch()
2747 EmitBranch(instr, equal); in DoCmpMapAndBranch()
2751 void LCodeGen::DoInstanceOf(LInstanceOf* instr) { in DoInstanceOf() argument
2752 DCHECK(ToRegister(instr->context()).is(esi)); in DoInstanceOf()
2753 DCHECK(ToRegister(instr->left()).is(InstanceOfDescriptor::LeftRegister())); in DoInstanceOf()
2754 DCHECK(ToRegister(instr->right()).is(InstanceOfDescriptor::RightRegister())); in DoInstanceOf()
2755 DCHECK(ToRegister(instr->result()).is(eax)); in DoInstanceOf()
2757 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); in DoInstanceOf()
2762 LHasInPrototypeChainAndBranch* instr) { in DoHasInPrototypeChainAndBranch() argument
2763 Register const object = ToRegister(instr->object()); in DoHasInPrototypeChainAndBranch()
2764 Register const object_map = ToRegister(instr->scratch()); in DoHasInPrototypeChainAndBranch()
2766 Register const prototype = ToRegister(instr->prototype()); in DoHasInPrototypeChainAndBranch()
2771 if (instr->hydrogen()->ObjectNeedsSmiCheck()) { in DoHasInPrototypeChainAndBranch()
2773 EmitFalseBranch(instr, zero); in DoHasInPrototypeChainAndBranch()
2784 DeoptimizeIf(not_zero, instr, Deoptimizer::kAccessCheck); in DoHasInPrototypeChainAndBranch()
2787 DeoptimizeIf(equal, instr, Deoptimizer::kProxy); in DoHasInPrototypeChainAndBranch()
2791 EmitTrueBranch(instr, equal); in DoHasInPrototypeChainAndBranch()
2793 EmitFalseBranch(instr, equal); in DoHasInPrototypeChainAndBranch()
2799 void LCodeGen::DoCmpT(LCmpT* instr) { in DoCmpT() argument
2800 Token::Value op = instr->op(); in DoCmpT()
2803 CodeFactory::CompareIC(isolate(), op, instr->strength()).code(); in DoCmpT()
2804 CallCode(ic, RelocInfo::CODE_TARGET, instr); in DoCmpT()
2810 __ mov(ToRegister(instr->result()), factory()->false_value()); in DoCmpT()
2813 __ mov(ToRegister(instr->result()), factory()->true_value()); in DoCmpT()
2818 void LCodeGen::EmitReturn(LReturn* instr, bool dynamic_frame_alignment) { in EmitReturn() argument
2821 if (instr->has_constant_parameter_count()) { in EmitReturn()
2822 int parameter_count = ToInteger32(instr->constant_parameter_count()); in EmitReturn()
2832 Register reg = ToRegister(instr->parameter_count()); in EmitReturn()
2856 void LCodeGen::DoReturn(LReturn* instr) { in DoReturn() argument
2880 EmitReturn(instr, true); in DoReturn()
2884 EmitReturn(instr, false); in DoReturn()
2889 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { in EmitVectorLoadICRegisters() argument
2890 Register vector_register = ToRegister(instr->temp_vector()); in EmitVectorLoadICRegisters()
2896 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); in EmitVectorLoadICRegisters()
2899 FeedbackVectorSlot slot = instr->hydrogen()->slot(); in EmitVectorLoadICRegisters()
2906 void LCodeGen::EmitVectorStoreICRegisters(T* instr) { in EmitVectorStoreICRegisters() argument
2907 Register vector_register = ToRegister(instr->temp_vector()); in EmitVectorStoreICRegisters()
2908 Register slot_register = ToRegister(instr->temp_slot()); in EmitVectorStoreICRegisters()
2911 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); in EmitVectorStoreICRegisters()
2913 FeedbackVectorSlot slot = instr->hydrogen()->slot(); in EmitVectorStoreICRegisters()
2919 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { in DoLoadGlobalGeneric() argument
2920 DCHECK(ToRegister(instr->context()).is(esi)); in DoLoadGlobalGeneric()
2921 DCHECK(ToRegister(instr->global_object()) in DoLoadGlobalGeneric()
2923 DCHECK(ToRegister(instr->result()).is(eax)); in DoLoadGlobalGeneric()
2925 __ mov(LoadDescriptor::NameRegister(), instr->name()); in DoLoadGlobalGeneric()
2926 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); in DoLoadGlobalGeneric()
2928 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(), in DoLoadGlobalGeneric()
2930 CallCode(ic, RelocInfo::CODE_TARGET, instr); in DoLoadGlobalGeneric()
2934 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { in DoLoadContextSlot() argument
2935 Register context = ToRegister(instr->context()); in DoLoadContextSlot()
2936 Register result = ToRegister(instr->result()); in DoLoadContextSlot()
2937 __ mov(result, ContextOperand(context, instr->slot_index())); in DoLoadContextSlot()
2939 if (instr->hydrogen()->RequiresHoleCheck()) { in DoLoadContextSlot()
2941 if (instr->hydrogen()->DeoptimizesOnHole()) { in DoLoadContextSlot()
2942 DeoptimizeIf(equal, instr, Deoptimizer::kHole); in DoLoadContextSlot()
2953 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { in DoStoreContextSlot() argument
2954 Register context = ToRegister(instr->context()); in DoStoreContextSlot()
2955 Register value = ToRegister(instr->value()); in DoStoreContextSlot()
2959 Operand target = ContextOperand(context, instr->slot_index()); in DoStoreContextSlot()
2960 if (instr->hydrogen()->RequiresHoleCheck()) { in DoStoreContextSlot()
2962 if (instr->hydrogen()->DeoptimizesOnHole()) { in DoStoreContextSlot()
2963 DeoptimizeIf(equal, instr, Deoptimizer::kHole); in DoStoreContextSlot()
2970 if (instr->hydrogen()->NeedsWriteBarrier()) { in DoStoreContextSlot()
2972 instr->hydrogen()->value()->type().IsHeapObject() in DoStoreContextSlot()
2974 Register temp = ToRegister(instr->temp()); in DoStoreContextSlot()
2975 int offset = Context::SlotOffset(instr->slot_index()); in DoStoreContextSlot()
2984 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { in DoLoadNamedField() argument
2985 HObjectAccess access = instr->hydrogen()->access(); in DoLoadNamedField()
2989 Register result = ToRegister(instr->result()); in DoLoadNamedField()
2990 MemOperand operand = instr->object()->IsConstantOperand() in DoLoadNamedField()
2992 LConstantOperand::cast(instr->object()))) in DoLoadNamedField()
2993 : MemOperand(ToRegister(instr->object()), offset); in DoLoadNamedField()
2998 Register object = ToRegister(instr->object()); in DoLoadNamedField()
2999 if (instr->hydrogen()->representation().IsDouble()) { in DoLoadNamedField()
3000 X87Mov(ToX87Register(instr->result()), FieldOperand(object, offset)); in DoLoadNamedField()
3004 Register result = ToRegister(instr->result()); in DoLoadNamedField()
3031 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { in DoLoadNamedGeneric() argument
3032 DCHECK(ToRegister(instr->context()).is(esi)); in DoLoadNamedGeneric()
3033 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); in DoLoadNamedGeneric()
3034 DCHECK(ToRegister(instr->result()).is(eax)); in DoLoadNamedGeneric()
3036 __ mov(LoadDescriptor::NameRegister(), instr->name()); in DoLoadNamedGeneric()
3037 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); in DoLoadNamedGeneric()
3040 isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(), in DoLoadNamedGeneric()
3041 instr->hydrogen()->initialization_state()).code(); in DoLoadNamedGeneric()
3042 CallCode(ic, RelocInfo::CODE_TARGET, instr); in DoLoadNamedGeneric()
3046 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { in DoLoadFunctionPrototype() argument
3047 Register function = ToRegister(instr->function()); in DoLoadFunctionPrototype()
3048 Register temp = ToRegister(instr->temp()); in DoLoadFunctionPrototype()
3049 Register result = ToRegister(instr->result()); in DoLoadFunctionPrototype()
3057 DeoptimizeIf(equal, instr, Deoptimizer::kHole); in DoLoadFunctionPrototype()
3072 void LCodeGen::DoLoadRoot(LLoadRoot* instr) { in DoLoadRoot() argument
3073 Register result = ToRegister(instr->result()); in DoLoadRoot()
3074 __ LoadRoot(result, instr->index()); in DoLoadRoot()
3078 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { in DoAccessArgumentsAt() argument
3079 Register arguments = ToRegister(instr->arguments()); in DoAccessArgumentsAt()
3080 Register result = ToRegister(instr->result()); in DoAccessArgumentsAt()
3081 if (instr->length()->IsConstantOperand() && in DoAccessArgumentsAt()
3082 instr->index()->IsConstantOperand()) { in DoAccessArgumentsAt()
3083 int const_index = ToInteger32(LConstantOperand::cast(instr->index())); in DoAccessArgumentsAt()
3084 int const_length = ToInteger32(LConstantOperand::cast(instr->length())); in DoAccessArgumentsAt()
3088 Register length = ToRegister(instr->length()); in DoAccessArgumentsAt()
3089 Operand index = ToOperand(instr->index()); in DoAccessArgumentsAt()
3098 void LCodeGen::DoLoadKeyedExternalArray(LLoadKeyed* instr) { in DoLoadKeyedExternalArray() argument
3099 ElementsKind elements_kind = instr->elements_kind(); in DoLoadKeyedExternalArray()
3100 LOperand* key = instr->key(); in DoLoadKeyedExternalArray()
3102 ExternalArrayOpRequiresTemp(instr->hydrogen()->key()->representation(), in DoLoadKeyedExternalArray()
3107 instr->elements(), in DoLoadKeyedExternalArray()
3109 instr->hydrogen()->key()->representation(), in DoLoadKeyedExternalArray()
3111 instr->base_offset())); in DoLoadKeyedExternalArray()
3113 X87Mov(ToX87Register(instr->result()), operand, kX87FloatOperand); in DoLoadKeyedExternalArray()
3115 X87Mov(ToX87Register(instr->result()), operand); in DoLoadKeyedExternalArray()
3117 Register result(ToRegister(instr->result())); in DoLoadKeyedExternalArray()
3137 if (!instr->hydrogen()->CheckFlag(HInstruction::kUint32)) { in DoLoadKeyedExternalArray()
3139 DeoptimizeIf(negative, instr, Deoptimizer::kNegativeValue); in DoLoadKeyedExternalArray()
3160 void LCodeGen::DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr) { in DoLoadKeyedFixedDoubleArray() argument
3161 if (instr->hydrogen()->RequiresHoleCheck()) { in DoLoadKeyedFixedDoubleArray()
3163 instr->elements(), instr->key(), in DoLoadKeyedFixedDoubleArray()
3164 instr->hydrogen()->key()->representation(), in DoLoadKeyedFixedDoubleArray()
3166 instr->base_offset() + sizeof(kHoleNanLower32)); in DoLoadKeyedFixedDoubleArray()
3168 DeoptimizeIf(equal, instr, Deoptimizer::kHole); in DoLoadKeyedFixedDoubleArray()
3172 instr->elements(), in DoLoadKeyedFixedDoubleArray()
3173 instr->key(), in DoLoadKeyedFixedDoubleArray()
3174 instr->hydrogen()->key()->representation(), in DoLoadKeyedFixedDoubleArray()
3176 instr->base_offset()); in DoLoadKeyedFixedDoubleArray()
3177 X87Mov(ToX87Register(instr->result()), double_load_operand); in DoLoadKeyedFixedDoubleArray()
3181 void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) { in DoLoadKeyedFixedArray() argument
3182 Register result = ToRegister(instr->result()); in DoLoadKeyedFixedArray()
3186 BuildFastArrayOperand(instr->elements(), instr->key(), in DoLoadKeyedFixedArray()
3187 instr->hydrogen()->key()->representation(), in DoLoadKeyedFixedArray()
3188 FAST_ELEMENTS, instr->base_offset())); in DoLoadKeyedFixedArray()
3191 if (instr->hydrogen()->RequiresHoleCheck()) { in DoLoadKeyedFixedArray()
3192 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { in DoLoadKeyedFixedArray()
3194 DeoptimizeIf(not_equal, instr, Deoptimizer::kNotASmi); in DoLoadKeyedFixedArray()
3197 DeoptimizeIf(equal, instr, Deoptimizer::kHole); in DoLoadKeyedFixedArray()
3199 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { in DoLoadKeyedFixedArray()
3200 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); in DoLoadKeyedFixedArray()
3211 DeoptimizeIf(not_equal, instr, Deoptimizer::kHole); in DoLoadKeyedFixedArray()
3219 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { in DoLoadKeyed() argument
3220 if (instr->is_fixed_typed_array()) { in DoLoadKeyed()
3221 DoLoadKeyedExternalArray(instr); in DoLoadKeyed()
3222 } else if (instr->hydrogen()->representation().IsDouble()) { in DoLoadKeyed()
3223 DoLoadKeyedFixedDoubleArray(instr); in DoLoadKeyed()
3225 DoLoadKeyedFixedArray(instr); in DoLoadKeyed()
3261 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { in DoLoadKeyedGeneric() argument
3262 DCHECK(ToRegister(instr->context()).is(esi)); in DoLoadKeyedGeneric()
3263 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); in DoLoadKeyedGeneric()
3264 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); in DoLoadKeyedGeneric()
3266 if (instr->hydrogen()->HasVectorAndSlot()) { in DoLoadKeyedGeneric()
3267 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); in DoLoadKeyedGeneric()
3271 isolate(), instr->hydrogen()->language_mode(), in DoLoadKeyedGeneric()
3272 instr->hydrogen()->initialization_state()).code(); in DoLoadKeyedGeneric()
3273 CallCode(ic, RelocInfo::CODE_TARGET, instr); in DoLoadKeyedGeneric()
3277 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { in DoArgumentsElements() argument
3278 Register result = ToRegister(instr->result()); in DoArgumentsElements()
3280 if (instr->hydrogen()->from_inlined()) { in DoArgumentsElements()
3306 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { in DoArgumentsLength() argument
3307 Operand elem = ToOperand(instr->elements()); in DoArgumentsLength()
3308 Register result = ToRegister(instr->result()); in DoArgumentsLength()
3328 void LCodeGen::DoWrapReceiver(LWrapReceiver* instr) { in DoWrapReceiver() argument
3329 Register receiver = ToRegister(instr->receiver()); in DoWrapReceiver()
3330 Register function = ToRegister(instr->function()); in DoWrapReceiver()
3336 Register scratch = ToRegister(instr->temp()); in DoWrapReceiver()
3338 if (!instr->hydrogen()->known_function()) { in DoWrapReceiver()
3361 DeoptimizeIf(equal, instr, Deoptimizer::kSmi); in DoWrapReceiver()
3363 DeoptimizeIf(below, instr, Deoptimizer::kNotAJavaScriptObject); in DoWrapReceiver()
3374 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { in DoApplyArguments() argument
3375 Register receiver = ToRegister(instr->receiver()); in DoApplyArguments()
3376 Register function = ToRegister(instr->function()); in DoApplyArguments()
3377 Register length = ToRegister(instr->length()); in DoApplyArguments()
3378 Register elements = ToRegister(instr->elements()); in DoApplyArguments()
3381 DCHECK(ToRegister(instr->result()).is(eax)); in DoApplyArguments()
3387 DeoptimizeIf(above, instr, Deoptimizer::kTooManyArguments); in DoApplyArguments()
3405 DCHECK(instr->HasPointerMap()); in DoApplyArguments()
3406 LPointerMap* pointers = instr->pointer_map(); in DoApplyArguments()
3415 void LCodeGen::DoDebugBreak(LDebugBreak* instr) { in DoDebugBreak() argument
3420 void LCodeGen::DoPushArgument(LPushArgument* instr) { in DoPushArgument() argument
3421 LOperand* argument = instr->value(); in DoPushArgument()
3426 void LCodeGen::DoDrop(LDrop* instr) { in DoDrop() argument
3427 __ Drop(instr->count()); in DoDrop()
3431 void LCodeGen::DoThisFunction(LThisFunction* instr) { in DoThisFunction() argument
3432 Register result = ToRegister(instr->result()); in DoThisFunction()
3437 void LCodeGen::DoContext(LContext* instr) { in DoContext() argument
3438 Register result = ToRegister(instr->result()); in DoContext()
3448 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { in DoDeclareGlobals() argument
3449 DCHECK(ToRegister(instr->context()).is(esi)); in DoDeclareGlobals()
3450 __ push(Immediate(instr->hydrogen()->pairs())); in DoDeclareGlobals()
3451 __ push(Immediate(Smi::FromInt(instr->hydrogen()->flags()))); in DoDeclareGlobals()
3452 CallRuntime(Runtime::kDeclareGlobals, instr); in DoDeclareGlobals()
3458 LInstruction* instr) { in CallKnownFunction() argument
3480 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT); in CallKnownFunction()
3483 LPointerMap* pointers = instr->pointer_map(); in CallKnownFunction()
3493 void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) { in DoCallWithDescriptor() argument
3494 DCHECK(ToRegister(instr->result()).is(eax)); in DoCallWithDescriptor()
3496 if (instr->hydrogen()->IsTailCall()) { in DoCallWithDescriptor()
3499 if (instr->target()->IsConstantOperand()) { in DoCallWithDescriptor()
3500 LConstantOperand* target = LConstantOperand::cast(instr->target()); in DoCallWithDescriptor()
3504 DCHECK(instr->target()->IsRegister()); in DoCallWithDescriptor()
3505 Register target = ToRegister(instr->target()); in DoCallWithDescriptor()
3510 LPointerMap* pointers = instr->pointer_map(); in DoCallWithDescriptor()
3513 if (instr->target()->IsConstantOperand()) { in DoCallWithDescriptor()
3514 LConstantOperand* target = LConstantOperand::cast(instr->target()); in DoCallWithDescriptor()
3519 DCHECK(instr->target()->IsRegister()); in DoCallWithDescriptor()
3520 Register target = ToRegister(instr->target()); in DoCallWithDescriptor()
3530 void LCodeGen::DoCallJSFunction(LCallJSFunction* instr) { in DoCallJSFunction() argument
3531 DCHECK(ToRegister(instr->function()).is(edi)); in DoCallJSFunction()
3532 DCHECK(ToRegister(instr->result()).is(eax)); in DoCallJSFunction()
3539 __ mov(eax, instr->arity()); in DoCallJSFunction()
3542 if (instr->hydrogen()->function()->IsConstant()) { in DoCallJSFunction()
3543 HConstant* fun_const = HConstant::cast(instr->hydrogen()->function()); in DoCallJSFunction()
3555 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT); in DoCallJSFunction()
3559 void LCodeGen::DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr) { in DoDeferredMathAbsTaggedHeapNumber() argument
3560 Register input_reg = ToRegister(instr->value()); in DoDeferredMathAbsTaggedHeapNumber()
3563 DeoptimizeIf(not_equal, instr, Deoptimizer::kNotAHeapNumber); in DoDeferredMathAbsTaggedHeapNumber()
3586 instr, instr->context()); in DoDeferredMathAbsTaggedHeapNumber()
3604 void LCodeGen::EmitIntegerMathAbs(LMathAbs* instr) { in EmitIntegerMathAbs() argument
3605 Register input_reg = ToRegister(instr->value()); in EmitIntegerMathAbs()
3610 DeoptimizeIf(negative, instr, Deoptimizer::kOverflow); in EmitIntegerMathAbs()
3615 void LCodeGen::DoMathAbs(LMathAbs* instr) { in DoMathAbs() argument
3620 LMathAbs* instr, in DoMathAbs() argument
3622 : LDeferredCode(codegen, x87_stack), instr_(instr) { } in DoMathAbs()
3626 LInstruction* instr() override { return instr_; } in DoMathAbs() function in v8::internal::LCodeGen::DoMathAbs::DeferredMathAbsTaggedHeapNumber
3632 DCHECK(instr->value()->Equals(instr->result())); in DoMathAbs()
3633 Representation r = instr->hydrogen()->value()->representation(); in DoMathAbs()
3636 X87Register value = ToX87Register(instr->value()); in DoMathAbs()
3640 EmitIntegerMathAbs(instr); in DoMathAbs()
3643 new(zone()) DeferredMathAbsTaggedHeapNumber(this, instr, x87_stack_); in DoMathAbs()
3644 Register input_reg = ToRegister(instr->value()); in DoMathAbs()
3647 EmitIntegerMathAbs(instr); in DoMathAbs()
3653 void LCodeGen::DoMathFloor(LMathFloor* instr) { in DoMathFloor() argument
3654 Register output_reg = ToRegister(instr->result()); in DoMathFloor()
3655 X87Register input_reg = ToX87Register(instr->value()); in DoMathFloor()
3663 DeoptimizeIf(parity_even, instr, Deoptimizer::kNaN); in DoMathFloor()
3666 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { in DoMathFloor()
3672 DeoptimizeIf(not_zero, instr, Deoptimizer::kMinusZero); in DoMathFloor()
3686 DeoptimizeIf(equal, instr, Deoptimizer::kOverflow); in DoMathFloor()
3693 void LCodeGen::DoMathRound(LMathRound* instr) { in DoMathRound() argument
3694 X87Register input_reg = ToX87Register(instr->value()); in DoMathRound()
3695 Register result = ToRegister(instr->result()); in DoMathRound()
3720 DeoptimizeIf(equal, instr, Deoptimizer::kConversionOverflow); in DoMathRound()
3733 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { in DoMathRound()
3737 DeoptimizeIf(not_zero, instr, Deoptimizer::kMinusZero); in DoMathRound()
3754 DeoptimizeIf(equal, instr, Deoptimizer::kConversionOverflow); in DoMathRound()
3763 void LCodeGen::DoMathFround(LMathFround* instr) { in DoMathFround() argument
3764 X87Register input_reg = ToX87Register(instr->value()); in DoMathFround()
3773 void LCodeGen::DoMathSqrt(LMathSqrt* instr) { in DoMathSqrt() argument
3774 X87Register input_reg = ToX87Register(instr->value()); in DoMathSqrt()
3782 void LCodeGen::DoMathPowHalf(LMathPowHalf* instr) { in DoMathPowHalf() argument
3783 X87Register input_reg = ToX87Register(instr->value()); in DoMathPowHalf()
3784 DCHECK(ToX87Register(instr->result()).is(input_reg)); in DoMathPowHalf()
3811 void LCodeGen::DoPower(LPower* instr) { in DoPower() argument
3812 Representation exponent_type = instr->hydrogen()->right()->representation(); in DoPower()
3813 X87Register result = ToX87Register(instr->result()); in DoPower()
3815 X87Register base = ToX87Register(instr->left()); in DoPower()
3819 Register exponent = ToRegister(instr->right()); in DoPower()
3826 Register exponent = ToRegister(instr->right()); in DoPower()
3832 DeoptimizeIf(not_equal, instr, Deoptimizer::kNotAHeapNumber); in DoPower()
3844 Register exponent = ToRegister(instr->right()); in DoPower()
3851 X87Register exponent_double = ToX87Register(instr->right()); in DoPower()
3882 void LCodeGen::DoMathLog(LMathLog* instr) { in DoMathLog() argument
3883 DCHECK(instr->value()->Equals(instr->result())); in DoMathLog()
3884 X87Register input_reg = ToX87Register(instr->value()); in DoMathLog()
3921 void LCodeGen::DoMathClz32(LMathClz32* instr) { in DoMathClz32() argument
3922 Register input = ToRegister(instr->value()); in DoMathClz32()
3923 Register result = ToRegister(instr->result()); in DoMathClz32()
3929 void LCodeGen::DoMathExp(LMathExp* instr) { in DoMathExp() argument
3930 X87Register input = ToX87Register(instr->value()); in DoMathExp()
3931 X87Register result_reg = ToX87Register(instr->result()); in DoMathExp()
3932 Register temp_result = ToRegister(instr->temp1()); in DoMathExp()
3933 Register temp = ToRegister(instr->temp2()); in DoMathExp()
3956 RecordSafepointWithRegisters(instr->pointer_map(), 0, in DoMathExp()
3971 RecordSafepointWithRegisters(instr->pointer_map(), 1, in DoMathExp()
3992 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { in DoInvokeFunction() argument
3993 DCHECK(ToRegister(instr->context()).is(esi)); in DoInvokeFunction()
3994 DCHECK(ToRegister(instr->function()).is(edi)); in DoInvokeFunction()
3995 DCHECK(instr->HasPointerMap()); in DoInvokeFunction()
3997 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); in DoInvokeFunction()
3999 LPointerMap* pointers = instr->pointer_map(); in DoInvokeFunction()
4002 ParameterCount count(instr->arity()); in DoInvokeFunction()
4006 instr->hydrogen()->formal_parameter_count(), in DoInvokeFunction()
4007 instr->arity(), instr); in DoInvokeFunction()
4012 void LCodeGen::DoCallFunction(LCallFunction* instr) { in DoCallFunction() argument
4013 DCHECK(ToRegister(instr->context()).is(esi)); in DoCallFunction()
4014 DCHECK(ToRegister(instr->function()).is(edi)); in DoCallFunction()
4015 DCHECK(ToRegister(instr->result()).is(eax)); in DoCallFunction()
4017 int arity = instr->arity(); in DoCallFunction()
4018 ConvertReceiverMode mode = instr->hydrogen()->convert_mode(); in DoCallFunction()
4019 if (instr->hydrogen()->HasVectorAndSlot()) { in DoCallFunction()
4020 Register slot_register = ToRegister(instr->temp_slot()); in DoCallFunction()
4021 Register vector_register = ToRegister(instr->temp_vector()); in DoCallFunction()
4026 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); in DoCallFunction()
4027 int index = vector->GetIndex(instr->hydrogen()->slot()); in DoCallFunction()
4034 CallCode(ic, RelocInfo::CODE_TARGET, instr); in DoCallFunction()
4037 CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr); in DoCallFunction()
4042 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { in DoCallNewArray() argument
4043 DCHECK(ToRegister(instr->context()).is(esi)); in DoCallNewArray()
4044 DCHECK(ToRegister(instr->constructor()).is(edi)); in DoCallNewArray()
4045 DCHECK(ToRegister(instr->result()).is(eax)); in DoCallNewArray()
4047 __ Move(eax, Immediate(instr->arity())); in DoCallNewArray()
4048 if (instr->arity() == 1) { in DoCallNewArray()
4052 __ mov(ebx, instr->hydrogen()->site()); in DoCallNewArray()
4057 ElementsKind kind = instr->hydrogen()->elements_kind(); in DoCallNewArray()
4063 if (instr->arity() == 0) { in DoCallNewArray()
4065 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); in DoCallNewArray()
4066 } else if (instr->arity() == 1) { in DoCallNewArray()
4080 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); in DoCallNewArray()
4086 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); in DoCallNewArray()
4090 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); in DoCallNewArray()
4095 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { in DoCallRuntime() argument
4096 DCHECK(ToRegister(instr->context()).is(esi)); in DoCallRuntime()
4097 CallRuntime(instr->function(), instr->arity(), instr, instr->save_doubles()); in DoCallRuntime()
4101 void LCodeGen::DoStoreCodeEntry(LStoreCodeEntry* instr) { in DoStoreCodeEntry() argument
4102 Register function = ToRegister(instr->function()); in DoStoreCodeEntry()
4103 Register code_object = ToRegister(instr->code_object()); in DoStoreCodeEntry()
4109 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) { in DoInnerAllocatedObject() argument
4110 Register result = ToRegister(instr->result()); in DoInnerAllocatedObject()
4111 Register base = ToRegister(instr->base_object()); in DoInnerAllocatedObject()
4112 if (instr->offset()->IsConstantOperand()) { in DoInnerAllocatedObject()
4113 LConstantOperand* offset = LConstantOperand::cast(instr->offset()); in DoInnerAllocatedObject()
4116 Register offset = ToRegister(instr->offset()); in DoInnerAllocatedObject()
4122 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { in DoStoreNamedField() argument
4123 Representation representation = instr->hydrogen()->field_representation(); in DoStoreNamedField()
4125 HObjectAccess access = instr->hydrogen()->access(); in DoStoreNamedField()
4129 DCHECK(!instr->hydrogen()->NeedsWriteBarrier()); in DoStoreNamedField()
4130 MemOperand operand = instr->object()->IsConstantOperand() in DoStoreNamedField()
4132 ToExternalReference(LConstantOperand::cast(instr->object()))) in DoStoreNamedField()
4133 : MemOperand(ToRegister(instr->object()), offset); in DoStoreNamedField()
4134 if (instr->value()->IsConstantOperand()) { in DoStoreNamedField()
4135 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); in DoStoreNamedField()
4138 Register value = ToRegister(instr->value()); in DoStoreNamedField()
4144 Register object = ToRegister(instr->object()); in DoStoreNamedField()
4147 !instr->value()->IsConstantOperand() || in DoStoreNamedField()
4148 IsSmi(LConstantOperand::cast(instr->value()))); in DoStoreNamedField()
4151 DCHECK(!instr->hydrogen()->has_transition()); in DoStoreNamedField()
4152 DCHECK(!instr->hydrogen()->NeedsWriteBarrier()); in DoStoreNamedField()
4153 X87Register value = ToX87Register(instr->value()); in DoStoreNamedField()
4158 if (instr->hydrogen()->has_transition()) { in DoStoreNamedField()
4159 Handle<Map> transition = instr->hydrogen()->transition_map(); in DoStoreNamedField()
4162 if (instr->hydrogen()->NeedsWriteBarrierForMap()) { in DoStoreNamedField()
4163 Register temp = ToRegister(instr->temp()); in DoStoreNamedField()
4164 Register temp_map = ToRegister(instr->temp_map()); in DoStoreNamedField()
4175 write_register = ToRegister(instr->temp()); in DoStoreNamedField()
4180 if (instr->value()->IsConstantOperand()) { in DoStoreNamedField()
4181 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); in DoStoreNamedField()
4187 DCHECK(!instr->hydrogen()->NeedsWriteBarrier()); in DoStoreNamedField()
4191 DCHECK(!instr->hydrogen()->NeedsWriteBarrier()); in DoStoreNamedField()
4195 Register value = ToRegister(instr->value()); in DoStoreNamedField()
4199 if (instr->hydrogen()->NeedsWriteBarrier()) { in DoStoreNamedField()
4200 Register value = ToRegister(instr->value()); in DoStoreNamedField()
4201 Register temp = access.IsInobject() ? ToRegister(instr->temp()) : object; in DoStoreNamedField()
4205 instr->hydrogen()->SmiCheckForWriteBarrier(), in DoStoreNamedField()
4206 instr->hydrogen()->PointersToHereCheckForValue()); in DoStoreNamedField()
4211 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { in DoStoreNamedGeneric() argument
4212 DCHECK(ToRegister(instr->context()).is(esi)); in DoStoreNamedGeneric()
4213 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); in DoStoreNamedGeneric()
4214 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); in DoStoreNamedGeneric()
4216 if (instr->hydrogen()->HasVectorAndSlot()) { in DoStoreNamedGeneric()
4217 EmitVectorStoreICRegisters<LStoreNamedGeneric>(instr); in DoStoreNamedGeneric()
4220 __ mov(StoreDescriptor::NameRegister(), instr->name()); in DoStoreNamedGeneric()
4222 isolate(), instr->language_mode(), in DoStoreNamedGeneric()
4223 instr->hydrogen()->initialization_state()).code(); in DoStoreNamedGeneric()
4224 CallCode(ic, RelocInfo::CODE_TARGET, instr); in DoStoreNamedGeneric()
4228 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { in DoBoundsCheck() argument
4229 Condition cc = instr->hydrogen()->allow_equality() ? above : above_equal; in DoBoundsCheck()
4230 if (instr->index()->IsConstantOperand()) { in DoBoundsCheck()
4231 __ cmp(ToOperand(instr->length()), in DoBoundsCheck()
4232 ToImmediate(LConstantOperand::cast(instr->index()), in DoBoundsCheck()
4233 instr->hydrogen()->length()->representation())); in DoBoundsCheck()
4235 } else if (instr->length()->IsConstantOperand()) { in DoBoundsCheck()
4236 __ cmp(ToOperand(instr->index()), in DoBoundsCheck()
4237 ToImmediate(LConstantOperand::cast(instr->length()), in DoBoundsCheck()
4238 instr->hydrogen()->index()->representation())); in DoBoundsCheck()
4240 __ cmp(ToRegister(instr->index()), ToOperand(instr->length())); in DoBoundsCheck()
4242 if (FLAG_debug_code && instr->hydrogen()->skip_check()) { in DoBoundsCheck()
4248 DeoptimizeIf(cc, instr, Deoptimizer::kOutOfBounds); in DoBoundsCheck()
4253 void LCodeGen::DoStoreKeyedExternalArray(LStoreKeyed* instr) { in DoStoreKeyedExternalArray() argument
4254 ElementsKind elements_kind = instr->elements_kind(); in DoStoreKeyedExternalArray()
4255 LOperand* key = instr->key(); in DoStoreKeyedExternalArray()
4257 ExternalArrayOpRequiresTemp(instr->hydrogen()->key()->representation(), in DoStoreKeyedExternalArray()
4262 instr->elements(), in DoStoreKeyedExternalArray()
4264 instr->hydrogen()->key()->representation(), in DoStoreKeyedExternalArray()
4266 instr->base_offset())); in DoStoreKeyedExternalArray()
4268 X87Mov(operand, ToX87Register(instr->value()), kX87FloatOperand); in DoStoreKeyedExternalArray()
4274 instr->elements(), instr->key(), in DoStoreKeyedExternalArray()
4275 instr->hydrogen()->key()->representation(), elements_kind, in DoStoreKeyedExternalArray()
4276 instr->base_offset() + kPointerSize); in DoStoreKeyedExternalArray()
4279 X87Register value = ToX87Register(instr->value()); in DoStoreKeyedExternalArray()
4297 Register value = ToRegister(instr->value()); in DoStoreKeyedExternalArray()
4330 void LCodeGen::DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr) { in DoStoreKeyedFixedDoubleArray() argument
4332 instr->elements(), in DoStoreKeyedFixedDoubleArray()
4333 instr->key(), in DoStoreKeyedFixedDoubleArray()
4334 instr->hydrogen()->key()->representation(), in DoStoreKeyedFixedDoubleArray()
4336 instr->base_offset()); in DoStoreKeyedFixedDoubleArray()
4342 instr->elements(), instr->key(), in DoStoreKeyedFixedDoubleArray()
4343 instr->hydrogen()->key()->representation(), FAST_DOUBLE_ELEMENTS, in DoStoreKeyedFixedDoubleArray()
4344 instr->base_offset() + kPointerSize); in DoStoreKeyedFixedDoubleArray()
4346 if (instr->hydrogen()->IsConstantHoleStore()) { in DoStoreKeyedFixedDoubleArray()
4353 X87Register value = ToX87Register(instr->value()); in DoStoreKeyedFixedDoubleArray()
4356 if (instr->NeedsCanonicalization()) { in DoStoreKeyedFixedDoubleArray()
4385 void LCodeGen::DoStoreKeyedFixedArray(LStoreKeyed* instr) { in DoStoreKeyedFixedArray() argument
4386 Register elements = ToRegister(instr->elements()); in DoStoreKeyedFixedArray()
4387 Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg; in DoStoreKeyedFixedArray()
4390 instr->elements(), in DoStoreKeyedFixedArray()
4391 instr->key(), in DoStoreKeyedFixedArray()
4392 instr->hydrogen()->key()->representation(), in DoStoreKeyedFixedArray()
4394 instr->base_offset()); in DoStoreKeyedFixedArray()
4395 if (instr->value()->IsRegister()) { in DoStoreKeyedFixedArray()
4396 __ mov(operand, ToRegister(instr->value())); in DoStoreKeyedFixedArray()
4398 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); in DoStoreKeyedFixedArray()
4409 if (instr->hydrogen()->NeedsWriteBarrier()) { in DoStoreKeyedFixedArray()
4410 DCHECK(instr->value()->IsRegister()); in DoStoreKeyedFixedArray()
4411 Register value = ToRegister(instr->value()); in DoStoreKeyedFixedArray()
4412 DCHECK(!instr->key()->IsConstantOperand()); in DoStoreKeyedFixedArray()
4414 instr->hydrogen()->value()->type().IsHeapObject() in DoStoreKeyedFixedArray()
4420 instr->hydrogen()->PointersToHereCheckForValue()); in DoStoreKeyedFixedArray()
4425 void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) { in DoStoreKeyed() argument
4427 if (instr->is_fixed_typed_array()) { in DoStoreKeyed()
4428 DoStoreKeyedExternalArray(instr); in DoStoreKeyed()
4429 } else if (instr->hydrogen()->value()->representation().IsDouble()) { in DoStoreKeyed()
4430 DoStoreKeyedFixedDoubleArray(instr); in DoStoreKeyed()
4432 DoStoreKeyedFixedArray(instr); in DoStoreKeyed()
4437 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { in DoStoreKeyedGeneric() argument
4438 DCHECK(ToRegister(instr->context()).is(esi)); in DoStoreKeyedGeneric()
4439 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); in DoStoreKeyedGeneric()
4440 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister())); in DoStoreKeyedGeneric()
4441 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); in DoStoreKeyedGeneric()
4443 if (instr->hydrogen()->HasVectorAndSlot()) { in DoStoreKeyedGeneric()
4444 EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr); in DoStoreKeyedGeneric()
4448 isolate(), instr->language_mode(), in DoStoreKeyedGeneric()
4449 instr->hydrogen()->initialization_state()).code(); in DoStoreKeyedGeneric()
4450 CallCode(ic, RelocInfo::CODE_TARGET, instr); in DoStoreKeyedGeneric()
4454 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { in DoTrapAllocationMemento() argument
4455 Register object = ToRegister(instr->object()); in DoTrapAllocationMemento()
4456 Register temp = ToRegister(instr->temp()); in DoTrapAllocationMemento()
4459 DeoptimizeIf(equal, instr, Deoptimizer::kMementoFound); in DoTrapAllocationMemento()
4464 void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) { in DoMaybeGrowElements() argument
4468 LMaybeGrowElements* instr, in DoMaybeGrowElements() argument
4470 : LDeferredCode(codegen, x87_stack), instr_(instr) {} in DoMaybeGrowElements()
4472 LInstruction* instr() override { return instr_; } in DoMaybeGrowElements() function in v8::internal::LCodeGen::DoMaybeGrowElements::DeferredMaybeGrowElements
4480 new (zone()) DeferredMaybeGrowElements(this, instr, x87_stack_); in DoMaybeGrowElements()
4481 LOperand* key = instr->key(); in DoMaybeGrowElements()
4482 LOperand* current_capacity = instr->current_capacity(); in DoMaybeGrowElements()
4484 DCHECK(instr->hydrogen()->key()->representation().IsInteger32()); in DoMaybeGrowElements()
4485 DCHECK(instr->hydrogen()->current_capacity()->representation().IsInteger32()); in DoMaybeGrowElements()
4512 __ mov(result, ToOperand(instr->elements())); in DoMaybeGrowElements()
4517 void LCodeGen::DoDeferredMaybeGrowElements(LMaybeGrowElements* instr) { in DoDeferredMaybeGrowElements() argument
4527 if (instr->object()->IsRegister()) { in DoDeferredMaybeGrowElements()
4528 __ Move(result, ToRegister(instr->object())); in DoDeferredMaybeGrowElements()
4530 __ mov(result, ToOperand(instr->object())); in DoDeferredMaybeGrowElements()
4533 LOperand* key = instr->key(); in DoDeferredMaybeGrowElements()
4541 GrowArrayElementsStub stub(isolate(), instr->hydrogen()->is_js_array(), in DoDeferredMaybeGrowElements()
4542 instr->hydrogen()->kind()); in DoDeferredMaybeGrowElements()
4545 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); in DoDeferredMaybeGrowElements()
4551 DeoptimizeIf(equal, instr, Deoptimizer::kSmi); in DoDeferredMaybeGrowElements()
4555 void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) { in DoTransitionElementsKind() argument
4556 Register object_reg = ToRegister(instr->object()); in DoTransitionElementsKind()
4558 Handle<Map> from_map = instr->original_map(); in DoTransitionElementsKind()
4559 Handle<Map> to_map = instr->transitioned_map(); in DoTransitionElementsKind()
4560 ElementsKind from_kind = instr->from_kind(); in DoTransitionElementsKind()
4561 ElementsKind to_kind = instr->to_kind(); in DoTransitionElementsKind()
4571 Register new_map_reg = ToRegister(instr->new_map_temp()); in DoTransitionElementsKind()
4575 DCHECK_NOT_NULL(instr->temp()); in DoTransitionElementsKind()
4577 ToRegister(instr->temp()), kDontSaveFPRegs); in DoTransitionElementsKind()
4579 DCHECK(ToRegister(instr->context()).is(esi)); in DoTransitionElementsKind()
4586 RecordSafepointWithLazyDeopt(instr, in DoTransitionElementsKind()
4593 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { in DoStringCharCodeAt() argument
4597 LStringCharCodeAt* instr, in DoStringCharCodeAt() argument
4599 : LDeferredCode(codegen, x87_stack), instr_(instr) { } in DoStringCharCodeAt()
4601 LInstruction* instr() override { return instr_; } in DoStringCharCodeAt() function in v8::internal::LCodeGen::DoStringCharCodeAt::DeferredStringCharCodeAt
4608 new(zone()) DeferredStringCharCodeAt(this, instr, x87_stack_); in DoStringCharCodeAt()
4612 ToRegister(instr->string()), in DoStringCharCodeAt()
4613 ToRegister(instr->index()), in DoStringCharCodeAt()
4614 ToRegister(instr->result()), in DoStringCharCodeAt()
4620 void LCodeGen::DoDeferredStringCharCodeAt(LStringCharCodeAt* instr) { in DoDeferredStringCharCodeAt() argument
4621 Register string = ToRegister(instr->string()); in DoDeferredStringCharCodeAt()
4622 Register result = ToRegister(instr->result()); in DoDeferredStringCharCodeAt()
4634 if (instr->index()->IsConstantOperand()) { in DoDeferredStringCharCodeAt()
4635 Immediate immediate = ToImmediate(LConstantOperand::cast(instr->index()), in DoDeferredStringCharCodeAt()
4639 Register index = ToRegister(instr->index()); in DoDeferredStringCharCodeAt()
4644 instr, instr->context()); in DoDeferredStringCharCodeAt()
4651 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { in DoStringCharFromCode() argument
4655 LStringCharFromCode* instr, in DoStringCharFromCode() argument
4657 : LDeferredCode(codegen, x87_stack), instr_(instr) { } in DoStringCharFromCode()
4661 LInstruction* instr() override { return instr_; } in DoStringCharFromCode() function in v8::internal::LCodeGen::DoStringCharFromCode::DeferredStringCharFromCode
4668 new(zone()) DeferredStringCharFromCode(this, instr, x87_stack_); in DoStringCharFromCode()
4670 DCHECK(instr->hydrogen()->value()->representation().IsInteger32()); in DoStringCharFromCode()
4671 Register char_code = ToRegister(instr->char_code()); in DoStringCharFromCode()
4672 Register result = ToRegister(instr->result()); in DoStringCharFromCode()
4687 void LCodeGen::DoDeferredStringCharFromCode(LStringCharFromCode* instr) { in DoDeferredStringCharFromCode() argument
4688 Register char_code = ToRegister(instr->char_code()); in DoDeferredStringCharFromCode()
4689 Register result = ToRegister(instr->result()); in DoDeferredStringCharFromCode()
4699 CallRuntimeFromDeferred(Runtime::kStringCharFromCode, 1, instr, in DoDeferredStringCharFromCode()
4700 instr->context()); in DoDeferredStringCharFromCode()
4705 void LCodeGen::DoStringAdd(LStringAdd* instr) { in DoStringAdd() argument
4706 DCHECK(ToRegister(instr->context()).is(esi)); in DoStringAdd()
4707 DCHECK(ToRegister(instr->left()).is(edx)); in DoStringAdd()
4708 DCHECK(ToRegister(instr->right()).is(eax)); in DoStringAdd()
4710 instr->hydrogen()->flags(), in DoStringAdd()
4711 instr->hydrogen()->pretenure_flag()); in DoStringAdd()
4712 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); in DoStringAdd()
4716 void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { in DoInteger32ToDouble() argument
4717 LOperand* input = instr->value(); in DoInteger32ToDouble()
4718 LOperand* output = instr->result(); in DoInteger32ToDouble()
4732 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { in DoUint32ToDouble() argument
4733 LOperand* input = instr->value(); in DoUint32ToDouble()
4734 LOperand* output = instr->result(); in DoUint32ToDouble()
4742 void LCodeGen::DoNumberTagI(LNumberTagI* instr) { in DoNumberTagI() argument
4746 LNumberTagI* instr, in DoNumberTagI() argument
4748 : LDeferredCode(codegen, x87_stack), instr_(instr) { } in DoNumberTagI()
4753 LInstruction* instr() override { return instr_; } in DoNumberTagI() function in v8::internal::LCodeGen::DoNumberTagI::DeferredNumberTagI
4759 LOperand* input = instr->value(); in DoNumberTagI()
4760 DCHECK(input->IsRegister() && input->Equals(instr->result())); in DoNumberTagI()
4764 new(zone()) DeferredNumberTagI(this, instr, x87_stack_); in DoNumberTagI()
4771 void LCodeGen::DoNumberTagU(LNumberTagU* instr) { in DoNumberTagU() argument
4775 LNumberTagU* instr, in DoNumberTagU() argument
4777 : LDeferredCode(codegen, x87_stack), instr_(instr) { } in DoNumberTagU()
4782 LInstruction* instr() override { return instr_; } in DoNumberTagU() function in v8::internal::LCodeGen::DoNumberTagU::DeferredNumberTagU
4788 LOperand* input = instr->value(); in DoNumberTagU()
4789 DCHECK(input->IsRegister() && input->Equals(instr->result())); in DoNumberTagU()
4793 new(zone()) DeferredNumberTagU(this, instr, x87_stack_); in DoNumberTagU()
4801 void LCodeGen::DoDeferredNumberTagIU(LInstruction* instr, in DoDeferredNumberTagIU() argument
4852 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); in DoDeferredNumberTagIU()
4861 void LCodeGen::DoNumberTagD(LNumberTagD* instr) { in DoNumberTagD() argument
4865 LNumberTagD* instr, in DoNumberTagD() argument
4867 : LDeferredCode(codegen, x87_stack), instr_(instr) { } in DoNumberTagD()
4869 LInstruction* instr() override { return instr_; } in DoNumberTagD() function in v8::internal::LCodeGen::DoNumberTagD::DeferredNumberTagD
4875 Register reg = ToRegister(instr->result()); in DoNumberTagD()
4878 X87Register src = ToX87Register(instr->value()); in DoNumberTagD()
4884 new(zone()) DeferredNumberTagD(this, instr, x87_stack_); in DoNumberTagD()
4886 Register tmp = ToRegister(instr->temp()); in DoNumberTagD()
4896 void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) { in DoDeferredNumberTagD() argument
4900 Register reg = ToRegister(instr->result()); in DoDeferredNumberTagD()
4912 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); in DoDeferredNumberTagD()
4917 void LCodeGen::DoSmiTag(LSmiTag* instr) { in DoSmiTag() argument
4918 HChange* hchange = instr->hydrogen(); in DoSmiTag()
4919 Register input = ToRegister(instr->value()); in DoSmiTag()
4923 DeoptimizeIf(not_zero, instr, Deoptimizer::kOverflow); in DoSmiTag()
4928 DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow); in DoSmiTag()
4933 void LCodeGen::DoSmiUntag(LSmiUntag* instr) { in DoSmiUntag() argument
4934 LOperand* input = instr->value(); in DoSmiUntag()
4936 DCHECK(input->IsRegister() && input->Equals(instr->result())); in DoSmiUntag()
4937 if (instr->needs_check()) { in DoSmiUntag()
4939 DeoptimizeIf(not_zero, instr, Deoptimizer::kNotASmi); in DoSmiUntag()
4947 void LCodeGen::EmitNumberUntagDNoSSE2(LNumberUntagD* instr, Register input_reg, in EmitNumberUntagDNoSSE2() argument
4951 instr->hydrogen()->can_convert_undefined_to_nan(); in EmitNumberUntagDNoSSE2()
4952 bool deoptimize_on_minus_zero = instr->hydrogen()->deoptimize_on_minus_zero(); in EmitNumberUntagDNoSSE2()
4965 DeoptimizeIf(not_equal, instr, Deoptimizer::kNotAHeapNumber); in EmitNumberUntagDNoSSE2()
4972 DeoptimizeIf(not_equal, instr, Deoptimizer::kNotAHeapNumberUndefined); in EmitNumberUntagDNoSSE2()
4998 DeoptimizeIf(not_zero, instr, Deoptimizer::kMinusZero); in EmitNumberUntagDNoSSE2()
5018 void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr, Label* done) { in DoDeferredTaggedToI() argument
5019 Register input_reg = ToRegister(instr->value()); in DoDeferredTaggedToI()
5025 if (instr->truncating()) { in DoDeferredTaggedToI()
5051 DeoptimizeIf(not_equal, instr, in DoDeferredTaggedToI()
5059 DeoptimizeIf(not_equal, instr, Deoptimizer::kNotAHeapNumber); in DoDeferredTaggedToI()
5064 if (instr->hydrogen()->GetMinusZeroMode() == FAIL_ON_MINUS_ZERO) { in DoDeferredTaggedToI()
5075 DeoptimizeIf(no_condition, instr, Deoptimizer::kLostPrecision); in DoDeferredTaggedToI()
5080 DeoptimizeIf(no_condition, instr, Deoptimizer::kNaN); in DoDeferredTaggedToI()
5095 DeoptimizeIf(not_zero, instr, Deoptimizer::kMinusZero); in DoDeferredTaggedToI()
5101 DeoptimizeIf(not_equal, instr, Deoptimizer::kLostPrecision); in DoDeferredTaggedToI()
5102 DeoptimizeIf(parity_even, instr, Deoptimizer::kNaN); in DoDeferredTaggedToI()
5108 void LCodeGen::DoTaggedToI(LTaggedToI* instr) { in DoTaggedToI() argument
5112 LTaggedToI* instr, in DoTaggedToI() argument
5114 : LDeferredCode(codegen, x87_stack), instr_(instr) { } in DoTaggedToI()
5116 LInstruction* instr() override { return instr_; } in DoTaggedToI() function in v8::internal::LCodeGen::DoTaggedToI::DeferredTaggedToI
5122 LOperand* input = instr->value(); in DoTaggedToI()
5125 DCHECK(input_reg.is(ToRegister(instr->result()))); in DoTaggedToI()
5127 if (instr->hydrogen()->value()->representation().IsSmi()) { in DoTaggedToI()
5131 new(zone()) DeferredTaggedToI(this, instr, x87_stack_); in DoTaggedToI()
5144 void LCodeGen::DoNumberUntagD(LNumberUntagD* instr) { in DoNumberUntagD() argument
5145 LOperand* input = instr->value(); in DoNumberUntagD()
5147 LOperand* temp = instr->temp(); in DoNumberUntagD()
5149 LOperand* result = instr->result(); in DoNumberUntagD()
5155 HValue* value = instr->hydrogen()->value(); in DoNumberUntagD()
5159 EmitNumberUntagDNoSSE2(instr, input_reg, temp_reg, ToX87Register(result), in DoNumberUntagD()
5164 void LCodeGen::DoDoubleToI(LDoubleToI* instr) { in DoDoubleToI() argument
5165 LOperand* input = instr->value(); in DoDoubleToI()
5167 LOperand* result = instr->result(); in DoDoubleToI()
5171 if (instr->truncating()) { in DoDoubleToI()
5179 __ X87TOSToI(result_reg, instr->hydrogen()->GetMinusZeroMode(), in DoDoubleToI()
5183 DeoptimizeIf(no_condition, instr, Deoptimizer::kLostPrecision); in DoDoubleToI()
5185 DeoptimizeIf(no_condition, instr, Deoptimizer::kNaN); in DoDoubleToI()
5187 DeoptimizeIf(no_condition, instr, Deoptimizer::kMinusZero); in DoDoubleToI()
5193 void LCodeGen::DoDoubleToSmi(LDoubleToSmi* instr) { in DoDoubleToSmi() argument
5194 LOperand* input = instr->value(); in DoDoubleToSmi()
5196 LOperand* result = instr->result(); in DoDoubleToSmi()
5203 __ X87TOSToI(result_reg, instr->hydrogen()->GetMinusZeroMode(), in DoDoubleToSmi()
5207 DeoptimizeIf(no_condition, instr, Deoptimizer::kLostPrecision); in DoDoubleToSmi()
5209 DeoptimizeIf(no_condition, instr, Deoptimizer::kNaN); in DoDoubleToSmi()
5211 DeoptimizeIf(no_condition, instr, Deoptimizer::kMinusZero); in DoDoubleToSmi()
5214 DeoptimizeIf(overflow, instr, Deoptimizer::kOverflow); in DoDoubleToSmi()
5218 void LCodeGen::DoCheckSmi(LCheckSmi* instr) { in DoCheckSmi() argument
5219 LOperand* input = instr->value(); in DoCheckSmi()
5221 DeoptimizeIf(not_zero, instr, Deoptimizer::kNotASmi); in DoCheckSmi()
5225 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { in DoCheckNonSmi() argument
5226 if (!instr->hydrogen()->value()->type().IsHeapObject()) { in DoCheckNonSmi()
5227 LOperand* input = instr->value(); in DoCheckNonSmi()
5229 DeoptimizeIf(zero, instr, Deoptimizer::kSmi); in DoCheckNonSmi()
5235 LCheckArrayBufferNotNeutered* instr) { in DoCheckArrayBufferNotNeutered() argument
5236 Register view = ToRegister(instr->view()); in DoCheckArrayBufferNotNeutered()
5237 Register scratch = ToRegister(instr->scratch()); in DoCheckArrayBufferNotNeutered()
5242 DeoptimizeIf(not_zero, instr, Deoptimizer::kOutOfBounds); in DoCheckArrayBufferNotNeutered()
5246 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { in DoCheckInstanceType() argument
5247 Register input = ToRegister(instr->value()); in DoCheckInstanceType()
5248 Register temp = ToRegister(instr->temp()); in DoCheckInstanceType()
5252 if (instr->hydrogen()->is_interval_check()) { in DoCheckInstanceType()
5255 instr->hydrogen()->GetCheckInterval(&first, &last); in DoCheckInstanceType()
5262 DeoptimizeIf(not_equal, instr, Deoptimizer::kWrongInstanceType); in DoCheckInstanceType()
5264 DeoptimizeIf(below, instr, Deoptimizer::kWrongInstanceType); in DoCheckInstanceType()
5269 DeoptimizeIf(above, instr, Deoptimizer::kWrongInstanceType); in DoCheckInstanceType()
5275 instr->hydrogen()->GetCheckMaskAndTag(&mask, &tag); in DoCheckInstanceType()
5280 DeoptimizeIf(tag == 0 ? not_zero : zero, instr, in DoCheckInstanceType()
5286 DeoptimizeIf(not_equal, instr, Deoptimizer::kWrongInstanceType); in DoCheckInstanceType()
5292 void LCodeGen::DoCheckValue(LCheckValue* instr) { in DoCheckValue() argument
5293 Handle<HeapObject> object = instr->hydrogen()->object().handle(); in DoCheckValue()
5294 if (instr->hydrogen()->object_in_new_space()) { in DoCheckValue()
5295 Register reg = ToRegister(instr->value()); in DoCheckValue()
5299 Operand operand = ToOperand(instr->value()); in DoCheckValue()
5302 DeoptimizeIf(not_equal, instr, Deoptimizer::kValueMismatch); in DoCheckValue()
5306 void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) { in DoDeferredInstanceMigration() argument
5313 instr->pointer_map(), 1, Safepoint::kNoLazyDeopt); in DoDeferredInstanceMigration()
5317 DeoptimizeIf(zero, instr, Deoptimizer::kInstanceMigrationFailed); in DoDeferredInstanceMigration()
5321 void LCodeGen::DoCheckMaps(LCheckMaps* instr) { in DoCheckMaps() argument
5325 LCheckMaps* instr, in DoCheckMaps() argument
5328 : LDeferredCode(codegen, x87_stack), instr_(instr), object_(object) { in DoCheckMaps()
5335 LInstruction* instr() override { return instr_; } in DoCheckMaps() function in v8::internal::LCodeGen::DoCheckMaps::DeferredCheckMaps
5343 if (instr->hydrogen()->IsStabilityCheck()) { in DoCheckMaps()
5344 const UniqueSet<Map>* maps = instr->hydrogen()->maps(); in DoCheckMaps()
5351 LOperand* input = instr->value(); in DoCheckMaps()
5356 if (instr->hydrogen()->HasMigrationTarget()) { in DoCheckMaps()
5357 deferred = new(zone()) DeferredCheckMaps(this, instr, reg, x87_stack_); in DoCheckMaps()
5361 const UniqueSet<Map>* maps = instr->hydrogen()->maps(); in DoCheckMaps()
5371 if (instr->hydrogen()->HasMigrationTarget()) { in DoCheckMaps()
5374 DeoptimizeIf(not_equal, instr, Deoptimizer::kWrongMap); in DoCheckMaps()
5381 void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) { in DoClampDToUint8() argument
5382 X87Register value_reg = ToX87Register(instr->unclamped()); in DoClampDToUint8()
5383 Register result_reg = ToRegister(instr->result()); in DoClampDToUint8()
5389 void LCodeGen::DoClampIToUint8(LClampIToUint8* instr) { in DoClampIToUint8() argument
5390 DCHECK(instr->unclamped()->Equals(instr->result())); in DoClampIToUint8()
5391 Register value_reg = ToRegister(instr->result()); in DoClampIToUint8()
5396 void LCodeGen::DoClampTToUint8NoSSE2(LClampTToUint8NoSSE2* instr) { in DoClampTToUint8NoSSE2() argument
5397 Register input_reg = ToRegister(instr->unclamped()); in DoClampTToUint8NoSSE2()
5398 Register result_reg = ToRegister(instr->result()); in DoClampTToUint8NoSSE2()
5399 Register scratch = ToRegister(instr->scratch()); in DoClampTToUint8NoSSE2()
5400 Register scratch2 = ToRegister(instr->scratch2()); in DoClampTToUint8NoSSE2()
5401 Register scratch3 = ToRegister(instr->scratch3()); in DoClampTToUint8NoSSE2()
5415 DeoptimizeIf(not_equal, instr, Deoptimizer::kNotAHeapNumberUndefined); in DoClampTToUint8NoSSE2()
5518 void LCodeGen::DoDoubleBits(LDoubleBits* instr) { in DoDoubleBits() argument
5519 X87Register value_reg = ToX87Register(instr->value()); in DoDoubleBits()
5520 Register result_reg = ToRegister(instr->result()); in DoDoubleBits()
5524 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) { in DoDoubleBits()
5533 void LCodeGen::DoConstructDouble(LConstructDouble* instr) { in DoConstructDouble() argument
5534 Register hi_reg = ToRegister(instr->hi()); in DoConstructDouble()
5535 Register lo_reg = ToRegister(instr->lo()); in DoConstructDouble()
5536 X87Register result_reg = ToX87Register(instr->result()); in DoConstructDouble()
5548 void LCodeGen::DoAllocate(LAllocate* instr) { in DoAllocate() argument
5552 LAllocate* instr, in DoAllocate() argument
5554 : LDeferredCode(codegen, x87_stack), instr_(instr) { } in DoAllocate()
5556 LInstruction* instr() override { return instr_; } in DoAllocate() function in v8::internal::LCodeGen::DoAllocate::DeferredAllocate
5563 new(zone()) DeferredAllocate(this, instr, x87_stack_); in DoAllocate()
5565 Register result = ToRegister(instr->result()); in DoAllocate()
5566 Register temp = ToRegister(instr->temp()); in DoAllocate()
5570 if (instr->hydrogen()->MustAllocateDoubleAligned()) { in DoAllocate()
5573 if (instr->hydrogen()->IsOldSpaceAllocation()) { in DoAllocate()
5574 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); in DoAllocate()
5578 if (instr->size()->IsConstantOperand()) { in DoAllocate()
5579 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); in DoAllocate()
5583 Register size = ToRegister(instr->size()); in DoAllocate()
5589 if (instr->hydrogen()->MustPrefillWithFiller()) { in DoAllocate()
5590 if (instr->size()->IsConstantOperand()) { in DoAllocate()
5591 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); in DoAllocate()
5594 temp = ToRegister(instr->size()); in DoAllocate()
5608 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { in DoDeferredAllocate() argument
5609 Register result = ToRegister(instr->result()); in DoDeferredAllocate()
5617 if (instr->size()->IsRegister()) { in DoDeferredAllocate()
5618 Register size = ToRegister(instr->size()); in DoDeferredAllocate()
5620 __ SmiTag(ToRegister(instr->size())); in DoDeferredAllocate()
5623 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); in DoDeferredAllocate()
5634 instr->hydrogen()->MustAllocateDoubleAligned()); in DoDeferredAllocate()
5635 if (instr->hydrogen()->IsOldSpaceAllocation()) { in DoDeferredAllocate()
5636 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); in DoDeferredAllocate()
5644 Runtime::kAllocateInTargetSpace, 2, instr, instr->context()); in DoDeferredAllocate()
5649 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { in DoToFastProperties() argument
5650 DCHECK(ToRegister(instr->value()).is(eax)); in DoToFastProperties()
5652 CallRuntime(Runtime::kToFastProperties, 1, instr); in DoToFastProperties()
5656 void LCodeGen::DoTypeof(LTypeof* instr) { in DoTypeof() argument
5657 DCHECK(ToRegister(instr->context()).is(esi)); in DoTypeof()
5658 DCHECK(ToRegister(instr->value()).is(ebx)); in DoTypeof()
5660 Register value_register = ToRegister(instr->value()); in DoTypeof()
5666 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); in DoTypeof()
5671 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { in DoTypeofIsAndBranch() argument
5672 Register input = ToRegister(instr->value()); in DoTypeofIsAndBranch()
5673 Condition final_branch_condition = EmitTypeofIs(instr, input); in DoTypeofIsAndBranch()
5675 EmitBranch(instr, final_branch_condition); in DoTypeofIsAndBranch()
5680 Condition LCodeGen::EmitTypeofIs(LTypeofIsAndBranch* instr, Register input) { in EmitTypeofIs() argument
5681 Label* true_label = instr->TrueLabel(chunk_); in EmitTypeofIs()
5682 Label* false_label = instr->FalseLabel(chunk_); in EmitTypeofIs()
5683 Handle<String> type_name = instr->type_literal(); in EmitTypeofIs()
5684 int left_block = instr->TrueDestination(chunk_); in EmitTypeofIs()
5685 int right_block = instr->FalseDestination(chunk_); in EmitTypeofIs()
5778 void LCodeGen::DoLazyBailout(LLazyBailout* instr) { in DoLazyBailout() argument
5780 DCHECK(instr->HasEnvironment()); in DoLazyBailout()
5781 LEnvironment* env = instr->environment(); in DoLazyBailout()
5787 void LCodeGen::DoDeoptimize(LDeoptimize* instr) { in DoDeoptimize() argument
5788 Deoptimizer::BailoutType type = instr->hydrogen()->type(); in DoDeoptimize()
5796 DeoptimizeIf(no_condition, instr, instr->hydrogen()->reason(), type); in DoDeoptimize()
5800 void LCodeGen::DoDummy(LDummy* instr) { in DoDummy() argument
5805 void LCodeGen::DoDummyUse(LDummyUse* instr) { in DoDummyUse() argument
5810 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { in DoDeferredStackCheck() argument
5815 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); in DoDeferredStackCheck()
5816 DCHECK(instr->HasEnvironment()); in DoDeferredStackCheck()
5817 LEnvironment* env = instr->environment(); in DoDeferredStackCheck()
5822 void LCodeGen::DoStackCheck(LStackCheck* instr) { in DoStackCheck() argument
5826 LStackCheck* instr, in DoStackCheck() argument
5828 : LDeferredCode(codegen, x87_stack), instr_(instr) { } in DoStackCheck()
5830 LInstruction* instr() override { return instr_; } in DoStackCheck() function in v8::internal::LCodeGen::DoStackCheck::DeferredStackCheck
5836 DCHECK(instr->HasEnvironment()); in DoStackCheck()
5837 LEnvironment* env = instr->environment(); in DoStackCheck()
5840 if (instr->hydrogen()->is_function_entry()) { in DoStackCheck()
5848 DCHECK(instr->context()->IsRegister()); in DoStackCheck()
5849 DCHECK(ToRegister(instr->context()).is(esi)); in DoStackCheck()
5852 instr); in DoStackCheck()
5855 DCHECK(instr->hydrogen()->is_backwards_branch()); in DoStackCheck()
5858 new(zone()) DeferredStackCheck(this, instr, x87_stack_); in DoStackCheck()
5864 __ bind(instr->done_label()); in DoStackCheck()
5865 deferred_stack_check->SetExit(instr->done_label()); in DoStackCheck()
5874 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { in DoOsrEntry() argument
5878 LEnvironment* environment = instr->environment(); in DoOsrEntry()
5889 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { in DoForInPrepareMap() argument
5890 DCHECK(ToRegister(instr->context()).is(esi)); in DoForInPrepareMap()
5892 DeoptimizeIf(zero, instr, Deoptimizer::kSmi); in DoForInPrepareMap()
5896 DeoptimizeIf(below_equal, instr, Deoptimizer::kWrongInstanceType); in DoForInPrepareMap()
5907 CallRuntime(Runtime::kGetPropertyNamesFast, instr); in DoForInPrepareMap()
5911 DeoptimizeIf(not_equal, instr, Deoptimizer::kWrongMap); in DoForInPrepareMap()
5916 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { in DoForInCacheArray() argument
5917 Register map = ToRegister(instr->map()); in DoForInCacheArray()
5918 Register result = ToRegister(instr->result()); in DoForInCacheArray()
5931 FieldOperand(result, FixedArray::SizeFor(instr->idx()))); in DoForInCacheArray()
5934 DeoptimizeIf(equal, instr, Deoptimizer::kNoCache); in DoForInCacheArray()
5938 void LCodeGen::DoCheckMapValue(LCheckMapValue* instr) { in DoCheckMapValue() argument
5939 Register object = ToRegister(instr->value()); in DoCheckMapValue()
5940 __ cmp(ToRegister(instr->map()), in DoCheckMapValue()
5942 DeoptimizeIf(not_equal, instr, Deoptimizer::kWrongMap); in DoCheckMapValue()
5946 void LCodeGen::DoDeferredLoadMutableDouble(LLoadFieldByIndex* instr, in DoDeferredLoadMutableDouble() argument
5955 instr->pointer_map(), 2, Safepoint::kNoLazyDeopt); in DoDeferredLoadMutableDouble()
5960 void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) { in DoLoadFieldByIndex() argument
5964 LLoadFieldByIndex* instr, in DoLoadFieldByIndex() argument
5969 instr_(instr), in DoLoadFieldByIndex()
5976 LInstruction* instr() override { return instr_; } in DoLoadFieldByIndex() function in v8::internal::LCodeGen::DoLoadFieldByIndex::DeferredLoadMutableDouble
5984 Register object = ToRegister(instr->object()); in DoLoadFieldByIndex()
5985 Register index = ToRegister(instr->index()); in DoLoadFieldByIndex()
5989 this, instr, object, index, x87_stack_); in DoLoadFieldByIndex()
6018 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { in DoStoreFrameContext() argument
6019 Register context = ToRegister(instr->context()); in DoStoreFrameContext()
6024 void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) { in DoAllocateBlockContext() argument
6025 Handle<ScopeInfo> scope_info = instr->scope_info(); in DoAllocateBlockContext()
6027 __ push(ToRegister(instr->function())); in DoAllocateBlockContext()
6028 CallRuntime(Runtime::kPushBlockContext, instr); in DoAllocateBlockContext()