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

Unified Diff: src/scopes.cc

Issue 1053773006: [es6] implement default/optional parameters (WIP / comments) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/scopes.cc
diff --git a/src/scopes.cc b/src/scopes.cc
index 93268ad31905015d78f014430124f70e6e7d1807..5b8c58fdc1a559100933bebe4ab91a8f7a2ffd24 100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -452,12 +452,13 @@ Variable* Scope::Lookup(const AstRawString* name) {
Variable* Scope::DeclareParameter(const AstRawString* name, VariableMode mode,
- bool is_rest) {
+ ParameterKind kind) {
DCHECK(!already_resolved());
DCHECK(is_function_scope());
Variable* var = variables_.Declare(this, name, mode, Variable::NORMAL,
kCreatedInitialized);
- if (is_rest) {
+ var->set_parameter_kind(kind);
+ if (kind.isRestParameter()) {
DCHECK_NULL(rest_parameter_);
rest_parameter_ = var;
rest_index_ = num_parameters();

Powered by Google App Engine
This is Rietveld 408576698