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/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 // r1: Callee's JS function. | 114 // r1: Callee's JS function. |
115 // cp: Callee's context. | 115 // cp: Callee's context. |
116 // pp: Callee's constant pool pointer (if FLAG_enable_ool_constant_pool) | 116 // pp: Callee's constant pool pointer (if FLAG_enable_ool_constant_pool) |
117 // fp: Caller's frame pointer. | 117 // fp: Caller's frame pointer. |
118 // lr: Caller's pc. | 118 // lr: Caller's pc. |
119 | 119 |
120 // Sloppy mode functions and builtins need to replace the receiver with the | 120 // Sloppy mode functions and builtins need to replace the receiver with the |
121 // global proxy when called as functions (without an explicit receiver | 121 // global proxy when called as functions (without an explicit receiver |
122 // object). | 122 // object). |
123 if (graph()->this_has_uses() && is_sloppy(info_->language_mode()) && | 123 if (is_sloppy(info_->language_mode()) && info()->MayUseThis() && |
124 !info_->is_native()) { | 124 !info_->is_native()) { |
125 Label ok; | 125 Label ok; |
126 int receiver_offset = info_->scope()->num_parameters() * kPointerSize; | 126 int receiver_offset = info_->scope()->num_parameters() * kPointerSize; |
127 __ ldr(r2, MemOperand(sp, receiver_offset)); | 127 __ ldr(r2, MemOperand(sp, receiver_offset)); |
128 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex); | 128 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex); |
129 __ b(ne, &ok); | 129 __ b(ne, &ok); |
130 | 130 |
131 __ ldr(r2, GlobalObjectOperand()); | 131 __ ldr(r2, GlobalObjectOperand()); |
132 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalProxyOffset)); | 132 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalProxyOffset)); |
133 | 133 |
(...skipping 5809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5943 __ Push(scope_info); | 5943 __ Push(scope_info); |
5944 __ push(ToRegister(instr->function())); | 5944 __ push(ToRegister(instr->function())); |
5945 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5945 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5946 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5946 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5947 } | 5947 } |
5948 | 5948 |
5949 | 5949 |
5950 #undef __ | 5950 #undef __ |
5951 | 5951 |
5952 } } // namespace v8::internal | 5952 } } // namespace v8::internal |
OLD | NEW |