tags:

views:

86

answers:

3

Are the any GIL-less LLVM-based languages, targeted mainly for JIT-execution which allows to reload PART of the code on the fly?

Like re-compile 1 class, and reload it without stopping the whole program.

Anyone tryed that?

Any chance on doing that with clang (surely, with great deal of developers caution, restriction and manual state handling)?

A: 

Hmm, can't think of anything off the top of my head. The only major product I can think of is JRebel, but that's for Java.

The Alchemist
A: 

Apparently, it does not exist yet.

BarsMonster
A: 

I think that this is a dynamite idea, and a feature that I would love to have! Have you given any thought to how you would like to interface with the feature?

obj1 = Foo()
compiler.Recompile(Foo, '/some/path/myapp/newsrc/foo.blah');
obj2 = Foo()
// Would this be True?
type(obj1) == type(obj2)

I assume that you expect existing instances to remain unchanged by the recompile? This seems like it would be easier with functions, as long as they kept the same prototype, but doing it with classes seems like it would get messy.

Also, what to do about threading?

Thread.start(wait 1; bar(););  // bar is a function
compiler.Recompile(bar, '/some/path/myapp/newsrc/bar.blah');

Lets say that in our thread we start calling "bar" during the recompile. Does the call block until the recompile is done and then call the new function? Does the old function still exist until the compile is complete? What if we have a function pointer, after the recompile, where does it point? To the original function or to the new one?

Does anyone have any thoughts on how this could be implemented in a strait forward way?

Real John Connor
BarsMonster