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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.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
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-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 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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 __ Branch(done); 1257 __ Branch(done);
1258 } 1258 }
1259 } 1259 }
1260 } 1260 }
1261 1261
1262 1262
1263 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, 1263 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy,
1264 TypeofMode typeof_mode) { 1264 TypeofMode typeof_mode) {
1265 #ifdef DEBUG 1265 #ifdef DEBUG
1266 Variable* var = proxy->var(); 1266 Variable* var = proxy->var();
1267 DCHECK(var->IsUnallocatedOrGlobalSlot() || 1267 DCHECK(var->IsUnallocated() ||
1268 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); 1268 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL));
1269 #endif 1269 #endif
1270 __ li(LoadGlobalDescriptor::SlotRegister(), 1270 __ li(LoadGlobalDescriptor::SlotRegister(),
1271 Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); 1271 Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
1272 CallLoadGlobalIC(typeof_mode); 1272 CallLoadGlobalIC(typeof_mode);
1273 } 1273 }
1274 1274
1275 1275
1276 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, 1276 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
1277 TypeofMode typeof_mode) { 1277 TypeofMode typeof_mode) {
(...skipping 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after
3042 CallRuntimeWithOperands(is_strict(language_mode()) 3042 CallRuntimeWithOperands(is_strict(language_mode())
3043 ? Runtime::kDeleteProperty_Strict 3043 ? Runtime::kDeleteProperty_Strict
3044 : Runtime::kDeleteProperty_Sloppy); 3044 : Runtime::kDeleteProperty_Sloppy);
3045 context()->Plug(v0); 3045 context()->Plug(v0);
3046 } else if (proxy != NULL) { 3046 } else if (proxy != NULL) {
3047 Variable* var = proxy->var(); 3047 Variable* var = proxy->var();
3048 // Delete of an unqualified identifier is disallowed in strict mode but 3048 // Delete of an unqualified identifier is disallowed in strict mode but
3049 // "delete this" is allowed. 3049 // "delete this" is allowed.
3050 bool is_this = var->is_this(); 3050 bool is_this = var->is_this();
3051 DCHECK(is_sloppy(language_mode()) || is_this); 3051 DCHECK(is_sloppy(language_mode()) || is_this);
3052 if (var->IsUnallocatedOrGlobalSlot()) { 3052 if (var->IsUnallocated()) {
3053 __ LoadGlobalObject(a2); 3053 __ LoadGlobalObject(a2);
3054 __ li(a1, Operand(var->name())); 3054 __ li(a1, Operand(var->name()));
3055 __ Push(a2, a1); 3055 __ Push(a2, a1);
3056 __ CallRuntime(Runtime::kDeleteProperty_Sloppy); 3056 __ CallRuntime(Runtime::kDeleteProperty_Sloppy);
3057 context()->Plug(v0); 3057 context()->Plug(v0);
3058 } else if (var->IsStackAllocated() || var->IsContextSlot()) { 3058 } else if (var->IsStackAllocated() || var->IsContextSlot()) {
3059 // Result of deleting non-global, non-dynamic variables is false. 3059 // Result of deleting non-global, non-dynamic variables is false.
3060 // The subexpression does not have side effects. 3060 // The subexpression does not have side effects.
3061 context()->Plug(is_this); 3061 context()->Plug(is_this);
3062 } else { 3062 } else {
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
3764 reinterpret_cast<uint64_t>( 3764 reinterpret_cast<uint64_t>(
3765 isolate->builtins()->OnStackReplacement()->entry())); 3765 isolate->builtins()->OnStackReplacement()->entry()));
3766 return ON_STACK_REPLACEMENT; 3766 return ON_STACK_REPLACEMENT;
3767 } 3767 }
3768 3768
3769 3769
3770 } // namespace internal 3770 } // namespace internal
3771 } // namespace v8 3771 } // namespace v8
3772 3772
3773 #endif // V8_TARGET_ARCH_MIPS64 3773 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698