OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/code_generator.h" | 7 #include "vm/code_generator.h" |
8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
9 #include "vm/heap.h" | 9 #include "vm/heap.h" |
10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
(...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1451 ReportError(cls, function.token_pos(), | 1451 ReportError(cls, function.token_pos(), |
1452 "static %s '%s' of class '%s' conflicts with " | 1452 "static %s '%s' of class '%s' conflicts with " |
1453 "instance member '%s' of super class '%s'", | 1453 "instance member '%s' of super class '%s'", |
1454 (function.IsGetterFunction() || | 1454 (function.IsGetterFunction() || |
1455 function.IsImplicitGetterFunction()) ? "getter" : "method", | 1455 function.IsImplicitGetterFunction()) ? "getter" : "method", |
1456 name.ToCString(), | 1456 name.ToCString(), |
1457 class_name.ToCString(), | 1457 class_name.ToCString(), |
1458 name.ToCString(), | 1458 name.ToCString(), |
1459 super_class_name.ToCString()); | 1459 super_class_name.ToCString()); |
1460 } | 1460 } |
1461 // The function may be a still unresolved redirecting factory. Do not yet | 1461 if (function.IsRedirectingFactory()) { |
1462 // try to resolve it in order to avoid cycles in class finalization. | 1462 // The function may be a still unresolved redirecting factory. Do not |
| 1463 // yet try to resolve it in order to avoid cycles in class finalization. |
| 1464 // However, the redirection type should be finalized. |
| 1465 Type& type = Type::Handle(function.RedirectionType()); |
| 1466 type ^= FinalizeType(cls, type, kCanonicalize); |
| 1467 function.SetRedirectionType(type); |
| 1468 } |
1463 } else if (function.IsGetterFunction() || | 1469 } else if (function.IsGetterFunction() || |
1464 function.IsImplicitGetterFunction()) { | 1470 function.IsImplicitGetterFunction()) { |
1465 super_class = FindSuperOwnerOfFunction(cls, name); | 1471 super_class = FindSuperOwnerOfFunction(cls, name); |
1466 if (!super_class.IsNull()) { | 1472 if (!super_class.IsNull()) { |
1467 const String& class_name = String::Handle(cls.Name()); | 1473 const String& class_name = String::Handle(cls.Name()); |
1468 const String& super_class_name = String::Handle(super_class.Name()); | 1474 const String& super_class_name = String::Handle(super_class.Name()); |
1469 ReportError(cls, function.token_pos(), | 1475 ReportError(cls, function.token_pos(), |
1470 "getter '%s' of class '%s' conflicts with " | 1476 "getter '%s' of class '%s' conflicts with " |
1471 "method '%s' of super class '%s'", | 1477 "method '%s' of super class '%s'", |
1472 name.ToCString(), | 1478 name.ToCString(), |
(...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3043 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields()); | 3049 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields()); |
3044 field ^= fields_array.At(0); | 3050 field ^= fields_array.At(0); |
3045 ASSERT(field.Offset() == ByteBuffer::data_offset()); | 3051 ASSERT(field.Offset() == ByteBuffer::data_offset()); |
3046 name ^= field.name(); | 3052 name ^= field.name(); |
3047 expected_name ^= String::New("_data"); | 3053 expected_name ^= String::New("_data"); |
3048 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); | 3054 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); |
3049 #endif | 3055 #endif |
3050 } | 3056 } |
3051 | 3057 |
3052 } // namespace dart | 3058 } // namespace dart |
OLD | NEW |