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

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

Issue 10825483: Add --use_cha (default true, switch to false if you use dynamic class loading). Use CHA to specify … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.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 "platform/globals.h" 9 #include "platform/globals.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 14 matching lines...) Expand all
25 25
26 RawClass* At(intptr_t index) const { 26 RawClass* At(intptr_t index) const {
27 ASSERT(IsValidIndex(index)); 27 ASSERT(IsValidIndex(index));
28 return table_[index]; 28 return table_[index];
29 } 29 }
30 30
31 intptr_t IsValidIndex(intptr_t index) const { 31 intptr_t IsValidIndex(intptr_t index) const {
32 return (index > 0) && (index < top_); 32 return (index > 0) && (index < top_);
33 } 33 }
34 34
35 bool HasValidClassAt(intptr_t index) const {
36 ASSERT(IsValidIndex(index));
37 return table_[index] != NULL;
38 }
39
40 intptr_t NumCids() const { return top_; }
41
35 void Register(const Class& cls); 42 void Register(const Class& cls);
36 43
37 void VisitObjectPointers(ObjectPointerVisitor* visitor); 44 void VisitObjectPointers(ObjectPointerVisitor* visitor);
38 45
39 void Print(); 46 void Print();
40 47
41 // Returns true if the class given by its cid has subclasses. 48 // Returns true if the class given by its cid has subclasses.
42 // Must not be called for kDartObjectCid. 49 // Must not be called for kDartObjectCid.
43 bool HasSubclasses(intptr_t cid) const; 50 bool HasSubclasses(intptr_t cid) const;
44 51
(...skipping 25 matching lines...) Expand all
70 intptr_t capacity_; 77 intptr_t capacity_;
71 78
72 RawClass** table_; 79 RawClass** table_;
73 80
74 DISALLOW_COPY_AND_ASSIGN(ClassTable); 81 DISALLOW_COPY_AND_ASSIGN(ClassTable);
75 }; 82 };
76 83
77 } // namespace dart 84 } // namespace dart
78 85
79 #endif // VM_CLASS_TABLE_H_ 86 #endif // VM_CLASS_TABLE_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698