From sabre at nondot.org Thu Jun 26 21:33:17 2008 From: sabre at nondot.org (Chris Lattner) Date: Thu, 26 Jun 2008 21:33:17 -0700 Subject: [vmkit-commits] test Message-ID: <1EC975BF-EF77-4700-9839-D8CF3D85C8EF@nondot.org> From sabre at nondot.org Thu Jun 26 21:37:34 2008 From: sabre at nondot.org (Chris Lattner) Date: Fri, 27 Jun 2008 04:37:34 -0000 Subject: [vmkit-commits] [vmkit] r52815 - /vmkit/trunk/README.txt Message-ID: <200806270437.m5R4bYtY031974@zion.cs.uiuc.edu> Author: lattner Date: Thu Jun 26 23:37:33 2008 New Revision: 52815 URL: http://llvm.org/viewvc/llvm-project?rev=52815&view=rev Log: test commit Modified: vmkit/trunk/README.txt Modified: vmkit/trunk/README.txt URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/README.txt?rev=52815&r1=52814&r2=52815&view=diff ============================================================================== --- vmkit/trunk/README.txt (original) +++ vmkit/trunk/README.txt Thu Jun 26 23:37:33 2008 @@ -57,3 +57,4 @@ - A compiler/system dependency interface - Port to Darwin + From sabre at nondot.org Thu Jun 26 21:44:38 2008 From: sabre at nondot.org (Chris Lattner) Date: Fri, 27 Jun 2008 04:44:38 -0000 Subject: [vmkit-commits] [vmkit] r52816 - in /vmkit/trunk/www: ./ index.html Message-ID: <200806270444.m5R4icle032160@zion.cs.uiuc.edu> Author: lattner Date: Thu Jun 26 23:44:38 2008 New Revision: 52816 URL: http://llvm.org/viewvc/llvm-project?rev=52816&view=rev Log: Add a dummy web page. Added: vmkit/trunk/www/ vmkit/trunk/www/index.html Added: vmkit/trunk/www/index.html URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/www/index.html?rev=52816&view=auto ============================================================================== --- vmkit/trunk/www/index.html (added) +++ vmkit/trunk/www/index.html Thu Jun 26 23:44:38 2008 @@ -0,0 +1 @@ +nothing to see here. From sabre at nondot.org Thu Jun 26 22:01:39 2008 From: sabre at nondot.org (Chris Lattner) Date: Fri, 27 Jun 2008 05:01:39 -0000 Subject: [vmkit-commits] [vmkit] r52817 - in /vmkit/trunk/docs: ./ index.html Message-ID: <200806270501.m5R51dnk000415@zion.cs.uiuc.edu> Author: lattner Date: Fri Jun 27 00:01:39 2008 New Revision: 52817 URL: http://llvm.org/viewvc/llvm-project?rev=52817&view=rev Log: Add stub docs dir for vmkit web page. Added: vmkit/trunk/docs/ vmkit/trunk/docs/index.html Added: vmkit/trunk/docs/index.html URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/docs/index.html?rev=52817&view=auto ============================================================================== --- vmkit/trunk/docs/index.html (added) +++ vmkit/trunk/docs/index.html Fri Jun 27 00:01:39 2008 @@ -0,0 +1 @@ +vmkit dox go here. From nicolas.geoffray at lip6.fr Fri Jun 27 00:58:23 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Fri, 27 Jun 2008 07:58:23 -0000 Subject: [vmkit-commits] [vmkit] r52823 - in /vmkit/trunk/www: content.css get_involved.html get_started.html index.html ladyvm.html menu.css osgi.html Message-ID: <200806270758.m5R7wNAU016168@zion.cs.uiuc.edu> Author: geoffray Date: Fri Jun 27 02:58:23 2008 New Revision: 52823 URL: http://llvm.org/viewvc/llvm-project?rev=52823&view=rev Log: Import of vmkit's webpage. Added: vmkit/trunk/www/content.css vmkit/trunk/www/get_involved.html vmkit/trunk/www/get_started.html vmkit/trunk/www/ladyvm.html vmkit/trunk/www/menu.css vmkit/trunk/www/osgi.html Modified: vmkit/trunk/www/index.html Added: vmkit/trunk/www/content.css URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/www/content.css?rev=52823&view=auto ============================================================================== --- vmkit/trunk/www/content.css (added) +++ vmkit/trunk/www/content.css Fri Jun 27 02:58:23 2008 @@ -0,0 +1,20 @@ +html, body { + padding:0px; + font-size:12px; font-family:"Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, Helvetica, sans-serif; background-color: #fff; color: #222; + line-height:1.5; +} + +h1, h2, h3, tt { color: #000 } + +h1 { padding-top:0px; margin-top:0px;} +h2 { color:#333333; padding-top:0.5em; } +h3 { padding-top: 0.5em; margin-bottom: -0.25em; color:#2d58b7} +li { padding-bottom: 0.5em; } +ul { padding-left:1.5em; } + +/* Slides */ +IMG.img_slide { + display: block; + margin-left: auto; + margin-right: auto +} Added: vmkit/trunk/www/get_involved.html URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/www/get_involved.html?rev=52823&view=auto ============================================================================== --- vmkit/trunk/www/get_involved.html (added) +++ vmkit/trunk/www/get_involved.html Fri Jun 27 02:58:23 2008 @@ -0,0 +1,110 @@ + + + + + VMKit - Get Involved + + + + + + + +
+ +

Getting Involved with the vmkit Project

+ +

Once you have checked out and built vmkit and +played around with it, you might be wondering what you can do to make it better +and contribute to its development. Alternatively, maybe you just want to follow +the development of the project to see it progress. +

+ +

Follow what's going on

+ +

VMKit is a subproject of the LLVM Project, and +uses llvm dev mailing list for development question and the vmkit-commits +mailing list for patches:

+ + + +

The best way to talk with other developers on the project is through the llvm-dev mailing +list.

+ + +

Open Projects

+ +

Here are a few tasks that are available for newcomers to work on, depending +on what your interests are. This list is provided to generate ideas, it is not +intended to be comprehensive. Please ask on llvm-dev for more specifics or to +verify that one of these isn't already completed. :)

+ + + +

If you hit a bug with vmkit, it is very useful for us if you reduce the code +that demonstrates the problem down to something small. There are many ways to +do this; ask on llvm-dev for advice.

+ +
+ + Added: vmkit/trunk/www/get_started.html URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/www/get_started.html?rev=52823&view=auto ============================================================================== --- vmkit/trunk/www/get_started.html (added) +++ vmkit/trunk/www/get_started.html Fri Jun 27 02:58:23 2008 @@ -0,0 +1,166 @@ + + + + + VMKit - Getting Started + + + + + + + +
+ +

Getting Started: Building and Running VMKit

+ + +

This page gives you the shortest path to checking out vmkit and demos a few +options. This should get you up and running with the minimum of muss and fuss. +If you like what you see, please consider getting +involved with the vmkit community.

+ + +

A word of warning

+ +

While this work aims to provide a fully functional JVM and CLI runtime, it +is still early work and is under heavy development. +Some of the more notable missing pieces in the JVM are:

+ +
    +
  1. Support for JVM object finalization semantics.
  2. +
+ +

Some of the more notable missing pieces in the CLI runtime are:

+ +
    +
  1. Support for generics.
  2. +
  3. Support for arithmetic overflow.
  4. +
  5. Support for CLI object finalization semantics.
  6. +
  7. Thread support.
  8. +
+ +

Some of the common missing pieces in vmkit/llvm are:

+ +
    +
  1. Support for other platforms than linux/x86.
  2. +
  3. Hotspot-like virtual machine (e.g mixed interpretation/compilation).
  4. +
+ +

Building vmkit / working with the code

+ +

If you would like to check out and build the project, the current scheme +is (if you only want the JVM, you can skip the Pnet part. If you only want the CLI +VM, you can skip the GNU Classpath part):

+ +
    +
  1. Checkout + and build LLVM from SVN head:
  2. + + + + +
  3. Download + GNU Classpath 0.97.2:
  4. + + + +
  5. Download + PNet 0.8.0:
  6. + + +
  7. Download + PNetlib 0.8.0:
  8. + + +
  9. Checkout vmkit:
  10. + +
  11. Configure vmkit:
  12. + + +
  13. Build vmkit:
  14. + + +
  15. Try it out: (assuming that you are in vmkit/Debug/bin)
  16. + +
