summaryrefslogtreecommitdiff
path: root/src/intern_table.h
blob: 61da28b211144e109843724136cfa92d9b35918f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2011 Google Inc. All Rights Reserved.

#ifndef ART_SRC_INTERN_TABLE_H_
#define ART_SRC_INTERN_TABLE_H_

#include "unordered_map.h"

#include "heap.h"
#include "object.h"

namespace art {

class InternTable {
 public:
  InternTable();
  String* Intern(int32_t utf16_length, const char* utf8_data);
  void VisitRoots(Heap::RootVistor* root_visitor, void* arg);

 private:
  typedef std::tr1::unordered_multimap<int32_t, String*> Table;
  Table intern_table_;
  Mutex* intern_table_lock_;
};

}  // namespace art

#endif  // ART_SRC_CLASS_LINKER_H_