X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=web%2Fruntime;h=d1dabab996859a2a487b5fa71da0898941fc91be;hb=bbe1510f778972449edfffd64ac78b61ee776009;hp=48831b82392b0c4589f635a4f427be289fa0f04d;hpb=4198d71a3f990359a462d2484516b398221ad925;p=mono.git diff --git a/web/runtime b/web/runtime index 48831b82392..d1dabab9968 100644 --- a/web/runtime +++ b/web/runtime @@ -1,71 +1,204 @@ -* The MonoNet runtime +* The Mono runtime - The MonoNet runtime will implement the JIT engine (and a byte - code interpreter for quickly porting to new systems), the - class loader, the garbage collector, threading system and - metadata access libraries. + The Mono runtime engine is considered feature complete. - Currently the runtime contains the beginning of an image - loader and metadata access entry points. Since Beta2 has been - now released, it is possible to resume work using the ECMA - specs and testing with Beta2-generated executables. + It implements a Just-in-Time compiler engine for the CIL + virtual machine, the class loader, the garbage collector, + threading system and metadata access libraries. - The runtime core will be implemented in C, in a library - "libMonoVES.so". + We currently have two runtimes: -** Executing MSIL/CIL images + - The code will load an executable and map the references to - external assemblies to our own version of the assemblies on - GNU/Linux. + We are using the Boehm conservative garbage collector. - Our roadmap looks like this: + The Mono runtime can be used as a stand-alone process, or it + can be embedded into applications (see + the documentation in mono/samples/embed for more details). - * Milestone 1: Fully read and parse all CIL byte-codes - and metadata tokens (ie, a disassembler). + Embedding the Mono runtime allows applications to be extended + in C# while reusing all of the existing C and C++ code. - * Milestone 2: Complete an interpreter for CIL byte - codes. This interpreter can be used temporarly to - run CIL byte code on a system where no JIT is - available. + Paolo Molaro did a presentation on the current JIT engine and + the new JIT engine. You can find his slides + here - * Milestone 3: IA32 translating-JIT engine. +** Current JIT Engine: technical details (updated, June 28th, 2003) - * Milestone 4: non-Intel port of the JIT engine. + We have re-written our JIT compiler. We wanted to support a + number of features that were missing: - * Milestone 5: Optimizing JIT engine port for IA32. + + + The JIT engine implements a number of optimizations: + + + + There are a couple of books that deal with this technique: "A + Retargetable C Compiler" and "Advanced Compiler Design and + Implementation" are good references. You can also get a + technical description of lbrug. + + The new JIT engines uses three intermediate representations: + the source is the CIL which is transformed into a forest of + trees; This is fed into a BURS instruction selector that + generates the final low-level intermediate representation. + + The instruction selector is documented in the following + papers: + + ** Garbage Collection - We have decided to implement a generational tracing garbage - collector, which is very similar to the one being used by - .NET. For an introduction to the garbage collection system - used by Microsoft's CLR implementation, you can read this book - on Garbage - Collection. + We are using the Boehm conservative GC. We might consider + adopting other GC engines in the future, like the Intel ORP GC + engine. The Intel ORP GC engine as it provides a precise + garbage collector engine, similar to what is available on the + .NET environment. - Although using a conservative garbage collector like Bohem's - would work, all the type information is available at runtime, - so we can actually implement a better collector than a - conservative collector. + + +** IO and threading + + The ECMA runtime and the .NET runtime assume an IO model and a + threading model that is very similar to the Win32 API. + + Dick Porter has developed WAPI: the Mono abstraction layer + that allows our runtime to execute code that depend on this + behaviour. + +** Useful links + + Paolo Molaro found a few interesting links: + + ** PInvoke - PInvoke will be supported, and will be used to wrap Unix API - calls, these in turn are required for reusing some of the - GNOME libraries that will reduce the work we have to do to - deliver a complete class library + PInvoke is the mechanism we are using to wrap Unix API calls + as well as talking to system libraries. + + Initially we used libffi, but it was fairly slow, so we have + reused parts of the JIT work to create efficient PInvoke + trampolines. + +** Remoting + + Mono has support for remoting and proxy objects, just like + .NET does. The runtime provides these facilities. + +** Porting + + If you are interested in porting the Mono runtime to other + platforms, you might find the pre-compiled Mono regression test + suite useful to debug your implementation. + +* COM and XPCOM + + We plan on adding support for XPCOM on Unix and COM on Microsoft + Windows later in our development process.