| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/assembler.h" | 5 #include "vm/assembler.h" |
| 6 | 6 |
| 7 #include "platform/utils.h" | 7 #include "platform/utils.h" |
| 8 #include "vm/cpu.h" | 8 #include "vm/cpu.h" |
| 9 #include "vm/heap.h" | 9 #include "vm/heap.h" |
| 10 #include "vm/memory_region.h" | 10 #include "vm/memory_region.h" |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 patchable); | 312 patchable); |
| 313 } | 313 } |
| 314 | 314 |
| 315 | 315 |
| 316 RawObjectPool* ObjectPoolWrapper::MakeObjectPool() { | 316 RawObjectPool* ObjectPoolWrapper::MakeObjectPool() { |
| 317 intptr_t len = object_pool_.length(); | 317 intptr_t len = object_pool_.length(); |
| 318 if (len == 0) { | 318 if (len == 0) { |
| 319 return Object::empty_object_pool().raw(); | 319 return Object::empty_object_pool().raw(); |
| 320 } | 320 } |
| 321 const ObjectPool& result = ObjectPool::Handle(ObjectPool::New(len)); | 321 const ObjectPool& result = ObjectPool::Handle(ObjectPool::New(len)); |
| 322 const TypedData& info_array = TypedData::Handle(result.info_array()); | 322 ObjectPoolInfo pool_info(result); |
| 323 for (intptr_t i = 0; i < len; ++i) { | 323 for (intptr_t i = 0; i < len; ++i) { |
| 324 ObjectPool::EntryType info = object_pool_[i].type_; | 324 ObjectPool::EntryType info = object_pool_[i].type_; |
| 325 info_array.SetInt8(i, static_cast<int8_t>(info)); | 325 pool_info.SetInfoAt(i, info); |
| 326 if (info == ObjectPool::kTaggedObject) { | 326 if (info == ObjectPool::kTaggedObject) { |
| 327 result.SetObjectAt(i, *object_pool_[i].obj_); | 327 result.SetObjectAt(i, *object_pool_[i].obj_); |
| 328 } else { | 328 } else { |
| 329 result.SetRawValueAt(i, object_pool_[i].raw_value_); | 329 result.SetRawValueAt(i, object_pool_[i].raw_value_); |
| 330 } | 330 } |
| 331 } | 331 } |
| 332 return result.raw(); | 332 return result.raw(); |
| 333 } | 333 } |
| 334 | 334 |
| 335 | 335 |
| 336 } // namespace dart | 336 } // namespace dart |
| OLD | NEW |