Chromium Code Reviews

Unified Diff: src/ast/scopes.h

Issue 2276483003: Store NonLocals in variables_ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | 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 78ad0c4b009abe78c2113454088a17cce798df75..9135c65422b29da459c0b64a55d0cb8e9dc45171 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -30,28 +30,6 @@ class VariableMap: public ZoneHashMap {
};
-// The dynamic scope part holds hash maps for the variables that will
-// be looked up dynamically from within eval and with scopes. The objects
-// are allocated on-demand from Scope::NonLocal to avoid wasting memory
-// and setup time for scopes that don't need them.
-class DynamicScopePart : public ZoneObject {
- public:
- explicit DynamicScopePart(Zone* zone) {
- for (int i = 0; i < 3; i++)
- maps_[i] = new(zone->New(sizeof(VariableMap))) VariableMap(zone);
- }
-
- VariableMap* GetMap(VariableMode mode) {
- int index = mode - DYNAMIC;
- DCHECK(index >= 0 && index < 3);
- return maps_[index];
- }
-
- private:
- VariableMap *maps_[3];
-};
-
-
// Sloppy block-scoped function declarations to var-bind
class SloppyBlockFunctionMap : public ZoneHashMap {
public:
@@ -474,8 +452,6 @@ class Scope: public ZoneObject {
// map above in order of addition.
// TODO(verwaest): Thread through Variable.
ZoneList<Variable*> ordered_variables_;
- // Variables that must be looked up dynamically.
- DynamicScopePart* dynamics_;
// Unresolved variables referred to from this scope. The proxies themselves
// form a linked list of all unresolved proxies.
VariableProxy* unresolved_;
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine