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

Unified Diff: vm/class_table.cc

Issue 10827209: Unify class ids and snapshot object ids list so that we don't have disparate and sometimes confusin… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 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/class_finalizer.cc ('k') | vm/dart_api_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/class_table.cc
===================================================================
--- vm/class_table.cc (revision 10409)
+++ vm/class_table.cc (working copy)
@@ -14,7 +14,7 @@
DEFINE_FLAG(bool, print_class_table, false, "Print initial class table.");
ClassTable::ClassTable()
- : top_(kNumPredefinedKinds), capacity_(0), table_(NULL) {
+ : top_(kNumPredefinedCids), capacity_(0), table_(NULL) {
if (Dart::vm_isolate() == NULL) {
capacity_ = initial_capacity_;
table_ = reinterpret_cast<RawClass**>(
@@ -25,13 +25,13 @@
capacity_ = vm_class_table->capacity_;
table_ = reinterpret_cast<RawClass**>(
calloc(capacity_, sizeof(RawClass*))); // NOLINT
- for (intptr_t i = kObject; i < kInstance; i++) {
+ for (intptr_t i = kObjectCid; i < kInstanceCid; i++) {
table_[i] = vm_class_table->At(i);
}
table_[kFreeListElement] = vm_class_table->At(kFreeListElement);
- table_[kNullClassId] = vm_class_table->At(kNullClassId);
- table_[kDynamicClassId] = vm_class_table->At(kDynamicClassId);
- table_[kVoidClassId] = vm_class_table->At(kVoidClassId);
+ table_[kNullCid] = vm_class_table->At(kNullCid);
+ table_[kDynamicCid] = vm_class_table->At(kDynamicCid);
+ table_[kVoidCid] = vm_class_table->At(kVoidCid);
}
}
@@ -43,9 +43,9 @@
void ClassTable::Register(const Class& cls) {
intptr_t index = cls.id();
- if (index != kIllegalObjectKind) {
+ if (index != kIllegalCid) {
ASSERT(index > 0);
- ASSERT(index < kNumPredefinedKinds);
+ ASSERT(index < kNumPredefinedCids);
ASSERT(table_[index] == 0);
ASSERT(index < capacity_);
table_[index] = cls.raw();
« no previous file with comments | « vm/class_finalizer.cc ('k') | vm/dart_api_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698