| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index 145791fdc209d4d1beda8287491bc1fc5c2bff52..33cb344bd4698ea7c22bb47507b844880f86de3f 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -6418,23 +6418,6 @@ bool Function::TestParameterType(
|
| Heap::Space space) const {
|
| AbstractType& other_param_type =
|
| AbstractType::Handle(other.ParameterTypeAt(other_parameter_position));
|
| -
|
| - // TODO(regis): Remove this debugging code.
|
| - if (other_param_type.IsNull()) {
|
| - const Class& owner = Class::Handle(Owner());
|
| - const Class& other_owner = Class::Handle(other.Owner());
|
| - THR_Print("*** null other_param_type ***\n");
|
| - THR_Print("parameter_position: %" Pd "\n", parameter_position);
|
| - THR_Print("other_parameter_position: %" Pd "\n", other_parameter_position);
|
| - THR_Print("function: %s\n", ToCString());
|
| - THR_Print("function owner: %s\n", owner.ToCString());
|
| - THR_Print("other function: %s\n", other.ToCString());
|
| - THR_Print("other function owner: %s\n", other_owner.ToCString());
|
| - AbstractType& param_type =
|
| - AbstractType::Handle(ParameterTypeAt(parameter_position));
|
| - THR_Print("param_type: %s\n", param_type.ToCString());
|
| - }
|
| -
|
| if (!other_param_type.IsInstantiated()) {
|
| other_param_type =
|
| other_param_type.InstantiateFrom(other_type_arguments,
|
| @@ -6452,16 +6435,40 @@ bool Function::TestParameterType(
|
|
|
| // TODO(regis): Remove this debugging code.
|
| if (param_type.IsNull()) {
|
| - const Class& owner = Class::Handle(Owner());
|
| - const Class& other_owner = Class::Handle(other.Owner());
|
| THR_Print("*** null param_type ***\n");
|
| THR_Print("parameter_position: %" Pd "\n", parameter_position);
|
| THR_Print("other_parameter_position: %" Pd "\n", other_parameter_position);
|
| - THR_Print("function: %s\n", ToCString());
|
| + String& str = String::Handle();
|
| + str = QualifiedScrubbedName();
|
| + THR_Print("function name: %s\n", str.ToCString());
|
| + str = other.QualifiedScrubbedName();
|
| + THR_Print("other function name: %s\n", str.ToCString());
|
| + Class& owner = Class::Handle();
|
| + owner = Owner();
|
| THR_Print("function owner: %s\n", owner.ToCString());
|
| - THR_Print("other function: %s\n", other.ToCString());
|
| - THR_Print("other function owner: %s\n", other_owner.ToCString());
|
| + owner = other.Owner();
|
| + THR_Print("other function owner: %s\n", owner.ToCString());
|
| THR_Print("other_param_type: %s\n", other_param_type.ToCString());
|
| + AbstractType& type = AbstractType::Handle();
|
| + if (parameter_position > 0) {
|
| + type = ParameterTypeAt(0);
|
| + THR_Print("receiver type: %s\n",
|
| + type.IsNull()? "null" : type.ToCString());
|
| + }
|
| + THR_Print("has code: %s\n", HasCode() ? "yes" : "no");
|
| + str = Report::PrependSnippet(Report::kWarning,
|
| + Script::Handle(script()),
|
| + token_pos(),
|
| + Report::AtLocation,
|
| + Symbols::Empty());
|
| + THR_Print("function source: %s\n", str.ToCString());
|
| + for (intptr_t i = 0; i < NumParameters(); i++) {
|
| + THR_Print("function param %" Pd "\n", i);
|
| + str = ParameterNameAt(i);
|
| + THR_Print(" name: %s\n", str.IsNull() ? "null" : str.ToCString());
|
| + type = ParameterTypeAt(i);
|
| + THR_Print(" type: %s\n", type.IsNull() ? "null" : type.ToCString());
|
| + }
|
| }
|
|
|
| if (!param_type.IsInstantiated()) {
|
|
|