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

Unified Diff: runtime/vm/object.cc

Issue 1208153002: Include pattern and functions for RegExps over the service protocol. Remove quadratic behavior from… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/observatory/lib/src/service/object.dart ('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 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);
}
« no previous file with comments | « runtime/observatory/lib/src/service/object.dart ('k') | runtime/vm/service/service.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698