Clone this wiki locally
This is a clone of Kilim, which has some changes for supporting Erjang — a JVM-based Erlang VM.
Thanks to Sriram Srinivasan for making Kilim in the first place!
See Authoritative Kilim Site for lots of good material.
The original Kilim is now also hosted on GitHub here; eventually we want to make our kilim a proper clone of that version; but there is some work in doing that.The additions/changes are roughly:
- New methods on
untilHasMessage(long). Needed to implement ditto for Erjang.
- New method on
task.kill(java.lang.Error ex)which makes
exbe eventually thrown inside the target Task [before it can send a message at least].
Task.checkKill()can be called periodically to check for this.
- A Performance Enhancement. Special case for
kilim.Statewhen only saving
kilim.Fiberhas three stacks now, one for State (sans pc and self), and separate stacks for
this(a.k.a. self), and
pc. For my Erjang performance tests, this speeds up the “ring problem” by almost a factor of two because it avoids a lot of allocations.
- Generalized mechanism for finding class files [not complete]. “Kilim classic” reads class files at runtime using Class.forName. With ClassMirrors in this edition, classes can be also be loaded directly from
.classfiles. This feature is incomplete, but intention is that the weaver tool should accept a
-classpathargument so it can be run e.g. inside Eclipse. [I also have an eclipse builder in the making…]
- Minor changes as I was browsing through the code to remove some warnings from Eclipse.
Wishes for the future
kilim.Pausablesubclass / exception marker “
kilim.TaskUser” that makes the weaver pass in the fiber, but does not generate save/restore code. This is ideal for calling Erjang-runtime functions that needs access to the current process.