[vmkit-commits] [vmkit] r180331 - move all incinerator related files in the incinerator directory (should be there). Update README.TXT. Move llvm.patches in a patch subdirectory.

Peter Senna Tschudin peter.senna at gmail.com
Thu Apr 25 09:57:37 PDT 2013


Author: peter.senna
Date: Thu Apr 25 11:56:07 2013
New Revision: 180331

URL: http://llvm.org/viewvc/llvm-project?rev=180331&view=rev
Log:
move all incinerator related files in the incinerator directory (should be there). Update README.TXT. Move llvm.patches in a patch subdirectory.
(cherry picked from commit c3cef6f1e121c3a192fdf9d3630ea0e0881eb5cc)

Added:
    vmkit/trunk/incinerator/
    vmkit/trunk/incinerator/README.TXT
      - copied, changed from r180330, vmkit/trunk/README.TXT
    vmkit/trunk/incinerator/knopflerfish.patch
      - copied, changed from r180330, vmkit/trunk/knopflerfish.patch
    vmkit/trunk/incinerator/osgi/
    vmkit/trunk/incinerator/osgi/.classpath
      - copied, changed from r180330, vmkit/trunk/osgi/.classpath
    vmkit/trunk/incinerator/osgi/.project
      - copied, changed from r180330, vmkit/trunk/osgi/.project
    vmkit/trunk/incinerator/osgi/META-INF/
    vmkit/trunk/incinerator/osgi/META-INF/MANIFEST.MF
      - copied, changed from r180330, vmkit/trunk/osgi/META-INF/MANIFEST.MF
    vmkit/trunk/incinerator/osgi/build.properties
      - copied, changed from r180330, vmkit/trunk/osgi/build.properties
    vmkit/trunk/incinerator/osgi/src/
    vmkit/trunk/incinerator/osgi/src/j3/
    vmkit/trunk/incinerator/osgi/src/j3/J3Mgr.java
      - copied, changed from r180330, vmkit/trunk/osgi/src/j3/J3Mgr.java
    vmkit/trunk/incinerator/osgi/src/j3/vm/
    vmkit/trunk/incinerator/osgi/src/j3/vm/OSGi.java
      - copied, changed from r180330, vmkit/trunk/osgi/src/j3/vm/OSGi.java
    vmkit/trunk/incinerator/osgi/src/j3mgr/
    vmkit/trunk/incinerator/osgi/src/j3mgr/Activator.java
      - copied, changed from r180330, vmkit/trunk/osgi/src/j3mgr/Activator.java
    vmkit/trunk/incinerator/osgi/src/j3mgr/J3MgrImpl.java
      - copied, changed from r180330, vmkit/trunk/osgi/src/j3mgr/J3MgrImpl.java
    vmkit/trunk/patches/
    vmkit/trunk/patches/llvm.patch
      - copied, changed from r180330, vmkit/trunk/llvm.patch
Removed:
    vmkit/trunk/knopflerfish.patch
    vmkit/trunk/llvm.patch
    vmkit/trunk/osgi/.classpath
    vmkit/trunk/osgi/.project
    vmkit/trunk/osgi/META-INF/MANIFEST.MF
    vmkit/trunk/osgi/build.properties
    vmkit/trunk/osgi/src/j3/J3Mgr.java
    vmkit/trunk/osgi/src/j3/vm/OSGi.java
    vmkit/trunk/osgi/src/j3mgr/Activator.java
    vmkit/trunk/osgi/src/j3mgr/J3MgrImpl.java
Modified:
    vmkit/trunk/README.TXT

Modified: vmkit/trunk/README.TXT
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/README.TXT?rev=180331&r1=180330&r2=180331&view=diff
==============================================================================
--- vmkit/trunk/README.TXT (original)
+++ vmkit/trunk/README.TXT Thu Apr 25 11:56:07 2013
@@ -59,21 +59,21 @@ cd ../projects
 svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
 cd ..
 
-* Patch it:
+* Patch it if you want to have a better debug support:
 
 cd llvm
