Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 1312713004: Remove CompilationInfo::MayUseThis() and replace it with what we really want to know: MustReplaceUn… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 #ifdef DEBUG 133 #ifdef DEBUG
134 if (strlen(FLAG_stop_at) > 0 && 134 if (strlen(FLAG_stop_at) > 0 &&
135 info_->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { 135 info_->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) {
136 __ int3(); 136 __ int3();
137 } 137 }
138 #endif 138 #endif
139 139
140 // Sloppy mode functions and builtins need to replace the receiver with the 140 // Sloppy mode functions and builtins need to replace the receiver with the
141 // global proxy when called as functions (without an explicit receiver 141 // global proxy when called as functions (without an explicit receiver
142 // object). 142 // object).
143 if (is_sloppy(info()->language_mode()) && info()->MayUseThis() && 143 if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) {
144 !info()->is_native() && info()->scope()->has_this_declaration()) {
145 Label ok; 144 Label ok;
146 // +1 for return address. 145 // +1 for return address.
147 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize; 146 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize;
148 __ mov(ecx, Operand(esp, receiver_offset)); 147 __ mov(ecx, Operand(esp, receiver_offset));
149 148
150 __ cmp(ecx, isolate()->factory()->undefined_value()); 149 __ cmp(ecx, isolate()->factory()->undefined_value());
151 __ j(not_equal, &ok, Label::kNear); 150 __ j(not_equal, &ok, Label::kNear);
152 151
153 __ mov(ecx, GlobalObjectOperand()); 152 __ mov(ecx, GlobalObjectOperand());
154 __ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalProxyOffset)); 153 __ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalProxyOffset));
(...skipping 5595 matching lines...) Expand 10 before | Expand all | Expand 10 after
5750 RecordSafepoint(Safepoint::kNoLazyDeopt); 5749 RecordSafepoint(Safepoint::kNoLazyDeopt);
5751 } 5750 }
5752 5751
5753 5752
5754 #undef __ 5753 #undef __
5755 5754
5756 } // namespace internal 5755 } // namespace internal
5757 } // namespace v8 5756 } // namespace v8
5758 5757
5759 #endif // V8_TARGET_ARCH_IA32 5758 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698