vm-service: Include bytecode with _RegExp objects.

BUG=http://dartbug.com/26042
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1822933002 .
This commit is contained in:
Ryan Macnak 2016-03-31 10:05:18 -07:00
parent 0f5c249f22
commit 1c107c4fbd
3 changed files with 22 additions and 0 deletions

View file

@ -323,6 +323,18 @@
<any-service-ref ref="{{ instance.externalTwoByteFunction }}"></any-service-ref>
</div>
</div>
<div class="memberItem">
<div class="memberName">oneByteBytecode</div>
<div class="memberValue">
<any-service-ref ref="{{ instance.oneByteBytecode }}"></any-service-ref>
</div>
</div>
<div class="memberItem">
<div class="memberName">twoByteBytecode</div>
<div class="memberValue">
<any-service-ref ref="{{ instance.twoByteBytecode }}"></any-service-ref>
</div>
</div>
</div>
</template>

View file

@ -2323,6 +2323,8 @@ class Instance extends HeapObject {
@observable Function twoByteFunction; // If a RegExp.
@observable Function externalOneByteFunction; // If a RegExp.
@observable Function externalTwoByteFunction; // If a RegExp.
@observable Instance oneByteBytecode; // If a RegExp.
@observable Instance twoByteBytecode; // If a RegExp.
@observable bool isCaseSensitive; // If a RegExp.
@observable bool isMultiLine; // If a RegExp.
@ -2414,6 +2416,8 @@ class Instance extends HeapObject {
twoByteFunction = map['_twoByteFunction'];
externalOneByteFunction = map['_externalOneByteFunction'];
externalTwoByteFunction = map['_externalTwoByteFunction'];
oneByteBytecode = map['_oneByteBytecode'];
twoByteBytecode = map['_twoByteBytecode'];
nativeFields = map['_nativeFields'];
fields = map['fields'];

View file

@ -1542,6 +1542,12 @@ void RegExp::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("_externalOneByteFunction", func);
func = function(kExternalTwoByteStringCid);
jsobj.AddProperty("_externalTwoByteFunction", func);
TypedData& bc = TypedData::Handle();
bc = bytecode(true);
jsobj.AddProperty("_oneByteBytecode", bc);
bc = bytecode(false);
jsobj.AddProperty("_twoByteBytecode", bc);
}