コード例 #1
0
 public ViewTrace(RArray real) {
   getCounts = new int[real.size()];
   allocationSite = TRACE_ALLOCATION_SITE ? new Site() : null;
   useSites = new HashSet<Site>();
   realView = real;
   viewsRegistry.add(this);
   linkChildren(real, this);
 }
コード例 #2
0
 private Site updateUseSite() {
   if (TRACE_USE_SITES) {
     Site here = new Site();
     useSites.add(here);
     return here;
   } else if (TRACE_SINGLE_USE_SITE) {
     if (multipleUseSites) {
       return null;
     } else {
       Site here = new Site();
       if (singleUseSite == null) {
         singleUseSite = here;
       } else {
         if (!here.equals(singleUseSite)) {
           multipleUseSites = true;
           singleUseSite = null;
         }
       }
       return here;
     }
   } else {
     return null;
   }
 }