diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-08-25 15:42:20 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-08-25 15:42:20 +0100 |
commit | 0ab537c563d0b937aaef29e2bb962793d308b174 (patch) | |
tree | 2c6b70c614645504ae4c97af0869834ab7c504cc /rts | |
parent | 773570edf681e26d4cd7f7a628f22c14a73b92fe (diff) | |
download | haskell-0ab537c563d0b937aaef29e2bb962793d308b174.tar.gz |
More CPP macros -> inline functions
All the wibble seem to have cancelled out, and (non-debug) object sizes
are back to where they started.
I'm not 100% sure that the types are optimal, but at least now the
functions have types and we can fix them if necessary.
Diffstat (limited to 'rts')
-rw-r--r-- | rts/Interpreter.c | 2 | ||||
-rw-r--r-- | rts/sm/Compact.c | 6 | ||||
-rw-r--r-- | rts/sm/Evac.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/rts/Interpreter.c b/rts/Interpreter.c index d879fd3e77..f3e070000b 100644 --- a/rts/Interpreter.c +++ b/rts/Interpreter.c @@ -1183,7 +1183,7 @@ run_BCO: int i; int o_itbl = BCO_GET_LARGE_ARG; int n_words = BCO_NEXT; - StgInfoTable* itbl = INFO_PTR_TO_STRUCT(BCO_LIT(o_itbl)); + StgInfoTable* itbl = INFO_PTR_TO_STRUCT((StgInfoTable *)BCO_LIT(o_itbl)); int request = CONSTR_sizeW( itbl->layout.payload.ptrs, itbl->layout.payload.nptrs ); StgClosure* con = (StgClosure*)allocate_NONUPD(cap,request); diff --git a/rts/sm/Compact.c b/rts/sm/Compact.c index 987f78b497..6a50f436d7 100644 --- a/rts/sm/Compact.c +++ b/rts/sm/Compact.c @@ -382,7 +382,7 @@ thread_stack(StgPtr p, StgPtr stack_end) StgRetFun *ret_fun = (StgRetFun *)p; StgFunInfoTable *fun_info; - fun_info = FUN_INFO_PTR_TO_STRUCT(UNTAG_CLOSURE((StgClosure *) + fun_info = FUN_INFO_PTR_TO_STRUCT((StgInfoTable *)UNTAG_CLOSURE((StgClosure *) get_threaded_info((StgPtr)ret_fun->fun))); // *before* threading it! thread(&ret_fun->fun); @@ -404,7 +404,7 @@ thread_PAP_payload (StgClosure *fun, StgClosure **payload, StgWord size) StgWord bitmap; StgFunInfoTable *fun_info; - fun_info = FUN_INFO_PTR_TO_STRUCT(UNTAG_CLOSURE((StgClosure *) + fun_info = FUN_INFO_PTR_TO_STRUCT((StgInfoTable *)UNTAG_CLOSURE((StgClosure *) get_threaded_info((StgPtr)fun))); ASSERT(fun_info->i.type != PAP); @@ -818,7 +818,7 @@ update_fwd_compact( bdescr *blocks ) // that if (p&BLOCK_MASK) >= (free&BLOCK_MASK), then we // definitely have enough room. Also see bug #1147. iptr = get_threaded_info(p); - info = INFO_PTR_TO_STRUCT(UNTAG_CLOSURE((StgClosure *)iptr)); + info = INFO_PTR_TO_STRUCT((StgInfoTable *)UNTAG_CLOSURE((StgClosure *)iptr)); q = p; diff --git a/rts/sm/Evac.c b/rts/sm/Evac.c index 20a5b098c2..867cef81fb 100644 --- a/rts/sm/Evac.c +++ b/rts/sm/Evac.c @@ -875,7 +875,7 @@ selector_chain: // make sure someone else didn't get here first... if (IS_FORWARDING_PTR(info_ptr) || - INFO_PTR_TO_STRUCT(info_ptr)->type != THUNK_SELECTOR) { + INFO_PTR_TO_STRUCT((StgInfoTable *)info_ptr)->type != THUNK_SELECTOR) { // v. tricky now. The THUNK_SELECTOR has been evacuated // by another thread, and is now either a forwarding ptr or IND. // We need to extract ourselves from the current situation @@ -898,7 +898,7 @@ selector_chain: SET_INFO(p,&stg_WHITEHOLE_info); #endif - field = INFO_PTR_TO_STRUCT(info_ptr)->layout.selector_offset; + field = INFO_PTR_TO_STRUCT((StgInfoTable *)info_ptr)->layout.selector_offset; // The selectee might be a constructor closure, // so we untag the pointer. @@ -959,7 +959,7 @@ selector_loop: info_ptr = (StgWord)UNTAG_CLOSURE(val)->header.info; if (!IS_FORWARDING_PTR(info_ptr)) { - info = INFO_PTR_TO_STRUCT(info_ptr); + info = INFO_PTR_TO_STRUCT((StgInfoTable *)info_ptr); switch (info->type) { case IND: case IND_PERM: |