| 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 29 matching lines...) Expand all Loading... |
| 286 intptr_t idx = object_pool_index_table_.Lookup(entry); | 287 intptr_t idx = object_pool_index_table_.Lookup(entry); |
| 287 if (idx != ObjIndexPair::kNoIndex) { | 288 if (idx != ObjIndexPair::kNoIndex) { |
| 288 return idx; | 289 return idx; |
| 289 } | 290 } |
| 290 } | 291 } |
| 291 | 292 |
| 292 return AddObject(entry, patchable); | 293 return AddObject(entry, patchable); |
| 293 } | 294 } |
| 294 | 295 |
| 295 | 296 |
| 296 intptr_t ObjectPoolWrapper::FindObject(const Object& obj) { | 297 intptr_t ObjectPoolWrapper::FindObject(const Object& obj, |
| 297 return FindObject(ObjectPool::Entry(&obj), kNotPatchable); | 298 Patchability patchable) { |
| 299 return FindObject(ObjectPool::Entry(&obj), patchable); |
| 298 } | 300 } |
| 299 | 301 |
| 300 | 302 |
| 301 intptr_t ObjectPoolWrapper::FindImmediate(uword imm) { | 303 intptr_t ObjectPoolWrapper::FindImmediate(uword imm) { |
| 302 return FindObject(ObjectPool::Entry(imm, ObjectPool::kImmediate), | 304 return FindObject(ObjectPool::Entry(imm, ObjectPool::kImmediate), |
| 303 kNotPatchable); | 305 kNotPatchable); |
| 304 } | 306 } |
| 305 | 307 |
| 306 | 308 |
| 307 intptr_t ObjectPoolWrapper::FindExternalLabel(const ExternalLabel* label, | 309 intptr_t ObjectPoolWrapper::FindExternalLabel(const ExternalLabel* label, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 327 result.SetObjectAt(i, *object_pool_[i].obj_); | 329 result.SetObjectAt(i, *object_pool_[i].obj_); |
| 328 } else { | 330 } else { |
| 329 result.SetRawValueAt(i, object_pool_[i].raw_value_); | 331 result.SetRawValueAt(i, object_pool_[i].raw_value_); |
| 330 } | 332 } |
| 331 } | 333 } |
| 332 return result.raw(); | 334 return result.raw(); |
| 333 } | 335 } |
| 334 | 336 |
| 335 | 337 |
| 336 } // namespace dart | 338 } // namespace dart |
| OLD | NEW |