+ +
+ + Modified: vmkit/trunk/www/index.html URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/www/index.html?rev=52823&r1=52822&r2=52823&view=diff ============================================================================== --- vmkit/trunk/www/index.html (original) +++ vmkit/trunk/www/index.html Fri Jun 27 02:58:23 2008 @@ -1 +1,134 @@ -nothing to see here. + + + + + + "vmkit" JVM and .Net runtimes for LLVM + + + + + + +
+ +

vmkit: JVM and .Net runtimes for LLVM

+ + +

The VMKit project is an implementation of a JVM and CLI virtual machine + (.Net is an implementation of the CLI). It translates Java bytecode and + MSIL in the LLVM IR and uses the LLVM framework for optimizations and just + in time compilation. You can get and build the + source today.

+ + +

Features and Goals

+ + +

Some of the goals for the project include the following:

+ +

End-User Features:

+ + + +

Utility and Applications:

+ + + +

Internal Design and Implementation:

+ + + + +

Why?

+ + +

The development of vmkit was started out of a need to factorize virtual + machine development. The JVM and CLI virtual machine have many + similarities, but are too high-level to be the basis of a "universal" + virtual machine. The LLVM IR on the opposite is low-level enough to be + able to execute these VMs. VMKit is a proof of concept implementation + towards that direction.

+ +

