| 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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 #ifdef DEBUG | 113 #ifdef DEBUG |
| 114 if (strlen(FLAG_stop_at) > 0 && | 114 if (strlen(FLAG_stop_at) > 0 && |
| 115 info->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { | 115 info->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { |
| 116 __ stop("stop-at"); | 116 __ stop("stop-at"); |
| 117 } | 117 } |
| 118 #endif | 118 #endif |
| 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 (is_sloppy(info->language_mode()) && !info->is_native() && | 123 if (info->MustReplaceUndefinedReceiverWithGlobalProxy()) { |
| 124 info->MayUseThis() && info->scope()->has_this_declaration()) { | |
| 125 Label ok; | 124 Label ok; |
| 126 int receiver_offset = info->scope()->num_parameters() * kPointerSize; | 125 int receiver_offset = info->scope()->num_parameters() * kPointerSize; |
| 127 __ ldr(r2, MemOperand(sp, receiver_offset)); | 126 __ ldr(r2, MemOperand(sp, receiver_offset)); |
| 128 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex); | 127 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex); |
| 129 __ b(ne, &ok); | 128 __ b(ne, &ok); |
| 130 | 129 |
| 131 __ ldr(r2, GlobalObjectOperand()); | 130 __ ldr(r2, GlobalObjectOperand()); |
| 132 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalProxyOffset)); | 131 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalProxyOffset)); |
| 133 | 132 |
| 134 __ str(r2, MemOperand(sp, receiver_offset)); | 133 __ str(r2, MemOperand(sp, receiver_offset)); |
| (...skipping 5242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5377 DCHECK(interrupt_address == | 5376 DCHECK(interrupt_address == |
| 5378 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5377 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5379 return OSR_AFTER_STACK_CHECK; | 5378 return OSR_AFTER_STACK_CHECK; |
| 5380 } | 5379 } |
| 5381 | 5380 |
| 5382 | 5381 |
| 5383 } // namespace internal | 5382 } // namespace internal |
| 5384 } // namespace v8 | 5383 } // namespace v8 |
| 5385 | 5384 |
| 5386 #endif // V8_TARGET_ARCH_ARM | 5385 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |