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

Side by Side Diff: src/parsing/pattern-rewriter.cc

Issue 2655853010: [TypeFeedbackVector] Combine the literals array and the feedback vector. (Closed)
Patch Set: more comments. Created 3 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
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/parsing/preparser.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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.h" 5 #include "src/ast/ast.h"
6 #include "src/messages.h" 6 #include "src/messages.h"
7 #include "src/objects-inl.h" 7 #include "src/objects-inl.h"
8 #include "src/parsing/parameter-initializer-rewriter.h" 8 #include "src/parsing/parameter-initializer-rewriter.h"
9 #include "src/parsing/parser.h" 9 #include "src/parsing/parser.h"
10 10
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 // if (!result.done) { 555 // if (!result.done) {
556 // %AppendElement(array, result.value); 556 // %AppendElement(array, result.value);
557 // done = false; 557 // done = false;
558 // } 558 // }
559 // } 559 // }
560 560
561 // let array = []; 561 // let array = [];
562 Variable* array; 562 Variable* array;
563 { 563 {
564 auto empty_exprs = new (zone()) ZoneList<Expression*>(0, zone()); 564 auto empty_exprs = new (zone()) ZoneList<Expression*>(0, zone());
565 array = CreateTempVar(factory()->NewArrayLiteral( 565 array = CreateTempVar(
566 empty_exprs, 566 factory()->NewArrayLiteral(empty_exprs, kNoSourcePosition));
567 // Reuse pattern's literal index - it is unused since there is no
568 // actual literal allocated.
569 node->literal_index(), kNoSourcePosition));
570 } 567 }
571 568
572 // done = true; 569 // done = true;
573 Statement* set_done = factory()->NewExpressionStatement( 570 Statement* set_done = factory()->NewExpressionStatement(
574 factory()->NewAssignment( 571 factory()->NewAssignment(
575 Token::ASSIGN, factory()->NewVariableProxy(done), 572 Token::ASSIGN, factory()->NewVariableProxy(done),
576 factory()->NewBooleanLiteral(true, nopos), nopos), 573 factory()->NewBooleanLiteral(true, nopos), nopos),
577 nopos); 574 nopos);
578 575
579 // result = IteratorNext(iterator); 576 // result = IteratorNext(iterator);
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 NOT_A_PATTERN(TryFinallyStatement) 746 NOT_A_PATTERN(TryFinallyStatement)
750 NOT_A_PATTERN(UnaryOperation) 747 NOT_A_PATTERN(UnaryOperation)
751 NOT_A_PATTERN(VariableDeclaration) 748 NOT_A_PATTERN(VariableDeclaration)
752 NOT_A_PATTERN(WhileStatement) 749 NOT_A_PATTERN(WhileStatement)
753 NOT_A_PATTERN(WithStatement) 750 NOT_A_PATTERN(WithStatement)
754 NOT_A_PATTERN(Yield) 751 NOT_A_PATTERN(Yield)
755 752
756 #undef NOT_A_PATTERN 753 #undef NOT_A_PATTERN
757 } // namespace internal 754 } // namespace internal
758 } // namespace v8 755 } // namespace v8
OLDNEW
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/parsing/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698