11#ifndef RUNTIME_VM_RAW_OBJECT_FIELDS_H_
12#define RUNTIME_VM_RAW_OBJECT_FIELDS_H_
22#if defined(DART_PRECOMPILER) || defined(DART_ENABLE_HEAP_SNAPSHOT_WRITER)
24class OffsetsTable :
public ZoneAllocated {
32 struct OffsetsTableEntry {
34 const char* field_name;
35 bool is_compressed_pointer;
39 static const MallocGrowableArray<OffsetsTableEntry>& offsets_table();
44 struct IntAndIntToStringMapTraits {
45 typedef std::pair<intptr_t, intptr_t>
Key;
46 typedef const char*
Value;
55 static Value ValueOf(
Pair pair) {
return pair.value; }
56 static Key KeyOf(
Pair pair) {
return pair.key; }
61 return x.key.first ==
y.first &&
x.key.second ==
y.second;
65 DirectChainedHashMap<IntAndIntToStringMapTraits> cached_offsets_;
const char * FieldNameForOffset(intptr_t cid, intptr_t offset)
static uint32_t WordHash(intptr_t key)
static uint32_t Hash(uint32_t key)