Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: runtime/vm/class_finalizer.cc

Issue 11348283: Add flag 'implements' to class, it is set anytime someone implements this class. This is a way to r… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698