matrix linking
Mike Stump
mrs@apple.com
Thu Jan 19 20:19:00 GMT 2006
On Jan 18, 2006, at 10:24 PM, george@georgeshagov.com wrote:
> I thought some kind of that, yet moved to matrix approach. Reason?
> The clarity.
Clarity is not an in-vogue reason for compiler code generation. Size
is, speed is. Sacrificing these two for clarity in generated code
limits the end result to that of novelty item.
> For instance you have many ... let me say 'revisions' of the same
> function. In
> your case it is obvious how to handle jump to the newly compiled
> function, but
> how to handle roll-back to some particular revision of this function?
If my scheme supports changing from X' to X'', then clearly it
supports changing from X'' to X'. Just google undo buffer for an
example algorithm that will do this.
> How about revisioning for file and for module?
A file is just a collection of units, if you can do a unit, you can
do a file (let me ignore file scope ctors/dtors for a second).
Module, what's that?
> These thought restrained me from doing any assembler hacks into the
> system.
Modifying the assembler would be bad.
> One more thing. My original purpose was to make possible to modify the
> algorithms runtime, without recompilation. For this case we need
> interpreter.
If you're intention is to write an interpreter, that this is
orthogonal to runtime rebinding. This list would be off-topic for
discussing writing a C interpreter.
> you may find this topic interesting:
> http://docs.georgeshagov.com/twiki/tiki-index.php?page=Matrix
> +Linking+-+Proxing)
Can't manage to read it, posting links I can't read is bad style.
> Synchronization and other challenges.
> Mike, do you have a copyright on that phrase: "there are certain
> realities when
> doing this, and its important to understand the limitations and
> gotchas. " ?
Yes, US law makes everything I write copyright. :-)/2
> About my initial approach. I completely reviewed it :-). it looks
> like this:
> http://docs.georgeshagov.com/twiki/tiki-index.php?page=Matrix
> +Linking+-+The+shortest+way+to+go,
> it would appear it is required to make an additional pass in order
> to formalize
> the matrix.
This looks all wrong. See Objective C for an example of a
dynamically rebindable language, further, you can examine the code
generation, the data structures and runtime library to see how they
achieve things. It doesn't need mlmake and doesn't need 'new passes'
run by make. For example, you can see the gcc darwin port for how to
generate a stub function that does some arbitrary thing inside a
compiler.
> Dear Mike, I would be really interested in some questions regarded
> runtime
> linker. I am going to download the sources, yet in that same time
> if it be
> there is any additional dos about that, I would be really
> appreciate for the
> link.
If you're talking about the runtime rebinder we use, don't know of
any. For a generic runtime linker, google("ld.so") will take you to
the sources for one.
More information about the Gcc
mailing list