Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 3698a322c046681ec8471a14fa3db2110a8b678a..0dbe2a35bb7bda261eb4c7601ddd2554d98e774c 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -4693,7 +4693,8 @@ HValue* HOptimizedGraphBuilder::BuildContextChainWalk(Variable* var) { |
HValue* context = environment()->context(); |
int length = current_info()->scope()->ContextChainLength(var->scope()); |
while (length-- > 0) { |
- context = Add<HOuterContext>(context); |
+ context = AddLoadNamedField( |
+ context, HObjectAccess::ForContextSlot(Context::PREVIOUS_INDEX)); |
} |
return context; |
} |