| 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/crankshaft/arm64/lithium-codegen-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
| 6 | 6 |
| 7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 | 621 |
| 622 if (info()->IsOptimizing()) { | 622 if (info()->IsOptimizing()) { |
| 623 ProfileEntryHookStub::MaybeCallEntryHook(masm_); | 623 ProfileEntryHookStub::MaybeCallEntryHook(masm_); |
| 624 | 624 |
| 625 #ifdef DEBUG | 625 #ifdef DEBUG |
| 626 if (strlen(FLAG_stop_at) > 0 && | 626 if (strlen(FLAG_stop_at) > 0 && |
| 627 info()->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { | 627 info()->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { |
| 628 __ Debug("stop-at", __LINE__, BREAK); | 628 __ Debug("stop-at", __LINE__, BREAK); |
| 629 } | 629 } |
| 630 #endif | 630 #endif |
| 631 | |
| 632 // Sloppy mode functions and builtins need to replace the receiver with the | |
| 633 // global proxy when called as functions (without an explicit receiver | |
| 634 // object). | |
| 635 if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) { | |
| 636 Label ok; | |
| 637 int receiver_offset = info_->scope()->num_parameters() * kXRegSize; | |
| 638 __ Peek(x10, receiver_offset); | |
| 639 __ JumpIfNotRoot(x10, Heap::kUndefinedValueRootIndex, &ok); | |
| 640 | |
| 641 __ Ldr(x10, GlobalObjectMemOperand()); | |
| 642 __ Ldr(x10, FieldMemOperand(x10, JSGlobalObject::kGlobalProxyOffset)); | |
| 643 __ Poke(x10, receiver_offset); | |
| 644 | |
| 645 __ Bind(&ok); | |
| 646 } | |
| 647 } | 631 } |
| 648 | 632 |
| 649 DCHECK(__ StackPointer().Is(jssp)); | 633 DCHECK(__ StackPointer().Is(jssp)); |
| 650 info()->set_prologue_offset(masm_->pc_offset()); | 634 info()->set_prologue_offset(masm_->pc_offset()); |
| 651 if (NeedsEagerFrame()) { | 635 if (NeedsEagerFrame()) { |
| 652 if (info()->IsStub()) { | 636 if (info()->IsStub()) { |
| 653 __ StubPrologue(); | 637 __ StubPrologue(); |
| 654 } else { | 638 } else { |
| 655 __ Prologue(info()->IsCodePreAgingActive()); | 639 __ Prologue(info()->IsCodePreAgingActive()); |
| 656 } | 640 } |
| (...skipping 5307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5964 Handle<ScopeInfo> scope_info = instr->scope_info(); | 5948 Handle<ScopeInfo> scope_info = instr->scope_info(); |
| 5965 __ Push(scope_info); | 5949 __ Push(scope_info); |
| 5966 __ Push(ToRegister(instr->function())); | 5950 __ Push(ToRegister(instr->function())); |
| 5967 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5951 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5968 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5952 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5969 } | 5953 } |
| 5970 | 5954 |
| 5971 | 5955 |
| 5972 } // namespace internal | 5956 } // namespace internal |
| 5973 } // namespace v8 | 5957 } // namespace v8 |
| OLD | NEW |