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

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

Issue 919703003: WIP: Implement ES6 Spread-calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Flag calls as spread calls in parser, error on spread intrinsics/construct calls 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->assign_iterator());
372 Visit(node->next_result());
373 Visit(node->result_done());
374 Visit(node->result_value());
375 }
376
377
368 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { 378 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) {
369 IncrementNodeCount(); 379 IncrementNodeCount();
370 DisableSelfOptimization(); 380 DisableSelfOptimization();
371 ReserveFeedbackSlots(node); 381 ReserveFeedbackSlots(node);
372 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); 382 node->set_base_id(ReserveIdRange(ForInStatement::num_ids()));
373 Visit(node->each()); 383 Visit(node->each());
374 Visit(node->enumerable()); 384 Visit(node->enumerable());
375 Visit(node->body()); 385 Visit(node->body());
376 } 386 }
377 387
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 } 569 }
560 570
561 571
562 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 572 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
563 FunctionLiteral* function) { 573 FunctionLiteral* function) {
564 AstNumberingVisitor visitor(isolate, zone); 574 AstNumberingVisitor visitor(isolate, zone);
565 return visitor.Renumber(function); 575 return visitor.Renumber(function);
566 } 576 }
567 } 577 }
568 } // namespace v8::internal 578 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/ast-this-access-visitor.cc » ('j') | src/compiler/ast-graph-builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698