
Make GhostScript Platform-independent...
Quote:
> Aandi> Is it not the case that the pointer manipulation and
> Aandi> typecasting possible in C makes this a theoretical
> Aandi> impossibility
>You could similate RAM by allocating a huge array of bytes (char[]).
>Then, pointers are similated as integers representing indices to this
>huge array.
Isn't that what I said with the rest of my sentence - "unless, I
suppose a single Java object is obtained which is an array of bytes to
be suballocated as C memory space..." ?
Quote:
>IOW, as long as you can emulate a Turing machine (but with a finite
>tape), shouldn't you be able to emulate all other things possible (up
>to the limit of the tape size) on a von Neumann computer?
It does indeed sound possible. A lot of work, since to complete this
case the C library would also have to be largely reimplemented in
Java. Subtle differences may also exist in execution semantics, but
there is probably enough variation in C implementations to allow this.
The performance may be OK, not sure.
Traditionally the performance of such emulators has been glacial,
especially if implemented in an interpreted language, but perhaps
today's computers are fast enough for many practical uses.
GhostScript is a poor example as it is CPU hungry and so it's hard to
imagine many users adopting 10-50 times the execution speed to avoid
the effort of getting a makefile that works.
More a question for a gcc group, I suspect, interesting as it may be.
----------------------------------------
Please support usenet! Post replies and follow-ups, don't e-mail them.