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

Unified Diff: runtime/vm/assembler.cc

Issue 1253373002: VM: Hoist handle allocation out of loop when creating the object pool. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler.cc
diff --git a/runtime/vm/assembler.cc b/runtime/vm/assembler.cc
index 3f3e61a12d2b70e046b5d734e739b2f74d96ac10..9d17b1b49db85872fd135fe84c0aa9589050be0d 100644
--- a/runtime/vm/assembler.cc
+++ b/runtime/vm/assembler.cc
@@ -312,9 +312,10 @@ RawObjectPool* ObjectPoolWrapper::MakeObjectPool() {
return Object::empty_object_pool().raw();
}
const ObjectPool& result = ObjectPool::Handle(ObjectPool::New(len));
+ const TypedData& info_array = TypedData::Handle(result.info_array());
for (intptr_t i = 0; i < len; ++i) {
ObjectPool::EntryType info = object_pool_[i].type_;
- result.SetInfoAt(i, info);
+ info_array.SetInt8(i, static_cast<int8_t>(info));
if (info == ObjectPool::kTaggedObject) {
result.SetObjectAt(i, *object_pool_[i].obj_);
} else {
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698