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/arm64/frames-arm64.h" | 5 #include "src/arm64/frames-arm64.h" |
6 #include "src/arm64/lithium-codegen-arm64.h" | 6 #include "src/arm64/lithium-codegen-arm64.h" |
7 #include "src/arm64/lithium-gap-resolver-arm64.h" | 7 #include "src/arm64/lithium-gap-resolver-arm64.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 | 646 |
647 DCHECK(__ StackPointer().Is(jssp)); | 647 DCHECK(__ StackPointer().Is(jssp)); |
648 info()->set_prologue_offset(masm_->pc_offset()); | 648 info()->set_prologue_offset(masm_->pc_offset()); |
649 if (NeedsEagerFrame()) { | 649 if (NeedsEagerFrame()) { |
650 if (info()->IsStub()) { | 650 if (info()->IsStub()) { |
651 __ StubPrologue(); | 651 __ StubPrologue(); |
652 } else { | 652 } else { |
653 __ Prologue(info()->IsCodePreAgingActive()); | 653 __ Prologue(info()->IsCodePreAgingActive()); |
654 } | 654 } |
655 frame_is_built_ = true; | 655 frame_is_built_ = true; |
656 info_->AddNoFrameRange(0, masm_->pc_offset()); | |
657 } | 656 } |
658 | 657 |
659 // Reserve space for the stack slots needed by the code. | 658 // Reserve space for the stack slots needed by the code. |
660 int slots = GetStackSlotCount(); | 659 int slots = GetStackSlotCount(); |
661 if (slots > 0) { | 660 if (slots > 0) { |
662 __ Claim(slots, kPointerSize); | 661 __ Claim(slots, kPointerSize); |
663 } | 662 } |
664 | 663 |
665 if (info()->saves_caller_doubles()) { | 664 if (info()->saves_caller_doubles()) { |
666 SaveCallerDoubles(); | 665 SaveCallerDoubles(); |
(...skipping 3948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4615 // safe to write to the context register. | 4614 // safe to write to the context register. |
4616 __ Push(x0); | 4615 __ Push(x0); |
4617 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 4616 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
4618 __ CallRuntime(Runtime::kTraceExit, 1); | 4617 __ CallRuntime(Runtime::kTraceExit, 1); |
4619 } | 4618 } |
4620 | 4619 |
4621 if (info()->saves_caller_doubles()) { | 4620 if (info()->saves_caller_doubles()) { |
4622 RestoreCallerDoubles(); | 4621 RestoreCallerDoubles(); |
4623 } | 4622 } |
4624 | 4623 |
4625 int no_frame_start = -1; | |
4626 if (NeedsEagerFrame()) { | 4624 if (NeedsEagerFrame()) { |
4627 Register stack_pointer = masm()->StackPointer(); | 4625 Register stack_pointer = masm()->StackPointer(); |
4628 __ Mov(stack_pointer, fp); | 4626 __ Mov(stack_pointer, fp); |
4629 no_frame_start = masm_->pc_offset(); | |
4630 __ Pop(fp, lr); | 4627 __ Pop(fp, lr); |
4631 } | 4628 } |
4632 | 4629 |
4633 if (instr->has_constant_parameter_count()) { | 4630 if (instr->has_constant_parameter_count()) { |
4634 int parameter_count = ToInteger32(instr->constant_parameter_count()); | 4631 int parameter_count = ToInteger32(instr->constant_parameter_count()); |
4635 __ Drop(parameter_count + 1); | 4632 __ Drop(parameter_count + 1); |
4636 } else { | 4633 } else { |
4637 DCHECK(info()->IsStub()); // Functions would need to drop one more value. | 4634 DCHECK(info()->IsStub()); // Functions would need to drop one more value. |
4638 Register parameter_count = ToRegister(instr->parameter_count()); | 4635 Register parameter_count = ToRegister(instr->parameter_count()); |
4639 __ DropBySMI(parameter_count); | 4636 __ DropBySMI(parameter_count); |
4640 } | 4637 } |
4641 __ Ret(); | 4638 __ Ret(); |
4642 | |
4643 if (no_frame_start != -1) { | |
4644 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset()); | |
4645 } | |
4646 } | 4639 } |
4647 | 4640 |
4648 | 4641 |
4649 MemOperand LCodeGen::BuildSeqStringOperand(Register string, | 4642 MemOperand LCodeGen::BuildSeqStringOperand(Register string, |
4650 Register temp, | 4643 Register temp, |
4651 LOperand* index, | 4644 LOperand* index, |
4652 String::Encoding encoding) { | 4645 String::Encoding encoding) { |
4653 if (index->IsConstantOperand()) { | 4646 if (index->IsConstantOperand()) { |
4654 int offset = ToInteger32(LConstantOperand::cast(index)); | 4647 int offset = ToInteger32(LConstantOperand::cast(index)); |
4655 if (encoding == String::TWO_BYTE_ENCODING) { | 4648 if (encoding == String::TWO_BYTE_ENCODING) { |
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6012 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6005 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6013 __ Push(scope_info); | 6006 __ Push(scope_info); |
6014 __ Push(ToRegister(instr->function())); | 6007 __ Push(ToRegister(instr->function())); |
6015 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6008 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6016 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6009 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6017 } | 6010 } |
6018 | 6011 |
6019 | 6012 |
6020 } // namespace internal | 6013 } // namespace internal |
6021 } // namespace v8 | 6014 } // namespace v8 |
OLD | NEW |