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

Unified Diff: src/ast/scopes.h

Issue 2287173002: Replace CollectVariables with locals(), update callsites to walk locals instead (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: restore undefined handling Created 4 years, 4 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/ast/scopeinfo.cc ('k') | src/ast/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.h
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index 8a84664c18ec44d657ebc85db9208c98d3b66c5f..ce98f766b5fba8cbc539d2de6cd2517529d65a75 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -144,6 +144,8 @@ class Scope: public ZoneObject {
// Declarations list.
ZoneList<Declaration*>* declarations() { return &decls_; }
+ ZoneList<Variable*>* locals() { return &locals_; }
+
// Create a new unresolved variable.
VariableProxy* NewUnresolved(AstNodeFactory* factory,
const AstRawString* name,
@@ -340,20 +342,12 @@ class Scope: public ZoneObject {
// ---------------------------------------------------------------------------
// Variable allocation.
- // Collect variables in this scope. Note that the function variable - if
- // present - is not collected and should be handled separately.
- void CollectVariables(ZoneList<Variable*>* stack_locals,
- ZoneList<Variable*>* context_locals,
- ZoneList<Variable*>* context_globals);
-
// Result of variable allocation.
int num_stack_slots() const { return num_stack_slots_; }
int num_heap_slots() const { return num_heap_slots_; }
- int num_global_slots() const { return num_global_slots_; }
int StackLocalCount() const;
int ContextLocalCount() const;
- int ContextGlobalCount() const;
// Determine if we can parse a function literal in this scope lazily.
bool AllowsLazyParsing() const;
@@ -483,7 +477,6 @@ class Scope: public ZoneObject {
// Computed via AllocateVariables.
int num_stack_slots_;
int num_heap_slots_;
- int num_global_slots_;
// The scope type.
const ScopeType scope_type_;
« no previous file with comments | « src/ast/scopeinfo.cc ('k') | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698