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

Side by Side Diff: src/x64/lithium-codegen-x64.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/ppc/lithium-codegen-ppc.cc ('k') | src/x87/lithium-codegen-x87.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_X64 5 #if V8_TARGET_ARCH_X64
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/cpu-profiler.h" 10 #include "src/cpu-profiler.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 #ifdef DEBUG 121 #ifdef DEBUG
122 if (strlen(FLAG_stop_at) > 0 && 122 if (strlen(FLAG_stop_at) > 0 &&
123 info_->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { 123 info_->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) {
124 __ int3(); 124 __ int3();
125 } 125 }
126 #endif 126 #endif
127 127
128 // Sloppy mode functions need to replace the receiver with the global proxy 128 // Sloppy mode functions need to replace the receiver with the global proxy
129 // when called as functions (without an explicit receiver object). 129 // when called as functions (without an explicit receiver object).
130 if (is_sloppy(info()->language_mode()) && info()->MayUseThis() && 130 if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) {
131 !info()->is_native() && info()->scope()->has_this_declaration()) {
132 Label ok; 131 Label ok;
133 StackArgumentsAccessor args(rsp, scope()->num_parameters()); 132 StackArgumentsAccessor args(rsp, scope()->num_parameters());
134 __ movp(rcx, args.GetReceiverOperand()); 133 __ movp(rcx, args.GetReceiverOperand());
135 134
136 __ CompareRoot(rcx, Heap::kUndefinedValueRootIndex); 135 __ CompareRoot(rcx, Heap::kUndefinedValueRootIndex);
137 __ j(not_equal, &ok, Label::kNear); 136 __ j(not_equal, &ok, Label::kNear);
138 137
139 __ movp(rcx, GlobalObjectOperand()); 138 __ movp(rcx, GlobalObjectOperand());
140 __ movp(rcx, FieldOperand(rcx, GlobalObject::kGlobalProxyOffset)); 139 __ movp(rcx, FieldOperand(rcx, GlobalObject::kGlobalProxyOffset));
141 140
(...skipping 5797 matching lines...) Expand 10 before | Expand all | Expand 10 after
5939 RecordSafepoint(Safepoint::kNoLazyDeopt); 5938 RecordSafepoint(Safepoint::kNoLazyDeopt);
5940 } 5939 }
5941 5940
5942 5941
5943 #undef __ 5942 #undef __
5944 5943
5945 } // namespace internal 5944 } // namespace internal
5946 } // namespace v8 5945 } // namespace v8
5947 5946
5948 #endif // V8_TARGET_ARCH_X64 5947 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ppc/lithium-codegen-ppc.cc ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698