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

Unified Diff: src/scopes.h

Issue 1134453002: Revert of Remove Scope::scope_uses_arguments_ flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Created 5 years, 7 months 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 | « src/preparser.h ('k') | src/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.h
diff --git a/src/scopes.h b/src/scopes.h
index 7a013e96c7ffd63aa9ceb4073a7cf7a3e044a467..f3c64f9eadf73c7c4f9c1671779c4f55926697f9 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -211,6 +211,9 @@
// Inform the scope that the corresponding code contains an eval call.
void RecordEvalCall() { if (!is_script_scope()) scope_calls_eval_ = true; }
+
+ // Inform the scope that the corresponding code uses "arguments".
+ void RecordArgumentsUsage() { scope_uses_arguments_ = true; }
// Inform the scope that the corresponding code uses "super".
void RecordSuperPropertyUsage() { scope_uses_super_property_ = true; }
@@ -308,6 +311,10 @@
// Does this scope contain a with statement.
bool contains_with() const { return scope_contains_with_; }
+ // Does this scope access "arguments".
+ bool uses_arguments() const { return scope_uses_arguments_; }
+ // Does any inner scope access "arguments".
+ bool inner_uses_arguments() const { return inner_scope_uses_arguments_; }
// Does this scope access "super" property (super.foo).
bool uses_super_property() const { return scope_uses_super_property_; }
// Does any inner scope access "super" property.
@@ -574,6 +581,8 @@
// This scope or a nested catch scope or with scope contain an 'eval' call. At
// the 'eval' call site this scope is the declaration scope.
bool scope_calls_eval_;
+ // This scope uses "arguments".
+ bool scope_uses_arguments_;
// This scope uses "super" property ('super.foo').
bool scope_uses_super_property_;
// This scope contains an "use asm" annotation.
@@ -589,6 +598,7 @@
// Computed via PropagateScopeInfo.
bool outer_scope_calls_sloppy_eval_;
bool inner_scope_calls_eval_;
+ bool inner_scope_uses_arguments_;
bool inner_scope_uses_super_property_;
bool force_eager_compilation_;
bool force_context_allocation_;
« no previous file with comments | « src/preparser.h ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698