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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 #ifdef DEBUG | 102 #ifdef DEBUG |
103 if (strlen(FLAG_stop_at) > 0 && | 103 if (strlen(FLAG_stop_at) > 0 && |
104 literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { | 104 literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { |
105 __ int3(); | 105 __ int3(); |
106 } | 106 } |
107 #endif | 107 #endif |
108 | 108 |
109 // Sloppy mode functions and builtins need to replace the receiver with the | 109 // Sloppy mode functions and builtins need to replace the receiver with the |
110 // global proxy when called as functions (without an explicit receiver | 110 // global proxy when called as functions (without an explicit receiver |
111 // object). | 111 // object). |
112 if (is_sloppy(info->language_mode()) && !info->is_native() && | 112 if (info->MustReplaceUndefinedReceiverWithGlobalProxy()) { |
113 info->MayUseThis()) { | |
114 Label ok; | 113 Label ok; |
115 // +1 for return address. | 114 // +1 for return address. |
116 int receiver_offset = (info->scope()->num_parameters() + 1) * kPointerSize; | 115 int receiver_offset = (info->scope()->num_parameters() + 1) * kPointerSize; |
117 __ mov(ecx, Operand(esp, receiver_offset)); | 116 __ mov(ecx, Operand(esp, receiver_offset)); |
118 | 117 |
119 __ cmp(ecx, isolate()->factory()->undefined_value()); | 118 __ cmp(ecx, isolate()->factory()->undefined_value()); |
120 __ j(not_equal, &ok, Label::kNear); | 119 __ j(not_equal, &ok, Label::kNear); |
121 | 120 |
122 __ mov(ecx, GlobalObjectOperand()); | 121 __ mov(ecx, GlobalObjectOperand()); |
123 __ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalProxyOffset)); | 122 __ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalProxyOffset)); |
(...skipping 5132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5256 Assembler::target_address_at(call_target_address, | 5255 Assembler::target_address_at(call_target_address, |
5257 unoptimized_code)); | 5256 unoptimized_code)); |
5258 return OSR_AFTER_STACK_CHECK; | 5257 return OSR_AFTER_STACK_CHECK; |
5259 } | 5258 } |
5260 | 5259 |
5261 | 5260 |
5262 } // namespace internal | 5261 } // namespace internal |
5263 } // namespace v8 | 5262 } // namespace v8 |
5264 | 5263 |
5265 #endif // V8_TARGET_ARCH_IA32 | 5264 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |