| 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/class_finalizer.h" | 5 #include "vm/class_finalizer.h" |
| 6 | 6 |
| 7 #include "vm/flags.h" | 7 #include "vm/flags.h" |
| 8 #include "vm/heap.h" | 8 #include "vm/heap.h" |
| 9 #include "vm/isolate.h" | 9 #include "vm/isolate.h" |
| 10 #include "vm/longjump.h" | 10 #include "vm/longjump.h" |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 } | 429 } |
| 430 ResolveType(cls, type, kCanonicalize); | 430 ResolveType(cls, type, kCanonicalize); |
| 431 type ^= FinalizeType(cls, type, kCanonicalize); | 431 type ^= FinalizeType(cls, type, kCanonicalize); |
| 432 factory.SetRedirectionType(type); | 432 factory.SetRedirectionType(type); |
| 433 if (type.IsMalformed()) { | 433 if (type.IsMalformed()) { |
| 434 ASSERT(factory.RedirectionTarget() == Function::null()); | 434 ASSERT(factory.RedirectionTarget() == Function::null()); |
| 435 return; | 435 return; |
| 436 } | 436 } |
| 437 const Class& target_class = Class::Handle(type.type_class()); | 437 const Class& target_class = Class::Handle(type.type_class()); |
| 438 String& target_class_name = String::Handle(target_class.Name()); | 438 String& target_class_name = String::Handle(target_class.Name()); |
| 439 const String& period = String::Handle(Symbols::Dot()); | |
| 440 String& target_name = String::Handle( | 439 String& target_name = String::Handle( |
| 441 String::Concat(target_class_name, period)); | 440 String::Concat(target_class_name, Symbols::DotHandle())); |
| 442 const String& identifier = String::Handle(factory.RedirectionIdentifier()); | 441 const String& identifier = String::Handle(factory.RedirectionIdentifier()); |
| 443 if (!identifier.IsNull()) { | 442 if (!identifier.IsNull()) { |
| 444 target_name = String::Concat(target_name, identifier); | 443 target_name = String::Concat(target_name, identifier); |
| 445 } | 444 } |
| 446 | 445 |
| 447 // Verify that the target constructor of the redirection exists. | 446 // Verify that the target constructor of the redirection exists. |
| 448 target = target_class.LookupConstructor(target_name); | 447 target = target_class.LookupConstructor(target_name); |
| 449 if (target.IsNull()) { | 448 if (target.IsNull()) { |
| 450 target = target_class.LookupFactory(target_name); | 449 target = target_class.LookupFactory(target_name); |
| 451 } | 450 } |
| (...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1583 void ClassFinalizer::ReportError(const char* format, ...) { | 1582 void ClassFinalizer::ReportError(const char* format, ...) { |
| 1584 va_list args; | 1583 va_list args; |
| 1585 va_start(args, format); | 1584 va_start(args, format); |
| 1586 const Error& error = Error::Handle( | 1585 const Error& error = Error::Handle( |
| 1587 Parser::FormatError(Script::Handle(), -1, "Error", format, args)); | 1586 Parser::FormatError(Script::Handle(), -1, "Error", format, args)); |
| 1588 va_end(args); | 1587 va_end(args); |
| 1589 ReportError(error); | 1588 ReportError(error); |
| 1590 } | 1589 } |
| 1591 | 1590 |
| 1592 } // namespace dart | 1591 } // namespace dart |
| OLD | NEW |