| Index: runtime/vm/object.h
|
| diff --git a/runtime/vm/object.h b/runtime/vm/object.h
|
| index bfe0470494cdd73be5e81c9cb32591ff22193038..ef381b243cd20d23840009e7b3cd0f91d52e9fe0 100644
|
| --- a/runtime/vm/object.h
|
| +++ b/runtime/vm/object.h
|
| @@ -2125,15 +2125,16 @@ class Function : public Object {
|
| // Return the most recently compiled and installed code for this function.
|
| // It is not the only Code object that points to this function.
|
| RawCode* CurrentCode() const {
|
| - return raw_ptr()->instructions_->ptr()->code_;
|
| + return raw_ptr()->code_;
|
| }
|
|
|
| RawCode* unoptimized_code() const { return raw_ptr()->unoptimized_code_; }
|
| void set_unoptimized_code(const Code& value) const;
|
| bool HasCode() const;
|
|
|
| - static intptr_t instructions_offset() {
|
| - return OFFSET_OF(RawFunction, instructions_);
|
| +
|
| + static intptr_t code_offset() {
|
| + return OFFSET_OF(RawFunction, code_);
|
| }
|
|
|
| // Returns true if there is at least one debugger breakpoint
|
| @@ -3607,14 +3608,6 @@ class ObjectPool : public Object {
|
| class Instructions : public Object {
|
| public:
|
| intptr_t size() const { return raw_ptr()->size_; } // Excludes HeaderSize().
|
| - RawCode* code() const { return raw_ptr()->code_; }
|
| - static intptr_t code_offset() {
|
| - return OFFSET_OF(RawInstructions, code_);
|
| - }
|
| - RawObjectPool* object_pool() const { return raw_ptr()->object_pool_; }
|
| - static intptr_t object_pool_offset() {
|
| - return OFFSET_OF(RawInstructions, object_pool_);
|
| - }
|
|
|
| uword EntryPoint() const {
|
| return reinterpret_cast<uword>(raw_ptr()) + HeaderSize();
|
| @@ -3653,12 +3646,6 @@ class Instructions : public Object {
|
| void set_size(intptr_t size) const {
|
| StoreNonPointer(&raw_ptr()->size_, size);
|
| }
|
| - void set_code(RawCode* code) const {
|
| - StorePointer(&raw_ptr()->code_, code);
|
| - }
|
| - void set_object_pool(RawObjectPool* object_pool) const {
|
| - StorePointer(&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
|
| @@ -3987,6 +3974,12 @@ class Code : public Object {
|
| static intptr_t instructions_offset() {
|
| return OFFSET_OF(RawCode, instructions_);
|
| }
|
| +
|
| + RawObjectPool* object_pool() const { return raw_ptr()->object_pool_; }
|
| + static intptr_t object_pool_offset() {
|
| + return OFFSET_OF(RawCode, object_pool_);
|
| + }
|
| +
|
| intptr_t pointer_offsets_length() const {
|
| return PtrOffBits::decode(raw_ptr()->state_bits_);
|
| }
|
| @@ -4009,8 +4002,7 @@ class Code : public Object {
|
| return instr.size();
|
| }
|
| RawObjectPool* GetObjectPool() const {
|
| - const Instructions& instr = Instructions::Handle(instructions());
|
| - return instr.object_pool();
|
| + return object_pool();
|
| }
|
| bool ContainsInstructionAt(uword addr) const {
|
| const Instructions& instr = Instructions::Handle(instructions());
|
| @@ -4250,6 +4242,10 @@ class Code : public Object {
|
| private:
|
| void set_state_bits(intptr_t bits) const;
|
|
|
| + void set_object_pool(RawObjectPool* object_pool) const {
|
| + StorePointer(&raw_ptr()->object_pool_, object_pool);
|
| + }
|
| +
|
| friend class RawObject; // For RawObject::SizeFromClass().
|
| friend class RawCode;
|
| enum {
|
| @@ -4270,8 +4266,6 @@ class Code : public Object {
|
| : FindObjectVisitor(Isolate::Current()), pc_(pc) { }
|
| virtual ~FindRawCodeVisitor() { }
|
|
|
| - virtual uword filter_addr() const { return pc_; }
|
| -
|
| // Check if object matches find condition.
|
| virtual bool FindObject(RawObject* obj) const;
|
|
|
|
|