Hi David,

Thank you for your answer. You're right - I have to understand a lot more
in order to be able to create a new backend. I may have many more
questions.

I guess the first one is: for a rebuild of the compiler (from the last
bootstrap stage, not from scratch), how does the build system find out
which files to compile, and in what order?

On Thu, Nov 23, 2023 at 4:12 AM David Matthews <
david.matth...@prolingua.co.uk> wrote:

> Hi Andrei,
> It would be interesting to have another back-end but I really don't
> think what you are suggesting is feasible.  There are currently three
> back-ends: native code for the X86(32/64), native code for the ARM64 and
> byte code.  The byte code is interpreted by part of the run-time system
> and is used on architectures other than the X86 and ARM64 but it is also
> used during the initial bootstrap on the X86 and ARM64.
>
> Apart from a small amount of architecture-specific code, and of course
> the interpreter in C++ for the byte code, all these back-ends make use
> of the same run-time system support.  The run-time system is intimately
> bound up with the ML part of the system.  They share a common view of
> how values are represented: short integers are tagged, addresses are not
> tagged, strings have a length word followed by byte data etc.  Any new
> back-end has to maintain these representations.  Before you even think
> about writing a new back-end you need to understand how all this works.
>
> David
>

-- 
[]s, Andrei Formiga
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to