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

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

Issue 1948173002: Remove temporary code used to debug issue #26101. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « runtime/vm/isolate.cc ('k') | 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 6414 matching lines...) Expand 10 before | Expand all | Expand 10 after
6425 NULL, // instantiation_trail 6425 NULL, // instantiation_trail
6426 NULL, // bound_trail 6426 NULL, // bound_trail
6427 space); 6427 space);
6428 ASSERT((bound_error == NULL) || bound_error->IsNull()); 6428 ASSERT((bound_error == NULL) || bound_error->IsNull());
6429 } 6429 }
6430 if (other_param_type.IsDynamicType()) { 6430 if (other_param_type.IsDynamicType()) {
6431 return true; 6431 return true;
6432 } 6432 }
6433 AbstractType& param_type = 6433 AbstractType& param_type =
6434 AbstractType::Handle(ParameterTypeAt(parameter_position)); 6434 AbstractType::Handle(ParameterTypeAt(parameter_position));
6435
6436 // TODO(regis): Remove this debugging code.
6437 if (param_type.IsNull()) {
6438 THR_Print("*** null param_type ***\n");
6439 THR_Print("parameter_position: %" Pd "\n", parameter_position);
6440 THR_Print("other_parameter_position: %" Pd "\n", other_parameter_position);
6441 String& str = String::Handle();
6442 str = QualifiedScrubbedName();
6443 THR_Print("function name: %s\n", str.ToCString());
6444 str = other.QualifiedScrubbedName();
6445 THR_Print("other function name: %s\n", str.ToCString());
6446 Class& owner = Class::Handle();
6447 owner = Owner();
6448 THR_Print("function owner: %s\n", owner.ToCString());
6449 owner = other.Owner();
6450 THR_Print("other function owner: %s\n", owner.ToCString());
6451 THR_Print("other_param_type: %s\n", other_param_type.ToCString());
6452 AbstractType& type = AbstractType::Handle();
6453 if (parameter_position > 0) {
6454 type = ParameterTypeAt(0);
6455 THR_Print("receiver type: %s\n",
6456 type.IsNull()? "null" : type.ToCString());
6457 }
6458 THR_Print("has code: %s\n", HasCode() ? "yes" : "no");
6459 str = Report::PrependSnippet(Report::kWarning,
6460 Script::Handle(script()),
6461 token_pos(),
6462 Report::AtLocation,
6463 Symbols::Empty());
6464 THR_Print("function source: %s\n", str.ToCString());
6465 for (intptr_t i = 0; i < NumParameters(); i++) {
6466 THR_Print("function param %" Pd "\n", i);
6467 str = ParameterNameAt(i);
6468 THR_Print(" name: %s\n", str.IsNull() ? "null" : str.ToCString());
6469 type = ParameterTypeAt(i);
6470 THR_Print(" type: %s\n", type.IsNull() ? "null" : type.ToCString());
6471 }
6472 }
6473
6474 if (!param_type.IsInstantiated()) { 6435 if (!param_type.IsInstantiated()) {
6475 param_type = param_type.InstantiateFrom(type_arguments, 6436 param_type = param_type.InstantiateFrom(type_arguments,
6476 bound_error, 6437 bound_error,
6477 NULL, // instantiation_trail 6438 NULL, // instantiation_trail
6478 NULL, // bound_trail 6439 NULL, // bound_trail
6479 space); 6440 space);
6480 ASSERT((bound_error == NULL) || bound_error->IsNull()); 6441 ASSERT((bound_error == NULL) || bound_error->IsNull());
6481 } 6442 }
6482 if (param_type.IsDynamicType()) { 6443 if (param_type.IsDynamicType()) {
6483 return test_kind == kIsSubtypeOf; 6444 return test_kind == kIsSubtypeOf;
(...skipping 9114 matching lines...) Expand 10 before | Expand all | Expand 10 after
15598 15559
15599 TokenPosition AbstractType::token_pos() const { 15560 TokenPosition AbstractType::token_pos() const {
15600 // AbstractType is an abstract class. 15561 // AbstractType is an abstract class.
15601 UNREACHABLE(); 15562 UNREACHABLE();
15602 return TokenPosition::kNoSource; 15563 return TokenPosition::kNoSource;
15603 } 15564 }
15604 15565
15605 15566
15606 bool AbstractType::IsInstantiated(TrailPtr trail) const { 15567 bool AbstractType::IsInstantiated(TrailPtr trail) const {
15607 // AbstractType is an abstract class. 15568 // AbstractType is an abstract class.
15608 #if !defined(PRODUCT)
15609 // TODO(srdjan) : Remove temporary code.
15610 NOT_IN_PRODUCT(
15611 Profiler::DumpStackTrace(true); // Only native stack trace.
15612 )
15613 if (Compiler::IsBackgroundCompilation()) {
15614 UNREACHABLE();
15615 }
15616 #endif
15617 UNREACHABLE(); 15569 UNREACHABLE();
15618 return false; 15570 return false;
15619 } 15571 }
15620 15572
15621 15573
15622 bool AbstractType::IsFinalized() const { 15574 bool AbstractType::IsFinalized() const {
15623 // AbstractType is an abstract class. 15575 // AbstractType is an abstract class.
15624 UNREACHABLE(); 15576 UNREACHABLE();
15625 return false; 15577 return false;
15626 } 15578 }
(...skipping 6797 matching lines...) Expand 10 before | Expand all | Expand 10 after
22424 return UserTag::null(); 22376 return UserTag::null();
22425 } 22377 }
22426 22378
22427 22379
22428 const char* UserTag::ToCString() const { 22380 const char* UserTag::ToCString() const {
22429 const String& tag_label = String::Handle(label()); 22381 const String& tag_label = String::Handle(label());
22430 return tag_label.ToCString(); 22382 return tag_label.ToCString();
22431 } 22383 }
22432 22384
22433 } // namespace dart 22385 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698