| Index: runtime/vm/class_finalizer.cc
|
| diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
|
| index 6a69b7d2c5d81d3f361efd555d1fcc844b9cf9ca..fd4d9e2868d3477577bbb30e8071dc237ae64564 100644
|
| --- a/runtime/vm/class_finalizer.cc
|
| +++ b/runtime/vm/class_finalizer.cc
|
| @@ -9,6 +9,7 @@
|
| #include "vm/heap.h"
|
| #include "vm/isolate.h"
|
| #include "vm/longjump.h"
|
| +#include "vm/log.h"
|
| #include "vm/object_store.h"
|
| #include "vm/report.h"
|
| #include "vm/symbols.h"
|
| @@ -335,7 +336,7 @@ void ClassFinalizer::ResolveRedirectingFactoryTarget(
|
|
|
| // Target is not resolved yet.
|
| if (FLAG_trace_class_finalization) {
|
| - OS::Print("Resolving redirecting factory: %s\n",
|
| + ISL_Print("Resolving redirecting factory: %s\n",
|
| String::Handle(factory.name()).ToCString());
|
| }
|
| type ^= FinalizeType(cls, type, kCanonicalize);
|
| @@ -457,7 +458,7 @@ void ClassFinalizer::ResolveTypeClass(const Class& cls,
|
| return;
|
| }
|
| if (FLAG_trace_type_finalization) {
|
| - OS::Print("Resolve type class of '%s'\n",
|
| + ISL_Print("Resolve type class of '%s'\n",
|
| String::Handle(type.Name()).ToCString());
|
| }
|
|
|
| @@ -496,7 +497,7 @@ void ClassFinalizer::ResolveType(const Class& cls, const AbstractType& type) {
|
| }
|
| ASSERT(type.IsType());
|
| if (FLAG_trace_type_finalization) {
|
| - OS::Print("Resolve type '%s'\n", String::Handle(type.Name()).ToCString());
|
| + ISL_Print("Resolve type '%s'\n", String::Handle(type.Name()).ToCString());
|
| }
|
| ResolveTypeClass(cls, type);
|
| if (type.IsMalformed()) {
|
| @@ -523,7 +524,7 @@ void ClassFinalizer::FinalizeTypeParameters(
|
| const Class& cls,
|
| GrowableObjectArray* pending_types) {
|
| if (FLAG_trace_type_finalization) {
|
| - OS::Print("Finalizing type parameters of '%s'\n",
|
| + ISL_Print("Finalizing type parameters of '%s'\n",
|
| String::Handle(cls.Name()).ToCString());
|
| }
|
| if (cls.IsMixinApplication()) {
|
| @@ -562,7 +563,7 @@ void ClassFinalizer::CheckRecursiveType(const Class& cls,
|
| GrowableObjectArray* pending_types) {
|
| Isolate* isolate = Isolate::Current();
|
| if (FLAG_trace_type_finalization) {
|
| - OS::Print("Checking recursive type '%s': %s\n",
|
| + ISL_Print("Checking recursive type '%s': %s\n",
|
| String::Handle(type.Name()).ToCString(),
|
| type.ToCString());
|
| }
|
| @@ -593,7 +594,7 @@ void ClassFinalizer::CheckRecursiveType(const Class& cls,
|
| for (intptr_t i = num_pending_types - 1; i >= 0; i--) {
|
| pending_type ^= pending_types->At(i);
|
| if (FLAG_trace_type_finalization) {
|
| - OS::Print(" Comparing with pending type '%s': %s\n",
|
| + ISL_Print(" Comparing with pending type '%s': %s\n",
|
| String::Handle(pending_type.Name()).ToCString(),
|
| pending_type.ToCString());
|
| }
|
| @@ -685,7 +686,7 @@ void ClassFinalizer::FinalizeTypeArguments(
|
| ASSERT(super_type_arg.IsType());
|
| CheckRecursiveType(cls, Type::Cast(super_type_arg), pending_types);
|
| if (FLAG_trace_type_finalization) {
|
| - OS::Print("Creating TypeRef '%s': '%s'\n",
|
| + ISL_Print("Creating TypeRef '%s': '%s'\n",
|
| String::Handle(super_type_arg.Name()).ToCString(),
|
| super_type_arg.ToCString());
|
| }
|
| @@ -706,7 +707,7 @@ void ClassFinalizer::FinalizeTypeArguments(
|
| if (FLAG_trace_type_finalization && super_type_arg.IsTypeRef()) {
|
| AbstractType& ref_type = AbstractType::Handle(
|
| TypeRef::Cast(super_type_arg).type());
|
| - OS::Print("Instantiating TypeRef '%s': '%s'\n"
|
| + ISL_Print("Instantiating TypeRef '%s': '%s'\n"
|
| " instantiator: '%s'\n",
|
| String::Handle(super_type_arg.Name()).ToCString(),
|
| ref_type.ToCString(),
|
| @@ -892,7 +893,7 @@ void ClassFinalizer::CheckTypeBounds(const Class& cls, const Type& type) {
|
| "type '%s' has an out of bound type argument",
|
| type_name.ToCString());
|
| if (FLAG_trace_type_finalization) {
|
| - OS::Print("Marking type '%s' as malbounded: %s\n",
|
| + ISL_Print("Marking type '%s' as malbounded: %s\n",
|
| String::Handle(type.Name()).ToCString(),
|
| bound_error.ToCString());
|
| }
|
| @@ -937,7 +938,7 @@ RawAbstractType* ClassFinalizer::FinalizeType(
|
|
|
| Isolate* isolate = Isolate::Current();
|
| if (FLAG_trace_type_finalization) {
|
| - OS::Print("Finalizing type '%s' for class '%s'\n",
|
| + ISL_Print("Finalizing type '%s' for class '%s'\n",
|
| String::Handle(isolate, type.Name()).ToCString(),
|
| cls.ToCString());
|
| }
|
| @@ -964,7 +965,7 @@ RawAbstractType* ClassFinalizer::FinalizeType(
|
| }
|
|
|
| if (FLAG_trace_type_finalization) {
|
| - OS::Print("Done finalizing type parameter '%s' with index %" Pd "\n",
|
| + ISL_Print("Done finalizing type parameter '%s' with index %" Pd "\n",
|
| String::Handle(isolate, type_parameter.name()).ToCString(),
|
| type_parameter.index());
|
| }
|
| @@ -1124,7 +1125,7 @@ RawAbstractType* ClassFinalizer::FinalizeType(
|
| type ^= types.At(i);
|
| CheckTypeBounds(cls, type);
|
| if (FLAG_trace_type_finalization && type.IsRecursive()) {
|
| - OS::Print("Done finalizing recursive type '%s': %s\n",
|
| + ISL_Print("Done finalizing recursive type '%s': %s\n",
|
| String::Handle(isolate, type.Name()).ToCString(),
|
| type.ToCString());
|
| }
|
| @@ -1143,7 +1144,7 @@ RawAbstractType* ClassFinalizer::FinalizeType(
|
| }
|
|
|
| if (FLAG_trace_type_finalization) {
|
| - OS::Print("Done finalizing type '%s' with %" Pd " type args: %s\n",
|
| + ISL_Print("Done finalizing type '%s' with %" Pd " type args: %s\n",
|
| String::Handle(isolate, parameterized_type.Name()).ToCString(),
|
| parameterized_type.arguments() == TypeArguments::null() ?
|
| 0 : num_type_arguments,
|
| @@ -1154,7 +1155,7 @@ RawAbstractType* ClassFinalizer::FinalizeType(
|
| if (FLAG_trace_type_finalization && parameterized_type.IsRecursive()) {
|
| AbstractType& type = Type::Handle(isolate);
|
| type = parameterized_type.Canonicalize();
|
| - OS::Print("Done canonicalizing recursive type '%s': %s\n",
|
| + ISL_Print("Done canonicalizing recursive type '%s': %s\n",
|
| String::Handle(isolate, type.Name()).ToCString(),
|
| type.ToCString());
|
| return type.raw();
|
| @@ -1856,7 +1857,7 @@ void ClassFinalizer::ApplyMixinAppAlias(const Class& mixin_app_class,
|
| library.AddClass(inserted_class);
|
|
|
| if (FLAG_trace_class_finalization) {
|
| - OS::Print("Creating mixin application alias %s\n",
|
| + ISL_Print("Creating mixin application alias %s\n",
|
| inserted_class.ToCString());
|
| }
|
|
|
| @@ -1991,7 +1992,7 @@ void ClassFinalizer::ApplyMixinAppAlias(const Class& mixin_app_class,
|
| ASSERT(!mixin_app_class.is_type_finalized());
|
| ASSERT(!mixin_app_class.is_mixin_type_applied());
|
| if (FLAG_trace_class_finalization) {
|
| - OS::Print("Inserting class '%s' %s\n"
|
| + ISL_Print("Inserting class '%s' %s\n"
|
| " as super type '%s' with %" Pd " type args: %s\n"
|
| " of mixin application alias '%s' %s\n",
|
| String::Handle(inserted_class.Name()).ToCString(),
|
| @@ -2018,7 +2019,7 @@ void ClassFinalizer::ApplyMixinType(const Class& mixin_app_class,
|
| const Class& mixin_class = Class::Handle(mixin_type.type_class());
|
|
|
| if (FLAG_trace_class_finalization) {
|
| - OS::Print("Applying mixin type '%s' to %s at pos %" Pd "\n",
|
| + ISL_Print("Applying mixin type '%s' to %s at pos %" Pd "\n",
|
| String::Handle(mixin_type.Name()).ToCString(),
|
| mixin_app_class.ToCString(),
|
| mixin_app_class.token_pos());
|
| @@ -2061,7 +2062,7 @@ void ClassFinalizer::ApplyMixinType(const Class& mixin_app_class,
|
| ResolveSuperTypeAndInterfaces(mixin_app_class, &visited_interfaces);
|
|
|
| if (FLAG_trace_class_finalization) {
|
| - OS::Print("Done applying mixin type '%s' to class '%s' %s extending '%s'\n",
|
| + ISL_Print("Done applying mixin type '%s' to class '%s' %s extending '%s'\n",
|
| String::Handle(mixin_type.Name()).ToCString(),
|
| String::Handle(mixin_app_class.Name()).ToCString(),
|
| TypeArguments::Handle(
|
| @@ -2107,7 +2108,7 @@ void ClassFinalizer::CreateForwardingConstructors(
|
| clone_name = Symbols::New(clone_name);
|
|
|
| if (FLAG_trace_class_finalization) {
|
| - OS::Print("Cloning constructor '%s' as '%s'\n",
|
| + ISL_Print("Cloning constructor '%s' as '%s'\n",
|
| ctor_name.ToCString(),
|
| clone_name.ToCString());
|
| }
|
| @@ -2162,7 +2163,7 @@ void ClassFinalizer::ApplyMixinMembers(const Class& cls) {
|
| // A default constructor will be created for the mixin app alias class.
|
|
|
| if (FLAG_trace_class_finalization) {
|
| - OS::Print("Applying mixin members of %s to %s at pos %" Pd "\n",
|
| + ISL_Print("Applying mixin members of %s to %s at pos %" Pd "\n",
|
| mixin_cls.ToCString(),
|
| cls.ToCString(),
|
| cls.token_pos());
|
| @@ -2222,7 +2223,7 @@ void ClassFinalizer::ApplyMixinMembers(const Class& cls) {
|
| cls.AddFields(cloned_fields);
|
|
|
| if (FLAG_trace_class_finalization) {
|
| - OS::Print("Done applying mixin members of %s to %s\n",
|
| + ISL_Print("Done applying mixin members of %s to %s\n",
|
| mixin_cls.ToCString(),
|
| cls.ToCString());
|
| }
|
| @@ -2235,7 +2236,7 @@ void ClassFinalizer::FinalizeTypesInClass(const Class& cls) {
|
| return;
|
| }
|
| if (FLAG_trace_class_finalization) {
|
| - OS::Print("Finalize types in %s\n", cls.ToCString());
|
| + ISL_Print("Finalize types in %s\n", cls.ToCString());
|
| }
|
| if (!IsSuperCycleFree(cls)) {
|
| const String& name = String::Handle(cls.Name());
|
| @@ -2368,7 +2369,7 @@ void ClassFinalizer::FinalizeClass(const Class& cls) {
|
| return;
|
| }
|
| if (FLAG_trace_class_finalization) {
|
| - OS::Print("Finalize %s\n", cls.ToCString());
|
| + ISL_Print("Finalize %s\n", cls.ToCString());
|
| }
|
| if (cls.is_patch()) {
|
| // The fields and functions of a patch class are copied to the
|
| @@ -2741,7 +2742,7 @@ RawType* ClassFinalizer::ResolveMixinAppType(
|
| // processed via the super_type chain of a pending class.
|
|
|
| if (FLAG_trace_class_finalization) {
|
| - OS::Print("Creating mixin application %s\n",
|
| + ISL_Print("Creating mixin application %s\n",
|
| mixin_app_class.ToCString());
|
| }
|
| }
|
| @@ -2762,7 +2763,7 @@ RawType* ClassFinalizer::ResolveMixinAppType(
|
| }
|
| }
|
| if (FLAG_trace_class_finalization) {
|
| - OS::Print("ResolveMixinAppType: mixin appl type args: %s\n",
|
| + ISL_Print("ResolveMixinAppType: mixin appl type args: %s\n",
|
| mixin_app_args.ToCString());
|
| }
|
| // The mixin application class at depth k is a subclass of mixin application
|
| @@ -2789,7 +2790,7 @@ void ClassFinalizer::ResolveSuperTypeAndInterfaces(
|
| }
|
| ASSERT(visited != NULL);
|
| if (FLAG_trace_class_finalization) {
|
| - OS::Print("Resolving super and interfaces: %s\n", cls.ToCString());
|
| + ISL_Print("Resolving super and interfaces: %s\n", cls.ToCString());
|
| }
|
| Isolate* isolate = Isolate::Current();
|
| const intptr_t cls_index = cls.id();
|
| @@ -2995,46 +2996,46 @@ void ClassFinalizer::CheckForLegalConstClass(const Class& cls) {
|
| void ClassFinalizer::PrintClassInformation(const Class& cls) {
|
| HANDLESCOPE(Isolate::Current());
|
| const String& class_name = String::Handle(cls.Name());
|
| - OS::Print("class '%s'", class_name.ToCString());
|
| + ISL_Print("class '%s'", class_name.ToCString());
|
| const Library& library = Library::Handle(cls.library());
|
| if (!library.IsNull()) {
|
| - OS::Print(" library '%s%s':\n",
|
| + ISL_Print(" library '%s%s':\n",
|
| String::Handle(library.url()).ToCString(),
|
| String::Handle(library.private_key()).ToCString());
|
| } else {
|
| - OS::Print(" (null library):\n");
|
| + ISL_Print(" (null library):\n");
|
| }
|
| const AbstractType& super_type = AbstractType::Handle(cls.super_type());
|
| if (super_type.IsNull()) {
|
| - OS::Print(" Super: NULL");
|
| + ISL_Print(" Super: NULL");
|
| } else {
|
| const String& super_name = String::Handle(super_type.Name());
|
| - OS::Print(" Super: %s", super_name.ToCString());
|
| + ISL_Print(" Super: %s", super_name.ToCString());
|
| }
|
| const Array& interfaces_array = Array::Handle(cls.interfaces());
|
| if (interfaces_array.Length() > 0) {
|
| - OS::Print("; interfaces: ");
|
| + ISL_Print("; interfaces: ");
|
| AbstractType& interface = AbstractType::Handle();
|
| intptr_t len = interfaces_array.Length();
|
| for (intptr_t i = 0; i < len; i++) {
|
| interface ^= interfaces_array.At(i);
|
| - OS::Print(" %s ", interface.ToCString());
|
| + ISL_Print(" %s ", interface.ToCString());
|
| }
|
| }
|
| - OS::Print("\n");
|
| + ISL_Print("\n");
|
| const Array& functions_array = Array::Handle(cls.functions());
|
| Function& function = Function::Handle();
|
| intptr_t len = functions_array.Length();
|
| for (intptr_t i = 0; i < len; i++) {
|
| function ^= functions_array.At(i);
|
| - OS::Print(" %s\n", function.ToCString());
|
| + ISL_Print(" %s\n", function.ToCString());
|
| }
|
| const Array& fields_array = Array::Handle(cls.fields());
|
| Field& field = Field::Handle();
|
| len = fields_array.Length();
|
| for (intptr_t i = 0; i < len; i++) {
|
| field ^= fields_array.At(i);
|
| - OS::Print(" %s\n", field.ToCString());
|
| + ISL_Print(" %s\n", field.ToCString());
|
| }
|
| }
|
|
|
|
|