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

Unified Diff: src/parser.h

Issue 227483006: Version 3.25.28.6 (merged r20316, r20366, r20428, r20451) (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.25
Patch Set: Created 6 years, 8 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/objects.cc ('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 f49626766eb1dab32ea2bddb5d99289aa91ecd10..39be536130e6b465f1edea99db2ea4e6e2d6ed15 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -462,6 +462,11 @@ class ParserTraits {
static bool IsIdentifier(Expression* expression);
+ static Handle<String> AsIdentifier(Expression* expression) {
+ ASSERT(IsIdentifier(expression));
+ return expression->AsVariableProxy()->name();
+ }
+
static bool IsBoilerplateProperty(ObjectLiteral::Property* property) {
return ObjectLiteral::IsBoilerplateProperty(property);
}
@@ -501,10 +506,6 @@ class ParserTraits {
// used on for the statically checking assignments to harmony const bindings.
static Expression* MarkExpressionAsLValue(Expression* expression);
- // Checks LHS expression for assignment and prefix/postfix increment/decrement
- // in strict mode.
- void CheckStrictModeLValue(Expression* expression, bool* ok);
-
// Returns true if we have a binary expression between two numeric
// literals. In that case, *x will be changed to an expression which is the
// computed value.
@@ -527,6 +528,25 @@ class ParserTraits {
Expression* expression, Token::Value op, int pos,
AstNodeFactory<AstConstructionVisitor>* factory);
+ // Generate AST node that throws a ReferenceError with the given type.
+ Expression* NewThrowReferenceError(const char* type, int pos);
+
+ // Generate AST node that throws a SyntaxError with the given
+ // type. The first argument may be null (in the handle sense) in
+ // which case no arguments are passed to the constructor.
+ Expression* NewThrowSyntaxError(
+ const char* type, Handle<Object> arg, int pos);
+
+ // Generate AST node that throws a TypeError with the given
+ // type. Both arguments must be non-null (in the handle sense).
+ Expression* NewThrowTypeError(
+ const char* type, Handle<Object> arg1, Handle<Object> arg2, int pos);
+
+ // Generic AST generator for throwing errors from compiled code.
+ Expression* NewThrowError(
+ Handle<String> constructor, const char* type,
+ Vector<Handle<Object> > arguments, int pos);
+
// Reporting errors.
void ReportMessageAt(Scanner::Location source_location,
const char* message,
@@ -778,25 +798,6 @@ class Parser : public ParserBase<ParserTraits> {
Handle<String> LookupCachedSymbol(int symbol_id);
- // Generate AST node that throw a ReferenceError with the given type.
- Expression* NewThrowReferenceError(Handle<String> type);
-
- // Generate AST node that throw a SyntaxError with the given
- // type. The first argument may be null (in the handle sense) in
- // which case no arguments are passed to the constructor.
- Expression* NewThrowSyntaxError(Handle<String> type, Handle<Object> first);
-
- // Generate AST node that throw a TypeError with the given
- // type. Both arguments must be non-null (in the handle sense).
- Expression* NewThrowTypeError(Handle<String> type,
- Handle<Object> first,
- Handle<Object> second);
-
- // Generic AST generator for throwing errors from compiled code.
- Expression* NewThrowError(Handle<String> constructor,
- Handle<String> type,
- Vector< Handle<Object> > arguments);
-
PreParser::PreParseResult LazyParseFunctionLiteral(
SingletonLogger* logger);
« no previous file with comments | « src/objects.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698