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

Unified Diff: runtime/vm/object.h

Issue 1420433004: Move selector and arguments descriptor into MegamorphicCache. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: parne Created 5 years, 2 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/megamorphic_cache_table.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 d597bfc494f0f676952117d3c774e6e019ac069f..583b8fefbe8de0b0c9379e77214f4ffd751335b9 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -4599,6 +4599,14 @@ class MegamorphicCache : public Object {
intptr_t mask() const;
void set_mask(intptr_t mask) const;
+ RawString* target_name() const {
+ return raw_ptr()->target_name_;
+ }
+
+ RawArray* arguments_descriptor() const {
+ return raw_ptr()->args_descriptor_;
+ }
+
intptr_t filled_entry_count() const;
void set_filled_entry_count(intptr_t num) const;
@@ -4608,8 +4616,12 @@ class MegamorphicCache : public Object {
static intptr_t mask_offset() {
return OFFSET_OF(RawMegamorphicCache, mask_);
}
+ static intptr_t arguments_descriptor_offset() {
+ return OFFSET_OF(RawMegamorphicCache, args_descriptor_);
+ }
- static RawMegamorphicCache* New();
+ static RawMegamorphicCache* New(const String& target_name,
+ const Array& arguments_descriptor);
void EnsureCapacity() const;
@@ -4622,6 +4634,11 @@ class MegamorphicCache : public Object {
private:
friend class Class;
+ static RawMegamorphicCache* New();
+
+ void set_target_name(const String& value) const;
+ void set_arguments_descriptor(const Array& value) const;
+
enum {
kClassIdIndex,
kTargetFunctionIndex,
« no previous file with comments | « runtime/vm/megamorphic_cache_table.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698