harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x..@apache.org
Subject svn commit: r575557 - in /harmony/enhanced/drlvm/trunk/vm/gc_gen/src: common/gc_common.h common/gc_for_class.h common/gc_metadata.h utils/sync_pool.h utils/sync_stack.h utils/vector_block.h
Date Fri, 14 Sep 2007 06:27:06 GMT
Author: xli
Date: Thu Sep 13 23:27:06 2007
New Revision: 575557

URL: http://svn.apache.org/viewvc?rev=575557&view=rev
Log:
HARMONY-4783 : change "inline" to "FORCE_INLINE" to force the compiler to inline

Modified:
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_common.h
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.h
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_metadata.h
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_pool.h
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_stack.h
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/vector_block.h

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_common.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_common.h?rev=575557&r1=575556&r2=575557&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_common.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_common.h Thu Sep 13 23:27:06 2007
@@ -214,7 +214,7 @@
   return gcvt->gc_ref_offset_array;    
 }
 
-inline REF* object_ref_iterator_get(int* iterator, Partial_Reveal_Object *obj)
+FORCE_INLINE REF* object_ref_iterator_get(int* iterator, Partial_Reveal_Object *obj)
 {
   return (REF*)((POINTER_SIZE_INT)obj + *iterator);
 }
@@ -294,7 +294,7 @@
 inline Boolean obj_is_marked_in_oi(Partial_Reveal_Object *obj) 
 {  return ( get_obj_info_raw(obj) & CONST_MARK_BIT ); }
 
