Changes between Version 30 and Version 31 of Commentary/PrimOps


Ignore:
Timestamp:
Mar 23, 2014 11:34:20 AM (13 months ago)
Author:
tibbe
Comment:

Describe inlinable out-of-line primops

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/PrimOps

    v30 v31  
    6464   are in the [wiki:Commentary/Rts/HaskellExecution#Registers registers] R1-R8.  This is to make it easy to write the 
    6565   C-- code for these !PrimOps: we don't have to write code for multiple calling conventions. 
     66 
     67It's possible to provide inline versions of out-of-line !PimOps. This is useful when we have enough static information to generated a short, more efficient inline version. For example, a call to {{{newArray# 8# init}}} can be implemented more efficiently as an inline !PrimOp as the heap check for the array allocation can be combined with the heap check for the surrounding code. See `shouldInlinePrimOp` in [[GhcFile(compiler/codeGen/StgCmmPrim.hs)]]. 
    6668 
    6769=== Foreign out-of-line !PrimOps and `foreign import prim` ===