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

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

Issue 1122773002: PPC: 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: 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 | « no previous file | src/ppc/lithium-codegen-ppc.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 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_PPC 7 #if V8_TARGET_ARCH_PPC
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 #ifdef DEBUG 116 #ifdef DEBUG
117 if (strlen(FLAG_stop_at) > 0 && 117 if (strlen(FLAG_stop_at) > 0 &&
118 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { 118 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) {
119 __ stop("stop-at"); 119 __ stop("stop-at");
120 } 120 }
121 #endif 121 #endif
122 122
123 // Sloppy mode functions and builtins need to replace the receiver with the 123 // Sloppy mode functions and builtins need to replace the receiver with the
124 // global proxy when called as functions (without an explicit receiver 124 // global proxy when called as functions (without an explicit receiver
125 // object). 125 // object).
126 if (is_sloppy(info->language_mode()) && !info->is_native()) { 126 if (is_sloppy(info->language_mode()) && !info->is_native() &&
127 info->MayUseThis()) {
127 Label ok; 128 Label ok;
128 int receiver_offset = info->scope()->num_parameters() * kPointerSize; 129 int receiver_offset = info->scope()->num_parameters() * kPointerSize;
129 __ LoadP(r5, MemOperand(sp, receiver_offset), r0); 130 __ LoadP(r5, MemOperand(sp, receiver_offset), r0);
130 __ CompareRoot(r5, Heap::kUndefinedValueRootIndex); 131 __ CompareRoot(r5, Heap::kUndefinedValueRootIndex);
131 __ bne(&ok); 132 __ bne(&ok);
132 133
133 __ LoadP(r5, GlobalObjectOperand()); 134 __ LoadP(r5, GlobalObjectOperand());
134 __ LoadP(r5, FieldMemOperand(r5, GlobalObject::kGlobalProxyOffset)); 135 __ LoadP(r5, FieldMemOperand(r5, GlobalObject::kGlobalProxyOffset));
135 136
136 __ StoreP(r5, MemOperand(sp, receiver_offset), r0); 137 __ StoreP(r5, MemOperand(sp, receiver_offset), r0);
(...skipping 5311 matching lines...) Expand 10 before | Expand all | Expand 10 after
5448 return ON_STACK_REPLACEMENT; 5449 return ON_STACK_REPLACEMENT;
5449 } 5450 }
5450 5451
5451 DCHECK(interrupt_address == 5452 DCHECK(interrupt_address ==
5452 isolate->builtins()->OsrAfterStackCheck()->entry()); 5453 isolate->builtins()->OsrAfterStackCheck()->entry());
5453 return OSR_AFTER_STACK_CHECK; 5454 return OSR_AFTER_STACK_CHECK;
5454 } 5455 }
5455 } 5456 }
5456 } // namespace v8::internal 5457 } // namespace v8::internal
5457 #endif // V8_TARGET_ARCH_PPC 5458 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | src/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698