J_Gc.c
void walkArray(J_Object obj){
  int len = J_ARRAY_LEN(obj), i;
  uint32_t type = J_ARRAY_TYPE(obj);
 
  if(IS_MARK(obj)) return;

  if(GC_DBG)
	printf("(arr:%d,%d)",type,len);

  if(type==1){					/* array of objects */
	J_Var* objects = J_ARRAY_START(obj);
	for(i=0;i<len;i++){
	  J_UtfString tmp;
	  J_Class* jc = J_OBJ_CLASS(objects[i].obj);
	 /* interested situation : if array of objects already created but still not filled fully ! */
	  if(jc==NULL) continue;
	  
	  if(GC_DBG){
		tmp = jGetClassName(jc,jc->thisClassIdx);
		tmp.str[tmp.len]=0; 
		printf("=>[%s : %d]",tmp.str,objects[i].obj);
	  } 

	  jWalkObjectsFields(jc,objects[i].obj);
	  MARK(obj);
	  MARK(objects[i].obj);
	}
  }
  if(GC_DBG) printf("\n");
}
/**
 *  Walk throught the all array's elements
 */
Walk throught the all array's elements
Walk throught the all array ' s elements
void walkArray(J_Object obj){
  int len = J_ARRAY_LEN(obj), i;
  uint32_t type = J_ARRAY_TYPE(obj);
  if(IS_MARK(obj)) return;
  if(GC_DBG)
	printf("(arr:%d,%d)",type,len);
  if(type==1){					
	J_Var* objects = J_ARRAY_START(obj);
	for(i=0;i<len;i++){
	  J_UtfString tmp;
	  J_Class* jc = J_OBJ_CLASS(objects[i].obj);
	  if(jc==NULL) continue;
	  if(GC_DBG){
		tmp = jGetClassName(jc,jc->thisClassIdx);
		tmp.str[tmp.len]=0; 
		printf("=>[%s : %d]",tmp.str,objects[i].obj);
	  } 
	  jWalkObjectsFields(jc,objects[i].obj);
	  MARK(obj);
	  MARK(objects[i].obj);
	}
  }
  if(GC_DBG) printf("\n");
}
void walkArray ( J_Object obj ) { int len = J_ARRAY_LEN ( obj ) , i ; uint32_t type = J_ARRAY_TYPE ( obj ) ; if ( IS_MARK ( obj ) ) return ; if ( GC_DBG ) printf ( " " , type , len ) ; if ( type == 1 ) { J_Var * objects = J_ARRAY_START ( obj ) ; for ( i = 0 ; i < len ; i ++ ) { J_UtfString tmp ; J_Class * jc = J_OBJ_CLASS ( objects [ i ] . obj ) ; if ( jc == NULL ) continue ; if ( GC_DBG ) { tmp = jGetClassName ( jc , jc -> thisClassIdx ) ; tmp . str [ tmp . len ] = 0 ; printf ( " " , tmp . str , objects [ i ] . obj ) ; } jWalkObjectsFields ( jc , objects [ i ] . obj ) ; MARK ( obj ) ; MARK ( objects [ i ] . obj ) ; } } if ( GC_DBG ) printf ( " \n " ) ; }
Walk throught the all array's elements
Walk throught the all array ' s elements
/* array of objects */ /* interested situation : if array of objects already created but still not filled fully ! */