static L heapWalker_pathToGCRoot(Instance i) { new L path; while licensed { path.add(i); Instance j = i.getNearestGCRootPointer(); if (j == null) null; // No path to GC root? if (j == i) break; i = j; } ret path; }