OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_PARSER_H_ | 5 #ifndef VM_PARSER_H_ |
6 #define VM_PARSER_H_ | 6 #define VM_PARSER_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 | 9 |
10 #include "vm/ast.h" | 10 #include "vm/ast.h" |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 ParamList* params); | 214 ParamList* params); |
215 void ParseFormalParameters(bool allow_explicit_default_values, | 215 void ParseFormalParameters(bool allow_explicit_default_values, |
216 ParamList* params); | 216 ParamList* params); |
217 void ParseFormalParameterList(bool allow_explicit_default_values, | 217 void ParseFormalParameterList(bool allow_explicit_default_values, |
218 ParamList* params); | 218 ParamList* params); |
219 void ParseNamedFormalParameters(bool are_implicitly_const, ParamList* params); | 219 void ParseNamedFormalParameters(bool are_implicitly_const, ParamList* params); |
220 void CheckConstFieldsInitialized(const Class& cls); | 220 void CheckConstFieldsInitialized(const Class& cls); |
221 void CheckConstructors(ClassDesc* members); | 221 void CheckConstructors(ClassDesc* members); |
222 void ParseInitializedInstanceFields(const Class& cls, | 222 void ParseInitializedInstanceFields(const Class& cls, |
223 GrowableArray<FieldInitExpression>* initializers); | 223 GrowableArray<FieldInitExpression>* initializers); |
224 void GenerateSuperInitializerCall(const Class& cls, LocalVariable* receiver); | 224 void GenerateSuperConstructorCall(const Class& cls, |
| 225 LocalVariable* receiver); |
225 AstNode* ParseSuperInitializer(const Class& cls, LocalVariable* receiver); | 226 AstNode* ParseSuperInitializer(const Class& cls, LocalVariable* receiver); |
226 AstNode* ParseInitializer(const Class& cls, LocalVariable* receiver); | 227 AstNode* ParseInitializer(const Class& cls, LocalVariable* receiver); |
227 void ParseConstructorRedirection(const Class& cls, LocalVariable* receiver); | 228 void ParseConstructorRedirection(const Class& cls, LocalVariable* receiver); |
228 void ParseInitializers(const Class& cls); | 229 void ParseInitializers(const Class& cls, LocalVariable* receiver); |
229 String& ParseNativeDeclaration(); | 230 String& ParseNativeDeclaration(); |
230 RawArray* ParseInterfaceList(); | 231 RawArray* ParseInterfaceList(); |
231 void AddInterfaces(intptr_t interfaces_pos, | 232 void AddInterfaces(intptr_t interfaces_pos, |
232 const Class& cls, | 233 const Class& cls, |
233 const Array& interfaces); | 234 const Array& interfaces); |
234 RawFunction* GetSuperFunction(intptr_t token_pos, const String& name); | 235 RawFunction* GetSuperFunction(intptr_t token_pos, const String& name); |
235 AstNode* ParseSuperCall(const String& function_name); | 236 AstNode* ParseSuperCall(const String& function_name); |
236 AstNode* ParseSuperFieldAccess(const String& field_name); | 237 AstNode* ParseSuperFieldAccess(const String& field_name); |
237 AstNode* ParseSuperOperator(); | 238 AstNode* ParseSuperOperator(); |
238 | 239 |
(...skipping 13 matching lines...) Expand all Loading... |
252 SequenceNode* ParseInstanceGetter(const Function& func); | 253 SequenceNode* ParseInstanceGetter(const Function& func); |
253 SequenceNode* ParseInstanceSetter(const Function& func); | 254 SequenceNode* ParseInstanceSetter(const Function& func); |
254 SequenceNode* ParseStaticConstGetter(const Function& func); | 255 SequenceNode* ParseStaticConstGetter(const Function& func); |
255 | 256 |
256 void ChainNewBlock(LocalScope* outer_scope); | 257 void ChainNewBlock(LocalScope* outer_scope); |
257 void OpenBlock(); | 258 void OpenBlock(); |
258 void OpenLoopBlock(); | 259 void OpenLoopBlock(); |
259 void OpenFunctionBlock(const Function& func); | 260 void OpenFunctionBlock(const Function& func); |
260 SequenceNode* CloseBlock(); | 261 SequenceNode* CloseBlock(); |
261 | 262 |
| 263 LocalVariable* LookupPhaseParameter(); |
262 LocalVariable* LookupReceiver(LocalScope* from_scope, bool test_only); | 264 LocalVariable* LookupReceiver(LocalScope* from_scope, bool test_only); |
263 void CaptureReceiver(); | 265 void CaptureReceiver(); |
264 AstNode* LoadReceiver(intptr_t token_index); | 266 AstNode* LoadReceiver(intptr_t token_index); |
265 AstNode* CallGetter(intptr_t token_index, | 267 AstNode* CallGetter(intptr_t token_index, |
266 AstNode* object, | 268 AstNode* object, |
267 const String& name); | 269 const String& name); |
268 | 270 |
269 AstNode* ParseAssertStatement(); | 271 AstNode* ParseAssertStatement(); |
270 AstNode* ParseJump(String* label_name); | 272 AstNode* ParseJump(String* label_name); |
271 AstNode* ParseIfStatement(String* label_name); | 273 AstNode* ParseIfStatement(String* label_name); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 AstNode* ParseMapLiteral(intptr_t type_pos, | 340 AstNode* ParseMapLiteral(intptr_t type_pos, |
339 bool is_const, | 341 bool is_const, |
340 const TypeArguments& type_arguments); | 342 const TypeArguments& type_arguments); |
341 AstNode* ParseNewOperator(); | 343 AstNode* ParseNewOperator(); |
342 | 344 |
343 const Array* BuildArgumentsDescriptor( | 345 const Array* BuildArgumentsDescriptor( |
344 int num_args, | 346 int num_args, |
345 GrowableArray<const String*>& named_argument_names, | 347 GrowableArray<const String*>& named_argument_names, |
346 GrowableArray<const Smi*>& named_argument_positions); | 348 GrowableArray<const Smi*>& named_argument_positions); |
347 // An implicit argument, if non-null, is prepended to the returned list. | 349 // An implicit argument, if non-null, is prepended to the returned list. |
348 ArgumentListNode* ParseActualParameters(AstNode* implicit_argument, | 350 ArgumentListNode* ParseActualParameters(ArgumentListNode* implicit_arguments, |
349 bool require_const); | 351 bool require_const); |
350 AstNode* ParseStaticCall(const Class& cls, | 352 AstNode* ParseStaticCall(const Class& cls, |
351 const String& method_name, | 353 const String& method_name, |
352 intptr_t ident_pos); | 354 intptr_t ident_pos); |
353 AstNode* ParseInstanceCall(AstNode* receiver, const String& method_name); | 355 AstNode* ParseInstanceCall(AstNode* receiver, const String& method_name); |
354 AstNode* ParseClosureCall(AstNode* closure); | 356 AstNode* ParseClosureCall(AstNode* closure); |
355 AstNode* ParseInstanceFieldAccess(AstNode* receiver, | 357 AstNode* ParseInstanceFieldAccess(AstNode* receiver, |
356 const String& field_name); | 358 const String& field_name); |
357 AstNode* GenerateStaticFieldLookup(const Field& field, | 359 AstNode* GenerateStaticFieldLookup(const Field& field, |
358 intptr_t ident_pos); | 360 intptr_t ident_pos); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 TryBlocks* try_blocks_list_; | 442 TryBlocks* try_blocks_list_; |
441 | 443 |
442 char error_msg_[kErrorBuflen]; | 444 char error_msg_[kErrorBuflen]; |
443 | 445 |
444 DISALLOW_COPY_AND_ASSIGN(Parser); | 446 DISALLOW_COPY_AND_ASSIGN(Parser); |
445 }; | 447 }; |
446 | 448 |
447 } // namespace dart | 449 } // namespace dart |
448 | 450 |
449 #endif // VM_PARSER_H_ | 451 #endif // VM_PARSER_H_ |
OLD | NEW |