-patch -p1 < ../ijvm/llvm.patch
+patch -p1 < ../vmkit2/patches/llvm.patch
 
 * Make it (release mode):
 
 ./configure --enable-optimized --enable-assertions --enable-jit --enable-threads --enable-pthreads --enable-pic --enable-targets=x86,cpp --disable-docs --disable-doxygen
-make -j12 ENABLE_OPTIMIZED=1 BUILD_EXAMPLES=0 ENABLE_DOCS=0
-ln -s Release+Asserts Debug+Asserts
+make -j12 BUILD_EXAMPLES=0 ENABLE_DOCS=0
 
 * You can also make it in debug mode, but this is is not necessary to debug compiled programs:
 
 ./configure --disable-optimized --enable-assertions --enable-debug-runtime --enable-debug-symbols --enable-keep-symbols --enable-jit --enable-threads --enable-pthreads --enable-pic --enable-targets=x86,cpp --disable-docs --disable-doxygen
-make -j12 ENABLE_OPTIMIZED=0 BUILD_EXAMPLES=0 ENABLE_DOCS=0
+
+make -j12 BUILD_EXAMPLES=0 ENABLE_DOCS=0
 
 ======
 VMKit:
@@ -81,28 +81,16 @@ VMKit:
 
 * Get it (git):
 
-git clone git://scm.gforge.inria.fr/vmkit2/vmkit2.git -b ijvm ijvm
-or:
-git clone git+ssh://YOUR_USER_NAME.gforge.inria.fr//gitroot/vmkit2/vmkit2.git -b ijvm ijvm
+git clone git://scm.gforge.inria.fr/vmkit2/vmkit2.git
 
-* You can also get it via svn:
+* or
 
-svn co http://llvm.org/svn/llvm-project/vmkit/trunk vmkit
+git clone git+ssh://YOUR_USER_NAME@gforge.inria.fr//gitroot/vmkit2/vmkit2.git
 
 * Make it (debug mode):
 
-./configure --with-llvmsrc=/home/koutheir/PhD/VMKit/llvm --with-llvmobj=/home/koutheir/PhD/VMKit/llvm --with-gnu-classpath-libs=/usr/local/classpath/lib/classpath --with-gnu-classpath-glibj=/usr/local/classpath/share/classpath/glibj.zip
-make -j12 ENABLE_OPTIMIZED=0 REQUIRES_FRAME_POINTER=1 KEEP_SYMBOLS=1 DEBUG_RUNTIME=1 DEBUG_SYMBOLS=1
+./configure --with-llvmsrc=@PATH_TO_LLVM@ --with-llvmobj=@PATH_TO_LLVM@ --with-gnu-classpath-libs=@PATH_TO_GNUCLASSPATH@ --with-gnu-classpath-glibj=@PATH_TO_GNUCLASSPATH@/lib/glibj.zip
 
-=============
-Knopflerfish:
-=============
-
-* Apply patch:
-cd knopflerfish
-patch -p1 < ../ijvm/knopflerfish.patch
-cd ..
+* Buil it:
+make -j12
 
-* Recompile Knopflerfish:
-cd knopflerfish/osgi
-ant default

Copied: vmkit/trunk/incinerator/README.TXT (from r180330, vmkit/trunk/README.TXT)
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/README.TXT?p2=vmkit/trunk/incinerator/README.TXT&p1=vmkit/trunk/README.TXT&r1=180330&r2=180331&rev=180331&view=diff
==============================================================================
    (empty)

Copied: vmkit/trunk/incinerator/knopflerfish.patch (from r180330, vmkit/trunk/knopflerfish.patch)
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/knopflerfish.patch?p2=vmkit/trunk/incinerator/knopflerfish.patch&p1=vmkit/trunk/knopflerfish.patch&r1=180330&r2=180331&rev=180331&view=diff
==============================================================================
    (empty)

Copied: vmkit/trunk/incinerator/osgi/.classpath (from r180330, vmkit/trunk/osgi/.classpath)
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/osgi/.classpath?p2=vmkit/trunk/incinerator/osgi/.classpath&p1=vmkit/trunk/osgi/.classpath&r1=180330&r2=180331&rev=180331&view=diff
==============================================================================
    (empty)

