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

Unified Diff: runtime/vm/object.h

Issue 100603011: Add GrowableObjectArray::ToUserCString(). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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 | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 31070)
+++ runtime/vm/object.h (working copy)
@@ -3964,7 +3964,11 @@
// Returns a string representation of this instance in a form
// that is suitable for an end user.
- virtual const char* ToUserCString(intptr_t maxLen = 40) const;
+ //
+ // max_len is advisory, and the returned string may exceed this max
+ // length.
+ virtual const char* ToUserCString(intptr_t max_len = 40,
+ intptr_t nesting = 0) const;
static intptr_t InstanceSize() {
return RoundedAllocationSize(sizeof(RawInstance));
@@ -4899,7 +4903,8 @@
Dart_PeerFinalizer cback) const;
// Produces a quoted, escaped, (possibly) truncated string.
- const char* ToUserCString(intptr_t maxLen = 40) const;
+ const char* ToUserCString(intptr_t max_len = 40,
+ intptr_t nesting = 0) const;
// Creates a new String object from a C string that is assumed to contain
// UTF-8 encoded characters and '\0' is considered a termination character.
@@ -5025,7 +5030,7 @@
CallbackType new_symbol,
Snapshot::Kind kind);
- intptr_t EscapedString(char* buffer, int maxLen) const;
+ intptr_t EscapedString(char* buffer, int max_len) const;
intptr_t EscapedStringLen(intptr_t tooLong) const;
FINAL_HEAP_OBJECT_IMPLEMENTATION(String, Instance);
@@ -5627,6 +5632,11 @@
return Instance::null();
}
+ // Produces a readable representation of this array, e.g. '[1,2,3]',
+ // subject to length limits.
+ const char* ToUserCString(intptr_t max_len = 40,
+ intptr_t nesting = 0) const;
+
static intptr_t type_arguments_offset() {
return OFFSET_OF(RawGrowableObjectArray, type_arguments_);
}
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698