@@ -228,12 +228,9 @@ Become::~Become() {
228228 Thread::Current ()->isolate_group ()->set_become (nullptr );
229229}
230230
231- void Become::Add (const Object& before,
232- const Object& after,
233- const char * whence) {
231+ void Become::Add (const Object& before, const Object& after) {
234232 pointers_.Add (before.ptr ());
235233 pointers_.Add (after.ptr ());
236- whence_.Add (whence);
237234}
238235
239236void Become::VisitObjectPointers (ObjectPointerVisitor* visitor) {
@@ -296,56 +293,6 @@ void Become::Forward() {
296293 return ;
297294 }
298295
299- {
300- intptr_t conflicts = 0 ;
301- MallocDirectChainedHashMap<PtrIntTrait> map (pointers_.length () / 2 );
302- for (intptr_t i = 0 ; i < pointers_.length (); i += 2 ) {
303- ObjectPtr before = pointers_[i];
304- auto * pair = map.Lookup (before);
305- if (pair == nullptr ) {
306- map.Insert ({before, i + 1 }); // 0 value is sentinel.
307- } else {
308- intptr_t j = pair->value - 1 ; // 0 value is sentinel.
309- ObjectPtr before1 = pointers_[j];
310- ObjectPtr after1 = pointers_[j + 1 ];
311- ObjectPtr before2 = pointers_[i];
312- ObjectPtr after2 = pointers_[i + 1 ];
313- const char * whence1 = whence_[j / 2 ];
314- const char * whence2 = whence_[i / 2 ];
315-
316- OS::PrintErr (" become conflict:\n " );
317- OS::PrintErr (" whence1 = %s\n " , whence1);
318- OS::PrintErr (" whence2 = %s\n " , whence2);
319-
320- OS::PrintErr (" before1 cid = %" Pd " \n " , before1.GetClassId ());
321- OS::PrintErr (" after1 cid = %" Pd " \n " , after1.GetClassId ());
322- OS::PrintErr (" before2 cid = %" Pd " \n " , before2.GetClassId ());
323- OS::PrintErr (" after2 cid = %" Pd " \n " , after2.GetClassId ());
324-
325- OS::PrintErr (" before1 size = %" Pd " \n " , before1.untag ()->HeapSize ());
326- OS::PrintErr (" after1 size = %" Pd " \n " , after1.untag ()->HeapSize ());
327- OS::PrintErr (" before2 size = %" Pd " \n " , before2.untag ()->HeapSize ());
328- OS::PrintErr (" after2 size = %" Pd " \n " , after2.untag ()->HeapSize ());
329-
330- #ifndef PRODUCT
331- ClassTable* class_table = IsolateGroup::Current ()->class_table ();
332- OS::PrintErr (" before1 cls = %s\n " ,
333- class_table->UserVisibleNameFor (before1.GetClassId ()));
334- OS::PrintErr (" after1 cls = %s\n " ,
335- class_table->UserVisibleNameFor (after1.GetClassId ()));
336- OS::PrintErr (" before2 cls = %s\n " ,
337- class_table->UserVisibleNameFor (before2.GetClassId ()));
338- OS::PrintErr (" after2 cls = %s\n " ,
339- class_table->UserVisibleNameFor (after2.GetClassId ()));
340- #endif
341- conflicts++;
342- }
343- }
344- if (conflicts != 0 ) {
345- FATAL (" %" Pd " become conflicts" , conflicts);
346- }
347- }
348-
349296 Thread* thread = Thread::Current ();
350297 auto heap = thread->isolate_group ()->heap ();
351298
@@ -394,7 +341,6 @@ void Become::Forward() {
394341 }
395342#endif
396343 pointers_.Clear ();
397- whence_.Clear ();
398344}
399345
400346void Become::FollowForwardingPointers (Thread* thread) {
0 commit comments