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

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: Incorporate review comments, add no such method test. 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
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_;

Powered by Google App Engine
This is Rietveld 408576698