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 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 #ifdef DEBUG | 119 #ifdef DEBUG |
120 if (strlen(FLAG_stop_at) > 0 && | 120 if (strlen(FLAG_stop_at) > 0 && |
121 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { | 121 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { |
122 __ stop("stop-at"); | 122 __ stop("stop-at"); |
123 } | 123 } |
124 #endif | 124 #endif |
125 | 125 |
126 // Sloppy mode functions and builtins need to replace the receiver with the | 126 // Sloppy mode functions and builtins need to replace the receiver with the |
127 // global proxy when called as functions (without an explicit receiver | 127 // global proxy when called as functions (without an explicit receiver |
128 // object). | 128 // object). |
129 if (is_sloppy(info->language_mode()) && !info->is_native()) { | 129 if (is_sloppy(info->language_mode()) && !info->is_native() && |
| 130 info->MayUseThis()) { |
130 Label ok; | 131 Label ok; |
131 int receiver_offset = info->scope()->num_parameters() * kPointerSize; | 132 int receiver_offset = info->scope()->num_parameters() * kPointerSize; |
132 __ ldr(r2, MemOperand(sp, receiver_offset)); | 133 __ ldr(r2, MemOperand(sp, receiver_offset)); |
133 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex); | 134 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex); |
134 __ b(ne, &ok); | 135 __ b(ne, &ok); |
135 | 136 |
136 __ ldr(r2, GlobalObjectOperand()); | 137 __ ldr(r2, GlobalObjectOperand()); |
137 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalProxyOffset)); | 138 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalProxyOffset)); |
138 | 139 |
139 __ str(r2, MemOperand(sp, receiver_offset)); | 140 __ str(r2, MemOperand(sp, receiver_offset)); |
(...skipping 5364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5504 | 5505 |
5505 DCHECK(interrupt_address == | 5506 DCHECK(interrupt_address == |
5506 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5507 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5507 return OSR_AFTER_STACK_CHECK; | 5508 return OSR_AFTER_STACK_CHECK; |
5508 } | 5509 } |
5509 | 5510 |
5510 | 5511 |
5511 } } // namespace v8::internal | 5512 } } // namespace v8::internal |
5512 | 5513 |
5513 #endif // V8_TARGET_ARCH_ARM | 5514 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |