|
From: <ls...@us...> - 2010-12-27 18:41:55
|
Revision: 5759
http://jnode.svn.sourceforge.net/jnode/?rev=5759&view=rev
Author: lsantha
Date: 2010-12-27 18:41:44 +0000 (Mon, 27 Dec 2010)
Log Message:
-----------
Checkstyle fixes.
Modified Paths:
--------------
trunk/core/src/core/org/jnode/assembler/x86/X86BinaryAssembler.java
trunk/core/src/core/org/jnode/boot/InitJarProcessor.java
trunk/core/src/core/org/jnode/bootlog/BootLog.java
trunk/core/src/core/org/jnode/bootlog/BootLogInstance.java
trunk/core/src/core/org/jnode/naming/InitialNaming.java
trunk/core/src/core/org/jnode/plugin/AutoUnzipPlugin.java
trunk/core/src/core/org/jnode/plugin/Plugin.java
trunk/core/src/core/org/jnode/plugin/PluginDescriptor.java
trunk/core/src/core/org/jnode/plugin/PluginManager.java
trunk/core/src/core/org/jnode/plugin/PluginUtils.java
trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java
trunk/core/src/core/org/jnode/plugin/model/ConfigurationElementModel.java
trunk/core/src/core/org/jnode/plugin/model/ExtensionModel.java
trunk/core/src/core/org/jnode/plugin/model/ExtensionPointModel.java
trunk/core/src/core/org/jnode/plugin/model/Factory.java
trunk/core/src/core/org/jnode/plugin/model/FragmentDescriptorModel.java
trunk/core/src/core/org/jnode/plugin/model/LibraryModel.java
trunk/core/src/core/org/jnode/plugin/model/PluginClassLoaderImpl.java
trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java
trunk/core/src/core/org/jnode/plugin/model/PluginJar.java
trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java
trunk/core/src/core/org/jnode/plugin/model/PluginsClassLoader.java
trunk/core/src/core/org/jnode/plugin/model/RuntimeModel.java
trunk/core/src/core/org/jnode/protocol/ProtocolHandlerFactoryPlugin.java
trunk/core/src/core/org/jnode/security/JNodePolicy.java
trunk/core/src/core/org/jnode/util/ByteQueueProcessorThread.java
trunk/core/src/core/org/jnode/util/QueueProcessorThread.java
trunk/core/src/core/org/jnode/vm/BaseVmArchitecture.java
trunk/core/src/core/org/jnode/vm/BootLogImpl.java
trunk/core/src/core/org/jnode/vm/HeapHelperImpl.java
trunk/core/src/core/org/jnode/vm/MemoryBlockManager.java
trunk/core/src/core/org/jnode/vm/VmImpl.java
trunk/core/src/core/org/jnode/vm/VmSystem.java
trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java
trunk/core/src/core/org/jnode/vm/bytecode/DeadBlockFinder.java
trunk/core/src/core/org/jnode/vm/classmgr/VmByteCode.java
trunk/core/src/core/org/jnode/vm/classmgr/VmType.java
trunk/core/src/core/org/jnode/vm/compiler/CompiledMethod.java
trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java
trunk/core/src/core/org/jnode/vm/facade/Vm.java
trunk/core/src/core/org/jnode/vm/facade/VmArchitecture.java
trunk/core/src/core/org/jnode/vm/facade/VmHeapManager.java
trunk/core/src/core/org/jnode/vm/facade/VmProcessor.java
trunk/core/src/core/org/jnode/vm/facade/VmThread.java
trunk/core/src/core/org/jnode/vm/facade/VmUtils.java
trunk/core/src/core/org/jnode/vm/memmgr/VmHeapManager.java
trunk/core/src/core/org/jnode/vm/memmgr/def/FinalizerThread.java
trunk/core/src/core/org/jnode/vm/scheduler/VmThread.java
trunk/core/src/core/org/jnode/vm/x86/MPConfigTable.java
trunk/core/src/core/org/jnode/vm/x86/MPFloatingPointerStructure.java
trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86Compiler.java
trunk/core/src/core/org/jnode/vm/x86/compiler/X86CompilerHelper.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/EmitterContext.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/FPCompiler.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/FPCompilerFPU.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/FPCompilerSSE.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/FPUHelper.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/FPUStack.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/FloatItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/InlinedMethodInfo.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/IntItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/Item.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemFactory.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemStack.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemVisitor.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/L1AHelper.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/LongItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/MagicHelper.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/RefItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/RegisterVisitor.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/VirtualStack.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/WordItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86GCMapIterator.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86Level1ACompiler.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86RegisterPool.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86StackFrame.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/DoubleItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/DoubleWordItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/EmitterContext.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/FPCompiler.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/FPCompilerFPU.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/FPCompilerSSE.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/FPUHelper.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/FPUStack.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/FloatItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/InlinedMethodInfo.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/IntItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/Item.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemFactory.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemStack.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemVisitor.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/L1AHelper.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/LongItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/MagicHelper.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/RefItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/RegisterVisitor.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/VirtualStack.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/WordItem.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86GCMapIterator.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86Level1BCompiler.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86RegisterPool.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86StackFrame.java
trunk/core/src/core/org/jnode/work/WorkUtils.java
trunk/core/src/driver/org/jnode/driver/AbstractDeviceManager.java
trunk/core/src/driver/org/jnode/driver/DefaultDeviceManager.java
trunk/core/src/driver/org/jnode/driver/Device.java
trunk/core/src/driver/org/jnode/driver/Driver.java
trunk/core/src/driver/org/jnode/driver/console/spi/AbstractConsoleManager.java
trunk/core/src/driver/org/jnode/driver/console/textscreen/DefaultKeyboardHandler.java
trunk/core/src/driver/org/jnode/driver/textscreen/x86/PcTextScreen.java
trunk/core/src/test/org/jnode/test/core/StackView.java
trunk/core/src/test/org/jnode/test/framework/TestRunnerPlugin.java
Modified: trunk/core/src/core/org/jnode/assembler/x86/X86BinaryAssembler.java
===================================================================
--- trunk/core/src/core/org/jnode/assembler/x86/X86BinaryAssembler.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/assembler/x86/X86BinaryAssembler.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.assembler.x86;
import static org.jnode.assembler.x86.X86Register.CS;
@@ -76,12 +76,12 @@
* of equality depend on what the 'key' is. If it is a {@link Label}, then two
* Keys are equal if the Label values are equal. Otherwise, two keys are equal if
* the 'key' values refer to the same object.
- *
+ *
* @param obj the object to test for equality.
* @return Return {@code true} if obj is 'equal to' this, {@code false} otherwise.
*/
public final boolean equals(Object obj) {
- if(obj==null || !(obj instanceof Key)){
+ if (obj == null || !(obj instanceof Key)) {
return false;
}
obj = ((Key) obj).key;
@@ -94,7 +94,7 @@
/**
* The hashcode is the hashcode for the Key's 'key' object.
- *
+ *
* @return This Key instance's hashcode.
*/
public final int hashCode() {
@@ -2200,6 +2200,7 @@
//TODO this method does not handle the forward jumps correctly, needs further work.
//Also the general purpose version of the method writeJCC(Lable lebal, int jumpcode)
//for handling byte sized target for the jump would renders this method unnecessary.
+
/**
* Create a LOOP label instruction. The given label must have be resolved
* before!
@@ -3299,6 +3300,7 @@
}
//todo 64 bits support
+
/**
* @param operandSize
* @param dstMmx
@@ -3321,6 +3323,7 @@
}
//todo 64 bits support
+
/**
* @param operandSize
* @param dstReg
@@ -3343,6 +3346,7 @@
}
//todo 64 bits support
+
/**
* @param dstMmx
* @param srcMmx
@@ -3352,6 +3356,7 @@
}
//todo 64 bits support
+
/**
* @param operandSize
* @param dstMmx
@@ -3376,6 +3381,7 @@
}
//todo 64 bits support
+
/**
* @param operandSize
* @param dstMmx
Modified: trunk/core/src/core/org/jnode/boot/InitJarProcessor.java
===================================================================
--- trunk/core/src/core/org/jnode/boot/InitJarProcessor.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/boot/InitJarProcessor.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -30,7 +30,6 @@
import java.util.jar.Attributes;
import java.util.jar.Manifest;
-import org.jnode.bootlog.BootLog;
import org.jnode.bootlog.BootLogInstance;
import org.jnode.plugin.PluginDescriptor;
import org.jnode.plugin.PluginException;
Modified: trunk/core/src/core/org/jnode/bootlog/BootLog.java
===================================================================
--- trunk/core/src/core/org/jnode/bootlog/BootLog.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/bootlog/BootLog.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.bootlog;
import java.io.PrintStream;
@@ -26,15 +26,14 @@
* Logging class used during bootstrap.
*
* @author Ewout Prangsma (ep...@us...)
- *
*/
-public interface BootLog {
+public interface BootLog {
public static final int DEBUG = 1;
public static final int INFO = 2;
public static final int WARN = 3;
public static final int ERROR = 4;
public static final int FATAL = 5;
-
+
/**
* Log a debug message
*
Modified: trunk/core/src/core/org/jnode/bootlog/BootLogInstance.java
===================================================================
--- trunk/core/src/core/org/jnode/bootlog/BootLogInstance.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/bootlog/BootLogInstance.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -8,34 +8,35 @@
/**
- * Class holding the {@link BootLog} instance used by the system.
- *
+ * Class holding the {@link BootLog} instance used by the system.
+ *
* @author Fabien DUMINY
- *
*/
public final class BootLogInstance {
- private BootLogInstance () {
- }
-
- /**
- * Get the system's {@link BootLog}.
- * @return the system's {@link BootLog}.
- */
- public static BootLog get() {
- try {
- return InitialNaming.lookup(BootLog.class);
- } catch (NameNotFoundException e) {
- throw new Error("unable to find a BootLog instance", e);
- }
- }
+ private BootLogInstance() {
+ }
- /**
- * Set the system's {@link BootLog}.
- * @param bootLog the system's {@link BootLog}.
- * @throws NamingException
- * @throws NameAlreadyBoundException
- */
- public static void set(BootLog bootLog) throws NameAlreadyBoundException, NamingException {
- InitialNaming.bind(BootLog.class, bootLog);
- }
+ /**
+ * Get the system's {@link BootLog}.
+ *
+ * @return the system's {@link BootLog}.
+ */
+ public static BootLog get() {
+ try {
+ return InitialNaming.lookup(BootLog.class);
+ } catch (NameNotFoundException e) {
+ throw new Error("unable to find a BootLog instance", e);
+ }
+ }
+
+ /**
+ * Set the system's {@link BootLog}.
+ *
+ * @param bootLog the system's {@link BootLog}.
+ * @throws NamingException
+ * @throws NameAlreadyBoundException
+ */
+ public static void set(BootLog bootLog) throws NameAlreadyBoundException, NamingException {
+ InitialNaming.bind(BootLog.class, bootLog);
+ }
}
Modified: trunk/core/src/core/org/jnode/naming/InitialNaming.java
===================================================================
--- trunk/core/src/core/org/jnode/naming/InitialNaming.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/naming/InitialNaming.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.naming;
import java.util.Set;
@@ -49,27 +49,30 @@
/**
* Add a {@link NameSpaceListener} to the NameSpace
+ *
* @param <T>
* @param name
* @param l
*/
public static <T> void addNameSpaceListener(Class<T> name, NameSpaceListener<T> l) {
- NAME_SPACE.addNameSpaceListener(name, l);
+ NAME_SPACE.addNameSpaceListener(name, l);
}
-
+
/**
* Remove a {@link NameSpaceListener} from the NameSpace
+ *
* @param <T>
* @param name
* @param l
*/
public static <T> void removeNameSpaceListener(Class<T> name, NameSpaceListener<T> l) {
- NAME_SPACE.removeNameSpaceListener(name, l);
+ NAME_SPACE.removeNameSpaceListener(name, l);
}
/**
* Define the {@link NameSpace} used for storing services.
* If a {@link NameSpace} is already defined, then a {@link SecurityException} is thrown.
+ *
* @param namespace
*/
public static void setNameSpace(NameSpace namespace) {
@@ -89,7 +92,7 @@
*/
public static <T, E extends T> void bind(Class<T> name, E service) throws NamingException,
NameAlreadyBoundException {
- NAME_SPACE.bind(name, service);
+ NAME_SPACE.bind(name, service);
}
/**
@@ -99,7 +102,7 @@
* @param name
*/
public static void unbind(Class<?> name) {
- NAME_SPACE.unbind(name);
+ NAME_SPACE.unbind(name);
}
/**
Modified: trunk/core/src/core/org/jnode/plugin/AutoUnzipPlugin.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/AutoUnzipPlugin.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/AutoUnzipPlugin.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.plugin;
import java.io.File;
@@ -28,16 +28,15 @@
/**
- * This is a special implementation of {@link Plugin} for plugins that want
- * to automatically unzip their content to a given directory
+ * This is a special implementation of {@link Plugin} for plugins that want
+ * to automatically unzip their content to a given directory
* while they are started.
- *
- * @author fabien
*
+ * @author fabien
*/
public class AutoUnzipPlugin extends Plugin {
private boolean startFinished = false;
-
+
public AutoUnzipPlugin(PluginDescriptor descriptor) {
super(descriptor);
}
@@ -45,14 +44,14 @@
@Override
protected void startPlugin() throws PluginException {
startFinished = false;
- new Thread() {
+ (new Thread() {
@Override
public void run() {
copyResources();
}
- } .start();
+ }).start();
}
-
+
public boolean isStartFinished() {
return startFinished;
}
@@ -62,14 +61,14 @@
// do nothing for now
// TODO should we remove the copied files ?
}
-
+
private void copyResources() {
System.out.println("auto unzipping plugin " + getDescriptor().getId());
-
- try {
+
+ try {
//FIXME shouldn't be hard coded but use java.home system property instead
final File jnodeHome = new File("/jnode");
-
+
// wait the jnode home directory is created
while (!jnodeHome.exists()) {
try {
@@ -78,25 +77,25 @@
e.printStackTrace();
}
}
-
+
// create the plugin root directory
final File pluginRootFile = new File(jnodeHome, getDescriptor().getId());
pluginRootFile.mkdir();
-
+
// copy each plugin's resource to the plugin root directory
final PluginDescriptor desc = AutoUnzipPlugin.this.getDescriptor();
final ClassLoader cl = desc.getPluginClassLoader();
final String pluginRoot = pluginRootFile.getAbsolutePath() + "/";
final byte[] buffer = new byte[10240];
-
+
if (!(cl instanceof PluginClassLoader)) {
- System.err.println("Plugin's ClassLoader doesn't implements PluginClassLoader");
- return;
+ System.err.println("Plugin's ClassLoader doesn't implements PluginClassLoader");
+ return;
}
-
+
for (String resName : ((PluginClassLoader) cl).getResources()) {
final InputStream input = cl.getResourceAsStream(resName);
-
+
try {
copy(input, pluginRoot, resName, buffer);
} catch (SecurityException e) {
@@ -113,20 +112,20 @@
System.out.print("plugin " + getDescriptor().getId());
System.out.println(" has been unzipped to " + pluginRootFile.getAbsolutePath());
} finally {
- startFinished = true;
- }
+ startFinished = true;
+ }
}
-
- private void copy(InputStream input, String pluginRoot, String name, byte[] buffer)
+
+ private void copy(InputStream input, String pluginRoot, String name, byte[] buffer)
throws SecurityException, IOException {
File output = new File(pluginRoot + name);
output.getParentFile().mkdirs();
-
- FileOutputStream fos = null;
+
+ FileOutputStream fos = null;
try {
fos = new FileOutputStream(output);
int nbRead;
-
+
while ((nbRead = input.read(buffer)) > 0) {
fos.write(buffer, 0, nbRead);
}
@@ -134,7 +133,7 @@
if (fos != null) {
fos.close();
}
-
+
if (input != null) {
input.close();
}
Modified: trunk/core/src/core/org/jnode/plugin/Plugin.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/Plugin.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/Plugin.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -24,7 +24,6 @@
import java.security.PrivilegedAction;
import java.util.prefs.Preferences;
-import org.jnode.bootlog.BootLog;
import org.jnode.bootlog.BootLogInstance;
Modified: trunk/core/src/core/org/jnode/plugin/PluginDescriptor.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/PluginDescriptor.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/PluginDescriptor.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -20,10 +20,6 @@
package org.jnode.plugin;
-import java.util.ArrayList;
-import java.util.List;
-
-
/**
* Descriptor of a Plugin.
*
Modified: trunk/core/src/core/org/jnode/plugin/PluginManager.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/PluginManager.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/PluginManager.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -22,7 +22,6 @@
import java.util.List;
-import org.jnode.bootlog.BootLog;
import org.jnode.bootlog.BootLogInstance;
/**
Modified: trunk/core/src/core/org/jnode/plugin/PluginUtils.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/PluginUtils.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/PluginUtils.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -24,7 +24,6 @@
import java.util.MissingResourceException;
import java.util.ResourceBundle;
-import org.jnode.bootlog.BootLog;
import org.jnode.bootlog.BootLogInstance;
/**
Modified: trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/manager/DefaultPluginManager.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -35,7 +35,6 @@
import javax.naming.NamingException;
-import org.jnode.bootlog.BootLog;
import org.jnode.bootlog.BootLogInstance;
import org.jnode.naming.InitialNaming;
import org.jnode.permission.JNodePermission;
Modified: trunk/core/src/core/org/jnode/plugin/model/ConfigurationElementModel.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/ConfigurationElementModel.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/model/ConfigurationElementModel.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -24,7 +24,6 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
-
import org.jnode.nanoxml.XMLElement;
import org.jnode.plugin.ConfigurationElement;
import org.jnode.plugin.PluginException;
Modified: trunk/core/src/core/org/jnode/plugin/model/ExtensionModel.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/ExtensionModel.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/model/ExtensionModel.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -22,7 +22,6 @@
import java.util.ArrayList;
import java.util.Iterator;
-
import org.jnode.nanoxml.XMLElement;
import org.jnode.plugin.ConfigurationElement;
import org.jnode.plugin.Extension;
Modified: trunk/core/src/core/org/jnode/plugin/model/ExtensionPointModel.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/ExtensionPointModel.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/model/ExtensionPointModel.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -22,7 +22,6 @@
import java.util.ArrayList;
import java.util.List;
-
import org.jnode.nanoxml.XMLElement;
import org.jnode.plugin.Extension;
import org.jnode.plugin.ExtensionPoint;
Modified: trunk/core/src/core/org/jnode/plugin/model/Factory.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/Factory.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/model/Factory.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -21,7 +21,6 @@
package org.jnode.plugin.model;
import java.net.URL;
-
import org.jnode.nanoxml.XMLElement;
import org.jnode.plugin.PluginDescriptor;
import org.jnode.plugin.PluginException;
Modified: trunk/core/src/core/org/jnode/plugin/model/FragmentDescriptorModel.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/FragmentDescriptorModel.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/model/FragmentDescriptorModel.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -23,8 +23,6 @@
import java.net.URL;
import java.nio.ByteBuffer;
import java.util.List;
-
-import org.jnode.bootlog.BootLog;
import org.jnode.bootlog.BootLogInstance;
import org.jnode.nanoxml.XMLElement;
import org.jnode.plugin.FragmentDescriptor;
Modified: trunk/core/src/core/org/jnode/plugin/model/LibraryModel.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/LibraryModel.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/model/LibraryModel.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -22,7 +22,6 @@
import java.util.ArrayList;
import java.util.Iterator;
-
import org.jnode.nanoxml.XMLElement;
import org.jnode.plugin.Library;
import org.jnode.plugin.PluginException;
Modified: trunk/core/src/core/org/jnode/plugin/model/PluginClassLoaderImpl.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/PluginClassLoaderImpl.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/model/PluginClassLoaderImpl.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -21,7 +21,6 @@
package org.jnode.plugin.model;
import gnu.java.security.action.GetPolicyAction;
-
import java.net.URL;
import java.nio.ByteBuffer;
import java.security.AccessController;
@@ -36,8 +35,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Set;
-
-import org.jnode.bootlog.BootLog;
import org.jnode.bootlog.BootLogInstance;
import org.jnode.plugin.PluginClassLoader;
import org.jnode.plugin.PluginDescriptor;
Modified: trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/model/PluginDescriptorModel.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -29,8 +29,6 @@
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-
-import org.jnode.bootlog.BootLog;
import org.jnode.bootlog.BootLogInstance;
import org.jnode.nanoxml.XMLElement;
import org.jnode.plugin.Extension;
Modified: trunk/core/src/core/org/jnode/plugin/model/PluginJar.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/PluginJar.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/model/PluginJar.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -29,7 +29,6 @@
import java.util.Collections;
import java.util.Hashtable;
import java.util.Map;
-
import org.jnode.nanoxml.XMLElement;
import org.jnode.plugin.PluginDescriptor;
import org.jnode.plugin.PluginException;
@@ -37,7 +36,6 @@
import org.jnode.util.FileUtils;
import org.jnode.util.JarBuffer;
import org.jnode.vm.ResourceLoader;
-import org.jnode.vm.VmImpl;
import org.jnode.vm.facade.VmUtils;
import org.jnode.vm.objects.BootableHashMap;
import org.jnode.vm.objects.BootableObject;
Modified: trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/model/PluginRegistryModel.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.plugin.model;
import java.io.IOException;
@@ -33,7 +33,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-
import org.jnode.plugin.Extension;
import org.jnode.plugin.ExtensionPoint;
import org.jnode.plugin.PluginDescriptor;
@@ -137,11 +136,11 @@
}
/**
- * Resolve the plugins corresponding to a collection of supplied descriptors.
- *
+ * Resolve the plugins corresponding to a collection of supplied descriptors.
+ *
* @param descriptors the collection of descriptors to be resolved.
*/
- public void resolveDescriptors(Collection<PluginDescriptorModel> descriptors)
+ public void resolveDescriptors(Collection<PluginDescriptorModel> descriptors)
throws PluginException {
// This method uses the brute-force approach of repeatedly checking the descriptors
// in order until if finds one that will resolve. This gives O(N**2) calls to
@@ -164,7 +163,7 @@
/**
* Check to see if a plugin is resolvable given the current (simulated) registry state.
- *
+ *
* @param descr the descriptor for the plugin at issue.
* @return <code>true</code> if the plugin is resolvable.
*/
@@ -290,7 +289,8 @@
/**
* {@inheritDoc}
*/
- public PluginDescriptor loadPlugin(final PluginLoader loader, final String pluginId, final String pluginVersion, boolean resolve)
+ public PluginDescriptor loadPlugin(final PluginLoader loader, final String pluginId, final String pluginVersion,
+ boolean resolve)
throws PluginException {
final SecurityManager sm = System.getSecurityManager();
if (sm != null) {
@@ -298,17 +298,17 @@
}
// Load the requested plugin
final PluginDescriptorModel descr = loadPluginImpl(loader, pluginId, pluginVersion);
-
+
if (resolve) {
- final HashMap<String, PluginDescriptorModel> descriptors = new HashMap<String, PluginDescriptorModel>();
- descriptors.put(descr.getId(), descr);
- // Load the dependent plugins
- loadDependencies(loader, descr, descriptors);
-
- // Resolve the loaded descriptors.
- resolveDescriptors(descriptors.values());
+ final HashMap<String, PluginDescriptorModel> descriptors = new HashMap<String, PluginDescriptorModel>();
+ descriptors.put(descr.getId(), descr);
+ // Load the dependent plugins
+ loadDependencies(loader, descr, descriptors);
+
+ // Resolve the loaded descriptors.
+ resolveDescriptors(descriptors.values());
}
-
+
return descr;
}
@@ -356,7 +356,7 @@
* @throws PluginException
*/
private final PluginDescriptorModel loadPluginImpl(final PluginLoader loader, final String pluginId,
- final String pluginVersion) throws PluginException {
+ final String pluginVersion) throws PluginException {
final PluginRegistryModel registry = this;
final PluginJar pluginJar;
try {
Modified: trunk/core/src/core/org/jnode/plugin/model/PluginsClassLoader.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/PluginsClassLoader.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/model/PluginsClassLoader.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -21,7 +21,6 @@
package org.jnode.plugin.model;
import java.net.URL;
-
import org.jnode.plugin.PluginDescriptor;
/**
Modified: trunk/core/src/core/org/jnode/plugin/model/RuntimeModel.java
===================================================================
--- trunk/core/src/core/org/jnode/plugin/model/RuntimeModel.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/plugin/model/RuntimeModel.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -22,7 +22,6 @@
import java.util.ArrayList;
import java.util.Iterator;
-
import org.jnode.nanoxml.XMLElement;
import org.jnode.plugin.Library;
import org.jnode.plugin.PluginException;
Modified: trunk/core/src/core/org/jnode/protocol/ProtocolHandlerFactoryPlugin.java
===================================================================
--- trunk/core/src/core/org/jnode/protocol/ProtocolHandlerFactoryPlugin.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/protocol/ProtocolHandlerFactoryPlugin.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -27,7 +27,6 @@
import java.security.PrivilegedAction;
import java.util.HashMap;
-import org.jnode.bootlog.BootLog;
import org.jnode.bootlog.BootLogInstance;
import org.jnode.plugin.ConfigurationElement;
import org.jnode.plugin.Extension;
Modified: trunk/core/src/core/org/jnode/security/JNodePolicy.java
===================================================================
--- trunk/core/src/core/org/jnode/security/JNodePolicy.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/security/JNodePolicy.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.security;
import gnu.java.security.PolicyFile;
@@ -36,7 +36,6 @@
import java.util.HashMap;
import java.util.Map;
-import org.jnode.bootlog.BootLog;
import org.jnode.bootlog.BootLogInstance;
import org.jnode.plugin.ConfigurationElement;
import org.jnode.plugin.Extension;
@@ -176,7 +175,7 @@
final Permission p = (Permission) perm;
perms.add(p);
} catch (ClassNotFoundException ex) {
- BootLogInstance.get()
+ BootLogInstance.get()
.error("Permission class " + type
+ " not found");
} catch (InstantiationException ex) {
@@ -186,7 +185,7 @@
BootLogInstance.get().error("Illegal access to permission class "
+ type);
} catch (NoSuchMethodException ex) {
- BootLogInstance.get()
+ BootLogInstance.get()
.error("Constructor not found on permission class "
+ type + " in plugin " + id);
} catch (InvocationTargetException ex) {
Modified: trunk/core/src/core/org/jnode/util/ByteQueueProcessorThread.java
===================================================================
--- trunk/core/src/core/org/jnode/util/ByteQueueProcessorThread.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/util/ByteQueueProcessorThread.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -20,7 +20,6 @@
package org.jnode.util;
-import org.jnode.bootlog.BootLog;
import org.jnode.bootlog.BootLogInstance;
/**
Modified: trunk/core/src/core/org/jnode/util/QueueProcessorThread.java
===================================================================
--- trunk/core/src/core/org/jnode/util/QueueProcessorThread.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/util/QueueProcessorThread.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -20,7 +20,6 @@
package org.jnode.util;
-import org.jnode.bootlog.BootLog;
import org.jnode.bootlog.BootLogInstance;
/**
Modified: trunk/core/src/core/org/jnode/vm/BaseVmArchitecture.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/BaseVmArchitecture.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/vm/BaseVmArchitecture.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.vm;
import java.nio.ByteOrder;
@@ -107,7 +107,7 @@
/**
* {@inheritDoc}
*/
- public abstract TypeSizeInfo getTypeSizeInfo();
+ public abstract TypeSizeInfo getTypeSizeInfo();
/**
* Gets the stackreader for this architecture.
@@ -122,8 +122,8 @@
/**
* Gets all compilers for this architecture.
*
- * @return The architecture's compilers, sorted by optimization level, from
- * least optimizing to most optimizing.
+ * @return The architecture's compilers, sorted by optimization level, from
+ * least optimizing to most optimizing.
*/
public abstract NativeCodeCompiler[] getCompilers();
@@ -131,9 +131,9 @@
* Gets all test compilers for this architecture.
* This can be used to test new compilers in a running system.
*
- * @return The architecture's test compilers, sorted by optimization level, from
- * least optimizing to most optimizing. If there are no configured test compilers,
- * {@code null} will be returned.
+ * @return The architecture's test compilers, sorted by optimization level, from
+ * least optimizing to most optimizing. If there are no configured test compilers,
+ * {@code null} will be returned.
*/
public abstract NativeCodeCompiler[] getTestCompilers();
@@ -166,7 +166,7 @@
*
* @param cpu
*/
- protected final void addProcessor(VmProcessor cpu) {
+ protected final void addProcessor(VmProcessor cpu) {
((VmImpl) VmUtils.getVm()).addProcessor(cpu);
}
@@ -227,10 +227,10 @@
/**
* Page align a given address (represented as a Word) in a given region.
*
- * @param v an address value
+ * @param v an address value
* @param region a {@link VirtualMemoryRegion}.
- * @param up If true, the value will be rounded up, otherwise rounded down.
- * @return the corresponding page aligned address represented as a Word.
+ * @param up If true, the value will be rounded up, otherwise rounded down.
+ * @return the corresponding page aligned address represented as a Word.
*/
public final Word pageAlign(int region, Word v, boolean up) {
final int logPageSize = getLogPageSize(region);
@@ -268,7 +268,10 @@
throws UninterruptiblePragma;
/**
- * {@inheritDoc}
+ * Gets the memory map of the current system. If no map has yet been created,
+ * it will be created by calling {@link #createMemoryMap()}.
+ *
+ * @return the architecture's memory map.
*/
public final MemoryMapEntry[] getMemoryMap() {
final SecurityManager sm = System.getSecurityManager();
@@ -303,8 +306,9 @@
/**
* Creates a multi-media support instance. The default implementation returns a
- * generic support instance. This method may be overriden to provide an architecture
+ * generic support instance. This method may be overriden to provide an architecture
* optimized {@link VmMultiMediaSupport} implementation.
+ *
* @return a multi-media support instance.
*/
protected VmMultiMediaSupport createMultiMediaSupport() {
Modified: trunk/core/src/core/org/jnode/vm/BootLogImpl.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/BootLogImpl.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/vm/BootLogImpl.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.vm;
import java.io.PrintStream;
@@ -150,16 +150,16 @@
}
}
- static void initialize() {
- Unsafe.debug("Initialize BootLog\n");
- try {
- BootLogInstance.set(new BootLogImpl());
- } catch (NameAlreadyBoundException e) {
+ static void initialize() {
+ Unsafe.debug("Initialize BootLog\n");
+ try {
+ BootLogInstance.set(new BootLogImpl());
+ } catch (NameAlreadyBoundException e) {
Unsafe.debug(e.toString());
Unsafe.debug("\n");
- } catch (NamingException e) {
+ } catch (NamingException e) {
Unsafe.debug(e.toString());
Unsafe.debug("\n");
- }
- }
+ }
+ }
}
Modified: trunk/core/src/core/org/jnode/vm/HeapHelperImpl.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/HeapHelperImpl.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/vm/HeapHelperImpl.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.vm;
import org.jnode.annotation.MagicPermission;
@@ -266,6 +266,6 @@
* @see org.jnode.vm.memmgr.HeapHelper#bootArchitecture(boolean)
*/
public final void bootArchitecture(boolean emptyMMap) {
- ((BaseVmArchitecture) VmUtils.getVm().getArch()).boot(emptyMMap);
+ ((BaseVmArchitecture) VmUtils.getVm().getArch()).boot(emptyMMap);
}
}
Modified: trunk/core/src/core/org/jnode/vm/MemoryBlockManager.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/MemoryBlockManager.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/vm/MemoryBlockManager.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.vm;
import org.jnode.annotation.MagicPermission;
@@ -245,7 +245,7 @@
/**
* Initialize this manager.
*/
- private static void initialize() {
+ private static void initialize() {
Unsafe.debug("Initialize MemoryBlockManager\n");
startPtr = blockAlign(Unsafe.getMemoryStart().toWord(), true).toAddress();
endPtr = blockAlign(Unsafe.getMemoryEnd().toWord(), false).toAddress();
Modified: trunk/core/src/core/org/jnode/vm/VmImpl.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/VmImpl.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/vm/VmImpl.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.vm;
import java.lang.reflect.Constructor;
@@ -119,7 +119,7 @@
* @throws InstantiationException
*/
public VmImpl(String version, BaseVmArchitecture arch, VmSharedStatics statics,
- boolean debugMode, VmClassLoader loader, PluginRegistry pluginReg)
+ boolean debugMode, VmClassLoader loader, PluginRegistry pluginReg)
throws InstantiationException {
this.version = version;
this.debugMode = debugMode;
@@ -143,7 +143,8 @@
* @throws InstantiationException
*/
private static VmHeapManager createHeapManager(HeapHelper helper,
- BaseVmArchitecture arch, VmClassLoader loader, PluginRegistry pluginReg)
+ BaseVmArchitecture arch, VmClassLoader loader,
+ PluginRegistry pluginReg)
throws InstantiationException {
if (pluginReg == null) {
// Use in tests and asm constant construction
@@ -387,7 +388,7 @@
this.scheduler = scheduler;
}
}
-
+
/**
* {@inheritDoc}
*/
@@ -395,8 +396,8 @@
return new BootableArrayList<VmProcessor>(processors);
}
- @Override
- public void accept(VmThreadVisitor vmThreadVisitor) {
- scheduler.visitAllThreads(vmThreadVisitor);
- }
+ @Override
+ public void accept(VmThreadVisitor vmThreadVisitor) {
+ scheduler.visitAllThreads(vmThreadVisitor);
+ }
}
Modified: trunk/core/src/core/org/jnode/vm/VmSystem.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/VmSystem.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/vm/VmSystem.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.vm;
import java.io.IOException;
@@ -120,16 +120,16 @@
* Initialize the Virtual Machine
*/
public static void initialize() {
- if (!inited) {
- // Initialize Naming
- InitialNaming.setNameSpace(new DefaultNameSpace());
-
- // Initialize BootLog
- BootLogImpl.initialize();
-
+ if (!inited) {
+ // Initialize Naming
+ InitialNaming.setNameSpace(new DefaultNameSpace());
+
+ // Initialize BootLog
+ BootLogImpl.initialize();
+
// Initialize resource manager
final ResourceManager rm = ResourceManagerImpl.initialize();
-
+
/* Initialize the system classloader */
VmSystemClassLoader loader = (VmSystemClassLoader) (getVmClass(VmProcessor.current()).getLoader());
systemLoader = loader;
@@ -206,7 +206,7 @@
throw new UnsupportedOperationException();
}
});
-
+
// Trigger initialization of the global environment variables.
System.getenv();
}
@@ -239,7 +239,7 @@
} else if (VmIsolate.isRoot()) {
return bootOutStream;
} else {
- return VmIOContext.getGlobalOutStream();
+ return VmIOContext.getGlobalOutStream();
}
}
@@ -870,10 +870,10 @@
* @return the time of a system timer in nanoseconds.
* @since 1.5
*/
- public static long nanoTime() {
+ public static long nanoTime() {
if (ghz == -1) {
final long measureDuration = 1000; // in milliseconds
-
+
long start = Unsafe.getCpuCycles();
long ms_start = currentTimeMillis();
long ms_end;
@@ -892,15 +892,15 @@
ghz = (end - start) / (ms * 1000000L);
if (ghz <= 0) {
- ghz = 0;
- }
+ ghz = 0;
+ }
}
-
+
if (ghz == 0) {
//todo these are CPUs under 1GHz, improve this case
return currentTimeMillis() * 1000000L;
}
-
+
return Unsafe.getCpuCycles() / ghz;
}
@@ -949,7 +949,7 @@
* Call the garbage collector
*/
public static void gc() {
- VmUtils.getVm().getHeapManager().gc();
+ VmUtils.getVm().getHeapManager().gc();
}
static class SystemOutputStream extends OutputStream {
@@ -1197,18 +1197,18 @@
}
}
- /**
- * Wait for ms milliseconds in a busy waiting loop.
- * This method is very CPU intensive, so be carefull.
- *
- * @param ms
- */
- public static void loop(long ms) {
- final long start = currentKernelMillis();
- while (true) {
- if ((start + ms) <= currentKernelMillis()) {
- break;
- }
- }
- }
+ /**
+ * Wait for ms milliseconds in a busy waiting loop.
+ * This method is very CPU intensive, so be carefull.
+ *
+ * @param ms
+ */
+ public static void loop(long ms) {
+ final long start = currentKernelMillis();
+ while (true) {
+ if ((start + ms) <= currentKernelMillis()) {
+ break;
+ }
+ }
+ }
}
Modified: trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -23,7 +23,6 @@
import java.util.Comparator;
import java.util.TreeMap;
-import org.jnode.bootlog.BootLog;
import org.jnode.bootlog.BootLogInstance;
import org.jnode.vm.JvmType;
import org.jnode.vm.classmgr.VmByteCode;
@@ -489,8 +488,8 @@
bb.setStartStack(tstack);
} else if (!tstack.equals(bbTStack)) {
if (debug) {
- BootLogInstance.get().warn("TypeStack is different in " + method + ";" + tstack + " vs. " + bbTStack + " in " +
- bb + " at address " + this.curAddress);
+ BootLogInstance.get().warn("TypeStack is different in " + method + ";" + tstack + " vs. " +
+ bbTStack + " in " + bb + " at address " + this.curAddress);
}
//throw new VerifyError("TypeStack is different; " + tstack + " vs. " + bbTStack + " in " + bb);
}
Modified: trunk/core/src/core/org/jnode/vm/bytecode/DeadBlockFinder.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/bytecode/DeadBlockFinder.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/vm/bytecode/DeadBlockFinder.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -22,7 +22,6 @@
import java.util.TreeMap;
-import org.jnode.bootlog.BootLog;
import org.jnode.bootlog.BootLogInstance;
import org.jnode.vm.JvmType;
import org.jnode.vm.classmgr.VmByteCode;
Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmByteCode.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/classmgr/VmByteCode.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/vm/classmgr/VmByteCode.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -25,7 +25,6 @@
import java.util.Collections;
import java.util.List;
-import org.jnode.vm.VmImpl;
import org.jnode.vm.facade.VmUtils;
/**
Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmType.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/classmgr/VmType.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/vm/classmgr/VmType.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.vm.classmgr;
import gnu.java.lang.VMClassHelper;
@@ -1612,7 +1612,7 @@
// arrayClass.link();
}
if (mmType == null) {
- VmUtils.notifyClassResolved(this);
+ VmUtils.notifyClassResolved(this);
}
this.state |= VmTypeState.ST_LINKED;
}
@@ -2433,6 +2433,7 @@
*/
private static final JNodePermission GETVMCLASS = new JNodePermission("getVmClass");
private static int FIELD_OFFSET = -1;
+
public static <V> VmType<V> fromClass(Class<V> clazz) {
if (FIELD_OFFSET == -1) {
FIELD_OFFSET = ((VmInstanceField) ClassClass.getDeclaredField("vmClass")).getOffset();
@@ -2441,7 +2442,7 @@
// final SecurityManager sm = System.getSecurityManager();
// if (sm != null) { //todo: misplaced securty check -> stack overflow in gnu.testlet.
// //todo: TestSecurityManager.checkPermission
- //todo secure this method
+ //todo secure this method
// sm.checkPermission(GETVMCLASS);
// }
Modified: trunk/core/src/core/org/jnode/vm/compiler/CompiledMethod.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/compiler/CompiledMethod.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/vm/compiler/CompiledMethod.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -21,7 +21,6 @@
package org.jnode.vm.compiler;
import org.jnode.assembler.NativeStream;
-import org.jnode.vm.VmImpl;
import org.jnode.vm.classmgr.VmAddressMap;
import org.jnode.vm.classmgr.VmMethod;
import org.jnode.vm.facade.VmUtils;
Modified: trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -26,7 +26,6 @@
import org.jnode.assembler.NativeStream;
import org.jnode.assembler.ObjectResolver;
import org.jnode.assembler.UnresolvedObjectRefException;
-import org.jnode.vm.VmImpl;
import org.jnode.vm.VmAddress;
import org.jnode.vm.VmMagic;
import org.jnode.annotation.MagicPermission;
Modified: trunk/core/src/core/org/jnode/vm/facade/Vm.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/facade/Vm.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/vm/facade/Vm.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -17,7 +17,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.vm.facade;
import java.util.List;
@@ -30,29 +30,28 @@
/**
* Interface with the Virtual Machine.
- *
- * @author Fabien DUMINY (fduminy at jnode.org)
*
+ * @author Fabien DUMINY (fduminy at jnode.org)
*/
public interface Vm {
/**
* @return Returns the statics.
*/
- VmSharedStatics getSharedStatics();
+ VmSharedStatics getSharedStatics();
/**
* @see org.jnode.vm.objects.Statistics#getStatistics()
*/
- Statistic[] getStatistics();
-
+ Statistic[] getStatistics();
+
/**
* Gets or creates a counter with a given name.
*
* @param name
* @return The counter
*/
- Counter getCounter(String string);
+ Counter getCounter(String string);
/**
* Gets or creates a counter group with a given name.
@@ -60,23 +59,23 @@
* @param name
* @return The counter group
*/
- CounterGroup getCounterGroup(String name);
+ CounterGroup getCounterGroup(String name);
/**
* @return Returns the architecture.
*/
- VmArchitecture getArch();
+ VmArchitecture getArch();
/**
* @return Returns the heapManager.
*/
- VmHeapManager getHeapManager();
+ VmHeapManager getHeapManager();
/**
* @return Returns the bootstrap.
*/
- boolean isBootstrap();
-
+ boolean isBootstrap();
+
/**
* Gets the list of compiled methods.
*
@@ -89,14 +88,14 @@
*
* @return Returns the version.
*/
- String getVersion();
+ String getVersion();
/**
* Does this VM run in debug mode.
*
* @return Returns the debugMode.
*/
- boolean isDebugMode();
+ boolean isDebugMode();
/**
* Returns the number of available processors currently available to the
@@ -110,11 +109,10 @@
/**
* @return a copy of the processors list
*/
- List<VmProcessor> getProcessors();
+ List<VmProcessor> getProcessors();
- /**
- *
- * @param vmThreadVisitor
- */
- void accept(VmThreadVisitor vmThreadVisitor);
+ /**
+ * @param vmThreadVisitor
+ */
+ void accept(VmThreadVisitor vmThreadVisitor);
}
Modified: trunk/core/src/core/org/jnode/vm/facade/VmArchitecture.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/facade/VmArchitecture.java 2010-10-02 13:42:51 UTC (rev 5758)
+++ trunk/core/src/core/org/jnode/vm/facade/VmArchitecture.java 2010-12-27 18:41:44 UTC (rev 5759)
@@ -17,20 +17,18 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.vm.facade;
import java.nio.ByteOrder;
-import org.jnode.vm.VirtualMemoryRegion;
import org.vmmagic.unboxed.Address;
import org.vmmagic.unboxed.Extent;
/**
* Interface with the system architecture.
- *
- * @author Fabien DUMINY (fduminy at jnode.org)
*
+ * @author Fabien DUMINY (fduminy at jnode.org)
*/
public interface VmArchitecture {
@@ -39,38 +37,37 @@
*
* @return the architecture's ByteOrder
*/
- ByteOrder getByteOrder();
+ ByteOrder getByteOrder();
/**
* Gets the size in bytes of an object reference.
*
* @return the architecture's reference size in bytes; i.e. 4 or 8.
*/
- int getReferenceSize();
+ int getReferenceSize();
/**
* Gets the start address of the given space.
- *
- * @param space a {@link VirtualMemoryRegion}.
+ *
+ * @param space a {@link org.jnode.vm.VirtualMemoryRegion}.
* @return the start address of the region
*/
- Address getStart(int space);
+ Address getStart(int space);
/**
* Gets the end address of the given space.
*
- * @param space a {@link VirtualMemoryRegion}.
+ * @param space a {@link org.jnode.vm.VirtualMemoryRegion}.
* @return the end address of the region
*/
- Address getEnd(int space);
+ Address getEnd(int space);
/**
- * Gets the memory map of the current system. If no map has yet been created,
- * it will be created by calling {@link #createMemoryMap()}.
+ * Gets the memory map of the current system.
*
* @return the architecture's memory map.
*/
- MemoryMapEntry[] getMemoryMap();
+ MemoryMapEntry[] getMemoryMap();
/**
* Map a region of the virtual memory space. Note that you cannot allocate
@@ -83,15 +80,15 @@
* Address.max(), free pages are used instead.
* @return true for success, false otherwise.
*/
- boolean mmap(int region, Address start, Extent size, Address physAddr);
+ boolean mmap(int region, Address start, Extent size, Address physAddr);
/**
* Gets the log base two of the size in bytes of an OS page in a given region
*
- * @param region a {@link VirtualMemoryRegion} value
+ * @param region a {@link org.jnode.vm.VirtualMemoryRegion} value
* @return the log base two page size
*/
- byte getLogPageSize(int region);
+ byte getLogPageSize(int region);
/**
* Unmap a region of the virtual memory space. Note that you cannot allocate
@@ -104,17 +101,17 @@
* aligned up on pagesize.
* @return true for success, false otherwise.
*/
- boolean munmap(int region, Address start, Extent size);
+ boolean munmap(int region, Address start, Extent size);
/**
* Page align a given add...
[truncated message content] |