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

Unified Diff: src/ast.h

Issue 624013005: Classes: Add support for toString (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add type checks Created 6 years, 2 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/full-codegen.cc » ('j') | no next file with comments »
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 11dda68879962254d1a998c001b178ed6f3c76ec..a04611bf5892e83c9062eff63a76203970a8ee89 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -2536,22 +2536,26 @@ class ClassLiteral FINAL : public Expression {
Expression* extends() const { return extends_; }
Expression* constructor() const { return constructor_; }
ZoneList<Property*>* properties() const { return properties_; }
+ int start_position() const { return position(); }
+ int end_position() const { return end_position_; }
protected:
ClassLiteral(Zone* zone, const AstRawString* name, Expression* extends,
Expression* constructor, ZoneList<Property*>* properties,
- int position, IdGen* id_gen)
- : Expression(zone, position, id_gen),
+ int start_position, int end_position, IdGen* id_gen)
+ : Expression(zone, start_position, id_gen),
raw_name_(name),
extends_(extends),
constructor_(constructor),
- properties_(properties) {}
+ properties_(properties),
+ end_position_(end_position) {}
private:
const AstRawString* raw_name_;
Expression* extends_;
Expression* constructor_;
ZoneList<Property*>* properties_;
+ int end_position_;
};
@@ -3535,9 +3539,10 @@ class AstNodeFactory FINAL BASE_EMBEDDED {
ClassLiteral* NewClassLiteral(const AstRawString* name, Expression* extends,
Expression* constructor,
ZoneList<ObjectLiteral::Property*>* properties,
- int position) {
- ClassLiteral* lit = new (zone_) ClassLiteral(
- zone_, name, extends, constructor, properties, position, id_gen_);
+ int start_position, int end_position) {
+ ClassLiteral* lit =
+ new (zone_) ClassLiteral(zone_, name, extends, constructor, properties,
+ start_position, end_position, id_gen_);
VISIT_AND_RETURN(ClassLiteral, lit)
}
« no previous file with comments | « no previous file | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698