[m-dev.] for review: The .NET MSIL backend.
Tyson Dowd
trd at cs.mu.OZ.AU
Thu Sep 28 20:04:51 AEDT 2000
On 22-Sep-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 22-Sep-2000, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> > The .NET MSIL (Microsoft Intermediate Language) backend.
>
> It's great to see this ready for review.
>
> You should document the new modules added in this change in
> compiler/notes/compiler_design.html.
Index: compiler/notes/compiler_design.html
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/notes/compiler_design.html,v
retrieving revision 1.49
diff -u -r1.49 compiler_design.html
--- compiler/notes/compiler_design.html 2000/08/21 14:49:49 1.49
+++ compiler/notes/compiler_design.html 2000/09/28 06:10:30
@@ -25,8 +25,8 @@
The main job of the compiler is to translate Mercury into C, although it
can also translate (subsets of) Mercury to some other languages: Goedel,
-bytecode (for a planned bytecode interpreter),
-and RL (the Aditi Relational Language).
+Mercury bytecode (for a planned bytecode interpreter), MS IL (for the
+Microsoft .NET platform) and RL (the Aditi Relational Language).
<p>
@@ -80,7 +80,8 @@
<li> 4b. code generation (annotated HLDS -> MLDS)
<li> 5b. MLDS transformations (MLDS -> MLDS)
<li> 6b. output code
- (MLDS -> C or eventually MLDS -> Java, etc.)
+ (MLDS -> C or MLDS -> MSIL
+ or eventually MLDS -> Java, etc.)
</ul>
<li> c. RL back-end
<ul type=disc>
@@ -926,12 +927,30 @@
<h4> 5b. MLDS transformations </h4>
<ul>
<li> ml_tailcall.m annotates the MLDS with information about tailcalls.
+<li> ml_optimize.m does MLDS->MLDS optimizations
<li> ml_elim_nested.m transforms the MLDS to eliminate nested functions.
</ul>
<h4> 6b. MLDS output </h4>
-mlds_to_c.m converts MLDS to C/C++ code.
+There are currently two backends that generate code from MLDS, one
+generates C/C++ code, the other generates Microsoft's Intermediate
+Language (MSIL or IL).
+<p>
+<ul>
+<li>mlds_to_c.m converts MLDS to C/C++ code.
+</ul>
+<p>
+The MLDS->IL backend is broken into several submodules.
+<ul>
+<li> mlds_to_ilasm.m converts MLDS to IL assembler and writes it to a .il file.
+<li> mlds_to_il.m converts MLDS to MSIL
+<li> ilds.m and ilasm.m contain representations of MSIL, and output
+ routines for writing MSIL to assembler.
+<li> il_peephole.m performs peephole optimization on IL instructions.
+</ul>
+After IL assembler has been emitted, ILASM in invoked to turn the .il
+file into a .dll or .exe.
<p>
<hr>
<!---------------------------------------------------------------------------->
--
Tyson Dowd #
# Surreal humour isn't everyone's cup of fur.
trd at cs.mu.oz.au #
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list