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 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1494 interface.IsStringType() || | 1494 interface.IsStringType() || |
1495 (interface.IsFunctionType() && !cls.IsSignatureClass()) || | 1495 (interface.IsFunctionType() && !cls.IsSignatureClass()) || |
1496 interface.IsDynamicType()) { | 1496 interface.IsDynamicType()) { |
1497 const Script& script = Script::Handle(cls.script()); | 1497 const Script& script = Script::Handle(cls.script()); |
1498 ReportError(script, cls.token_pos(), | 1498 ReportError(script, cls.token_pos(), |
1499 "'%s' is not allowed to extend or implement '%s'", | 1499 "'%s' is not allowed to extend or implement '%s'", |
1500 String::Handle(cls.Name()).ToCString(), | 1500 String::Handle(cls.Name()).ToCString(), |
1501 String::Handle(interface_class.Name()).ToCString()); | 1501 String::Handle(interface_class.Name()).ToCString()); |
1502 } | 1502 } |
1503 } | 1503 } |
| 1504 interface_class.set_is_implemented(); |
1504 // Now resolve the super interfaces. | 1505 // Now resolve the super interfaces. |
1505 ResolveInterfaces(interface_class, visited); | 1506 ResolveInterfaces(interface_class, visited); |
1506 } | 1507 } |
1507 visited->RemoveLast(); | 1508 visited->RemoveLast(); |
1508 } | 1509 } |
1509 | 1510 |
1510 | 1511 |
1511 // A class is marked as constant if it has one constant constructor. | 1512 // A class is marked as constant if it has one constant constructor. |
1512 // A constant class: | 1513 // A constant class: |
1513 // - may extend only const classes. | 1514 // - may extend only const classes. |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1687 void ClassFinalizer::ReportError(const char* format, ...) { | 1688 void ClassFinalizer::ReportError(const char* format, ...) { |
1688 va_list args; | 1689 va_list args; |
1689 va_start(args, format); | 1690 va_start(args, format); |
1690 const Error& error = Error::Handle( | 1691 const Error& error = Error::Handle( |
1691 Parser::FormatError(Script::Handle(), -1, "Error", format, args)); | 1692 Parser::FormatError(Script::Handle(), -1, "Error", format, args)); |
1692 va_end(args); | 1693 va_end(args); |
1693 ReportError(error); | 1694 ReportError(error); |
1694 } | 1695 } |
1695 | 1696 |
1696 } // namespace dart | 1697 } // namespace dart |
OLD | NEW |