Copied: vmkit/trunk/incinerator/osgi/.project (from r180330, vmkit/trunk/osgi/.project)
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/osgi/.project?p2=vmkit/trunk/incinerator/osgi/.project&p1=vmkit/trunk/osgi/.project&r1=180330&r2=180331&rev=180331&view=diff
==============================================================================
    (empty)

Copied: vmkit/trunk/incinerator/osgi/META-INF/MANIFEST.MF (from r180330, vmkit/trunk/osgi/META-INF/MANIFEST.MF)
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/osgi/META-INF/MANIFEST.MF?p2=vmkit/trunk/incinerator/osgi/META-INF/MANIFEST.MF&p1=vmkit/trunk/osgi/META-INF/MANIFEST.MF&r1=180330&r2=180331&rev=180331&view=diff
==============================================================================
    (empty)

Copied: vmkit/trunk/incinerator/osgi/build.properties (from r180330, vmkit/trunk/osgi/build.properties)
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/osgi/build.properties?p2=vmkit/trunk/incinerator/osgi/build.properties&p1=vmkit/trunk/osgi/build.properties&r1=180330&r2=180331&rev=180331&view=diff
==============================================================================
    (empty)

Copied: vmkit/trunk/incinerator/osgi/src/j3/J3Mgr.java (from r180330, vmkit/trunk/osgi/src/j3/J3Mgr.java)
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/osgi/src/j3/J3Mgr.java?p2=vmkit/trunk/incinerator/osgi/src/j3/J3Mgr.java&p1=vmkit/trunk/osgi/src/j3/J3Mgr.java&r1=180330&r2=180331&rev=180331&view=diff
==============================================================================
    (empty)

Copied: vmkit/trunk/incinerator/osgi/src/j3/vm/OSGi.java (from r180330, vmkit/trunk/osgi/src/j3/vm/OSGi.java)
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/osgi/src/j3/vm/OSGi.java?p2=vmkit/trunk/incinerator/osgi/src/j3/vm/OSGi.java&p1=vmkit/trunk/osgi/src/j3/vm/OSGi.java&r1=180330&r2=180331&rev=180331&view=diff
==============================================================================
    (empty)

Copied: vmkit/trunk/incinerator/osgi/src/j3mgr/Activator.java (from r180330, vmkit/trunk/osgi/src/j3mgr/Activator.java)
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/osgi/src/j3mgr/Activator.java?p2=vmkit/trunk/incinerator/osgi/src/j3mgr/Activator.java&p1=vmkit/trunk/osgi/src/j3mgr/Activator.java&r1=180330&r2=180331&rev=180331&view=diff
==============================================================================
    (empty)

Copied: vmkit/trunk/incinerator/osgi/src/j3mgr/J3MgrImpl.java (from r180330, vmkit/trunk/osgi/src/j3mgr/J3MgrImpl.java)
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/osgi/src/j3mgr/J3MgrImpl.java?p2=vmkit/trunk/incinerator/osgi/src/j3mgr/J3MgrImpl.java&p1=vmkit/trunk/osgi/src/j3mgr/J3MgrImpl.java&r1=180330&r2=180331&rev=180331&view=diff
==============================================================================
    (empty)

