| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index d902eedf4452ce83f36a7686f5953535c73cb355..9c22c9bc3b885131885b7fe2b7e80accc49338fc 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -5543,6 +5543,27 @@ void Function::set_saved_args_desc(const Array& value) const {
|
| }
|
|
|
|
|
| +RawField* Function::LookupImplicitGetterSetterField() const {
|
| + ASSERT((kind() == RawFunction::kImplicitGetter) ||
|
| + (kind() == RawFunction::kImplicitSetter) ||
|
| + (kind() == RawFunction::kImplicitStaticFinalGetter));
|
| + const Class& owner = Class::Handle(Owner());
|
| + ASSERT(!owner.IsNull());
|
| + const Array& fields = Array::Handle(owner.fields());
|
| + ASSERT(!fields.IsNull());
|
| + Field& field = Field::Handle();
|
| + for (intptr_t i = 0; i < fields.Length(); i++) {
|
| + field ^= fields.At(i);
|
| + ASSERT(!field.IsNull());
|
| + if (field.token_pos() == token_pos()) {
|
| + return field.raw();
|
| + }
|
| + }
|
| + return Field::null();
|
| +}
|
| +
|
| +
|
| +
|
| RawFunction* Function::parent_function() const {
|
| if (IsClosureFunction()) {
|
| const Object& obj = Object::Handle(raw_ptr()->data_);
|
| @@ -7299,6 +7320,14 @@ void Function::PrintJSONImpl(JSONStream* stream, bool ref) const {
|
| jsobj.AddProperty("_optimizedCallSiteCount", optimized_call_site_count());
|
| jsobj.AddProperty("_deoptimizations",
|
| static_cast<intptr_t>(deoptimization_counter()));
|
| + if ((kind() == RawFunction::kImplicitGetter) ||
|
| + (kind() == RawFunction::kImplicitSetter) ||
|
| + (kind() == RawFunction::kImplicitStaticFinalGetter)) {
|
| + const Field& field = Field::Handle(LookupImplicitGetterSetterField());
|
| + if (!field.IsNull()) {
|
| + jsobj.AddProperty("_field", field);
|
| + }
|
| + }
|
|
|
| const Script& script = Script::Handle(this->script());
|
| if (!script.IsNull()) {
|
|
|