## translate-treecode-to-machcode.api --- translate treecodes to a Machcode_Controlflow_Graph.
#
# "Intuitively, this [api] states that the [package] [exports]
# a function that can transform a stream of [Treecode] statements
# into a stream of instructions of the target machine."
#
# -- http://www.cs.nyu.edu/leunga/MLRISC/Doc/html/instrsel.html
#
# Treecode is the last machine-independent
# intermediate code representation used in
# the compiler; we translate it to machcode,
# the abstract instruction set of the target
# machine, which in turn will be translated
# into asmcode -- target machine assembly -- or
# execode -- actual absolute binary machine language.
# Compiled by:
#
src/lib/compiler/back/low/lib/lowhalf.lib### "In the end, it's not the years in your life
### that count. It's the life in your years."
###
### -- Abraham Lincoln
# Implementations of this api are generated by:
#
#
src/lib/compiler/back/low/intel32/treecode/translate-treecode-to-machcode-intel32-g.pkg#
src/lib/compiler/back/low/pwrpc32/treecode/translate-treecode-to-machcode-pwrpc32-g.pkg#
src/lib/compiler/back/low/sparc32/treecode/translate-treecode-to-machcode-sparc32-g.pkgapi Translate_Treecode_To_Machcode {
#
package tcs: Treecode_Codebuffer; # Treecode_Codebuffer is from
src/lib/compiler/back/low/treecode/treecode-codebuffer.api package mcf: Machcode_Form; # Machcode_Form is from
src/lib/compiler/back/low/code/machcode-form.api package mcg: Machcode_Controlflow_Graph # Machcode_Controlflow_Graph is from
src/lib/compiler/back/low/mcg/machcode-controlflow-graph.api where
mcf == mcf # "mcf" == "machcode_form" (abstract machine code).
also pop == tcs::cst::pop; # "pop" == "pseudo_op".
package tct
: Treecode_Tranforms # Treecode_Tranforms is from
src/lib/compiler/back/low/treecode/treecode-transforms.api where
tcf == tcs::tcf; # "tcf" == "treecode_form";
Codebuffer
=
tcs::Treecode_Codebuffer (
#
mcf::Machine_Op,
mcf::rgk::Codetemplists,
mcg::Machcode_Controlflow_Graph
);
Treecode_Codebuffer
=
tcs::Treecode_Codebuffer (
#
tcs::tcf::Void_Expression,
#
List( tcs::tcf::Expression ),
#
mcg::Machcode_Controlflow_Graph
);
# Here we accept a machcode (abstract machine-code)
# buffer and return a filter which transparently
# translates treecode machcode which is then stored
# in the buffer. This gets used in
#
#
src/lib/compiler/back/low/main/main/translate-nextcode-to-treecode-g.pkg #
# The Codebuffer api is defined in:
#
#
src/lib/compiler/back/low/code/codebuffer.api #
make_treecode_to_machcode_codebuffer: Codebuffer -> Treecode_Codebuffer;
};
## COPYRIGHT (c) 1995 AT&T Bell Laboratories.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.