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

Unified Diff: src/parser.h

Issue 938443002: [es6] implement spread calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase + clang-format Created 5 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
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index c8fb5611fee2a01a478023bce34946b7e916c38e..e1cceaf34283d698f93614e60c04b1778bd5ae7d 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -811,6 +811,16 @@ class ParserTraits {
return tag != NULL;
}
+ V8_INLINE ZoneList<v8::internal::Expression*>* PrepareSpreadArguments(
+ ZoneList<v8::internal::Expression*>* list);
+ V8_INLINE void MaterializeUnspreadArgumentsLiterals(int count) {}
+ V8_INLINE Expression* SpreadCall(Expression* function,
+ ZoneList<v8::internal::Expression*>* args,
+ int pos);
+ V8_INLINE Expression* SpreadCallNew(Expression* function,
+ ZoneList<v8::internal::Expression*>* args,
+ int pos);
+
private:
Parser* parser_;
};
@@ -1018,6 +1028,13 @@ class Parser : public ParserBase<ParserTraits> {
Expression* tag);
uint32_t ComputeTemplateLiteralHash(const TemplateLiteral* lit);
+ ZoneList<v8::internal::Expression*>* PrepareSpreadArguments(
+ ZoneList<v8::internal::Expression*>* list);
+ Expression* SpreadCall(Expression* function,
+ ZoneList<v8::internal::Expression*>* args, int pos);
+ Expression* SpreadCallNew(Expression* function,
+ ZoneList<v8::internal::Expression*>* args, int pos);
+
Scanner scanner_;
PreParser* reusable_preparser_;
Scope* original_scope_; // for ES5 function declarations in sloppy eval
@@ -1127,6 +1144,25 @@ Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state,
int start, Expression* tag) {
return parser_->CloseTemplateLiteral(state, start, tag);
}
+
+
+ZoneList<v8::internal::Expression*>* ParserTraits::PrepareSpreadArguments(
+ ZoneList<v8::internal::Expression*>* list) {
+ return parser_->PrepareSpreadArguments(list);
+}
+
+
+Expression* ParserTraits::SpreadCall(Expression* function,
+ ZoneList<v8::internal::Expression*>* args,
+ int pos) {
+ return parser_->SpreadCall(function, args, pos);
+}
+
+
+Expression* ParserTraits::SpreadCallNew(
+ Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) {
+ return parser_->SpreadCallNew(function, args, pos);
+}
} } // namespace v8::internal
#endif // V8_PARSER_H_
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/parser.cc » ('j') | test/js-perf-test/JSTests.json » ('J')

Powered by Google App Engine
This is Rietveld 408576698