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

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

Issue 1259963002: [stubs] Don't pass name to Load/StoreGlobalViaContext stubs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix rebase Created 5 years, 4 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/x64/full-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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 DCHECK(var->IsUnallocatedOrGlobalSlot() || 1400 DCHECK(var->IsUnallocatedOrGlobalSlot() ||
1401 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); 1401 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL));
1402 if (var->IsGlobalSlot()) { 1402 if (var->IsGlobalSlot()) {
1403 DCHECK(var->index() > 0); 1403 DCHECK(var->index() > 0);
1404 DCHECK(var->IsStaticGlobalObjectProperty()); 1404 DCHECK(var->IsStaticGlobalObjectProperty());
1405 // Each var occupies two slots in the context: for reads and writes. 1405 // Each var occupies two slots in the context: for reads and writes.
1406 int const slot = var->index(); 1406 int const slot = var->index();
1407 int const depth = scope()->ContextChainLength(var->scope()); 1407 int const depth = scope()->ContextChainLength(var->scope());
1408 if (depth <= LoadGlobalViaContextStub::kMaximumDepth) { 1408 if (depth <= LoadGlobalViaContextStub::kMaximumDepth) {
1409 __ li(LoadGlobalViaContextDescriptor::SlotRegister(), Operand(slot)); 1409 __ li(LoadGlobalViaContextDescriptor::SlotRegister(), Operand(slot));
1410 __ li(LoadGlobalViaContextDescriptor::NameRegister(), var->name());
1411 LoadGlobalViaContextStub stub(isolate(), depth); 1410 LoadGlobalViaContextStub stub(isolate(), depth);
1412 __ CallStub(&stub); 1411 __ CallStub(&stub);
1413 } else { 1412 } else {
1414 __ Push(Smi::FromInt(slot)); 1413 __ Push(Smi::FromInt(slot));
1415 __ Push(var->name()); 1414 __ CallRuntime(Runtime::kLoadGlobalViaContext, 1);
1416 __ CallRuntime(Runtime::kLoadGlobalViaContext, 2);
1417 } 1415 }
1418 1416
1419 } else { 1417 } else {
1420 __ ld(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand()); 1418 __ ld(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
1421 __ li(LoadDescriptor::NameRegister(), Operand(var->name())); 1419 __ li(LoadDescriptor::NameRegister(), Operand(var->name()));
1422 __ li(LoadDescriptor::SlotRegister(), 1420 __ li(LoadDescriptor::SlotRegister(),
1423 Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); 1421 Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
1424 CallLoadIC(typeof_mode); 1422 CallLoadIC(typeof_mode);
1425 } 1423 }
1426 } 1424 }
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after
2700 // Global var, const, or let. 2698 // Global var, const, or let.
2701 DCHECK(var->index() > 0); 2699 DCHECK(var->index() > 0);
2702 DCHECK(var->IsStaticGlobalObjectProperty()); 2700 DCHECK(var->IsStaticGlobalObjectProperty());
2703 DCHECK(StoreGlobalViaContextDescriptor::ValueRegister().is(a0)); 2701 DCHECK(StoreGlobalViaContextDescriptor::ValueRegister().is(a0));
2704 __ mov(StoreGlobalViaContextDescriptor::ValueRegister(), result_register()); 2702 __ mov(StoreGlobalViaContextDescriptor::ValueRegister(), result_register());
2705 // Each var occupies two slots in the context: for reads and writes. 2703 // Each var occupies two slots in the context: for reads and writes.
2706 int const slot = var->index() + 1; 2704 int const slot = var->index() + 1;
2707 int const depth = scope()->ContextChainLength(var->scope()); 2705 int const depth = scope()->ContextChainLength(var->scope());
2708 if (depth <= StoreGlobalViaContextStub::kMaximumDepth) { 2706 if (depth <= StoreGlobalViaContextStub::kMaximumDepth) {
2709 __ li(StoreGlobalViaContextDescriptor::SlotRegister(), Operand(slot)); 2707 __ li(StoreGlobalViaContextDescriptor::SlotRegister(), Operand(slot));
2710 __ li(StoreGlobalViaContextDescriptor::NameRegister(), var->name());
2711 StoreGlobalViaContextStub stub(isolate(), depth, language_mode()); 2708 StoreGlobalViaContextStub stub(isolate(), depth, language_mode());
2712 __ CallStub(&stub); 2709 __ CallStub(&stub);
2713 } else { 2710 } else {
2714 __ Push(Smi::FromInt(slot)); 2711 __ Push(Smi::FromInt(slot));
2715 __ Push(var->name());
2716 __ Push(a0); 2712 __ Push(a0);
2717 __ CallRuntime(is_strict(language_mode()) 2713 __ CallRuntime(is_strict(language_mode())
2718 ? Runtime::kStoreGlobalViaContext_Strict 2714 ? Runtime::kStoreGlobalViaContext_Strict
2719 : Runtime::kStoreGlobalViaContext_Sloppy, 2715 : Runtime::kStoreGlobalViaContext_Sloppy,
2720 3); 2716 2);
2721 } 2717 }
2722 2718
2723 } else if (var->mode() == LET && op != Token::INIT_LET) { 2719 } else if (var->mode() == LET && op != Token::INIT_LET) {
2724 // Non-initializing assignment to let variable needs a write barrier. 2720 // Non-initializing assignment to let variable needs a write barrier.
2725 DCHECK(!var->IsLookupSlot()); 2721 DCHECK(!var->IsLookupSlot());
2726 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); 2722 DCHECK(var->IsStackAllocated() || var->IsContextSlot());
2727 Label assign; 2723 Label assign;
2728 MemOperand location = VarOperand(var, a1); 2724 MemOperand location = VarOperand(var, a1);
2729 __ ld(a3, location); 2725 __ ld(a3, location);
2730 __ LoadRoot(a4, Heap::kTheHoleValueRootIndex); 2726 __ LoadRoot(a4, Heap::kTheHoleValueRootIndex);
(...skipping 2710 matching lines...) Expand 10 before | Expand all | Expand 10 after
5441 reinterpret_cast<uint64_t>( 5437 reinterpret_cast<uint64_t>(
5442 isolate->builtins()->OsrAfterStackCheck()->entry())); 5438 isolate->builtins()->OsrAfterStackCheck()->entry()));
5443 return OSR_AFTER_STACK_CHECK; 5439 return OSR_AFTER_STACK_CHECK;
5444 } 5440 }
5445 5441
5446 5442
5447 } // namespace internal 5443 } // namespace internal
5448 } // namespace v8 5444 } // namespace v8
5449 5445
5450 #endif // V8_TARGET_ARCH_MIPS64 5446 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.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