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

Unified Diff: runtime/vm/object.cc

Issue 1410443003: Eliminate unused function maps (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 5093676b15ac886596a070f0552d72fc184c1ab4..43b9034ae18dafb8e2631e99a9cddcb93a4d52dc 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -2168,8 +2168,8 @@ void Class::SetFunctions(const Array& value) const {
ASSERT(!value.IsNull());
StorePointer(&raw_ptr()->functions_, value.raw());
const intptr_t len = value.Length();
- ClassFunctionsSet set(HashTables::New<ClassFunctionsSet>(len, Heap::kOld));
if (len >= kFunctionLookupHashTreshold) {
+ ClassFunctionsSet set(HashTables::New<ClassFunctionsSet>(len, Heap::kOld));
Function& func = Function::Handle();
for (intptr_t i = 0; i < len; ++i) {
func ^= value.At(i);
@@ -2177,8 +2177,8 @@ void Class::SetFunctions(const Array& value) const {
ASSERT(func.Owner() == raw());
set.Insert(func);
}
+ StorePointer(&raw_ptr()->functions_hash_table_, set.Release().raw());
}
- StorePointer(&raw_ptr()->functions_hash_table_, set.Release().raw());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698