X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcodeGen%2FStgCmmLayout.hs;h=3b69061426219a1097efdf16b46165e55d6d972a;hb=e95ee1f718c6915c478005aad8af81705357d6ab;hp=0e98e148ae5b50d09f8e8fe8fa602583215bb8e7;hpb=984a288119983912d40a80845c674ee4b83a19ce;p=ghc-hetmet.git diff --git a/compiler/codeGen/StgCmmLayout.hs b/compiler/codeGen/StgCmmLayout.hs index 0e98e14..3b69061 100644 --- a/compiler/codeGen/StgCmmLayout.hs +++ b/compiler/codeGen/StgCmmLayout.hs @@ -474,17 +474,18 @@ emitClosureProcAndInfoTable top_lvl bndr cl_info args body ; let node_points = nodeMustPointToIt lf_info ; arg_regs <- bindArgsToRegs args ; let args' = if node_points then (node : arg_regs) else arg_regs - ; emitClosureAndInfoTable cl_info args' $ body (node, arg_regs) + conv = if nodeMustPointToIt lf_info + then NativeNodeCall else NativeDirectCall + ; emitClosureAndInfoTable cl_info conv args' $ body (node, arg_regs) } -- Data constructors need closures, but not with all the argument handling -- needed for functions. The shared part goes here. -emitClosureAndInfoTable :: ClosureInfo -> [LocalReg] -> FCode () -> FCode () -emitClosureAndInfoTable cl_info args body +emitClosureAndInfoTable :: + ClosureInfo -> Convention -> [LocalReg] -> FCode () -> FCode () +emitClosureAndInfoTable cl_info conv args body = do { info <- mkCmmInfo cl_info ; blks <- getCode body - ; let conv = if nodeMustPointToIt (closureLFInfo cl_info) then NativeNodeCall - else NativeDirectCall ; emitProcWithConvention conv info (infoLblToEntryLbl info_lbl) args blks } where