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

Side by Side Diff: src/x64/full-codegen-x64.cc

Issue 1120093002: Only swap undefined for the global object if necessary in the prologue (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove flag Created 5 years, 7 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/mips64/lithium-codegen-mips64.cc ('k') | src/x64/lithium-codegen-x64.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 #ifdef DEBUG 107 #ifdef DEBUG
108 if (strlen(FLAG_stop_at) > 0 && 108 if (strlen(FLAG_stop_at) > 0 &&
109 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { 109 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) {
110 __ int3(); 110 __ int3();
111 } 111 }
112 #endif 112 #endif
113 113
114 // Sloppy mode functions and builtins need to replace the receiver with the 114 // Sloppy mode functions and builtins need to replace the receiver with the
115 // global proxy when called as functions (without an explicit receiver 115 // global proxy when called as functions (without an explicit receiver
116 // object). 116 // object).
117 if (is_sloppy(info->language_mode()) && !info->is_native()) { 117 if (is_sloppy(info->language_mode()) && !info->is_native() &&
118 info->MayUseThis()) {
118 Label ok; 119 Label ok;
119 // +1 for return address. 120 // +1 for return address.
120 StackArgumentsAccessor args(rsp, info->scope()->num_parameters()); 121 StackArgumentsAccessor args(rsp, info->scope()->num_parameters());
121 __ movp(rcx, args.GetReceiverOperand()); 122 __ movp(rcx, args.GetReceiverOperand());
122 123
123 __ CompareRoot(rcx, Heap::kUndefinedValueRootIndex); 124 __ CompareRoot(rcx, Heap::kUndefinedValueRootIndex);
124 __ j(not_equal, &ok, Label::kNear); 125 __ j(not_equal, &ok, Label::kNear);
125 126
126 __ movp(rcx, GlobalObjectOperand()); 127 __ movp(rcx, GlobalObjectOperand());
127 __ movp(rcx, FieldOperand(rcx, GlobalObject::kGlobalProxyOffset)); 128 __ movp(rcx, FieldOperand(rcx, GlobalObject::kGlobalProxyOffset));
(...skipping 5260 matching lines...) Expand 10 before | Expand all | Expand 10 after
5388 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5389 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5389 Assembler::target_address_at(call_target_address, 5390 Assembler::target_address_at(call_target_address,
5390 unoptimized_code)); 5391 unoptimized_code));
5391 return OSR_AFTER_STACK_CHECK; 5392 return OSR_AFTER_STACK_CHECK;
5392 } 5393 }
5393 5394
5394 5395
5395 } } // namespace v8::internal 5396 } } // namespace v8::internal
5396 5397
5397 #endif // V8_TARGET_ARCH_X64 5398 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698