| Index: runtime/vm/object.h
|
| ===================================================================
|
| --- runtime/vm/object.h (revision 18603)
|
| +++ runtime/vm/object.h (working copy)
|
| @@ -2224,8 +2224,9 @@
|
|
|
| class Instructions : public Object {
|
| public:
|
| - intptr_t size() const { return raw_ptr()->size_; }
|
| + intptr_t size() const { return raw_ptr()->size_; } // Excludes HeaderSize().
|
| RawCode* code() const { return raw_ptr()->code_; }
|
| + RawArray* object_pool() const { return raw_ptr()->object_pool_; }
|
|
|
| uword EntryPoint() const {
|
| return reinterpret_cast<uword>(raw_ptr()) + HeaderSize();
|
| @@ -2263,9 +2264,12 @@
|
| void set_size(intptr_t size) const {
|
| raw_ptr()->size_ = size;
|
| }
|
| - void set_code(RawCode* code) {
|
| + void set_code(RawCode* code) const {
|
| raw_ptr()->code_ = code;
|
| }
|
| + void set_object_pool(RawArray* object_pool) const {
|
| + raw_ptr()->object_pool_ = object_pool;
|
| + }
|
|
|
| // New is a private method as RawInstruction and RawCode objects should
|
| // only be created using the Code::FinalizeCode method. This method creates
|
| @@ -2608,6 +2612,11 @@
|
| const Instructions& instr = Instructions::Handle(instructions());
|
| return instr.size();
|
| }
|
| + bool ContainsInstructionAt(uword addr) const {
|
| + const Instructions& instr = Instructions::Handle(instructions());
|
| + const uword offset = addr - instr.EntryPoint();
|
| + return offset < static_cast<uword>(instr.size());
|
| + }
|
|
|
| RawPcDescriptors* pc_descriptors() const {
|
| return raw_ptr()->pc_descriptors_;
|
|
|