| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "platform/address_sanitizer.h" | 5 #include "platform/address_sanitizer.h" |
| 6 #include "platform/memory_sanitizer.h" | 6 #include "platform/memory_sanitizer.h" |
| 7 #include "platform/utils.h" | 7 #include "platform/utils.h" |
| 8 | 8 |
| 9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 10 #include "vm/atomic.h" | 10 #include "vm/atomic.h" |
| (...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1420 ASSERT(thread != NULL); | 1420 ASSERT(thread != NULL); |
| 1421 Isolate* isolate = thread->isolate(); | 1421 Isolate* isolate = thread->isolate(); |
| 1422 ASSERT(isolate != NULL); | 1422 ASSERT(isolate != NULL); |
| 1423 Isolate* vm_isolate = Dart::vm_isolate(); | 1423 Isolate* vm_isolate = Dart::vm_isolate(); |
| 1424 ASSERT(vm_isolate != NULL); | 1424 ASSERT(vm_isolate != NULL); |
| 1425 | 1425 |
| 1426 // Clear. | 1426 // Clear. |
| 1427 code_objects_.Clear(); | 1427 code_objects_.Clear(); |
| 1428 | 1428 |
| 1429 // Add all found Code objects. | 1429 // Add all found Code objects. |
| 1430 CodeLookupTableBuilder cltb(this); | 1430 { |
| 1431 vm_isolate->heap()->IterateOldObjects(&cltb); | 1431 HeapIterationScope iteration; |
| 1432 isolate->heap()->IterateOldObjects(&cltb); | 1432 CodeLookupTableBuilder cltb(this); |
| 1433 iteration.IterateVMIsolateObjects(&cltb); |
| 1434 iteration.IterateOldObjects(&cltb); |
| 1435 } |
| 1433 | 1436 |
| 1434 // Sort by entry. | 1437 // Sort by entry. |
| 1435 code_objects_.Sort(CodeDescriptor::Compare); | 1438 code_objects_.Sort(CodeDescriptor::Compare); |
| 1436 | 1439 |
| 1437 #if defined(DEBUG) | 1440 #if defined(DEBUG) |
| 1438 if (length() <= 1) { | 1441 if (length() <= 1) { |
| 1439 return; | 1442 return; |
| 1440 } | 1443 } |
| 1441 ASSERT(FindCode(0) == NULL); | 1444 ASSERT(FindCode(0) == NULL); |
| 1442 ASSERT(FindCode(~0) == NULL); | 1445 ASSERT(FindCode(~0) == NULL); |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1681 } | 1684 } |
| 1682 | 1685 |
| 1683 ProcessedSampleBuffer::ProcessedSampleBuffer() | 1686 ProcessedSampleBuffer::ProcessedSampleBuffer() |
| 1684 : code_lookup_table_(new CodeLookupTable(Thread::Current())) { | 1687 : code_lookup_table_(new CodeLookupTable(Thread::Current())) { |
| 1685 ASSERT(code_lookup_table_ != NULL); | 1688 ASSERT(code_lookup_table_ != NULL); |
| 1686 } | 1689 } |
| 1687 | 1690 |
| 1688 #endif // !PRODUCT | 1691 #endif // !PRODUCT |
| 1689 | 1692 |
| 1690 } // namespace dart | 1693 } // namespace dart |
| OLD | NEW |