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

Unified Diff: src/ast.h

Issue 722793005: Classes: Implement correct name binding (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: git rebase Created 6 years, 1 month 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-numbering.cc » ('j') | src/parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 65c4d4f546928d5989da640708ebedbc8712662e..3e12d54ff81a4dadf7faffb4833a9129ad485eb0 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -2641,6 +2641,8 @@ class ClassLiteral FINAL : public Expression {
Handle<String> name() const { return raw_name_->string(); }
const AstRawString* raw_name() const { return raw_name_; }
+ Scope* scope() const { return scope_; }
+ VariableProxy* class_variable_proxy() const { return class_variable_proxy_; }
Expression* extends() const { return extends_; }
Expression* constructor() const { return constructor_; }
ZoneList<Property*>* properties() const { return properties_; }
@@ -2648,11 +2650,14 @@ class ClassLiteral FINAL : public Expression {
int end_position() const { return end_position_; }
protected:
- ClassLiteral(Zone* zone, const AstRawString* name, Expression* extends,
+ ClassLiteral(Zone* zone, const AstRawString* name, Scope* scope,
+ VariableProxy* class_variable_proxy, Expression* extends,
Expression* constructor, ZoneList<Property*>* properties,
int start_position, int end_position)
: Expression(zone, start_position),
raw_name_(name),
+ scope_(scope),
+ class_variable_proxy_(class_variable_proxy),
extends_(extends),
constructor_(constructor),
properties_(properties),
@@ -2660,6 +2665,8 @@ class ClassLiteral FINAL : public Expression {
private:
const AstRawString* raw_name_;
+ Scope* scope_;
+ VariableProxy* class_variable_proxy_;
Expression* extends_;
Expression* constructor_;
ZoneList<Property*>* properties_;
@@ -3500,12 +3507,14 @@ class AstNodeFactory FINAL BASE_EMBEDDED {
position);
}
- ClassLiteral* NewClassLiteral(const AstRawString* name, Expression* extends,
+ ClassLiteral* NewClassLiteral(const AstRawString* name, Scope* scope,
+ VariableProxy* proxy, Expression* extends,
Expression* constructor,
ZoneList<ObjectLiteral::Property*>* properties,
int start_position, int end_position) {
- return new (zone_) ClassLiteral(zone_, name, extends, constructor,
- properties, start_position, end_position);
+ return new (zone_)
+ ClassLiteral(zone_, name, scope, proxy, extends, constructor,
+ properties, start_position, end_position);
}
NativeFunctionLiteral* NewNativeFunctionLiteral(const AstRawString* name,
« no previous file with comments | « no previous file | src/ast-numbering.cc » ('j') | src/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698