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

Unified Diff: src/full-codegen/mips/full-codegen-mips.cc

Issue 1419823003: Remove support for "loads and stores to global vars through property cell shortcuts inst… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@disable-shortcuts
Patch Set: Addressing comments Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/mips/full-codegen-mips.cc
diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc
index cd0df972cc3a15fb10f8d36aa8dba0ed5cc453b7..13484a87b44a53bca48f23169a4f8de8f459df3d 100644
--- a/src/full-codegen/mips/full-codegen-mips.cc
+++ b/src/full-codegen/mips/full-codegen-mips.cc
@@ -1386,27 +1386,11 @@ void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy,
Variable* var = proxy->var();
DCHECK(var->IsUnallocatedOrGlobalSlot() ||
(var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL));
- if (var->IsGlobalSlot()) {
- DCHECK(var->index() > 0);
- DCHECK(var->IsStaticGlobalObjectProperty());
- int const slot = var->index();
- int const depth = scope()->ContextChainLength(var->scope());
- if (depth <= LoadGlobalViaContextStub::kMaximumDepth) {
- __ li(LoadGlobalViaContextDescriptor::SlotRegister(), Operand(slot));
- LoadGlobalViaContextStub stub(isolate(), depth);
- __ CallStub(&stub);
- } else {
- __ Push(Smi::FromInt(slot));
- __ CallRuntime(Runtime::kLoadGlobalViaContext, 1);
- }
-
- } else {
- __ lw(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
- __ li(LoadDescriptor::NameRegister(), Operand(var->name()));
- __ li(LoadDescriptor::SlotRegister(),
- Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
- CallLoadIC(typeof_mode);
- }
+ __ lw(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
+ __ li(LoadDescriptor::NameRegister(), Operand(var->name()));
+ __ li(LoadDescriptor::SlotRegister(),
+ Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
+ CallLoadIC(typeof_mode);
}
@@ -2607,27 +2591,6 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
if (FLAG_vector_stores) EmitLoadStoreICSlot(slot);
CallStoreIC();
- } else if (var->IsGlobalSlot()) {
- // Global var, const, or let.
- DCHECK(var->index() > 0);
- DCHECK(var->IsStaticGlobalObjectProperty());
- DCHECK(StoreGlobalViaContextDescriptor::ValueRegister().is(a0));
- __ mov(StoreGlobalViaContextDescriptor::ValueRegister(), result_register());
- int const slot = var->index();
- int const depth = scope()->ContextChainLength(var->scope());
- if (depth <= StoreGlobalViaContextStub::kMaximumDepth) {
- __ li(StoreGlobalViaContextDescriptor::SlotRegister(), Operand(slot));
- StoreGlobalViaContextStub stub(isolate(), depth, language_mode());
- __ CallStub(&stub);
- } else {
- __ Push(Smi::FromInt(slot));
- __ Push(a0);
- __ CallRuntime(is_strict(language_mode())
- ? Runtime::kStoreGlobalViaContext_Strict
- : Runtime::kStoreGlobalViaContext_Sloppy,
- 2);
- }
-
} else if (var->mode() == LET && op != Token::INIT_LET) {
// Non-initializing assignment to let variable needs a write barrier.
DCHECK(!var->IsLookupSlot());
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698