Chromium Code Reviews| Index: src/scopes.h |
| diff --git a/src/scopes.h b/src/scopes.h |
| index 8400094564cff764622a8b159745e33ba56ff14f..5da563547c82f2a7a052a1b9e18c782bd4439830 100644 |
| --- a/src/scopes.h |
| +++ b/src/scopes.h |
| @@ -117,6 +117,10 @@ class Scope: public ZoneObject { |
| // Assumes outer_scope_ is non-null. |
| void ReplaceOuterScope(Scope* outer_scope); |
| + // Propagates any eagerly-gathered scope usage flags (such as calls_eval()) |
| + // to the passed-in scope. |
| + void PropagateUsageFlagsToScope(Scope* other); |
|
rossberg
2015/10/29 10:41:47
Nit: It would seem more natural to do this the oth
adamk
2015/10/29 14:44:59
This way felt natural enough to me, I'm inclined t
|
| + |
| Zone* zone() const { return zone_; } |
| // --------------------------------------------------------------------------- |
| @@ -237,7 +241,7 @@ class Scope: public ZoneObject { |
| void RecordWithStatement() { scope_contains_with_ = true; } |
| // Inform the scope that the corresponding code contains an eval call. |
| - void RecordEvalCall() { if (!is_script_scope()) scope_calls_eval_ = true; } |
| + void RecordEvalCall() { scope_calls_eval_ = true; } |
| // Inform the scope that the corresponding code uses "arguments". |
| void RecordArgumentsUsage() { scope_uses_arguments_ = true; } |