| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 Comment(";;; Allocate local context"); | 193 Comment(";;; Allocate local context"); |
| 194 bool need_write_barrier = true; | 194 bool need_write_barrier = true; |
| 195 // Argument to NewContext is the function, which is still in rdi. | 195 // Argument to NewContext is the function, which is still in rdi. |
| 196 if (heap_slots <= FastNewContextStub::kMaximumSlots) { | 196 if (heap_slots <= FastNewContextStub::kMaximumSlots) { |
| 197 FastNewContextStub stub(isolate(), heap_slots); | 197 FastNewContextStub stub(isolate(), heap_slots); |
| 198 __ CallStub(&stub); | 198 __ CallStub(&stub); |
| 199 // Result of FastNewContextStub is always in new space. | 199 // Result of FastNewContextStub is always in new space. |
| 200 need_write_barrier = false; | 200 need_write_barrier = false; |
| 201 } else { | 201 } else { |
| 202 __ Push(rdi); | 202 __ Push(rdi); |
| 203 __ CallRuntime(Runtime::kHiddenNewFunctionContext, 1); | 203 __ CallRuntime(Runtime::kNewFunctionContext, 1); |
| 204 } | 204 } |
| 205 RecordSafepoint(Safepoint::kNoLazyDeopt); | 205 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 206 // Context is returned in rax. It replaces the context passed to us. | 206 // Context is returned in rax. It replaces the context passed to us. |
| 207 // It's saved in the stack and kept live in rsi. | 207 // It's saved in the stack and kept live in rsi. |
| 208 __ movp(rsi, rax); | 208 __ movp(rsi, rax); |
| 209 __ movp(Operand(rbp, StandardFrameConstants::kContextOffset), rax); | 209 __ movp(Operand(rbp, StandardFrameConstants::kContextOffset), rax); |
| 210 | 210 |
| 211 // Copy any necessary parameters into the context. | 211 // Copy any necessary parameters into the context. |
| 212 int num_parameters = scope()->num_parameters(); | 212 int num_parameters = scope()->num_parameters(); |
| 213 for (int i = 0; i < num_parameters; i++) { | 213 for (int i = 0; i < num_parameters; i++) { |
| (...skipping 3253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3467 ASSERT(result.is(rsi)); | 3467 ASSERT(result.is(rsi)); |
| 3468 } | 3468 } |
| 3469 } | 3469 } |
| 3470 | 3470 |
| 3471 | 3471 |
| 3472 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { | 3472 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { |
| 3473 ASSERT(ToRegister(instr->context()).is(rsi)); | 3473 ASSERT(ToRegister(instr->context()).is(rsi)); |
| 3474 __ Push(rsi); // The context is the first argument. | 3474 __ Push(rsi); // The context is the first argument. |
| 3475 __ Push(instr->hydrogen()->pairs()); | 3475 __ Push(instr->hydrogen()->pairs()); |
| 3476 __ Push(Smi::FromInt(instr->hydrogen()->flags())); | 3476 __ Push(Smi::FromInt(instr->hydrogen()->flags())); |
| 3477 CallRuntime(Runtime::kHiddenDeclareGlobals, 3, instr); | 3477 CallRuntime(Runtime::kDeclareGlobals, 3, instr); |
| 3478 } | 3478 } |
| 3479 | 3479 |
| 3480 | 3480 |
| 3481 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, | 3481 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, |
| 3482 int formal_parameter_count, | 3482 int formal_parameter_count, |
| 3483 int arity, | 3483 int arity, |
| 3484 LInstruction* instr, | 3484 LInstruction* instr, |
| 3485 RDIState rdi_state) { | 3485 RDIState rdi_state) { |
| 3486 bool dont_adapt_arguments = | 3486 bool dont_adapt_arguments = |
| 3487 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; | 3487 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3599 // unchanged by popping safepoint registers. | 3599 // unchanged by popping safepoint registers. |
| 3600 __ testl(tmp, Immediate(HeapNumber::kSignMask)); | 3600 __ testl(tmp, Immediate(HeapNumber::kSignMask)); |
| 3601 __ j(zero, &done); | 3601 __ j(zero, &done); |
| 3602 | 3602 |
| 3603 __ AllocateHeapNumber(tmp, tmp2, &slow); | 3603 __ AllocateHeapNumber(tmp, tmp2, &slow); |
| 3604 __ jmp(&allocated, Label::kNear); | 3604 __ jmp(&allocated, Label::kNear); |
| 3605 | 3605 |
| 3606 // Slow case: Call the runtime system to do the number allocation. | 3606 // Slow case: Call the runtime system to do the number allocation. |
| 3607 __ bind(&slow); | 3607 __ bind(&slow); |
| 3608 CallRuntimeFromDeferred( | 3608 CallRuntimeFromDeferred( |
| 3609 Runtime::kHiddenAllocateHeapNumber, 0, instr, instr->context()); | 3609 Runtime::kAllocateHeapNumber, 0, instr, instr->context()); |
| 3610 // Set the pointer to the new heap number in tmp. | 3610 // Set the pointer to the new heap number in tmp. |
| 3611 if (!tmp.is(rax)) __ movp(tmp, rax); | 3611 if (!tmp.is(rax)) __ movp(tmp, rax); |
| 3612 // Restore input_reg after call to runtime. | 3612 // Restore input_reg after call to runtime. |
| 3613 __ LoadFromSafepointRegisterSlot(input_reg, input_reg); | 3613 __ LoadFromSafepointRegisterSlot(input_reg, input_reg); |
| 3614 | 3614 |
| 3615 __ bind(&allocated); | 3615 __ bind(&allocated); |
| 3616 __ movq(tmp2, FieldOperand(input_reg, HeapNumber::kValueOffset)); | 3616 __ movq(tmp2, FieldOperand(input_reg, HeapNumber::kValueOffset)); |
| 3617 __ shlq(tmp2, Immediate(1)); | 3617 __ shlq(tmp2, Immediate(1)); |
| 3618 __ shrq(tmp2, Immediate(1)); | 3618 __ shrq(tmp2, Immediate(1)); |
| 3619 __ movq(FieldOperand(tmp, HeapNumber::kValueOffset), tmp2); | 3619 __ movq(FieldOperand(tmp, HeapNumber::kValueOffset), tmp2); |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4545 STATIC_ASSERT(String::kMaxLength <= Smi::kMaxValue); | 4545 STATIC_ASSERT(String::kMaxLength <= Smi::kMaxValue); |
| 4546 if (instr->index()->IsConstantOperand()) { | 4546 if (instr->index()->IsConstantOperand()) { |
| 4547 int32_t const_index = ToInteger32(LConstantOperand::cast(instr->index())); | 4547 int32_t const_index = ToInteger32(LConstantOperand::cast(instr->index())); |
| 4548 __ Push(Smi::FromInt(const_index)); | 4548 __ Push(Smi::FromInt(const_index)); |
| 4549 } else { | 4549 } else { |
| 4550 Register index = ToRegister(instr->index()); | 4550 Register index = ToRegister(instr->index()); |
| 4551 __ Integer32ToSmi(index, index); | 4551 __ Integer32ToSmi(index, index); |
| 4552 __ Push(index); | 4552 __ Push(index); |
| 4553 } | 4553 } |
| 4554 CallRuntimeFromDeferred( | 4554 CallRuntimeFromDeferred( |
| 4555 Runtime::kHiddenStringCharCodeAt, 2, instr, instr->context()); | 4555 Runtime::kStringCharCodeAtRT, 2, instr, instr->context()); |
| 4556 __ AssertSmi(rax); | 4556 __ AssertSmi(rax); |
| 4557 __ SmiToInteger32(rax, rax); | 4557 __ SmiToInteger32(rax, rax); |
| 4558 __ StoreToSafepointRegisterSlot(result, rax); | 4558 __ StoreToSafepointRegisterSlot(result, rax); |
| 4559 } | 4559 } |
| 4560 | 4560 |
| 4561 | 4561 |
| 4562 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { | 4562 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { |
| 4563 class DeferredStringCharFromCode V8_FINAL : public LDeferredCode { | 4563 class DeferredStringCharFromCode V8_FINAL : public LDeferredCode { |
| 4564 public: | 4564 public: |
| 4565 DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr) | 4565 DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr) |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4724 // Put a valid pointer value in the stack slot where the result | 4724 // Put a valid pointer value in the stack slot where the result |
| 4725 // register is stored, as this register is in the pointer map, but contains | 4725 // register is stored, as this register is in the pointer map, but contains |
| 4726 // an integer value. | 4726 // an integer value. |
| 4727 __ Set(reg, 0); | 4727 __ Set(reg, 0); |
| 4728 | 4728 |
| 4729 // Preserve the value of all registers. | 4729 // Preserve the value of all registers. |
| 4730 PushSafepointRegistersScope scope(this); | 4730 PushSafepointRegistersScope scope(this); |
| 4731 | 4731 |
| 4732 // NumberTagIU uses the context from the frame, rather than | 4732 // NumberTagIU uses the context from the frame, rather than |
| 4733 // the environment's HContext or HInlinedContext value. | 4733 // the environment's HContext or HInlinedContext value. |
| 4734 // They only call Runtime::kHiddenAllocateHeapNumber. | 4734 // They only call Runtime::kAllocateHeapNumber. |
| 4735 // The corresponding HChange instructions are added in a phase that does | 4735 // The corresponding HChange instructions are added in a phase that does |
| 4736 // not have easy access to the local context. | 4736 // not have easy access to the local context. |
| 4737 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 4737 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
| 4738 __ CallRuntimeSaveDoubles(Runtime::kHiddenAllocateHeapNumber); | 4738 __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber); |
| 4739 RecordSafepointWithRegisters( | 4739 RecordSafepointWithRegisters( |
| 4740 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); | 4740 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); |
| 4741 __ StoreToSafepointRegisterSlot(reg, rax); | 4741 __ StoreToSafepointRegisterSlot(reg, rax); |
| 4742 } | 4742 } |
| 4743 | 4743 |
| 4744 // Done. Put the value in temp_xmm into the value of the allocated heap | 4744 // Done. Put the value in temp_xmm into the value of the allocated heap |
| 4745 // number. | 4745 // number. |
| 4746 __ bind(&done); | 4746 __ bind(&done); |
| 4747 __ movsd(FieldOperand(reg, HeapNumber::kValueOffset), temp_xmm); | 4747 __ movsd(FieldOperand(reg, HeapNumber::kValueOffset), temp_xmm); |
| 4748 } | 4748 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4780 // TODO(3095996): Get rid of this. For now, we need to make the | 4780 // TODO(3095996): Get rid of this. For now, we need to make the |
| 4781 // result register contain a valid pointer because it is already | 4781 // result register contain a valid pointer because it is already |
| 4782 // contained in the register pointer map. | 4782 // contained in the register pointer map. |
| 4783 Register reg = ToRegister(instr->result()); | 4783 Register reg = ToRegister(instr->result()); |
| 4784 __ Move(reg, Smi::FromInt(0)); | 4784 __ Move(reg, Smi::FromInt(0)); |
| 4785 | 4785 |
| 4786 { | 4786 { |
| 4787 PushSafepointRegistersScope scope(this); | 4787 PushSafepointRegistersScope scope(this); |
| 4788 // NumberTagD uses the context from the frame, rather than | 4788 // NumberTagD uses the context from the frame, rather than |
| 4789 // the environment's HContext or HInlinedContext value. | 4789 // the environment's HContext or HInlinedContext value. |
| 4790 // They only call Runtime::kHiddenAllocateHeapNumber. | 4790 // They only call Runtime::kAllocateHeapNumber. |
| 4791 // The corresponding HChange instructions are added in a phase that does | 4791 // The corresponding HChange instructions are added in a phase that does |
| 4792 // not have easy access to the local context. | 4792 // not have easy access to the local context. |
| 4793 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 4793 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
| 4794 __ CallRuntimeSaveDoubles(Runtime::kHiddenAllocateHeapNumber); | 4794 __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber); |
| 4795 RecordSafepointWithRegisters( | 4795 RecordSafepointWithRegisters( |
| 4796 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); | 4796 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); |
| 4797 __ movp(kScratchRegister, rax); | 4797 __ movp(kScratchRegister, rax); |
| 4798 } | 4798 } |
| 4799 __ movp(reg, kScratchRegister); | 4799 __ movp(reg, kScratchRegister); |
| 4800 } | 4800 } |
| 4801 | 4801 |
| 4802 | 4802 |
| 4803 void LCodeGen::DoSmiTag(LSmiTag* instr) { | 4803 void LCodeGen::DoSmiTag(LSmiTag* instr) { |
| 4804 HChange* hchange = instr->hydrogen(); | 4804 HChange* hchange = instr->hydrogen(); |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5342 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE); | 5342 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE); |
| 5343 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { | 5343 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { |
| 5344 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); | 5344 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); |
| 5345 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE); | 5345 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE); |
| 5346 } else { | 5346 } else { |
| 5347 flags = AllocateTargetSpace::update(flags, NEW_SPACE); | 5347 flags = AllocateTargetSpace::update(flags, NEW_SPACE); |
| 5348 } | 5348 } |
| 5349 __ Push(Smi::FromInt(flags)); | 5349 __ Push(Smi::FromInt(flags)); |
| 5350 | 5350 |
| 5351 CallRuntimeFromDeferred( | 5351 CallRuntimeFromDeferred( |
| 5352 Runtime::kHiddenAllocateInTargetSpace, 2, instr, instr->context()); | 5352 Runtime::kAllocateInTargetSpace, 2, instr, instr->context()); |
| 5353 __ StoreToSafepointRegisterSlot(result, rax); | 5353 __ StoreToSafepointRegisterSlot(result, rax); |
| 5354 } | 5354 } |
| 5355 | 5355 |
| 5356 | 5356 |
| 5357 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { | 5357 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { |
| 5358 ASSERT(ToRegister(instr->value()).is(rax)); | 5358 ASSERT(ToRegister(instr->value()).is(rax)); |
| 5359 __ Push(rax); | 5359 __ Push(rax); |
| 5360 CallRuntime(Runtime::kToFastProperties, 1, instr); | 5360 CallRuntime(Runtime::kToFastProperties, 1, instr); |
| 5361 } | 5361 } |
| 5362 | 5362 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 5374 __ movp(rbx, FieldOperand(rcx, literal_offset)); | 5374 __ movp(rbx, FieldOperand(rcx, literal_offset)); |
| 5375 __ CompareRoot(rbx, Heap::kUndefinedValueRootIndex); | 5375 __ CompareRoot(rbx, Heap::kUndefinedValueRootIndex); |
| 5376 __ j(not_equal, &materialized, Label::kNear); | 5376 __ j(not_equal, &materialized, Label::kNear); |
| 5377 | 5377 |
| 5378 // Create regexp literal using runtime function | 5378 // Create regexp literal using runtime function |
| 5379 // Result will be in rax. | 5379 // Result will be in rax. |
| 5380 __ Push(rcx); | 5380 __ Push(rcx); |
| 5381 __ Push(Smi::FromInt(instr->hydrogen()->literal_index())); | 5381 __ Push(Smi::FromInt(instr->hydrogen()->literal_index())); |
| 5382 __ Push(instr->hydrogen()->pattern()); | 5382 __ Push(instr->hydrogen()->pattern()); |
| 5383 __ Push(instr->hydrogen()->flags()); | 5383 __ Push(instr->hydrogen()->flags()); |
| 5384 CallRuntime(Runtime::kHiddenMaterializeRegExpLiteral, 4, instr); | 5384 CallRuntime(Runtime::kMaterializeRegExpLiteral, 4, instr); |
| 5385 __ movp(rbx, rax); | 5385 __ movp(rbx, rax); |
| 5386 | 5386 |
| 5387 __ bind(&materialized); | 5387 __ bind(&materialized); |
| 5388 int size = JSRegExp::kSize + JSRegExp::kInObjectFieldCount * kPointerSize; | 5388 int size = JSRegExp::kSize + JSRegExp::kInObjectFieldCount * kPointerSize; |
| 5389 Label allocated, runtime_allocate; | 5389 Label allocated, runtime_allocate; |
| 5390 __ Allocate(size, rax, rcx, rdx, &runtime_allocate, TAG_OBJECT); | 5390 __ Allocate(size, rax, rcx, rdx, &runtime_allocate, TAG_OBJECT); |
| 5391 __ jmp(&allocated, Label::kNear); | 5391 __ jmp(&allocated, Label::kNear); |
| 5392 | 5392 |
| 5393 __ bind(&runtime_allocate); | 5393 __ bind(&runtime_allocate); |
| 5394 __ Push(rbx); | 5394 __ Push(rbx); |
| 5395 __ Push(Smi::FromInt(size)); | 5395 __ Push(Smi::FromInt(size)); |
| 5396 CallRuntime(Runtime::kHiddenAllocateInNewSpace, 1, instr); | 5396 CallRuntime(Runtime::kAllocateInNewSpace, 1, instr); |
| 5397 __ Pop(rbx); | 5397 __ Pop(rbx); |
| 5398 | 5398 |
| 5399 __ bind(&allocated); | 5399 __ bind(&allocated); |
| 5400 // Copy the content into the newly allocated memory. | 5400 // Copy the content into the newly allocated memory. |
| 5401 // (Unroll copy loop once for better throughput). | 5401 // (Unroll copy loop once for better throughput). |
| 5402 for (int i = 0; i < size - kPointerSize; i += 2 * kPointerSize) { | 5402 for (int i = 0; i < size - kPointerSize; i += 2 * kPointerSize) { |
| 5403 __ movp(rdx, FieldOperand(rbx, i)); | 5403 __ movp(rdx, FieldOperand(rbx, i)); |
| 5404 __ movp(rcx, FieldOperand(rbx, i + kPointerSize)); | 5404 __ movp(rcx, FieldOperand(rbx, i + kPointerSize)); |
| 5405 __ movp(FieldOperand(rax, i), rdx); | 5405 __ movp(FieldOperand(rax, i), rdx); |
| 5406 __ movp(FieldOperand(rax, i + kPointerSize), rcx); | 5406 __ movp(FieldOperand(rax, i + kPointerSize), rcx); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 5421 FastNewClosureStub stub(isolate(), | 5421 FastNewClosureStub stub(isolate(), |
| 5422 instr->hydrogen()->strict_mode(), | 5422 instr->hydrogen()->strict_mode(), |
| 5423 instr->hydrogen()->is_generator()); | 5423 instr->hydrogen()->is_generator()); |
| 5424 __ Move(rbx, instr->hydrogen()->shared_info()); | 5424 __ Move(rbx, instr->hydrogen()->shared_info()); |
| 5425 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5425 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 5426 } else { | 5426 } else { |
| 5427 __ Push(rsi); | 5427 __ Push(rsi); |
| 5428 __ Push(instr->hydrogen()->shared_info()); | 5428 __ Push(instr->hydrogen()->shared_info()); |
| 5429 __ PushRoot(pretenure ? Heap::kTrueValueRootIndex : | 5429 __ PushRoot(pretenure ? Heap::kTrueValueRootIndex : |
| 5430 Heap::kFalseValueRootIndex); | 5430 Heap::kFalseValueRootIndex); |
| 5431 CallRuntime(Runtime::kHiddenNewClosure, 3, instr); | 5431 CallRuntime(Runtime::kNewClosure, 3, instr); |
| 5432 } | 5432 } |
| 5433 } | 5433 } |
| 5434 | 5434 |
| 5435 | 5435 |
| 5436 void LCodeGen::DoTypeof(LTypeof* instr) { | 5436 void LCodeGen::DoTypeof(LTypeof* instr) { |
| 5437 ASSERT(ToRegister(instr->context()).is(rsi)); | 5437 ASSERT(ToRegister(instr->context()).is(rsi)); |
| 5438 LOperand* input = instr->value(); | 5438 LOperand* input = instr->value(); |
| 5439 EmitPushTaggedOperand(input); | 5439 EmitPushTaggedOperand(input); |
| 5440 CallRuntime(Runtime::kTypeof, 1, instr); | 5440 CallRuntime(Runtime::kTypeof, 1, instr); |
| 5441 } | 5441 } |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5618 | 5618 |
| 5619 | 5619 |
| 5620 void LCodeGen::DoDummyUse(LDummyUse* instr) { | 5620 void LCodeGen::DoDummyUse(LDummyUse* instr) { |
| 5621 // Nothing to see here, move on! | 5621 // Nothing to see here, move on! |
| 5622 } | 5622 } |
| 5623 | 5623 |
| 5624 | 5624 |
| 5625 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { | 5625 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { |
| 5626 PushSafepointRegistersScope scope(this); | 5626 PushSafepointRegistersScope scope(this); |
| 5627 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 5627 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
| 5628 __ CallRuntimeSaveDoubles(Runtime::kHiddenStackGuard); | 5628 __ CallRuntimeSaveDoubles(Runtime::kStackGuard); |
| 5629 RecordSafepointWithLazyDeopt(instr, RECORD_SAFEPOINT_WITH_REGISTERS, 0); | 5629 RecordSafepointWithLazyDeopt(instr, RECORD_SAFEPOINT_WITH_REGISTERS, 0); |
| 5630 ASSERT(instr->HasEnvironment()); | 5630 ASSERT(instr->HasEnvironment()); |
| 5631 LEnvironment* env = instr->environment(); | 5631 LEnvironment* env = instr->environment(); |
| 5632 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); | 5632 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |
| 5633 } | 5633 } |
| 5634 | 5634 |
| 5635 | 5635 |
| 5636 void LCodeGen::DoStackCheck(LStackCheck* instr) { | 5636 void LCodeGen::DoStackCheck(LStackCheck* instr) { |
| 5637 class DeferredStackCheck V8_FINAL : public LDeferredCode { | 5637 class DeferredStackCheck V8_FINAL : public LDeferredCode { |
| 5638 public: | 5638 public: |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5833 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { | 5833 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { |
| 5834 Register context = ToRegister(instr->context()); | 5834 Register context = ToRegister(instr->context()); |
| 5835 __ movp(Operand(rbp, StandardFrameConstants::kContextOffset), context); | 5835 __ movp(Operand(rbp, StandardFrameConstants::kContextOffset), context); |
| 5836 } | 5836 } |
| 5837 | 5837 |
| 5838 | 5838 |
| 5839 void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) { | 5839 void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) { |
| 5840 Handle<ScopeInfo> scope_info = instr->scope_info(); | 5840 Handle<ScopeInfo> scope_info = instr->scope_info(); |
| 5841 __ Push(scope_info); | 5841 __ Push(scope_info); |
| 5842 __ Push(ToRegister(instr->function())); | 5842 __ Push(ToRegister(instr->function())); |
| 5843 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); | 5843 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5844 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5844 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5845 } | 5845 } |
| 5846 | 5846 |
| 5847 | 5847 |
| 5848 #undef __ | 5848 #undef __ |
| 5849 | 5849 |
| 5850 } } // namespace v8::internal | 5850 } } // namespace v8::internal |
| 5851 | 5851 |
| 5852 #endif // V8_TARGET_ARCH_X64 | 5852 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |