Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 RawClass; | |
| 15 | |
| 16 class ClassTable { | |
| 17 public: | |
| 18 ClassTable(); | |
| 19 ~ClassTable(); | |
| 20 | |
| 21 RawClass* At(intptr_t index) const { | |
| 22 ASSERT(index > 0); | |
| 23 ASSERT(index < top_); | |
| 24 return table_[index]; | |
| 25 } | |
| 26 | |
| 27 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.
| |
| 28 | |
| 29 void Print(); | |
| 30 | |
| 31 private: | |
| 32 static const int initial_capacity_ = 4 * 1024; | |
| 33 | |
| 34 intptr_t top_; | |
| 35 intptr_t capacity_; | |
| 36 | |
| 37 RawClass** table_; | |
|
siva
2012/04/02 18:29:21
DISALLOW_COPY........ stuff.
Ivan Posva
2012/04/29 21:08:25
Done.
| |
| 38 }; | |
| 39 | |
| 40 } // namespace dart | |
| 41 | |
| 42 #endif // VM_CLASS_TABLE_H_ | |
| OLD | NEW |