blob: 61da28b211144e109843724136cfa92d9b35918f [file] [log] [blame]
Brian Carlstrom7e93b502011-08-04 14:16:22 -07001// Copyright 2011 Google Inc. All Rights Reserved.
2
3#ifndef ART_SRC_INTERN_TABLE_H_
4#define ART_SRC_INTERN_TABLE_H_
5
6#include "unordered_map.h"
7
8#include "heap.h"
9#include "object.h"
10
11namespace art {
12
13class InternTable {
14 public:
15 InternTable();
16 String* Intern(int32_t utf16_length, const char* utf8_data);
17 void VisitRoots(Heap::RootVistor* root_visitor, void* arg);
18
19 private:
20 typedef std::tr1::unordered_multimap<int32_t, String*> Table;
21 Table intern_table_;
22 Mutex* intern_table_lock_;
23};
24
25} // namespace art
26
27#endif // ART_SRC_CLASS_LINKER_H_