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

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: 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 d7119239c78355de4ac1c97fcbe255847c36d4fe..ee865de9f9b2d4454d5b8af9bf7d19dd479d5cba 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -2671,6 +2671,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* proxy() const { return proxy_; }
Dmitry Lomov (no reviews) 2014/11/13 11:17:37 Nit: rename proxy => class_variable_proxy (also fi
arv (Not doing code reviews) 2014/11/13 20:47:49 Done.
Expression* extends() const { return extends_; }
Expression* constructor() const { return constructor_; }
ZoneList<Property*>* properties() const { return properties_; }
@@ -2678,11 +2680,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* proxy, Expression* extends,
Dmitry Lomov (no reviews) 2014/11/13 11:17:37 proxy => class_variable_proxy
arv (Not doing code reviews) 2014/11/13 20:47:49 Done.
Expression* constructor, ZoneList<Property*>* properties,
int start_position, int end_position)
: Expression(zone, start_position),
raw_name_(name),
+ scope_(scope),
+ proxy_(proxy),
extends_(extends),
constructor_(constructor),
properties_(properties),
@@ -2690,6 +2695,8 @@ class ClassLiteral FINAL : public Expression {
private:
const AstRawString* raw_name_;
+ Scope* scope_;
+ VariableProxy* proxy_;
Dmitry Lomov (no reviews) 2014/11/13 11:17:37 proxy_ => class_variable_proxy_
arv (Not doing code reviews) 2014/11/13 20:47:49 Done.
Expression* extends_;
Expression* constructor_;
ZoneList<Property*>* properties_;
@@ -3673,13 +3680,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,
Dmitry Lomov (no reviews) 2014/11/13 11:17:37 proxy => class_variable_proxy
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