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

Unified Diff: runtime/vm/object.h

Issue 2556193003: VM: Make precompiler process constants/fields only once, avoid using pool.InfoAt() (Closed)
Patch Set: Add ": public ValueObject" Created 4 years 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/assembler.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
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 61a2866e27bbafd89d2dee7514b7633fd0217004..77b87e63a9a96b35a1d2df54549771b3dfa958f6 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -8655,6 +8655,26 @@ class UserTag : public Instance {
};
+class ObjectPoolInfo : public ValueObject {
+ public:
+ explicit ObjectPoolInfo(const ObjectPool& pool)
+ : array_(TypedData::Handle(pool.info_array())) {}
+
+ explicit ObjectPoolInfo(const TypedData& info_array) : array_(info_array) {}
+
+ ObjectPool::EntryType InfoAt(intptr_t i) {
+ return static_cast<ObjectPool::EntryType>(array_.GetInt8(i));
+ }
+
+ void SetInfoAt(intptr_t i, ObjectPool::EntryType info) {
+ array_.SetInt8(i, static_cast<int8_t>(info));
+ }
+
+ private:
+ const TypedData& array_;
Vyacheslav Egorov (Google) 2016/12/08 19:21:58 DISALLOW_COPY_AND_ASSIGN?
kustermann 2016/12/08 19:30:19 Isn't the one from the [ValueObject] superclass en
kustermann 2016/12/09 08:52:32 I think it is.
+};
+
+
// Breaking cycles and loops.
RawClass* Object::clazz() const {
uword raw_value = reinterpret_cast<uword>(raw_);
« no previous file with comments | « runtime/vm/assembler.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698