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

Unified Diff: runtime/lib/object.cc

Issue 2962543002: Revert "VM: Reland Inline instance object hash code into object header on 64bit." (Closed)
Patch Set: Created 3 years, 6 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 | « pkg/front_end/testcases/shaker/empty_program.dart.shaker ('k') | runtime/lib/object_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/object.cc
diff --git a/runtime/lib/object.cc b/runtime/lib/object.cc
index f0739adc3acdfdebdf0a6430ee4fdc9d0bbde187..b7dcea3a2088351939f96dbb7ef5d1c8b07932bf 100644
--- a/runtime/lib/object.cc
+++ b/runtime/lib/object.cc
@@ -42,25 +42,17 @@ DEFINE_NATIVE_ENTRY(Object_getHash, 1) {
// Please note that no handle is created for the argument.
// This is safe since the argument is only used in a tail call.
// The performance benefit is more than 5% when using hashCode.
-#if defined(HASH_IN_OBJECT_HEADER)
- return Smi::New(Object::GetCachedHash(arguments->NativeArgAt(0)));
-#else
Heap* heap = isolate->heap();
ASSERT(arguments->NativeArgAt(0)->IsDartInstance());
return Smi::New(heap->GetHash(arguments->NativeArgAt(0)));
-#endif
}
DEFINE_NATIVE_ENTRY(Object_setHash, 2) {
- GET_NON_NULL_NATIVE_ARGUMENT(Smi, hash, arguments->NativeArgAt(1));
-#if defined(HASH_IN_OBJECT_HEADER)
- Object::SetCachedHash(arguments->NativeArgAt(0), hash.Value());
-#else
const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0));
+ GET_NON_NULL_NATIVE_ARGUMENT(Smi, hash, arguments->NativeArgAt(1));
Heap* heap = isolate->heap();
heap->SetHash(instance.raw(), hash.Value());
-#endif
return Object::null();
}
« no previous file with comments | « pkg/front_end/testcases/shaker/empty_program.dart.shaker ('k') | runtime/lib/object_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698