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

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

Issue 1125183008: [es6] Spread in array literals (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cleanup Created 5 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 unified diff | Download patch
« no previous file with comments | « src/ast.cc ('k') | src/bailout-reason.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/scopes.h" 9 #include "src/scopes.h"
10 10
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 317
318 318
319 void AstNumberingVisitor::VisitCompareOperation(CompareOperation* node) { 319 void AstNumberingVisitor::VisitCompareOperation(CompareOperation* node) {
320 IncrementNodeCount(); 320 IncrementNodeCount();
321 node->set_base_id(ReserveIdRange(CompareOperation::num_ids())); 321 node->set_base_id(ReserveIdRange(CompareOperation::num_ids()));
322 Visit(node->left()); 322 Visit(node->left());
323 Visit(node->right()); 323 Visit(node->right());
324 } 324 }
325 325
326 326
327 void AstNumberingVisitor::VisitSpread(Spread* node) { UNREACHABLE(); } 327 void AstNumberingVisitor::VisitSpread(Spread* node) {
328 IncrementNodeCount();
329 DisableOptimization(kSpread);
330 Visit(node->expression());
331 }
328 332
329 333
330 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { 334 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) {
331 IncrementNodeCount(); 335 IncrementNodeCount();
332 DisableSelfOptimization(); 336 DisableSelfOptimization();
333 ReserveFeedbackSlots(node); 337 ReserveFeedbackSlots(node);
334 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); 338 node->set_base_id(ReserveIdRange(ForInStatement::num_ids()));
335 Visit(node->each()); 339 Visit(node->each());
336 Visit(node->enumerable()); 340 Visit(node->enumerable());
337 Visit(node->body()); 341 Visit(node->body());
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 } 525 }
522 526
523 527
524 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 528 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
525 FunctionLiteral* function) { 529 FunctionLiteral* function) {
526 AstNumberingVisitor visitor(isolate, zone); 530 AstNumberingVisitor visitor(isolate, zone);
527 return visitor.Renumber(function); 531 return visitor.Renumber(function);
528 } 532 }
529 } 533 }
530 } // namespace v8::internal 534 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/bailout-reason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698