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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 info_->strict_mode() == SLOPPY && | 130 info_->strict_mode() == SLOPPY && |
131 !info_->is_native()) { | 131 !info_->is_native()) { |
132 Label ok; | 132 Label ok; |
133 StackArgumentsAccessor args(rsp, scope()->num_parameters()); | 133 StackArgumentsAccessor args(rsp, scope()->num_parameters()); |
134 __ movp(rcx, args.GetReceiverOperand()); | 134 __ movp(rcx, args.GetReceiverOperand()); |
135 | 135 |
136 __ CompareRoot(rcx, Heap::kUndefinedValueRootIndex); | 136 __ CompareRoot(rcx, Heap::kUndefinedValueRootIndex); |
137 __ j(not_equal, &ok, Label::kNear); | 137 __ j(not_equal, &ok, Label::kNear); |
138 | 138 |
139 __ movp(rcx, GlobalObjectOperand()); | 139 __ movp(rcx, GlobalObjectOperand()); |
140 __ movp(rcx, FieldOperand(rcx, GlobalObject::kGlobalReceiverOffset)); | 140 __ movp(rcx, FieldOperand(rcx, GlobalObject::kGlobalProxyOffset)); |
141 | 141 |
142 __ movp(args.GetReceiverOperand(), rcx); | 142 __ movp(args.GetReceiverOperand(), rcx); |
143 | 143 |
144 __ bind(&ok); | 144 __ bind(&ok); |
145 } | 145 } |
146 } | 146 } |
147 | 147 |
148 info()->set_prologue_offset(masm_->pc_offset()); | 148 info()->set_prologue_offset(masm_->pc_offset()); |
149 if (NeedsEagerFrame()) { | 149 if (NeedsEagerFrame()) { |
150 ASSERT(!frame_is_built_); | 150 ASSERT(!frame_is_built_); |
(...skipping 3234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3385 DeoptimizeIf(is_smi, instr->environment()); | 3385 DeoptimizeIf(is_smi, instr->environment()); |
3386 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, kScratchRegister); | 3386 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, kScratchRegister); |
3387 DeoptimizeIf(below, instr->environment()); | 3387 DeoptimizeIf(below, instr->environment()); |
3388 | 3388 |
3389 __ jmp(&receiver_ok, Label::kNear); | 3389 __ jmp(&receiver_ok, Label::kNear); |
3390 __ bind(&global_object); | 3390 __ bind(&global_object); |
3391 __ movp(receiver, FieldOperand(function, JSFunction::kContextOffset)); | 3391 __ movp(receiver, FieldOperand(function, JSFunction::kContextOffset)); |
3392 __ movp(receiver, | 3392 __ movp(receiver, |
3393 Operand(receiver, | 3393 Operand(receiver, |
3394 Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 3394 Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
3395 __ movp(receiver, | 3395 __ movp(receiver, FieldOperand(receiver, GlobalObject::kGlobalProxyOffset)); |
3396 FieldOperand(receiver, GlobalObject::kGlobalReceiverOffset)); | |
3397 | 3396 |
3398 __ bind(&receiver_ok); | 3397 __ bind(&receiver_ok); |
3399 } | 3398 } |
3400 | 3399 |
3401 | 3400 |
3402 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { | 3401 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { |
3403 Register receiver = ToRegister(instr->receiver()); | 3402 Register receiver = ToRegister(instr->receiver()); |
3404 Register function = ToRegister(instr->function()); | 3403 Register function = ToRegister(instr->function()); |
3405 Register length = ToRegister(instr->length()); | 3404 Register length = ToRegister(instr->length()); |
3406 Register elements = ToRegister(instr->elements()); | 3405 Register elements = ToRegister(instr->elements()); |
(...skipping 2436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5843 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5842 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5844 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5843 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5845 } | 5844 } |
5846 | 5845 |
5847 | 5846 |
5848 #undef __ | 5847 #undef __ |
5849 | 5848 |
5850 } } // namespace v8::internal | 5849 } } // namespace v8::internal |
5851 | 5850 |
5852 #endif // V8_TARGET_ARCH_X64 | 5851 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |