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 #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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 if (FLAG_verify_implements) { | 86 if (FLAG_verify_implements) { |
87 for (intptr_t i = 0; i < class_array.Length(); i++) { | 87 for (intptr_t i = 0; i < class_array.Length(); i++) { |
88 cls ^= class_array.At(i); | 88 cls ^= class_array.At(i); |
89 if (!cls.is_interface()) { | 89 if (!cls.is_interface()) { |
90 VerifyClassImplements(cls); | 90 VerifyClassImplements(cls); |
91 } | 91 } |
92 } | 92 } |
93 } | 93 } |
94 // Clear pending classes array. | 94 // Clear pending classes array. |
95 object_store->set_pending_classes(Array::Handle(Array::Empty())); | 95 object_store->set_pending_classes(Array::Handle(Array::Empty())); |
| 96 |
| 97 // Check to ensure there are no duplicate definitions in the library |
| 98 // hierarchy. |
| 99 const String& str = String::Handle(Library::CheckForDuplicateDefinition()); |
| 100 if (!str.IsNull()) { |
| 101 ReportError("Duplicate definition : %s\n", str.ToCString()); |
| 102 } |
96 } else { | 103 } else { |
97 retval = false; | 104 retval = false; |
98 } | 105 } |
99 isolate->set_long_jump_base(base); | 106 isolate->set_long_jump_base(base); |
100 return retval; | 107 return retval; |
101 } | 108 } |
102 | 109 |
103 | 110 |
104 #if defined (DEBUG) | 111 #if defined (DEBUG) |
105 // Adds all interfaces of cls into 'collected'. Duplicate entries may occur. | 112 // Adds all interfaces of cls into 'collected'. Duplicate entries may occur. |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
985 ASSERT(msg_buffer != NULL); | 992 ASSERT(msg_buffer != NULL); |
986 va_list args; | 993 va_list args; |
987 va_start(args, format); | 994 va_start(args, format); |
988 OS::VSNPrint(msg_buffer, kBufferLength, format, args); | 995 OS::VSNPrint(msg_buffer, kBufferLength, format, args); |
989 va_end(args); | 996 va_end(args); |
990 isolate->long_jump_base()->Jump(1, msg_buffer); | 997 isolate->long_jump_base()->Jump(1, msg_buffer); |
991 UNREACHABLE(); | 998 UNREACHABLE(); |
992 } | 999 } |
993 | 1000 |
994 } // namespace dart | 1001 } // namespace dart |
OLD | NEW |