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

Unified Diff: src/scopes.h

Issue 816913003: Implement ES6 rest parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Disable optimization of functions with rest parameters in parser Created 5 years, 10 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/scopes.h
diff --git a/src/scopes.h b/src/scopes.h
index 412ad853f6208a1e94e42c1973f4d759840e478a..532220e7671b47d7a3f198e28543e4eb12ff7997 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -381,6 +381,10 @@ class Scope: public ZoneObject {
return rest_parameter_;
}
+ bool has_rest_parameter() const {
+ return rest_index_ >= 0;
+ }
+
bool is_simple_parameter_list() const {
DCHECK(is_function_scope());
if (rest_index_ >= 0) return false;

Powered by Google App Engine
This is Rietveld 408576698