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

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: code review 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
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/service/service.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 1cb25dbbcfe15085eadb1e4a60795c92d6671f8c..2c6a7c5e15ab8fa239c58e76c4e5c9cd87a2fc12 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -20412,7 +20412,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());
}
@@ -20517,7 +20521,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());
}
@@ -20597,7 +20605,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());
}
@@ -20959,20 +20971,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));
}
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/service/service.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698