Index: runtime/vm/zone.cc |
=================================================================== |
--- runtime/vm/zone.cc (revision 5367) |
+++ runtime/vm/zone.cc (working copy) |
@@ -243,4 +243,21 @@ |
} |
} |
+ |
+char* Zone::PrintToString(const char* format, ...) { |
+ va_list args; |
+ va_start(args, format); |
+ intptr_t len = OS::VSNPrint(NULL, 0, format, args); |
+ va_end(args); |
+ |
+ char* buffer = reinterpret_cast<char*>(Allocate(len + 1)); |
+ va_list args2; |
+ va_start(args2, format); |
+ OS::VSNPrint(buffer, (len + 1), format, args2); |
+ va_end(args2); |
+ |
+ return buffer; |
+} |
+ |
+ |
} // namespace dart |