| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_CLASS_TABLE_H_ | 5 #ifndef VM_CLASS_TABLE_H_ |
| 6 #define VM_CLASS_TABLE_H_ | 6 #define VM_CLASS_TABLE_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "platform/globals.h" | 9 #include "platform/globals.h" |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 return table_[index]; | 25 return table_[index]; |
| 26 } | 26 } |
| 27 | 27 |
| 28 void Register(const Class& cls); | 28 void Register(const Class& cls); |
| 29 | 29 |
| 30 void VisitObjectPointers(ObjectPointerVisitor* visitor); | 30 void VisitObjectPointers(ObjectPointerVisitor* visitor); |
| 31 | 31 |
| 32 void Print(); | 32 void Print(); |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 static const int initial_capacity_ = 32 * 1024; | 35 static const int initial_capacity_ = 512; |
| 36 static const int capacity_increment_ = 256; |
| 36 | 37 |
| 37 intptr_t top_; | 38 intptr_t top_; |
| 38 intptr_t capacity_; | 39 intptr_t capacity_; |
| 39 | 40 |
| 40 RawClass** table_; | 41 RawClass** table_; |
| 41 | 42 |
| 42 DISALLOW_COPY_AND_ASSIGN(ClassTable); | 43 DISALLOW_COPY_AND_ASSIGN(ClassTable); |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 } // namespace dart | 46 } // namespace dart |
| 46 | 47 |
| 47 #endif // VM_CLASS_TABLE_H_ | 48 #endif // VM_CLASS_TABLE_H_ |
| OLD | NEW |