Index: src/full-codegen.cc |
diff --git a/src/full-codegen.cc b/src/full-codegen.cc |
index 03c55d118ca29114e059adfc06005b58ffa8e82a..8ca40ccacd568033cee8b9cafd8a56a055ed0485 100644 |
--- a/src/full-codegen.cc |
+++ b/src/full-codegen.cc |
@@ -214,11 +214,6 @@ void FullCodeGenerator::CallLoadIC(ContextualMode contextual_mode, |
} |
-void FullCodeGenerator::CallGlobalLoadIC(Handle<String> name) { |
- return CallLoadIC(CONTEXTUAL); |
-} |
- |
- |
void FullCodeGenerator::CallStoreIC(TypeFeedbackId id) { |
Handle<Code> ic = CodeFactory::StoreIC(isolate(), language_mode()).code(); |
CallIC(ic, id); |
@@ -612,6 +607,22 @@ void FullCodeGenerator::VisitArithmeticExpression(BinaryOperation* expr) { |
} |
+void FullCodeGenerator::VisitForTypeofValue(Expression* expr) { |
+ VariableProxy* proxy = expr->AsVariableProxy(); |
+ DCHECK(!context()->IsEffect()); |
+ DCHECK(!context()->IsTest()); |
+ |
+ if (proxy != NULL && (proxy->var()->IsUnallocatedOrGlobalSlot() || |
+ proxy->var()->IsLookupSlot())) { |
+ EmitVariableLoad(proxy, INSIDE_TYPEOF); |
+ PrepareForBailout(proxy, TOS_REG); |
+ } else { |
+ // This expression cannot throw a reference error at the top level. |
+ VisitInDuplicateContext(expr); |
+ } |
+} |
+ |
+ |
void FullCodeGenerator::VisitBlock(Block* stmt) { |
Comment cmnt(masm_, "[ Block"); |
NestedBlock nested_block(this, stmt); |