All Classes and Interfaces

Class
Description
 
 
This is a replacement for the jasmin bytecode assembler and uses the same syntax.
 
A basic block is a contiguous set of instructions that has one label at the first instruction and a transfer-of-control instruction at the very end.
 
Just a convenient alias for ArrayList
CachedClassMirrors caches information about a set of classes that are loaded through byte arrays, and which are not already loaded by the classloader
 
 
 
This class produces all the code associated with a specific pausable method invocation.
A cell is a single-space buffer that supports multiple producers and a single consumer, functionally identical to Mailbox bounded to a size of 1 (and hence optimized for this size)
Set up a chain of tasks.
This class reads a .class file (or stream), wraps each method with a MethodFlow object and optionally analyzes it.
 
 
This class is the main entry point for the Weave tool.
 
 
 
a minimal bridge or trampoline between woven and unwoven code backed by a Fiber giving the programmer explicit control over the event loop see Task for a more general and easier to use green thread implementation that automatically handles the event loop see Generator for more user friendly wrapper to use override execute() and call run() each time run() is called, execute runs until it yields, returns or throws an exception return value of true means either execute returned or threw an exception (accessible as ex()) with state stored in an internal Fiber field across invocations to reuse a Continuation, call reset() Continuation provides no scheduler - it is entirely the responsibility of the calling code to call run() again once the pausing condition has been satisfied typically used for state machines and Generators or to port an existing event loop to kilim this is a low level facility, see kilim.examples.Xorshift.X2 for an example of direct use
 
Utility class to check if a method has been marked pausable
Preorder traversal of a directory.
 
Equivalent to javap -c -l -private, but the output is in jasmin's format meant to be parseable by Asm.
 
 
The EndPoint represents an open socket connection.
 
 
 
 
 
 
 
Spawn a task, communicate through a shared mailbox.
 
A hack that exposes the bytearray inside the ByteArrayInputStream.
A hack that exposes the bytearray inside the ByteArrayOutputStream.
This example prints the nth Fibonacci number.
This class serves as a context to manage and store the continuation stack.
 
 
 
Utility class to present a uniform iterator interface for file containers; presently includes directories and jar files.
 
Used to dump the stack and locals at the beginning of each basic block
 
An activation frame.
A Generator, from the caller's perspective, looks like a normal iterator that produces values.
 
 
Representation for a catch handler.
 
 
 
A simple file server over http Usage: Run java kilim.examples.HttpFileServer [base directory name] From a browser, go to "http://localhost:7262".
 
This object encapsulates a bytebuffer (via HttpMsg).
 
The response object encapsulates the header and often, but not always, the content.
A very rudimentary HTTP server bound to a specific given port.
 
Responsible for creating an HTTPRequest object out of raw bytes from a socket, and for sending an HTTPResponse object in its entirety.
 
 
 
 
 
Simple utility class to invoke the java compiler.
a collection of class path elements
 
 
 
java 7 doesn't support default interface methods so we need a dummy impl of the woven handler this needs to be in a superclass, otherwise kilim will refuse to weave the real handle method
A low overhead map to avoid creating too many objects (Entry objects and iterators etc)
runtime weaver This class dynamically weaves kilim-related classes and runs "class".
 
Extends Classloader just to have access to the (protected) findLoadedClass method
 
 
maven plugin for ahead-of-time weaving of class files
a minimal mvc framework for kilim, not available in java 7 or earlier
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
This is a typed buffer that supports multiple producers and a single consumer.
This is a typed buffer that supports single producers and a single consumer.
This is a typed buffer that supports single producers and a single consumer.
This represents all the basic blocks of a method.
This class takes the basic blocks from a MethodFlow and generates all the extra code to support continuations.
mime types to simplify building http servers.
 
 
 
 
 
 
 
 
 
This class wraps a selector and runs it in a separate thread.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Example showing kilim's support for NIO.
The Client is a conventional Java socket application.
Server is a SessionTask, which means an instance of it is created by the NioSelectorScheduler on an incoming connection.
 
 
 
 
 
 
 
 
Used by catch handlers to handle overlapping ranges
 
 
 
SAMweaver generates code to support functional interfaces (also known as SAM, for Single Abstract Method), where the SAM method is pausable.
This is a basic FIFO Executor.
 
 
 
 
 
 
 
A basic HTTP server that merely echoes the path and the query string supplied to it in a GET request Usage: Run java kilim.examples.HttpFileServer [base directory name] From a browser, try "http://localhost:7262/hello", "http://localhost:7262/buy?code=200invalid input: '&desc'=Rolls%20Royce">" SimpleHttpSession is an HTTPSession task, itself a thin wrapper over the socket connection.
 
Spawn a task, communicate through a shared mailbox.
A slight extension to SimpleTask.
 
Spawn example with one consumer, ten producers
 
 
State is the super class for customized State objects generated by ClassWeaver.
 
A base class for tasks.
 
 
 
 
 
 
Creates lots of tasks that print stuff, sleep, then wake up and print more.
 
 
 
 
 
 
 
 
 
 
 
This example illustrates two 'generators' that walk a tree, one in pre-order and another in post-order.
A utility class that provides static methods for interning type strings and merging type descriptors.
 
Each BasicBlock owns one instance of Usage.
 
 
 
 
 
 
 
Simple string utils for pretty printing support
 
 
 
A SSA value that represents all objects produced at a particular location in the code.
 
 
 
 
 
 
 
 
 
This class supports both command-line and run time weaving of Kilim bytecode.
Classloader that loads classes from the classpath spec given by the system property "kilim.class.path" and weaves them dynamically.
 
a demo and benchmark of kilim generators used to implement the xorshift PRNG runs xorshift a number of cycles, printing the nanos per cycle and the xor of the result the value is printed just to ensure that the JIT actually runs all the code https://en.wikipedia.org/wiki/Xorshift#xorshift.2B with modes to run the same algorithm as a Generator and as a raw Continuation (the default)