| Index: runtime/vm/object.cc
|
| ===================================================================
|
| --- runtime/vm/object.cc (revision 42521)
|
| +++ runtime/vm/object.cc (working copy)
|
| @@ -12257,10 +12257,9 @@
|
| const Instructions& instr = Instructions::Handle(instructions());
|
| uword start = instr.EntryPoint();
|
| if (formatter == NULL) {
|
| - Disassembler::Disassemble(start, start + instr.size(), comments());
|
| + Disassembler::Disassemble(start, start + instr.size(), *this);
|
| } else {
|
| - Disassembler::Disassemble(start, start + instr.size(), formatter,
|
| - comments());
|
| + Disassembler::Disassemble(start, start + instr.size(), formatter, *this);
|
| }
|
| if (fix_patch) {
|
| // Redo the patch.
|
| @@ -12281,6 +12280,12 @@
|
| }
|
|
|
|
|
| +void Code::set_inlined_intervals(const Array& value) const {
|
| + ASSERT(value.IsOld());
|
| + StorePointer(&raw_ptr()->inlined_intervals_, value.raw());
|
| +}
|
| +
|
| +
|
| RawCode* Code::New(intptr_t pointer_offsets_length) {
|
| if (pointer_offsets_length < 0 || pointer_offsets_length > kMaxElements) {
|
| // This should be caught before we reach here.
|
| @@ -12631,6 +12636,44 @@
|
| }
|
|
|
|
|
| +void Code::GetInlinedFunctionsAt(
|
| + intptr_t offset, GrowableArray<Function*>* fs) const {
|
| + fs->Clear();
|
| + const Array& intervals = Array::Handle(inlined_intervals());
|
| + Smi& start = Smi::Handle();
|
| + Smi& end = Smi::Handle();
|
| + Function& function = Function::Handle();
|
| + for (intptr_t i = 0; i < intervals.Length(); i += Code::kInlIntNumEntries) {
|
| + start ^= intervals.At(i + Code::kInlIntStart);
|
| + if (!start.IsNull()) {
|
| + end ^= intervals.At(i + Code::kInlIntEnd);
|
| + if ((start.Value() <= offset) && (offset < end.Value())) {
|
| + function ^= intervals.At(i + Code::kInlIntFunction);
|
| + fs->Add(&Function::ZoneHandle(function.raw()));
|
| + }
|
| + }
|
| + }
|
| +}
|
| +
|
| +
|
| +void Code::DumpInlinedIntervals() const {
|
| + OS::Print("Inlined intervals:\n");
|
| + const Array& intervals = Array::Handle(inlined_intervals());
|
| + Smi& start = Smi::Handle();
|
| + Smi& end = Smi::Handle();
|
| + Function& function = Function::Handle();
|
| + for (intptr_t i = 0; i < intervals.Length(); i += Code::kInlIntNumEntries) {
|
| + start ^= intervals.At(i + Code::kInlIntStart);
|
| + if (!start.IsNull()) {
|
| + end ^= intervals.At(i + Code::kInlIntEnd);
|
| + function ^= intervals.At(i + Code::kInlIntFunction);
|
| + OS::Print("%" Pd " .. %" Pd " %s\n",
|
| + start.Value(), end.Value(), function.ToQualifiedCString());
|
| + }
|
| + }
|
| +}
|
| +
|
| +
|
| RawContext* Context::New(intptr_t num_variables, Heap::Space space) {
|
| ASSERT(num_variables >= 0);
|
| ASSERT(Object::context_class() != Class::null());
|
|
|