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

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
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 22181)
+++ runtime/vm/object.cc (working copy)
@@ -4469,6 +4469,9 @@
if (IsLocalFunction()) {
const Function& parent = Function::Handle(parent_function());
tmp = parent.QualifiedUserVisibleName();
+ if (UserVisibleName() != Symbols::AnonymousClosure().raw()) {
+ return tmp.raw();
+ }
srdjan 2013/04/30 21:46:52 Removed this because it hides closures from nested
} else {
return UserVisibleName();
}
@@ -12364,7 +12367,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 +12439,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 +12557,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;
}

Powered by Google App Engine
This is Rietveld 408576698