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 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1314 | 1314 |
1315 class CodeLookupTableBuilder : public ObjectVisitor { | 1315 class CodeLookupTableBuilder : public ObjectVisitor { |
1316 public: | 1316 public: |
1317 explicit CodeLookupTableBuilder(CodeLookupTable* table) : table_(table) { | 1317 explicit CodeLookupTableBuilder(CodeLookupTable* table) : table_(table) { |
1318 ASSERT(table_ != NULL); | 1318 ASSERT(table_ != NULL); |
1319 } | 1319 } |
1320 | 1320 |
1321 ~CodeLookupTableBuilder() {} | 1321 ~CodeLookupTableBuilder() {} |
1322 | 1322 |
1323 void VisitObject(RawObject* raw_obj) { | 1323 void VisitObject(RawObject* raw_obj) { |
1324 uword tags = raw_obj->ptr()->tags_; | 1324 uint32_t tags = raw_obj->ptr()->tags_; |
1325 if (RawObject::ClassIdTag::decode(tags) == kCodeCid) { | 1325 if (RawObject::ClassIdTag::decode(tags) == kCodeCid) { |
1326 RawCode* raw_code = reinterpret_cast<RawCode*>(raw_obj); | 1326 RawCode* raw_code = reinterpret_cast<RawCode*>(raw_obj); |
1327 const Code& code = Code::Handle(raw_code); | 1327 const Code& code = Code::Handle(raw_code); |
1328 ASSERT(!code.IsNull()); | 1328 ASSERT(!code.IsNull()); |
1329 const Instructions& instructions = | 1329 const Instructions& instructions = |
1330 Instructions::Handle(code.instructions()); | 1330 Instructions::Handle(code.instructions()); |
1331 ASSERT(!instructions.IsNull()); | 1331 ASSERT(!instructions.IsNull()); |
1332 table_->Add(code); | 1332 table_->Add(code); |
1333 } | 1333 } |
1334 } | 1334 } |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1612 | 1612 |
1613 | 1613 |
1614 ProcessedSampleBuffer::ProcessedSampleBuffer() | 1614 ProcessedSampleBuffer::ProcessedSampleBuffer() |
1615 : code_lookup_table_(new CodeLookupTable(Thread::Current())) { | 1615 : code_lookup_table_(new CodeLookupTable(Thread::Current())) { |
1616 ASSERT(code_lookup_table_ != NULL); | 1616 ASSERT(code_lookup_table_ != NULL); |
1617 } | 1617 } |
1618 | 1618 |
1619 #endif // !PRODUCT | 1619 #endif // !PRODUCT |
1620 | 1620 |
1621 } // namespace dart | 1621 } // namespace dart |
OLD | NEW |