OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 | 1048 |
1049 | 1049 |
1050 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, | 1050 void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, |
1051 int arguments, | 1051 int arguments, |
1052 Safepoint::DeoptMode deopt_mode) { | 1052 Safepoint::DeoptMode deopt_mode) { |
1053 RecordSafepoint( | 1053 RecordSafepoint( |
1054 pointers, Safepoint::kWithRegisters, arguments, deopt_mode); | 1054 pointers, Safepoint::kWithRegisters, arguments, deopt_mode); |
1055 } | 1055 } |
1056 | 1056 |
1057 | 1057 |
1058 void LCodeGen::RecordSafepointWithRegistersAndDoubles( | |
1059 LPointerMap* pointers, | |
1060 int arguments, | |
1061 Safepoint::DeoptMode deopt_mode) { | |
1062 RecordSafepoint( | |
1063 pointers, Safepoint::kWithRegistersAndDoubles, arguments, deopt_mode); | |
1064 } | |
1065 | |
1066 | |
1067 void LCodeGen::RecordAndWritePosition(int position) { | 1058 void LCodeGen::RecordAndWritePosition(int position) { |
1068 if (position == RelocInfo::kNoPosition) return; | 1059 if (position == RelocInfo::kNoPosition) return; |
1069 masm()->positions_recorder()->RecordPosition(position); | 1060 masm()->positions_recorder()->RecordPosition(position); |
1070 masm()->positions_recorder()->WriteRecordedPositions(); | 1061 masm()->positions_recorder()->WriteRecordedPositions(); |
1071 } | 1062 } |
1072 | 1063 |
1073 | 1064 |
1074 static const char* LabelType(LLabel* label) { | 1065 static const char* LabelType(LLabel* label) { |
1075 if (label->is_loop_header()) return " (loop header)"; | 1066 if (label->is_loop_header()) return " (loop header)"; |
1076 if (label->is_osr_entry()) return " (OSR entry)"; | 1067 if (label->is_osr_entry()) return " (OSR entry)"; |
(...skipping 1799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2876 Label* bool_load) { | 2867 Label* bool_load) { |
2877 InstanceofStub::Flags flags = InstanceofStub::kNoFlags; | 2868 InstanceofStub::Flags flags = InstanceofStub::kNoFlags; |
2878 flags = static_cast<InstanceofStub::Flags>( | 2869 flags = static_cast<InstanceofStub::Flags>( |
2879 flags | InstanceofStub::kArgsInRegisters); | 2870 flags | InstanceofStub::kArgsInRegisters); |
2880 flags = static_cast<InstanceofStub::Flags>( | 2871 flags = static_cast<InstanceofStub::Flags>( |
2881 flags | InstanceofStub::kCallSiteInlineCheck); | 2872 flags | InstanceofStub::kCallSiteInlineCheck); |
2882 flags = static_cast<InstanceofStub::Flags>( | 2873 flags = static_cast<InstanceofStub::Flags>( |
2883 flags | InstanceofStub::kReturnTrueFalseObject); | 2874 flags | InstanceofStub::kReturnTrueFalseObject); |
2884 InstanceofStub stub(isolate(), flags); | 2875 InstanceofStub stub(isolate(), flags); |
2885 | 2876 |
2886 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 2877 PushSafepointRegistersScope scope(this); |
2887 LoadContextFromDeferred(instr->context()); | 2878 LoadContextFromDeferred(instr->context()); |
2888 | 2879 |
2889 __ Move(InstanceofStub::right(), instr->function()); | 2880 __ Move(InstanceofStub::right(), instr->function()); |
2890 | 2881 |
2891 int call_size = CallCodeSize(stub.GetCode(), RelocInfo::CODE_TARGET); | 2882 int call_size = CallCodeSize(stub.GetCode(), RelocInfo::CODE_TARGET); |
2892 int additional_delta = (call_size / Assembler::kInstrSize) + 4; | 2883 int additional_delta = (call_size / Assembler::kInstrSize) + 4; |
2893 // Make sure that code size is predicable, since we use specific constants | 2884 // Make sure that code size is predicable, since we use specific constants |
2894 // offsets in the code to find embedded values.. | 2885 // offsets in the code to find embedded values.. |
2895 PredictableCodeSizeScope predictable( | 2886 PredictableCodeSizeScope predictable( |
2896 masm_, (additional_delta + 1) * Assembler::kInstrSize); | 2887 masm_, (additional_delta + 1) * Assembler::kInstrSize); |
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3689 // Check the sign of the argument. If the argument is positive, just | 3680 // Check the sign of the argument. If the argument is positive, just |
3690 // return it. | 3681 // return it. |
3691 __ tst(exponent, Operand(HeapNumber::kSignMask)); | 3682 __ tst(exponent, Operand(HeapNumber::kSignMask)); |
3692 // Move the input to the result if necessary. | 3683 // Move the input to the result if necessary. |
3693 __ Move(result, input); | 3684 __ Move(result, input); |
3694 __ b(eq, &done); | 3685 __ b(eq, &done); |
3695 | 3686 |
3696 // Input is negative. Reverse its sign. | 3687 // Input is negative. Reverse its sign. |
3697 // Preserve the value of all registers. | 3688 // Preserve the value of all registers. |
3698 { | 3689 { |
3699 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 3690 PushSafepointRegistersScope scope(this); |
3700 | 3691 |
3701 // Registers were saved at the safepoint, so we can use | 3692 // Registers were saved at the safepoint, so we can use |
3702 // many scratch registers. | 3693 // many scratch registers. |
3703 Register tmp1 = input.is(r1) ? r0 : r1; | 3694 Register tmp1 = input.is(r1) ? r0 : r1; |
3704 Register tmp2 = input.is(r2) ? r0 : r2; | 3695 Register tmp2 = input.is(r2) ? r0 : r2; |
3705 Register tmp3 = input.is(r3) ? r0 : r3; | 3696 Register tmp3 = input.is(r3) ? r0 : r3; |
3706 Register tmp4 = input.is(r4) ? r0 : r4; | 3697 Register tmp4 = input.is(r4) ? r0 : r4; |
3707 | 3698 |
3708 // exponent: floating point exponent value. | 3699 // exponent: floating point exponent value. |
3709 | 3700 |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4443 __ str(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); | 4434 __ str(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); |
4444 // Write barrier. | 4435 // Write barrier. |
4445 __ RecordWriteForMap(object_reg, | 4436 __ RecordWriteForMap(object_reg, |
4446 new_map_reg, | 4437 new_map_reg, |
4447 scratch, | 4438 scratch, |
4448 GetLinkRegisterState(), | 4439 GetLinkRegisterState(), |
4449 kDontSaveFPRegs); | 4440 kDontSaveFPRegs); |
4450 } else { | 4441 } else { |
4451 ASSERT(ToRegister(instr->context()).is(cp)); | 4442 ASSERT(ToRegister(instr->context()).is(cp)); |
4452 ASSERT(object_reg.is(r0)); | 4443 ASSERT(object_reg.is(r0)); |
4453 PushSafepointRegistersScope scope( | 4444 PushSafepointRegistersScope scope(this); |
4454 this, Safepoint::kWithRegistersAndDoubles); | |
4455 __ Move(r1, to_map); | 4445 __ Move(r1, to_map); |
4456 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; | 4446 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; |
4457 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array); | 4447 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array); |
4458 __ CallStub(&stub); | 4448 __ CallStub(&stub); |
4459 RecordSafepointWithRegistersAndDoubles( | 4449 RecordSafepointWithRegisters( |
4460 instr->pointer_map(), 0, Safepoint::kLazyDeopt); | 4450 instr->pointer_map(), 0, Safepoint::kLazyDeopt); |
4461 } | 4451 } |
4462 __ bind(¬_applicable); | 4452 __ bind(¬_applicable); |
4463 } | 4453 } |
4464 | 4454 |
4465 | 4455 |
4466 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { | 4456 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { |
4467 Register object = ToRegister(instr->object()); | 4457 Register object = ToRegister(instr->object()); |
4468 Register temp = ToRegister(instr->temp()); | 4458 Register temp = ToRegister(instr->temp()); |
4469 Label no_memento_found; | 4459 Label no_memento_found; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4512 void LCodeGen::DoDeferredStringCharCodeAt(LStringCharCodeAt* instr) { | 4502 void LCodeGen::DoDeferredStringCharCodeAt(LStringCharCodeAt* instr) { |
4513 Register string = ToRegister(instr->string()); | 4503 Register string = ToRegister(instr->string()); |
4514 Register result = ToRegister(instr->result()); | 4504 Register result = ToRegister(instr->result()); |
4515 Register scratch = scratch0(); | 4505 Register scratch = scratch0(); |
4516 | 4506 |
4517 // TODO(3095996): Get rid of this. For now, we need to make the | 4507 // TODO(3095996): Get rid of this. For now, we need to make the |
4518 // result register contain a valid pointer because it is already | 4508 // result register contain a valid pointer because it is already |
4519 // contained in the register pointer map. | 4509 // contained in the register pointer map. |
4520 __ mov(result, Operand::Zero()); | 4510 __ mov(result, Operand::Zero()); |
4521 | 4511 |
4522 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 4512 PushSafepointRegistersScope scope(this); |
4523 __ push(string); | 4513 __ push(string); |
4524 // Push the index as a smi. This is safe because of the checks in | 4514 // Push the index as a smi. This is safe because of the checks in |
4525 // DoStringCharCodeAt above. | 4515 // DoStringCharCodeAt above. |
4526 if (instr->index()->IsConstantOperand()) { | 4516 if (instr->index()->IsConstantOperand()) { |
4527 int const_index = ToInteger32(LConstantOperand::cast(instr->index())); | 4517 int const_index = ToInteger32(LConstantOperand::cast(instr->index())); |
4528 __ mov(scratch, Operand(Smi::FromInt(const_index))); | 4518 __ mov(scratch, Operand(Smi::FromInt(const_index))); |
4529 __ push(scratch); | 4519 __ push(scratch); |
4530 } else { | 4520 } else { |
4531 Register index = ToRegister(instr->index()); | 4521 Register index = ToRegister(instr->index()); |
4532 __ SmiTag(index); | 4522 __ SmiTag(index); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4575 | 4565 |
4576 void LCodeGen::DoDeferredStringCharFromCode(LStringCharFromCode* instr) { | 4566 void LCodeGen::DoDeferredStringCharFromCode(LStringCharFromCode* instr) { |
4577 Register char_code = ToRegister(instr->char_code()); | 4567 Register char_code = ToRegister(instr->char_code()); |
4578 Register result = ToRegister(instr->result()); | 4568 Register result = ToRegister(instr->result()); |
4579 | 4569 |
4580 // TODO(3095996): Get rid of this. For now, we need to make the | 4570 // TODO(3095996): Get rid of this. For now, we need to make the |
4581 // result register contain a valid pointer because it is already | 4571 // result register contain a valid pointer because it is already |
4582 // contained in the register pointer map. | 4572 // contained in the register pointer map. |
4583 __ mov(result, Operand::Zero()); | 4573 __ mov(result, Operand::Zero()); |
4584 | 4574 |
4585 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 4575 PushSafepointRegistersScope scope(this); |
4586 __ SmiTag(char_code); | 4576 __ SmiTag(char_code); |
4587 __ push(char_code); | 4577 __ push(char_code); |
4588 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr, instr->context()); | 4578 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr, instr->context()); |
4589 __ StoreToSafepointRegisterSlot(r0, result); | 4579 __ StoreToSafepointRegisterSlot(r0, result); |
4590 } | 4580 } |
4591 | 4581 |
4592 | 4582 |
4593 void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { | 4583 void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { |
4594 LOperand* input = instr->value(); | 4584 LOperand* input = instr->value(); |
4595 ASSERT(input->IsRegister() || input->IsStackSlot()); | 4585 ASSERT(input->IsRegister() || input->IsStackSlot()); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4708 | 4698 |
4709 // Slow case: Call the runtime system to do the number allocation. | 4699 // Slow case: Call the runtime system to do the number allocation. |
4710 __ bind(&slow); | 4700 __ bind(&slow); |
4711 { | 4701 { |
4712 // TODO(3095996): Put a valid pointer value in the stack slot where the | 4702 // TODO(3095996): Put a valid pointer value in the stack slot where the |
4713 // result register is stored, as this register is in the pointer map, but | 4703 // result register is stored, as this register is in the pointer map, but |
4714 // contains an integer value. | 4704 // contains an integer value. |
4715 __ mov(dst, Operand::Zero()); | 4705 __ mov(dst, Operand::Zero()); |
4716 | 4706 |
4717 // Preserve the value of all registers. | 4707 // Preserve the value of all registers. |
4718 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 4708 PushSafepointRegistersScope scope(this); |
4719 | 4709 |
4720 // NumberTagI and NumberTagD use the context from the frame, rather than | 4710 // NumberTagI and NumberTagD use the context from the frame, rather than |
4721 // the environment's HContext or HInlinedContext value. | 4711 // the environment's HContext or HInlinedContext value. |
4722 // They only call Runtime::kAllocateHeapNumber. | 4712 // They only call Runtime::kAllocateHeapNumber. |
4723 // The corresponding HChange instructions are added in a phase that does | 4713 // The corresponding HChange instructions are added in a phase that does |
4724 // not have easy access to the local context. | 4714 // not have easy access to the local context. |
4725 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 4715 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
4726 __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber); | 4716 __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber); |
4727 RecordSafepointWithRegisters( | 4717 RecordSafepointWithRegisters( |
4728 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); | 4718 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4773 } | 4763 } |
4774 | 4764 |
4775 | 4765 |
4776 void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) { | 4766 void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) { |
4777 // TODO(3095996): Get rid of this. For now, we need to make the | 4767 // TODO(3095996): Get rid of this. For now, we need to make the |
4778 // result register contain a valid pointer because it is already | 4768 // result register contain a valid pointer because it is already |
4779 // contained in the register pointer map. | 4769 // contained in the register pointer map. |
4780 Register reg = ToRegister(instr->result()); | 4770 Register reg = ToRegister(instr->result()); |
4781 __ mov(reg, Operand::Zero()); | 4771 __ mov(reg, Operand::Zero()); |
4782 | 4772 |
4783 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 4773 PushSafepointRegistersScope scope(this); |
4784 // NumberTagI and NumberTagD use the context from the frame, rather than | 4774 // NumberTagI and NumberTagD use the context from the frame, rather than |
4785 // the environment's HContext or HInlinedContext value. | 4775 // the environment's HContext or HInlinedContext value. |
4786 // They only call Runtime::kAllocateHeapNumber. | 4776 // They only call Runtime::kAllocateHeapNumber. |
4787 // The corresponding HChange instructions are added in a phase that does | 4777 // The corresponding HChange instructions are added in a phase that does |
4788 // not have easy access to the local context. | 4778 // not have easy access to the local context. |
4789 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 4779 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
4790 __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber); | 4780 __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber); |
4791 RecordSafepointWithRegisters( | 4781 RecordSafepointWithRegisters( |
4792 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); | 4782 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); |
4793 __ sub(r0, r0, Operand(kHeapObjectTag)); | 4783 __ sub(r0, r0, Operand(kHeapObjectTag)); |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5137 __ cmp(reg, ip); | 5127 __ cmp(reg, ip); |
5138 } else { | 5128 } else { |
5139 __ cmp(reg, Operand(object)); | 5129 __ cmp(reg, Operand(object)); |
5140 } | 5130 } |
5141 DeoptimizeIf(ne, instr->environment()); | 5131 DeoptimizeIf(ne, instr->environment()); |
5142 } | 5132 } |
5143 | 5133 |
5144 | 5134 |
5145 void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) { | 5135 void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) { |
5146 { | 5136 { |
5147 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 5137 PushSafepointRegistersScope scope(this); |
5148 __ push(object); | 5138 __ push(object); |
5149 __ mov(cp, Operand::Zero()); | 5139 __ mov(cp, Operand::Zero()); |
5150 __ CallRuntimeSaveDoubles(Runtime::kTryMigrateInstance); | 5140 __ CallRuntimeSaveDoubles(Runtime::kTryMigrateInstance); |
5151 RecordSafepointWithRegisters( | 5141 RecordSafepointWithRegisters( |
5152 instr->pointer_map(), 1, Safepoint::kNoLazyDeopt); | 5142 instr->pointer_map(), 1, Safepoint::kNoLazyDeopt); |
5153 __ StoreToSafepointRegisterSlot(r0, scratch0()); | 5143 __ StoreToSafepointRegisterSlot(r0, scratch0()); |
5154 } | 5144 } |
5155 __ tst(scratch0(), Operand(kSmiTagMask)); | 5145 __ tst(scratch0(), Operand(kSmiTagMask)); |
5156 DeoptimizeIf(eq, instr->environment()); | 5146 DeoptimizeIf(eq, instr->environment()); |
5157 } | 5147 } |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5354 | 5344 |
5355 | 5345 |
5356 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { | 5346 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { |
5357 Register result = ToRegister(instr->result()); | 5347 Register result = ToRegister(instr->result()); |
5358 | 5348 |
5359 // TODO(3095996): Get rid of this. For now, we need to make the | 5349 // TODO(3095996): Get rid of this. For now, we need to make the |
5360 // result register contain a valid pointer because it is already | 5350 // result register contain a valid pointer because it is already |
5361 // contained in the register pointer map. | 5351 // contained in the register pointer map. |
5362 __ mov(result, Operand(Smi::FromInt(0))); | 5352 __ mov(result, Operand(Smi::FromInt(0))); |
5363 | 5353 |
5364 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 5354 PushSafepointRegistersScope scope(this); |
5365 if (instr->size()->IsRegister()) { | 5355 if (instr->size()->IsRegister()) { |
5366 Register size = ToRegister(instr->size()); | 5356 Register size = ToRegister(instr->size()); |
5367 ASSERT(!size.is(result)); | 5357 ASSERT(!size.is(result)); |
5368 __ SmiTag(size); | 5358 __ SmiTag(size); |
5369 __ push(size); | 5359 __ push(size); |
5370 } else { | 5360 } else { |
5371 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5361 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
5372 if (size >= 0 && size <= Smi::kMaxValue) { | 5362 if (size >= 0 && size <= Smi::kMaxValue) { |
5373 __ Push(Smi::FromInt(size)); | 5363 __ Push(Smi::FromInt(size)); |
5374 } else { | 5364 } else { |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5643 // Nothing to see here, move on! | 5633 // Nothing to see here, move on! |
5644 } | 5634 } |
5645 | 5635 |
5646 | 5636 |
5647 void LCodeGen::DoDummyUse(LDummyUse* instr) { | 5637 void LCodeGen::DoDummyUse(LDummyUse* instr) { |
5648 // Nothing to see here, move on! | 5638 // Nothing to see here, move on! |
5649 } | 5639 } |
5650 | 5640 |
5651 | 5641 |
5652 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { | 5642 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { |
5653 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 5643 PushSafepointRegistersScope scope(this); |
5654 LoadContextFromDeferred(instr->context()); | 5644 LoadContextFromDeferred(instr->context()); |
5655 __ CallRuntimeSaveDoubles(Runtime::kStackGuard); | 5645 __ CallRuntimeSaveDoubles(Runtime::kStackGuard); |
5656 RecordSafepointWithLazyDeopt( | 5646 RecordSafepointWithLazyDeopt( |
5657 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); | 5647 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); |
5658 ASSERT(instr->HasEnvironment()); | 5648 ASSERT(instr->HasEnvironment()); |
5659 LEnvironment* env = instr->environment(); | 5649 LEnvironment* env = instr->environment(); |
5660 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); | 5650 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |
5661 } | 5651 } |
5662 | 5652 |
5663 | 5653 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5790 __ ldr(scratch0(), FieldMemOperand(object, HeapObject::kMapOffset)); | 5780 __ ldr(scratch0(), FieldMemOperand(object, HeapObject::kMapOffset)); |
5791 __ cmp(map, scratch0()); | 5781 __ cmp(map, scratch0()); |
5792 DeoptimizeIf(ne, instr->environment()); | 5782 DeoptimizeIf(ne, instr->environment()); |
5793 } | 5783 } |
5794 | 5784 |
5795 | 5785 |
5796 void LCodeGen::DoDeferredLoadMutableDouble(LLoadFieldByIndex* instr, | 5786 void LCodeGen::DoDeferredLoadMutableDouble(LLoadFieldByIndex* instr, |
5797 Register result, | 5787 Register result, |
5798 Register object, | 5788 Register object, |
5799 Register index) { | 5789 Register index) { |
5800 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 5790 PushSafepointRegistersScope scope(this); |
5801 __ Push(object); | 5791 __ Push(object); |
5802 __ Push(index); | 5792 __ Push(index); |
5803 __ mov(cp, Operand::Zero()); | 5793 __ mov(cp, Operand::Zero()); |
5804 __ CallRuntimeSaveDoubles(Runtime::kLoadMutableDouble); | 5794 __ CallRuntimeSaveDoubles(Runtime::kLoadMutableDouble); |
5805 RecordSafepointWithRegisters( | 5795 RecordSafepointWithRegisters( |
5806 instr->pointer_map(), 2, Safepoint::kNoLazyDeopt); | 5796 instr->pointer_map(), 2, Safepoint::kNoLazyDeopt); |
5807 __ StoreToSafepointRegisterSlot(r0, result); | 5797 __ StoreToSafepointRegisterSlot(r0, result); |
5808 } | 5798 } |
5809 | 5799 |
5810 | 5800 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5879 __ Push(scope_info); | 5869 __ Push(scope_info); |
5880 __ push(ToRegister(instr->function())); | 5870 __ push(ToRegister(instr->function())); |
5881 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5871 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5882 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5872 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5883 } | 5873 } |
5884 | 5874 |
5885 | 5875 |
5886 #undef __ | 5876 #undef __ |
5887 | 5877 |
5888 } } // namespace v8::internal | 5878 } } // namespace v8::internal |
OLD | NEW |