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

Unified Diff: runtime/vm/object_store.h

Issue 1339363002: Reapply "Move megamorphic cache table into the Dart heap." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/object.cc ('k') | runtime/vm/object_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_store.h
diff --git a/runtime/vm/object_store.h b/runtime/vm/object_store.h
index e22a096a312ae6ee35ce8dd8f7b2b14094c7baad..fda986d8c6d37b066e664e0c66bc490561b520e6 100644
--- a/runtime/vm/object_store.h
+++ b/runtime/vm/object_store.h
@@ -433,6 +433,21 @@ class ObjectStore {
compile_time_constants_ = value.raw();
}
+ RawGrowableObjectArray* megamorphic_cache_table() const {
+ return megamorphic_cache_table_;
+ }
+ void set_megamorphic_cache_table(const GrowableObjectArray& value) {
+ megamorphic_cache_table_ = value.raw();
+ }
+ RawFunction* megamorphic_miss_function() const {
+ return megamorphic_miss_function_;
+ }
+ void SetMegamorphicMissHandler(const Code& code, const Function& func) {
+ // Hold onto the code so it is traced and not detached from the function.
+ megamorphic_miss_code_ = code.raw();
+ megamorphic_miss_function_ = func.raw();
+ }
+
// Visit all object pointers.
void VisitObjectPointers(ObjectPointerVisitor* visitor);
@@ -523,10 +538,17 @@ class ObjectStore {
RawFunction* handle_message_function_;
RawArray* library_load_error_table_;
RawArray* compile_time_constants_;
- RawObject** to() {
+ RawObject** to_snapshot() {
return reinterpret_cast<RawObject**>(&compile_time_constants_);
}
+ RawGrowableObjectArray* megamorphic_cache_table_;
+ RawCode* megamorphic_miss_code_;
+ RawFunction* megamorphic_miss_function_;
+ RawObject** to() {
+ return reinterpret_cast<RawObject**>(&megamorphic_miss_function_);
+ }
+ friend class FullSnapshotWriter;
friend class SnapshotReader;
friend class VmIsolateSnapshotReader;
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/object_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698