| 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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 DCHECK(is_generating()); | 623 DCHECK(is_generating()); |
| 624 | 624 |
| 625 if (info()->IsOptimizing()) { | 625 if (info()->IsOptimizing()) { |
| 626 ProfileEntryHookStub::MaybeCallEntryHook(masm_); | 626 ProfileEntryHookStub::MaybeCallEntryHook(masm_); |
| 627 | 627 |
| 628 // TODO(all): Add support for stop_t FLAG in DEBUG mode. | 628 // TODO(all): Add support for stop_t FLAG in DEBUG mode. |
| 629 | 629 |
| 630 // Sloppy mode functions and builtins need to replace the receiver with the | 630 // Sloppy mode functions and builtins need to replace the receiver with the |
| 631 // global proxy when called as functions (without an explicit receiver | 631 // global proxy when called as functions (without an explicit receiver |
| 632 // object). | 632 // object). |
| 633 if (is_sloppy(info_->language_mode()) && info()->MayUseThis() && | 633 if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) { |
| 634 !info()->is_native() && info()->scope()->has_this_declaration()) { | |
| 635 Label ok; | 634 Label ok; |
| 636 int receiver_offset = info_->scope()->num_parameters() * kXRegSize; | 635 int receiver_offset = info_->scope()->num_parameters() * kXRegSize; |
| 637 __ Peek(x10, receiver_offset); | 636 __ Peek(x10, receiver_offset); |
| 638 __ JumpIfNotRoot(x10, Heap::kUndefinedValueRootIndex, &ok); | 637 __ JumpIfNotRoot(x10, Heap::kUndefinedValueRootIndex, &ok); |
| 639 | 638 |
| 640 __ Ldr(x10, GlobalObjectMemOperand()); | 639 __ Ldr(x10, GlobalObjectMemOperand()); |
| 641 __ Ldr(x10, FieldMemOperand(x10, GlobalObject::kGlobalProxyOffset)); | 640 __ Ldr(x10, FieldMemOperand(x10, GlobalObject::kGlobalProxyOffset)); |
| 642 __ Poke(x10, receiver_offset); | 641 __ Poke(x10, receiver_offset); |
| 643 | 642 |
| 644 __ Bind(&ok); | 643 __ Bind(&ok); |
| (...skipping 5400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6045 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6044 Handle<ScopeInfo> scope_info = instr->scope_info(); |
| 6046 __ Push(scope_info); | 6045 __ Push(scope_info); |
| 6047 __ Push(ToRegister(instr->function())); | 6046 __ Push(ToRegister(instr->function())); |
| 6048 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6047 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6049 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6048 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6050 } | 6049 } |
| 6051 | 6050 |
| 6052 | 6051 |
| 6053 } // namespace internal | 6052 } // namespace internal |
| 6054 } // namespace v8 | 6053 } // namespace v8 |
| OLD | NEW |