[bitc-dev] BitC, Irken, CPS
Pal-Kristian Engstad
pal_engstad at naughtydog.com
Fri Feb 6 19:06:38 EST 2009
Jonathan S. Shapiro wrote:
> BitC does not have this. While we are looking at building an
> interactive BitC environment, and such an environment certainly needs
> a dump mechanism, BitC is primarily focused on being a static
> compiler. One problem with the interactive approach is that it doesn't
> handle cross compilation very well...
I don't think it is that hard to handle cross-compilation in an
interactive environment. We did this in our own compiler, and I would
venture to say that it was a huge productivity saver. What problems do
you see in a cross-compilation environment?
What is needed is the concept of a "listener". The listener runs on the
target machine, responding to commands from the development machine.
This connection could be a port on the target machine, or any other
communication channel. Any piece of code should be (cross-)compiled on
the development machine, sent to the target where the listener will
receive the code. It needs to allocate space for the new code and
provide it in the target environment. The listener should also have the
ability to perform partial linking. This would result in the ability to
hot-swap code. It should also be able to execute code (in a specific
thread, or in the absence of threads at a "safe-point" provided by the
target) and output results back to a channel so that one can see the
results on the development machine.
Given these measures, it should be fairly transparent to the user where
the code actually runs, and I think that this method would also work as
a way of building, debugging and handing multi-threaded applications
where the target happens to be same as the host.
Thanks,
PKE.
--
Pål-Kristian Engstad (engstad at naughtydog.com),
Lead Graphics & Engine Programmer,
Naughty Dog, Inc., 1601 Cloverfield Blvd, 6000 North,
Santa Monica, CA 90404, USA. Ph.: (310) 633-9112.
"Emacs would be a far better OS if it was shipped with
a halfway-decent text editor." -- Slashdot, Dec 13. 2005.
More information about the bitc-dev
mailing list