Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 4274060f744692799699fa1d821d4330ff7e7647..b1c28aba81f2603a35d78499f7d873d65b55382d 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -20850,7 +20850,26 @@ const char* JSRegExp::ToCString() const { |
void JSRegExp::PrintJSONImpl(JSONStream* stream, bool ref) const { |
- Instance::PrintJSONImpl(stream, ref); |
+ JSONObject jsobj(stream); |
+ PrintSharedInstanceJSON(&jsobj, ref); |
+ jsobj.AddProperty("kind", "RegExp"); |
+ jsobj.AddServiceId(*this); |
+ |
+ jsobj.AddProperty("pattern", String::Handle(pattern())); |
+ |
+ if (ref) { |
+ return; |
+ } |
+ |
+ Function& func = Function::Handle(); |
+ func = function(kOneByteStringCid); |
+ jsobj.AddProperty("_oneByteFunction", func); |
+ func = function(kTwoByteStringCid); |
+ jsobj.AddProperty("_twoByteFunction", func); |
+ func = function(kExternalOneByteStringCid); |
+ jsobj.AddProperty("_externalOneByteFunction", func); |
+ func = function(kExternalTwoByteStringCid); |
+ jsobj.AddProperty("_externalTwoByteFunction", func); |
} |