Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(710)

Unified Diff: src/scopes.cc

Issue 366027: Fix case where we treat an unaliased call to eval as an aliased call... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-496.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-496.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698