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

Side by Side Diff: src/ast-numbering.cc

Issue 1272673003: [es6] Re-implement rest parameters via desugaring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase + fix brokenness Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/ast-numbering.h" 5 #include "src/ast-numbering.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/scopes.h" 8 #include "src/scopes.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 node->set_base_id(ReserveIdRange(VariableProxy::num_ids())); 158 node->set_base_id(ReserveIdRange(VariableProxy::num_ids()));
159 } 159 }
160 160
161 161
162 void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) { 162 void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) {
163 VisitVariableProxyReference(node); 163 VisitVariableProxyReference(node);
164 ReserveFeedbackSlots(node); 164 ReserveFeedbackSlots(node);
165 } 165 }
166 166
167 167
168 void AstNumberingVisitor::VisitRestParameter(RestParameter* node) {
169 UNREACHABLE();
170 }
171
172
168 void AstNumberingVisitor::VisitThisFunction(ThisFunction* node) { 173 void AstNumberingVisitor::VisitThisFunction(ThisFunction* node) {
169 IncrementNodeCount(); 174 IncrementNodeCount();
170 node->set_base_id(ReserveIdRange(ThisFunction::num_ids())); 175 node->set_base_id(ReserveIdRange(ThisFunction::num_ids()));
171 } 176 }
172 177
173 178
174 void AstNumberingVisitor::VisitSuperPropertyReference( 179 void AstNumberingVisitor::VisitSuperPropertyReference(
175 SuperPropertyReference* node) { 180 SuperPropertyReference* node) {
176 IncrementNodeCount(); 181 IncrementNodeCount();
177 DisableOptimization(kSuperReference); 182 DisableOptimization(kSuperReference);
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 } 579 }
575 580
576 581
577 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 582 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
578 FunctionLiteral* function) { 583 FunctionLiteral* function) {
579 AstNumberingVisitor visitor(isolate, zone); 584 AstNumberingVisitor visitor(isolate, zone);
580 return visitor.Renumber(function); 585 return visitor.Renumber(function);
581 } 586 }
582 } // namespace internal 587 } // namespace internal
583 } // namespace v8 588 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698