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

Unified Diff: src/parser.h

Issue 631433002: Classes runtime (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove kConstructorFunction 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 | « src/messages.js ('k') | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index 300cc03a917f64717dc58ac844185b4f4674b53f..e461a99d84cfdcd6a13a4a9c2d81ab5fa1647581 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -417,6 +417,15 @@ class ParserTraits {
return string->AsArrayIndex(index);
}
+ bool IsConstructorProperty(ObjectLiteral::Property* property) {
+ return property->key()->raw_value()->EqualsString(
+ ast_value_factory()->constructor_string());
+ }
+
+ static Expression* GetPropertyValue(ObjectLiteral::Property* property) {
+ return property->value();
+ }
+
// Functions for encapsulating the differences between parsing and preparsing;
// operations interleaved with the recursive descent.
static void PushLiteralName(FuncNameInferrer* fni, const AstRawString* id) {
@@ -546,11 +555,11 @@ class ParserTraits {
Expression* SuperReference(Scope* scope,
AstNodeFactory<AstConstructionVisitor>* factory,
int pos = RelocInfo::kNoPosition);
- Expression* ClassLiteral(const AstRawString* name, Expression* extends,
- Expression* constructor,
- ZoneList<ObjectLiteral::Property*>* properties,
- int pos,
- AstNodeFactory<AstConstructionVisitor>* factory);
+ Expression* ClassExpression(const AstRawString* name, Expression* extends,
+ Expression* constructor,
+ ZoneList<ObjectLiteral::Property*>* properties,
+ int pos,
+ AstNodeFactory<AstConstructionVisitor>* factory);
Literal* ExpressionFromLiteral(
Token::Value token, int pos, Scanner* scanner,
« no previous file with comments | « src/messages.js ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698