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

Unified Diff: runtime/vm/raw_object.h

Issue 11299298: Cache lookups at megamorphic call sites in optimized code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: One change I forgot. Created 8 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/object.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 0b305adcdf51e36574cc74bfb0ec9fc7d8d60b4a..2084e8fa2565a1dbac0b9730c7cd4b1b4cc1c0e0 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -40,6 +40,7 @@ namespace dart {
V(Context) \
V(ContextScope) \
V(ICData) \
+ V(MegamorphicCache) \
V(SubtypeTestCache) \
V(Error) \
V(ApiError) \
@@ -934,6 +935,22 @@ class RawICData : public RawObject {
};
+class RawMegamorphicCache : public RawObject {
+ RAW_HEAP_OBJECT_IMPLEMENTATION(MegamorphicCache);
+
+ RawObject** from() {
+ return reinterpret_cast<RawObject**>(&ptr()->buckets_);
+ }
+ RawArray* buckets_;
+ RawSmi* mask_;
+ RawObject** to() {
+ return reinterpret_cast<RawObject**>(&ptr()->mask_);
+ }
+
+ intptr_t filled_entry_count_;
+};
+
+
class RawSubtypeTestCache : public RawObject {
RAW_HEAP_OBJECT_IMPLEMENTATION(SubtypeTestCache);
RawArray* cache_;
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698