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

Unified Diff: src/ast/ast.cc

Issue 2487483004: Only treat possible eval calls going through 'with' as special. (Closed)
Patch Set: Fix AstGraphBuilder Created 4 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
Index: src/ast/ast.cc
diff --git a/src/ast/ast.cc b/src/ast/ast.cc
index e5eb5e55fa0faff5c459600cd176addcd1daddd6..0d937d70dd62dfe1bab61e56ab6803874dea4318 100644
--- a/src/ast/ast.cc
+++ b/src/ast/ast.cc
@@ -897,7 +897,8 @@ Call::CallType Call::GetCallType() const {
VariableProxy* proxy = expression()->AsVariableProxy();
if (proxy != NULL) {
if (is_possibly_eval()) {
- return POSSIBLY_EVAL_CALL;
+ return proxy->var()->mode() == DYNAMIC ? POSSIBLY_EVAL_THROUGH_WITH_CALL
+ : POSSIBLY_EVAL_CALL;
} else if (proxy->var()->IsUnallocated()) {
return GLOBAL_CALL;
} else if (proxy->var()->IsLookupSlot()) {

Powered by Google App Engine
This is Rietveld 408576698