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

Unified Diff: src/runtime.cc

Issue 160073006: Implement handling of arrow functions in the parser (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Extra parens in parameter lists now recognized, no longer segfaults on "()" Created 6 years, 7 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/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 1aaa3cd92a70b10d8521ffde464cec500aecd393..23fb4700e0c83212af29cc3773da7b3c9968e290 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -2941,6 +2941,14 @@ RUNTIME_FUNCTION(Runtime_FunctionIsGenerator) {
}
+RUNTIME_FUNCTION(Runtime_FunctionIsArrow) {
+ SealHandleScope shs(isolate);
+ ASSERT(args.length() == 1);
+ CONVERT_ARG_CHECKED(JSFunction, f, 0);
+ return isolate->heap()->ToBoolean(f->shared()->is_arrow());
+}
+
+
RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) {
SealHandleScope shs(isolate);
ASSERT(args.length() == 1);

Powered by Google App Engine
This is Rietveld 408576698