Commit 2471a6ba authored by Simon Marlow's avatar Simon Marlow

Use canned heap checks to save a few bytes of code

parent d81d70ba
......@@ -381,6 +381,9 @@
TICK_ALLOC_PRIM(SIZEOF_StgHeader,bytes-SIZEOF_StgHeader,0); \
CCCS_ALLOC(bytes);
#define ALLOC_PRIM_(bytes,fun) \
ALLOC_PRIM_WITH_CUSTOM_FAILURE(bytes,GC_PRIM(fun));
#define ALLOC_PRIM_P(bytes,fun,arg) \
ALLOC_PRIM_WITH_CUSTOM_FAILURE(bytes,GC_PRIM_P(fun,arg));
......
......@@ -252,7 +252,7 @@ stg_newMutVarzh ( gcptr init )
{
W_ mv;
ALLOC_PRIM (SIZEOF_StgMutVar);
ALLOC_PRIM_P (SIZEOF_StgMutVar, stg_newMutVarzh, init);
mv = Hp - SIZEOF_StgMutVar + WDS(1);
SET_HDR(mv,stg_MUT_VAR_DIRTY_info,CCCS);
......@@ -1154,7 +1154,7 @@ stg_newMVarzh ()
{
W_ mvar;
ALLOC_PRIM (SIZEOF_StgMVar);
ALLOC_PRIM_ (SIZEOF_StgMVar, stg_newMVarzh);
mvar = Hp - SIZEOF_StgMVar + WDS(1);
SET_HDR(mvar,stg_MVAR_DIRTY_info,CCCS);
......
Markdown is supported
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