OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" |
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 if (info_->this_has_uses() && | 123 if (info_->this_has_uses() && |
124 info_->strict_mode() == SLOPPY && | 124 info_->strict_mode() == SLOPPY && |
125 !info_->is_native()) { | 125 !info_->is_native()) { |
126 Label ok; | 126 Label ok; |
127 int receiver_offset = info_->scope()->num_parameters() * kPointerSize; | 127 int receiver_offset = info_->scope()->num_parameters() * kPointerSize; |
128 __ ldr(r2, MemOperand(sp, receiver_offset)); | 128 __ ldr(r2, MemOperand(sp, receiver_offset)); |
129 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex); | 129 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex); |
130 __ b(ne, &ok); | 130 __ b(ne, &ok); |
131 | 131 |
132 __ ldr(r2, GlobalObjectOperand()); | 132 __ ldr(r2, GlobalObjectOperand()); |
133 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalReceiverOffset)); | 133 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalProxyOffset)); |
134 | 134 |
135 __ str(r2, MemOperand(sp, receiver_offset)); | 135 __ str(r2, MemOperand(sp, receiver_offset)); |
136 | 136 |
137 __ bind(&ok); | 137 __ bind(&ok); |
138 } | 138 } |
139 } | 139 } |
140 | 140 |
141 info()->set_prologue_offset(masm_->pc_offset()); | 141 info()->set_prologue_offset(masm_->pc_offset()); |
142 if (NeedsEagerFrame()) { | 142 if (NeedsEagerFrame()) { |
143 if (info()->IsStub()) { | 143 if (info()->IsStub()) { |
(...skipping 3321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3465 __ SmiTst(receiver); | 3465 __ SmiTst(receiver); |
3466 DeoptimizeIf(eq, instr->environment()); | 3466 DeoptimizeIf(eq, instr->environment()); |
3467 __ CompareObjectType(receiver, scratch, scratch, FIRST_SPEC_OBJECT_TYPE); | 3467 __ CompareObjectType(receiver, scratch, scratch, FIRST_SPEC_OBJECT_TYPE); |
3468 DeoptimizeIf(lt, instr->environment()); | 3468 DeoptimizeIf(lt, instr->environment()); |
3469 | 3469 |
3470 __ b(&result_in_receiver); | 3470 __ b(&result_in_receiver); |
3471 __ bind(&global_object); | 3471 __ bind(&global_object); |
3472 __ ldr(result, FieldMemOperand(function, JSFunction::kContextOffset)); | 3472 __ ldr(result, FieldMemOperand(function, JSFunction::kContextOffset)); |
3473 __ ldr(result, | 3473 __ ldr(result, |
3474 ContextOperand(result, Context::GLOBAL_OBJECT_INDEX)); | 3474 ContextOperand(result, Context::GLOBAL_OBJECT_INDEX)); |
3475 __ ldr(result, | 3475 __ ldr(result, FieldMemOperand(result, GlobalObject::kGlobalProxyOffset)); |
3476 FieldMemOperand(result, GlobalObject::kGlobalReceiverOffset)); | |
3477 | 3476 |
3478 if (result.is(receiver)) { | 3477 if (result.is(receiver)) { |
3479 __ bind(&result_in_receiver); | 3478 __ bind(&result_in_receiver); |
3480 } else { | 3479 } else { |
3481 Label result_ok; | 3480 Label result_ok; |
3482 __ b(&result_ok); | 3481 __ b(&result_ok); |
3483 __ bind(&result_in_receiver); | 3482 __ bind(&result_in_receiver); |
3484 __ mov(result, receiver); | 3483 __ mov(result, receiver); |
3485 __ bind(&result_ok); | 3484 __ bind(&result_ok); |
3486 } | 3485 } |
(...skipping 2338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5825 __ Push(scope_info); | 5824 __ Push(scope_info); |
5826 __ push(ToRegister(instr->function())); | 5825 __ push(ToRegister(instr->function())); |
5827 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5826 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5828 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5827 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5829 } | 5828 } |
5830 | 5829 |
5831 | 5830 |
5832 #undef __ | 5831 #undef __ |
5833 | 5832 |
5834 } } // namespace v8::internal | 5833 } } // namespace v8::internal |
OLD | NEW |