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