An introduction to vmkit (here called LadyVM because it's a port of the + JVM to the Boehm garbage collector) can be found in the following paper: +

+ + + +

For an example of what kind of experimental technologies we can + implement in a timely fashion with vmkit:

+ + + +

Current Status

+ + +

VMKit is still in its early development stages. If you are looking to + experiment virtual machine technologies, vmkit is probably a great solution + for you. If you want to use it as a drop in JVM or .Net, it is not yet + ready.

+ +

VMKit currently has a decent implementation of the JVM. It executes + Apache projects (e.g. OSGi Felix and Tomcat) and the SPECJVM98 benchmark. + The CLI implementation is still in its early stages, but can execute + simple applications.

+ + +

Get it and get involved!

+ + +

Start by getting the code, building it, and + playing with it. This will show you the sorts of things we can do + today.

+ +

Once you've done that, please consider getting + involved in the vmkit community. Currently, vmkit is tightly + integrated into the llvm community. You can sign up for the llvm mailing + list to ask and learn about how the project works.

+
+ + Added: vmkit/trunk/www/ladyvm.html URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/www/ladyvm.html?rev=52823&view=auto ============================================================================== --- vmkit/trunk/www/ladyvm.html (added) +++ vmkit/trunk/www/ladyvm.html Fri Jun 27 02:58:23 2008 @@ -0,0 +1,51 @@ + + + + + + A Lazy Developer Approach: Building a JVM with Third Party Software + + + +
+ A Lazy Developer Approach: Building a JVM with Third Party Software +
+
+ Nicolas Geoffray, Gael Thomas, Charles Clement and Bertil Folliot +
+ +

Abstract:

+
+The development of a complete Java Virtual Machine (JVM) +implementation is a tedious process which involves knowledge in different +areas: garbage collection, just in time compilation, interpretation, file +parsing, data structures, etc. The result is that developing its own virtual +machine requires a considerable amount of man/year. In this paper we show that +one can implement a JVM with third party software and with performance +comparable to industrial and top open-source JVMs. Our proof-of-concept +implementation uses existing versions of a garbage collector, a just in +time compiler, and the base library, and is robust enough to +execute complex Java applications such as the OSGi Felix +implementation and the Tomcat servlet container. + +
+ +

Bibtex:

+
+ at inproceedings{geoffray08ladyvm,
+        author = {N. Geoffray  and G. Thomas and C. Cl\'ement and B. Folliot},
+        title = { A Lazy Developer Approach: Building a JVM with Third Party Software }, 
+        booktitle = {{International Conference on Principles and Practice of Programming In Java (PPPJ 2008)  }}, 
+        year = {2008},
+        address = {Modena, Italy},
+        month = {September},
+}
+
+ +

Download:

+ + + + Added: vmkit/trunk/www/menu.css URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/www/menu.css?rev=52823&view=auto ============================================================================== --- vmkit/trunk/www/menu.css (added) +++ vmkit/trunk/www/menu.css Fri Jun 27 02:58:23 2008 @@ -0,0 +1,39 @@ +/***************/ +/* page layout */ +/***************/ + +[id=menu] { + position:fixed; + width:25ex; +} +[id=content] { + /* ***** EDIT THIS VALUE IF CONTENT OVERLAPS MENU ***** */ + position:absolute; + left:29ex; + padding-right:4ex; +} + +/**************/ +/* menu style */ +/**************/ + +#menu .submenu { + padding-top:1em; + display:block; +} + +#menu label { + display:block; + font-weight: bold; + text-align: center; + background-color: rgb(192,192,192); +} +#menu a { + padding:0 .2em; + display:block; + text-align: center; + background-color: rgb(235,235,235); +} +#menu a:visited { + color:rgb(100,50,100); +} \ No newline at end of file Added: vmkit/trunk/www/osgi.html URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/www/osgi.html?rev=52823&view=auto ============================================================================== --- vmkit/trunk/www/osgi.html (added) +++ vmkit/trunk/www/osgi.html Fri Jun 27 02:58:23 2008 @@ -0,0 +1,49 @@ + + + + + + Towards a new Isolation Abstraction for OSGi + + + +
+ Towards a new Isolation Abstraction for OSGi +
+
+ Nicolas Geoffray, Gael Thomas, Charles Clement and Bertil Folliot +
+ +

Abstract:

+
+The Open Service Gateway Initiative (OSGi) specification defines a dynamic Java-based service oriented architecture for networked environments such +as home service gateways. To provide isolation between different services, it relies on the Java class loading mechanism. +While class loaders have many advantages beside isolation, they are poor in protecting the system against +malicious or buggy services. In this paper, +we propose a new approach for service isolation. It is based on the Java isolate technology, without a +task-oriented architecture. Our approach is more tailored to service-oriented architectures and in particular +offers a complete isolation abstraction to the OSGi platform. It is currently under development, hence +we do not provide in this paper any technical details nor results. + +
+ +

Bibtex:

+
+ at inproceedings{geoffray08isolationosgi,
+  author = {N. Geoffray and G. Thomas and C. Cl\'ement and B. Folliot},
+  title = {{Towards a new Isolation Abstraction for OSGi}},
+  booktitle = {Proceedings of the First Workshop on Isolation and Integration in Embedded Systems (IIES 2008)},
+  year = {2008},
+  pages = {41-45},
+  address = {Glasgow, Scotland, UK},
+  month = {April},
+}
+
+ +

Download:

+ + + + From tilmann.scheller at googlemail.com Sat Jun 28 06:42:56 2008 From: tilmann.scheller at googlemail.com (Tilmann Scheller) Date: Sat, 28 Jun 2008 13:42:56 -0000 Subject: [vmkit-commits] [vmkit] r52867 - in /vmkit/trunk: include/debug.h lib/N3/VMCore/CLIJit.cpp Message-ID: <200806281342.m5SDguIC017214@zion.cs.uiuc.edu> Author: tilmann Date: Sat Jun 28 08:42:55 2008 New Revision: 52867 URL: http://llvm.org/viewvc/llvm-project?rev=52867&view=rev Log: remove N3 specific debug macros from debug.h remove unnecessary bookkeeping of current class in compile() of CLIJit.cpp Modified: vmkit/trunk/include/debug.h vmkit/trunk/lib/N3/VMCore/CLIJit.cpp Modified: vmkit/trunk/include/debug.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/debug.h?rev=52867&r1=52866&r2=52867&view=diff ============================================================================== --- vmkit/trunk/include/debug.h (original) +++ vmkit/trunk/include/debug.h Sat Jun 28 08:42:55 2008 @@ -10,12 +10,6 @@ #ifndef DEBUG_H #define DEBUG_H -#define DEBUG 0 -#define N3_COMPILE 0 //2 -#define N3_EXECUTE 0 -#define DEBUG_LOAD 0 //2 -#define N3_LOAD 0 //1 - #define ESC "\033[" #define COLOR_NORMAL "" #define END "m" Modified: vmkit/trunk/lib/N3/VMCore/CLIJit.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/CLIJit.cpp?rev=52867&r1=52866&r2=52867&view=diff ============================================================================== --- vmkit/trunk/lib/N3/VMCore/CLIJit.cpp (original) +++ vmkit/trunk/lib/N3/VMCore/CLIJit.cpp Sat Jun 28 08:42:55 2008 @@ -1420,11 +1420,6 @@ jit->compilingClass = cl; jit->compilingMethod = meth; - // save current class in case of recursive calls to compile() - VMGenericClass* old = cl->assembly->currGenericClass; - // temporarily store the class being compiled in case it is a generic class - cl->assembly->currGenericClass = dynamic_cast(cl); - meth->getSignature(); if (isInternal(meth->implFlags)) { return jit->compileNative(); @@ -1433,9 +1428,6 @@ } else { return jit->compileFatOrTiny(); } - - // restore saved class - cl->assembly->currGenericClass = old; } llvm::Function *VMMethod::compiledPtr() { From nicolas.geoffray at lip6.fr Sat Jun 28 08:03:12 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Sat, 28 Jun 2008 15:03:12 -0000 Subject: [vmkit-commits] [vmkit] r52869 - /vmkit/trunk/include/debug.h Message-ID: <200806281503.m5SF3Ccl019560@zion.cs.uiuc.edu> Author: geoffray Date: Sat Jun 28 10:03:11 2008 New Revision: 52869 URL: http://llvm.org/viewvc/llvm-project?rev=52869&view=rev Log: Use the __VA_ARGS__ format of macros, not ##args... Modified: vmkit/trunk/include/debug.h Modified: vmkit/trunk/include/debug.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/debug.h?rev=52869&r1=52868&r2=52869&view=diff ============================================================================== --- vmkit/trunk/include/debug.h (original) +++ vmkit/trunk/include/debug.h Sat Jun 28 10:03:11 2008 @@ -47,17 +47,17 @@ #if DEBUG > 0 #ifdef WITH_COLOR - #define PRINT_DEBUG(symb, level, color, args...) \ + #define PRINT_DEBUG(symb, level, color, ...) \ if (symb > level) { \ printf("%s%s%s", ESC, color, END); \ - printf(##args); \ + printf(__VA_ARGS__); \ printf("%s%s%s", ESC, COLOR_NORMAL, END); \ fflush(stdout); \ } #else - #define PRINT_DEBUG(symb, level, color, fmt, args...) \ + #define PRINT_DEBUG(symb, level, color, ...) \ if (symb > level) { \ - printf(##args); \ + printf(__VA_ARGS__); \ fflush(stdout); \ } #endif From nicolas.geoffray at lip6.fr Sat Jun 28 13:09:06 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Sat, 28 Jun 2008 20:09:06 -0000 Subject: [vmkit-commits] [vmkit] r52870 - in /vmkit/trunk/lib/N3/VMCore: PNetLib.cpp VMArray.cpp VMArray.h Message-ID: <200806282009.m5SK96K8028636@zion.cs.uiuc.edu> Author: geoffray Date: Sat Jun 28 15:09:01 2008 New Revision: 52870 URL: http://llvm.org/viewvc/llvm-project?rev=52870&view=rev Log: Make array classes inherit VMObject. Modified: vmkit/trunk/lib/N3/VMCore/PNetLib.cpp vmkit/trunk/lib/N3/VMCore/VMArray.cpp vmkit/trunk/lib/N3/VMCore/VMArray.h Modified: vmkit/trunk/lib/N3/VMCore/PNetLib.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/PNetLib.cpp?rev=52870&r1=52869&r2=52870&view=diff ============================================================================== --- vmkit/trunk/lib/N3/VMCore/PNetLib.cpp (original) +++ vmkit/trunk/lib/N3/VMCore/PNetLib.cpp Sat Jun 28 15:09:01 2008 @@ -149,15 +149,15 @@ if (bs == N3::pChar) { for (uint32 i = 0; i < size; ++i) { - ((uint16*)(void*)(array->elements))[i] = READ_U2(bytes, offset); + ((ArrayUInt16*)array)->elements[i] = READ_U2(bytes, offset); } } else if (bs == N3::pSInt32) { for (uint32 i = 0; i < size; ++i) { - ((sint32*)(void*)(array->elements))[i] = READ_U4(bytes, offset); + ((ArraySInt32*)array)->elements[i] = READ_U4(bytes, offset); } } else if (bs == N3::pDouble) { for (uint32 i = 0; i < size; ++i) { - ((double*)(void*)(array->elements))[i] = READ_U8(bytes, offset); + ((ArrayDouble*)array)->elements[i] = READ_U8(bytes, offset); } } else { VMThread::get()->vm->error("implement me"); Modified: vmkit/trunk/lib/N3/VMCore/VMArray.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/VMArray.cpp?rev=52870&r1=52869&r2=52870&view=diff ============================================================================== --- vmkit/trunk/lib/N3/VMCore/VMArray.cpp (original) +++ vmkit/trunk/lib/N3/VMCore/VMArray.cpp Sat Jun 28 15:09:01 2008 @@ -27,7 +27,8 @@ else if (n > VMArray::MaxArraySize) \ VMThread::get()->vm->outOfMemoryError(n); \ name* res = (name*) \ - gc::operator new(sizeof(name) + n * size, VMObject::VT); \ + gc::operator new(sizeof(VMObject) + sizeof(sint32) + n * size, \ + VMObject::VT); \ res->initialise(atype, n); \ res->setVirtualTable(name::VT); \ return res; \ @@ -178,8 +179,8 @@ VMThread::get()->vm->negativeArraySizeException(n); else if (n > VMArray::MaxArraySize) VMThread::get()->vm->outOfMemoryError(n); - UTF8* res = (UTF8*)gc::operator new(sizeof(UTF8) + n * sizeof(uint16), - UTF8::VT); + uint32 size = sizeof(VMObject) + sizeof(sint32) + n * sizeof(uint16); + UTF8* res = (UTF8*)gc::operator new(size, UTF8::VT); res->initialise(atype, n); return res; } Modified: vmkit/trunk/lib/N3/VMCore/VMArray.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/VMArray.h?rev=52870&r1=52869&r2=52870&view=diff ============================================================================== --- vmkit/trunk/lib/N3/VMCore/VMArray.h (original) +++ vmkit/trunk/lib/N3/VMCore/VMArray.h Sat Jun 28 15:09:01 2008 @@ -44,10 +44,11 @@ typedef VMArray* (*arrayCtor_t)(uint32 len, VMCommonClass* cl); #define ARRAYCLASS(name, elmt) \ -class name : public VMArray { \ +class name : public VMObject { \ public: \ static VirtualTable* VT; \ static const llvm::Type* llvmType; \ + sint32 size; \ elmt elements[1]; \ static name *acons(sint32 n, VMClassArray* cl); \ void initialise(VMCommonClass* atype, sint32 n); \ @@ -69,10 +70,11 @@ #undef ARRAYCLASS -class ArrayObject : public VMArray { +class ArrayObject : public VMObject { public: static VirtualTable* VT; static const llvm::Type* llvmType; + sint32 size; VMObject* elements[1]; static ArrayObject *acons(sint32 n, VMClassArray* cl); void initialise(VMCommonClass* atype, sint32 n); @@ -82,9 +84,10 @@ virtual void TRACER; }; -class UTF8 : public VMArray { +class UTF8 : public VMObject { public: static VirtualTable* VT; + sint32 size; uint16 elements[1]; static const llvm::Type* llvmType; From sanxiyn at gmail.com Mon Jun 30 05:13:49 2008 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Mon, 30 Jun 2008 12:13:49 -0000 Subject: [vmkit-commits] [vmkit] r52896 - /vmkit/trunk/lib/Mvm/CommandLine.cpp Message-ID: <200806301213.m5UCDnI3022774@zion.cs.uiuc.edu> Author: sanxiyn Date: Mon Jun 30 07:13:47 2008 New Revision: 52896 URL: http://llvm.org/viewvc/llvm-project?rev=52896&view=rev Log: Compilation fix Modified: vmkit/trunk/lib/Mvm/CommandLine.cpp Modified: vmkit/trunk/lib/Mvm/CommandLine.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommandLine.cpp?rev=52896&r1=52895&r2=52896&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/CommandLine.cpp (original) +++ vmkit/trunk/lib/Mvm/CommandLine.cpp Mon Jun 30 07:13:47 2008 @@ -10,6 +10,7 @@ #include #include +#include #include #include "CommandLine.h" @@ -22,7 +23,7 @@ int argc; char** argv; vmlet_main_t func; -}; +} thread_arg_t; typedef int (*boot_t)(); From sanxiyn at gmail.com Mon Jun 30 05:26:52 2008 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Mon, 30 Jun 2008 12:26:52 -0000 Subject: [vmkit-commits] [vmkit] r52897 - in /vmkit/trunk/lib/Mvm: Allocator/gcalloc.h Allocator/gcmapper.cpp GCMmap2/gcinit.cpp Message-ID: <200806301226.m5UCQqPC023184@zion.cs.uiuc.edu> Author: sanxiyn Date: Mon Jun 30 07:26:52 2008 New Revision: 52897 URL: http://llvm.org/viewvc/llvm-project?rev=52897&view=rev Log: Remove warnings Modified: vmkit/trunk/lib/Mvm/Allocator/gcalloc.h vmkit/trunk/lib/Mvm/Allocator/gcmapper.cpp vmkit/trunk/lib/Mvm/GCMmap2/gcinit.cpp Modified: vmkit/trunk/lib/Mvm/Allocator/gcalloc.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Allocator/gcalloc.h?rev=52897&r1=52896&r2=52897&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/Allocator/gcalloc.h (original) +++ vmkit/trunk/lib/Mvm/Allocator/gcalloc.h Mon Jun 30 07:26:52 2008 @@ -152,7 +152,7 @@ uintptr_t rounded = GCMappedArea::round(new_nbb); uintptr_t old_nbb = page->nbb(); signed int depl = rounded - page->nbb(); - if(depl) + if(depl) { if(page->mremap(rounded) == -1) /* perdu */ return new_header = stupid_realloc_chunk(old_header, new_nbb); else { @@ -161,6 +161,7 @@ else GCHash::hash_unprotected(page, (void *)((uintptr_t)page->area() + rounded), -depl, 0); } + } page->chunk_nbb(rounded); old_header->nbb(new_nbb); } else Modified: vmkit/trunk/lib/Mvm/Allocator/gcmapper.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Allocator/gcmapper.cpp?rev=52897&r1=52896&r2=52897&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/Allocator/gcmapper.cpp (original) +++ vmkit/trunk/lib/Mvm/Allocator/gcmapper.cpp Mon Jun 30 07:26:52 2008 @@ -47,13 +47,14 @@ static inline void *do_mmap(size_t sz) { void *res = DO_MMAP(sz); //printf("mmap %d bytes at %d\n", sz, res); - if(res == MAP_FAILED) + if(res == MAP_FAILED) { if (errno == ENOMEM) (*onMemoryError)(sz); else { gcfatal("unable to mmap %d bytes", sz); } + } return res; } @@ -125,7 +126,7 @@ unsigned int nb_area, i; GCMappedArea *cur; - for(nb_area=0, cur=base_area.next(); cur!=&base_area; cur=cur->next(), nb_area++); + for(nb_area=0, cur=base_area.next(); cur!=&base_area; cur=cur->next(), nb_area++) {} GCMappedArea* areas = (GCMappedArea*)alloca(sizeof(GCMappedArea) * nb_area); Modified: vmkit/trunk/lib/Mvm/GCMmap2/gcinit.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/GCMmap2/gcinit.cpp?rev=52897&r1=52896&r2=52897&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/GCMmap2/gcinit.cpp (original) +++ vmkit/trunk/lib/Mvm/GCMmap2/gcinit.cpp Mon Jun 30 07:26:52 2008 @@ -107,7 +107,7 @@ static void *get_base_sp(void) { void *fp= 0; - for (fp= get_curr_fp(); (*(void **)fp); fp= *(void **)fp); + for (fp= get_curr_fp(); (*(void **)fp); fp= *(void **)fp) {} return fp; }