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

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

Issue 938443002: [es6] implement spread calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add construct support, clean out some gunk 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 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/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/compiler.h" 9 #include "src/compiler.h"
10 #include "src/scopes.h" 10 #include "src/scopes.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 358
359 359
360 void AstNumberingVisitor::VisitCompareOperation(CompareOperation* node) { 360 void AstNumberingVisitor::VisitCompareOperation(CompareOperation* node) {
361 IncrementNodeCount(); 361 IncrementNodeCount();
362 node->set_base_id(ReserveIdRange(CompareOperation::num_ids())); 362 node->set_base_id(ReserveIdRange(CompareOperation::num_ids()));
363 Visit(node->left()); 363 Visit(node->left());
364 Visit(node->right()); 364 Visit(node->right());
365 } 365 }
366 366
367 367
368 void AstNumberingVisitor::VisitSpreadOperation(SpreadOperation* node) {
369 IncrementNodeCount();
370 node->set_base_id(ReserveIdRange(SpreadOperation::num_ids()));
371 Visit(node->expression());
372 }
373
374
368 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { 375 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) {
369 IncrementNodeCount(); 376 IncrementNodeCount();
370 DisableSelfOptimization(); 377 DisableSelfOptimization();
371 ReserveFeedbackSlots(node); 378 ReserveFeedbackSlots(node);
372 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); 379 node->set_base_id(ReserveIdRange(ForInStatement::num_ids()));
373 Visit(node->each()); 380 Visit(node->each());
374 Visit(node->enumerable()); 381 Visit(node->enumerable());
375 Visit(node->body()); 382 Visit(node->body());
376 } 383 }
377 384
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 } 566 }
560 567
561 568
562 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 569 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
563 FunctionLiteral* function) { 570 FunctionLiteral* function) {
564 AstNumberingVisitor visitor(isolate, zone); 571 AstNumberingVisitor visitor(isolate, zone);
565 return visitor.Renumber(function); 572 return visitor.Renumber(function);
566 } 573 }
567 } 574 }
568 } // namespace v8::internal 575 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/ast-value-factory.h » ('j') | src/compiler/ast-graph-builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698