-inline Boolean obj_mark_in_oi(Partial_Reveal_Object *obj) 
+FORCE_INLINE Boolean obj_mark_in_oi(Partial_Reveal_Object *obj) 
 {  
   Obj_Info_Type info = get_obj_info_raw(obj);
   if ( info & CONST_MARK_BIT ) return FALSE;
@@ -512,10 +512,10 @@
 
 #endif /* STATIC_NOS_MAPPING */
 
-inline Boolean addr_belongs_to_nos(void* addr)
+FORCE_INLINE Boolean addr_belongs_to_nos(void* addr)
 { return addr >= nos_boundary; }
 
-inline Boolean obj_belongs_to_nos(Partial_Reveal_Object* p_obj)
+FORCE_INLINE Boolean obj_belongs_to_nos(Partial_Reveal_Object* p_obj)
 { return addr_belongs_to_nos(p_obj); }
 
 extern void* los_boundary;

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.h?rev=575557&r1=575556&r2=575557&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.h Thu Sep 13 23:27:06 2007
@@ -171,122 +171,122 @@
 #endif
 
 
-inline Obj_Info_Type get_obj_info_raw(Partial_Reveal_Object *obj) 
+FORCE_INLINE Obj_Info_Type get_obj_info_raw(Partial_Reveal_Object *obj) 
 {  assert(obj); return obj->obj_info; }
 
 #ifndef MARK_BIT_FLIPPING
 
-inline Obj_Info_Type get_obj_info(Partial_Reveal_Object *obj) 
+FORCE_INLINE Obj_Info_Type get_obj_info(Partial_Reveal_Object *obj) 
 {  assert(obj); return obj->obj_info & ~CONST_MARK_BIT; }
 
 #else
 
-inline Obj_Info_Type get_obj_info(Partial_Reveal_Object *obj) 
+FORCE_INLINE Obj_Info_Type get_obj_info(Partial_Reveal_Object *obj) 
 {  assert(obj); return obj->obj_info & DUAL_MARKBITS_MASK; }
 
 #endif /* MARK_BIT_FLIPPING */
 
-inline void set_obj_info(Partial_Reveal_Object *obj, Obj_Info_Type new_obj_info) 
+FORCE_INLINE void set_obj_info(Partial_Reveal_Object *obj, Obj_Info_Type new_obj_info) 
 {  assert(obj); obj->obj_info = new_obj_info; }
 
-inline Obj_Info_Type *get_obj_info_addr(Partial_Reveal_Object *obj) 
+FORCE_INLINE Obj_Info_Type *get_obj_info_addr(Partial_Reveal_Object *obj) 
 {  assert(obj); return &obj->obj_info; }
 
-inline VT obj_get_vt_raw(Partial_Reveal_Object *obj) 
+FORCE_INLINE VT obj_get_vt_raw(Partial_Reveal_Object *obj) 
 {  assert(obj && obj->vt_raw); return obj->vt_raw; }
 
-inline VT *obj_get_vt_addr(Partial_Reveal_Object *obj) 
+FORCE_INLINE VT *obj_get_vt_addr(Partial_Reveal_Object *obj) 
 {  assert(obj && obj->vt_raw); return &obj->vt_raw; }
 
 /*Fixme: emt64*/
-inline VT obj_get_vt(Partial_Reveal_Object *obj) 
+FORCE_INLINE VT obj_get_vt(Partial_Reveal_Object *obj) 
 {  assert(obj && obj->vt_raw); return (VT)((POINTER_SIZE_INT)obj->vt_raw &
~CLEAR_VT_MARK); }
 
-inline void obj_set_vt(Partial_Reveal_Object *obj, VT ah) 
+FORCE_INLINE void obj_set_vt(Partial_Reveal_Object *obj, VT ah) 
 {  assert(obj && ah); obj->vt_raw = ah; }
 
 /*Fixme: emt64, we should check whether gcvt is compressed first!*/
-inline GC_VTable_Info *vtable_get_gcvt_raw(Partial_Reveal_VTable* vt) 
+FORCE_INLINE GC_VTable_Info *vtable_get_gcvt_raw(Partial_Reveal_VTable* vt) 
 {  assert(vt && vt->gcvt); return vt->gcvt; }
 
-inline GC_VTable_Info *vtable_get_gcvt(Partial_Reveal_VTable* vt) 
+FORCE_INLINE GC_VTable_Info *vtable_get_gcvt(Partial_Reveal_VTable* vt) 
 {
   assert(vt && vt->gcvt);
   return (GC_VTable_Info*)((POINTER_SIZE_INT)vt->gcvt & GC_CLASS_FLAGS_MASK);
 }
 
-inline void vtable_set_gcvt(Partial_Reveal_VTable *vt, GC_VTable_Info *new_gcvt) 
+FORCE_INLINE void vtable_set_gcvt(Partial_Reveal_VTable *vt, GC_VTable_Info *new_gcvt) 
 /*Fixme: emt64*/
 {  assert(vt && new_gcvt); vt->gcvt = new_gcvt; }
 
-inline GC_VTable_Info *obj_get_gcvt_raw(Partial_Reveal_Object *obj) 
+FORCE_INLINE GC_VTable_Info *obj_get_gcvt_raw(Partial_Reveal_Object *obj) 
 {
   Partial_Reveal_VTable *vtable = uncompress_vt(obj_get_vt(obj));
   return vtable_get_gcvt_raw(vtable);
 }
 
-inline GC_VTable_Info *obj_get_gcvt(Partial_Reveal_Object *obj) 
+FORCE_INLINE GC_VTable_Info *obj_get_gcvt(Partial_Reveal_Object *obj) 
 {
   Partial_Reveal_VTable* vtable = uncompress_vt(obj_get_vt(obj) );
   return vtable_get_gcvt(vtable);
 }
 
-inline Boolean object_has_ref_field(Partial_Reveal_Object *obj) 
+FORCE_INLINE Boolean object_has_ref_field(Partial_Reveal_Object *obj) 
 {
   GC_VTable_Info *gcvt = obj_get_gcvt_raw(obj);
   return (Boolean)((POINTER_SIZE_INT)gcvt & GC_CLASS_FLAG_REFS);
 }
 
-inline Boolean object_has_ref_field_before_scan(Partial_Reveal_Object *obj) 
+FORCE_INLINE Boolean object_has_ref_field_before_scan(Partial_Reveal_Object *obj) 
 {
   Partial_Reveal_VTable *vt = uncompress_vt(obj_get_vt_raw(obj));
   GC_VTable_Info *gcvt = vtable_get_gcvt_raw(vt);
   return (Boolean)((POINTER_SIZE_INT)gcvt & GC_CLASS_FLAG_REFS);
 }
 
-inline unsigned int object_ref_field_num(Partial_Reveal_Object *obj) 
+FORCE_INLINE unsigned int object_ref_field_num(Partial_Reveal_Object *obj) 
 {
   GC_VTable_Info *gcvt = obj_get_gcvt(obj);
   return gcvt->gc_number_of_ref_fields;   
 }
 
-inline Boolean object_is_array(Partial_Reveal_Object *obj) 
+FORCE_INLINE Boolean object_is_array(Partial_Reveal_Object *obj) 
 {
   GC_VTable_Info *gcvt = obj_get_gcvt_raw(obj);
   return (Boolean)((POINTER_SIZE_INT)gcvt & GC_CLASS_FLAG_ARRAY);
 } 
 
-inline Boolean obj_is_primitive_array(Partial_Reveal_Object *obj) 
+FORCE_INLINE Boolean obj_is_primitive_array(Partial_Reveal_Object *obj) 
 {
   return object_is_array(obj) && !object_has_ref_field(obj);
 }
 
-inline Class_Handle obj_get_class_handle(Partial_Reveal_Object *obj) 
+FORCE_INLINE Class_Handle obj_get_class_handle(Partial_Reveal_Object *obj) 
 {
   GC_VTable_Info *gcvt = obj_get_gcvt(obj);  
   return gcvt->gc_clss;
 }
 
-inline unsigned int nonarray_object_size(Partial_Reveal_Object *obj) 
+FORCE_INLINE unsigned int nonarray_object_size(Partial_Reveal_Object *obj) 
 {
   GC_VTable_Info *gcvt = obj_get_gcvt(obj);  
   return gcvt->gc_allocated_size;
 }
 
-inline unsigned int array_first_element_offset(Partial_Reveal_Array *obj)
+FORCE_INLINE unsigned int array_first_element_offset(Partial_Reveal_Array *obj)
 { 
   GC_VTable_Info *gcvt = obj_get_gcvt((Partial_Reveal_Object*)obj);
   return gcvt->array_first_elem_offset;
 }
 
-inline unsigned int array_object_size(Partial_Reveal_Object *obj) 
+FORCE_INLINE unsigned int array_object_size(Partial_Reveal_Object *obj) 
 {
   GC_VTable_Info *gcvt = obj_get_gcvt(obj);  
   int array_len = ((Partial_Reveal_Array*)obj)->array_len;
   return (gcvt->array_first_elem_offset + gcvt->array_elem_size * array_len + GC_OBJECT_ALIGN_MASK)
& (~GC_OBJECT_ALIGN_MASK);
 }
 
-inline unsigned int vm_object_size(Partial_Reveal_Object *obj)
+FORCE_INLINE unsigned int vm_object_size(Partial_Reveal_Object *obj)
 {
   Boolean is_array = object_is_array(obj);
   return is_array? array_object_size(obj) : nonarray_object_size(obj);
@@ -295,19 +295,20 @@
 #define CL_PROP_REFERENCE_TYPE_SHIFT 16
 #define CL_PROP_REFERENCE_TYPE_MASK 0x00030000
 
-inline WeakReferenceType special_reference_type(Partial_Reveal_Object *p_reference)
+FORCE_INLINE WeakReferenceType special_reference_type(Partial_Reveal_Object *p_reference)
 {
   GC_VTable_Info *gcvt = obj_get_gcvt(p_reference);
   return (WeakReferenceType)((gcvt->gc_class_properties & CL_PROP_REFERENCE_TYPE_MASK)
>> CL_PROP_REFERENCE_TYPE_SHIFT);
 }
 
-inline Boolean type_has_finalizer(Partial_Reveal_VTable *vt)
+FORCE_INLINE Boolean type_has_finalizer(Partial_Reveal_VTable *vt)
 {
   GC_VTable_Info *gcvt = vtable_get_gcvt_raw(vt);
   return (Boolean)(POINTER_SIZE_INT)gcvt & GC_CLASS_FLAG_FINALIZER;
 }
 
 #endif //#ifndef _GC_TYPES_H_
+
 
 
 

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_metadata.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_metadata.h?rev=575557&r1=575556&r2=575557&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_metadata.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_metadata.h Thu Sep 13 23:27:06 2007
@@ -195,7 +195,7 @@
 }
 #endif
 
-inline void collector_tracestack_push(Collector* collector, void* p_task)
+FORCE_INLINE void collector_tracestack_push(Collector* collector, void* p_task)
 {
   /* we don't have assert as others because p_task is a p_obj for marking,
      or a p_ref for trace forwarding. The latter can be a root set pointer */

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_pool.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_pool.h?rev=575557&r1=575556&r2=575557&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_pool.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_pool.h Thu Sep 13 23:27:06 2007
@@ -29,7 +29,7 @@
 inline Pool* sync_pool_create(){ return sync_stack_init(); }
 inline void sync_pool_destruct(Pool* pool){ sync_stack_destruct(pool); }
 
-inline Boolean pool_is_empty(Pool* pool){ return sync_stack_is_empty(pool);}
+FORCE_INLINE Boolean pool_is_empty(Pool* pool){ return sync_stack_is_empty(pool);}
 inline void pool_empty(Pool* pool) { sync_stack_empty(pool); }
 
 inline unsigned int pool_size(Pool* pool){ return sync_stack_size(pool); }
@@ -51,6 +51,7 @@
 inline Vector_Block* pool_iterator_next(Pool* pool){ return (Vector_Block*)sync_stack_iterate_next(pool);}
 
 #endif /* #ifndef _SYNC_POOL_H_ */
+
 
 
 

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_stack.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_stack.h?rev=575557&r1=575556&r2=575557&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_stack.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_stack.h Thu Sep 13 23:27:06 2007
@@ -142,7 +142,7 @@
 
 /* it does not matter whether this is atomic or not, because
    it is only invoked when there is no contention or only for rough idea */
-inline Boolean sync_stack_is_empty(Sync_Stack* stack)
+FORCE_INLINE Boolean sync_stack_is_empty(Sync_Stack* stack)
 {
   return (stack_top_get_entry(stack->top) == NULL);
 }

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/vector_block.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/vector_block.h?rev=575557&r1=575556&r2=575557&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/vector_block.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/vector_block.h Thu Sep 13 23:27:06 2007
@@ -201,7 +201,7 @@
 #endif
 }
 
-inline Boolean vector_stack_is_empty(Vector_Block* block)
+FORCE_INLINE Boolean vector_stack_is_empty(Vector_Block* block)
 {  return (block->head == block->tail); }
 
 /*
@@ -209,10 +209,10 @@
 { return (block->head - block->entries) == VECTOR_BLOCK_ENTRY_NUM; }
 */
 
-inline Boolean vector_stack_is_full(Vector_Block* block)
+FORCE_INLINE Boolean vector_stack_is_full(Vector_Block* block)
 {  return (block->head == block->entries); }
 
-inline void vector_stack_push(Vector_Block* block, POINTER_SIZE_INT value)
+FORCE_INLINE void vector_stack_push(Vector_Block* block, POINTER_SIZE_INT value)
 { 
   block->head--;
 #ifdef _DEBUG
@@ -221,7 +221,7 @@
   *(block->head) = value;
 }
 
-inline POINTER_SIZE_INT vector_stack_pop(Vector_Block* block)
+FORCE_INLINE POINTER_SIZE_INT vector_stack_pop(Vector_Block* block)
 {   
   POINTER_SIZE_INT value = *block->head;
 #ifdef _DEBUG



Mime
View raw message