diff -BburN gc_gen/src/common/hashcode.cpp gc_gen.new/src/common/hashcode.cpp --- gc_gen/src/common/hashcode.cpp 2008-01-22 10:57:32.000000000 +0800 +++ gc_gen.new/src/common/hashcode.cpp 2008-01-22 11:20:00.000000000 +0800 @@ -31,7 +31,7 @@ if((POINTER_SIZE_INT)dest_addr != (POINTER_SIZE_INT)p_obj){ *p_obj_size += GC_OBJECT_ALIGNMENT; obj_info = obj_info | HASHCODE_ATTACHED_BIT; - *(int*) &hashcode = hashcode_gen(p_obj); + hashcode = (POINTER_SIZE_INT)hashcode_gen(p_obj); POINTER_SIZE_INT obj_end_pos = (POINTER_SIZE_INT)dest_addr + vm_object_size(p_obj); collector_hashcodeset_add_entry(collector, (Partial_Reveal_Object**)obj_end_pos); collector_hashcodeset_add_entry(collector, (Partial_Reveal_Object**)hashcode); @@ -43,7 +43,7 @@ break; case HASHCODE_SET_BUFFERED: - *(int*) &hashcode = hashcode_buf_lookup(p_obj, old_buf); + hashcode = (POINTER_SIZE_INT)hashcode_buf_lookup(p_obj, old_buf); if((POINTER_SIZE_INT)dest_addr != (POINTER_SIZE_INT)p_obj){ *p_obj_size += GC_OBJECT_ALIGNMENT; obj_info = obj_info & ~HASHCODE_BUFFERED_BIT; @@ -52,7 +52,7 @@ collector_hashcodeset_add_entry(collector, (Partial_Reveal_Object**)obj_end_pos); collector_hashcodeset_add_entry(collector, (Partial_Reveal_Object**)hashcode); }else{ - hashcode_buf_add((Partial_Reveal_Object*)dest_addr, *(int*) &hashcode, new_buf); + hashcode_buf_add((Partial_Reveal_Object*)dest_addr, (int32)hashcode, new_buf); } break; diff -BburN gc_gen/src/common/hashcode.h gc_gen.new/src/common/hashcode.h --- gc_gen/src/common/hashcode.h 2008-01-22 10:57:32.000000000 +0800 +++ gc_gen.new/src/common/hashcode.h 2008-01-22 11:23:57.000000000 +0800 @@ -152,7 +152,7 @@ POINTER_SIZE_INT hashcode = (POINTER_SIZE_INT)*iter; iter = vector_block_iterator_advance(curr_block, iter); unlock(hashcode_buf->lock); - return *(int*)&hashcode; + return (int)hashcode; } } } @@ -167,7 +167,7 @@ Vector_Block* tail_block = (Vector_Block*)seq_list_end_node(list); vector_block_add_entry(tail_block, (POINTER_SIZE_INT) p_obj); POINTER_SIZE_INT hashcode_var = 0; - *(int*) &hashcode_var = hashcode; + hashcode_var = (POINTER_SIZE_INT)hashcode; vector_block_add_entry(tail_block, hashcode_var); if(!vector_block_is_full(tail_block)) return; @@ -236,7 +236,7 @@ iter =vector_block_iterator_advance(first_block, iter); POINTER_SIZE_INT hashcode = (POINTER_SIZE_INT)*iter; iter =vector_block_iterator_advance(first_block, iter); - hashcode_buf_add(p_obj, *(int*) &hashcode, new_buf); + hashcode_buf_add(p_obj, (int32)hashcode, new_buf); } first_block->tail = old_buf->checkpoint; @@ -251,7 +251,7 @@ POINTER_SIZE_INT hashcode = (POINTER_SIZE_INT)*iter; iter =vector_block_iterator_advance(curr_block, iter); - hashcode_buf_add(p_obj, *(int*) &hashcode, new_buf); + hashcode_buf_add(p_obj, (int32)hashcode, new_buf); } hashcode_buf_remove(old_buf, curr_block); }