Index: src/full-codegen/full-codegen.cc |
diff --git a/src/full-codegen/full-codegen.cc b/src/full-codegen/full-codegen.cc |
index 8da33835597efbbe60fd04c4f91f5ec7038954c8..8c3532c93643c68942b2f5a6dd7970a7c7020348 100644 |
--- a/src/full-codegen/full-codegen.cc |
+++ b/src/full-codegen/full-codegen.cc |
@@ -501,8 +501,7 @@ void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { |
void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, |
TypeofMode typeof_mode) { |
Variable* var = proxy->var(); |
- DCHECK(var->IsUnallocated() || |
- (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); |
+ DCHECK(var->IsUnallocated()); |
__ Move(LoadDescriptor::NameRegister(), var->name()); |
EmitLoadSlot(LoadGlobalDescriptor::SlotRegister(), |
@@ -914,8 +913,7 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) { |
DCHECK(!context()->IsEffect()); |
DCHECK(!context()->IsTest()); |
- if (proxy != NULL && |
- (proxy->var()->IsUnallocated() || proxy->var()->IsLookupSlot())) { |
+ if (proxy != NULL && proxy->var()->IsUnallocated()) { |
EmitVariableLoad(proxy, INSIDE_TYPEOF); |
PrepareForBailout(proxy, BailoutState::TOS_REGISTER); |
} else { |
@@ -1670,48 +1668,44 @@ void FullCodeGenerator::VisitCall(Call* expr) { |
Expression* callee = expr->expression(); |
Call::CallType call_type = expr->GetCallType(); |
- if (expr->is_possibly_eval()) { |
- EmitPossiblyEvalCall(expr); |
- } else { |
- switch (call_type) { |
- case Call::GLOBAL_CALL: |
- EmitCallWithLoadIC(expr); |
- break; |
- case Call::WITH_CALL: |
- // Call to a lookup slot looked up through a with scope. |
- PushCalleeAndWithBaseObject(expr); |
- EmitCall(expr); |
- break; |
- case Call::NAMED_PROPERTY_CALL: { |
- Property* property = callee->AsProperty(); |
- VisitForStackValue(property->obj()); |
- EmitCallWithLoadIC(expr); |
- break; |
- } |
- case Call::KEYED_PROPERTY_CALL: { |
- Property* property = callee->AsProperty(); |
- VisitForStackValue(property->obj()); |
- EmitKeyedCallWithLoadIC(expr, property->key()); |
- break; |
- } |
- case Call::NAMED_SUPER_PROPERTY_CALL: |
- EmitSuperCallWithLoadIC(expr); |
- break; |
- case Call::KEYED_SUPER_PROPERTY_CALL: |
- EmitKeyedSuperCallWithLoadIC(expr); |
- break; |
- case Call::SUPER_CALL: |
- EmitSuperConstructorCall(expr); |
- break; |
- case Call::OTHER_CALL: |
- // Call to an arbitrary expression not handled specially above. |
- VisitForStackValue(callee); |
- OperandStackDepthIncrement(1); |
- __ PushRoot(Heap::kUndefinedValueRootIndex); |
- // Emit function call. |
- EmitCall(expr); |
- break; |
+ // Eval is unsupported. |
+ CHECK(!expr->is_possibly_eval()); |
+ |
+ switch (call_type) { |
+ case Call::GLOBAL_CALL: |
+ EmitCallWithLoadIC(expr); |
+ break; |
+ case Call::NAMED_PROPERTY_CALL: { |
+ Property* property = callee->AsProperty(); |
+ VisitForStackValue(property->obj()); |
+ EmitCallWithLoadIC(expr); |
+ break; |
+ } |
+ case Call::KEYED_PROPERTY_CALL: { |
+ Property* property = callee->AsProperty(); |
+ VisitForStackValue(property->obj()); |
+ EmitKeyedCallWithLoadIC(expr, property->key()); |
+ break; |
} |
+ case Call::NAMED_SUPER_PROPERTY_CALL: |
+ EmitSuperCallWithLoadIC(expr); |
+ break; |
+ case Call::KEYED_SUPER_PROPERTY_CALL: |
+ EmitKeyedSuperCallWithLoadIC(expr); |
+ break; |
+ case Call::SUPER_CALL: |
+ EmitSuperConstructorCall(expr); |
+ break; |
+ case Call::OTHER_CALL: |
+ // Call to an arbitrary expression not handled specially above. |
+ VisitForStackValue(callee); |
+ OperandStackDepthIncrement(1); |
+ __ PushRoot(Heap::kUndefinedValueRootIndex); |
+ // Emit function call. |
+ EmitCall(expr); |
+ break; |
+ case Call::WITH_CALL: |
+ UNREACHABLE(); |
} |
#ifdef DEBUG |