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

Side by Side Diff: src/parsing/preparser.h

Issue 1708193003: Reduce the memory footprint of expression classifiers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« src/parsing/parser-base.h ('K') | « src/parsing/parser-base.h ('k') | no next file » | 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_PARSING_PREPARSER_H 5 #ifndef V8_PARSING_PREPARSER_H
6 #define V8_PARSING_PREPARSER_H 6 #define V8_PARSING_PREPARSER_H
7 7
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/hashmap.h" 10 #include "src/hashmap.h"
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 inline void QueueNonPatternForRewriting(PreParserExpression) {} 927 inline void QueueNonPatternForRewriting(PreParserExpression) {}
928 928
929 void SetFunctionNameFromPropertyName(PreParserExpression, 929 void SetFunctionNameFromPropertyName(PreParserExpression,
930 PreParserIdentifier) {} 930 PreParserIdentifier) {}
931 void SetFunctionNameFromIdentifierRef(PreParserExpression, 931 void SetFunctionNameFromIdentifierRef(PreParserExpression,
932 PreParserExpression) {} 932 PreParserExpression) {}
933 933
934 inline void RewriteNonPattern(Type::ExpressionClassifier* classifier, 934 inline void RewriteNonPattern(Type::ExpressionClassifier* classifier,
935 bool* ok); 935 bool* ok);
936 936
937 V8_INLINE ZoneList<typename Type::ExpressionClassifier::Error>*
938 GetReportedErrorList() const;
937 V8_INLINE Zone* zone() const; 939 V8_INLINE Zone* zone() const;
938 V8_INLINE ZoneList<PreParserExpression>* GetNonPatternList() const; 940 V8_INLINE ZoneList<PreParserExpression>* GetNonPatternList() const;
939 941
940 inline PreParserExpression RewriteYieldStar( 942 inline PreParserExpression RewriteYieldStar(
941 PreParserExpression generator, PreParserExpression expr, int pos); 943 PreParserExpression generator, PreParserExpression expr, int pos);
942 944
943 private: 945 private:
944 PreParser* pre_parser_; 946 PreParser* pre_parser_;
945 }; 947 };
946 948
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 return pre_parser_->ParseDoExpression(ok); 1122 return pre_parser_->ParseDoExpression(ok);
1121 } 1123 }
1122 1124
1123 1125
1124 void PreParserTraits::RewriteNonPattern(Type::ExpressionClassifier* classifier, 1126 void PreParserTraits::RewriteNonPattern(Type::ExpressionClassifier* classifier,
1125 bool* ok) { 1127 bool* ok) {
1126 pre_parser_->ValidateExpression(classifier, ok); 1128 pre_parser_->ValidateExpression(classifier, ok);
1127 } 1129 }
1128 1130
1129 1131
1132 ZoneList<typename PreParserTraits::Type::ExpressionClassifier::Error>*
1133 PreParserTraits::GetReportedErrorList() const {
1134 return pre_parser_->function_state_->GetReportedErrorList();
1135 }
1136
1137
1130 Zone* PreParserTraits::zone() const { 1138 Zone* PreParserTraits::zone() const {
1131 return pre_parser_->function_state_->scope()->zone(); 1139 return pre_parser_->function_state_->scope()->zone();
1132 } 1140 }
1133 1141
1134 1142
1135 ZoneList<PreParserExpression>* PreParserTraits::GetNonPatternList() const { 1143 ZoneList<PreParserExpression>* PreParserTraits::GetNonPatternList() const {
1136 return pre_parser_->function_state_->non_patterns_to_rewrite(); 1144 return pre_parser_->function_state_->non_patterns_to_rewrite();
1137 } 1145 }
1138 1146
1139 1147
(...skipping 23 matching lines...) Expand all
1163 const PreParserFormalParameters& parameters, FunctionKind kind, 1171 const PreParserFormalParameters& parameters, FunctionKind kind,
1164 FunctionLiteral::FunctionType function_type, bool* ok) { 1172 FunctionLiteral::FunctionType function_type, bool* ok) {
1165 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, 1173 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters,
1166 kind, function_type, ok); 1174 kind, function_type, ok);
1167 } 1175 }
1168 1176
1169 } // namespace internal 1177 } // namespace internal
1170 } // namespace v8 1178 } // namespace v8
1171 1179
1172 #endif // V8_PARSING_PREPARSER_H 1180 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« src/parsing/parser-base.h ('K') | « src/parsing/parser-base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698