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

Unified Diff: runtime/vm/object.cc

Issue 14652008: Fix error reporting when calling static methods and closures withh mismatched arguments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 22181)
+++ runtime/vm/object.cc (working copy)
@@ -12364,7 +12364,14 @@
const char* Array::ToCString() const {
- return "Array";
+ if (IsNull()) {
+ return "Array NULL";
+ }
+ const char* format = "Array len:%"Pd"";
+ intptr_t len = OS::SNPrint(NULL, 0, format, Length()) + 1;
+ char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
+ OS::SNPrint(chars, len, format, Length());
+ return chars;
}
@@ -12429,7 +12436,14 @@
const char* ImmutableArray::ToCString() const {
- return "ImmutableArray";
+ if (IsNull()) {
+ return "ImmutableArray NULL";
+ }
+ const char* format = "ImmutableArray len:%"Pd"";
+ intptr_t len = OS::SNPrint(NULL, 0, format, Length()) + 1;
+ char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
+ OS::SNPrint(chars, len, format, Length());
+ return chars;
}
@@ -12540,7 +12554,14 @@
const char* GrowableObjectArray::ToCString() const {
- return "GrowableObjectArray";
+ if (IsNull()) {
+ return "GrowableObjectArray NULL";
+ }
+ const char* format = "GrowableObjectArray len:%"Pd"";
+ intptr_t len = OS::SNPrint(NULL, 0, format, Length()) + 1;
+ char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
+ OS::SNPrint(chars, len, format, Length());
+ return chars;
}
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698