pass arguments to unknown function calls in registers
authorSimon Marlow <simonmar@microsoft.com>
Tue, 28 Feb 2006 15:25:24 +0000 (15:25 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Tue, 28 Feb 2006 15:25:24 +0000 (15:25 +0000)
commit04db0e9fa47ce4dfbcb73ec1752d94195f3b394e
tree02b3360a4cd8e087cbdd84804626119d23be609a
parent174c7f292b3c18c9cc44c21bd07111f351e3913c
pass arguments to unknown function calls in registers

We now have more stg_ap entry points: stg_ap_*_fast, which take
arguments in registers according to the platform calling convention.
This is faster if the function being called is evaluated and has the
right arity, which is the common case (see the eval/apply paper for
measurements).

We still need the stg_ap_*_info entry points for stack-based
application, such as an overflows when a function is applied to too
many argumnets.  The stg_ap_*_fast functions actually just check for
an evaluated function, and if they don't find one, push the args on
the stack and invoke stg_ap_*_info.  (this might be slightly slower in
some cases, but not the common case).
ghc/compiler/cmm/CLabel.hs
ghc/compiler/codeGen/CgCallConv.hs
ghc/compiler/codeGen/CgTailCall.lhs
ghc/includes/StgMiscClosures.h
ghc/rts/Apply.cmm
ghc/rts/Exception.cmm
ghc/rts/Linker.c
ghc/rts/PrimOps.cmm
ghc/rts/StgStdThunks.cmm
ghc/utils/genapply/GenApply.hs