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/full-codegen/ppc/full-codegen-ppc.cc

Issue 2287173002: Replace CollectVariables with locals(), update callsites to walk locals instead (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: restore undefined handling Created 4 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/ast/scopes.h" 7 #include "src/ast/scopes.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/codegen.h" 10 #include "src/codegen.h"
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 __ b(done); 1223 __ b(done);
1224 } 1224 }
1225 } 1225 }
1226 } 1226 }
1227 1227
1228 1228
1229 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, 1229 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy,
1230 TypeofMode typeof_mode) { 1230 TypeofMode typeof_mode) {
1231 #ifdef DEBUG 1231 #ifdef DEBUG
1232 Variable* var = proxy->var(); 1232 Variable* var = proxy->var();
1233 DCHECK(var->IsUnallocatedOrGlobalSlot() || 1233 DCHECK(var->IsUnallocated() ||
1234 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); 1234 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL));
1235 #endif 1235 #endif
1236 __ mov(LoadGlobalDescriptor::SlotRegister(), 1236 __ mov(LoadGlobalDescriptor::SlotRegister(),
1237 Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); 1237 Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
1238 CallLoadGlobalIC(typeof_mode); 1238 CallLoadGlobalIC(typeof_mode);
1239 } 1239 }
1240 1240
1241 1241
1242 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, 1242 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
1243 TypeofMode typeof_mode) { 1243 TypeofMode typeof_mode) {
(...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after
3034 CallRuntimeWithOperands(is_strict(language_mode()) 3034 CallRuntimeWithOperands(is_strict(language_mode())
3035 ? Runtime::kDeleteProperty_Strict 3035 ? Runtime::kDeleteProperty_Strict
3036 : Runtime::kDeleteProperty_Sloppy); 3036 : Runtime::kDeleteProperty_Sloppy);
3037 context()->Plug(r3); 3037 context()->Plug(r3);
3038 } else if (proxy != NULL) { 3038 } else if (proxy != NULL) {
3039 Variable* var = proxy->var(); 3039 Variable* var = proxy->var();
3040 // Delete of an unqualified identifier is disallowed in strict mode but 3040 // Delete of an unqualified identifier is disallowed in strict mode but
3041 // "delete this" is allowed. 3041 // "delete this" is allowed.
3042 bool is_this = var->is_this(); 3042 bool is_this = var->is_this();
3043 DCHECK(is_sloppy(language_mode()) || is_this); 3043 DCHECK(is_sloppy(language_mode()) || is_this);
3044 if (var->IsUnallocatedOrGlobalSlot()) { 3044 if (var->IsUnallocated()) {
3045 __ LoadGlobalObject(r5); 3045 __ LoadGlobalObject(r5);
3046 __ mov(r4, Operand(var->name())); 3046 __ mov(r4, Operand(var->name()));
3047 __ Push(r5, r4); 3047 __ Push(r5, r4);
3048 __ CallRuntime(Runtime::kDeleteProperty_Sloppy); 3048 __ CallRuntime(Runtime::kDeleteProperty_Sloppy);
3049 context()->Plug(r3); 3049 context()->Plug(r3);
3050 } else if (var->IsStackAllocated() || var->IsContextSlot()) { 3050 } else if (var->IsStackAllocated() || var->IsContextSlot()) {
3051 // Result of deleting non-global, non-dynamic variables is false. 3051 // Result of deleting non-global, non-dynamic variables is false.
3052 // The subexpression does not have side effects. 3052 // The subexpression does not have side effects.
3053 context()->Plug(is_this); 3053 context()->Plug(is_this);
3054 } else { 3054 } else {
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
3737 3737
3738 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); 3738 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address)));
3739 3739
3740 DCHECK(interrupt_address == 3740 DCHECK(interrupt_address ==
3741 isolate->builtins()->OnStackReplacement()->entry()); 3741 isolate->builtins()->OnStackReplacement()->entry());
3742 return ON_STACK_REPLACEMENT; 3742 return ON_STACK_REPLACEMENT;
3743 } 3743 }
3744 } // namespace internal 3744 } // namespace internal
3745 } // namespace v8 3745 } // namespace v8
3746 #endif // V8_TARGET_ARCH_PPC 3746 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/s390/full-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698