Index: src/scopes.cc |
=================================================================== |
--- src/scopes.cc (revision 3220) |
+++ src/scopes.cc (working copy) |
@@ -598,9 +598,11 @@ |
if (inner_lookup) |
var->is_accessed_from_inner_scope_ = true; |
- // If the variable we have found is just a guess, invalidate the result. |
+ // If the variable we have found is just a guess, invalidate the |
+ // result. If the found variable is local, record that fact so we |
+ // can generate fast code to get it if it is not shadowed by eval. |
if (guess) { |
- *invalidated_local = var; |
+ if (!var->is_global()) *invalidated_local = var; |
var = NULL; |
} |