11.07.2013, 16:40, "Juan Jose Garcia-Ripoll" <juanjose.garciarip...@gmail.com>:
> On Thu, Jul 11, 2013 at 2:04 PM, Anton Vodonosov <avodono...@yandex.ru> wrote:
>> I think (hope) there are not so many places in CL which allow to couple the 
>> code with the host compiler.
>> Maybe this example with most-postivive-fixnum (-negative-long-float, etc) is 
>> the only one?
>> If so, it must be very very rare case.
>
> It is not so rare. Take for instance code that uses type comparisons. A macro 
> may evaluate its constant arguments to determine whether they are of type 
> fixnum and this result depends on the platform. I am pretty sure that those 
> checks are quite pervasive in the libraries out there. There is also code 
> that checks for the existence of certain specialized arrays (clx most 
> notably) and creates buffers and constants based on that decision. This once 
> more demands that target and host be tightly coupled: i.e. similar 
> endianness, word size, etc.
>
> What I mean is that people write code based on the assumption that they can, 
> at runtime, learn things about the platform they will run on. If the target 
> and host are quite different, these compile-time assumptions will be broken.
>
> Of course those assumptions can be parameterized in the library, but this 
> cannot be automated by the platform that runs the compiler (ECL)
>
> Juanjo

Maybe it is impossible to give a 100% guarantee to cross compile any CL code.
But I guess more than 93% of useful libraries are not affected but such issues 
and
can be cross-compiled as is, without even tuning them.

I am curious to know what are the specialized arrays? (used in clx)?

Note, that the target has the same runtime library - ECL.
So the most troublesome things for cross compilation are properties
of the underlying platform that are visible through the CL;
not the properties of the given CL implementation.

And the underlying platform is abstracted very much by CL.
Endiannes is abstracted by function cl:ldb - zero byte is the less significant
byte of an integer, doesn't matter how the integer layed out in memory.

So I still think cross-compilation of Lisp code has significant potential.
Mocl is even trying to make business on it.

On the other hand, it is not always necessary. Loading the system
from source code on target and running interpretter may be OK for many 
applications.

Best regards,
- Anton



------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to