diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-09-18 20:44:20 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-09-18 20:44:20 +0100 |
commit | 3a4c64c1a2953bbc759a6f5c99dad31ab50dc96b (patch) | |
tree | 6cc936273ae8993b1ab970c1e4e5f623cfd93920 /compiler/codeGen/StgCmmLayout.hs | |
parent | 8244ec3416d6db22444e157731deb4d7b5e13824 (diff) | |
download | haskell-3a4c64c1a2953bbc759a6f5c99dad31ab50dc96b.tar.gz |
Make StgHalfWord a portable type
It's now a newtyped Integer. Perhaps a newtyped Word32 would make more
sense, though.
Diffstat (limited to 'compiler/codeGen/StgCmmLayout.hs')
-rw-r--r-- | compiler/codeGen/StgCmmLayout.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/codeGen/StgCmmLayout.hs b/compiler/codeGen/StgCmmLayout.hs index 142100e109..df4cef4a31 100644 --- a/compiler/codeGen/StgCmmLayout.hs +++ b/compiler/codeGen/StgCmmLayout.hs @@ -469,7 +469,7 @@ mkArgDescr _nm args let arg_bits = argBits dflags arg_reps arg_reps = filter isNonV (map idArgRep args) -- Getting rid of voids eases matching of standard patterns - case stdPattern arg_reps of + case stdPattern dflags arg_reps of Just spec_id -> return (ArgSpec spec_id) Nothing -> return (ArgGen arg_bits) @@ -480,9 +480,10 @@ argBits dflags (arg : args) = take (argRepSizeW dflags arg) (repeat True) ++ argBits dflags args ---------------------- -stdPattern :: [ArgRep] -> Maybe StgHalfWord -stdPattern reps - = case reps of +stdPattern :: DynFlags -> [ArgRep] -> Maybe StgHalfWord +stdPattern dflags reps + = fmap (toStgHalfWord dflags) + $ case reps of [] -> Just ARG_NONE -- just void args, probably [N] -> Just ARG_N [P] -> Just ARG_P |