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

Side by Side Diff: runtime/vm/class_table.h

Issue 187133004: When reading a full snapshot use the class id from the snapshot instead of generating a new one. Th… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/class_table.cc » ('j') | runtime/vm/class_table.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "vm/globals.h" 9 #include "vm/globals.h"
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 bool HasValidClassAt(intptr_t index) const { 109 bool HasValidClassAt(intptr_t index) const {
110 ASSERT(IsValidIndex(index)); 110 ASSERT(IsValidIndex(index));
111 return table_[index] != NULL; 111 return table_[index] != NULL;
112 } 112 }
113 113
114 intptr_t NumCids() const { return top_; } 114 intptr_t NumCids() const { return top_; }
115 115
116 void Register(const Class& cls); 116 void Register(const Class& cls);
117 117
118 void RegisterAt(intptr_t index, const Class& cls);
119
118 void VisitObjectPointers(ObjectPointerVisitor* visitor); 120 void VisitObjectPointers(ObjectPointerVisitor* visitor);
119 121
122 void Validate();
123
120 void Print(); 124 void Print();
121 125
122 void PrintToJSONStream(JSONStream* stream); 126 void PrintToJSONStream(JSONStream* stream);
123 127
124 static intptr_t table_offset() { 128 static intptr_t table_offset() {
125 return OFFSET_OF(ClassTable, table_); 129 return OFFSET_OF(ClassTable, table_);
126 } 130 }
127 131
128 // Called whenever a class is allocated in the runtime. 132 // Called whenever a class is allocated in the runtime.
129 void UpdateAllocatedNew(intptr_t cid, intptr_t size); 133 void UpdateAllocatedNew(intptr_t cid, intptr_t size);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 ClassHeapStats* StatsAt(intptr_t cid); 172 ClassHeapStats* StatsAt(intptr_t cid);
169 void UpdateLiveOld(intptr_t cid, intptr_t size); 173 void UpdateLiveOld(intptr_t cid, intptr_t size);
170 void UpdateLiveNew(intptr_t cid, intptr_t size); 174 void UpdateLiveNew(intptr_t cid, intptr_t size);
171 175
172 DISALLOW_COPY_AND_ASSIGN(ClassTable); 176 DISALLOW_COPY_AND_ASSIGN(ClassTable);
173 }; 177 };
174 178
175 } // namespace dart 179 } // namespace dart
176 180
177 #endif // VM_CLASS_TABLE_H_ 181 #endif // VM_CLASS_TABLE_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/class_table.cc » ('j') | runtime/vm/class_table.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698