Address additional comments re class id sorting.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2305493002 .
This commit is contained in:
Ryan Macnak 2016-08-31 17:38:20 -07:00
parent 1341e94321
commit bff1351a22
2 changed files with 4 additions and 1 deletions

View file

@ -213,6 +213,7 @@ void ClassTable::Unregister(intptr_t index) {
#if defined(DART_PRECOMPILER)
void ClassTable::Remap(intptr_t* old_to_new_cid) {
ASSERT(Thread::Current()->no_safepoint_scope_depth() > 0);
intptr_t num_cids = NumCids();
RawClass** cls_by_old_cid = new RawClass*[num_cids];
for (intptr_t i = 0; i < num_cids; i++) {

View file

@ -1885,8 +1885,10 @@ RawClass* Isolate::GetClassForHeapWalkAt(intptr_t cid) {
raw_class = class_table()->At(cid);
#endif // !PRODUCT
ASSERT(raw_class != NULL);
#if !defined(DART_PRECOMPILER)
// This is temporarily untrue during a class id remap.
// ASSERT(raw_class->ptr()->id_ == cid);
ASSERT(raw_class->ptr()->id_ == cid);
#endif
return raw_class;
}