| 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 patchable); | 305 patchable); |
| 306 } | 306 } |
| 307 | 307 |
| 308 | 308 |
| 309 RawObjectPool* ObjectPoolWrapper::MakeObjectPool() { | 309 RawObjectPool* ObjectPoolWrapper::MakeObjectPool() { |
| 310 intptr_t len = object_pool_.length(); | 310 intptr_t len = object_pool_.length(); |
| 311 if (len == 0) { | 311 if (len == 0) { |
| 312 return Object::empty_object_pool().raw(); | 312 return Object::empty_object_pool().raw(); |
| 313 } | 313 } |
| 314 const ObjectPool& result = ObjectPool::Handle(ObjectPool::New(len)); | 314 const ObjectPool& result = ObjectPool::Handle(ObjectPool::New(len)); |
| 315 const TypedData& info_array = TypedData::Handle(result.info_array()); |
| 315 for (intptr_t i = 0; i < len; ++i) { | 316 for (intptr_t i = 0; i < len; ++i) { |
| 316 ObjectPool::EntryType info = object_pool_[i].type_; | 317 ObjectPool::EntryType info = object_pool_[i].type_; |
| 317 result.SetInfoAt(i, info); | 318 info_array.SetInt8(i, static_cast<int8_t>(info)); |
| 318 if (info == ObjectPool::kTaggedObject) { | 319 if (info == ObjectPool::kTaggedObject) { |
| 319 result.SetObjectAt(i, *object_pool_[i].obj_); | 320 result.SetObjectAt(i, *object_pool_[i].obj_); |
| 320 } else { | 321 } else { |
| 321 result.SetRawValueAt(i, object_pool_[i].raw_value_); | 322 result.SetRawValueAt(i, object_pool_[i].raw_value_); |
| 322 } | 323 } |
| 323 } | 324 } |
| 324 return result.raw(); | 325 return result.raw(); |
| 325 } | 326 } |
| 326 | 327 |
| 327 | 328 |
| 328 } // namespace dart | 329 } // namespace dart |
| OLD | NEW |