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

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

Issue 2557593004: [ignition] desugar GetIterator() via bytecode rather than via AST (Closed)
Patch Set: get tests passing 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
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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 // We can only get here from super calls currently. 404 // We can only get here from super calls currently.
405 DisableFullCodegenAndCrankshaft(kSuperReference); 405 DisableFullCodegenAndCrankshaft(kSuperReference);
406 node->set_base_id(ReserveIdRange(Spread::num_ids())); 406 node->set_base_id(ReserveIdRange(Spread::num_ids()));
407 Visit(node->expression()); 407 Visit(node->expression());
408 } 408 }
409 409
410 void AstNumberingVisitor::VisitEmptyParentheses(EmptyParentheses* node) { 410 void AstNumberingVisitor::VisitEmptyParentheses(EmptyParentheses* node) {
411 UNREACHABLE(); 411 UNREACHABLE();
412 } 412 }
413 413
414 void AstNumberingVisitor::VisitGetIterator(GetIterator* node) {
415 IncrementNodeCount();
416 DisableFullCodegenAndCrankshaft(kGetIterator);
417 node->set_base_id(ReserveIdRange(GetIterator::num_ids()));
418 Visit(node->iterable());
419 ReserveFeedbackSlots(node);
420 }
414 421
415 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { 422 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) {
416 IncrementNodeCount(); 423 IncrementNodeCount();
417 DisableSelfOptimization(); 424 DisableSelfOptimization();
418 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); 425 node->set_base_id(ReserveIdRange(ForInStatement::num_ids()));
419 Visit(node->enumerable()); // Not part of loop. 426 Visit(node->enumerable()); // Not part of loop.
420 node->set_first_yield_id(yield_count_); 427 node->set_first_yield_id(yield_count_);
421 Visit(node->each()); 428 Visit(node->each());
422 Visit(node->body()); 429 Visit(node->body());
423 node->set_yield_count(yield_count_ - node->first_yield_id()); 430 node->set_yield_count(yield_count_ - node->first_yield_id());
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 } 646 }
640 647
641 648
642 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 649 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
643 FunctionLiteral* function) { 650 FunctionLiteral* function) {
644 AstNumberingVisitor visitor(isolate, zone); 651 AstNumberingVisitor visitor(isolate, zone);
645 return visitor.Renumber(function); 652 return visitor.Renumber(function);
646 } 653 }
647 } // namespace internal 654 } // namespace internal
648 } // namespace v8 655 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698