OLD | NEW |
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_PARSER_BASE_H | 5 #ifndef V8_PARSING_PARSER_BASE_H |
6 #define V8_PARSING_PARSER_BASE_H | 6 #define V8_PARSING_PARSER_BASE_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/base/hashmap.h" | 10 #include "src/base/hashmap.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // The ParserTypes structure encapsulates the differences in the | 168 // The ParserTypes structure encapsulates the differences in the |
169 // types used in parsing methods. E.g., Parser methods use Expression* | 169 // types used in parsing methods. E.g., Parser methods use Expression* |
170 // and PreParser methods use PreParserExpression. For any given parser | 170 // and PreParser methods use PreParserExpression. For any given parser |
171 // implementation class Impl, it is expected to contain the following typedefs: | 171 // implementation class Impl, it is expected to contain the following typedefs: |
172 // | 172 // |
173 // template <> | 173 // template <> |
174 // struct ParserTypes<Impl> { | 174 // struct ParserTypes<Impl> { |
175 // // Synonyms for ParserBase<Impl> and Impl, respectively. | 175 // // Synonyms for ParserBase<Impl> and Impl, respectively. |
176 // typedef Base; | 176 // typedef Base; |
177 // typedef Impl; | 177 // typedef Impl; |
178 // // TODO(nikolaos): these two will probably go away, as they are | 178 // // TODO(nikolaos): this one will probably go away, as it is |
179 // // not related to pure parsing. | 179 // // not related to pure parsing. |
180 // typedef GeneratorVariable; | 180 // typedef GeneratorVariable; |
181 // typedef AstProperties; | |
182 // // Return types for traversing functions. | 181 // // Return types for traversing functions. |
183 // typedef Identifier; | 182 // typedef Identifier; |
184 // typedef Expression; | 183 // typedef Expression; |
185 // typedef YieldExpression; | |
186 // typedef FunctionLiteral; | 184 // typedef FunctionLiteral; |
187 // typedef ClassLiteral; | |
188 // typedef Literal; | |
189 // typedef ObjectLiteralProperty; | 185 // typedef ObjectLiteralProperty; |
190 // typedef ExpressionList; | 186 // typedef ExpressionList; |
191 // typedef PropertyList; | 187 // typedef PropertyList; |
192 // typedef FormalParameter; | |
193 // typedef FormalParameters; | 188 // typedef FormalParameters; |
194 // typedef StatementList; | 189 // typedef StatementList; |
| 190 // typedef Block; |
195 // // For constructing objects returned by the traversing functions. | 191 // // For constructing objects returned by the traversing functions. |
196 // typedef Factory; | 192 // typedef Factory; |
197 // }; | 193 // }; |
198 | 194 |
199 template <typename Impl> | 195 template <typename Impl> |
200 struct ParserTypes; | 196 struct ParserTypes; |
201 | 197 |
202 template <typename Impl> | 198 template <typename Impl> |
203 class ParserBase { | 199 class ParserBase { |
204 public: | 200 public: |
205 // Shorten type names defined by ParserTypes<Impl>. | 201 // Shorten type names defined by ParserTypes<Impl>. |
206 typedef ParserTypes<Impl> Types; | 202 typedef ParserTypes<Impl> Types; |
| 203 typedef typename Types::Identifier IdentifierT; |
207 typedef typename Types::Expression ExpressionT; | 204 typedef typename Types::Expression ExpressionT; |
208 typedef typename Types::Identifier IdentifierT; | 205 typedef typename Types::FunctionLiteral FunctionLiteralT; |
209 typedef typename Types::FormalParameter FormalParameterT; | 206 typedef typename Types::ObjectLiteralProperty ObjectLiteralPropertyT; |
| 207 typedef typename Types::ExpressionList ExpressionListT; |
| 208 typedef typename Types::PropertyList PropertyListT; |
210 typedef typename Types::FormalParameters FormalParametersT; | 209 typedef typename Types::FormalParameters FormalParametersT; |
211 typedef typename Types::FunctionLiteral FunctionLiteralT; | |
212 typedef typename Types::Literal LiteralT; | |
213 typedef typename Types::ObjectLiteralProperty ObjectLiteralPropertyT; | |
214 typedef typename Types::StatementList StatementListT; | 210 typedef typename Types::StatementList StatementListT; |
| 211 typedef typename Types::Block BlockT; |
215 typedef typename v8::internal::ExpressionClassifier<Types> | 212 typedef typename v8::internal::ExpressionClassifier<Types> |
216 ExpressionClassifier; | 213 ExpressionClassifier; |
217 typedef typename Types::Block BlockT; | |
218 | 214 |
219 // All implementation-specific methods must be called through this. | 215 // All implementation-specific methods must be called through this. |
220 Impl* impl() { return static_cast<Impl*>(this); } | 216 Impl* impl() { return static_cast<Impl*>(this); } |
221 const Impl* impl() const { return static_cast<const Impl*>(this); } | 217 const Impl* impl() const { return static_cast<const Impl*>(this); } |
222 | 218 |
223 ParserBase(Zone* zone, Scanner* scanner, uintptr_t stack_limit, | 219 ParserBase(Zone* zone, Scanner* scanner, uintptr_t stack_limit, |
224 v8::Extension* extension, AstValueFactory* ast_value_factory, | 220 v8::Extension* extension, AstValueFactory* ast_value_factory, |
225 ParserRecorder* log) | 221 ParserRecorder* log) |
226 : scope_state_(nullptr), | 222 : scope_state_(nullptr), |
227 function_state_(nullptr), | 223 function_state_(nullptr), |
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 ExpressionT ParsePropertyName(IdentifierT* name, PropertyKind* kind, | 1134 ExpressionT ParsePropertyName(IdentifierT* name, PropertyKind* kind, |
1139 bool in_class, bool* is_generator, bool* is_get, | 1135 bool in_class, bool* is_generator, bool* is_get, |
1140 bool* is_set, bool* is_async, bool* is_static, | 1136 bool* is_set, bool* is_async, bool* is_static, |
1141 bool* is_computed_name, bool* ok); | 1137 bool* is_computed_name, bool* ok); |
1142 | 1138 |
1143 ExpressionT ParseObjectLiteral(bool* ok); | 1139 ExpressionT ParseObjectLiteral(bool* ok); |
1144 ObjectLiteralPropertyT ParsePropertyDefinition( | 1140 ObjectLiteralPropertyT ParsePropertyDefinition( |
1145 ObjectLiteralCheckerBase* checker, bool in_class, bool has_extends, | 1141 ObjectLiteralCheckerBase* checker, bool in_class, bool has_extends, |
1146 bool* is_computed_name, bool* has_seen_constructor, IdentifierT* name, | 1142 bool* is_computed_name, bool* has_seen_constructor, IdentifierT* name, |
1147 bool* ok); | 1143 bool* ok); |
1148 typename Types::ExpressionList ParseArguments( | 1144 ExpressionListT ParseArguments(Scanner::Location* first_spread_pos, |
1149 Scanner::Location* first_spread_pos, bool maybe_arrow, bool* ok); | 1145 bool maybe_arrow, bool* ok); |
1150 typename Types::ExpressionList ParseArguments( | 1146 ExpressionListT ParseArguments(Scanner::Location* first_spread_pos, |
1151 Scanner::Location* first_spread_pos, bool* ok) { | 1147 bool* ok) { |
1152 return ParseArguments(first_spread_pos, false, ok); | 1148 return ParseArguments(first_spread_pos, false, ok); |
1153 } | 1149 } |
1154 | 1150 |
1155 ExpressionT ParseAssignmentExpression(bool accept_IN, bool* ok); | 1151 ExpressionT ParseAssignmentExpression(bool accept_IN, bool* ok); |
1156 ExpressionT ParseYieldExpression(bool accept_IN, bool* ok); | 1152 ExpressionT ParseYieldExpression(bool accept_IN, bool* ok); |
1157 ExpressionT ParseTailCallExpression(bool* ok); | 1153 ExpressionT ParseTailCallExpression(bool* ok); |
1158 ExpressionT ParseConditionalExpression(bool accept_IN, bool* ok); | 1154 ExpressionT ParseConditionalExpression(bool accept_IN, bool* ok); |
1159 ExpressionT ParseBinaryExpression(int prec, bool accept_IN, bool* ok); | 1155 ExpressionT ParseBinaryExpression(int prec, bool accept_IN, bool* ok); |
1160 ExpressionT ParseUnaryExpression(bool* ok); | 1156 ExpressionT ParseUnaryExpression(bool* ok); |
1161 ExpressionT ParsePostfixExpression(bool* ok); | 1157 ExpressionT ParsePostfixExpression(bool* ok); |
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1821 return result; | 1817 return result; |
1822 } | 1818 } |
1823 | 1819 |
1824 template <typename Impl> | 1820 template <typename Impl> |
1825 typename ParserBase<Impl>::ExpressionT ParserBase<Impl>::ParseArrayLiteral( | 1821 typename ParserBase<Impl>::ExpressionT ParserBase<Impl>::ParseArrayLiteral( |
1826 bool* ok) { | 1822 bool* ok) { |
1827 // ArrayLiteral :: | 1823 // ArrayLiteral :: |
1828 // '[' Expression? (',' Expression?)* ']' | 1824 // '[' Expression? (',' Expression?)* ']' |
1829 | 1825 |
1830 int pos = peek_position(); | 1826 int pos = peek_position(); |
1831 typename Types::ExpressionList values = impl()->NewExpressionList(4); | 1827 ExpressionListT values = impl()->NewExpressionList(4); |
1832 int first_spread_index = -1; | 1828 int first_spread_index = -1; |
1833 Expect(Token::LBRACK, CHECK_OK); | 1829 Expect(Token::LBRACK, CHECK_OK); |
1834 while (peek() != Token::RBRACK) { | 1830 while (peek() != Token::RBRACK) { |
1835 ExpressionT elem; | 1831 ExpressionT elem; |
1836 if (peek() == Token::COMMA) { | 1832 if (peek() == Token::COMMA) { |
1837 elem = impl()->GetLiteralTheHole(peek_position()); | 1833 elem = impl()->GetLiteralTheHole(peek_position()); |
1838 } else if (peek() == Token::ELLIPSIS) { | 1834 } else if (peek() == Token::ELLIPSIS) { |
1839 int start_pos = peek_position(); | 1835 int start_pos = peek_position(); |
1840 Consume(Token::ELLIPSIS); | 1836 Consume(Token::ELLIPSIS); |
1841 int expr_pos = peek_position(); | 1837 int expr_pos = peek_position(); |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2238 | 2234 |
2239 classifier()->RecordPatternError( | 2235 classifier()->RecordPatternError( |
2240 Scanner::Location(next_beg_pos, scanner()->location().end_pos), | 2236 Scanner::Location(next_beg_pos, scanner()->location().end_pos), |
2241 MessageTemplate::kInvalidDestructuringTarget); | 2237 MessageTemplate::kInvalidDestructuringTarget); |
2242 if (!*is_computed_name) { | 2238 if (!*is_computed_name) { |
2243 checker->CheckProperty(name_token, PropertyKind::kAccessorProperty, | 2239 checker->CheckProperty(name_token, PropertyKind::kAccessorProperty, |
2244 method_kind, | 2240 method_kind, |
2245 CHECK_OK_CUSTOM(EmptyObjectLiteralProperty)); | 2241 CHECK_OK_CUSTOM(EmptyObjectLiteralProperty)); |
2246 } | 2242 } |
2247 | 2243 |
2248 typename Types::FunctionLiteral value = impl()->ParseFunctionLiteral( | 2244 FunctionLiteralT value = impl()->ParseFunctionLiteral( |
2249 *name, scanner()->location(), kSkipFunctionNameCheck, | 2245 *name, scanner()->location(), kSkipFunctionNameCheck, |
2250 is_get ? FunctionKind::kGetterFunction | 2246 is_get ? FunctionKind::kGetterFunction |
2251 : FunctionKind::kSetterFunction, | 2247 : FunctionKind::kSetterFunction, |
2252 kNoSourcePosition, FunctionLiteral::kAccessorOrMethod, | 2248 kNoSourcePosition, FunctionLiteral::kAccessorOrMethod, |
2253 language_mode(), CHECK_OK_CUSTOM(EmptyObjectLiteralProperty)); | 2249 language_mode(), CHECK_OK_CUSTOM(EmptyObjectLiteralProperty)); |
2254 | 2250 |
2255 // Make sure the name expression is a string since we need a Name for | 2251 // Make sure the name expression is a string since we need a Name for |
2256 // Runtime_DefineAccessorPropertyUnchecked and since we can determine this | 2252 // Runtime_DefineAccessorPropertyUnchecked and since we can determine this |
2257 // statically we can skip the extra runtime check. | 2253 // statically we can skip the extra runtime check. |
2258 if (!*is_computed_name) { | 2254 if (!*is_computed_name) { |
(...skipping 14 matching lines...) Expand all Loading... |
2273 return impl()->EmptyObjectLiteralProperty(); | 2269 return impl()->EmptyObjectLiteralProperty(); |
2274 } | 2270 } |
2275 | 2271 |
2276 template <typename Impl> | 2272 template <typename Impl> |
2277 typename ParserBase<Impl>::ExpressionT ParserBase<Impl>::ParseObjectLiteral( | 2273 typename ParserBase<Impl>::ExpressionT ParserBase<Impl>::ParseObjectLiteral( |
2278 bool* ok) { | 2274 bool* ok) { |
2279 // ObjectLiteral :: | 2275 // ObjectLiteral :: |
2280 // '{' (PropertyDefinition (',' PropertyDefinition)* ','? )? '}' | 2276 // '{' (PropertyDefinition (',' PropertyDefinition)* ','? )? '}' |
2281 | 2277 |
2282 int pos = peek_position(); | 2278 int pos = peek_position(); |
2283 typename Types::PropertyList properties = impl()->NewPropertyList(4); | 2279 PropertyListT properties = impl()->NewPropertyList(4); |
2284 int number_of_boilerplate_properties = 0; | 2280 int number_of_boilerplate_properties = 0; |
2285 bool has_computed_names = false; | 2281 bool has_computed_names = false; |
2286 ObjectLiteralChecker checker(this); | 2282 ObjectLiteralChecker checker(this); |
2287 | 2283 |
2288 Expect(Token::LBRACE, CHECK_OK); | 2284 Expect(Token::LBRACE, CHECK_OK); |
2289 | 2285 |
2290 while (peek() != Token::RBRACE) { | 2286 while (peek() != Token::RBRACE) { |
2291 FuncNameInferrer::State fni_state(fni_); | 2287 FuncNameInferrer::State fni_state(fni_); |
2292 | 2288 |
2293 const bool in_class = false; | 2289 const bool in_class = false; |
(...skipping 28 matching lines...) Expand all Loading... |
2322 // Computation of literal_index must happen before pre parse bailout. | 2318 // Computation of literal_index must happen before pre parse bailout. |
2323 int literal_index = function_state_->NextMaterializedLiteralIndex(); | 2319 int literal_index = function_state_->NextMaterializedLiteralIndex(); |
2324 | 2320 |
2325 return factory()->NewObjectLiteral(properties, | 2321 return factory()->NewObjectLiteral(properties, |
2326 literal_index, | 2322 literal_index, |
2327 number_of_boilerplate_properties, | 2323 number_of_boilerplate_properties, |
2328 pos); | 2324 pos); |
2329 } | 2325 } |
2330 | 2326 |
2331 template <typename Impl> | 2327 template <typename Impl> |
2332 typename ParserBase<Impl>::Types::ExpressionList | 2328 typename ParserBase<Impl>::ExpressionListT ParserBase<Impl>::ParseArguments( |
2333 ParserBase<Impl>::ParseArguments(Scanner::Location* first_spread_arg_loc, | 2329 Scanner::Location* first_spread_arg_loc, bool maybe_arrow, bool* ok) { |
2334 bool maybe_arrow, bool* ok) { | |
2335 // Arguments :: | 2330 // Arguments :: |
2336 // '(' (AssignmentExpression)*[','] ')' | 2331 // '(' (AssignmentExpression)*[','] ')' |
2337 | 2332 |
2338 Scanner::Location spread_arg = Scanner::Location::invalid(); | 2333 Scanner::Location spread_arg = Scanner::Location::invalid(); |
2339 typename Types::ExpressionList result = impl()->NewExpressionList(4); | 2334 ExpressionListT result = impl()->NewExpressionList(4); |
2340 Expect(Token::LPAREN, CHECK_OK_CUSTOM(NullExpressionList)); | 2335 Expect(Token::LPAREN, CHECK_OK_CUSTOM(NullExpressionList)); |
2341 bool done = (peek() == Token::RPAREN); | 2336 bool done = (peek() == Token::RPAREN); |
2342 bool was_unspread = false; | 2337 bool was_unspread = false; |
2343 int unspread_sequences_count = 0; | 2338 int unspread_sequences_count = 0; |
2344 while (!done) { | 2339 while (!done) { |
2345 int start_pos = peek_position(); | 2340 int start_pos = peek_position(); |
2346 bool is_spread = Check(Token::ELLIPSIS); | 2341 bool is_spread = Check(Token::ELLIPSIS); |
2347 int expr_pos = peek_position(); | 2342 int expr_pos = peek_position(); |
2348 | 2343 |
2349 ExpressionT argument = | 2344 ExpressionT argument = |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2971 // with positions recorded for function literal and confuse debugger. | 2966 // with positions recorded for function literal and confuse debugger. |
2972 pos = peek_position(); | 2967 pos = peek_position(); |
2973 // Also the trailing parenthesis are a hint that the function will | 2968 // Also the trailing parenthesis are a hint that the function will |
2974 // be called immediately. If we happen to have parsed a preceding | 2969 // be called immediately. If we happen to have parsed a preceding |
2975 // function literal eagerly, we can also compile it eagerly. | 2970 // function literal eagerly, we can also compile it eagerly. |
2976 if (result->IsFunctionLiteral() && mode() == PARSE_EAGERLY) { | 2971 if (result->IsFunctionLiteral() && mode() == PARSE_EAGERLY) { |
2977 result->AsFunctionLiteral()->set_should_eager_compile(); | 2972 result->AsFunctionLiteral()->set_should_eager_compile(); |
2978 } | 2973 } |
2979 } | 2974 } |
2980 Scanner::Location spread_pos; | 2975 Scanner::Location spread_pos; |
2981 typename Types::ExpressionList args; | 2976 ExpressionListT args; |
2982 if (V8_UNLIKELY(is_async && impl()->IsIdentifier(result))) { | 2977 if (V8_UNLIKELY(is_async && impl()->IsIdentifier(result))) { |
2983 ExpressionClassifier async_classifier(this); | 2978 ExpressionClassifier async_classifier(this); |
2984 args = ParseArguments(&spread_pos, true, CHECK_OK); | 2979 args = ParseArguments(&spread_pos, true, CHECK_OK); |
2985 if (peek() == Token::ARROW) { | 2980 if (peek() == Token::ARROW) { |
2986 if (fni_) { | 2981 if (fni_) { |
2987 fni_->RemoveAsyncKeywordFromEnd(); | 2982 fni_->RemoveAsyncKeywordFromEnd(); |
2988 } | 2983 } |
2989 ValidateBindingPattern(CHECK_OK); | 2984 ValidateBindingPattern(CHECK_OK); |
2990 ValidateFormalParameterInitializer(CHECK_OK); | 2985 ValidateFormalParameterInitializer(CHECK_OK); |
2991 if (!classifier()->is_valid_async_arrow_formal_parameters()) { | 2986 if (!classifier()->is_valid_async_arrow_formal_parameters()) { |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3104 result = ParseSuperExpression(is_new, CHECK_OK); | 3099 result = ParseSuperExpression(is_new, CHECK_OK); |
3105 } else if (peek() == Token::PERIOD) { | 3100 } else if (peek() == Token::PERIOD) { |
3106 return ParseNewTargetExpression(CHECK_OK); | 3101 return ParseNewTargetExpression(CHECK_OK); |
3107 } else { | 3102 } else { |
3108 result = ParseMemberWithNewPrefixesExpression(is_async, CHECK_OK); | 3103 result = ParseMemberWithNewPrefixesExpression(is_async, CHECK_OK); |
3109 } | 3104 } |
3110 impl()->RewriteNonPattern(CHECK_OK); | 3105 impl()->RewriteNonPattern(CHECK_OK); |
3111 if (peek() == Token::LPAREN) { | 3106 if (peek() == Token::LPAREN) { |
3112 // NewExpression with arguments. | 3107 // NewExpression with arguments. |
3113 Scanner::Location spread_pos; | 3108 Scanner::Location spread_pos; |
3114 typename Types::ExpressionList args = | 3109 ExpressionListT args = ParseArguments(&spread_pos, CHECK_OK); |
3115 ParseArguments(&spread_pos, CHECK_OK); | |
3116 | 3110 |
3117 if (spread_pos.IsValid()) { | 3111 if (spread_pos.IsValid()) { |
3118 args = impl()->PrepareSpreadArguments(args); | 3112 args = impl()->PrepareSpreadArguments(args); |
3119 result = impl()->SpreadCallNew(result, args, new_pos); | 3113 result = impl()->SpreadCallNew(result, args, new_pos); |
3120 } else { | 3114 } else { |
3121 result = factory()->NewCallNew(result, args, new_pos); | 3115 result = factory()->NewCallNew(result, args, new_pos); |
3122 } | 3116 } |
3123 // The expression can still continue with . or [ after the arguments. | 3117 // The expression can still continue with . or [ after the arguments. |
3124 result = ParseMemberExpressionContinuation(result, is_async, CHECK_OK); | 3118 result = ParseMemberExpressionContinuation(result, is_async, CHECK_OK); |
3125 return result; | 3119 return result; |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3642 bool* ok) { | 3636 bool* ok) { |
3643 if (peek() == Token::ARROW && scanner_->HasAnyLineTerminatorBeforeNext()) { | 3637 if (peek() == Token::ARROW && scanner_->HasAnyLineTerminatorBeforeNext()) { |
3644 // ASI inserts `;` after arrow parameters if a line terminator is found. | 3638 // ASI inserts `;` after arrow parameters if a line terminator is found. |
3645 // `=> ...` is never a valid expression, so report as syntax error. | 3639 // `=> ...` is never a valid expression, so report as syntax error. |
3646 // If next token is not `=>`, it's a syntax error anyways. | 3640 // If next token is not `=>`, it's a syntax error anyways. |
3647 ReportUnexpectedTokenAt(scanner_->peek_location(), Token::ARROW); | 3641 ReportUnexpectedTokenAt(scanner_->peek_location(), Token::ARROW); |
3648 *ok = false; | 3642 *ok = false; |
3649 return impl()->EmptyExpression(); | 3643 return impl()->EmptyExpression(); |
3650 } | 3644 } |
3651 | 3645 |
3652 typename Types::StatementList body = impl()->NullStatementList(); | 3646 StatementListT body = impl()->NullStatementList(); |
3653 int num_parameters = formal_parameters.scope->num_parameters(); | 3647 int num_parameters = formal_parameters.scope->num_parameters(); |
3654 int materialized_literal_count = -1; | 3648 int materialized_literal_count = -1; |
3655 int expected_property_count = -1; | 3649 int expected_property_count = -1; |
3656 | 3650 |
3657 FunctionKind arrow_kind = is_async ? kAsyncArrowFunction : kArrowFunction; | 3651 FunctionKind arrow_kind = is_async ? kAsyncArrowFunction : kArrowFunction; |
3658 FunctionLiteral::EagerCompileHint eager_compile_hint = | 3652 FunctionLiteral::EagerCompileHint eager_compile_hint = |
3659 FunctionLiteral::kShouldLazyCompile; | 3653 FunctionLiteral::kShouldLazyCompile; |
3660 bool should_be_used_once_hint = false; | 3654 bool should_be_used_once_hint = false; |
3661 { | 3655 { |
3662 FunctionState function_state(&function_state_, &scope_state_, | 3656 FunctionState function_state(&function_state_, &scope_state_, |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3977 has_seen_constructor_ = true; | 3971 has_seen_constructor_ = true; |
3978 return; | 3972 return; |
3979 } | 3973 } |
3980 } | 3974 } |
3981 | 3975 |
3982 | 3976 |
3983 } // namespace internal | 3977 } // namespace internal |
3984 } // namespace v8 | 3978 } // namespace v8 |
3985 | 3979 |
3986 #endif // V8_PARSING_PARSER_BASE_H | 3980 #endif // V8_PARSING_PARSER_BASE_H |
OLD | NEW |