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

Unified Diff: runtime/vm/object.cc

Issue 1316123004: Improve display of simd vector types and stack traces in Observatory. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index dddddfb9de4ed94c1d5d25cc1ce9f3cd62fe2a85..c638cb935d4e9578d7a2d5f93b547954425400ae 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -20375,7 +20375,11 @@ const char* Float32x4::ToCString() const {
void Float32x4::PrintJSONImpl(JSONStream* stream, bool ref) const {
- Instance::PrintJSONImpl(stream, ref);
+ JSONObject jsobj(stream);
+ PrintSharedInstanceJSON(&jsobj, ref);
+ jsobj.AddProperty("kind", "Float32x4");
+ jsobj.AddServiceId(*this);
+ jsobj.AddProperty("valueAsString", ToCString());
}
@@ -20480,7 +20484,11 @@ const char* Int32x4::ToCString() const {
void Int32x4::PrintJSONImpl(JSONStream* stream, bool ref) const {
- Instance::PrintJSONImpl(stream, ref);
+ JSONObject jsobj(stream);
+ PrintSharedInstanceJSON(&jsobj, ref);
+ jsobj.AddProperty("kind", "Int32x4");
+ jsobj.AddServiceId(*this);
+ jsobj.AddProperty("valueAsString", ToCString());
}
@@ -20560,7 +20568,11 @@ const char* Float64x2::ToCString() const {
void Float64x2::PrintJSONImpl(JSONStream* stream, bool ref) const {
- Instance::PrintJSONImpl(stream, ref);
+ JSONObject jsobj(stream);
+ PrintSharedInstanceJSON(&jsobj, ref);
+ jsobj.AddProperty("kind", "Float64x2");
+ jsobj.AddServiceId(*this);
+ jsobj.AddProperty("valueAsString", ToCString());
}
@@ -20922,20 +20934,19 @@ RawStacktrace* Stacktrace::New(const Array& code_array,
}
-RawString* Stacktrace::FullStacktrace() const {
- intptr_t idx = 0;
- return String::New(ToCStringInternal(&idx));
-}
-
-
const char* Stacktrace::ToCString() const {
- const String& trace = String::Handle(FullStacktrace());
- return trace.ToCString();
+ intptr_t idx = 0;
+ return ToCStringInternal(&idx);
}
void Stacktrace::PrintJSONImpl(JSONStream* stream, bool ref) const {
- Instance::PrintJSONImpl(stream, ref);
+ JSONObject jsobj(stream);
+ PrintSharedInstanceJSON(&jsobj, ref);
+ jsobj.AddProperty("kind", "StackTrace");
+ jsobj.AddServiceId(*this);
+ intptr_t idx = 0;
+ jsobj.AddProperty("valueAsString", ToCStringInternal(&idx));
}

Powered by Google App Engine
This is Rietveld 408576698