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

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

Issue 1914343002: Dump more info before crashing. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months 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
« no previous file with comments | « no previous file | no next file » | 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/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 6400 matching lines...) Expand 10 before | Expand all | Expand 10 after
6411 TypeTestKind test_kind, 6411 TypeTestKind test_kind,
6412 intptr_t parameter_position, 6412 intptr_t parameter_position,
6413 intptr_t other_parameter_position, 6413 intptr_t other_parameter_position,
6414 const TypeArguments& type_arguments, 6414 const TypeArguments& type_arguments,
6415 const Function& other, 6415 const Function& other,
6416 const TypeArguments& other_type_arguments, 6416 const TypeArguments& other_type_arguments,
6417 Error* bound_error, 6417 Error* bound_error,
6418 Heap::Space space) const { 6418 Heap::Space space) const {
6419 AbstractType& other_param_type = 6419 AbstractType& other_param_type =
6420 AbstractType::Handle(other.ParameterTypeAt(other_parameter_position)); 6420 AbstractType::Handle(other.ParameterTypeAt(other_parameter_position));
6421
6422 // TODO(regis): Remove this debugging code.
6423 if (other_param_type.IsNull()) {
6424 const Class& owner = Class::Handle(Owner());
6425 const Class& other_owner = Class::Handle(other.Owner());
6426 THR_Print("*** null other_param_type ***\n");
6427 THR_Print("parameter_position: %" Pd "\n", parameter_position);
6428 THR_Print("other_parameter_position: %" Pd "\n", other_parameter_position);
6429 THR_Print("function: %s\n", ToCString());
6430 THR_Print("function owner: %s\n", owner.ToCString());
6431 THR_Print("other function: %s\n", other.ToCString());
6432 THR_Print("other function owner: %s\n", other_owner.ToCString());
6433 AbstractType& param_type =
6434 AbstractType::Handle(ParameterTypeAt(parameter_position));
6435 THR_Print("param_type: %s\n", param_type.ToCString());
6436 }
6437
6421 if (!other_param_type.IsInstantiated()) { 6438 if (!other_param_type.IsInstantiated()) {
6422 other_param_type = 6439 other_param_type =
6423 other_param_type.InstantiateFrom(other_type_arguments, 6440 other_param_type.InstantiateFrom(other_type_arguments,
6424 bound_error, 6441 bound_error,
6425 NULL, // instantiation_trail 6442 NULL, // instantiation_trail
6426 NULL, // bound_trail 6443 NULL, // bound_trail
6427 space); 6444 space);
6428 ASSERT((bound_error == NULL) || bound_error->IsNull()); 6445 ASSERT((bound_error == NULL) || bound_error->IsNull());
6429 } 6446 }
6430 if (other_param_type.IsDynamicType()) { 6447 if (other_param_type.IsDynamicType()) {
6431 return true; 6448 return true;
6432 } 6449 }
6433 AbstractType& param_type = 6450 AbstractType& param_type =
6434 AbstractType::Handle(ParameterTypeAt(parameter_position)); 6451 AbstractType::Handle(ParameterTypeAt(parameter_position));
6452
6453 // TODO(regis): Remove this debugging code.
6454 if (param_type.IsNull()) {
6455 const Class& owner = Class::Handle(Owner());
6456 const Class& other_owner = Class::Handle(other.Owner());
6457 THR_Print("*** null param_type ***\n");
6458 THR_Print("parameter_position: %" Pd "\n", parameter_position);
6459 THR_Print("other_parameter_position: %" Pd "\n", other_parameter_position);
6460 THR_Print("function: %s\n", ToCString());
6461 THR_Print("function owner: %s\n", owner.ToCString());
6462 THR_Print("other function: %s\n", other.ToCString());
6463 THR_Print("other function owner: %s\n", other_owner.ToCString());
6464 THR_Print("other_param_type: %s\n", other_param_type.ToCString());
6465 }
6466
6435 if (!param_type.IsInstantiated()) { 6467 if (!param_type.IsInstantiated()) {
6436 param_type = param_type.InstantiateFrom(type_arguments, 6468 param_type = param_type.InstantiateFrom(type_arguments,
6437 bound_error, 6469 bound_error,
6438 NULL, // instantiation_trail 6470 NULL, // instantiation_trail
6439 NULL, // bound_trail 6471 NULL, // bound_trail
6440 space); 6472 space);
6441 ASSERT((bound_error == NULL) || bound_error->IsNull()); 6473 ASSERT((bound_error == NULL) || bound_error->IsNull());
6442 } 6474 }
6443 if (param_type.IsDynamicType()) { 6475 if (param_type.IsDynamicType()) {
6444 return test_kind == kIsSubtypeOf; 6476 return test_kind == kIsSubtypeOf;
(...skipping 15845 matching lines...) Expand 10 before | Expand all | Expand 10 after
22290 return UserTag::null(); 22322 return UserTag::null();
22291 } 22323 }
22292 22324
22293 22325
22294 const char* UserTag::ToCString() const { 22326 const char* UserTag::ToCString() const {
22295 const String& tag_label = String::Handle(label()); 22327 const String& tag_label = String::Handle(label());
22296 return tag_label.ToCString(); 22328 return tag_label.ToCString();
22297 } 22329 }
22298 22330
22299 } // namespace dart 22331 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698