diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-04-27 11:12:38 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-04-27 12:23:31 +0100 |
commit | 1ed0193c707a6694d242848527927f3904d1b79a (patch) | |
tree | 0bd622d2780aef3c5bb36593cdf6b02ab4d83acf /rts/PrimOps.cmm | |
parent | 3144f85661da176e3d80f28d652b42245becde09 (diff) | |
download | haskell-1ed0193c707a6694d242848527927f3904d1b79a.tar.gz |
Add a new primop mkWeakNoFinalizer (#5879)
Diffstat (limited to 'rts/PrimOps.cmm')
-rw-r--r-- | rts/PrimOps.cmm | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm index aaedabb951..93ef23a71e 100644 --- a/rts/PrimOps.cmm +++ b/rts/PrimOps.cmm @@ -384,14 +384,10 @@ stg_mkWeakzh { /* R1 = key R2 = value - R3 = finalizer (or NULL) + R3 = finalizer (or stg_NO_FINALIZER_closure) */ W_ w; - if (R3 == NULL) { - R3 = stg_NO_FINALIZER_closure; - } - ALLOC_PRIM( SIZEOF_StgWeak, R1_PTR & R2_PTR & R3_PTR, stg_mkWeakzh ); w = Hp - SIZEOF_StgWeak + WDS(1); @@ -416,6 +412,16 @@ stg_mkWeakzh RET_P(w); } +stg_mkWeakNoFinalizzerzh +{ + /* R1 = key + R2 = value + */ + R3 = stg_NO_FINALIZER_closure; + + jump stg_mkWeakzh; +} + stg_mkWeakForeignEnvzh { /* R1 = key |