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

Side by Side Diff: src/full-codegen/x64/full-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/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-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 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_X64 5 #if V8_TARGET_ARCH_X64
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 #ifdef DEBUG 101 #ifdef DEBUG
102 if (strlen(FLAG_stop_at) > 0 && 102 if (strlen(FLAG_stop_at) > 0 &&
103 info->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { 103 info->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) {
104 __ int3(); 104 __ int3();
105 } 105 }
106 #endif 106 #endif
107 107
108 // Sloppy mode functions and builtins need to replace the receiver with the 108 // Sloppy mode functions and builtins need to replace the receiver with the
109 // global proxy when called as functions (without an explicit receiver 109 // global proxy when called as functions (without an explicit receiver
110 // object). 110 // object).
111 if (is_sloppy(info->language_mode()) && !info->is_native() && 111 if (info->MustReplaceUndefinedReceiverWithGlobalProxy()) {
112 info->MayUseThis() && info->scope()->has_this_declaration()) {
113 Label ok; 112 Label ok;
114 // +1 for return address. 113 // +1 for return address.
115 StackArgumentsAccessor args(rsp, info->scope()->num_parameters()); 114 StackArgumentsAccessor args(rsp, info->scope()->num_parameters());
116 __ movp(rcx, args.GetReceiverOperand()); 115 __ movp(rcx, args.GetReceiverOperand());
117 116
118 __ CompareRoot(rcx, Heap::kUndefinedValueRootIndex); 117 __ CompareRoot(rcx, Heap::kUndefinedValueRootIndex);
119 __ j(not_equal, &ok, Label::kNear); 118 __ j(not_equal, &ok, Label::kNear);
120 119
121 __ movp(rcx, GlobalObjectOperand()); 120 __ movp(rcx, GlobalObjectOperand());
122 __ movp(rcx, FieldOperand(rcx, GlobalObject::kGlobalProxyOffset)); 121 __ movp(rcx, FieldOperand(rcx, GlobalObject::kGlobalProxyOffset));
(...skipping 5143 matching lines...) Expand 10 before | Expand all | Expand 10 after
5266 Assembler::target_address_at(call_target_address, 5265 Assembler::target_address_at(call_target_address,
5267 unoptimized_code)); 5266 unoptimized_code));
5268 return OSR_AFTER_STACK_CHECK; 5267 return OSR_AFTER_STACK_CHECK;
5269 } 5268 }
5270 5269
5271 5270
5272 } // namespace internal 5271 } // namespace internal
5273 } // namespace v8 5272 } // namespace v8
5274 5273
5275 #endif // V8_TARGET_ARCH_X64 5274 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698