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

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

Issue 2557593004: [ignition] desugar GetIterator() via bytecode rather than via AST (Closed)
Patch Set: georg's comments Created 4 years 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/ast-literal-reindexer.cc ('k') | src/ast/ast-traversal-visitor.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/ast/ast-numbering.h" 5 #include "src/ast/ast-numbering.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 // We can only get here from super calls currently. 407 // We can only get here from super calls currently.
408 DisableFullCodegenAndCrankshaft(kSuperReference); 408 DisableFullCodegenAndCrankshaft(kSuperReference);
409 node->set_base_id(ReserveIdRange(Spread::num_ids())); 409 node->set_base_id(ReserveIdRange(Spread::num_ids()));
410 Visit(node->expression()); 410 Visit(node->expression());
411 } 411 }
412 412
413 void AstNumberingVisitor::VisitEmptyParentheses(EmptyParentheses* node) { 413 void AstNumberingVisitor::VisitEmptyParentheses(EmptyParentheses* node) {
414 UNREACHABLE(); 414 UNREACHABLE();
415 } 415 }
416 416
417 void AstNumberingVisitor::VisitGetIterator(GetIterator* node) {
418 IncrementNodeCount();
419 DisableFullCodegenAndCrankshaft(kGetIterator);
420 node->set_base_id(ReserveIdRange(GetIterator::num_ids()));
421 Visit(node->iterable());
422 ReserveFeedbackSlots(node);
423 }
417 424
418 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { 425 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) {
419 IncrementNodeCount(); 426 IncrementNodeCount();
420 DisableSelfOptimization(); 427 DisableSelfOptimization();
421 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); 428 node->set_base_id(ReserveIdRange(ForInStatement::num_ids()));
422 Visit(node->enumerable()); // Not part of loop. 429 Visit(node->enumerable()); // Not part of loop.
423 node->set_first_yield_id(yield_count_); 430 node->set_first_yield_id(yield_count_);
424 Visit(node->each()); 431 Visit(node->each());
425 Visit(node->body()); 432 Visit(node->body());
426 node->set_yield_count(yield_count_ - node->first_yield_id()); 433 node->set_yield_count(yield_count_ - node->first_yield_id());
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 } 649 }
643 650
644 651
645 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 652 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
646 FunctionLiteral* function) { 653 FunctionLiteral* function) {
647 AstNumberingVisitor visitor(isolate, zone); 654 AstNumberingVisitor visitor(isolate, zone);
648 return visitor.Renumber(function); 655 return visitor.Renumber(function);
649 } 656 }
650 } // namespace internal 657 } // namespace internal
651 } // namespace v8 658 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast-literal-reindexer.cc ('k') | src/ast/ast-traversal-visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698