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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 if (!arguments.IsNull()) { | 735 if (!arguments.IsNull()) { |
736 type_arg = arguments.TypeAt(i); | 736 type_arg = arguments.TypeAt(i); |
737 } | 737 } |
738 ASSERT(type_arg.IsFinalized()); // Index of type parameter is adjusted. | 738 ASSERT(type_arg.IsFinalized()); // Index of type parameter is adjusted. |
739 full_arguments.SetTypeAt(offset + i, type_arg); | 739 full_arguments.SetTypeAt(offset + i, type_arg); |
740 } | 740 } |
741 if (type_class.IsSignatureClass()) { | 741 if (type_class.IsSignatureClass()) { |
742 const Function& signature_fun = | 742 const Function& signature_fun = |
743 Function::Handle(type_class.signature_function()); | 743 Function::Handle(type_class.signature_function()); |
744 ASSERT(!signature_fun.is_static()); | 744 ASSERT(!signature_fun.is_static()); |
745 const Class& sig_fun_owner = Class::Handle(signature_fun.owner()); | 745 const Class& sig_fun_owner = Class::Handle(signature_fun.Owner()); |
746 FinalizeTypeArguments(sig_fun_owner, full_arguments, finalization); | 746 FinalizeTypeArguments(sig_fun_owner, full_arguments, finalization); |
747 } else { | 747 } else { |
748 FinalizeTypeArguments(type_class, full_arguments, finalization); | 748 FinalizeTypeArguments(type_class, full_arguments, finalization); |
749 } | 749 } |
750 if (full_arguments.IsRaw(num_type_arguments)) { | 750 if (full_arguments.IsRaw(num_type_arguments)) { |
751 // The parameterized_type is raw. Set its argument vector to null, which | 751 // The parameterized_type is raw. Set its argument vector to null, which |
752 // is more efficient in type tests. | 752 // is more efficient in type tests. |
753 full_arguments = TypeArguments::null(); | 753 full_arguments = TypeArguments::null(); |
754 } else if (finalization >= kCanonicalize) { | 754 } else if (finalization >= kCanonicalize) { |
755 // FinalizeTypeArguments can modify 'full_arguments', | 755 // FinalizeTypeArguments can modify 'full_arguments', |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1504 void ClassFinalizer::ReportError(const char* format, ...) { | 1504 void ClassFinalizer::ReportError(const char* format, ...) { |
1505 va_list args; | 1505 va_list args; |
1506 va_start(args, format); | 1506 va_start(args, format); |
1507 const Error& error = Error::Handle( | 1507 const Error& error = Error::Handle( |
1508 Parser::FormatError(Script::Handle(), -1, "Error", format, args)); | 1508 Parser::FormatError(Script::Handle(), -1, "Error", format, args)); |
1509 va_end(args); | 1509 va_end(args); |
1510 ReportError(error); | 1510 ReportError(error); |
1511 } | 1511 } |
1512 | 1512 |
1513 } // namespace dart | 1513 } // namespace dart |
OLD | NEW |