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

Unified Diff: src/ast/scopes.h

Issue 2312683002: Include only stuff you need, part 7: Fix scopes.h -> ast.h. (Closed)
Patch Set: Created 4 years, 3 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 | « 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 5f0ebb9ed50dab8a625d9368290a05cf199aca58..a2ba28effd15dd0dd382ac851ecc084c9522c2af 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -5,7 +5,7 @@
#ifndef V8_AST_SCOPES_H_
#define V8_AST_SCOPES_H_
-#include "src/ast/ast.h"
+#include "src/ast/variables.h"
#include "src/base/hashmap.h"
#include "src/globals.h"
#include "src/zone.h"
@@ -13,7 +13,13 @@
namespace v8 {
namespace internal {
+class AstNodeFactory;
+class AstValueFactory;
+class AstRawString;
+class Declaration;
class ParseInfo;
+class SloppyBlockFunctionStatement;
+class VariableProxy;
// A hash map to support fast variable declaration and lookup.
class VariableMap: public ZoneHashMap {
@@ -153,25 +159,9 @@ class Scope: public ZoneObject {
const AstRawString* name,
int start_position = kNoSourcePosition,
int end_position = kNoSourcePosition,
- Variable::Kind kind = Variable::NORMAL) {
- // Note that we must not share the unresolved variables with
- // the same name because they may be removed selectively via
- // RemoveUnresolved().
- DCHECK(!already_resolved_);
- DCHECK_EQ(factory->zone(), zone());
- VariableProxy* proxy =
- factory->NewVariableProxy(name, kind, start_position, end_position);
- proxy->set_next_unresolved(unresolved_);
- unresolved_ = proxy;
- return proxy;
- }
+ Variable::Kind kind = Variable::NORMAL);
- void AddUnresolved(VariableProxy* proxy) {
- DCHECK(!already_resolved_);
- DCHECK(!proxy->is_resolved());
- proxy->set_next_unresolved(unresolved_);
- unresolved_ = proxy;
- }
+ void AddUnresolved(VariableProxy* proxy);
// Remove a unresolved variable. During parsing, an unresolved variable
// may have been added optimistically, but then only the variable name
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698