Verified Commit 3d724e8f authored by Camil Staps's avatar Camil Staps
Browse files

Simplify case for _ARRAY_ in remove_forwarding_pointers_from_string

parent 65f43b78
...@@ -106,45 +106,45 @@ void remove_forwarding_pointers_from_string (Int *string_p,Int *end_forwarding_p ...@@ -106,45 +106,45 @@ void remove_forwarding_pointers_from_string (Int *string_p,Int *end_forwarding_p
elem_desc=string_p[2]; elem_desc=string_p[2];
string_p+=3; string_p+=3;
if (elem_desc!=0){
#if defined (USE_DESC_RELATIVE_TO_ARRAY) #if defined (USE_DESC_RELATIVE_TO_ARRAY)
if (elem_desc!=0)
elem_desc+=(Int)&__ARRAY__; elem_desc+=(Int)&__ARRAY__;
#endif #endif
if (elem_desc==0){ if (elem_desc==(Int)&INT+2
} else if (elem_desc==(Int)&INT+2
#if ARCH_64 #if ARCH_64
|| elem_desc==(Int)&REAL+2 || elem_desc==(Int)&REAL+2
#else #else
|| elem_desc==(Int)&INT32+2 || elem_desc==(Int)&INT32+2
|| elem_desc==(Int)&REAL32+2 || elem_desc==(Int)&REAL32+2
#endif #endif
){ ){
string_p+=array_size; string_p+=array_size;
#if ARCH_64 #if ARCH_64
} else if (elem_desc==(Int)&INT32+2 || elem_desc==(Int)&REAL32+2){ } else if (elem_desc==(Int)&INT32+2 || elem_desc==(Int)&REAL32+2){
array_size=(array_size+1)>>1; array_size=(array_size+1)>>1;
string_p+=array_size; string_p+=array_size;
#else #else
} else if (elem_desc==(Int)&REAL+2){ } else if (elem_desc==(Int)&REAL+2){
array_size<<=1; array_size<<=1;
string_p+=array_size; string_p+=array_size;
#endif #endif
} else if (elem_desc==(Int)&BOOL+2){ } else if (elem_desc==(Int)&BOOL+2){
#if ARCH_64 #if ARCH_64
array_size=(array_size+7)>>3; array_size=(array_size+7)>>3;
#else #else
array_size=(array_size+3)>>2; array_size=(array_size+3)>>2;
#endif #endif
string_p+=array_size; string_p+=array_size;
} else { } else {
Int n_field_pointers,n_non_field_pointers,field_size; Int n_field_pointers,n_non_field_pointers,field_size;
n_field_pointers=*(unsigned short *)elem_desc; n_field_pointers=*(unsigned short *)elem_desc;
field_size=((unsigned short *)elem_desc)[-1]-(Int)256; field_size=((unsigned short *)elem_desc)[-1]-(Int)256;
n_non_field_pointers=field_size-n_field_pointers; n_non_field_pointers=field_size-n_field_pointers;
string_p+=n_non_field_pointers*array_size; string_p+=n_non_field_pointers*array_size;
}
} }
} else { } else {
++string_p; ++string_p;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment