summaryrefslogtreecommitdiff
path: root/deps/v8/src/parsing/parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/parsing/parser.h')
-rw-r--r--deps/v8/src/parsing/parser.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/deps/v8/src/parsing/parser.h b/deps/v8/src/parsing/parser.h
index dcc222da0f..2da4490906 100644
--- a/deps/v8/src/parsing/parser.h
+++ b/deps/v8/src/parsing/parser.h
@@ -502,7 +502,7 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
Expression* CloseTemplateLiteral(TemplateLiteralState* state, int start,
Expression* tag);
- ZoneList<Expression*>* PrepareSpreadArguments(ZoneList<Expression*>* list);
+ ArrayLiteral* ArrayLiteralFromListWithSpread(ZoneList<Expression*>* list);
Expression* SpreadCall(Expression* function, ZoneList<Expression*>* args,
int pos, Call::PossiblyEval is_possibly_eval);
Expression* SpreadCallNew(Expression* function, ZoneList<Expression*>* args,
@@ -706,6 +706,15 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
}
}
+ // A shortcut for performing a ToString operation
+ V8_INLINE Expression* ToString(Expression* expr) {
+ if (expr->IsStringLiteral()) return expr;
+ ZoneList<Expression*>* args = new (zone()) ZoneList<Expression*>(1, zone());
+ args->Add(expr, zone());
+ return factory()->NewCallRuntime(Runtime::kInlineToString, args,
+ expr->position());
+ }
+
// 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.