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

Side by Side Diff: src/ast/ast.h

Issue 2534883004: [fullcodegen] Remove for-of iteration support. (Closed)
Patch Set: 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 | « no previous file | src/compiler/ast-graph-builder.cc » ('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 #ifndef V8_AST_AST_H_ 5 #ifndef V8_AST_AST_H_
6 #define V8_AST_AST_H_ 6 #define V8_AST_AST_H_
7 7
8 #include "src/ast/ast-types.h" 8 #include "src/ast/ast-types.h"
9 #include "src/ast/ast-value-factory.h" 9 #include "src/ast/ast-value-factory.h"
10 #include "src/ast/modules.h" 10 #include "src/ast/modules.h"
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 // each = result.value 819 // each = result.value
820 Expression* assign_each() const { 820 Expression* assign_each() const {
821 return assign_each_; 821 return assign_each_;
822 } 822 }
823 823
824 void set_assign_iterator(Expression* e) { assign_iterator_ = e; } 824 void set_assign_iterator(Expression* e) { assign_iterator_ = e; }
825 void set_next_result(Expression* e) { next_result_ = e; } 825 void set_next_result(Expression* e) { next_result_ = e; }
826 void set_result_done(Expression* e) { result_done_ = e; } 826 void set_result_done(Expression* e) { result_done_ = e; }
827 void set_assign_each(Expression* e) { assign_each_ = e; } 827 void set_assign_each(Expression* e) { assign_each_ = e; }
828 828
829 BailoutId ContinueId() const { return EntryId(); }
830 BailoutId StackCheckId() const { return BackEdgeId(); }
831
832 static int num_ids() { return parent_num_ids() + 1; }
833 BailoutId BackEdgeId() const { return BailoutId(local_id(0)); }
834
835 private: 829 private:
836 friend class AstNodeFactory; 830 friend class AstNodeFactory;
837 831
838 ForOfStatement(ZoneList<const AstRawString*>* labels, int pos) 832 ForOfStatement(ZoneList<const AstRawString*>* labels, int pos)
839 : ForEachStatement(labels, pos, kForOfStatement), 833 : ForEachStatement(labels, pos, kForOfStatement),
840 iterator_(NULL), 834 iterator_(NULL),
841 assign_iterator_(NULL), 835 assign_iterator_(NULL),
842 next_result_(NULL), 836 next_result_(NULL),
843 result_done_(NULL), 837 result_done_(NULL),
844 assign_each_(NULL) {} 838 assign_each_(NULL) {}
845 static int parent_num_ids() { return ForEachStatement::num_ids(); }
846 int local_id(int n) const { return base_id() + parent_num_ids() + n; }
847 839
848 Variable* iterator_; 840 Variable* iterator_;
849 Expression* assign_iterator_; 841 Expression* assign_iterator_;
850 Expression* next_result_; 842 Expression* next_result_;
851 Expression* result_done_; 843 Expression* result_done_;
852 Expression* assign_each_; 844 Expression* assign_each_;
853 }; 845 };
854 846
855 847
856 class ExpressionStatement final : public Statement { 848 class ExpressionStatement final : public Statement {
(...skipping 2756 matching lines...) Expand 10 before | Expand all | Expand 10 after
3613 : NULL; \ 3605 : NULL; \
3614 } 3606 }
3615 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) 3607 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS)
3616 #undef DECLARE_NODE_FUNCTIONS 3608 #undef DECLARE_NODE_FUNCTIONS
3617 3609
3618 3610
3619 } // namespace internal 3611 } // namespace internal
3620 } // namespace v8 3612 } // namespace v8
3621 3613
3622 #endif // V8_AST_AST_H_ 3614 #endif // V8_AST_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698