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

Unified Diff: runtime/vm/object.h

Issue 2556193003: VM: Make precompiler process constants/fields only once, avoid using pool.InfoAt() (Closed)
Patch Set: 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
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 61a2866e27bbafd89d2dee7514b7633fd0217004..1dafbef4e9f0fbc2786bef845267bcc38fa74ae8 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -8655,6 +8655,26 @@ class UserTag : public Instance {
};
+class ObjectPoolInfo {
Florian Schneider 2016/12/08 18:30:45 : public ValueObject
kustermann 2016/12/08 19:14:38 Done.
+ public:
+ explicit ObjectPoolInfo(const ObjectPool& pool)
+ : array_(TypedData::Handle(pool.info_array())) {}
+
+ explicit ObjectPoolInfo(const TypedData& info_array) : array_(info_array) {}
Florian Schneider 2016/12/08 18:30:45 Not needed?
kustermann 2016/12/08 19:14:38 See comment on call site. Using this constructor m
+
+ 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_;
+};
+
+
// 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') | runtime/vm/precompiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698