## codebuffer-g.pkg
#
# See comments in
#
#
src/lib/compiler/back/low/code/codebuffer.api# Compiled by:
#
src/lib/compiler/back/low/lib/lowhalf.libstipulate
package lbl = codelabel; # codelabel is from
src/lib/compiler/back/low/code/codelabel.pkgherein
# This generic is invoked in:
#
#
src/lib/compiler/back/low/main/intel32/backend-lowhalf-intel32-g.pkg #
src/lib/compiler/back/low/main/pwrpc32/backend-lowhalf-pwrpc32.pkg #
src/lib/compiler/back/low/main/sparc32/backend-lowhalf-sparc32.pkg #
generic package codebuffer_g (
# ============
#
pop: Pseudo_Ops # Pseudo_Ops is from
src/lib/compiler/back/low/mcg/pseudo-op.api )
: (weak) Codebuffer # Codebuffer is from
src/lib/compiler/back/low/code/codebuffer.api {
# Export to client packages:
#
package pop = pop; # "pop" == "pseudo_op".
Codebuffer (X,Y,Z,W) # X == instruction
=
{
start_new_cccomponent: Int -> Void, # Start new callgraph connected component (our unit of code compilation).
get_completed_cccomponent: Y -> W, # End of cccomponent -- finalize and return it.
put_op: X -> Void, # Emit instruction.
put_pseudo_op: pop::Pseudo_Op -> Void, # Emit a pseudo op.
put_public_label: lbl::Codelabel -> Void, # Define an externally visible codelabel marking current spot in codestream.
put_private_label: lbl::Codelabel -> Void, # Define an externally invisible codelabel marking current spot in codestream.
put_comment: String -> Void, # Emit comment.
put_bblock_note: note::Note -> Void, # Add annotation.
get_notes: Void -> Ref( note::Notes ), # Get annotations.
put_fn_liveout_info: Z -> Void # Mark the end of a procedure.
};
};
end;