OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #include "vm/parser.h" | 5 #include "vm/parser.h" |
6 #include "vm/flags.h" | 6 #include "vm/flags.h" |
7 | 7 |
8 #ifndef DART_PRECOMPILED_RUNTIME | 8 #ifndef DART_PRECOMPILED_RUNTIME |
9 | 9 |
10 #include "lib/invocation_mirror.h" | 10 #include "lib/invocation_mirror.h" |
(...skipping 2446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2457 | 2457 |
2458 StaticCallNode* Parser::ParseSuperInitializer(const Class& cls, | 2458 StaticCallNode* Parser::ParseSuperInitializer(const Class& cls, |
2459 LocalVariable* receiver) { | 2459 LocalVariable* receiver) { |
2460 TRACE_PARSER("ParseSuperInitializer"); | 2460 TRACE_PARSER("ParseSuperInitializer"); |
2461 ASSERT(CurrentToken() == Token::kSUPER); | 2461 ASSERT(CurrentToken() == Token::kSUPER); |
2462 const TokenPosition supercall_pos = TokenPos(); | 2462 const TokenPosition supercall_pos = TokenPos(); |
2463 ConsumeToken(); | 2463 ConsumeToken(); |
2464 const Class& super_class = Class::Handle(Z, cls.SuperClass()); | 2464 const Class& super_class = Class::Handle(Z, cls.SuperClass()); |
2465 ASSERT(!super_class.IsNull()); | 2465 ASSERT(!super_class.IsNull()); |
2466 String& ctor_name = String::Handle(Z, super_class.Name()); | 2466 String& ctor_name = String::Handle(Z, super_class.Name()); |
2467 ctor_name = String::Concat(ctor_name, Symbols::Dot()); | 2467 ctor_name = Symbols::FromConcat(T, ctor_name, Symbols::Dot()); |
2468 if (CurrentToken() == Token::kPERIOD) { | 2468 if (CurrentToken() == Token::kPERIOD) { |
2469 ConsumeToken(); | 2469 ConsumeToken(); |
2470 ctor_name = Symbols::FromConcat(T, | 2470 ctor_name = Symbols::FromConcat(T, |
2471 ctor_name, *ExpectIdentifier("constructor name expected")); | 2471 ctor_name, *ExpectIdentifier("constructor name expected")); |
2472 } | 2472 } |
2473 CheckToken(Token::kLPAREN, "parameter list expected"); | 2473 CheckToken(Token::kLPAREN, "parameter list expected"); |
2474 | 2474 |
2475 ArgumentListNode* arguments = new ArgumentListNode(supercall_pos); | 2475 ArgumentListNode* arguments = new ArgumentListNode(supercall_pos); |
2476 // 'this' parameter is the first argument to super class constructor. | 2476 // 'this' parameter is the first argument to super class constructor. |
2477 AstNode* implicit_argument = new LoadLocalNode(supercall_pos, receiver); | 2477 AstNode* implicit_argument = new LoadLocalNode(supercall_pos, receiver); |
(...skipping 11998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14476 const ArgumentListNode& function_args, | 14476 const ArgumentListNode& function_args, |
14477 const LocalVariable* temp_for_last_arg, | 14477 const LocalVariable* temp_for_last_arg, |
14478 bool is_super_invocation) { | 14478 bool is_super_invocation) { |
14479 UNREACHABLE(); | 14479 UNREACHABLE(); |
14480 return NULL; | 14480 return NULL; |
14481 } | 14481 } |
14482 | 14482 |
14483 } // namespace dart | 14483 } // namespace dart |
14484 | 14484 |
14485 #endif // DART_PRECOMPILED_RUNTIME | 14485 #endif // DART_PRECOMPILED_RUNTIME |
OLD | NEW |