Removed: vmkit/trunk/knopflerfish.patch
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/knopflerfish.patch?rev=180330&view=auto
==============================================================================
--- vmkit/trunk/knopflerfish.patch (original)
+++ vmkit/trunk/knopflerfish.patch (removed)
@@ -1,29 +0,0 @@
-Index: knopflerfish/osgi/framework/src/j3/vm/OSGi.java
-===================================================================
---- knopflerfish/osgi/framework/src/j3/vm/OSGi.java	1970-01-01 01:00:00.000000000 +0100
-+++ knopflerfish/osgi/framework/src/j3/vm/OSGi.java	2012-10-27 00:08:43.000000000 +0200
-@@ -0,0 +1,6 @@
-+package j3.vm;
-+
-+public class OSGi
-+{
-+	public static native void associateBundleClass(long bundleID, Class classObject);
-+}
-Index: knopflerfish/osgi/framework/src/org/knopflerfish/framework/BundleClassLoader.java
-===================================================================
---- knopflerfish/osgi/framework/src/org/knopflerfish/framework/BundleClassLoader.java	2012-10-27 02:29:49.852807353 +0200
-+++ knopflerfish/osgi/framework/src/org/knopflerfish/framework/BundleClassLoader.java	2012-10-27 02:36:22.287024825 +0200
-@@ -819,9 +819,12 @@
-     }
-     Vector av = classPath.componentExists(path, onlyFirst);
-     if (av != null) {
-       try {
--        return action.get(av, path, name, pkg, this);
-+        Object cl = action.get(av, path, name, pkg, this);
-+        if (cl instanceof Class)
-+          j3.vm.OSGi.associateBundleClass(getBundle().getBundleId(), (Class)cl);
-+        return cl;
-       } catch (IOException ioe) {
-         fwCtx.listeners.frameworkError(bpkgs.bg.bundle, ioe);
-         return null;
-       }

Removed: vmkit/trunk/llvm.patch
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/llvm.patch?rev=180330&view=auto
==============================================================================
--- vmkit/trunk/llvm.patch (original)
+++ vmkit/trunk/llvm.patch (removed)
@@ -1,70 +0,0 @@
-diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
-index d74a703..1831bb6 100644
---- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
-+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
-@@ -173,7 +173,7 @@ bool AsmPrinter::doInitialization(Module &M) {
-   for (GCModuleInfo::iterator I = MI->begin(), E = MI->end(); I != E; ++I)
-     if (GCMetadataPrinter *MP = GetOrCreateGCPrinter(*I))
-       MP->beginAssembly(*this);
--
-+/*
-   // Emit module-level inline asm if it exists.
-   if (!M.getModuleInlineAsm().empty()) {
-     OutStreamer.AddComment("Start of file scope inline assembly");
-@@ -182,7 +182,7 @@ bool AsmPrinter::doInitialization(Module &M) {
-     OutStreamer.AddComment("End of file scope inline assembly");
-     OutStreamer.AddBlankLine();
-   }
--
-+*/
-   if (MAI->doesSupportDebugInformation())
-     DD = new DwarfDebug(this, &M);
- 
-@@ -929,6 +929,15 @@ bool AsmPrinter::doFinalization(Module &M) {
-     if (GCMetadataPrinter *MP = GetOrCreateGCPrinter(*--I))
-       MP->finishAssembly(*this);
- 
-+  // Emit module-level inline asm if it exists.
-+  if (!M.getModuleInlineAsm().empty()) {
-+    OutStreamer.AddComment("Start of file scope inline assembly");
-+    OutStreamer.AddBlankLine();
-+    EmitInlineAsm(M.getModuleInlineAsm()+"\n");
-+    OutStreamer.AddComment("End of file scope inline assembly");
-+    OutStreamer.AddBlankLine();
-+  }
-+
-   // If we don't have any trampolines, then we don't require stack memory
-   // to be executable. Some targets have a directive to declare this.
-   Function *InitTrampolineIntrinsic = M.getFunction("llvm.init.trampoline");
-diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp
-index 0f3efd8..d96a258 100644
---- a/lib/Target/CppBackend/CPPBackend.cpp
-+++ b/lib/Target/CppBackend/CPPBackend.cpp
-@@ -375,6 +375,7 @@ std::string CppWriter::getCppName(Type* Ty) {
-     case Type::DoubleTyID:   return "Type::getDoubleTy(mod->getContext())";
-     case Type::LabelTyID:    return "Type::getLabelTy(mod->getContext())";
-     case Type::X86_MMXTyID:  return "Type::getX86_MMXTy(mod->getContext())";
-+    case Type::MetadataTyID: return "Type::getMetadataTy(mod->getContext())";
-     default:
-       error("Invalid primitive type");
-       break;
-@@ -445,6 +446,8 @@ std::string CppWriter::getCppName(const Value* val) {
-     } else {
-       name = getTypePrefix(val->getType());
-     }
-+  } else if (dyn_cast<MDNode>(val)) {
-+	  name = std::string("metadata_");
-   } else {
-     name = getTypePrefix(val->getType());
-   }
-@@ -1411,6 +1414,10 @@ void CppWriter::printInstruction(const Instruction *I,
-           << (ila->hasSideEffects() ? "true" : "false") << ");";
-       nl(Out);
-     }
-+    if (const Function* F = dyn_cast<Function>(call->getCalledValue())) {
-+    	if ((F->getName().compare("llvm.dbg.value") == 0) || (F->getName().compare("llvm.dbg.declare") == 0))
-+    		break;	//Generate nothing
-+    }
-     if (call->getNumArgOperands() > 1) {
-       Out << "std::vector<Value*> " << iName << "_params;";
-       nl(Out);

Removed: vmkit/trunk/osgi/.classpath
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/osgi/.classpath?rev=180330&view=auto
==============================================================================
--- vmkit/trunk/osgi/.classpath (original)
+++ vmkit/trunk/osgi/.classpath (removed)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>

Removed: vmkit/trunk/osgi/.project
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/osgi/.project?rev=180330&view=auto
==============================================================================
--- vmkit/trunk/osgi/.project (original)
+++ vmkit/trunk/osgi/.project (removed)
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>j3mgr</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-	</natures>
-</projectDescription>

Removed: vmkit/trunk/osgi/META-INF/MANIFEST.MF
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/osgi/META-INF/MANIFEST.MF?rev=180330&view=auto
==============================================================================
--- vmkit/trunk/osgi/META-INF/MANIFEST.MF (original)
+++ vmkit/trunk/osgi/META-INF/MANIFEST.MF (removed)
@@ -1,10 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: J3 Virtual Machine Manager
-Bundle-SymbolicName: j3mgr;singleton:=true
-Bundle-Version: 1.0.0
-Bundle-Activator: j3mgr.Activator
-Import-Package: org.osgi.framework;version="1.3.0",
- org.osgi.service.packageadmin;version="1.0.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: j3

Removed: vmkit/trunk/osgi/build.properties
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/osgi/build.properties?rev=180330&view=auto
==============================================================================
--- vmkit/trunk/osgi/build.properties (original)
+++ vmkit/trunk/osgi/build.properties (removed)
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .

Removed: vmkit/trunk/osgi/src/j3/J3Mgr.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/osgi/src/j3/J3Mgr.java?rev=180330&view=auto
==============================================================================
--- vmkit/trunk/osgi/src/j3/J3Mgr.java (original)
+++ vmkit/trunk/osgi/src/j3/J3Mgr.java (removed)
@@ -1,14 +0,0 @@
-package j3;
-
-import org.osgi.framework.Bundle;
-
-public interface J3Mgr
-{
-	public void resetReferencesToBundle(Bundle bundle) throws Exception;
-	
-	// THE FOLLOWING METHODS ARE DEBUGGING HELPERS
-	// THEY SHOULD BE REMOVED IN PRODUCTION
-	
-	public void dumpClassLoaderBundles();
-	public void resetReferencesToBundle(String bundleName) throws Exception;
-}

Removed: vmkit/trunk/osgi/src/j3/vm/OSGi.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/osgi/src/j3/vm/OSGi.java?rev=180330&view=auto
==============================================================================
--- vmkit/trunk/osgi/src/j3/vm/OSGi.java (original)
+++ vmkit/trunk/osgi/src/j3/vm/OSGi.java (removed)
@@ -1,8 +0,0 @@
-package j3.vm;
-
-public class OSGi
-{
-	public static native void associateBundleClass(long bundleID, Class classObject);
-	public static native void resetReferencesToBundle(long bundleID);
-	public static native void dumpClassLoaderBundles();
-}

Removed: vmkit/trunk/osgi/src/j3mgr/Activator.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/osgi/src/j3mgr/Activator.java?rev=180330&view=auto
==============================================================================
--- vmkit/trunk/osgi/src/j3mgr/Activator.java (original)
+++ vmkit/trunk/osgi/src/j3mgr/Activator.java (removed)
@@ -1,28 +0,0 @@
-package j3mgr;
-
-import j3.J3Mgr;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator
-	implements BundleActivator
-{
-	J3MgrImpl mgr;
-
-	public void start(BundleContext bundleContext) throws Exception
-	{
-		mgr = new J3MgrImpl();
-		mgr.open(bundleContext);
-		
-		bundleContext.registerService(J3Mgr.class.getName(), mgr, null);
-	}
-
-	public void stop(BundleContext bundleContext) throws Exception
-	{
-		if (mgr != null) {
-			mgr.close();
-			mgr = null;
-		}
-	}
-}

Removed: vmkit/trunk/osgi/src/j3mgr/J3MgrImpl.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/osgi/src/j3mgr/J3MgrImpl.java?rev=180330&view=auto
==============================================================================
--- vmkit/trunk/osgi/src/j3mgr/J3MgrImpl.java (original)
+++ vmkit/trunk/osgi/src/j3mgr/J3MgrImpl.java (removed)
@@ -1,93 +0,0 @@
-package j3mgr;
-
-import java.util.LinkedList;
-
-import j3.J3Mgr;
-
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkEvent;
-import org.osgi.framework.FrameworkListener;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-public class J3MgrImpl
-	implements J3Mgr, FrameworkListener
-{
-	BundleContext context;
-	LinkedList<Long> bundlesToKill;
-	
-	public void open(BundleContext bundleContext)
-	{
-		context = bundleContext;
-		
-		bundlesToKill = new LinkedList<Long>();
-		
-		// We need to know when packages are refreshed
-		context.addFrameworkListener(this);
-	}
-
-	public void close()
-	{
-		context.removeFrameworkListener(this);
-		context = null;
-		
-		bundlesToKill = null;
-	}
-
-	public void resetReferencesToBundle(Bundle bundle) throws Exception
-	{
-		System.out.println("resetReferencesToBundle: #" + bundle.getBundleId() + " " + bundle.getSymbolicName());
-		
-		System.out.println("Stopping bundle: " + bundle.getSymbolicName());
-		bundle.stop();
-		System.out.println("Uninstalling bundle: " + bundle.getSymbolicName());
-		bundle.uninstall();
-
-		bundlesToKill.addFirst(new Long(bundle.getBundleId()));
-		
-		System.out.println("Refreshing framework...");
-		refreshFramework(bundle);
-	}
-	
-	void refreshFramework(Bundle bundle)
-	{
-		ServiceReference<?> pkgAdminRef = (ServiceReference<?>)context.getServiceReference(
-			"org.osgi.service.packageadmin.PackageAdmin");
-		PackageAdmin pkgAdmin = (PackageAdmin)context.getService(pkgAdminRef);
-		pkgAdmin.refreshPackages(null);
-	}
-
-	public void frameworkEvent(FrameworkEvent event)
-	{
-		if (event.getType() != FrameworkEvent.PACKAGES_REFRESHED) return;
-
-		long bundleID = bundlesToKill.removeLast().longValue();
-		
-		System.out.println("Resetting stale references to bundle #" + bundleID);
-		j3.vm.OSGi.resetReferencesToBundle(bundleID);
-	}
-	
-	// THE FOLLOWING METHODS ARE DEBUGGING HELPERS
-	// THEY SHOULD BE REMOVED IN PRODUCTION
-	
-	public void resetReferencesToBundle(String bundleName) throws Exception
-	{
-		resetReferencesToBundle(getBundle(bundleName));
-	}
-
-	Bundle getBundle(String symbolicName)
-	{
-		Bundle[] bundles = context.getBundles();
-		for (int i=0; i < bundles.length; ++i) {
-			if (symbolicName.equals(bundles[i].getSymbolicName()))
-				return bundles[i];
-		}
-		return null;
-	}
-
-	public void dumpClassLoaderBundles()
-	{
-		j3.vm.OSGi.dumpClassLoaderBundles();
-	}
-}

Copied: vmkit/trunk/patches/llvm.patch (from r180330, vmkit/trunk/llvm.patch)
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/patches/llvm.patch?p2=vmkit/trunk/patches/llvm.patch&p1=vmkit/trunk/llvm.patch&r1=180330&r2=180331&rev=180331&view=diff
==============================================================================
    (empty)





More information about the vmkit-commits mailing list