Index: src/full-codegen/arm/full-codegen-arm.cc |
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc |
index 74660669a3cd506f33628d51924d6291658e41f9..fbfce64eea193854e79a59f1c1bd194bbd6bcf6e 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -1391,26 +1391,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()); |
- const int slot = var->index(); |
- const int depth = scope()->ContextChainLength(var->scope()); |
- if (depth <= LoadGlobalViaContextStub::kMaximumDepth) { |
- __ mov(LoadGlobalViaContextDescriptor::SlotRegister(), Operand(slot)); |
- LoadGlobalViaContextStub stub(isolate(), depth); |
- __ CallStub(&stub); |
- } else { |
- __ Push(Smi::FromInt(slot)); |
- __ CallRuntime(Runtime::kLoadGlobalViaContext, 1); |
- } |
- } else { |
- __ ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand()); |
- __ mov(LoadDescriptor::NameRegister(), Operand(var->name())); |
- __ mov(LoadDescriptor::SlotRegister(), |
- Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); |
- CallLoadIC(typeof_mode); |
- } |
+ __ ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand()); |
+ __ mov(LoadDescriptor::NameRegister(), Operand(var->name())); |
+ __ mov(LoadDescriptor::SlotRegister(), |
+ Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); |
+ CallLoadIC(typeof_mode); |
} |
@@ -2613,25 +2598,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()); |
- const int slot = var->index(); |
- const int depth = scope()->ContextChainLength(var->scope()); |
- if (depth <= StoreGlobalViaContextStub::kMaximumDepth) { |
- __ mov(StoreGlobalViaContextDescriptor::SlotRegister(), Operand(slot)); |
- DCHECK(StoreGlobalViaContextDescriptor::ValueRegister().is(r0)); |
- StoreGlobalViaContextStub stub(isolate(), depth, language_mode()); |
- __ CallStub(&stub); |
- } else { |
- __ Push(Smi::FromInt(slot)); |
- __ push(r0); |
- __ 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()); |