forward to the list.
-------- Original Message --------
Subject: Re: [polyml] Documentation of Poly/ML opcode
Date: Sat, 01 May 2010 13:58:45 -0500
From: Yue Li <xyly...@gmail.com>
To: David Matthews <david.matth...@prolingua.co.uk>
Hi, David,
On 05/01/2010 06:38 AM, David Matthews wrote:
Hi,
The opcodes in int_opcodes.h apply only to the interpreted version of
Poly/ML and the interpreter is only used on platforms where there is
no native code-generator.
I see. Ok!
There's not much, if any, documentation for the internals of the
compiler or run-time system. Probably the most useful data structures
to look at are in mlsource/MLCompiler/CODETREESIG.ML .
I did not discover that before. The IR is really helpful! Thanks!
The top-level of the compiler builds this intermediate level data
structure and the optimiser transforms it. It is then code-generated
by the bottom level using either a native code-generator; for the X86
(32 or 64-bit), PPC or Sparc or byte code for the interpreter on any
other platform. Many operations, though, are performed by RTS
(run-time system) functions and these include such basic operations as
integer addition. These are listed in libpoly/sys.h and
basis/RunTimeCalls.ML. In the general case these actually require a
call into the C++ run-time system but simple operations are
implemented in the assembly code section or are recognised by the
code-generator and turned into the appropriate machine instructions.
No problem! Here could you point me to the code where the native
and byte code generator lives?
Thank you very much!
Yue
Regards,
David
Yue Li wrote:
Hi,
I'm currently studying the run time system of Poly/ML, looking at its
source code. I found there are 130 instructions listed in
int_opcodes.h, and the semantics is defined in interpreter function.
I'm wondering whether there's any documentation available for
describing the semantics of each instruction, this will definitely
help me understand each instruction better.
Thanks for your help,
Yue
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml