PreviousUpNext

15.3.118  src/lib/compiler/back/low/main/main/backend-lowhalf-core.api

## backend-lowhalf-core.api

# Compiled by:
#     src/lib/compiler/core.sublib



# Api to capture various aspects of the backend lowhalf.

stipulate
    package pp  =  standard_prettyprinter;                                                              # standard_prettyprinter                is from   src/lib/prettyprint/big/src/standard-prettyprinter.pkg
    package cv  =  compiler_verbosity;                                                                  # compiler_verbosity                    is from   src/lib/compiler/front/basics/main/compiler-verbosity.pkg
    #
    Npp = pp::Npp;
herein

    # This api gets included in:
    #
    #     src/lib/compiler/back/low/main/main/backend-lowhalf.api
    #
    # (As part of above) this api is implemented in:
    #
    #     src/lib/compiler/back/low/main/main/backend-lowhalf-g.pkg
    #
    api Backend_Lowhalf_Core {
        #
        package mu:  Machcode_Universals;                                                               # Machcode_Universals                   is from   src/lib/compiler/back/low/code/machcode-universals.api
                                                                                                        # "mu" == "machcode universals".

        package ae:  Machcode_Codebuffer_Pp                                                             # Machcode_Codebuffer_Pp                is from   src/lib/compiler/back/low/emit/machcode-codebuffer-pp.api
                     where                                                                              # "ae"  == "asm emitter".
                         mcf == mu::mcf;                                                                # "mcf" == "machcode_form" (abstract machine code).

        package mcg: Machcode_Controlflow_Graph                                                         # Machcode_Controlflow_Graph            is from   src/lib/compiler/back/low/mcg/machcode-controlflow-graph.api
                     where
                          mcf == ae::mcf                                                                # "mcf" == "machcode_form" (abstract machine code).
                     also pop == ae::cst::pop;                                                          # "pop" == "pseudo_op".

        Lowhalf_Phase
            =
            ( String,
              # 
              (pp::Npp, cv::Compiler_Verbosity)
                 -> mcg::Machcode_Controlflow_Graph
                 -> mcg::Machcode_Controlflow_Graph
            ); 

        make_phase:      ( String,
                           #
                           (pp::Npp, cv::Compiler_Verbosity)
                                -> mcg::Machcode_Controlflow_Graph
                                -> mcg::Machcode_Controlflow_Graph
                         )
                         -> Lowhalf_Phase;

        optimizer_hook:  Ref(  List(  Lowhalf_Phase ) );                                                # List of backend lowhalf phases to run.

        squash_jumps_and_write_all_machine_code_and_data_bytes_into_code_segment_buffer
          :
          (Npp, cv::Compiler_Verbosity)  ->  Void;
    };
end;




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


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext