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

Unified Diff: runtime/vm/object_store.h

Issue 2137673002: Sped up hashCode by removing megamorphic call to _identityHashCode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Improved the speed of instance-of for unoptimized code. Created 4 years, 5 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 54b7044b1a5036b9a534fa22b5157f600742249a..e5c1f7666f07ebaccca310a6ff06e8cd98505b9d 100644
--- a/runtime/vm/object_store.h
+++ b/runtime/vm/object_store.h
@@ -479,6 +479,16 @@ class ObjectStore {
megamorphic_miss_function_ = func.raw();
}
+ RawFunction* simple_instance_of_function() const {
+ return simple_instance_of_function_;
+ }
+ RawFunction* simple_instance_of_true_function() const {
+ return simple_instance_of_true_function_;
+ }
+ RawFunction* simple_instance_of_false_function() const {
+ return simple_instance_of_false_function_;
+ }
+
// Visit all object pointers.
void VisitObjectPointers(ObjectPointerVisitor* visitor);
@@ -496,6 +506,9 @@ class ObjectStore {
private:
ObjectStore();
+ // Finds a core library private method in Object.
+ RawFunction* PrivateObjectLookup(const String& name);
+
#define OBJECT_STORE_FIELD_LIST(V) \
V(RawClass*, object_class_) \
V(RawType*, object_type_) \
@@ -572,12 +585,17 @@ class ObjectStore {
V(RawTypedData*, empty_uint32_array_) \
V(RawFunction*, handle_message_function_) \
V(RawArray*, library_load_error_table_) \
+ V(RawFunction*, simple_instance_of_function_) \
+ V(RawFunction*, simple_instance_of_true_function_) \
+ V(RawFunction*, simple_instance_of_false_function_) \
+ V(RawArray*, compile_time_constants_) \
V(RawArray*, unique_dynamic_targets_) \
V(RawGrowableObjectArray*, token_objects_) \
V(RawArray*, token_objects_map_) \
V(RawGrowableObjectArray*, megamorphic_cache_table_) \
V(RawCode*, megamorphic_miss_code_) \
V(RawFunction*, megamorphic_miss_function_) \
+ // Please remember the last entry must be referred in the 'to' function below.
RawObject** from() { return reinterpret_cast<RawObject**>(&object_class_); }
#define DECLARE_OBJECT_STORE_FIELD(type, name) \
« 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