Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: vm/class_table.h

Issue 9965042: - Add a class index to the classes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
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.
4
5 #ifndef VM_CLASS_TABLE_H_
6 #define VM_CLASS_TABLE_H_
7
8 #include "platform/assert.h"
9 #include "platform/globals.h"
10
11 namespace dart {
12
13 class Class;
14 class ObjectPointerVisitor;
15 class RawClass;
16
17 class ClassTable {
18 public:
19 ClassTable();
20 ~ClassTable();
21
22 RawClass* At(intptr_t index) const {
23 ASSERT(index > 0);
24 ASSERT(index < top_);
25 return table_[index];
26 }
27
28 void Register(const Class& cls);
29
30 void VisitObjectPointers(ObjectPointerVisitor* visitor);
31
32 void Print();
33
34 private:
35 static const int initial_capacity_ = 4 * 1024;
36
37 intptr_t top_;
38 intptr_t capacity_;
39
40 RawClass** table_;
41
42 DISALLOW_COPY_AND_ASSIGN(ClassTable);
43 };
44
45 } // namespace dart
46
47 #endif // VM_CLASS_TABLE_H_
OLDNEW
« no previous file with comments | « vm/assembler_macros_x64.cc ('k') | vm/class_table.cc » ('j') | vm/raw_object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698