| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 RelocInfo::Mode mode, | 343 RelocInfo::Mode mode, |
| 344 LInstruction* instr) { | 344 LInstruction* instr) { |
| 345 CallCodeGeneric(code, mode, instr, RECORD_SIMPLE_SAFEPOINT); | 345 CallCodeGeneric(code, mode, instr, RECORD_SIMPLE_SAFEPOINT); |
| 346 } | 346 } |
| 347 | 347 |
| 348 | 348 |
| 349 void LCodeGen::CallCodeGeneric(Handle<Code> code, | 349 void LCodeGen::CallCodeGeneric(Handle<Code> code, |
| 350 RelocInfo::Mode mode, | 350 RelocInfo::Mode mode, |
| 351 LInstruction* instr, | 351 LInstruction* instr, |
| 352 SafepointMode safepoint_mode) { | 352 SafepointMode safepoint_mode) { |
| 353 EnsureSpaceForLazyDeopt(); |
| 353 ASSERT(instr != NULL); | 354 ASSERT(instr != NULL); |
| 354 | 355 |
| 355 Assembler::BlockConstPoolScope scope(masm_); | 356 Assembler::BlockConstPoolScope scope(masm_); |
| 356 LPointerMap* pointers = instr->pointer_map(); | 357 LPointerMap* pointers = instr->pointer_map(); |
| 357 RecordPosition(pointers->position()); | 358 RecordPosition(pointers->position()); |
| 358 __ Call(code, mode); | 359 __ Call(code, mode); |
| 359 RecordSafepointWithLazyDeopt(instr, safepoint_mode); | 360 RecordSafepointWithLazyDeopt(instr, safepoint_mode); |
| 360 | 361 |
| 361 if ((code->kind() == Code::BINARY_OP_IC) || | 362 if ((code->kind() == Code::BINARY_OP_IC) || |
| 362 (code->kind() == Code::COMPARE_IC)) { | 363 (code->kind() == Code::COMPARE_IC)) { |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 if (FLAG_code_comments && instr->HasInterestingComment(this)) { | 676 if (FLAG_code_comments && instr->HasInterestingComment(this)) { |
| 676 Comment(";;; <@%d,#%d> %s", | 677 Comment(";;; <@%d,#%d> %s", |
| 677 current_instruction_, | 678 current_instruction_, |
| 678 instr->hydrogen_value()->id(), | 679 instr->hydrogen_value()->id(), |
| 679 instr->Mnemonic()); | 680 instr->Mnemonic()); |
| 680 } | 681 } |
| 681 | 682 |
| 682 instr->CompileToNative(this); | 683 instr->CompileToNative(this); |
| 683 } | 684 } |
| 684 EnsureSpaceForLazyDeopt(); | 685 EnsureSpaceForLazyDeopt(); |
| 686 last_lazy_deopt_pc_ = masm()->pc_offset(); |
| 685 return !is_aborted(); | 687 return !is_aborted(); |
| 686 } | 688 } |
| 687 | 689 |
| 688 | 690 |
| 689 bool LCodeGen::GenerateDeferredCode() { | 691 bool LCodeGen::GenerateDeferredCode() { |
| 690 ASSERT(is_generating()); | 692 ASSERT(is_generating()); |
| 691 if (deferred_.length() > 0) { | 693 if (deferred_.length() > 0) { |
| 692 for (int i = 0; !is_aborted() && (i < deferred_.length()); i++) { | 694 for (int i = 0; !is_aborted() && (i < deferred_.length()); i++) { |
| 693 LDeferredCode* code = deferred_[i]; | 695 LDeferredCode* code = deferred_[i]; |
| 694 | 696 |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 intptr_t padding_size = last_lazy_deopt_pc_ + patch_size - current_pc; | 1005 intptr_t padding_size = last_lazy_deopt_pc_ + patch_size - current_pc; |
| 1004 ASSERT((padding_size % kInstructionSize) == 0); | 1006 ASSERT((padding_size % kInstructionSize) == 0); |
| 1005 InstructionAccurateScope instruction_accurate( | 1007 InstructionAccurateScope instruction_accurate( |
| 1006 masm(), padding_size / kInstructionSize); | 1008 masm(), padding_size / kInstructionSize); |
| 1007 | 1009 |
| 1008 while (padding_size > 0) { | 1010 while (padding_size > 0) { |
| 1009 __ nop(); | 1011 __ nop(); |
| 1010 padding_size -= kInstructionSize; | 1012 padding_size -= kInstructionSize; |
| 1011 } | 1013 } |
| 1012 } | 1014 } |
| 1013 last_lazy_deopt_pc_ = masm()->pc_offset(); | |
| 1014 } | 1015 } |
| 1015 | 1016 |
| 1016 | 1017 |
| 1017 Register LCodeGen::ToRegister(LOperand* op) const { | 1018 Register LCodeGen::ToRegister(LOperand* op) const { |
| 1018 // TODO(all): support zero register results, as ToRegister32. | 1019 // TODO(all): support zero register results, as ToRegister32. |
| 1019 ASSERT((op != NULL) && op->IsRegister()); | 1020 ASSERT((op != NULL) && op->IsRegister()); |
| 1020 return Register::FromAllocationIndex(op->index()); | 1021 return Register::FromAllocationIndex(op->index()); |
| 1021 } | 1022 } |
| 1022 | 1023 |
| 1023 | 1024 |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1305 | 1306 |
| 1306 if (instr->size()->IsConstantOperand()) { | 1307 if (instr->size()->IsConstantOperand()) { |
| 1307 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 1308 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
| 1308 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags); | 1309 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags); |
| 1309 } else { | 1310 } else { |
| 1310 Register size = ToRegister(instr->size()); | 1311 Register size = ToRegister(instr->size()); |
| 1311 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags); | 1312 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags); |
| 1312 } | 1313 } |
| 1313 | 1314 |
| 1314 __ Bind(deferred->exit()); | 1315 __ Bind(deferred->exit()); |
| 1316 |
| 1317 if (instr->hydrogen()->MustPrefillWithFiller()) { |
| 1318 if (instr->size()->IsConstantOperand()) { |
| 1319 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
| 1320 __ Mov(temp1, size - kPointerSize); |
| 1321 } else { |
| 1322 __ Sub(temp1, ToRegister(instr->size()), kPointerSize); |
| 1323 } |
| 1324 __ Sub(result, result, kHeapObjectTag); |
| 1325 |
| 1326 // TODO(jbramley): Optimize this loop using stp. |
| 1327 Label loop; |
| 1328 __ Bind(&loop); |
| 1329 __ Mov(temp2, Operand(isolate()->factory()->one_pointer_filler_map())); |
| 1330 __ Str(temp2, MemOperand(result, temp1)); |
| 1331 __ Subs(temp1, temp1, kPointerSize); |
| 1332 __ B(ge, &loop); |
| 1333 |
| 1334 __ Add(result, result, kHeapObjectTag); |
| 1335 } |
| 1315 } | 1336 } |
| 1316 | 1337 |
| 1317 | 1338 |
| 1318 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { | 1339 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { |
| 1319 Register result = ToRegister(instr->result()); | 1340 Register result = ToRegister(instr->result()); |
| 1320 | 1341 |
| 1321 // TODO(3095996): Get rid of this. For now, we need to make the | 1342 // TODO(3095996): Get rid of this. For now, we need to make the |
| 1322 // result register contain a valid pointer because it is already | 1343 // result register contain a valid pointer because it is already |
| 1323 // contained in the register pointer map. | 1344 // contained in the register pointer map. |
| 1324 __ Mov(result, Operand(Smi::FromInt(0))); | 1345 __ Mov(result, Operand(Smi::FromInt(0))); |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1822 case CodeStub::SubString: { | 1843 case CodeStub::SubString: { |
| 1823 SubStringStub stub; | 1844 SubStringStub stub; |
| 1824 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 1845 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 1825 break; | 1846 break; |
| 1826 } | 1847 } |
| 1827 case CodeStub::NumberToString: { | 1848 case CodeStub::NumberToString: { |
| 1828 NumberToStringStub stub; | 1849 NumberToStringStub stub; |
| 1829 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 1850 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 1830 break; | 1851 break; |
| 1831 } | 1852 } |
| 1832 case CodeStub::StringAdd: { | |
| 1833 // TODO(jbramley): In bleeding_edge, there is no StringAdd case here. | |
| 1834 StringAddStub stub(NO_STRING_ADD_FLAGS); | |
| 1835 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | |
| 1836 break; | |
| 1837 } | |
| 1838 case CodeStub::StringCompare: { | 1853 case CodeStub::StringCompare: { |
| 1839 StringCompareStub stub; | 1854 StringCompareStub stub; |
| 1840 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 1855 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 1841 break; | 1856 break; |
| 1842 } | 1857 } |
| 1843 case CodeStub::TranscendentalCache: { | 1858 case CodeStub::TranscendentalCache: { |
| 1844 __ Peek(x0, 0); | 1859 __ Peek(x0, 0); |
| 1845 TranscendentalCacheStub stub(instr->transcendental_type(), | 1860 TranscendentalCacheStub stub(instr->transcendental_type(), |
| 1846 TranscendentalCacheStub::TAGGED); | 1861 TranscendentalCacheStub::TAGGED); |
| 1847 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 1862 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2242 __ Cmp(reg, temp); | 2257 __ Cmp(reg, temp); |
| 2243 } else { | 2258 } else { |
| 2244 __ Cmp(reg, Operand(target)); | 2259 __ Cmp(reg, Operand(target)); |
| 2245 } | 2260 } |
| 2246 DeoptimizeIf(ne, instr->environment()); | 2261 DeoptimizeIf(ne, instr->environment()); |
| 2247 } | 2262 } |
| 2248 | 2263 |
| 2249 | 2264 |
| 2250 void LCodeGen::DoLazyBailout(LLazyBailout* instr) { | 2265 void LCodeGen::DoLazyBailout(LLazyBailout* instr) { |
| 2251 EnsureSpaceForLazyDeopt(); | 2266 EnsureSpaceForLazyDeopt(); |
| 2267 last_lazy_deopt_pc_ = masm()->pc_offset(); |
| 2252 ASSERT(instr->HasEnvironment()); | 2268 ASSERT(instr->HasEnvironment()); |
| 2253 LEnvironment* env = instr->environment(); | 2269 LEnvironment* env = instr->environment(); |
| 2254 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); | 2270 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); |
| 2255 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); | 2271 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |
| 2256 } | 2272 } |
| 2257 | 2273 |
| 2258 | 2274 |
| 2259 void LCodeGen::DoDateField(LDateField* instr) { | 2275 void LCodeGen::DoDateField(LDateField* instr) { |
| 2260 Register object = ToRegister(instr->date()); | 2276 Register object = ToRegister(instr->date()); |
| 2261 Register result = ToRegister(instr->result()); | 2277 Register result = ToRegister(instr->result()); |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2973 label->hydrogen_value()->id(), | 2989 label->hydrogen_value()->id(), |
| 2974 label->block_id(), | 2990 label->block_id(), |
| 2975 LabelType(label)); | 2991 LabelType(label)); |
| 2976 | 2992 |
| 2977 __ Bind(label->label()); | 2993 __ Bind(label->label()); |
| 2978 current_block_ = label->block_id(); | 2994 current_block_ = label->block_id(); |
| 2979 DoGap(label); | 2995 DoGap(label); |
| 2980 } | 2996 } |
| 2981 | 2997 |
| 2982 | 2998 |
| 2999 void LCodeGen::DoLinkObjectInList(LLinkObjectInList* instr) { |
| 3000 Register object = ToRegister(instr->object()); |
| 3001 Register temp = ToRegister(instr->temp()); |
| 3002 ExternalReference sites_list_address = instr->GetReference(isolate()); |
| 3003 |
| 3004 __ Mov(temp, Operand(sites_list_address)); |
| 3005 __ Ldr(temp, MemOperand(temp)); |
| 3006 __ Str(temp, FieldMemOperand(object, |
| 3007 instr->hydrogen()->store_field().offset())); |
| 3008 __ Mov(temp, Operand(sites_list_address)); |
| 3009 __ Str(object, MemOperand(temp)); |
| 3010 } |
| 3011 |
| 3012 |
| 2983 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 3013 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
| 2984 Register context = ToRegister(instr->context()); | 3014 Register context = ToRegister(instr->context()); |
| 2985 Register result = ToRegister(instr->result()); | 3015 Register result = ToRegister(instr->result()); |
| 2986 __ Ldr(result, ContextMemOperand(context, instr->slot_index())); | 3016 __ Ldr(result, ContextMemOperand(context, instr->slot_index())); |
| 2987 if (instr->hydrogen()->RequiresHoleCheck()) { | 3017 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 2988 if (instr->hydrogen()->DeoptimizesOnHole()) { | 3018 if (instr->hydrogen()->DeoptimizesOnHole()) { |
| 2989 DeoptimizeIfRoot(result, Heap::kTheHoleValueRootIndex, | 3019 DeoptimizeIfRoot(result, Heap::kTheHoleValueRootIndex, |
| 2990 instr->environment()); | 3020 instr->environment()); |
| 2991 } else { | 3021 } else { |
| 2992 Label not_the_hole; | 3022 Label not_the_hole; |
| (...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4538 ASSERT(instr->HasEnvironment()); | 4568 ASSERT(instr->HasEnvironment()); |
| 4539 LEnvironment* env = instr->environment(); | 4569 LEnvironment* env = instr->environment(); |
| 4540 // There is no LLazyBailout instruction for stack-checks. We have to | 4570 // There is no LLazyBailout instruction for stack-checks. We have to |
| 4541 // prepare for lazy deoptimization explicitly here. | 4571 // prepare for lazy deoptimization explicitly here. |
| 4542 if (instr->hydrogen()->is_function_entry()) { | 4572 if (instr->hydrogen()->is_function_entry()) { |
| 4543 // Perform stack overflow check. | 4573 // Perform stack overflow check. |
| 4544 Label done; | 4574 Label done; |
| 4545 __ CompareRoot(masm()->StackPointer(), Heap::kStackLimitRootIndex); | 4575 __ CompareRoot(masm()->StackPointer(), Heap::kStackLimitRootIndex); |
| 4546 __ B(hs, &done); | 4576 __ B(hs, &done); |
| 4547 | 4577 |
| 4578 // TODO(jbramley): This PredictableCodeSizeScope fails sometimes. Sometimes |
| 4579 // the code tries to generate 3 instructions, and sometimes it tries to |
| 4580 // generate 2. Work out why, and fix it. |
| 4548 PredictableCodeSizeScope predictable(masm_, | 4581 PredictableCodeSizeScope predictable(masm_, |
| 4549 Assembler::kCallSizeWithRelocation); | 4582 Assembler::kCallSizeWithRelocation); |
| 4550 StackCheckStub stub; | 4583 StackCheckStub stub; |
| 4551 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 4584 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 4552 EnsureSpaceForLazyDeopt(); | 4585 EnsureSpaceForLazyDeopt(); |
| 4586 last_lazy_deopt_pc_ = masm()->pc_offset(); |
| 4553 | 4587 |
| 4554 __ Bind(&done); | 4588 __ Bind(&done); |
| 4555 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); | 4589 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); |
| 4556 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); | 4590 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |
| 4557 } else { | 4591 } else { |
| 4558 ASSERT(instr->hydrogen()->is_backwards_branch()); | 4592 ASSERT(instr->hydrogen()->is_backwards_branch()); |
| 4559 // Perform stack overflow check if this goto needs it before jumping. | 4593 // Perform stack overflow check if this goto needs it before jumping. |
| 4560 DeferredStackCheck* deferred_stack_check = | 4594 DeferredStackCheck* deferred_stack_check = |
| 4561 new(zone()) DeferredStackCheck(this, instr); | 4595 new(zone()) DeferredStackCheck(this, instr); |
| 4562 __ CompareRoot(masm()->StackPointer(), Heap::kStackLimitRootIndex); | 4596 __ CompareRoot(masm()->StackPointer(), Heap::kStackLimitRootIndex); |
| 4563 __ B(lo, deferred_stack_check->entry()); | 4597 __ B(lo, deferred_stack_check->entry()); |
| 4564 | 4598 |
| 4565 EnsureSpaceForLazyDeopt(); | 4599 EnsureSpaceForLazyDeopt(); |
| 4600 last_lazy_deopt_pc_ = masm()->pc_offset(); |
| 4566 __ Bind(instr->done_label()); | 4601 __ Bind(instr->done_label()); |
| 4567 deferred_stack_check->SetExit(instr->done_label()); | 4602 deferred_stack_check->SetExit(instr->done_label()); |
| 4568 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); | 4603 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); |
| 4569 // Don't record a deoptimization index for the safepoint here. | 4604 // Don't record a deoptimization index for the safepoint here. |
| 4570 // This will be done explicitly when emitting call and the safepoint in | 4605 // This will be done explicitly when emitting call and the safepoint in |
| 4571 // the deferred code. | 4606 // the deferred code. |
| 4572 } | 4607 } |
| 4573 } | 4608 } |
| 4574 | 4609 |
| 4575 | 4610 |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4879 ? isolate()->builtins()->StoreIC_Initialize_Strict() | 4914 ? isolate()->builtins()->StoreIC_Initialize_Strict() |
| 4880 : isolate()->builtins()->StoreIC_Initialize(); | 4915 : isolate()->builtins()->StoreIC_Initialize(); |
| 4881 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 4916 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 4882 } | 4917 } |
| 4883 | 4918 |
| 4884 | 4919 |
| 4885 void LCodeGen::DoStringAdd(LStringAdd* instr) { | 4920 void LCodeGen::DoStringAdd(LStringAdd* instr) { |
| 4886 Register left = ToRegister(instr->left()); | 4921 Register left = ToRegister(instr->left()); |
| 4887 Register right = ToRegister(instr->right()); | 4922 Register right = ToRegister(instr->right()); |
| 4888 __ Push(left, right); | 4923 __ Push(left, right); |
| 4889 // TODO(jbramley): Once we haved rebased, use instr->hydrogen->flags() to get | 4924 StringAddStub stub(instr->hydrogen()->flags()); |
| 4890 // the flags for the stub. | |
| 4891 StringAddStub stub(NO_STRING_CHECK_IN_STUB); | |
| 4892 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 4925 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 4893 } | 4926 } |
| 4894 | 4927 |
| 4895 | 4928 |
| 4896 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { | 4929 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { |
| 4897 class DeferredStringCharCodeAt: public LDeferredCode { | 4930 class DeferredStringCharCodeAt: public LDeferredCode { |
| 4898 public: | 4931 public: |
| 4899 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) | 4932 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) |
| 4900 : LDeferredCode(codegen), instr_(instr) { } | 4933 : LDeferredCode(codegen), instr_(instr) { } |
| 4901 virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } | 4934 virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5234 UNREACHABLE(); | 5267 UNREACHABLE(); |
| 5235 } | 5268 } |
| 5236 __ Bind(¬_applicable); | 5269 __ Bind(¬_applicable); |
| 5237 } | 5270 } |
| 5238 | 5271 |
| 5239 | 5272 |
| 5240 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { | 5273 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { |
| 5241 Register object = ToRegister(instr->object()); | 5274 Register object = ToRegister(instr->object()); |
| 5242 Register temp1 = ToRegister(instr->temp1()); | 5275 Register temp1 = ToRegister(instr->temp1()); |
| 5243 Register temp2 = ToRegister(instr->temp2()); | 5276 Register temp2 = ToRegister(instr->temp2()); |
| 5244 __ TestJSArrayForAllocationSiteInfo(object, temp1, temp2); | 5277 __ TestJSArrayForAllocationMemento(object, temp1, temp2); |
| 5245 DeoptimizeIf(eq, instr->environment()); | 5278 DeoptimizeIf(eq, instr->environment()); |
| 5246 } | 5279 } |
| 5247 | 5280 |
| 5248 | 5281 |
| 5249 void LCodeGen::DoTruncateDoubleToIntOrSmi(LTruncateDoubleToIntOrSmi* instr) { | 5282 void LCodeGen::DoTruncateDoubleToIntOrSmi(LTruncateDoubleToIntOrSmi* instr) { |
| 5250 DoubleRegister input = ToDoubleRegister(instr->value()); | 5283 DoubleRegister input = ToDoubleRegister(instr->value()); |
| 5251 Register result = ToRegister(instr->result()); | 5284 Register result = ToRegister(instr->result()); |
| 5252 __ ECMA262ToInt32(result, input, | 5285 __ ECMA262ToInt32(result, input, |
| 5253 ToRegister(instr->temp1()), | 5286 ToRegister(instr->temp1()), |
| 5254 ToRegister(instr->temp2()), | 5287 ToRegister(instr->temp2()), |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5460 __ Bind(&out_of_object); | 5493 __ Bind(&out_of_object); |
| 5461 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5494 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
| 5462 // Index is equal to negated out of object property index plus 1. | 5495 // Index is equal to negated out of object property index plus 1. |
| 5463 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5496 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5464 __ Ldr(result, FieldMemOperand(result, | 5497 __ Ldr(result, FieldMemOperand(result, |
| 5465 FixedArray::kHeaderSize - kPointerSize)); | 5498 FixedArray::kHeaderSize - kPointerSize)); |
| 5466 __ Bind(&done); | 5499 __ Bind(&done); |
| 5467 } | 5500 } |
| 5468 | 5501 |
| 5469 } } // namespace v8::internal | 5502 } } // namespace v8::internal |
| OLD | NEW |