Chromium Code Reviews| 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->scope()->has_this_declaration()) { | |
|
wingo
2015/03/23 15:11:14
This will change the behavior of "this" scoping in
| |
| 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 5378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5518 | 5519 |
| 5519 DCHECK(interrupt_address == | 5520 DCHECK(interrupt_address == |
| 5520 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5521 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5521 return OSR_AFTER_STACK_CHECK; | 5522 return OSR_AFTER_STACK_CHECK; |
| 5522 } | 5523 } |
| 5523 | 5524 |
| 5524 | 5525 |
| 5525 } } // namespace v8::internal | 5526 } } // namespace v8::internal |
| 5526 | 5527 |
| 5527 #endif // V8_TARGET_ARCH_ARM | 5528 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |