+ = pack_frame curr_frame_size cont_frame_size maybe_header continuation_args
+ where
+ continuation_function = CmmLit $ CmmLabel $ fromJust cont_id
+ continuation_args = map (maybe Nothing (Just . CmmReg . CmmLocal))
+ live_regs
+ needs_header_set =
+ case (curr_id, cont_id) of
+ (Just x, Just y) -> x /= y
+ _ -> isJust cont_id
+
+ maybe_header = if allow_header_set && needs_header_set
+ then Just continuation_function
+ else Nothing
+
+pack_frame :: WordOff -- ^ Current frame size
+ -> WordOff -- ^ Next frame size
+ -> Maybe CmmExpr -- ^ Next frame header if any
+ -> [Maybe CmmExpr] -- ^ Next frame data
+ -> [CmmStmt]
+pack_frame curr_frame_size next_frame_size next_frame_header frame_args =
+ store_live_values ++ set_stack_header
+ where