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

Unified Diff: runtime/vm/object.h

Issue 12260026: Add support for object pool (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | « runtime/vm/native_entry_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « runtime/vm/native_entry_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698