Commit c526e095 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

primops: Add haddocks to BCO primops

Test Plan: none

Reviewers: simonmar, austin, hvr

Subscribers: hvr, thomie

Differential Revision: https://phabricator.haskell.org/D1082

GHC Trac Issues: #10640
parent 49373ffe
......@@ -2439,7 +2439,11 @@ primop TagToEnumOp "tagToEnum#" GenPrimOp
------------------------------------------------------------------------
section "Bytecode operations"
{Support for the bytecode interpreter and linker.}
{Support for manipulating bytecode objects used by the interpreter and
linker.
Bytecode objects are heap objects which represent top-level bindings and
contain a list of instructions and data needed by these instructions.}
------------------------------------------------------------------------
primtype BCO#
......@@ -2453,11 +2457,17 @@ primop AddrToAnyOp "addrToAny#" GenPrimOp
primop MkApUpd0_Op "mkApUpd0#" GenPrimOp
BCO# -> (# a #)
{Wrap a BCO in a {\tt AP_UPD} thunk which will be updated with the vaule of
the BCO when evaluated.}
with
out_of_line = True
primop NewBCOOp "newBCO#" GenPrimOp
ByteArray# -> ByteArray# -> Array# a -> Int# -> ByteArray# -> State# s -> (# State# s, BCO# #)
{{\tt newBCO\#} instrs lits ptrs arity bitmap} creates a new bytecode object. The
resulting object encodes a function of the given arity with the instructions
encoded in {\tt instrs}, and a static reference table usage bitmap given by
{\tt bitmap}.}
with
has_side_effects = True
out_of_line = True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment