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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 } | 268 } |
269 return object_pool_.length() - 1; | 269 return object_pool_.length() - 1; |
270 } | 270 } |
271 | 271 |
272 | 272 |
273 intptr_t ObjectPoolWrapper::FindObject(ObjectPoolWrapperEntry entry, | 273 intptr_t ObjectPoolWrapper::FindObject(ObjectPoolWrapperEntry entry, |
274 Patchability patchable) { | 274 Patchability patchable) { |
275 // If the object is not patchable, check if we've already got it in the | 275 // If the object is not patchable, check if we've already got it in the |
276 // object pool. | 276 // object pool. |
277 if (patchable == kNotPatchable) { | 277 if (patchable == kNotPatchable) { |
278 intptr_t idx = object_pool_index_table_.Lookup(entry); | 278 intptr_t idx = object_pool_index_table_.LookupValue(entry); |
279 if (idx != ObjIndexPair::kNoIndex) { | 279 if (idx != ObjIndexPair::kNoIndex) { |
280 return idx; | 280 return idx; |
281 } | 281 } |
282 } | 282 } |
283 return AddObject(entry, patchable); | 283 return AddObject(entry, patchable); |
284 } | 284 } |
285 | 285 |
286 | 286 |
287 intptr_t ObjectPoolWrapper::FindObject(const Object& obj, | 287 intptr_t ObjectPoolWrapper::FindObject(const Object& obj, |
288 Patchability patchable) { | 288 Patchability patchable) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 result.SetObjectAt(i, *object_pool_[i].obj_); | 324 result.SetObjectAt(i, *object_pool_[i].obj_); |
325 } else { | 325 } else { |
326 result.SetRawValueAt(i, object_pool_[i].raw_value_); | 326 result.SetRawValueAt(i, object_pool_[i].raw_value_); |
327 } | 327 } |
328 } | 328 } |
329 return result.raw(); | 329 return result.raw(); |
330 } | 330 } |
331 | 331 |
332 | 332 |
333 } // namespace dart | 333 } // namespace dart |
OLD | NEW |