| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 235 |
| 236 for (intptr_t i = 0; i < comments_.length(); i++) { | 236 for (intptr_t i = 0; i < comments_.length(); i++) { |
| 237 comments.SetPCOffsetAt(i, comments_[i]->pc_offset()); | 237 comments.SetPCOffsetAt(i, comments_[i]->pc_offset()); |
| 238 comments.SetCommentAt(i, comments_[i]->comment()); | 238 comments.SetCommentAt(i, comments_[i]->comment()); |
| 239 } | 239 } |
| 240 | 240 |
| 241 return comments; | 241 return comments; |
| 242 } | 242 } |
| 243 | 243 |
| 244 | 244 |
| 245 intptr_t ObjectPoolWrapper::AddObject(const Object& obj) { | 245 intptr_t ObjectPoolWrapper::AddObject(const Object& obj, |
| 246 return AddObject(ObjectPool::Entry(&obj), kNotPatchable); | 246 Patchability patchable) { |
| 247 return AddObject(ObjectPool::Entry(&obj), patchable); |
| 247 } | 248 } |
| 248 | 249 |
| 249 | 250 |
| 250 intptr_t ObjectPoolWrapper::AddImmediate(uword imm) { | 251 intptr_t ObjectPoolWrapper::AddImmediate(uword imm) { |
| 251 return AddObject(ObjectPool::Entry(imm, ObjectPool::kImmediate), | 252 return AddObject(ObjectPool::Entry(imm, ObjectPool::kImmediate), |
| 252 kNotPatchable); | 253 kNotPatchable); |
| 253 } | 254 } |
| 254 | 255 |
| 255 intptr_t ObjectPoolWrapper::AddObject(ObjectPool::Entry entry, | 256 intptr_t ObjectPoolWrapper::AddObject(ObjectPool::Entry entry, |
| 256 Patchability patchable) { | 257 Patchability patchable) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 280 intptr_t idx = object_pool_index_table_.Lookup(entry); | 281 intptr_t idx = object_pool_index_table_.Lookup(entry); |
| 281 if (idx != ObjIndexPair::kNoIndex) { | 282 if (idx != ObjIndexPair::kNoIndex) { |
| 282 return idx; | 283 return idx; |
| 283 } | 284 } |
| 284 } | 285 } |
| 285 | 286 |
| 286 return AddObject(entry, patchable); | 287 return AddObject(entry, patchable); |
| 287 } | 288 } |
| 288 | 289 |
| 289 | 290 |
| 290 intptr_t ObjectPoolWrapper::FindObject(const Object& obj) { | 291 intptr_t ObjectPoolWrapper::FindObject(const Object& obj, |
| 291 return FindObject(ObjectPool::Entry(&obj), kNotPatchable); | 292 Patchability patchable) { |
| 293 return FindObject(ObjectPool::Entry(&obj), patchable); |
| 292 } | 294 } |
| 293 | 295 |
| 294 | 296 |
| 295 intptr_t ObjectPoolWrapper::FindImmediate(uword imm) { | 297 intptr_t ObjectPoolWrapper::FindImmediate(uword imm) { |
| 296 return FindObject(ObjectPool::Entry(imm, ObjectPool::kImmediate), | 298 return FindObject(ObjectPool::Entry(imm, ObjectPool::kImmediate), |
| 297 kNotPatchable); | 299 kNotPatchable); |
| 298 } | 300 } |
| 299 | 301 |
| 300 | 302 |
| 301 intptr_t ObjectPoolWrapper::FindExternalLabel(const ExternalLabel* label, | 303 intptr_t ObjectPoolWrapper::FindExternalLabel(const ExternalLabel* label, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 328 result.SetObjectAt(i, *object_pool_[i].obj_); | 330 result.SetObjectAt(i, *object_pool_[i].obj_); |
| 329 } else { | 331 } else { |
| 330 result.SetRawValueAt(i, object_pool_[i].raw_value_); | 332 result.SetRawValueAt(i, object_pool_[i].raw_value_); |
| 331 } | 333 } |
| 332 } | 334 } |
| 333 return result.raw(); | 335 return result.raw(); |
| 334 } | 336 } |
| 335 | 337 |
| 336 | 338 |
| 337 } // namespace dart | 339 } // namespace dart |
| OLD | NEW |