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

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: Round two 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/full-codegen.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 deead81af71d47a5120f4d327a046dfc1fc1a655..e503f412a2a9342ab9a0d4c627774c24bc207a0a 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -2640,6 +2640,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_; }
@@ -2647,11 +2649,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),
@@ -2659,6 +2664,8 @@ class ClassLiteral FINAL : public Expression {
private:
const AstRawString* raw_name_;
+ Scope* scope_;
+ VariableProxy* class_variable_proxy_;
Expression* extends_;
Expression* constructor_;
ZoneList<Property*>* properties_;
@@ -3624,13 +3631,14 @@ class AstNodeFactory FINAL BASE_EMBEDDED {
return lit;
}
- 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) {
- ClassLiteral* lit =
- new (zone_) ClassLiteral(zone_, name, extends, constructor, properties,
- start_position, end_position);
+ ClassLiteral* lit = new (zone_)
+ ClassLiteral(zone_, name, scope, proxy, extends, constructor,
+ properties, start_position, end_position);
VISIT_AND_RETURN(ClassLiteral, lit)
}
« no previous file with comments | « no previous file | src/ast-numbering.cc » ('j') | src/full-codegen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698