PreviousUpNext

15.3.192  src/lib/compiler/back/low/treecode/treecode-codebuffer.api

## treecode-codebuffer.api

# Compiled by:
#     src/lib/compiler/back/low/lib/lowhalf.lib



###                    "If you keep your mind sufficiently open,
###                     people will throw a lot of rubbish into it."
###
###                                     -- William Orton



# Implementations of this api are produced by:
#
#     src/lib/compiler/back/low/treecode/treecode-codebuffer-g.pkg

stipulate
    package rkj =  registerkinds_junk;                                          # registerkinds_junk    is from   src/lib/compiler/back/low/code/registerkinds-junk.pkg
herein

    api Treecode_Codebuffer {
        #
        package cst: Codebuffer;                                                # Codebuffer            is from   src/lib/compiler/back/low/code/codebuffer.api
        package tcf: Treecode_Form;                                             # Treecode_Form         is from   src/lib/compiler/back/low/treecode/treecode-form.api

        # Instruction buffers:
        #
        Treecode_Codebuffer ( I, A_registerset, A_cfg )                         # We put instructions I in, and in the end get a controlflow-graph A_cfg back.
          =
          cst::Codebuffer( I, List(tcf::Note), A_registerset, A_cfg );


        # treecode extension mechanism -- see http://www.cs.nyu.edu/leunga/MLRISC/Doc/html/mltree-ext.html
        #
        Reducer
          ( A_instruction,
            A_registerset,
            A_operand,
            A_addressing_mode,
            A_cfg
          )
            =
            REDUCER 
              { reduce_int_expression:          tcf::Int_Expression   -> rkj::Codetemp_Info,
                reduce_float_expression:                tcf::Float_Expression -> rkj::Codetemp_Info,

                reduce_flag_expression:         tcf::Flag_Expression  -> rkj::Codetemp_Info,
                reduce_void_expression:         (tcf::Void_Expression, List(tcf::Note)) -> Void,

                operand:                        tcf::Int_Expression -> A_operand,
                reduce_operand:                 A_operand -> rkj::Codetemp_Info,

                address_of:                             tcf::Int_Expression -> A_addressing_mode,
                put_op:                         (A_instruction, List(tcf::Note)) -> Void,

                codestream:                             Treecode_Codebuffer (A_instruction, A_registerset, A_cfg),
                treecode_stream:                Treecode_Codebuffer (tcf::Void_Expression, List(tcf::Expression), A_cfg)
              };
    };
end;





## COPYRIGHT (c) 2001 Lucent Technologies, Bell Laboratories.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext