Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Unified Diff: runtime/vm/object.h

Issue 1377583005: Restore back pointer from Instructions to Code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 3e1083a052844c4b8da2f8dd2e5e1d5e35cf4ce0..9b5a28c0fdad870521a3ccb3c02e4d8c53e2f96a 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -3714,6 +3714,8 @@ class Instructions : public Object {
public:
intptr_t size() const { return raw_ptr()->size_; } // Excludes HeaderSize().
+ RawCode* code() const { return raw_ptr()->code_; }
rmacnak 2015/09/29 16:50:12 ASSERT(!Dart::IsRunningPrecompiledCode());
Cutch 2015/09/29 23:24:29 Done.
+
uword EntryPoint() const {
return reinterpret_cast<uword>(raw_ptr()) + HeaderSize();
}
@@ -3752,6 +3754,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
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698