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

Unified 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, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vm/assembler_macros_ia32.cc ('k') | vm/class_table.cc » ('j') | vm/object.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/class_table.h
===================================================================
--- vm/class_table.h (revision 0)
+++ vm/class_table.h (revision 0)
@@ -0,0 +1,42 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef VM_CLASS_TABLE_H_
+#define VM_CLASS_TABLE_H_
+
+#include "platform/assert.h"
+#include "platform/globals.h"
+
+namespace dart {
+
+class Class;
+class RawClass;
+
+class ClassTable {
+ public:
+ ClassTable();
+ ~ClassTable();
+
+ RawClass* At(intptr_t index) const {
+ ASSERT(index > 0);
+ ASSERT(index < top_);
+ return table_[index];
+ }
+
+ void Register(const Class& cls);
siva 2012/04/02 18:29:21 Need a VisitObjectPointers function here to traver
Ivan Posva 2012/04/29 21:08:25 Done.
+
+ void Print();
+
+ private:
+ static const int initial_capacity_ = 4 * 1024;
+
+ intptr_t top_;
+ intptr_t capacity_;
+
+ RawClass** table_;
siva 2012/04/02 18:29:21 DISALLOW_COPY........ stuff.
Ivan Posva 2012/04/29 21:08:25 Done.
+};
+
+} // namespace dart
+
+#endif // VM_CLASS_TABLE_H_
« no previous file with comments | « vm/assembler_macros_ia32.cc ('k') | vm/class_table.cc » ('j') | vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698