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

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

Issue 1630523002: [turbofan] Switch JSForInPrepare to %ForInPrepare style. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 | « 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/assembler.h" 8 #include "src/assembler.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 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 855
856 FeedbackVectorSlot ForInFeedbackSlot() { 856 FeedbackVectorSlot ForInFeedbackSlot() {
857 DCHECK(!for_in_feedback_slot_.IsInvalid()); 857 DCHECK(!for_in_feedback_slot_.IsInvalid());
858 return for_in_feedback_slot_; 858 return for_in_feedback_slot_;
859 } 859 }
860 860
861 enum ForInType { FAST_FOR_IN, SLOW_FOR_IN }; 861 enum ForInType { FAST_FOR_IN, SLOW_FOR_IN };
862 ForInType for_in_type() const { return for_in_type_; } 862 ForInType for_in_type() const { return for_in_type_; }
863 void set_for_in_type(ForInType type) { for_in_type_ = type; } 863 void set_for_in_type(ForInType type) { for_in_type_ = type; }
864 864
865 static int num_ids() { return parent_num_ids() + 5; } 865 static int num_ids() { return parent_num_ids() + 6; }
866 BailoutId BodyId() const { return BailoutId(local_id(0)); } 866 BailoutId BodyId() const { return BailoutId(local_id(0)); }
867 BailoutId EnumId() const { return BailoutId(local_id(1)); } 867 BailoutId EnumId() const { return BailoutId(local_id(1)); }
868 BailoutId ToObjectId() const { return BailoutId(local_id(2)); } 868 BailoutId ToObjectId() const { return BailoutId(local_id(2)); }
869 BailoutId FilterId() const { return BailoutId(local_id(3)); } 869 BailoutId PrepareId() const { return BailoutId(local_id(3)); }
870 BailoutId AssignmentId() const { return BailoutId(local_id(4)); } 870 BailoutId FilterId() const { return BailoutId(local_id(4)); }
871 BailoutId AssignmentId() const { return BailoutId(local_id(5)); }
871 BailoutId ContinueId() const override { return EntryId(); } 872 BailoutId ContinueId() const override { return EntryId(); }
872 BailoutId StackCheckId() const override { return BodyId(); } 873 BailoutId StackCheckId() const override { return BodyId(); }
873 874
874 protected: 875 protected:
875 ForInStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos) 876 ForInStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos)
876 : ForEachStatement(zone, labels, pos), for_in_type_(SLOW_FOR_IN) {} 877 : ForEachStatement(zone, labels, pos), for_in_type_(SLOW_FOR_IN) {}
877 static int parent_num_ids() { return ForEachStatement::num_ids(); } 878 static int parent_num_ids() { return ForEachStatement::num_ids(); }
878 879
879 private: 880 private:
880 int local_id(int n) const { return base_id() + parent_num_ids() + n; } 881 int local_id(int n) const { return base_id() + parent_num_ids() + n; }
(...skipping 2667 matching lines...) Expand 10 before | Expand all | Expand 10 after
3548 // the parser-level zone. 3549 // the parser-level zone.
3549 Zone* parser_zone_; 3550 Zone* parser_zone_;
3550 AstValueFactory* ast_value_factory_; 3551 AstValueFactory* ast_value_factory_;
3551 }; 3552 };
3552 3553
3553 3554
3554 } // namespace internal 3555 } // namespace internal
3555 } // namespace v8 3556 } // namespace v8
3556 3557
3557 #endif // V8_AST_AST_H_ 3558 #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