| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index b706fddc4169918da3ef71cedac20b47f85f389b..7ded67f79916e2d4b3b9963d0080e3319f40b780 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -12550,6 +12550,47 @@ void Code::PrintJSONImpl(JSONStream* stream, bool ref) const {
|
| JSONObject desc(&jsobj, "descriptors");
|
| descriptors.PrintToJSONObject(&desc, false);
|
| }
|
| + const Array& inlined_function_table = Array::Handle(inlined_id_to_function());
|
| + if (!inlined_function_table.IsNull()) {
|
| + JSONArray inlined_functions(&jsobj, "inlinedFunctions");
|
| + Function& function = Function::Handle();
|
| + for (intptr_t i = 0; i < inlined_function_table.Length(); i++) {
|
| + function ^= inlined_function_table.At(i);
|
| + ASSERT(!function.IsNull());
|
| + inlined_functions.AddValue(function);
|
| + }
|
| + }
|
| + const Array& intervals = Array::Handle(inlined_intervals());
|
| + if (!intervals.IsNull()) {
|
| + Smi& start = Smi::Handle();
|
| + Smi& end = Smi::Handle();
|
| + JSONArray inline_intervals(&jsobj, "inlinedIntervals");
|
| + for (intptr_t i = 0; i < intervals.Length() - Code::kInlIntNumEntries;
|
| + i += Code::kInlIntNumEntries) {
|
| + start ^= intervals.At(i + Code::kInlIntStart);
|
| + if (start.IsNull()) {
|
| + continue;
|
| + }
|
| + end ^= intervals.At(i + Code::kInlIntNumEntries + Code::kInlIntStart);
|
| +
|
| + // Format: [start, end, inline functions...]
|
| + JSONArray inline_interval(&inline_intervals);
|
| + inline_interval.AddValue(start.Value());
|
| + inline_interval.AddValue(end.Value());
|
| +
|
| + Smi& temp_smi = Smi::Handle();
|
| + temp_smi ^= intervals.At(i + Code::kInlIntInliningId);
|
| + intptr_t inlining_id = temp_smi.Value();
|
| + ASSERT(inlining_id >= 0);
|
| + temp_smi ^= intervals.At(i + Code::kInlIntCallerId);
|
| + intptr_t caller_id = temp_smi.Value();
|
| + while (inlining_id >= 0) {
|
| + inline_interval.AddValue(inlining_id);
|
| + inlining_id = caller_id;
|
| + caller_id = GetCallerId(inlining_id);
|
| + }
|
| + }
|
| + }
|
| }
|
|
|
|
|
|
|