| 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/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 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1365 if (FLAG_trace_class_finalization) { | 1365 if (FLAG_trace_class_finalization) { |
| 1366 OS::Print("done mixin appl %s %s extending %s\n", | 1366 OS::Print("done mixin appl %s %s extending %s\n", |
| 1367 String::Handle(cls.Name()).ToCString(), | 1367 String::Handle(cls.Name()).ToCString(), |
| 1368 TypeArguments::Handle(cls.type_parameters()).ToCString(), | 1368 TypeArguments::Handle(cls.type_parameters()).ToCString(), |
| 1369 AbstractType::Handle(cls.super_type()).ToCString()); | 1369 AbstractType::Handle(cls.super_type()).ToCString()); |
| 1370 } | 1370 } |
| 1371 } | 1371 } |
| 1372 | 1372 |
| 1373 | 1373 |
| 1374 void ClassFinalizer::FinalizeClass(const Class& cls) { | 1374 void ClassFinalizer::FinalizeClass(const Class& cls) { |
| 1375 HANDLESCOPE(Isolate::Current()); |
| 1375 if (cls.is_finalized()) { | 1376 if (cls.is_finalized()) { |
| 1376 return; | 1377 return; |
| 1377 } | 1378 } |
| 1378 if (FLAG_trace_class_finalization) { | 1379 if (FLAG_trace_class_finalization) { |
| 1379 OS::Print("Finalize %s\n", cls.ToCString()); | 1380 OS::Print("Finalize %s\n", cls.ToCString()); |
| 1380 } | 1381 } |
| 1381 if (!IsSuperCycleFree(cls)) { | 1382 if (!IsSuperCycleFree(cls)) { |
| 1382 const String& name = String::Handle(cls.Name()); | 1383 const String& name = String::Handle(cls.Name()); |
| 1383 const Script& script = Script::Handle(cls.script()); | 1384 const Script& script = Script::Handle(cls.script()); |
| 1384 ReportError(script, cls.token_pos(), | 1385 ReportError(script, cls.token_pos(), |
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1984 void ClassFinalizer::ReportError(const char* format, ...) { | 1985 void ClassFinalizer::ReportError(const char* format, ...) { |
| 1985 va_list args; | 1986 va_list args; |
| 1986 va_start(args, format); | 1987 va_start(args, format); |
| 1987 const Error& error = Error::Handle( | 1988 const Error& error = Error::Handle( |
| 1988 Parser::FormatError(Script::Handle(), -1, "Error", format, args)); | 1989 Parser::FormatError(Script::Handle(), -1, "Error", format, args)); |
| 1989 va_end(args); | 1990 va_end(args); |
| 1990 ReportError(error); | 1991 ReportError(error); |
| 1991 } | 1992 } |
| 1992 | 1993 |
| 1993 } // namespace dart | 1994 } // namespace dart |
| OLD | NEW |