Chromium Code Reviews| Index: runtime/vm/object.h |
| diff --git a/runtime/vm/object.h b/runtime/vm/object.h |
| index b219ab7c5cdc3cbaee33f1d3eb32ac751c4469fc..56043be5a7c1b941d591e894fe3558117d03881a 100644 |
| --- a/runtime/vm/object.h |
| +++ b/runtime/vm/object.h |
| @@ -539,6 +539,9 @@ class Object { |
| return unhandled_exception_class_; |
| } |
| static RawClass* unwind_error_class() { return unwind_error_class_; } |
| + static RawClass* singletargetcache_class() { |
| + return singletargetcache_class_; |
| + } |
| static RawClass* icdata_class() { return icdata_class_; } |
| static RawClass* megamorphic_cache_class() { |
| return megamorphic_cache_class_; |
| @@ -790,6 +793,7 @@ class Object { |
| static RawClass* deopt_info_class_; // Class of DeoptInfo. |
| static RawClass* context_class_; // Class of the Context vm object. |
| static RawClass* context_scope_class_; // Class of ContextScope vm object. |
| + static RawClass* singletargetcache_class_; // Class of SingleTargetCache. |
| static RawClass* icdata_class_; // Class of ICData. |
| static RawClass* megamorphic_cache_class_; // Class of MegamorphiCache. |
| static RawClass* subtypetestcache_class_; // Class of SubtypeTestCache. |
| @@ -1820,6 +1824,50 @@ class PatchClass : public Object { |
| }; |
| +class SingleTargetCache : public Object { |
| + public: |
| + RawCode* target() const { return raw_ptr()->target_; } |
| + void set_target(const Code& target) const; |
| + static intptr_t target_offset() { |
| + return OFFSET_OF(RawSingleTargetCache, target_); |
| + } |
| + |
| + uword entry_point() const { return raw_ptr()->entry_point_; } |
| + void set_entry_point(uword value) const { |
| + StoreNonPointer(&raw_ptr()->entry_point_, value); |
| + } |
| + static intptr_t entry_point_offset() { |
| + return OFFSET_OF(RawSingleTargetCache, entry_point_); |
| + } |
| + |
| + intptr_t lower_limit() const { return raw_ptr()->lower_limit_; } |
| + void set_lower_limit(intptr_t value) const { |
| + StoreNonPointer(&raw_ptr()->lower_limit_, value); |
| + } |
| + static intptr_t lower_limit_offset() { |
| + return OFFSET_OF(RawSingleTargetCache, lower_limit_); |
| + } |
| + |
| + intptr_t upper_limit() const { return raw_ptr()->upper_limit_; } |
| + void set_upper_limit(intptr_t value) const { |
| + StoreNonPointer(&raw_ptr()->upper_limit_, value); |
| + } |
| + static intptr_t upper_limit_offset() { |
| + return OFFSET_OF(RawSingleTargetCache, upper_limit_); |
| + } |
|
Florian Schneider
2016/08/30 20:42:34
Should we add a macro to define these accessors? e
rmacnak
2016/08/31 16:42:57
Done.
|
| + |
| + static intptr_t InstanceSize() { |
| + return RoundedAllocationSize(sizeof(RawSingleTargetCache)); |
| + } |
| + |
| + static RawSingleTargetCache* New(); |
| + |
| + private: |
| + FINAL_HEAP_OBJECT_IMPLEMENTATION(SingleTargetCache, Object); |
| + friend class Class; |
| +}; |
| + |
| + |
| // Object holding information about an IC: test classes and their |
| // corresponding targets. The owner of the ICData can be either the function |
| // or the original ICData object. In case of background compilation we |