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

Side by Side Diff: src/full-codegen/ppc/full-codegen-ppc.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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 #ifdef DEBUG 110 #ifdef DEBUG
111 if (strlen(FLAG_stop_at) > 0 && 111 if (strlen(FLAG_stop_at) > 0 &&
112 info->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { 112 info->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) {
113 __ stop("stop-at"); 113 __ stop("stop-at");
114 } 114 }
115 #endif 115 #endif
116 116
117 // Sloppy mode functions and builtins need to replace the receiver with the 117 // Sloppy mode functions and builtins need to replace the receiver with the
118 // global proxy when called as functions (without an explicit receiver 118 // global proxy when called as functions (without an explicit receiver
119 // object). 119 // object).
120 if (is_sloppy(info->language_mode()) && !info->is_native() && 120 if (info->MustReplaceUndefinedReceiverWithGlobalProxy()) {
121 info->MayUseThis() && info->scope()->has_this_declaration()) {
122 Label ok; 121 Label ok;
123 int receiver_offset = info->scope()->num_parameters() * kPointerSize; 122 int receiver_offset = info->scope()->num_parameters() * kPointerSize;
124 __ LoadP(r5, MemOperand(sp, receiver_offset), r0); 123 __ LoadP(r5, MemOperand(sp, receiver_offset), r0);
125 __ CompareRoot(r5, Heap::kUndefinedValueRootIndex); 124 __ CompareRoot(r5, Heap::kUndefinedValueRootIndex);
126 __ bne(&ok); 125 __ bne(&ok);
127 126
128 __ LoadP(r5, GlobalObjectOperand()); 127 __ LoadP(r5, GlobalObjectOperand());
129 __ LoadP(r5, FieldMemOperand(r5, GlobalObject::kGlobalProxyOffset)); 128 __ LoadP(r5, FieldMemOperand(r5, GlobalObject::kGlobalProxyOffset));
130 129
131 __ StoreP(r5, MemOperand(sp, receiver_offset), r0); 130 __ StoreP(r5, MemOperand(sp, receiver_offset), r0);
(...skipping 5192 matching lines...) Expand 10 before | Expand all | Expand 10 after
5324 return ON_STACK_REPLACEMENT; 5323 return ON_STACK_REPLACEMENT;
5325 } 5324 }
5326 5325
5327 DCHECK(interrupt_address == 5326 DCHECK(interrupt_address ==
5328 isolate->builtins()->OsrAfterStackCheck()->entry()); 5327 isolate->builtins()->OsrAfterStackCheck()->entry());
5329 return OSR_AFTER_STACK_CHECK; 5328 return OSR_AFTER_STACK_CHECK;
5330 } 5329 }
5331 } // namespace internal 5330 } // namespace internal
5332 } // namespace v8 5331 } // namespace v8
5333 #endif // V8_TARGET_ARCH_PPC 5332 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698