Dnia 21-08-2010 o 05:36:28 SK <s...@metrokings.com> napisał(a):

Then to make this more concrete, what if D had an option to suspend
compilation after the front-end finished?  The resulting executable
contains the abstract RTL blobs and the compiler backend, which
finishes the job for the specific platform on which the executable is
launched.  The final binary is cached for subsequent launches.  You
get good machine independence and the approach provides performance
wins for operations like vectorizing where you don't know in advance
what kind of SSE support you'll find.

Hypothetically, why not?

I dug around and found this:
http://www.itjungle.com/tfh/tfh082007-printer01.html

From the article.
Without getting too technical, here's what happens on the OS/400 and
i5/OS platform when you create applications, which explains the
problem customers ran into in 1995 and which IBM wants them to avoid
in 2008. A programmer writes an application in say, RPG. They run it
through a compiler, either using the Original Program Model (OPM) or
the Integrated Language Environment (ILE) compilers, and the code
compiles so they can run it. Or, rather, that is what it looks like to
the programmer. What is really happening is that this application is
compiled into an intermediate stage, which some IBMers have called RPG
templates (in the case of RPG applications). These templates have a
property called observability, which in essence means they are
compiled to the TIMI layer. These intermediate templates are then used
by the TIMI layer on an actual piece of hardware with a specific
processor and instruction set to compile the application to run on
that specific processor. TIMI compiles these RPG templates down to
actual compiled code behind the scenes the first time an application
runs, and because the code was originally compiled to the TIMI layer,
there is no need to change the source code. Only the object code
changes, which end users never had access to anyway because only TIMI
can reach down there. This is the brilliant way that IBM has preserved
customers' vast investments in RPG, COBOL, and other applications over
the years

Interesting. Hypothesising, wouldn't it be better if compiling to metal happened already during installation? On the first run the compiler still has to hurry (1st impression counts), but downloading over network is so slow that while the user is watching the progress bar there'd be plenty of time for compiling the intermediate representation and expensive optimizations without even being noticed by the user.


Tomek

Reply via email to