Index: runtime/vm/object.h |
diff --git a/runtime/vm/object.h b/runtime/vm/object.h |
index 8e4b24ed2981d54857c2e6d980d15e6774244fb5..934697ec3b3f7ed2a6493d5dfdf2b10aa11ea329 100644 |
--- a/runtime/vm/object.h |
+++ b/runtime/vm/object.h |
@@ -3714,6 +3714,13 @@ class Instructions : public Object { |
public: |
intptr_t size() const { return raw_ptr()->size_; } // Excludes HeaderSize(). |
+ RawCode* code() const { |
+ // This should only be accessed when jitting. |
+ // TODO(johnmccutchan): Remove code back pointer. |
+ ASSERT(!Dart::IsRunningPrecompiledCode()); |
+ return raw_ptr()->code_; |
+ } |
+ |
uword EntryPoint() const { |
return reinterpret_cast<uword>(raw_ptr()) + HeaderSize(); |
} |
@@ -3752,6 +3759,10 @@ class Instructions : public Object { |
StoreNonPointer(&raw_ptr()->size_, size); |
} |
+ void set_code(RawCode* code) const { |
+ StorePointer(&raw_ptr()->code_, code); |
+ } |
+ |
// New is a private method as RawInstruction and RawCode objects should |
// only be created using the Code::FinalizeCode method. This method creates |
// the RawInstruction and RawCode objects, sets up the pointer offsets |