From: <cr...@us...> - 2008-09-11 11:32:33
|
Revision: 4551 http://jnode.svn.sourceforge.net/jnode/?rev=4551&view=rev Author: crawley Date: 2008-09-11 11:32:26 +0000 (Thu, 11 Sep 2008) Log Message: ----------- Ran Eclipse 'organize imports' Modified Paths: -------------- trunk/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java trunk/core/src/core/org/jnode/vm/classmgr/Signature.java trunk/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotatedElement.java trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotation.java trunk/core/src/core/org/jnode/vm/classmgr/VmByteCode.java trunk/core/src/core/org/jnode/vm/classmgr/VmClassLoader.java trunk/core/src/core/org/jnode/vm/classmgr/VmClassType.java trunk/core/src/core/org/jnode/vm/classmgr/VmConstantPool.java trunk/core/src/core/org/jnode/vm/classmgr/VmField.java trunk/core/src/core/org/jnode/vm/classmgr/VmMethod.java trunk/core/src/core/org/jnode/vm/classmgr/VmStatics.java trunk/core/src/core/org/jnode/vm/classmgr/VmType.java trunk/core/src/core/org/jnode/vm/compiler/BaseMagicHelper.java trunk/core/src/core/org/jnode/vm/compiler/CompiledExceptionHandler.java trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlock.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRGenerator.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRTest.java trunk/core/src/core/org/jnode/vm/compiler/ir/LinearScanAllocator.java trunk/core/src/core/org/jnode/vm/compiler/ir/NativeTest.java trunk/core/src/core/org/jnode/vm/compiler/ir/PhiOperand.java trunk/core/src/core/org/jnode/vm/compiler/ir/SSAStack.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/BinaryQuad.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/ConditionalBranchQuad.java trunk/core/src/core/org/jnode/vm/compiler/ir/quad/Quad.java trunk/core/src/core/org/jnode/vm/x86/GDT.java trunk/core/src/core/org/jnode/vm/x86/IOAPIC.java trunk/core/src/core/org/jnode/vm/x86/MPConfigTable.java trunk/core/src/core/org/jnode/vm/x86/PIC8259A.java trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture32.java trunk/core/src/core/org/jnode/vm/x86/VmX86Processor.java trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86Compiler.java trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86StackManager.java trunk/core/src/core/org/jnode/vm/x86/compiler/X86CompilerHelper.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemFactory.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/MagicHelper.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/VirtualStack.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemFactory.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/MagicHelper.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/VirtualStack.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java trunk/core/src/core/org/jnode/vm/x86/compiler/l2/GenericX86CodeGenerator.java trunk/core/src/core/org/jnode/vm/x86/performance/Athlon64PerformanceCounters.java trunk/core/src/core/org/jnode/vm/x86/performance/DualMSRPerformanceCounters.java trunk/core/src/core/org/jnode/vm/x86/performance/P4FamilyPerformanceCounters.java trunk/core/src/core/org/jnode/vm/x86/performance/P6PerformanceCouters.java trunk/core/src/core/org/jnode/vm/x86/performance/Pentium4PerformanceCounters.java trunk/core/src/core/org/jnode/vm/x86/performance/X86PerformanceCounters.java Modified: trunk/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/classmgr/ClassDecoder.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -25,6 +25,7 @@ import java.lang.annotation.Annotation; import java.nio.ByteBuffer; import java.security.ProtectionDomain; + import org.jnode.system.BootLog; import org.jnode.vm.JvmType; import org.jnode.vm.VmUtils; @@ -44,6 +45,7 @@ import org.jnode.vm.annotation.Uninterruptible; import org.vmmagic.pragma.PragmaException; import org.vmmagic.pragma.UninterruptiblePragma; + import sun.reflect.annotation.AnnotationParser; import sun.reflect.annotation.ExceptionProxy; Modified: trunk/core/src/core/org/jnode/vm/classmgr/Signature.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/Signature.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/classmgr/Signature.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -22,6 +22,7 @@ package org.jnode.vm.classmgr; import java.util.ArrayList; + import org.jnode.vm.JvmType; /** Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -23,6 +23,7 @@ import java.io.PrintStream; import java.util.ArrayList; + import org.jnode.util.NumberUtils; import org.jnode.vm.VmSystemObject; Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotatedElement.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotatedElement.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotatedElement.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -23,6 +23,7 @@ import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; + import org.jnode.vm.VmSystemObject; import org.jnode.vm.annotation.PrivilegedActionPragma; Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotation.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotation.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotation.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -28,7 +28,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; + import org.jnode.vm.VmSystemObject; + import sun.reflect.annotation.AnnotationParser; /** Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmByteCode.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmByteCode.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmByteCode.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -25,6 +25,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; + import org.jnode.vm.Vm; /** Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmClassLoader.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmClassLoader.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmClassLoader.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -24,6 +24,7 @@ import java.io.Writer; import java.nio.ByteBuffer; import java.security.ProtectionDomain; + import org.jnode.vm.VmArchitecture; import org.jnode.vm.VmSystemObject; import org.jnode.vm.compiler.CompiledIMT; Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmClassType.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmClassType.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmClassType.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -24,6 +24,7 @@ import java.security.ProtectionDomain; import java.util.ArrayList; import java.util.HashSet; + import org.vmmagic.pragma.UninterruptiblePragma; /** Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmConstantPool.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmConstantPool.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmConstantPool.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -5,6 +5,7 @@ import java.lang.reflect.Field; import java.lang.reflect.Member; + import sun.reflect.ConstantPool; /** Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmField.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmField.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmField.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -22,6 +22,7 @@ package org.jnode.vm.classmgr; import java.lang.reflect.Field; + import org.jnode.vm.isolate.VmIsolateLocal; public abstract class VmField extends VmMember { Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmMethod.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmMethod.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmMethod.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -24,6 +24,7 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Member; import java.lang.reflect.Method; + import org.jnode.vm.LoadCompileService; import org.jnode.vm.Vm; import org.jnode.vm.VmAddress; Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmStatics.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmStatics.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmStatics.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -23,6 +23,7 @@ import java.io.PrintStream; import java.nio.ByteOrder; + import org.jnode.assembler.Label; import org.jnode.assembler.ObjectResolver; import org.jnode.vm.ObjectVisitor; Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmType.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmType.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmType.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -22,6 +22,7 @@ package org.jnode.vm.classmgr; import gnu.java.lang.VMClassHelper; + import java.io.Serializable; import java.io.Writer; import java.lang.reflect.InvocationTargetException; @@ -29,6 +30,7 @@ import java.util.Arrays; import java.util.Comparator; import java.util.HashSet; + import org.jnode.assembler.NativeStream; import org.jnode.vm.JvmType; import org.jnode.vm.LoadCompileService; Modified: trunk/core/src/core/org/jnode/vm/compiler/BaseMagicHelper.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/BaseMagicHelper.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/compiler/BaseMagicHelper.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -22,6 +22,7 @@ package org.jnode.vm.compiler; import java.util.Map; + import org.jnode.util.BootableHashMap; import org.jnode.vm.classmgr.VmMethod; import org.jnode.vm.classmgr.VmType; Modified: trunk/core/src/core/org/jnode/vm/compiler/CompiledExceptionHandler.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/CompiledExceptionHandler.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/compiler/CompiledExceptionHandler.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -22,6 +22,7 @@ package org.jnode.vm.compiler; import java.io.PrintStream; + import org.jnode.assembler.NativeStream; import org.jnode.assembler.UnresolvedObjectRefException; import org.jnode.util.NumberUtils; Modified: trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -22,6 +22,7 @@ package org.jnode.vm.compiler; import java.io.Writer; + import org.jnode.assembler.Label; import org.jnode.assembler.NativeStream; import org.jnode.assembler.ObjectResolver; Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlock.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlock.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlock.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -22,6 +22,7 @@ package org.jnode.vm.compiler.ir; import java.util.List; + import org.jnode.util.BootableArrayList; import org.jnode.vm.compiler.ir.quad.BranchQuad; import org.jnode.vm.compiler.ir.quad.PhiAssignQuad; Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -26,6 +26,7 @@ import java.util.Comparator; import java.util.HashMap; import java.util.Map; + import org.jnode.vm.bytecode.BytecodeFlags; import org.jnode.vm.bytecode.BytecodeVisitorSupport; import org.jnode.vm.classmgr.VmByteCode; Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -23,6 +23,7 @@ import java.util.Iterator; import java.util.List; + import org.jnode.util.BootableArrayList; import org.jnode.util.ObjectArrayIterator; import org.jnode.vm.bytecode.BytecodeParser; Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/IRGenerator.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/IRGenerator.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/IRGenerator.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -21,17 +21,6 @@ package org.jnode.vm.compiler.ir; -import java.util.Iterator; -import org.jnode.vm.bytecode.BytecodeParser; -import org.jnode.vm.bytecode.BytecodeVisitor; -import org.jnode.vm.classmgr.VmByteCode; -import org.jnode.vm.classmgr.VmConstClass; -import org.jnode.vm.classmgr.VmConstFieldRef; -import org.jnode.vm.classmgr.VmConstIMethodRef; -import org.jnode.vm.classmgr.VmConstMethodRef; -import org.jnode.vm.classmgr.VmConstString; -import org.jnode.vm.classmgr.VmMethod; -import org.jnode.vm.compiler.ir.quad.BinaryOperation; import static org.jnode.vm.compiler.ir.quad.BinaryOperation.DADD; import static org.jnode.vm.compiler.ir.quad.BinaryOperation.DDIV; import static org.jnode.vm.compiler.ir.quad.BinaryOperation.DMUL; @@ -64,7 +53,6 @@ import static org.jnode.vm.compiler.ir.quad.BinaryOperation.LSUB; import static org.jnode.vm.compiler.ir.quad.BinaryOperation.LUSHR; import static org.jnode.vm.compiler.ir.quad.BinaryOperation.LXOR; -import org.jnode.vm.compiler.ir.quad.BinaryQuad; import static org.jnode.vm.compiler.ir.quad.BranchCondition.IFEQ; import static org.jnode.vm.compiler.ir.quad.BranchCondition.IFGE; import static org.jnode.vm.compiler.ir.quad.BranchCondition.IFGT; @@ -81,9 +69,6 @@ import static org.jnode.vm.compiler.ir.quad.BranchCondition.IF_ICMPLE; import static org.jnode.vm.compiler.ir.quad.BranchCondition.IF_ICMPLT; import static org.jnode.vm.compiler.ir.quad.BranchCondition.IF_ICMPNE; -import org.jnode.vm.compiler.ir.quad.ConditionalBranchQuad; -import org.jnode.vm.compiler.ir.quad.ConstantRefAssignQuad; -import org.jnode.vm.compiler.ir.quad.Quad; import static org.jnode.vm.compiler.ir.quad.UnaryOperation.D2I; import static org.jnode.vm.compiler.ir.quad.UnaryOperation.D2L; import static org.jnode.vm.compiler.ir.quad.UnaryOperation.DNEG; @@ -102,6 +87,23 @@ import static org.jnode.vm.compiler.ir.quad.UnaryOperation.L2F; import static org.jnode.vm.compiler.ir.quad.UnaryOperation.L2I; import static org.jnode.vm.compiler.ir.quad.UnaryOperation.LNEG; + +import java.util.Iterator; + +import org.jnode.vm.bytecode.BytecodeParser; +import org.jnode.vm.bytecode.BytecodeVisitor; +import org.jnode.vm.classmgr.VmByteCode; +import org.jnode.vm.classmgr.VmConstClass; +import org.jnode.vm.classmgr.VmConstFieldRef; +import org.jnode.vm.classmgr.VmConstIMethodRef; +import org.jnode.vm.classmgr.VmConstMethodRef; +import org.jnode.vm.classmgr.VmConstString; +import org.jnode.vm.classmgr.VmMethod; +import org.jnode.vm.compiler.ir.quad.BinaryOperation; +import org.jnode.vm.compiler.ir.quad.BinaryQuad; +import org.jnode.vm.compiler.ir.quad.ConditionalBranchQuad; +import org.jnode.vm.compiler.ir.quad.ConstantRefAssignQuad; +import org.jnode.vm.compiler.ir.quad.Quad; import org.jnode.vm.compiler.ir.quad.UnaryQuad; import org.jnode.vm.compiler.ir.quad.UnconditionalBranchQuad; import org.jnode.vm.compiler.ir.quad.VarReturnQuad; Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/IRTest.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/IRTest.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/IRTest.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -28,6 +28,7 @@ import java.net.MalformedURLException; import java.util.Collection; import java.util.Map; + import org.jnode.assembler.x86.X86Assembler; import org.jnode.assembler.x86.X86BinaryAssembler; import org.jnode.assembler.x86.X86Constants; Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/LinearScanAllocator.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/LinearScanAllocator.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/LinearScanAllocator.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -25,6 +25,7 @@ import java.util.Collections; import java.util.Comparator; import java.util.List; + import org.jnode.util.BootableArrayList; /** Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/NativeTest.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/NativeTest.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/NativeTest.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -27,6 +27,7 @@ import java.io.IOException; import java.io.OutputStreamWriter; import java.net.MalformedURLException; + import org.jnode.assembler.x86.X86Assembler; import org.jnode.assembler.x86.X86BinaryAssembler; import org.jnode.assembler.x86.X86Constants; Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/PhiOperand.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/PhiOperand.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/PhiOperand.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -22,6 +22,7 @@ package org.jnode.vm.compiler.ir; import java.util.List; + import org.jnode.util.BootableArrayList; /** Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/SSAStack.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/SSAStack.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/SSAStack.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -22,6 +22,7 @@ package org.jnode.vm.compiler.ir; import java.util.List; + import org.jnode.util.BootableArrayList; /** Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/quad/BinaryQuad.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/quad/BinaryQuad.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/quad/BinaryQuad.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -21,17 +21,9 @@ package org.jnode.vm.compiler.ir.quad; -import org.jnode.vm.compiler.ir.AddressingMode; import static org.jnode.vm.compiler.ir.AddressingMode.CONSTANT; import static org.jnode.vm.compiler.ir.AddressingMode.REGISTER; import static org.jnode.vm.compiler.ir.AddressingMode.STACK; -import org.jnode.vm.compiler.ir.CodeGenerator; -import org.jnode.vm.compiler.ir.Constant; -import org.jnode.vm.compiler.ir.IRBasicBlock; -import org.jnode.vm.compiler.ir.Operand; -import org.jnode.vm.compiler.ir.RegisterLocation; -import org.jnode.vm.compiler.ir.StackLocation; -import org.jnode.vm.compiler.ir.Variable; import static org.jnode.vm.compiler.ir.quad.BinaryOperation.DADD; import static org.jnode.vm.compiler.ir.quad.BinaryOperation.DMUL; import static org.jnode.vm.compiler.ir.quad.BinaryOperation.FADD; @@ -47,6 +39,15 @@ import static org.jnode.vm.compiler.ir.quad.BinaryOperation.LOR; import static org.jnode.vm.compiler.ir.quad.BinaryOperation.LXOR; +import org.jnode.vm.compiler.ir.AddressingMode; +import org.jnode.vm.compiler.ir.CodeGenerator; +import org.jnode.vm.compiler.ir.Constant; +import org.jnode.vm.compiler.ir.IRBasicBlock; +import org.jnode.vm.compiler.ir.Operand; +import org.jnode.vm.compiler.ir.RegisterLocation; +import org.jnode.vm.compiler.ir.StackLocation; +import org.jnode.vm.compiler.ir.Variable; + /** * This class represents binary operations of the form: * <p/> Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/quad/ConditionalBranchQuad.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/quad/ConditionalBranchQuad.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/quad/ConditionalBranchQuad.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -21,10 +21,15 @@ package org.jnode.vm.compiler.ir.quad; -import org.jnode.vm.compiler.ir.AddressingMode; import static org.jnode.vm.compiler.ir.AddressingMode.CONSTANT; import static org.jnode.vm.compiler.ir.AddressingMode.REGISTER; import static org.jnode.vm.compiler.ir.AddressingMode.STACK; +import static org.jnode.vm.compiler.ir.quad.BranchCondition.IF_ACMPEQ; +import static org.jnode.vm.compiler.ir.quad.BranchCondition.IF_ACMPNE; +import static org.jnode.vm.compiler.ir.quad.BranchCondition.IF_ICMPEQ; +import static org.jnode.vm.compiler.ir.quad.BranchCondition.IF_ICMPNE; + +import org.jnode.vm.compiler.ir.AddressingMode; import org.jnode.vm.compiler.ir.CodeGenerator; import org.jnode.vm.compiler.ir.Constant; import org.jnode.vm.compiler.ir.IRBasicBlock; @@ -33,10 +38,6 @@ import org.jnode.vm.compiler.ir.RegisterLocation; import org.jnode.vm.compiler.ir.StackLocation; import org.jnode.vm.compiler.ir.Variable; -import static org.jnode.vm.compiler.ir.quad.BranchCondition.IF_ACMPEQ; -import static org.jnode.vm.compiler.ir.quad.BranchCondition.IF_ACMPNE; -import static org.jnode.vm.compiler.ir.quad.BranchCondition.IF_ICMPEQ; -import static org.jnode.vm.compiler.ir.quad.BranchCondition.IF_ICMPNE; /** * @author Madhu Siddalingaiah Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/quad/Quad.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/quad/Quad.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/quad/Quad.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -22,6 +22,7 @@ package org.jnode.vm.compiler.ir.quad; import java.util.Map; + import org.jnode.vm.compiler.ir.CodeGenerator; import org.jnode.vm.compiler.ir.IRBasicBlock; import org.jnode.vm.compiler.ir.Operand; Modified: trunk/core/src/core/org/jnode/vm/x86/GDT.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/GDT.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/GDT.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -22,6 +22,7 @@ package org.jnode.vm.x86; import java.io.PrintStream; + import org.jnode.util.NumberUtils; import org.jnode.vm.annotation.MagicPermission; import org.vmmagic.unboxed.Address; Modified: trunk/core/src/core/org/jnode/vm/x86/IOAPIC.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/IOAPIC.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/IOAPIC.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -24,6 +24,7 @@ import java.io.PrintStream; import java.util.ArrayList; import java.util.List; + import org.jnode.system.MemoryResource; import org.jnode.system.ResourceManager; import org.jnode.system.ResourceNotFreeException; Modified: trunk/core/src/core/org/jnode/vm/x86/MPConfigTable.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/MPConfigTable.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/MPConfigTable.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -24,6 +24,7 @@ import java.io.PrintStream; import java.util.ArrayList; import java.util.List; + import org.jnode.system.BootLog; import org.jnode.system.MemoryResource; import org.jnode.system.ResourceNotFreeException; Modified: trunk/core/src/core/org/jnode/vm/x86/PIC8259A.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/PIC8259A.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/PIC8259A.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -4,6 +4,7 @@ package org.jnode.vm.x86; import javax.naming.NameNotFoundException; + import org.jnode.naming.InitialNaming; import org.jnode.system.IOResource; import org.jnode.system.ResourceManager; Modified: trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -23,6 +23,7 @@ import java.nio.ByteOrder; import java.util.HashMap; + import org.jnode.assembler.x86.X86Constants; import org.jnode.system.BootLog; import org.jnode.system.ResourceManager; Modified: trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture32.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture32.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture32.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -21,9 +21,10 @@ package org.jnode.vm.x86; +import static org.jnode.vm.VirtualMemoryRegion.ACPI; + import org.jnode.vm.Unsafe; import org.jnode.vm.VirtualMemoryRegion; -import static org.jnode.vm.VirtualMemoryRegion.ACPI; import org.jnode.vm.annotation.MagicPermission; import org.jnode.vm.classmgr.TypeSizeInfo; import org.jnode.vm.classmgr.VmIsolatedStatics; Modified: trunk/core/src/core/org/jnode/vm/x86/VmX86Processor.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/VmX86Processor.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/VmX86Processor.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -22,6 +22,7 @@ package org.jnode.vm.x86; import java.io.PrintStream; + import org.jnode.system.BootLog; import org.jnode.system.ResourceManager; import org.jnode.system.ResourceNotFreeException; Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86Compiler.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86Compiler.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86Compiler.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -22,6 +22,7 @@ package org.jnode.vm.x86.compiler; import java.io.Writer; + import org.jnode.assembler.Label; import org.jnode.assembler.NativeStream; import org.jnode.assembler.ObjectResolver; Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86StackManager.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86StackManager.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86StackManager.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -22,6 +22,7 @@ package org.jnode.vm.x86.compiler; import org.jnode.assembler.x86.X86Register; +import org.jnode.vm.JvmType; /** * @author Ewout Prangsma (ep...@us...) Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/X86CompilerHelper.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/X86CompilerHelper.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/X86CompilerHelper.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.Map; + import org.jnode.assembler.Label; import org.jnode.assembler.x86.X86Assembler; import org.jnode.assembler.x86.X86Constants; Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemFactory.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemFactory.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/ItemFactory.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -22,6 +22,7 @@ package org.jnode.vm.x86.compiler.l1a; import java.util.ArrayList; + import org.jnode.assembler.x86.X86Register; import org.jnode.vm.JvmType; import org.jnode.vm.Vm; Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/MagicHelper.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/MagicHelper.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/MagicHelper.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -21,6 +21,13 @@ package org.jnode.vm.x86.compiler.l1a; +import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.ATTEMPTINT; +import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.FROMINTZEROEXTEND; +import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.INTBITSTOFLOAT; +import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.LOADCHAR; +import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.LOADCHAR_OFS; +import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.LONGBITSTODOUBLE; + import org.jnode.assembler.x86.X86Assembler; import org.jnode.assembler.x86.X86Constants; import org.jnode.assembler.x86.X86Register; @@ -34,12 +41,6 @@ import org.jnode.vm.classmgr.TIBLayout; import org.jnode.vm.classmgr.VmArray; import org.jnode.vm.classmgr.VmMethod; -import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.ATTEMPTINT; -import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.FROMINTZEROEXTEND; -import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.INTBITSTOFLOAT; -import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.LOADCHAR; -import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.LOADCHAR_OFS; -import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.LONGBITSTODOUBLE; import org.jnode.vm.x86.compiler.BaseX86MagicHelper; import org.jnode.vm.x86.compiler.X86CompilerConstants; import org.jnode.vm.x86.compiler.X86CompilerHelper; Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/VirtualStack.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/VirtualStack.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/VirtualStack.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -23,6 +23,7 @@ import org.jnode.assembler.x86.X86Assembler; import org.jnode.assembler.x86.X86Register; +import org.jnode.assembler.x86.X86Register.GPR64; import org.jnode.vm.JvmType; import org.jnode.vm.Vm; import org.jnode.vm.bytecode.TypeStack; Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.Map; + import org.jnode.assembler.Label; import org.jnode.assembler.NativeStream; import org.jnode.assembler.x86.X86Assembler; Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemFactory.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemFactory.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/ItemFactory.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -22,6 +22,7 @@ package org.jnode.vm.x86.compiler.l1b; import java.util.ArrayList; + import org.jnode.assembler.x86.X86Register; import org.jnode.vm.JvmType; import org.jnode.vm.Vm; Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/MagicHelper.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/MagicHelper.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/MagicHelper.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -21,6 +21,13 @@ package org.jnode.vm.x86.compiler.l1b; +import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.ATTEMPTINT; +import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.FROMINTZEROEXTEND; +import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.INTBITSTOFLOAT; +import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.LOADCHAR; +import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.LOADCHAR_OFS; +import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.LONGBITSTODOUBLE; + import org.jnode.assembler.x86.X86Assembler; import org.jnode.assembler.x86.X86Constants; import org.jnode.assembler.x86.X86Register; @@ -34,12 +41,6 @@ import org.jnode.vm.classmgr.TIBLayout; import org.jnode.vm.classmgr.VmArray; import org.jnode.vm.classmgr.VmMethod; -import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.ATTEMPTINT; -import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.FROMINTZEROEXTEND; -import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.INTBITSTOFLOAT; -import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.LOADCHAR; -import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.LOADCHAR_OFS; -import static org.jnode.vm.compiler.BaseMagicHelper.MagicMethod.LONGBITSTODOUBLE; import org.jnode.vm.x86.compiler.BaseX86MagicHelper; import org.jnode.vm.x86.compiler.X86CompilerConstants; import org.jnode.vm.x86.compiler.X86CompilerHelper; Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/VirtualStack.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/VirtualStack.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/VirtualStack.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -23,6 +23,7 @@ import org.jnode.assembler.x86.X86Assembler; import org.jnode.assembler.x86.X86Register; +import org.jnode.assembler.x86.X86Register.GPR64; import org.jnode.vm.JvmType; import org.jnode.vm.Vm; import org.jnode.vm.bytecode.TypeStack; Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.Map; + import org.jnode.assembler.Label; import org.jnode.assembler.NativeStream; import org.jnode.assembler.x86.X86Assembler; Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l2/GenericX86CodeGenerator.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l2/GenericX86CodeGenerator.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l2/GenericX86CodeGenerator.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -21,15 +21,16 @@ package org.jnode.vm.x86.compiler.l2; +import static org.jnode.vm.compiler.ir.AddressingMode.CONSTANT; +import static org.jnode.vm.compiler.ir.AddressingMode.REGISTER; +import static org.jnode.vm.compiler.ir.AddressingMode.STACK; + import org.jnode.assembler.Label; import org.jnode.assembler.x86.X86Assembler; import org.jnode.assembler.x86.X86Constants; import org.jnode.assembler.x86.X86Register; import org.jnode.assembler.x86.X86Register.GPR; import org.jnode.vm.compiler.ir.AddressingMode; -import static org.jnode.vm.compiler.ir.AddressingMode.CONSTANT; -import static org.jnode.vm.compiler.ir.AddressingMode.REGISTER; -import static org.jnode.vm.compiler.ir.AddressingMode.STACK; import org.jnode.vm.compiler.ir.CodeGenerator; import org.jnode.vm.compiler.ir.Constant; import org.jnode.vm.compiler.ir.IntConstant; Modified: trunk/core/src/core/org/jnode/vm/x86/performance/Athlon64PerformanceCounters.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/performance/Athlon64PerformanceCounters.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/performance/Athlon64PerformanceCounters.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -28,6 +28,7 @@ import static org.jnode.vm.performance.PresetEvent.FP_INS; import static org.jnode.vm.performance.PresetEvent.TOT_CYC; import static org.jnode.vm.performance.PresetEvent.TOT_INS; + import org.jnode.vm.x86.VmX86Processor; /** Modified: trunk/core/src/core/org/jnode/vm/x86/performance/DualMSRPerformanceCounters.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/performance/DualMSRPerformanceCounters.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/performance/DualMSRPerformanceCounters.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -25,6 +25,7 @@ import java.util.Collections; import java.util.Set; import java.util.TreeSet; + import org.jnode.vm.performance.PerformanceCounterEvent; import org.jnode.vm.performance.PresetEvent; import org.jnode.vm.x86.MSR; Modified: trunk/core/src/core/org/jnode/vm/x86/performance/P4FamilyPerformanceCounters.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/performance/P4FamilyPerformanceCounters.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/performance/P4FamilyPerformanceCounters.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -27,6 +27,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; + import org.jnode.vm.performance.PerformanceCounterEvent; import org.jnode.vm.performance.PresetEvent; import org.jnode.vm.x86.MSR; Modified: trunk/core/src/core/org/jnode/vm/x86/performance/P6PerformanceCouters.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/performance/P6PerformanceCouters.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/performance/P6PerformanceCouters.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -25,6 +25,7 @@ import static org.jnode.vm.performance.PresetEvent.BR_MIS; import static org.jnode.vm.performance.PresetEvent.BR_TKN; import static org.jnode.vm.performance.PresetEvent.BR_TKN_MIS; + import org.jnode.vm.x86.VmX86Processor; /** Modified: trunk/core/src/core/org/jnode/vm/x86/performance/Pentium4PerformanceCounters.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/performance/Pentium4PerformanceCounters.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/performance/Pentium4PerformanceCounters.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -31,6 +31,7 @@ import static org.jnode.vm.performance.PresetEvent.TLB_TL; import static org.jnode.vm.performance.PresetEvent.TOT_CYC; import static org.jnode.vm.performance.PresetEvent.TOT_INS; + import org.jnode.vm.x86.VmX86Processor; final class Pentium4PerformanceCounters extends P4FamilyPerformanceCounters { Modified: trunk/core/src/core/org/jnode/vm/x86/performance/X86PerformanceCounters.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/performance/X86PerformanceCounters.java 2008-09-11 11:25:42 UTC (rev 4550) +++ trunk/core/src/core/org/jnode/vm/x86/performance/X86PerformanceCounters.java 2008-09-11 11:32:26 UTC (rev 4551) @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.Set; + import org.jnode.vm.performance.PerformanceCounterEvent; import org.jnode.vm.performance.PerformanceCounters; import org.jnode.vm.x86.UnsafeX86; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ls...@us...> - 2008-09-23 20:07:16
|
Revision: 4575 http://jnode.svn.sourceforge.net/jnode/?rev=4575&view=rev Author: lsantha Date: 2008-09-23 20:06:51 +0000 (Tue, 23 Sep 2008) Log Message: ----------- Improved isolate exit behaviour. Modified Paths: -------------- trunk/core/src/core/org/jnode/vm/isolate/IsolateThread.java trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java trunk/core/src/core/org/jnode/vm/scheduler/VmThread.java Modified: trunk/core/src/core/org/jnode/vm/isolate/IsolateThread.java =================================================================== --- trunk/core/src/core/org/jnode/vm/isolate/IsolateThread.java 2008-09-23 19:45:07 UTC (rev 4574) +++ trunk/core/src/core/org/jnode/vm/isolate/IsolateThread.java 2008-09-23 20:06:51 UTC (rev 4575) @@ -82,4 +82,11 @@ final PrintStream getStdout() { return stdout; } + + /** + * Invoked by VmThread after this thread exits. + */ + public final void afterExit() { + isolate.exit(isolate.getIsolate(), 0); + } } Modified: trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java =================================================================== --- trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java 2008-09-23 19:45:07 UTC (rev 4574) +++ trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java 2008-09-23 20:06:51 UTC (rev 4575) @@ -315,6 +315,14 @@ */ public final void exit(Isolate isolate, int status) { testIsolate(isolate); + if(threadGroup.activeCount() > 0 || threadGroup.activeGroupCount() > 0) + return; + + try { + threadGroup.destroy(); + } catch (Throwable t) { + t.printStackTrace(); + } state = State.EXITED; StaticData.isolates.remove(this); } @@ -333,6 +341,11 @@ break; } + try { + threadGroup.destroy(); + } catch (Throwable t) { + t.printStackTrace(); + } this.state = State.TERMINATED; StaticData.isolates.remove(this); } @@ -547,7 +560,6 @@ */ @PrivilegedActionPragma final void run(IsolateThread thread) { - VmIsolate o_current = IsolatedStaticData.current; try { Unsafe.debug("isolated run "); // Set current @@ -613,8 +625,6 @@ Unsafe.debug("Exception in catch block.. giving up: "); Unsafe.debug(ex2.getMessage()); } - } finally { - IsolatedStaticData.current = o_current; } } Modified: trunk/core/src/core/org/jnode/vm/scheduler/VmThread.java =================================================================== --- trunk/core/src/core/org/jnode/vm/scheduler/VmThread.java 2008-09-23 19:45:07 UTC (rev 4574) +++ trunk/core/src/core/org/jnode/vm/scheduler/VmThread.java 2008-09-23 20:06:51 UTC (rev 4575) @@ -32,6 +32,7 @@ import org.jnode.vm.VmStackReader; import org.jnode.vm.VmSystem; import org.jnode.vm.VmSystemObject; +import org.jnode.vm.isolate.IsolateThread; import org.jnode.vm.annotation.Inline; import org.jnode.vm.annotation.Internal; import org.jnode.vm.annotation.KernelSpace; @@ -388,6 +389,10 @@ this.stopping = true; if (javaThread != null) { javaThread.onExit(); + if(javaThread instanceof IsolateThread) { + //todo implement correct isolate exit for threads created in the new isolate + ((IsolateThread) javaThread).afterExit(); + } // Notify joining threads synchronized (javaThread) { javaThread.notifyAll(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ls...@us...> - 2008-09-29 20:27:04
|
Revision: 4588 http://jnode.svn.sourceforge.net/jnode/?rev=4588&view=rev Author: lsantha Date: 2008-09-29 20:26:31 +0000 (Mon, 29 Sep 2008) Log Message: ----------- Implemented isolate exit for multithreaded isolates (no demon thread suport yet). Modified Paths: -------------- trunk/core/src/core/org/jnode/vm/isolate/IsolateThread.java trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java trunk/core/src/core/org/jnode/vm/scheduler/VmThread.java Modified: trunk/core/src/core/org/jnode/vm/isolate/IsolateThread.java =================================================================== --- trunk/core/src/core/org/jnode/vm/isolate/IsolateThread.java 2008-09-28 14:49:21 UTC (rev 4587) +++ trunk/core/src/core/org/jnode/vm/isolate/IsolateThread.java 2008-09-29 20:26:31 UTC (rev 4588) @@ -82,11 +82,4 @@ final PrintStream getStdout() { return stdout; } - - /** - * Invoked by VmThread after this thread exits. - */ - public final void afterExit() { - isolate.exit(isolate.getIsolate(), 0); - } } Modified: trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java =================================================================== --- trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java 2008-09-28 14:49:21 UTC (rev 4587) +++ trunk/core/src/core/org/jnode/vm/isolate/VmIsolate.java 2008-09-29 20:26:31 UTC (rev 4588) @@ -30,6 +30,8 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.Properties; +import java.util.List; +import java.util.LinkedList; import javax.isolate.Isolate; import javax.isolate.IsolateStartupException; @@ -192,7 +194,7 @@ /** * Non-root isolates. */ - private static final ArrayList<VmIsolate> isolates = new ArrayList<VmIsolate>(); + private static final List<VmIsolate> isolates = new LinkedList<VmIsolate>(); private static int nextId = 0; @@ -341,6 +343,7 @@ */ public final void exit(Isolate isolate, int status) { testIsolate(isolate); + //todo handle demon threads if(threadGroup.activeCount() > 0 || threadGroup.activeGroupCount() > 0) return; Modified: trunk/core/src/core/org/jnode/vm/scheduler/VmThread.java =================================================================== --- trunk/core/src/core/org/jnode/vm/scheduler/VmThread.java 2008-09-28 14:49:21 UTC (rev 4587) +++ trunk/core/src/core/org/jnode/vm/scheduler/VmThread.java 2008-09-29 20:26:31 UTC (rev 4588) @@ -32,7 +32,6 @@ import org.jnode.vm.VmStackReader; import org.jnode.vm.VmSystem; import org.jnode.vm.VmSystemObject; -import org.jnode.vm.isolate.IsolateThread; import org.jnode.vm.annotation.Inline; import org.jnode.vm.annotation.Internal; import org.jnode.vm.annotation.KernelSpace; @@ -48,6 +47,7 @@ import org.jnode.vm.memmgr.VmHeapManager; import org.vmmagic.pragma.UninterruptiblePragma; import org.vmmagic.unboxed.Address; +import javax.isolate.Isolate; /** * VM thread implementation @@ -389,10 +389,8 @@ this.stopping = true; if (javaThread != null) { javaThread.onExit(); - if(javaThread instanceof IsolateThread) { - //todo implement correct isolate exit for threads created in the new isolate - ((IsolateThread) javaThread).afterExit(); - } + //exit the current isolate if needed + Isolate.currentIsolate().exit(0); // Notify joining threads synchronized (javaThread) { javaThread.notifyAll(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ls...@us...> - 2008-12-30 21:01:24
|
Revision: 4813 http://jnode.svn.sourceforge.net/jnode/?rev=4813&view=rev Author: lsantha Date: 2008-12-30 21:01:21 +0000 (Tue, 30 Dec 2008) Log Message: ----------- Code style fixes. Modified Paths: -------------- trunk/core/src/core/org/jnode/vm/VmReflection.java trunk/core/src/core/org/jnode/vm/classmgr/VmClassType.java Modified: trunk/core/src/core/org/jnode/vm/VmReflection.java =================================================================== --- trunk/core/src/core/org/jnode/vm/VmReflection.java 2008-12-30 20:57:37 UTC (rev 4812) +++ trunk/core/src/core/org/jnode/vm/VmReflection.java 2008-12-30 21:01:21 UTC (rev 4813) @@ -344,16 +344,16 @@ Unsafe.pushObject(o); if (!method.isConstructor()) { //todo implement dynamic method lookup according to JLS 15.12.4.4 - if(method.isAbstract()) + if (method.isAbstract()) method = VmType.fromClass(o.getClass()).getMethod(method.getName(), method.getSignature()); - else if(java.lang.reflect.Proxy.isProxyClass(o.getClass())) { + else if (java.lang.reflect.Proxy.isProxyClass(o.getClass())) { method = VmType.fromClass(o.getClass()).getMethod(method.getName(), method.getSignature()); } - } + } } else { method.getDeclaringClass().initialize(); } - + for (int i = 0; i < argCount; i++) { final VmType<?> argType = method.getArgumentType(i); final Object arg = args[i]; @@ -489,9 +489,9 @@ } } } else { - if(arg != null) { - if(!argType.isAssignableFrom(VmType.fromClass(arg.getClass()))) { - throw new IllegalArgumentException ("argument type mismatch"); + if (arg != null) { + if (!argType.isAssignableFrom(VmType.fromClass(arg.getClass()))) { + throw new IllegalArgumentException("argument type mismatch"); } } // Non-primitive argument Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmClassType.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmClassType.java 2008-12-30 20:57:37 UTC (rev 4812) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmClassType.java 2008-12-30 21:01:21 UTC (rev 4813) @@ -148,7 +148,7 @@ final int index = vmt.indexOf(name, signature); if (index >= 0) { // The method existed in the super class, overwrite it - if(vmt.overrides(index, method)){ + if (vmt.overrides(index, method)) { vmt.set(index, method); } else { vmt.add(method); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cr...@us...> - 2009-03-22 14:22:15
|
Revision: 5142 http://jnode.svn.sourceforge.net/jnode/?rev=5142&view=rev Author: crawley Date: 2009-03-22 13:39:29 +0000 (Sun, 22 Mar 2009) Log Message: ----------- Javadoc fixes Modified Paths: -------------- trunk/core/src/core/org/jnode/vm/VmArchitecture.java trunk/core/src/core/org/jnode/vm/VmMagic.java trunk/core/src/core/org/jnode/vm/VmProcessClassLoader.java trunk/core/src/core/org/jnode/vm/VmStackReader.java trunk/core/src/core/org/jnode/vm/annotation/AllowedPackages.java trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java trunk/core/src/core/org/jnode/vm/bytecode/ControlFlowGraph.java trunk/core/src/core/org/jnode/vm/bytecode/TypeStack.java trunk/core/src/core/org/jnode/vm/classmgr/CompiledCodeList.java trunk/core/src/core/org/jnode/vm/classmgr/Signature.java trunk/core/src/core/org/jnode/vm/classmgr/TypeSizeInfo.java trunk/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotatedElement.java trunk/core/src/core/org/jnode/vm/classmgr/VmByteCode.java trunk/core/src/core/org/jnode/vm/classmgr/VmConstObject.java trunk/core/src/core/org/jnode/vm/classmgr/VmLocalVariable.java trunk/core/src/core/org/jnode/vm/classmgr/VmMethod.java Modified: trunk/core/src/core/org/jnode/vm/VmArchitecture.java =================================================================== --- trunk/core/src/core/org/jnode/vm/VmArchitecture.java 2009-03-22 05:55:04 UTC (rev 5141) +++ trunk/core/src/core/org/jnode/vm/VmArchitecture.java 2009-03-22 13:39:29 UTC (rev 5142) @@ -95,7 +95,7 @@ /** * Gets the log base two of the size in bytes of an OS page in a given region * - * @param a {@link VirtualMemoryRegion} value + * @param region a {@link VirtualMemoryRegion} value * @return the log base two page size */ public abstract byte getLogPageSize(int region) @@ -104,7 +104,7 @@ /** * Gets the size in bytes of an OS page in a given region * - * @param a {@link VirtualMemoryRegion} value + * @param region a {@link VirtualMemoryRegion} value * @return the page size */ public final Extent getPageSize(int region) @@ -216,7 +216,7 @@ /** * Gets the end address of the given space. * - * space a {@link VirtualMemoryRegion}. + * @param space a {@link VirtualMemoryRegion}. * @return the end address of the region */ public Address getEnd(int space) { Modified: trunk/core/src/core/org/jnode/vm/VmMagic.java =================================================================== --- trunk/core/src/core/org/jnode/vm/VmMagic.java 2009-03-22 05:55:04 UTC (rev 5141) +++ trunk/core/src/core/org/jnode/vm/VmMagic.java 2009-03-22 13:39:29 UTC (rev 5142) @@ -30,7 +30,8 @@ /** * Class containing "magic" methods that are interpreted by the VM itself, - * instead of being executed as normal java methods. + * instead of being executed as normal java methods. The actual method + * bodies are not used. * <p/> * Methods is this class can also be called from inside JNode. * @@ -63,7 +64,7 @@ * Gets all of the flags of the given object. * * @param object - * @return int + * @return the object flags */ public static Word getObjectFlags(Object object) { return Word.zero(); @@ -73,7 +74,7 @@ * Gets the GC color flags of the given object. * * @param object - * @return int + * @return the GC color flags (as an int) */ public static int getObjectColor(Object object) { return 0; @@ -82,11 +83,10 @@ /** * Sets all of the flags of the given object. * - * @param object - * @param flags + * @param object the target object + * @param flags the new flags value */ public static void setObjectFlags(Object object, Word flags) { - } /** @@ -130,32 +130,40 @@ } /** - * @param value - * @return + * Type cast a 32-bit word to a Java float. + * + * @param value a 32-bit word + * @return the same bit pattern as a float */ public static float intBitsToFloat(int value) { return 0; } /** - * @param value - * @return + * Type cast a Java float to a 32-bit word. + * + * @param value a float + * @return the same bit pattern as a 32-bit word */ public static int floatToRawIntBits(float value) { return 0; } /** - * @param value - * @return + * Type cast a 64-bit word to a Java double. + * + * @param value a 64-bit word + * @return the same bit pattern as a double */ public static double longBitsToDouble(long value) { return 0; } /** - * @param value - * @return + * Type cast a Java double to a 64-bit word. + * + * @param value a double + * @return the same bit pattern as a 64-bit word */ public static long doubleToRawLongBits(double value) { return 0; Modified: trunk/core/src/core/org/jnode/vm/VmProcessClassLoader.java =================================================================== --- trunk/core/src/core/org/jnode/vm/VmProcessClassLoader.java 2009-03-22 05:55:04 UTC (rev 5141) +++ trunk/core/src/core/org/jnode/vm/VmProcessClassLoader.java 2009-03-22 13:39:29 UTC (rev 5142) @@ -28,7 +28,7 @@ public class VmProcessClassLoader extends ClassLoader { /** - * Sets of classname (String) to skip loading via a parent classloader + * Set of classname strings to skip loading via a parent classloader */ private final HashSet<String> skipClassNames; @@ -51,11 +51,6 @@ this(ClassLoader.getSystemClassLoader()); } - /** - * @param name - * @return - * @see java.lang.ClassLoader#skipParentLoader(String) - */ public boolean skipParentLoader(String name) { name = name.replace('/', '.'); return skipClassNames.contains(name); Modified: trunk/core/src/core/org/jnode/vm/VmStackReader.java =================================================================== --- trunk/core/src/core/org/jnode/vm/VmStackReader.java 2009-03-22 05:55:04 UTC (rev 5141) +++ trunk/core/src/core/org/jnode/vm/VmStackReader.java 2009-03-22 13:39:29 UTC (rev 5142) @@ -136,7 +136,7 @@ /** * Gets the stacktrace for a given current frame. * - * @param argFrame + * @param frame The address of the current frame. * @param ip The instruction pointer of the given frame * @param limit Maximum length of returned array. * @return VmStackFrame[] Modified: trunk/core/src/core/org/jnode/vm/annotation/AllowedPackages.java =================================================================== --- trunk/core/src/core/org/jnode/vm/annotation/AllowedPackages.java 2009-03-22 05:55:04 UTC (rev 5141) +++ trunk/core/src/core/org/jnode/vm/annotation/AllowedPackages.java 2009-03-22 13:39:29 UTC (rev 5142) @@ -36,7 +36,7 @@ /** * Gets the packages in which it is allowed to use this annotation. * - * @return + * @return the package names. */ String[] value(); Modified: trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java =================================================================== --- trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java 2009-03-22 05:55:04 UTC (rev 5141) +++ trunk/core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java 2009-03-22 13:39:29 UTC (rev 5142) @@ -55,7 +55,7 @@ /** * Create all determined basic blocks * - * @return + * @return the basic blocks. */ public BasicBlock[] createBasicBlocks() { // Create the array Modified: trunk/core/src/core/org/jnode/vm/bytecode/ControlFlowGraph.java =================================================================== --- trunk/core/src/core/org/jnode/vm/bytecode/ControlFlowGraph.java 2009-03-22 05:55:04 UTC (rev 5141) +++ trunk/core/src/core/org/jnode/vm/bytecode/ControlFlowGraph.java 2009-03-22 13:39:29 UTC (rev 5142) @@ -71,7 +71,7 @@ * Gets the basic block that contains the given address. * * @param pc - * @return + * @return the BasicBlock or {@code null}. */ public BasicBlock getBasicBlock(int pc) { final int max = bblocks.length; Modified: trunk/core/src/core/org/jnode/vm/bytecode/TypeStack.java =================================================================== --- trunk/core/src/core/org/jnode/vm/bytecode/TypeStack.java 2009-03-22 05:55:04 UTC (rev 5141) +++ trunk/core/src/core/org/jnode/vm/bytecode/TypeStack.java 2009-03-22 13:39:29 UTC (rev 5142) @@ -20,8 +20,11 @@ package org.jnode.vm.bytecode; +import org.jnode.vm.JvmType; + /** - * Stack of JvmType's. + * A TypeStack is a stack of internal type numbers represented as {@link JvmType} + * values; i.e. integers. * * @author Ewout Prangsma (ep...@us...) */ @@ -70,14 +73,16 @@ /** * Is this stack empty. * - * @return + * @return {@code true} if the stack is empty, otherwise {@code false}. */ public final boolean isEmpty() { return (tos == 0); } /** - * Is this stack equal to the givn object? + * Is this stack equal to the given TypeStack. Note that this is an + * overload for {@link java.lang.Object#equals(java.lang.Object)} not + * an override. */ public boolean equals(TypeStack tso) { if ((this.tos == 0) && (tso == null)) { @@ -95,7 +100,7 @@ } /** - * Is this stack equal to the givn object? + * Is this stack equal to the given object? * * @see java.lang.Object#equals(java.lang.Object) */ @@ -146,17 +151,19 @@ /** * Gets the number of elements in this stack. * - * @return + * @return the number of elements. */ public final int size() { return tos; } /** - * Gets an entry of the stack. + * Get the element at a particular stack index. * - * @param stackIndex 0..size-1; stackIndex == size-1 means top of stack. - * @return + * @param stackIndex the stack index. This should be a number in the range + * {@code 0 .. size() - 1} inclusive where {@code size() - 1} is the top element + * on the stack. + * @return the internal type number at the given offset. */ public final int getType(int stackIndex) { return stack[stackIndex]; Modified: trunk/core/src/core/org/jnode/vm/classmgr/CompiledCodeList.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/CompiledCodeList.java 2009-03-22 05:55:04 UTC (rev 5141) +++ trunk/core/src/core/org/jnode/vm/classmgr/CompiledCodeList.java 2009-03-22 13:39:29 UTC (rev 5142) @@ -39,12 +39,20 @@ private int nextId = 1; // Leave entry 0 open /** - * Create a new compiled method which is added to the internal list of - * compiled methods. - * - * @param optLevel - * @param magic - * @return + * Create a new VmCompiledCode for a compiled method. The result will be added + * to the internal list of compiled methods. + * + * @param cm an existing CompilerMethod or {@code null}. + * @param method the system method descriptor + * @param compiler the compiler used to compile the method + * @param bytecode the method's bytecodes + * @param nativeCode the native code address + * @param compiledCode + * @param size + * @param eTable + * @param defaultExceptionHandler + * @param addressTable + * @return the resulting VmCompiledCode object */ public synchronized VmCompiledCode createCompiledCode(CompiledMethod cm, VmMethod method, NativeCodeCompiler compiler, @@ -67,12 +75,10 @@ } /** - * Create a new compiled method which is added to the internal list of - * compiled methods. + * Allocate an id (actually an index for the compiler code list) for a new method. + * If necessary the code list is grown to accomadate the method. * - * @param optLevel - * @param magic - * @return + * @return the method id */ public synchronized int createId() { final int cmid = nextId++; @@ -86,7 +92,7 @@ * Gets a compiled method with a given id. * * @param cmid - * @return + * @return the compiled method or {@code null}. */ @KernelSpace @Uninterruptible @@ -101,7 +107,7 @@ /** * Gets the number of method in the list. * - * @return + * @return the number of methods. */ public final int size() { return nextId; Modified: trunk/core/src/core/org/jnode/vm/classmgr/Signature.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/Signature.java 2009-03-22 05:55:04 UTC (rev 5141) +++ trunk/core/src/core/org/jnode/vm/classmgr/Signature.java 2009-03-22 13:39:29 UTC (rev 5142) @@ -70,7 +70,7 @@ /** * Gets the type of the signature (for field signatures) * - * @return String + * @return the type as a VmType */ public VmType getType() { return parts[0]; @@ -79,7 +79,7 @@ /** * Gets the return type of the signature (for method signatures) * - * @return String + * @return the type as a VmType */ public VmType getReturnType() { return parts[parts.length - 1]; @@ -90,27 +90,28 @@ * (for method signatures) * * @param index - * @return String + * @return the type as a VmType */ public VmType getParamType(int index) { return parts[index]; } /** - * Gets the type of the parameter with the given index in this signature - * (for method signatures) + * Gets the number of parameters (for method signatures) * - * @return String + * @return the parameter count */ public int getParamCount() { return parts.length - 1; } /** - * Calculate the number of arguments a method has, based of the signature + * Calculate the number of argument slots that a method required, based of + * the method signature supplied as a character array. * - * @param signature - * @return int + * @param typeSizeInfo gives the type sizes + * @param signature the method signature as a character array + * @return the slot count */ public static final int getArgSlotCount(TypeSizeInfo typeSizeInfo, char[] signature) { @@ -170,10 +171,12 @@ } /** - * Calculate the number of arguments a method has, based of the signature + * Calculate the number of argument slots that a method required, based of + * the method signature supplied as a String. * - * @param signature - * @return int + * @param typeSizeInfo gives the type sizes + * @param signature the method signature as a String + * @return the slot count */ public static final int getArgSlotCount(TypeSizeInfo typeSizeInfo, String signature) { @@ -188,7 +191,7 @@ * @param typeSizeInfo * @param method * @param javaArgIndex - * @return + * @return the slot number */ public static final int getStackSlotForJavaArgNumber( TypeSizeInfo typeSizeInfo, VmMethod method, int javaArgIndex) { Modified: trunk/core/src/core/org/jnode/vm/classmgr/TypeSizeInfo.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/TypeSizeInfo.java 2009-03-22 05:55:04 UTC (rev 5141) +++ trunk/core/src/core/org/jnode/vm/classmgr/TypeSizeInfo.java 2009-03-22 13:39:29 UTC (rev 5142) @@ -61,8 +61,8 @@ * Gets the number of stack slots an argument of the given type takes. * A slot is equal to the address size of the architecture. * - * @param jvmType - * @return + * @param jvmType a type expressed as {@link JvmType} code. + * @return the size (in slots) of an instance of the supplied type. */ public final int getStackSlots(int jvmType) { switch (jvmType) { Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java 2009-03-22 05:55:04 UTC (rev 5141) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmAddressMap.java 2009-03-22 13:39:29 UTC (rev 5142) @@ -62,10 +62,13 @@ } /** - * Add an address-pc mapping + * Add an address-pc mapping. This method cannot be used after {@link #lock()} + * has been called. * * @param offset Offset from the start of the method * @param pc + * @param method + * @param inlineDepth */ public void add(VmMethod method, int pc, int offset, int inlineDepth) { if (offsetTable != null) { @@ -94,7 +97,7 @@ * Gets the last known address index that corresponds to the given code offset. * * @param offset - * @return -1 of not found. + * @return the index, or {@code -1} if the offset is not found in the offset table. */ public final int getIndexForOffset(int offset) { final int[] offsetTable = this.offsetTable; @@ -113,7 +116,7 @@ * Gets the method at the given index. * * @param index - * @return + * @return the method */ public final VmMethod getMethodAtIndex(int index) { if (index < 0) { @@ -129,7 +132,7 @@ * Gets the program counter at the given index. * * @param index - * @return + * @return the program counter */ public final int getProgramCounterAtIndex(int index) { if (index < 0) { @@ -143,8 +146,8 @@ * Gets the index that contains the call to the (inlined) method that is * identified by the given index. * - * @param offset - * @return The callsite index, or -1 if there is no callsite within this + * @param index + * @return The call-site index, or {@code -1} if there is no call-site within this * address map. */ public final int getCallSiteIndex(int index) { @@ -165,8 +168,8 @@ } /** - * Convert to a final contents. After a call to this method, the add method - * cannot be used. + * Convert the address map to its final form. After a call to this method, + * the {@link #add(VmMethod, int, int, int)} method cannot be used. */ final void lock() { AddressPcEntry p = list; Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotatedElement.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotatedElement.java 2009-03-22 05:55:04 UTC (rev 5141) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmAnnotatedElement.java 2009-03-22 13:39:29 UTC (rev 5142) @@ -152,7 +152,7 @@ /** * Gets the parent of this element. * - * @return + * @return the parent element */ protected abstract VmAnnotatedElement getSuperElement(); } Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmByteCode.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmByteCode.java 2009-03-22 05:55:04 UTC (rev 5141) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmByteCode.java 2009-03-22 13:39:29 UTC (rev 5142) @@ -36,34 +36,41 @@ * The method i'm a part of */ private final VmMethod method; + /** * The constant pool where indexes in my bytecode refer to */ private final VmCP cp; + /** - * #Local variables of this method + * Number of local variables for this method */ private char noLocals; /** - * Max. #slots taken by this method on the stack + * Max. number of slots taken by this method on the stack */ private char maxStack; + /** * Bytecode of this method. This is a ByteBuffer or byte[] */ private Object bytecode; + /** * Exception handler table */ private VmInterpretedExceptionHandler[] eTable; + /** * Line number table */ private VmLineNumberMap lnTable; + /** * Local variable table */ private final VmLocalVariableTable lvTable; + /** * Data used by the native code compilers */ @@ -80,7 +87,8 @@ * @param lnTable */ public VmByteCode(VmMethod method, ByteBuffer bytecode, int noLocals, int maxStack, - VmInterpretedExceptionHandler[] eTable, VmLineNumberMap lnTable, VmLocalVariableTable lvTable) { + VmInterpretedExceptionHandler[] eTable, VmLineNumberMap lnTable, + VmLocalVariableTable lvTable) { this.method = method; this.cp = method.getDeclaringClass().getCP(); if (Vm.isWritingImage()) { @@ -188,20 +196,21 @@ } /** - * Gets the line number table, or null if no line number table exists + * Gets the line number table, or {@code null} if no line number table exists * for this bytecode. * - * @return + * @return the line number table */ public VmLineNumberMap getLineNrs() { return lnTable; } /** - * Gets the linenumber of a given program counter. + * Gets the line number corresponding to a given program counter value. * * @param pc - * @return The linenumber for the given pc, or -1 is not found. + * @return The line number for the given pc, or {@code -1} if no line + * number can be found. */ public int getLineNr(int pc) { final VmLineNumberMap lnTable = this.lnTable; @@ -258,7 +267,7 @@ * * @param pc * @param index - * @return The variable or null if not found. + * @return The variable or {@code null} if not found. */ public final VmLocalVariable getVariable(int pc, int index) { return lvTable.getVariable(pc, index); Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmConstObject.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmConstObject.java 2009-03-22 05:55:04 UTC (rev 5141) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmConstObject.java 2009-03-22 13:39:29 UTC (rev 5142) @@ -44,7 +44,7 @@ /** * Gets the type of this object. * - * @return + * @return the type */ public abstract int getConstType(); } Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmLocalVariable.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmLocalVariable.java 2009-03-22 05:55:04 UTC (rev 5141) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmLocalVariable.java 2009-03-22 13:39:29 UTC (rev 5142) @@ -39,18 +39,22 @@ * Start of the value value range. */ private final char startPC; + /** * Length of the value value range. */ private final char length; + /** * Name of the variable */ private final char nameIndex; + /** * Type descriptor of the variable */ private final char descriptorIndex; + /** * Local variable index (on the stack) of the variable */ @@ -61,8 +65,8 @@ * * @param startPC * @param length - * @param name - * @param signature + * @param nameIndex + * @param descriptorIndex * @param index */ public VmLocalVariable(char startPC, char length, char nameIndex, char descriptorIndex, char index) { Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmMethod.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmMethod.java 2009-03-22 05:55:04 UTC (rev 5141) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmMethod.java 2009-03-22 13:39:29 UTC (rev 5142) @@ -265,7 +265,7 @@ * Gets the full name of this method consisting of * its declaring class, its name and its signature. * - * @return + * @return the full name */ public final String getFullName() { return declaringClass.getName() + '#' + getName() + '!' + getSignature(); @@ -530,7 +530,7 @@ /** * Is this method uninterruptible. * - * @return True | false. + * @return {@code true} if the pragma flag is set, otherwise {@code false}. */ public final boolean isUninterruptible() { return ((pragmaFlags & MethodPragmaFlags.UNINTERRUPTIBLE) != 0); @@ -539,7 +539,7 @@ /** * Is the checkpermission pragma set for this method. * - * @return + * @return {@code true} if the pragma flag is set, otherwise {@code false}. */ public final boolean hasCheckPermissionPragma() { return ((pragmaFlags & MethodPragmaFlags.CHECKPERMISSION) != 0); @@ -548,7 +548,7 @@ /** * Is the doprivileged pragma set for this method. * - * @return + * @return {@code true} if the pragma flag is set, otherwise {@code false}. */ public final boolean hasDoPrivilegedPragma() { return ((pragmaFlags & MethodPragmaFlags.DOPRIVILEGED) != 0); @@ -557,7 +557,7 @@ /** * Is the inline pragma set for this method. * - * @return + * @return {@code true} if the pragma flag is set, otherwise {@code false}. */ public final boolean hasInlinePragma() { return ((pragmaFlags & MethodPragmaFlags.INLINE) != 0); @@ -566,7 +566,7 @@ /** * Is the loadstatics pragma set for this method. * - * @return + * @return {@code true} if the pragma flag is set, otherwise {@code false}. */ public final boolean hasLoadStaticsPragma() { return ((pragmaFlags & MethodPragmaFlags.LOADSTATICS) != 0); @@ -575,7 +575,7 @@ /** * Is the noinline pragma set for this method. * - * @return + * @return {@code true} if the pragma flag is set, otherwise {@code false}. */ public final boolean hasNoInlinePragma() { return ((pragmaFlags & MethodPragmaFlags.NOINLINE) != 0); @@ -584,7 +584,7 @@ /** * Is the noreadbarrier pragma set for this method. * - * @return + * @return {@code true} if the pragma flag is set, otherwise {@code false}. */ public final boolean hasNoReadBarrierPragma() { return ((pragmaFlags & MethodPragmaFlags.NOREADBARRIER) != 0); @@ -593,7 +593,7 @@ /** * Is the nowritebarrier pragma set for this method. * - * @return + * @return {@code true} if the pragma flag is set, otherwise {@code false}. */ public final boolean hasNoWriteBarrierPragma() { return ((pragmaFlags & MethodPragmaFlags.NOWRITEBARRIER) != 0); @@ -602,7 +602,7 @@ /** * Is the privilegedaction pragma set for this method. * - * @return + * @return {@code true} if the pragma flag is set, otherwise {@code false}. */ public final boolean hasPrivilegedActionPragma() { return ((pragmaFlags & MethodPragmaFlags.PRIVILEGEDACTION) != 0); @@ -611,7 +611,7 @@ /** * Is the KernelSpace pragma set for this method. * - * @return + * @return {@code true} if the pragma flag is set, otherwise {@code false}. */ public final boolean hasKernelSpacePragma() { return ((pragmaFlags & MethodPragmaFlags.KERNELSPACE) != 0); @@ -635,7 +635,7 @@ } /** - * Gets the indexe of this field in the shared statics table. + * Gets the index of this field in the shared statics table. * * @return Returns the staticsIndex. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cr...@us...> - 2009-03-22 14:45:23
|
Revision: 5143 http://jnode.svn.sourceforge.net/jnode/?rev=5143&view=rev Author: crawley Date: 2009-03-22 14:45:17 +0000 (Sun, 22 Mar 2009) Log Message: ----------- Javadoc fixes Modified Paths: -------------- trunk/core/src/core/org/jnode/vm/classmgr/VmPrimitiveClass.java trunk/core/src/core/org/jnode/vm/classmgr/VmStatics.java trunk/core/src/core/org/jnode/vm/classmgr/VmType.java trunk/core/src/core/org/jnode/vm/classmgr/VmUTF8Convert.java trunk/core/src/core/org/jnode/vm/compiler/BaseMagicHelper.java trunk/core/src/core/org/jnode/vm/compiler/CompiledIMT.java trunk/core/src/core/org/jnode/vm/compiler/CompiledMethod.java trunk/core/src/core/org/jnode/vm/compiler/CompilerBytecodeViewer.java trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java trunk/core/src/core/org/jnode/vm/compiler/OptimizingBytecodeVisitor.java trunk/core/src/core/org/jnode/vm/compiler/ir/CodeGenerator.java trunk/core/src/core/org/jnode/vm/compiler/ir/Constant.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlock.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java trunk/core/src/core/org/jnode/vm/compiler/ir/IRGenerator.java trunk/core/src/core/org/jnode/vm/compiler/ir/Operand.java Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmPrimitiveClass.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmPrimitiveClass.java 2009-03-22 13:39:29 UTC (rev 5142) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmPrimitiveClass.java 2009-03-22 14:45:17 UTC (rev 5143) @@ -22,7 +22,9 @@ import java.security.ProtectionDomain; +import org.jnode.vm.JvmType; + /** * @author Ewout Prangsma (ep...@us...) */ @@ -68,24 +70,23 @@ } /** - * Is this a wide primitive type; long or double + * Is this a wide primitive type; i.e. a long or double */ public final boolean isWide() { return wide; } /** - * Is this a floatingpoint primitive type; float or double + * Is this a floating point primitive type; i.e. a float or double */ public final boolean isFloatingPoint() { return floatingPoint; } /** - * Gets the JvmType of this type. + * Gets the {@link JvmType} value for this type. * - * @return - * @see org.jnode.vm.JvmType + * @return the {@link JvmType} (integer) value */ public int getJvmType() { return jvmType; Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmStatics.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmStatics.java 2009-03-22 13:39:29 UTC (rev 5142) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmStatics.java 2009-03-22 14:45:17 UTC (rev 5143) @@ -150,7 +150,7 @@ * Gets the type at the given index. * * @param idx - * @return + * @return the type entry */ final VmType getTypeEntry(int idx) { allocator.testType(idx, TYPE_CLASS); @@ -409,7 +409,7 @@ /** * Gets my statics allocator. * - * @return + * @return the allocator */ protected final VmStaticsAllocator getAllocator() { return allocator; Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmType.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmType.java 2009-03-22 13:39:29 UTC (rev 5142) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmType.java 2009-03-22 14:45:17 UTC (rev 5143) @@ -252,6 +252,7 @@ * @param superClassName * @param loader * @param accessFlags + * @param protectionDomain the protection domain of this type. */ protected VmType(String name, String superClassName, VmClassLoader loader, int accessFlags, ProtectionDomain protectionDomain) { @@ -266,6 +267,7 @@ * @param superClass * @param loader * @param typeSize + * @param protectionDomain the protection domain of this type. */ VmType(String name, VmNormalClass<? super T> superClass, VmClassLoader loader, int typeSize, @@ -340,7 +342,7 @@ * Load the system classes during our bootstrap process. * * @param clc - * @return VmClass[] + * @return the VmType objects for the system classes * @throws ClassNotFoundException */ @SuppressWarnings("unchecked") @@ -2349,10 +2351,9 @@ } /** - * Gets the JvmType of this type. + * Gets the {@link JvmType} value for this type. * - * @return - * @see org.jnode.vm.JvmType + * @return the {@link JvmType} value (integer). */ public int getJvmType() { return JvmType.REFERENCE; Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmUTF8Convert.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/VmUTF8Convert.java 2009-03-22 13:39:29 UTC (rev 5142) +++ trunk/core/src/core/org/jnode/vm/classmgr/VmUTF8Convert.java 2009-03-22 14:45:17 UTC (rev 5143) @@ -61,17 +61,19 @@ static final boolean WRITE_PSEUDO_UTF8 = true; /** - * Convert the given sequence of (pseudo-)utf8 formatted bytes into a - * String. - * <p/> + * Convert the given sequence of UTF8 coded bytes into an interned Java String. + * <p> * The acceptable input formats are controlled by the STRICTLY_CHECK_FORMAT, * ALLOW_NORMAL_UTF8, and ALLOW_PSEUDO_UTF8 flags. * - * @param utf8 (pseudo-)utf8 byte array - * @return unicode string - * @throws UTFDataFormatException if the (pseudo-)utf8 byte array is not valid (pseudo-)utf8 + * @param data a buffer containing the UTF8 data. + * @param result a temporary character buffer used to build the string. + * @param length the number of bytes to pull from the data buffer. + * @return the resulting String + * @throws UTFDataFormatException if the UTF8 is invalid */ - public static String fromUTF8(ByteBuffer data, char[] result, int length) throws UTFDataFormatException { + public static String fromUTF8(ByteBuffer data, char[] result, int length) + throws UTFDataFormatException { int result_index = 0; for (int i = 0, n = length; i < n;) { byte b = data.get(); Modified: trunk/core/src/core/org/jnode/vm/compiler/BaseMagicHelper.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/BaseMagicHelper.java 2009-03-22 13:39:29 UTC (rev 5142) +++ trunk/core/src/core/org/jnode/vm/compiler/BaseMagicHelper.java 2009-03-22 14:45:17 UTC (rev 5143) @@ -84,7 +84,7 @@ * Gets the MagicClass instance for the given type. * * @param type - * @return + * @return a MagicClass instance * @throws InternalError When type is no magic type. */ public static MagicClass get(VmType<?> type) { Modified: trunk/core/src/core/org/jnode/vm/compiler/CompiledIMT.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/CompiledIMT.java 2009-03-22 13:39:29 UTC (rev 5142) +++ trunk/core/src/core/org/jnode/vm/compiler/CompiledIMT.java 2009-03-22 14:45:17 UTC (rev 5143) @@ -30,7 +30,7 @@ /** * Gets the address of the IMT code table. * - * @return + * @return the address */ public abstract Object getIMTAddress(); Modified: trunk/core/src/core/org/jnode/vm/compiler/CompiledMethod.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/CompiledMethod.java 2009-03-22 13:39:29 UTC (rev 5142) +++ trunk/core/src/core/org/jnode/vm/compiler/CompiledMethod.java 2009-03-22 14:45:17 UTC (rev 5143) @@ -142,7 +142,7 @@ /** * Gets (creates if needed) a compiled code id. * - * @return + * @return a compiled code id. */ public final int getCompiledCodeId() { if (ccId < 0) { Modified: trunk/core/src/core/org/jnode/vm/compiler/CompilerBytecodeViewer.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/CompilerBytecodeViewer.java 2009-03-22 13:39:29 UTC (rev 5142) +++ trunk/core/src/core/org/jnode/vm/compiler/CompilerBytecodeViewer.java 2009-03-22 14:45:17 UTC (rev 5143) @@ -1192,9 +1192,6 @@ viewer.visit_tableswitch(defValue, lowValue, highValue, addresses); } - /** - * @see org.jnode.vm.compiler.InlineBytecodeVisitor#visit_inlinedReturn() - */ public void visit_inlinedReturn(int jvmType) { viewer.out("inlinedReturn [type " + jvmType + "]"); } Modified: trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java 2009-03-22 13:39:29 UTC (rev 5142) +++ trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java 2009-03-22 14:45:17 UTC (rev 5143) @@ -295,7 +295,7 @@ * @param method * @param cm * @param os - * @param level + * @param level Optimization level * @param isBootstrap * @return The new bytecode visitor. */ @@ -318,9 +318,8 @@ /** * Gets the magic value of this compiler. * - * @return + * @return the magic value * @see org.jnode.vm.VmStackFrame#MAGIC_COMPILED - * @see org.jnode.vm.VmStackFrame#MAGIC_INTERPRETED * @see org.jnode.vm.VmStackFrame#MAGIC_MASK */ public abstract int getMagic(); @@ -328,21 +327,21 @@ /** * Gets the name of this compiler. * - * @return + * @return the compiler name */ public abstract String getName(); /** * Create an iterator that can iterator of GCMaps generated by this compiler. * - * @return + * @return the iterator */ public abstract GCMapIterator createGCMapIterator(); /** * Gets the names of the packages that are required by this compiler. * - * @return + * @return the names */ public abstract String[] getCompilerPackages(); } Modified: trunk/core/src/core/org/jnode/vm/compiler/OptimizingBytecodeVisitor.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/OptimizingBytecodeVisitor.java 2009-03-22 13:39:29 UTC (rev 5142) +++ trunk/core/src/core/org/jnode/vm/compiler/OptimizingBytecodeVisitor.java 2009-03-22 14:45:17 UTC (rev 5143) @@ -694,7 +694,7 @@ /** * Have we visited a return statement? * - * @return + * @return {@code true} if we have visited a return statement, {code false} otherwise. */ public boolean isReturnVisited() { return visitedReturn; Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/CodeGenerator.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/CodeGenerator.java 2009-03-22 13:39:29 UTC (rev 5142) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/CodeGenerator.java 2009-03-22 14:45:17 UTC (rev 5143) @@ -49,14 +49,14 @@ public abstract void checkLabel(int address); /** - * @return + * @return the register pool */ public abstract RegisterPool<T> getRegisterPool(); /** * Returns true of this CPU supports 3 address operands * - * @return + * @return {@code true} if the 3 address operands are supported, otherwise {@code false}. */ public abstract boolean supports3AddrOps(); Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/Constant.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/Constant.java 2009-03-22 13:39:29 UTC (rev 5142) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/Constant.java 2009-03-22 14:45:17 UTC (rev 5143) @@ -147,316 +147,192 @@ ///////////////// BINARY OPERATIONS //////////////////// - /** - * @param c2 - */ public Constant<T> iAdd(Constant<T> c2) { int i1 = ((IntConstant<T>) this).getValue(); int i2 = ((IntConstant<T>) c2).getValue(); return new IntConstant<T>(i1 + i2); } - /** - * @param c2 - */ public Constant<T> iSub(Constant<T> c2) { int i1 = ((IntConstant<T>) this).getValue(); int i2 = ((IntConstant<T>) c2).getValue(); return new IntConstant<T>(i1 - i2); } - /** - * @param c2 - */ public Constant<T> iMul(Constant<T> c2) { int i1 = ((IntConstant<T>) this).getValue(); int i2 = ((IntConstant<T>) c2).getValue(); return new IntConstant<T>(i1 * i2); } - /** - * @param c2 - */ public Constant<T> iDiv(Constant<T> c2) { int i1 = ((IntConstant<T>) this).getValue(); int i2 = ((IntConstant<T>) c2).getValue(); return new IntConstant<T>(i1 / i2); } - /** - * @param c2 - * @return - */ public Constant<T> iRem(Constant<T> c2) { int i1 = ((IntConstant<T>) this).getValue(); int i2 = ((IntConstant<T>) c2).getValue(); return new IntConstant<T>(i1 % i2); } - /** - * @param c2 - * @return - */ public Constant<T> iAnd(Constant<T> c2) { int i1 = ((IntConstant<T>) this).getValue(); int i2 = ((IntConstant<T>) c2).getValue(); return new IntConstant<T>(i1 & i2); } - /** - * @param c2 - * @return - */ public Constant<T> iOr(Constant<T> c2) { int i1 = ((IntConstant<T>) this).getValue(); int i2 = ((IntConstant<T>) c2).getValue(); return new IntConstant<T>(i1 | i2); } - /** - * @param c2 - * @return - */ public Constant<T> iXor(Constant<T> c2) { int i1 = ((IntConstant<T>) this).getValue(); int i2 = ((IntConstant<T>) c2).getValue(); return new IntConstant<T>(i1 ^ i2); } - /** - * @param c2 - * @return - */ public Constant<T> iShl(Constant<T> c2) { int i1 = ((IntConstant<T>) this).getValue(); int i2 = ((IntConstant<T>) c2).getValue(); return new IntConstant<T>(i1 << i2); } - /** - * @param c2 - * @return - */ public Constant<T> iShr(Constant<T> c2) { int i1 = ((IntConstant<T>) this).getValue(); int i2 = ((IntConstant<T>) c2).getValue(); return new IntConstant<T>(i1 >> i2); } - /** - * @param c2 - * @return - */ public Constant<T> iUshr(Constant<T> c2) { int i1 = ((IntConstant<T>) this).getValue(); int i2 = ((IntConstant<T>) c2).getValue(); return new IntConstant<T>(i1 >>> i2); } - /** - * @param c2 - * @return - */ public Constant<T> lAdd(Constant<T> c2) { long l1 = ((LongConstant<T>) this).getValue(); long l2 = ((LongConstant<T>) c2).getValue(); return new LongConstant<T>(l1 + l2); } - /** - * @param c2 - * @return - */ public Constant<T> lSub(Constant<T> c2) { long l1 = ((LongConstant<T>) this).getValue(); long l2 = ((LongConstant<T>) c2).getValue(); return new LongConstant<T>(l1 - l2); } - /** - * @param c2 - * @return - */ public Constant<T> lMul(Constant<T> c2) { long l1 = ((LongConstant<T>) this).getValue(); long l2 = ((LongConstant<T>) c2).getValue(); return new LongConstant<T>(l1 * l2); } - /** - * @param c2 - * @return - */ public Constant<T> lDiv(Constant<T> c2) { long l1 = ((LongConstant<T>) this).getValue(); long l2 = ((LongConstant<T>) c2).getValue(); return new LongConstant<T>(l1 / l2); } - /** - * @param c2 - * @return - */ public Constant<T> lRem(Constant<T> c2) { long l1 = ((LongConstant<T>) this).getValue(); long l2 = ((LongConstant<T>) c2).getValue(); return new LongConstant<T>(l1 % l2); } - /** - * @param c2 - * @return - */ public Constant<T> lAnd(Constant<T> c2) { long l1 = ((LongConstant<T>) this).getValue(); long l2 = ((LongConstant<T>) c2).getValue(); return new LongConstant<T>(l1 & l2); } - /** - * @param c2 - * @return - */ public Constant<T> lOr(Constant<T> c2) { long l1 = ((LongConstant<T>) this).getValue(); long l2 = ((LongConstant<T>) c2).getValue(); return new LongConstant<T>(l1 | l2); } - /** - * @param c2 - * @return - */ public Constant<T> lXor(Constant<T> c2) { long l1 = ((LongConstant<T>) this).getValue(); long l2 = ((LongConstant<T>) c2).getValue(); return new LongConstant<T>(l1 ^ l2); } - /** - * @param c2 - * @return - */ public Constant<T> lShl(Constant<T> c2) { long l1 = ((LongConstant<T>) this).getValue(); long l2 = ((LongConstant<T>) c2).getValue(); return new LongConstant<T>(l1 << l2); } - /** - * @param c2 - * @return - */ public Constant<T> lShr(Constant<T> c2) { long l1 = ((LongConstant<T>) this).getValue(); long l2 = ((LongConstant<T>) c2).getValue(); return new LongConstant<T>(l1 >> l2); } - /** - * @param c2 - * @return - */ public Constant<T> lUshr(Constant<T> c2) { long l1 = ((LongConstant<T>) this).getValue(); long l2 = ((LongConstant<T>) c2).getValue(); return new LongConstant<T>(l1 >>> l2); } - /** - * @param c2 - * @return - */ public Constant<T> fAdd(Constant<T> c2) { float f1 = ((FloatConstant<T>) this).getValue(); float f2 = ((FloatConstant<T>) c2).getValue(); return new FloatConstant<T>(f1 + f2); } - /** - * @param c2 - * @return - */ public Constant<T> fSub(Constant<T> c2) { float f1 = ((FloatConstant<T>) this).getValue(); float f2 = ((FloatConstant<T>) c2).getValue(); return new FloatConstant<T>(f1 - f2); } - /** - * @param c2 - * @return - */ public Constant<T> fMul(Constant<T> c2) { float f1 = ((FloatConstant<T>) this).getValue(); float f2 = ((FloatConstant<T>) c2).getValue(); return new FloatConstant<T>(f1 * f2); } - /** - * @param c2 - * @return - */ public Constant<T> fDiv(Constant<T> c2) { float f1 = ((FloatConstant<T>) this).getValue(); float f2 = ((FloatConstant<T>) c2).getValue(); return new FloatConstant<T>(f1 / f2); } - /** - * @param c2 - * @return - */ public Constant<T> fRem(Constant<T> c2) { float f1 = ((FloatConstant<T>) this).getValue(); float f2 = ((FloatConstant<T>) c2).getValue(); return new FloatConstant<T>(f1 / f2); } - /** - * @param c2 - * @return - */ public Constant<T> dAdd(Constant<T> c2) { double d1 = ((DoubleConstant<T>) this).getValue(); double d2 = ((DoubleConstant<T>) c2).getValue(); return new DoubleConstant<T>(d1 + d2); } - /** - * @param c2 - * @return - */ public Constant<T> dSub(Constant<T> c2) { double d1 = ((DoubleConstant<T>) this).getValue(); double d2 = ((DoubleConstant<T>) c2).getValue(); return new DoubleConstant<T>(d1 - d2); } - /** - * @param c2 - * @return - */ public Constant<T> dMul(Constant<T> c2) { double d1 = ((DoubleConstant<T>) this).getValue(); double d2 = ((DoubleConstant<T>) c2).getValue(); return new DoubleConstant<T>(d1 * d2); } - /** - * @param c2 - * @return - */ public Constant<T> dDiv(Constant<T> c2) { double d1 = ((DoubleConstant<T>) this).getValue(); double d2 = ((DoubleConstant<T>) c2).getValue(); return new DoubleConstant<T>(d1 / d2); } - /** - * @param c2 - * @return - */ public Constant<T> dRem(Constant<T> c2) { double d1 = ((DoubleConstant<T>) this).getValue(); double d2 = ((DoubleConstant<T>) c2).getValue(); Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlock.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlock.java 2009-03-22 13:39:29 UTC (rev 5142) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlock.java 2009-03-22 14:45:17 UTC (rev 5143) @@ -126,13 +126,11 @@ } /** - * @return + * @return the variables for the basic block */ public Variable<T>[] getVariables() { if (variables == null) { - if (variables == null) { - variables = idominator.getVariables(); - } + variables = idominator.getVariables(); } if (variables == null) { throw new AssertionError("variables are null!"); @@ -141,14 +139,14 @@ } /** - * @param variables + * @param variables new variables for the basic block */ public void setVariables(Variable<T>[] variables) { this.variables = variables; } /** - * @return + * @return the stack offset for the basic block */ public int getStackOffset() { if (stackOffset < 0) { @@ -197,21 +195,21 @@ } /** - * @return + * @return the successors */ public List<IRBasicBlock<T>> getSuccessors() { return successors; } /** - * @return + * @return the idominator */ public IRBasicBlock<T> getIDominator() { return idominator; } /** - * @return + * @return the block name */ public String getName() { return name; @@ -252,7 +250,7 @@ } /** - * @return + * @return the post-order number */ public int getPostOrderNumber() { return postOrderNumber; @@ -304,42 +302,42 @@ } /** - * @return + * @return the dominance frontier */ public List<IRBasicBlock<T>> getDominanceFrontier() { return dominanceFrontier; } /** - * @return + * @return the dominated blocks */ public List<IRBasicBlock<T>> getDominatedBlocks() { return dominatedBlocks; } /** - * @return + * @return the quads */ public List<Quad<T>> getQuads() { return quads; } /** - * @return + * @return the def list */ public List<Operand> getDefList() { return defList; } /** - * @return + * @return the end PC */ public int getEndPC() { return endPC; } /** - * @return + * @return the start PC */ public int getStartPC() { return startPC; @@ -360,7 +358,7 @@ } /** - * @return + * @return {@code if this block is the start of an exception handler */ public boolean isStartOfExceptionHandler() { return startOfExceptionHandler; @@ -374,8 +372,8 @@ } /** - * @param pc - * @return + * @param pc a PC value + * @return {@code true} if the basic block contains the given PC */ public boolean contains(int pc) { return ((pc >= startPC) && (pc < endPC)); Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java 2009-03-22 13:39:29 UTC (rev 5142) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java 2009-03-22 14:45:17 UTC (rev 5143) @@ -118,10 +118,6 @@ return null; } - /** - * @param method - * @see org.jnode.vm.bytecode.BytecodeVisitor#startMethod(org.jnode.vm.classmgr.VmMethod) - */ public void startMethod(VmMethod method) { final VmByteCode bc = method.getBytecode(); byteCode = bc; @@ -141,9 +137,6 @@ } } - /* (non-Javadoc) - * @see org.jnode.vm.bytecode.BytecodeVisitor#endMethod() - */ public void endMethod() { VmByteCode bc = byteCode; // TODO add catch blocks to try successors @@ -152,143 +145,72 @@ } } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ifeq(int) - */ public void visit_ifeq(int address) { addBranch(address, CONDITIONAL_BRANCH); } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ifne(int) - */ public void visit_ifne(int address) { addBranch(address, CONDITIONAL_BRANCH); } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_iflt(int) - */ public void visit_iflt(int address) { addBranch(address, CONDITIONAL_BRANCH); } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ifge(int) - */ public void visit_ifge(int address) { addBranch(address, CONDITIONAL_BRANCH); } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ifgt(int) - */ public void visit_ifgt(int address) { addBranch(address, CONDITIONAL_BRANCH); } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ifle(int) - */ public void visit_ifle(int address) { addBranch(address, CONDITIONAL_BRANCH); } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_if_icmpeq(int) - */ public void visit_if_icmpeq(int address) { addBranch(address, CONDITIONAL_BRANCH); } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_if_icmpne(int) - */ public void visit_if_icmpne(int address) { addBranch(address, CONDITIONAL_BRANCH); } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_if_icmplt(int) - */ public void visit_if_icmplt(int address) { addBranch(address, CONDITIONAL_BRANCH); } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_if_icmpge(int) - */ public void visit_if_icmpge(int address) { addBranch(address, CONDITIONAL_BRANCH); } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_if_icmpgt(int) - */ public void visit_if_icmpgt(int address) { addBranch(address, CONDITIONAL_BRANCH); } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_if_icmple(int) - */ public void visit_if_icmple(int address) { addBranch(address, CONDITIONAL_BRANCH); } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_if_acmpeq(int) - */ public void visit_if_acmpeq(int address) { addBranch(address, CONDITIONAL_BRANCH); } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_if_acmpne(int) - */ public void visit_if_acmpne(int address) { addBranch(address, CONDITIONAL_BRANCH); } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_goto(int) - */ public void visit_goto(int address) { addBranch(address, UNCONDITIONAL_BRANCH); } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_jsr(int) - */ public void visit_jsr(int address) { // TODO Not sure about this, the next block I believe it NOT a // direct successor. This will have to be tested. //addBranch(address); } - /** - * @param defValue - * @param lowValue - * @param highValue - * @param addresses - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_tableswitch(int, int, int, int[]) - */ public void visit_tableswitch(int defValue, int lowValue, int highValue, int[] addresses) { for (int i = 0; i < addresses.length; i++) { // Next block could be successor, e.g. switch could fall through @@ -298,12 +220,6 @@ addBranch(defValue, CONDITIONAL_BRANCH); } - /** - * @param defValue - * @param matchValues - * @param addresses - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_lookupswitch(int, int[], int[]) - */ public void visit_lookupswitch(int defValue, int[] matchValues, int[] addresses) { for (int i = 0; i < addresses.length; i++) { // Next block could be successor, e.g. switch could fall through @@ -313,76 +229,43 @@ addBranch(defValue, CONDITIONAL_BRANCH); } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ifnull(int) - */ public void visit_ifnull(int address) { addBranch(address, CONDITIONAL_BRANCH); } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ifnonnull(int) - */ public void visit_ifnonnull(int address) { addBranch(address, CONDITIONAL_BRANCH); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_athrow() - */ public void visit_athrow() { endBB(UNCONDITIONAL_BRANCH); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_areturn() - */ public void visit_areturn() { endBB(UNCONDITIONAL_BRANCH); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dreturn() - */ public void visit_dreturn() { endBB(UNCONDITIONAL_BRANCH); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_freturn() - */ public void visit_freturn() { endBB(UNCONDITIONAL_BRANCH); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ireturn() - */ public void visit_ireturn() { endBB(UNCONDITIONAL_BRANCH); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_lreturn() - */ public void visit_lreturn() { endBB(UNCONDITIONAL_BRANCH); } - /** - * @param index - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ret(int) - */ public void visit_ret(int index) { // Not sure about this either, this needs testing endBB(UNCONDITIONAL_BRANCH); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_return() - */ public void visit_return() { endBB(UNCONDITIONAL_BRANCH); } @@ -430,10 +313,6 @@ branchFlags[address] |= flags; } - /** - * @param address - * @see org.jnode.vm.bytecode.BytecodeVisitor#startInstruction(int) - */ public void startInstruction(int address) { super.startInstruction(address); opcodeFlags[address] |= BytecodeFlags.F_START_OF_INSTRUCTION; Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java 2009-03-22 13:39:29 UTC (rev 5142) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/IRControlFlowGraph.java 2009-03-22 14:45:17 UTC (rev 5143) @@ -80,7 +80,7 @@ * Gets the basic block that contains the given address. * * @param pc - * @return + * @return the basic block or {@code null}. */ public IRBasicBlock getBasicBlock(int pc) { final int max = bblocks.length; Modified: trunk/core/src/core/org/jnode/vm/compiler/ir/IRGenerator.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/ir/IRGenerator.java 2009-03-22 13:39:29 UTC (rev 5142) +++ trunk/core/src/core/org/jnode/vm/compiler/ir/IRGenerator.java 2009-03-22 14:45:17 UTC (rev 5143) @@ -125,23 +125,14 @@ private Iterator<IRBasicBlock<T>> basicBlockIterator; private IRBasicBlock<T> currentBlock; - /** - * - */ public IRGenerator(IRControlFlowGraph<T> cfg) { basicBlockIterator = cfg.iterator(); currentBlock = basicBlockIterator.next(); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#setParser(org.jnode.vm.bytecode.BytecodeParser) - */ public void setParser(BytecodeParser parser) { } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#startMethod(org.jnode.vm.classmgr.VmMethod) - */ public void startMethod(VmMethod method) { VmByteCode code = method.getBytecode(); nArgs = method.getArgSlotCount(); @@ -165,15 +156,9 @@ currentBlock.setVariables(variables); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#endMethod() - */ public void endMethod() { } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#startInstruction(int) - */ public void startInstruction(int address) { this.address = address; if (address >= currentBlock.getEndPC()) { @@ -208,30 +193,18 @@ } } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#endInstruction() - */ public void endInstruction() { } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_nop() - */ public void visit_nop() { } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_aconst_null() - */ public void visit_aconst_null() { currentBlock.add(new ConstantRefAssignQuad<T>(address, currentBlock, stackOffset, NULL_CONSTANT)); stackOffset += 1; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_iconst(int) - */ public void visit_iconst(int value) { Constant<T> c = Constant.getInstance(value); Quad<T> quad = new ConstantRefAssignQuad<T>(address, currentBlock, stackOffset, @@ -240,9 +213,6 @@ stackOffset += 1; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_lconst(long) - */ public void visit_lconst(long value) { Constant<T> c = Constant.getInstance(value); currentBlock.add(new ConstantRefAssignQuad<T>(address, currentBlock, stackOffset, @@ -250,9 +220,6 @@ stackOffset += 2; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_fconst(float) - */ public void visit_fconst(float value) { Constant<T> c = Constant.getInstance(value); currentBlock.add(new ConstantRefAssignQuad<T>(address, currentBlock, stackOffset, @@ -260,9 +227,6 @@ stackOffset += 1; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dconst(double) - */ public void visit_dconst(double value) { Constant<T> c = Constant.getInstance(value); currentBlock.add(new ConstantRefAssignQuad<T>(address, currentBlock, stackOffset, @@ -270,24 +234,14 @@ stackOffset += 2; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ldc(VmConstString) - */ public void visit_ldc(VmConstString value) { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @param value - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ldc(VmConstClass) - */ public final void visit_ldc(VmConstClass value) { throw new Error("Not implemented yet"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_iload(int) - */ public void visit_iload(int index) { variables[index].setType(Operand.INT); variables[stackOffset].setType(Operand.INT); @@ -297,9 +251,6 @@ stackOffset += 1; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_lload(int) - */ public void visit_lload(int index) { variables[index].setType(Operand.LONG); variables[stackOffset].setType(Operand.LONG); @@ -308,9 +259,6 @@ stackOffset += 2; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_fload(int) - */ public void visit_fload(int index) { variables[index].setType(Operand.FLOAT); variables[stackOffset].setType(Operand.FLOAT); @@ -319,9 +267,6 @@ stackOffset += 1; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dload(int) - */ public void visit_dload(int index) { variables[index].setType(Operand.DOUBLE); variables[stackOffset].setType(Operand.DOUBLE); @@ -330,9 +275,6 @@ stackOffset += 2; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_aload(int) - */ public void visit_aload(int index) { variables[index].setType(Operand.REFERENCE); variables[stackOffset].setType(Operand.REFERENCE); @@ -340,65 +282,38 @@ stackOffset += 1; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_iaload() - */ public void visit_iaload() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_laload() - */ public void visit_laload() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_faload() - */ public void visit_faload() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_daload() - */ public void visit_daload() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_aaload() - */ public void visit_aaload() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_baload() - */ public void visit_baload() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_caload() - */ public void visit_caload() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_saload() - */ public void visit_saload() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_istore(int) - */ public void visit_istore(int index) { stackOffset -= 1; variables[index].setType(Operand.INT); @@ -406,9 +321,6 @@ currentBlock.add(new VariableRefAssignQuad<T>(address, currentBlock, index, stackOffset)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_lstore(int) - */ public void visit_lstore(int index) { stackOffset -= 2; variables[index].setType(Operand.LONG); @@ -416,9 +328,6 @@ currentBlock.add(new VariableRefAssignQuad<T>(address, currentBlock, index, stackOffset)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_fstore(int) - */ public void visit_fstore(int index) { stackOffset -= 1; variables[index].setType(Operand.FLOAT); @@ -426,9 +335,6 @@ currentBlock.add(new VariableRefAssignQuad<T>(address, currentBlock, index, stackOffset)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dstore(int) - */ public void visit_dstore(int index) { stackOffset -= 2; variables[index].setType(Operand.DOUBLE); @@ -436,9 +342,6 @@ currentBlock.add(new VariableRefAssignQuad<T>(address, currentBlock, index, stackOffset)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_astore(int) - */ public void visit_astore(int index) { stackOffset -= 1; variables[index].setType(Operand.REFERENCE); @@ -446,311 +349,182 @@ currentBlock.add(new VariableRefAssignQuad<T>(address, currentBlock, index, stackOffset)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_iastore() - */ public void visit_iastore() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_lastore() - */ public void visit_lastore() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_fastore() - */ public void visit_fastore() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dastore() - */ public void visit_dastore() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_aastore() - */ public void visit_aastore() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_bastore() - */ public void visit_bastore() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_castore() - */ public void visit_castore() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_sastore() - */ public void visit_sastore() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_pop() - */ public void visit_pop() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_pop2() - */ public void visit_pop2() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dup() - */ public void visit_dup() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dup_x1() - */ public void visit_dup_x1() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dup_x2() - */ public void visit_dup_x2() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dup2() - */ public void visit_dup2() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dup2_x1() - */ public void visit_dup2_x1() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dup2_x2() - */ public void visit_dup2_x2() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_swap() - */ public void visit_swap() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_iadd() - */ public void visit_iadd() { currentBlock.add(doBinaryQuad(IADD, Operand.INT)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ladd() - */ public void visit_ladd() { currentBlock.add(doBinaryQuad(LADD, Operand.LONG)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_fadd() - */ public void visit_fadd() { currentBlock.add(doBinaryQuad(FADD, Operand.FLOAT)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dadd() - */ public void visit_dadd() { currentBlock.add(doBinaryQuad(DADD, Operand.DOUBLE)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_isub() - */ public void visit_isub() { currentBlock.add(doBinaryQuad(ISUB, Operand.INT)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_lsub() - */ public void visit_lsub() { currentBlock.add(doBinaryQuad(LSUB, Operand.LONG)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_fsub() - */ public void visit_fsub() { currentBlock.add(doBinaryQuad(FSUB, Operand.FLOAT)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dsub() - */ public void visit_dsub() { currentBlock.add(doBinaryQuad(DSUB, Operand.DOUBLE)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_imul() - */ public void visit_imul() { currentBlock.add(doBinaryQuad(IMUL, Operand.INT)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_lmul() - */ public void visit_lmul() { currentBlock.add(doBinaryQuad(LMUL, Operand.LONG)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_fmul() - */ public void visit_fmul() { currentBlock.add(doBinaryQuad(FMUL, Operand.FLOAT)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dmul() - */ public void visit_dmul() { currentBlock.add(doBinaryQuad(DMUL, Operand.DOUBLE)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_idiv() - */ public void visit_idiv() { currentBlock.add(doBinaryQuad(IDIV, Operand.INT)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ldiv() - */ public void visit_ldiv() { currentBlock.add(doBinaryQuad(LDIV, Operand.LONG)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_fdiv() - */ public void visit_fdiv() { currentBlock.add(doBinaryQuad(FDIV, Operand.FLOAT)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ddiv() - */ public void visit_ddiv() { currentBlock.add(doBinaryQuad(DDIV, Operand.DOUBLE)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_irem() - */ public void visit_irem() { currentBlock.add(doBinaryQuad(IREM, Operand.INT)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_lrem() - */ public void visit_lrem() { currentBlock.add(doBinaryQuad(LREM, Operand.LONG)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_frem() - */ public void visit_frem() { currentBlock.add(doBinaryQuad(FREM, Operand.FLOAT)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_drem() - */ public void visit_drem() { currentBlock.add(doBinaryQuad(DREM, Operand.DOUBLE)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ineg() - */ public void visit_ineg() { int s1 = stackOffset - 1; variables[s1].setType(Operand.INT); currentBlock.add(new UnaryQuad<T>(address, currentBlock, s1, INEG, s1)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_lneg() - */ public void visit_lneg() { int s1 = stackOffset - 2; variables[s1].setType(Operand.LONG); currentBlock.add(new UnaryQuad<T>(address, currentBlock, s1, LNEG, s1)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_fneg() - */ public void visit_fneg() { int s1 = stackOffset - 1; variables[s1].setType(Operand.FLOAT); currentBlock.add(new UnaryQuad<T>(address, currentBlock, s1, FNEG, s1)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dneg() - */ public void visit_dneg() { int s1 = stackOffset - 2; variables[s1].setType(Operand.DOUBLE); currentBlock.add(new UnaryQuad<T>(address, currentBlock, s1, DNEG, s1)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ishl() - */ public void visit_ishl() { currentBlock.add(doBinaryQuad(ISHL, Operand.INT)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_lshl() - */ public void visit_lshl() { stackOffset -= 1; int s1 = stackOffset - 2; @@ -759,16 +533,10 @@ currentBlock.add(new BinaryQuad<T>(address, currentBlock, s1, s1, LSHL, stackOffset)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ishr() - */ public void visit_ishr() { currentBlock.add(doBinaryQuad(ISHR, Operand.INT)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_lshr() - */ public void visit_lshr() { stackOffset -= 1; int s1 = stackOffset - 2; @@ -777,16 +545,10 @@ currentBlock.add(new BinaryQuad<T>(address, currentBlock, s1, s1, LSHR, stackOffset)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_iushr() - */ public void visit_iushr() { currentBlock.add(doBinaryQuad(IUSHR, Operand.INT)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_lushr() - */ public void visit_lushr() { stackOffset -= 2; int s1 = stackOffset - 1; @@ -795,51 +557,30 @@ currentBlock.add(new BinaryQuad<T>(address, currentBlock, s1, s1, LUSHR, stackOffset)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_iand() - */ public void visit_iand() { currentBlock.add(doBinaryQuad(IAND, Operand.INT)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_land() - */ public void visit_land() { currentBlock.add(doBinaryQuad(LAND, Operand.LONG)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ior() - */ public void visit_ior() { currentBlock.add(doBinaryQuad(IOR, Operand.INT)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_lor() - */ public void visit_lor() { currentBlock.add(doBinaryQuad(LOR, Operand.LONG)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ixor() - */ public void visit_ixor() { currentBlock.add(doBinaryQuad(IXOR, Operand.INT)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_lxor() - */ public void visit_lxor() { currentBlock.add(doBinaryQuad(LXOR, Operand.LONG)); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_iinc(int, int) - */ public void visit_iinc(int index, int incValue) { variables[index].setType(Operand.INT); BinaryQuad<T> binaryQuad = @@ -847,9 +588,6 @@ currentBlock.add(binaryQuad.foldConstants()); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_i2l() - */ public void visit_i2l() { stackOffset -= 1; variables[stackOffset].setType(Operand.LONG); @@ -857,9 +595,6 @@ stackOffset += 2; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_i2f() - */ public void visit_i2f() { stackOffset -= 1; variables[stackOffset].setType(Operand.FLOAT); @@ -867,9 +602,6 @@ stackOffset += 1; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_i2d() - */ public void visit_i2d() { stackOffset -= 1; variables[stackOffset].setType(Operand.DOUBLE); @@ -877,9 +609,6 @@ stackOffset += 2; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_l2i() - */ public void visit_l2i() { stackOffset -= 2; variables[stackOffset].setType(Operand.INT); @@ -887,9 +616,6 @@ stackOffset += 1; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_l2f() - */ public void visit_l2f() { stackOffset -= 2; variables[stackOffset].setType(Operand.FLOAT); @@ -897,9 +623,6 @@ stackOffset += 1; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_l2d() - */ public void visit_l2d() { stackOffset -= 2; variables[stackOffset].setType(Operand.DOUBLE); @@ -907,9 +630,6 @@ stackOffset += 2; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_f2i() - */ public void visit_f2i() { stackOffset -= 1; variables[stackOffset].setType(Operand.INT); @@ -917,9 +637,6 @@ stackOffset += 1; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_f2l() - */ public void visit_f2l() { stackOffset -= 1; variables[stackOffset].setType(Operand.LONG); @@ -927,9 +644,6 @@ stackOffset += 2; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_f2d() - */ public void visit_f2d() { stackOffset -= 1; variables[stackOffset].setType(Operand.DOUBLE); @@ -937,9 +651,6 @@ stackOffset += 2; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_d2i() - */ public void visit_d2i() { stackOffset -= 2; variables[stackOffset].setType(Operand.INT); @@ -947,9 +658,6 @@ stackOffset += 1; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_d2l() - */ public void visit_d2l() { stackOffset -= 2; variables[stackOffset].setType(Operand.LONG); @@ -957,16 +665,10 @@ stackOffset += 2; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_d2f() - */ public void visit_d2f() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_i2b() - */ public void visit_i2b() { stackOffset -= 1; variables[stackOffset].setType(Operand.BYTE); @@ -974,9 +676,6 @@ stackOffset += 1; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_i2c() - */ public void visit_i2c() { stackOffset -= 1; variables[stackOffset].setType(Operand.CHAR); @@ -984,9 +683,6 @@ stackOffset += 1; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_i2s() - */ public void visit_i2s() { stackOffset -= 1; variables[stackOffset].setType(Operand.SHORT); @@ -994,44 +690,26 @@ stackOffset += 1; } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_lcmp() - */ public void visit_lcmp() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_fcmpl() - */ public void visit_fcmpl() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_fcmpg() - */ public void visit_fcmpg() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dcmpl() - */ public void visit_dcmpl() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dcmpg() - */ public void visit_dcmpg() { throw new IllegalArgumentException("byte code not yet supported"); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ifeq(int) - */ public void visit_ifeq(int address) { int s1 = stackOffset - 1; Variable[] variables = currentBlock.getVariables(); @@ -1042,9 +720,6 @@ setSuccessorStackOffset(); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ifne(int) - */ public void visit_ifne(int address) { int s1 = stackOffset - 1; Variable[] variables = currentBlock.getVariables(); @@ -1055,9 +730,6 @@ setSuccessorStackOffset(); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_iflt(int) - */ public void visit_iflt(int address) { int s1 = stackOffset - 1; Variable[] variables = currentBlock.getVariables(); @@ -1068,9 +740,6 @@ setSuccessorStackOffset(); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ifge(int) - */ public void visit_ifge(int address) { int s1 = stackOffset - 1; Variable[] variables = currentBlock.getVariables(); @@ -1081,9 +750,6 @@ setSuccessorStackOffset(); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ifgt(int) - */ public void visit_ifgt(int address) { int s1 = stackOffset - 1; Variable[] variables = currentBlock.getVariables(); @@ -1094,9 +760,6 @@ setSuccessorStackOffset(); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_ifle(int) - */ public void visit_ifle(int address) { int s1 = stackOffset - 1; Variable[] variables = currentBlock.getVariables(); @@ -1107,9 +770,6 @@ setSuccessorStackOffset(); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_if_icmpeq(int) - */ public void visit_if_icmpeq(int address) { int s1 = stackOffset - 2; int s2 = stackOffset - 1; @@ -1122,9 +782,6 @@ setSuccessorStackOffset(); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_if_icmpne(int) - */ public void visit_if_icmpne(int address) { int s1 = stackOffset - 2; int s2 = stackOffset - 1; @@ -1137,9 +794,6 @@ setSuccessorStackOffset(); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_if_icmplt(int) - */ public void visit_if_icmplt(int address) { int s1 = stackOffset - 2; int s2 = stackOffset - 1; @@ -1152,9 +806,6 @@ setSuccessorStackOffset(); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_if_icmpge(int) - */ public void visit_if_icmpge(int address) { int s1 = stackOffset - 2; int s2 = stackOffset - 1; @@ -1167,9 +818,6 @@ setSuccessorStackOffset(); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_if_icmpgt(int) - */ public void visit_if_icmpgt(int address) { int s1 = stackOffset - 2; int s2 = stackOffset - 1; @@ -1182,9 +830,6 @@ setSuccessorStackOffset(); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_if_icmple(int) - */ public void visit_if_icmple(int address) { int s1 = stackOffset - 2; int s2 = stackOffset - 1; @@ -1197,9 +842,6 @@ setSuccessorStackOffset(); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_if_acmpeq(int) - */ public void visit_if_acmpeq(int address) { int s1 = stackOffset - 2; int s2 = stackOffset - 1; @@ -1212,9 +854,6 @@ setSuccessorStackOffset(); } - /** - * @see org.jnode.vm.bytecode.BytecodeVisitor#visit_if_acmpne(int) - */ public void visit_if_acmpne(int address) { int s1 = stackOffset - 2; int s2 = stackOffset - 1; @@ -1227,223 +866,133 @@ setSuccessorStackOffset(); } - /** - * @see org.jnode.vm.bytecode.BytecodeV... [truncated message content] |
From: <cr...@us...> - 2009-03-23 12:46:30
|
Revision: 5145 http://jnode.svn.sourceforge.net/jnode/?rev=5145&view=rev Author: crawley Date: 2009-03-23 12:46:23 +0000 (Mon, 23 Mar 2009) Log Message: ----------- Javadoc fixes Modified Paths: -------------- trunk/core/src/core/org/jnode/vm/performance/PerformanceCounterEvent.java trunk/core/src/core/org/jnode/vm/performance/PerformanceCounters.java trunk/core/src/core/org/jnode/vm/scheduler/SpinLock.java trunk/core/src/core/org/jnode/vm/scheduler/VmProcessor.java trunk/core/src/core/org/jnode/vm/scheduler/VmThread.java trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture32.java trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture64.java trunk/core/src/core/org/jnode/vm/x86/VmX86Processor.java trunk/core/src/core/org/jnode/vm/x86/VmX86Thread.java trunk/core/src/core/org/jnode/vm/x86/X86Cpu.java trunk/core/src/core/org/jnode/vm/x86/X86CpuID.java trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86Compiler.java trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86StackManager.java trunk/core/src/core/org/jnode/vm/x86/compiler/X86CompilerHelper.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/DoubleItem.java trunk/core/src/core/org/jnode/vm/x86/compiler/l2/GenericX86CodeGenerator.java trunk/core/src/core/org/jnode/vm/x86/compiler/l2/X86RegisterPool.java trunk/core/src/core/org/jnode/vm/x86/compiler/stub/X86StubCompiler.java Modified: trunk/core/src/core/org/jnode/vm/performance/PerformanceCounterEvent.java =================================================================== --- trunk/core/src/core/org/jnode/vm/performance/PerformanceCounterEvent.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/performance/PerformanceCounterEvent.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -35,7 +35,7 @@ /** * Initialize this instance. * - * @param id + * @param preset */ protected PerformanceCounterEvent(PresetEvent preset) { this(preset.name(), preset.getDescription()); @@ -63,15 +63,12 @@ /** * Gets the language independent identifier of this event. * - * @return + * @return the event id */ public final String getId() { return id; } - /** - * @see java.lang.Object#equals(java.lang.Object) - */ public boolean equals(Object obj) { if (obj == this) { return true; @@ -81,23 +78,14 @@ return false; } - /** - * @see java.lang.Object#hashCode() - */ public int hashCode() { return id.hashCode(); } - /** - * @see java.lang.Object#toString() - */ public String toString() { return id; } - /** - * @see java.lang.Comparable#compareTo(T) - */ public int compareTo(PerformanceCounterEvent o) { return id.compareTo(o.id); } Modified: trunk/core/src/core/org/jnode/vm/performance/PerformanceCounters.java =================================================================== --- trunk/core/src/core/org/jnode/vm/performance/PerformanceCounters.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/performance/PerformanceCounters.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -31,23 +31,23 @@ * Gets all performance counter events that are available on the * current processor. * - * @return + * @return a set of events */ public abstract Set<PerformanceCounterEvent> getAvailableEvents(); /** * Gets the performance counter event with the given id, if that is - * available on thecurrent processor. + * available on the current processor. * - * @return The event, or null if not found. + * @return The event, or {@code null} if not found. */ public abstract PerformanceCounterEvent getAvailableEvent(String id); /** * Gets the performance counter event with the given id, if that is - * available on thecurrent processor. + * available on the current processor. * - * @return The event, or null if not found. + * @return The event, or {@code null} if not found. */ public final PerformanceCounterEvent getAvailableEvent(PresetEvent preset) { return getAvailableEvent(preset.name()); @@ -57,7 +57,7 @@ * Gets the number of performance counters that are available on the * current processor. * - * @return + * @return the number of available counters */ public abstract int getMaximumCounters(); Modified: trunk/core/src/core/org/jnode/vm/scheduler/SpinLock.java =================================================================== --- trunk/core/src/core/org/jnode/vm/scheduler/SpinLock.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/scheduler/SpinLock.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -40,6 +40,7 @@ * Lock counter. THIS FIELD MUST BE AT OFFSET 0!! */ private int lockCount; + /** * Owner used for deadlock detection */ @@ -88,7 +89,7 @@ /** * Is this lock locked. * - * @return + * @return {@code true} if the lock is locked, otherwise {@code false}. */ @Inline @Uninterruptible Modified: trunk/core/src/core/org/jnode/vm/scheduler/VmProcessor.java =================================================================== --- trunk/core/src/core/org/jnode/vm/scheduler/VmProcessor.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/scheduler/VmProcessor.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -301,7 +301,7 @@ * Create an ID string for the given id * * @param id - * @return + * @return the ID string */ protected String formatId(int id) { return "0x" + NumberUtils.hex(id, 2); @@ -643,7 +643,7 @@ /** * Gets the processor speed indication. * - * @return + * @return the notional processor speed. */ public final float getJNodeMips() { return jnodeMips; @@ -679,7 +679,7 @@ * Gets the GC map iterator for the given native code compiler. * * @param compiler - * @return + * @return the iterator */ @Inline public final GCMapIterator getGCMapIterator(NativeCodeCompiler compiler) { @@ -703,7 +703,7 @@ /** * Gets the performance counter accessor of this processor. * - * @return + * @return the accessor. */ public abstract PerformanceCounters getPerformanceCounters(); Modified: trunk/core/src/core/org/jnode/vm/scheduler/VmThread.java =================================================================== --- trunk/core/src/core/org/jnode/vm/scheduler/VmThread.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/scheduler/VmThread.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -724,7 +724,7 @@ /** * Gets the state of this thread. * - * @return + * @return the thread state value */ @KernelSpace final int getThreadState() { @@ -734,7 +734,8 @@ /** * Gets the thread this thread is waiting for (or null). * - * @return + * @return the VmThread for the thread that this one is + * waiting for, or {@code null}. */ @KernelSpace final VmThread getWaitForThread() { @@ -745,7 +746,7 @@ /** * Gets a human readable name for the current thread state. * - * @return + * @return the thread state name */ @KernelSpace @Uninterruptible @@ -869,14 +870,14 @@ } /** - * @return int + * @return The thread's priority. */ public final int getPriority() { return priority; } /** - * Sets the priority. + * Sets the thread's priority. * * @param priority The priority to set */ @@ -938,7 +939,7 @@ /** * Gets the name of this thread. * - * @return + * @return the name of this thread. */ @KernelSpace public final String getName() { @@ -955,7 +956,7 @@ } /** - * @return + * @return {@code true} if the stack has overflowed. */ boolean isStackOverflow() { return this.stackOverflow; @@ -1192,7 +1193,7 @@ } /** - * @param isolate + * @param isolatedStatics */ public final void switchToIsolate(VmIsolatedStatics isolatedStatics) { final VmProcessor proc = VmMagic.currentProcessor(); @@ -1207,8 +1208,8 @@ * * @param visitor * @param heapManager - * @return true if the last visit returned true or no visit was made, false - * otherwise. + * @return {@code true} if the last visit returned {@code true} or no visit was + * made, {@code false} otherwise. */ public abstract boolean visit(ObjectVisitor visitor, VmHeapManager heapManager); Modified: trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -192,9 +192,9 @@ } /** - * Gets the operating mode. + * Gets the current operating mode; i.e. 32 or 64 bit mode. * - * @return + * @return mode */ public final X86Constants.Mode getMode() { if (getReferenceSize() == 4) { @@ -348,9 +348,6 @@ VmSharedStatics sharedStatics, VmIsolatedStatics isolatedStatics, VmScheduler scheduler); - /** - * @see org.jnode.vm.VmArchitecture#createIRQManager() - */ @Override @Internal public final IRQManager createIRQManager(VmProcessor processor) { Modified: trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture32.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture32.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture32.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -143,27 +143,14 @@ return new VmX86Processor32(id, this, sharedStatics, isolatedStatics, scheduler, null); } - /** - * Gets the compiler of IMT's. - * - * @return The IMT compiler - */ public final IMTCompiler getIMTCompiler() { return imtCompiler; } - /** - * Gets the type size information of this architecture. - * - * @return - */ public final TypeSizeInfo getTypeSizeInfo() { return typeSizeInfo; } - /** - * @see org.jnode.vm.VmArchitecture#getLogPageSize() - */ public final byte getLogPageSize(int region) { switch (region) { case VirtualMemoryRegion.AVAILABLE: @@ -179,9 +166,6 @@ } } - /** - * @see org.jnode.vm.VmArchitecture#getEnd(org.jnode.vm.VmArchitecture.VirtualMemoryRegion) - */ public Address getEnd(int space) { switch (space) { case VirtualMemoryRegion.HEAP: @@ -197,9 +181,6 @@ } } - /** - * @see org.jnode.vm.VmArchitecture#getStart(org.jnode.vm.VmArchitecture.VirtualMemoryRegion) - */ public Address getStart(int space) { switch (space) { case VirtualMemoryRegion.HEAP: @@ -344,9 +325,6 @@ } - /** - * @see org.jnode.vm.VmArchitecture#boot() - */ protected void boot(boolean emptyMMap) { Unsafe.debug("VmArchitecture32#boot\n"); dumpMultibootMMap(); Modified: trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture64.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture64.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/x86/VmX86Architecture64.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -104,41 +104,23 @@ this.typeSizeInfo = new TypeSizeInfo(1, 1, 2, 2, 1); } - /** - * @see org.jnode.vm.VmArchitecture#createProcessor(int, - * org.jnode.vm.classmgr.VmStatics) - */ public final VmProcessor createProcessor(int id, VmSharedStatics sharedStatics, VmIsolatedStatics isolatedStatics, VmScheduler scheduler) { return new VmX86Processor64(id, this, sharedStatics, isolatedStatics, scheduler, null); } - /** - * @see org.jnode.vm.VmArchitecture#getIMTCompiler() - */ public final IMTCompiler getIMTCompiler() { return imtCompiler; } - /** - * Gets the type size information of this architecture. - * - * @return - */ public final TypeSizeInfo getTypeSizeInfo() { return typeSizeInfo; } - /** - * @see org.jnode.vm.VmArchitecture#getLogPageSize() - */ public final byte getLogPageSize(int region) { return 22; // 4Mb } - /** - * @see org.jnode.vm.VmArchitecture#getEnd(org.jnode.vm.VmArchitecture.VirtualMemoryRegion) - */ public Address getEnd(int space) { switch (space) { case VirtualMemoryRegion.HEAP: @@ -154,9 +136,6 @@ } } - /** - * @see org.jnode.vm.VmArchitecture#getStart(org.jnode.vm.VmArchitecture.VirtualMemoryRegion) - */ public Address getStart(int space) { switch (space) { case VirtualMemoryRegion.HEAP: @@ -176,7 +155,7 @@ * Map a region of the virtual memory space. Note that you cannot allocate * memory in this memory, because it is used very early in the boot process. * - * @param region Memory region + * @param space Memory region * @param start The start of the virtual memory region to map * @param size The size of the virtual memory region to map * @param physAddr The physical address to map the virtual address to. If this is @@ -185,6 +164,7 @@ */ public final boolean mmap(int space, Address start, Extent size, Address physAddr) throws UninterruptiblePragma { + // FIXME ... unimplemented if (space != VirtualMemoryRegion.HEAP) { return false; } @@ -196,21 +176,19 @@ * Unmap a region of the virtual memory space. Note that you cannot allocate * memory in this memory, because it is used very early in the boot process. * - * @param region Memory region + * @param space Memory region * @param start The start of the virtual memory region to unmap. This value is * aligned down on pagesize. * @param size The size of the virtual memory region to unmap. This value is * aligned up on pagesize. * @return true for success, false otherwise. */ - public boolean munmap(int region, Address start, Extent size) + public boolean munmap(int space, Address start, Extent size) throws UninterruptiblePragma { + // FIXME ... unimplemented return false; } - /** - * @see org.jnode.vm.VmArchitecture#boot() - */ protected void boot(boolean emptyMMap) { dumpMultibootMMap(); } Modified: trunk/core/src/core/org/jnode/vm/x86/VmX86Processor.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/VmX86Processor.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/x86/VmX86Processor.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -372,7 +372,7 @@ /** * Gets the performance counter accessor of this processor. * - * @return + * @return the accessor object */ public final PerformanceCounters getPerformanceCounters() { if (perfCounters == null) { Modified: trunk/core/src/core/org/jnode/vm/x86/VmX86Thread.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/VmX86Thread.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/x86/VmX86Thread.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -268,7 +268,7 @@ /** * Gets the end address of the stack of this thread. * - * @return + * @return the stack end address */ final Address getStackEnd() { return stackEnd; Modified: trunk/core/src/core/org/jnode/vm/x86/X86Cpu.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/X86Cpu.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/x86/X86Cpu.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -63,10 +63,10 @@ } /** - * Get by CPUID + * Get the CPU type for the CPU with the given 'id'. * * @param id - * @return + * @return the CPU, or {@link #UNKNOWN} the 'id' is not known. */ public static final X86Cpu find(X86CpuID id) { final String vendor = id.getVendor(); Modified: trunk/core/src/core/org/jnode/vm/x86/X86CpuID.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/X86CpuID.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/x86/X86CpuID.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -162,16 +162,16 @@ /** * Is this the id of an Intel CPU. * - * @return + * @return {@code true} for an Intel CPU, otherwise {@code false} */ public boolean isIntel() { return getVendor().equals(X86Vendor.INTEL.getId()); } /** - * Is this the id of an Intel CPU. + * Is this the id of an AMD CPU. * - * @return + * @return {@code true} for an AMD CPU, otherwise {@code false} */ public boolean isAMD() { return getVendor().equals(X86Vendor.AMD.getId()); @@ -242,7 +242,7 @@ * Calculate the physical package id for the given APIC id. * * @param apicId - * @return + * @return the physical package id. */ public final int getPhysicalPackageId(int apicId) { int index_lsb = 0; Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86Compiler.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86Compiler.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86Compiler.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -75,9 +75,6 @@ } } - /** - * @see org.jnode.vm.compiler.NativeCodeCompiler#createNativeStream(org.jnode.assembler.ObjectResolver) - */ public NativeStream createNativeStream(ObjectResolver resolver) { X86BinaryAssembler os; os = (X86BinaryAssembler) nativeStreamHolder.get(); @@ -90,10 +87,6 @@ return os; } - /** - * @see org.jnode.vm.compiler.NativeCodeCompiler#doCompileAbstract(org.jnode.vm.classmgr.VmMethod, - * org.jnode.assembler.NativeStream, int, boolean) - */ @PrivilegedActionPragma protected final CompiledMethod doCompileAbstract(VmMethod method, NativeStream nos, int level, boolean isBootstrap) { @@ -141,7 +134,7 @@ /** * Gets the operating mode. * - * @return + * @return the x86 operating mode that we are compiling for; i.e. 32 or 64 bit. */ protected final X86Constants.Mode getMode() { return mode; @@ -170,16 +163,13 @@ } } - /** - * @see org.jnode.vm.compiler.NativeCodeCompiler#dumpStatistics() - */ public void dumpStatistics() { } /** * Gets the type size information. * - * @return + * @return the type size info descriptor */ public final TypeSizeInfo getTypeSizeInfo() { return typeSizeInfo; Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86StackManager.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86StackManager.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86StackManager.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -21,6 +21,7 @@ package org.jnode.vm.x86.compiler; import org.jnode.assembler.x86.X86Register; +import org.jnode.vm.JvmType; /** * @author Ewout Prangsma (ep...@us...) Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/X86CompilerHelper.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/X86CompilerHelper.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/X86CompilerHelper.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -183,7 +183,7 @@ /** * Sets the current label prefix. * - * @param method + * @param prefix */ public final void setLabelPrefix(String prefix) { this.labelPrefix = prefix; @@ -333,9 +333,7 @@ /** * Write class initialization code * - * @param method - * @param methodReg Register that holds the method reference before this method is - * called. + * @param method the method reference * @return true if code was written, false otherwise */ public final boolean writeClassInitialize(VmMethod method) { @@ -491,7 +489,7 @@ * * @param method */ - public final void writeStackOverflowTest(VmMethod method_) { + public final void writeStackOverflowTest(VmMethod method) { // cmp esp,STACKEND // jg vm_invoke_testStackOverflowDone // vm_invoke_testStackOverflow: Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/DoubleWordItem.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -129,7 +129,7 @@ /** * Create a clone of this item, which must be a constant. * - * @return + * @return the clone */ protected abstract DoubleWordItem cloneConstant(EmitterContext ec); @@ -148,7 +148,7 @@ * Gets the offset from the LSB part of this item to the FramePointer * register. This is only valid if this item has a LOCAL kind. * - * @return + * @return the offset */ final int getLsbOffsetToFP(EmitterContext ec) { return super.getOffsetToFP(ec); @@ -157,7 +157,7 @@ /** * Gets the register holding the LSB part of this item in 32-bit mode. * - * @return + * @return the register */ final X86Register.GPR getLsbRegister(EmitterContext ec) { if (!ec.getStream().isCode32()) { @@ -174,7 +174,7 @@ * Gets the offset from the MSB part of this item to the FramePointer * register. This is only valid if this item has a LOCAL kind. * - * @return + * @return the offset */ final int getMsbOffsetToFP(EmitterContext ec) { return super.getOffsetToFP(ec) + 4; @@ -183,7 +183,7 @@ /** * Gets the register holding the MSB part of this item in 32-bit mode. * - * @return + * @return the register */ final X86Register.GPR getMsbRegister(EmitterContext ec) { if (!ec.getStream().isCode32()) { @@ -199,7 +199,7 @@ /** * Gets the register holding this item in 64-bit mode. * - * @return + * @return the register */ final X86Register.GPR64 getRegister(EmitterContext ec) { if (!ec.getStream().isCode64()) { @@ -228,9 +228,6 @@ } } - /** - * @see org.jnode.vm.x86.compiler.l1a.Item#load(EmitterContext) - */ final void load(EmitterContext ec) { if (!isGPR()) { final X86RegisterPool pool = ec.getGPRPool(); Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/DoubleItem.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/DoubleItem.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1b/DoubleItem.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -73,7 +73,7 @@ /** * Gets the constant value. * - * @return + * @return the value */ final double getValue() { if (Vm.VerifyAssertions) { Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l2/GenericX86CodeGenerator.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l2/GenericX86CodeGenerator.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l2/GenericX86CodeGenerator.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -101,24 +101,14 @@ return l; } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#getRegisterPool() - */ public RegisterPool<T> getRegisterPool() { return registerPool; } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#supports3AddrOps() - */ public boolean supports3AddrOps() { return false; } - /** - * @param vars - * @param nArgs - */ public void setArgumentVariables(Variable<T>[] vars, int nArgs) { displacement = 0; for (int i = 0; i < nArgs; i += 1) { @@ -130,9 +120,6 @@ displacement += 8; } - /** - * @param variables - */ public void setSpilledVariables(Variable<T>[] variables) { this.spilledVariables = variables; int n = spilledVariables.length; @@ -157,9 +144,6 @@ } } - /** - * - */ public void emitHeader() { os.writePUSH(X86Register.EBP); // os.writePUSH(context.getMagic()); @@ -169,16 +153,10 @@ os.writeMOV(X86Constants.BITS32, X86Register.EBP, X86Register.ESP); } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateCodeFor(org.jnode.vm.compiler.ir.quad.ConditionalBranchQuad) - */ public void generateCodeFor(ConditionalBranchQuad<T> quad) { throw new IllegalArgumentException("Unknown operation"); } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateCodeFor(org.jnode.vm.compiler.ir.quad.ConstantRefAssignQuad) - */ public void generateCodeFor(ConstantRefAssignQuad<T> quad) { Variable<T> lhs = quad.getLHS(); if (lhs.getAddressingMode() == REGISTER) { @@ -208,18 +186,11 @@ prev_addr = address; } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator - * #generateCodeFor(org.jnode.vm.compiler.ir.quad.UnconditionalBranchQuad) - */ public void generateCodeFor(UnconditionalBranchQuad<T> quad) { checkLabel(quad.getAddress()); os.writeJMP(getInstrLabel(quad.getTargetAddress())); } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateCodeFor(org.jnode.vm.compiler.ir.quad.VariableRefAssignQuad) - */ public void generateCodeFor(VariableRefAssignQuad<T> quad) { Variable<T> lhs = quad.getLHS(); if (lhs.getAddressingMode() == REGISTER) { @@ -261,9 +232,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateCodeFor(org.jnode.vm.compiler.ir.quad.VarReturnQuad) - */ public void generateCodeFor(VarReturnQuad<T> quad) { checkLabel(quad.getAddress()); Operand<T> op = quad.getOperand(); @@ -294,9 +262,6 @@ os.writeRET(); } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateCodeFor(org.jnode.vm.compiler.ir.quad.VoidReturnQuad) - */ public void generateCodeFor(VoidReturnQuad<T> quad) { checkLabel(quad.getAddress()); @@ -307,19 +272,11 @@ os.writeRET(); } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateCodeFor(org.jnode.vm.compiler.ir.quad.UnaryQuad, - * java.lang.Object, int, org.jnode.vm.compiler.ir.Constant) - */ public void generateCodeFor(UnaryQuad<T> quad, Object lhsReg, UnaryOperation operation, Constant<T> con) { throw new IllegalArgumentException("Constants should be folded"); } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateCodeFor(org.jnode.vm.compiler.ir.quad.UnaryQuad, - * java.lang.Object, int, java.lang.Object) - */ public void generateCodeFor(UnaryQuad<T> quad, Object lhsReg, UnaryOperation operation, Object rhsReg) { checkLabel(quad.getAddress()); @@ -390,10 +347,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateCodeFor(org.jnode.vm.compiler.ir.quad.UnaryQuad, - * java.lang.Object, int, int) - */ public void generateCodeFor(UnaryQuad<T> quad, Object lhsReg, UnaryOperation operation, int rhsDisp) { checkLabel(quad.getAddress()); @@ -463,10 +416,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateCodeFor(org.jnode.vm.compiler.ir.quad.UnaryQuad, - * int, int, java.lang.Object) - */ public void generateCodeFor(UnaryQuad<T> quad, int lhsDisp, UnaryOperation operation, Object rhsReg) { checkLabel(quad.getAddress()); @@ -543,10 +492,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateCodeFor(org.jnode.vm.compiler.ir.quad.UnaryQuad, - * int, int, int) - */ public void generateCodeFor(UnaryQuad<T> quad, int lhsDisp, UnaryOperation operation, int rhsDisp) { checkLabel(quad.getAddress()); @@ -621,29 +566,16 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateCodeFor(org.jnode.vm.compiler.ir.quad.UnaryQuad, - * int, int, org.jnode.vm.compiler.ir.Constant) - */ public void generateCodeFor(UnaryQuad<T> quad, int lhsDisp, UnaryOperation operation, Constant<T> con) { throw new IllegalArgumentException("Constants should be folded"); } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(java.lang.Object, - * org.jnode.vm.compiler.ir.Constant, int, - * org.jnode.vm.compiler.ir.Constant) - */ public void generateBinaryOP(T reg1, Constant<T> c2, BinaryOperation operation, Constant<T> c3) { throw new IllegalArgumentException("Constants should be folded"); } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(java.lang.Object, - * org.jnode.vm.compiler.ir.Constant, int, java.lang.Object) - */ public void generateBinaryOP(T reg1, Constant<T> c2, BinaryOperation operation, T reg3) { IntConstant<T> iconst2 = (IntConstant<T>) c2; @@ -837,10 +769,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(java.lang.Object, - * org.jnode.vm.compiler.ir.Constant<T>, int, int) - */ public void generateBinaryOP(T reg1, Constant<T> c2, BinaryOperation operation, int disp3) { IntConstant<T> iconst2 = (IntConstant<T>) c2; @@ -1010,10 +938,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(java.lang.Object, - * java.lang.Object, int, org.jnode.vm.compiler.ir.Constant<T>) - */ public void generateBinaryOP(T reg1, T reg2, BinaryOperation operation, Constant<T> c3) { IntConstant<T> iconst3 = (IntConstant<T>) c3; @@ -1199,10 +1123,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(java.lang.Object, - * java.lang.Object, int, java.lang.Object) - */ public void generateBinaryOP(T reg1, T reg2, BinaryOperation operation, T reg3) { @@ -1420,10 +1340,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(java.lang.Object, - * java.lang.Object, int, int) - */ public void generateBinaryOP(T reg1, T reg2, BinaryOperation operation, int disp3) { switch (operation) { @@ -1614,10 +1530,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(java.lang.Object, - * int, int, org.jnode.vm.compiler.ir.Constant<T>) - */ public void generateBinaryOP(T reg1, int disp2, BinaryOperation operation, Constant<T> c3) { IntConstant<T> iconst3 = (IntConstant<T>) c3; @@ -1797,10 +1709,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(java.lang.Object, - * int, int, java.lang.Object) - */ public void generateBinaryOP(T reg1, int disp2, BinaryOperation operation, T reg3) { switch (operation) { @@ -2009,10 +1917,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(java.lang.Object, - * int, int, int) - */ public void generateBinaryOP(T reg1, int disp2, BinaryOperation operation, int disp3) { switch (operation) { @@ -2201,20 +2105,11 @@ } // / WE should not get to this method - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(int, - * org.jnode.vm.compiler.ir.Constant<T>, int, - * org.jnode.vm.compiler.ir.Constant<T>) - */ public void generateBinaryOP(int disp1, Constant<T> c2, BinaryOperation operation, Constant<T> c3) { throw new IllegalArgumentException("Constants should be folded"); } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(int, - * org.jnode.vm.compiler.ir.Constant<T>, int, java.lang.Object) - */ public void generateBinaryOP(int disp1, Constant<T> c2, BinaryOperation operation, T reg3) { IntConstant<T> iconst2 = (IntConstant<T>) c2; @@ -2413,10 +2308,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(int, - * org.jnode.vm.compiler.ir.Constant<T>, int, int) - */ public void generateBinaryOP(int disp1, Constant<T> c2, BinaryOperation operation, int disp3) { IntConstant<T> iconst2 = (IntConstant<T>) c2; @@ -2587,10 +2478,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(int, - * java.lang.Object, int, org.jnode.vm.compiler.ir.Constant<T>) - */ public void generateBinaryOP(int disp1, T reg2, BinaryOperation operation, Constant<T> c3) { IntConstant<T> iconst3 = (IntConstant<T>) c3; @@ -2773,10 +2660,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(int, - * java.lang.Object, int, java.lang.Object) - */ public void generateBinaryOP(int disp1, T reg2, BinaryOperation operation, T reg3) { switch (operation) { @@ -2991,10 +2874,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(int, - * java.lang.Object, int, int) - */ public void generateBinaryOP(int disp1, T reg2, BinaryOperation operation, int disp3) { switch (operation) { @@ -3183,10 +3062,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(int, int, - * int, org.jnode.vm.compiler.ir.Constant<T>) - */ public void generateBinaryOP(int disp1, int disp2, BinaryOperation operation, Constant<T> c3) { IntConstant<T> iconst3 = (IntConstant<T>) c3; @@ -3357,10 +3232,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(int, int, - * int, java.lang.Object) - */ public void generateBinaryOP(int disp1, int disp2, BinaryOperation operation, T reg3) { switch (operation) { @@ -3566,10 +3437,6 @@ } } - /** - * @see org.jnode.vm.compiler.ir.CodeGenerator#generateBinaryOP(int, int, - * int, int) - */ public void generateBinaryOP(int disp1, int disp2, BinaryOperation operation, int disp3) { switch (operation) { @@ -3764,11 +3631,7 @@ } /** ******** BRANCHES ************************************** */ - /** - * @param quad - * @param condition - * @param reg - */ + public void generateCodeFor(ConditionalBranchQuad<T> quad, BranchCondition condition, Object reg) { checkLabel(quad.getAddress()); @@ -3776,11 +3639,6 @@ generateJumpForUnaryCondition(quad, condition); } - /** - * @param quad - * @param condition - * @param disp - */ public void generateCodeFor(ConditionalBranchQuad<T> quad, BranchCondition condition, int disp) { checkLabel(quad.getAddress()); @@ -3840,11 +3698,6 @@ } } - /** - * @param quad - * @param condition - * @param cons - */ public void generateCodeFor(ConditionalBranchQuad<T> quad, BranchCondition condition, Constant<T> cons) { switch (condition) { @@ -3861,12 +3714,6 @@ } } - /** - * @param quad - * @param c1 - * @param condition - * @param c2 - */ public void generateCodeFor(ConditionalBranchQuad<T> quad, Constant<T> c1, BranchCondition condition, Constant<T> c2) { switch (condition) { @@ -3883,12 +3730,6 @@ } } - /** - * @param quad - * @param c1 - * @param condition - * @param disp2 - */ public void generateCodeFor(ConditionalBranchQuad<T> quad, Constant<T> c1, BranchCondition condition, int disp2) { switch (condition) { @@ -3905,12 +3746,6 @@ } } - /** - * @param quad - * @param c1 - * @param condition - * @param reg2 - */ public void generateCodeFor(ConditionalBranchQuad<T> quad, Constant<T> c1, BranchCondition condition, Object reg2) { switch (condition) { @@ -3927,12 +3762,6 @@ } } - /** - * @param quad - * @param disp1 - * @param condition - * @param c2 - */ public void generateCodeFor(ConditionalBranchQuad<T> quad, int disp1, BranchCondition condition, Constant<T> c2) { checkLabel(quad.getAddress()); @@ -3941,12 +3770,6 @@ generateJumpForBinaryCondition(quad, condition); } - /** - * @param quad - * @param disp1 - * @param condition - * @param disp2 - */ public void generateCodeFor(ConditionalBranchQuad<T> quad, int disp1, BranchCondition condition, int disp2) { switch (condition) { @@ -3963,12 +3786,6 @@ } } - /** - * @param quad - * @param disp1 - * @param condition - * @param reg2 - */ public void generateCodeFor(ConditionalBranchQuad<T> quad, int disp1, BranchCondition condition, Object reg2) { checkLabel(quad.getAddress()); @@ -3976,12 +3793,6 @@ generateJumpForBinaryCondition(quad, condition); } - /** - * @param quad - * @param reg1 - * @param condition - * @param c2 - */ public void generateCodeFor(ConditionalBranchQuad<T> quad, Object reg1, BranchCondition condition, Constant<T> c2) { checkLabel(quad.getAddress()); @@ -3989,12 +3800,6 @@ generateJumpForBinaryCondition(quad, condition); } - /** - * @param quad - * @param reg1 - * @param condition - * @param disp2 - */ public void generateCodeFor(ConditionalBranchQuad<T> quad, Object reg1, BranchCondition condition, int disp2) { checkLabel(quad.getAddress()); @@ -4002,12 +3807,6 @@ generateJumpForBinaryCondition(quad, condition); } - /** - * @param quad - * @param reg1 - * @param condition - * @param reg2 - */ public void generateCodeFor(ConditionalBranchQuad<T> quad, Object reg1, BranchCondition condition, Object reg2) { checkLabel(quad.getAddress()); @@ -4019,8 +3818,7 @@ BranchCondition condition) { switch (condition) { case IF_ICMPEQ: - os - .writeJCC(getInstrLabel(quad.getTargetAddress()), + os.writeJCC(getInstrLabel(quad.getTargetAddress()), X86Constants.JE); break; @@ -4030,8 +3828,7 @@ break; case IF_ICMPGT: - os - .writeJCC(getInstrLabel(quad.getTargetAddress()), + os.writeJCC(getInstrLabel(quad.getTargetAddress()), X86Constants.JG); break; @@ -4041,8 +3838,7 @@ break; case IF_ICMPLT: - os - .writeJCC(getInstrLabel(quad.getTargetAddress()), + os.writeJCC(getInstrLabel(quad.getTargetAddress()), X86Constants.JL); break; @@ -4052,8 +3848,7 @@ break; case IF_ACMPEQ: - os - .writeJCC(getInstrLabel(quad.getTargetAddress()), + os.writeJCC(getInstrLabel(quad.getTargetAddress()), X86Constants.JE); break; Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l2/X86RegisterPool.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l2/X86RegisterPool.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l2/X86RegisterPool.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -44,9 +44,6 @@ // // not sure what to do with ESI and EDI just yet... } - /** - * @see org.jnode.vm.compiler.ir.RegisterPool#request(int) - */ public X86Register request(int type) { if (type == Operand.LONG) { return null; @@ -64,16 +61,10 @@ } } - /** - * @see org.jnode.vm.compiler.ir.RegisterPool#release(java.lang.Object) - */ public void release(X86Register register) { registers.add(register); } - /** - * @see org.jnode.vm.compiler.ir.RegisterPool#supports3AddrOps() - */ public boolean supports3AddrOps() { return false; } Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/stub/X86StubCompiler.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/stub/X86StubCompiler.java 2009-03-23 09:49:28 UTC (rev 5144) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/stub/X86StubCompiler.java 2009-03-23 12:46:23 UTC (rev 5145) @@ -118,9 +118,6 @@ return os; } - /** - * @see org.jnode.vm.compiler.NativeCodeCompiler#getMagic() - */ public final int getMagic() { return STUB_COMPILER_MAGIC; } @@ -128,23 +125,17 @@ /** * Gets the name of this compiler. * - * @return + * @return the compiler name */ public String getName() { return "X86-Stub"; } - /** - * @see org.jnode.vm.compiler.NativeCodeCompiler#createGCMapIterator() - */ @Override public GCMapIterator createGCMapIterator() { return new EmptyGCMapIterator(); } - /** - * @see org.jnode.vm.compiler.NativeCodeCompiler#getCompilerPackages() - */ @Override public String[] getCompilerPackages() { return new String[]{"org.jnode.vm.x86.compiler", "org.jnode.vm.x86.compiler.stub"}; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cr...@us...> - 2009-08-26 11:52:52
|
Revision: 5663 http://jnode.svn.sourceforge.net/jnode/?rev=5663&view=rev Author: crawley Date: 2009-08-26 11:52:35 +0000 (Wed, 26 Aug 2009) Log Message: ----------- Removed some dead code and fixed a misleading javadoc comment about how VmProcess.reschedule() gets called. Modified Paths: -------------- trunk/core/src/core/org/jnode/vm/compiler/EntryPoints.java trunk/core/src/core/org/jnode/vm/scheduler/VmProcessor.java Modified: trunk/core/src/core/org/jnode/vm/compiler/EntryPoints.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/EntryPoints.java 2009-08-24 18:49:03 UTC (rev 5662) +++ trunk/core/src/core/org/jnode/vm/compiler/EntryPoints.java 2009-08-26 11:52:35 UTC (rev 5663) @@ -120,8 +120,6 @@ private final VmWriteBarrier writeBarrier; - private final VmMethod yieldPoint; - private final VmMethod recompileMethod; private final int magic; @@ -243,7 +241,6 @@ "org.jnode.vm.scheduler.VmProcessor", true); vmThreadSwitchIndicatorOffset = ((VmInstanceField) testField(processorClass.getField("threadSwitchIndicator"))).getOffset(); - yieldPoint = testMethod(processorClass.getMethod("yieldPoint", "()V")); vmProcessorMeField = (VmInstanceField) testField(processorClass.getField("me")); vmProcessorStackEnd = (VmInstanceField) testField(processorClass .getField("stackEnd")); @@ -629,14 +626,6 @@ } /** - * @return Returns the yieldPoint. - * @see org.jnode.vm.scheduler.VmProcessor#yieldPoint() - */ - public final VmMethod getYieldPoint() { - return yieldPoint; - } - - /** * @return Returns the recompileMethod. * @see VmMethod#recompileMethod(int, int) */ Modified: trunk/core/src/core/org/jnode/vm/scheduler/VmProcessor.java =================================================================== --- trunk/core/src/core/org/jnode/vm/scheduler/VmProcessor.java 2009-08-24 18:49:03 UTC (rev 5662) +++ trunk/core/src/core/org/jnode/vm/scheduler/VmProcessor.java 2009-08-26 11:52:35 UTC (rev 5663) @@ -349,14 +349,6 @@ } /** - * This method is called by the generated yieldpoints if a threadswitch is - * requested. - */ - final void yieldPoint() { - - } - - /** * Is this processor busy switching threads. * * @return true or false @@ -419,8 +411,8 @@ } /** - * This method is called by the timer interrupt with interrupts disabled. - * Keep this method as short and as fast as possible! + * This method is called by the "yieldpoint" interrupt handler (see "vm-ints.asm") + * with interrupts disabled. Try to keep it as short and as fast as possible! * * @throws org.vmmagic.pragma.UninterruptiblePragma */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fd...@us...> - 2009-12-12 16:44:51
|
Revision: 5699 http://jnode.svn.sourceforge.net/jnode/?rev=5699&view=rev Author: fduminy Date: 2009-12-12 16:44:38 +0000 (Sat, 12 Dec 2009) Log Message: ----------- reverted changes in r5696 Added Paths: ----------- trunk/core/src/core/org/jnode/vm/compiler/BaseMagicHelper.java Removed Paths: ------------- trunk/core/src/core/org/jnode/vm/classmgr/BaseMagicHelper.java Deleted: trunk/core/src/core/org/jnode/vm/classmgr/BaseMagicHelper.java =================================================================== --- trunk/core/src/core/org/jnode/vm/classmgr/BaseMagicHelper.java 2009-12-12 16:33:36 UTC (rev 5698) +++ trunk/core/src/core/org/jnode/vm/classmgr/BaseMagicHelper.java 2009-12-12 16:44:38 UTC (rev 5699) @@ -1,321 +0,0 @@ -/* - * $Id$ - * - * Copyright (C) 2003-2009 JNode.org - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * 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 java.util.Map; - -import org.jnode.util.BootableHashMap; -import org.jnode.annotation.SharedStatics; - -/** - * @author Ewout Prangsma (ep...@us...) - */ -public class BaseMagicHelper { - - /** - * Enum of all magic classes. - * - * @author Ewout Prangsma (ep...@us...) - */ - @SharedStatics - public enum MagicClass { - ADDRESS("org.vmmagic.unboxed.Address"), - EXTENT("org.vmmagic.unboxed.Extent"), - OBJECTREFERENCE("org.vmmagic.unboxed.ObjectReference"), - OFFSET("org.vmmagic.unboxed.Offset"), - WORD("org.vmmagic.unboxed.Word"), - ADDRESSARRAY("org.vmmagic.unboxed.AddressArray"), - EXTENTARRAY("org.vmmagic.unboxed.ExtentArray"), - OBJECTREFERENCEARRAY("org.vmmagic.unboxed.ObjectReferenceArray"), - OFFSETARRAY("org.vmmagic.unboxed.OffsetArray"), - WORDARRAY("org.vmmagic.unboxed.WordArray"), - VMMAGIC("org.jnode.vm.VmMagic"); - - /** - * Name of the class - */ - private final String name; - - /** - * Lookup table - */ - private static final Map<String, MagicClass> nameToClass; - - /** - * Initialize this instance. - * - * @param name - */ - private MagicClass(String name) { - this.name = name; - } - - /** - * Initialize the lookup table - */ - static { - nameToClass = new BootableHashMap<String, MagicClass>(); - for (MagicClass mc : values()) { - nameToClass.put(mc.name, mc); - } - } - - /** - * Gets the MagicClass instance for the given type. - * - * @param type - * @return a MagicClass instance - * @throws InternalError When type is no magic type. - */ - public static MagicClass get(VmType<?> type) { - MagicClass mc = nameToClass.get(type.getName()); - if (mc == null) { - throw new InternalError("Unknown magic type " + type.getName()); - } else { - return mc; - } - } - - /** - * Indicate if the given class name corresponds to a magic class. - * - * @param name Name of a class. - * @return true if the class is magic. - */ - static boolean isMagic(String name) { - boolean magic = false; - for (MagicClass mc : values()) { - if (mc.name.equals(name)) { - magic = true; - break; - } - } - return magic; - } - } - - /** - * Enum of all methods in all magic classes. - * - * @author Ewout Prangsma (ep...@us...) - */ - @SharedStatics - public enum MagicMethod { - ADD("add", false), - AND("and", false), - OR("or", false), - NOT("not", false), - SUB("sub", false), - XOR("xor", false), - ZERO("zero", false), - MAX("max", false), - ONE("one", false), - TOINT("toInt", false), - TOLONG("toLong", false), - TOWORD("toWord", false), - TOADDRESS("toAddress", true), - TOEXTENT("toExtent", false), - TOOFFSET("toOffset", false), - TOOBJECTREFERENCE("toObjectReference", true), - EQUALS("equals", false), - ISZERO("isZero", false), - ISMAX("isMax", false), - ISNULL("isNull", false), - EQ("EQ", false), - NE("NE", false), - GT("GT", false), - GE("GE", false), - LT("LT", false), - LE("LE", false), - SGT("sGT", false), - SGE("sGE", false), - SLT("sLT", false), - SLE("sLE", false), - FROMINT("fromInt", false), - FROMINTSIGNEXTEND("fromIntSignExtend", false), - FROMINTZEROEXTEND("fromIntZeroExtend", false), - FROMLONG("fromLong", false), - LSH("lsh", false), - RSHL("rshl", false), - RSHA("rsha", false), - LOADBYTE("loadByte", true, "()B"), - LOADBYTE_OFS("loadByte", true, "(Lorg/vmmagic/unboxed/Offset;)B"), - LOADCHAR("loadChar", true, "()C"), - LOADCHAR_OFS("loadChar", true, "(Lorg/vmmagic/unboxed/Offset;)C"), - LOADSHORT("loadShort", true, "()S"), - LOADSHORT_OFS("loadShort", true, "(Lorg/vmmagic/unboxed/Offset;)S"), - LOADINT("loadInt", true, "()I"), - LOADINT_OFS("loadInt", true, "(Lorg/vmmagic/unboxed/Offset;)I"), - LOADFLOAT("loadFloat", true, "()F"), - LOADFLOAT_OFS("loadFloat", true, "(Lorg/vmmagic/unboxed/Offset;)F"), - LOADLONG("loadLong", true, "()J"), - LOADLONG_OFS("loadLong", true, "(Lorg/vmmagic/unboxed/Offset;)J"), - LOADDOUBLE("loadDouble", true, "()D"), - LOADDOUBLE_OFS("loadDouble", true, "(Lorg/vmmagic/unboxed/Offset;)D"), - LOADADDRESS("loadAddress", true, "()Lorg/vmmagic/unboxed/Address;"), - LOADADDRESS_OFS("loadAddress", true, "(Lorg/vmmagic/unboxed/Offset;)Lorg/vmmagic/unboxed/Address;"), - LOADWORD("loadWord", true, "()Lorg/vmmagic/unboxed/Word;"), - LOADWORD_OFS("loadWord", true, "(Lorg/vmmagic/unboxed/Offset;)Lorg/vmmagic/unboxed/Word;"), - LOADOBJECTREFERENCE("loadObjectReference", true, "()Lorg/vmmagic/unboxed/ObjectReference;"), - LOADOBJECTREFERENCE_OFS("loadObjectReference", true, - "(Lorg/vmmagic/unboxed/Offset;)Lorg/vmmagic/unboxed/ObjectReference;"), - SIZE("size", false), - STOREBYTE("store", true, "(B)V"), - STOREBYTE_OFS("store", true, "(BLorg/vmmagic/unboxed/Offset;)V"), - STORECHAR("store", true, "(C)V"), - STORECHAR_OFS("store", true, "(CLorg/vmmagic/unboxed/Offset;)V"), - STORESHORT("store", true, "(S)V"), - STORESHORT_OFS("store", true, "(SLorg/vmmagic/unboxed/Offset;)V"), - STOREINT("store", true, "(I)V"), - STOREINT_OFS("store", true, "(ILorg/vmmagic/unboxed/Offset;)V"), - STOREFLOAT("store", true, "(F)V"), - STOREFLOAT_OFS("store", true, "(FLorg/vmmagic/unboxed/Offset;)V"), - STORELONG("store", true, "(J)V"), - STORELONG_OFS("store", true, "(JLorg/vmmagic/unboxed/Offset;)V"), - STOREDOUBLE("store", true, "(D)V"), - STOREDOUBLE_OFS("store", true, "(DLorg/vmmagic/unboxed/Offset;)V"), - STOREADDRESS("store", true, "(Lorg/vmmagic/unboxed/Address;)V"), - STOREADDRESS_OFS("store", true, "(Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/Offset;)V"), - STOREWORD("store", true, "(Lorg/vmmagic/unboxed/Word;)V"), - STOREWORD_OFS("store", true, "(Lorg/vmmagic/unboxed/Word;Lorg/vmmagic/unboxed/Offset;)V"), - STOREOBJECTREFERENCE("store", true, "(Lorg/vmmagic/unboxed/ObjectReference;)V"), - STOREOBJECTREFERENCE_OFS("store", true, "(Lorg/vmmagic/unboxed/ObjectReference;Lorg/vmmagic/unboxed/Offset;)V"), - PREPAREINT("prepareInt", true, "()I"), - PREPAREINT_OFS("prepareInt", true, "(Lorg/vmmagic/unboxed/Offset;)I"), - PREPAREADDRESS("prepareAddress", true, "()Lorg/vmmagic/unboxed/Address;"), - PREPAREADDRESS_OFS("prepareAddress", true, "(Lorg/vmmagic/unboxed/Offset;)Lorg/vmmagic/unboxed/Address;"), - PREPAREWORD("prepareWord", true, "()Lorg/vmmagic/unboxed/Word;"), - PREPAREWORD_OFS("prepareWord", true, "(Lorg/vmmagic/unboxed/Offset;)Lorg/vmmagic/unboxed/Word;"), - PREPAREOBJECTREFERENCE("prepareObjectReference", true, "()Lorg/vmmagic/unboxed/ObjectReference;"), - PREPAREOBJECTREFERENCE_OFS("prepareObjectReference", true, - "(Lorg/vmmagic/unboxed/Offset;)Lorg/vmmagic/unboxed/ObjectReference;"), - ATTEMPTINT("attempt", true, "(II)Z"), - ATTEMPTINT_OFS("attempt", true, "(IILorg/vmmagic/unboxed/Offset;)Z"), - ATTEMPTADDRESS("attempt", true, "(Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/Address;)Z"), - ATTEMPTADDRESS_OFS("attempt", true, - "(Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/Offset;)Z"), - ATTEMPTOBJECTREFERENCE("attempt", true, - "(Lorg/vmmagic/unboxed/ObjectReference;Lorg/vmmagic/unboxed/ObjectReference;)Z"), - ATTEMPTOBJECTREFERENCE_OFS("attempt", true, - "(Lorg/vmmagic/unboxed/ObjectReference;Lorg/vmmagic/unboxed/ObjectReference;" + - "Lorg/vmmagic/unboxed/Offset;)Z"), - ATTEMPTWORD("attempt", true, "(Lorg/vmmagic/unboxed/Word;Lorg/vmmagic/unboxed/Word;)Z"), - ATTEMPTWORD_OFS("attempt", true, - "(Lorg/vmmagic/unboxed/Word;Lorg/vmmagic/unboxed/Word;Lorg/vmmagic/unboxed/Offset;)Z"), - FROMOBJECT("fromObject", true), - FROMADDRESS("fromAddress", true), - GETOBJECTTYPE("getObjectType", true), - GETTIB("getTIB", true), - GETOBJECTFLAGS("getObjectFlags", true), - SETOBJECTFLAGS("setObjectFlags", true), - TOOBJECT("toObject", true), - GETARRAYDATA("getArrayData", true), - GETOBJECTCOLOR("getObjectColor", true), - ISFINALIZED("isFinalized", true), - ATOMICADD("atomicAdd", true), - ATOMICAND("atomicAnd", true), - ATOMICOR("atomicOr", true), - ATOMICSUB("atomicSub", true), - GETCURRENTFRAME("getCurrentFrame", true), - GETTIMESTAMP("getTimeStamp", true), - INTBITSTOFLOAT("intBitsToFloat", false), - FLOATTORAWINTBITS("floatToRawIntBits", false), - LONGBITSTODOUBLE("longBitsToDouble", false), - DOUBLETORAWLONGBITS("doubleToRawLongBits", false), - BREAKPOINT("breakPoint", true), - DIFF("diff", false), - NULLREFERENCE("nullReference", false), - CURRENTPROCESSOR("currentProcessor", true, "()Lorg/jnode/vm/scheduler/VmProcessor;"), - GETSHAREDSTATICSFIELDADDRESS("getSharedStaticFieldAddress", true), - GETISOLATEDSTATICSFIELDADDRESS("getIsolatedStaticFieldAddress", true), - ISRUNNINGJNODE("isRunningJNode", false, "()Z"), - - // Array classes - ARR_CREATE("create", true), - ARR_GET("get", true), - ARR_SET("set", true), - ARR_LENGTH("length", false); - - private final String name; - private final String signature; - private final boolean permissionRequired; - private static BootableHashMap<VmMethod, MagicMethod> methods = new BootableHashMap<VmMethod, MagicMethod>(); - - private MagicMethod(String name, boolean permissionRequired) { - this.name = name; - this.signature = null; - this.permissionRequired = permissionRequired; - } - - private MagicMethod(String name, boolean permissionRequired, String signature) { - this.name = name; - this.permissionRequired = permissionRequired; - this.signature = signature; - } - - public static MagicMethod get(VmMethod method) { - MagicMethod mm = methods.get(method); - if (mm != null) { - return mm; - } - final String mname = method.getName(); - final String msignature = method.getSignature(); - - for (MagicMethod m : values()) { - if (m.name.equals(mname)) { - if ((m.signature == null) || m.signature.equals(msignature)) { - methods.put(method, m); - return m; - } - - } - } - throw new InternalError("Unknown method " + mname + '#' + msignature + " in " - + method.getDeclaringClass().getName()); - } - - /** - * Is MagicPermission required for this method. - * - * @return - */ - final boolean isPermissionRequired() { - return this.permissionRequired; - } - } - - /** - * Is the given method allowed to call magic code. - * - * @param caller - */ - public static void testMagicPermission(MagicMethod callee, VmMethod caller) - throws SecurityException { - if (callee.isPermissionRequired()) { - if (!caller.getDeclaringClass().isMagicPermissionGranted()) { - System.out.println("MagicPermission is not granted for type: " - + caller.getDeclaringClass().getName()); - // throw new SecurityException("MagicPermission is not granted - // for method: " + caller.getFullName()); - } - } - } -} Copied: trunk/core/src/core/org/jnode/vm/compiler/BaseMagicHelper.java (from rev 5697, trunk/core/src/core/org/jnode/vm/classmgr/BaseMagicHelper.java) =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/BaseMagicHelper.java (rev 0) +++ trunk/core/src/core/org/jnode/vm/compiler/BaseMagicHelper.java 2009-12-12 16:44:38 UTC (rev 5699) @@ -0,0 +1,323 @@ +/* + * $Id$ + * + * Copyright (C) 2003-2009 JNode.org + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * 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.compiler; + +import java.util.Map; + +import org.jnode.util.BootableHashMap; +import org.jnode.vm.classmgr.VmMethod; +import org.jnode.vm.classmgr.VmType; +import org.jnode.annotation.SharedStatics; + +/** + * @author Ewout Prangsma (ep...@us...) + */ +public class BaseMagicHelper { + + /** + * Enum of all magic classes. + * + * @author Ewout Prangsma (ep...@us...) + */ + @SharedStatics + public enum MagicClass { + ADDRESS("org.vmmagic.unboxed.Address"), + EXTENT("org.vmmagic.unboxed.Extent"), + OBJECTREFERENCE("org.vmmagic.unboxed.ObjectReference"), + OFFSET("org.vmmagic.unboxed.Offset"), + WORD("org.vmmagic.unboxed.Word"), + ADDRESSARRAY("org.vmmagic.unboxed.AddressArray"), + EXTENTARRAY("org.vmmagic.unboxed.ExtentArray"), + OBJECTREFERENCEARRAY("org.vmmagic.unboxed.ObjectReferenceArray"), + OFFSETARRAY("org.vmmagic.unboxed.OffsetArray"), + WORDARRAY("org.vmmagic.unboxed.WordArray"), + VMMAGIC("org.jnode.vm.VmMagic"); + + /** + * Name of the class + */ + private final String name; + + /** + * Lookup table + */ + private static final Map<String, MagicClass> nameToClass; + + /** + * Initialize this instance. + * + * @param name + */ + private MagicClass(String name) { + this.name = name; + } + + /** + * Initialize the lookup table + */ + static { + nameToClass = new BootableHashMap<String, MagicClass>(); + for (MagicClass mc : values()) { + nameToClass.put(mc.name, mc); + } + } + + /** + * Gets the MagicClass instance for the given type. + * + * @param type + * @return a MagicClass instance + * @throws InternalError When type is no magic type. + */ + public static MagicClass get(VmType<?> type) { + MagicClass mc = nameToClass.get(type.getName()); + if (mc == null) { + throw new InternalError("Unknown magic type " + type.getName()); + } else { + return mc; + } + } + + /** + * Indicate if the given class name corresponds to a magic class. + * + * @param name Name of a class. + * @return true if the class is magic. + */ + static boolean isMagic(String name) { + boolean magic = false; + for (MagicClass mc : values()) { + if (mc.name.equals(name)) { + magic = true; + break; + } + } + return magic; + } + } + + /** + * Enum of all methods in all magic classes. + * + * @author Ewout Prangsma (ep...@us...) + */ + @SharedStatics + public enum MagicMethod { + ADD("add", false), + AND("and", false), + OR("or", false), + NOT("not", false), + SUB("sub", false), + XOR("xor", false), + ZERO("zero", false), + MAX("max", false), + ONE("one", false), + TOINT("toInt", false), + TOLONG("toLong", false), + TOWORD("toWord", false), + TOADDRESS("toAddress", true), + TOEXTENT("toExtent", false), + TOOFFSET("toOffset", false), + TOOBJECTREFERENCE("toObjectReference", true), + EQUALS("equals", false), + ISZERO("isZero", false), + ISMAX("isMax", false), + ISNULL("isNull", false), + EQ("EQ", false), + NE("NE", false), + GT("GT", false), + GE("GE", false), + LT("LT", false), + LE("LE", false), + SGT("sGT", false), + SGE("sGE", false), + SLT("sLT", false), + SLE("sLE", false), + FROMINT("fromInt", false), + FROMINTSIGNEXTEND("fromIntSignExtend", false), + FROMINTZEROEXTEND("fromIntZeroExtend", false), + FROMLONG("fromLong", false), + LSH("lsh", false), + RSHL("rshl", false), + RSHA("rsha", false), + LOADBYTE("loadByte", true, "()B"), + LOADBYTE_OFS("loadByte", true, "(Lorg/vmmagic/unboxed/Offset;)B"), + LOADCHAR("loadChar", true, "()C"), + LOADCHAR_OFS("loadChar", true, "(Lorg/vmmagic/unboxed/Offset;)C"), + LOADSHORT("loadShort", true, "()S"), + LOADSHORT_OFS("loadShort", true, "(Lorg/vmmagic/unboxed/Offset;)S"), + LOADINT("loadInt", true, "()I"), + LOADINT_OFS("loadInt", true, "(Lorg/vmmagic/unboxed/Offset;)I"), + LOADFLOAT("loadFloat", true, "()F"), + LOADFLOAT_OFS("loadFloat", true, "(Lorg/vmmagic/unboxed/Offset;)F"), + LOADLONG("loadLong", true, "()J"), + LOADLONG_OFS("loadLong", true, "(Lorg/vmmagic/unboxed/Offset;)J"), + LOADDOUBLE("loadDouble", true, "()D"), + LOADDOUBLE_OFS("loadDouble", true, "(Lorg/vmmagic/unboxed/Offset;)D"), + LOADADDRESS("loadAddress", true, "()Lorg/vmmagic/unboxed/Address;"), + LOADADDRESS_OFS("loadAddress", true, "(Lorg/vmmagic/unboxed/Offset;)Lorg/vmmagic/unboxed/Address;"), + LOADWORD("loadWord", true, "()Lorg/vmmagic/unboxed/Word;"), + LOADWORD_OFS("loadWord", true, "(Lorg/vmmagic/unboxed/Offset;)Lorg/vmmagic/unboxed/Word;"), + LOADOBJECTREFERENCE("loadObjectReference", true, "()Lorg/vmmagic/unboxed/ObjectReference;"), + LOADOBJECTREFERENCE_OFS("loadObjectReference", true, + "(Lorg/vmmagic/unboxed/Offset;)Lorg/vmmagic/unboxed/ObjectReference;"), + SIZE("size", false), + STOREBYTE("store", true, "(B)V"), + STOREBYTE_OFS("store", true, "(BLorg/vmmagic/unboxed/Offset;)V"), + STORECHAR("store", true, "(C)V"), + STORECHAR_OFS("store", true, "(CLorg/vmmagic/unboxed/Offset;)V"), + STORESHORT("store", true, "(S)V"), + STORESHORT_OFS("store", true, "(SLorg/vmmagic/unboxed/Offset;)V"), + STOREINT("store", true, "(I)V"), + STOREINT_OFS("store", true, "(ILorg/vmmagic/unboxed/Offset;)V"), + STOREFLOAT("store", true, "(F)V"), + STOREFLOAT_OFS("store", true, "(FLorg/vmmagic/unboxed/Offset;)V"), + STORELONG("store", true, "(J)V"), + STORELONG_OFS("store", true, "(JLorg/vmmagic/unboxed/Offset;)V"), + STOREDOUBLE("store", true, "(D)V"), + STOREDOUBLE_OFS("store", true, "(DLorg/vmmagic/unboxed/Offset;)V"), + STOREADDRESS("store", true, "(Lorg/vmmagic/unboxed/Address;)V"), + STOREADDRESS_OFS("store", true, "(Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/Offset;)V"), + STOREWORD("store", true, "(Lorg/vmmagic/unboxed/Word;)V"), + STOREWORD_OFS("store", true, "(Lorg/vmmagic/unboxed/Word;Lorg/vmmagic/unboxed/Offset;)V"), + STOREOBJECTREFERENCE("store", true, "(Lorg/vmmagic/unboxed/ObjectReference;)V"), + STOREOBJECTREFERENCE_OFS("store", true, "(Lorg/vmmagic/unboxed/ObjectReference;Lorg/vmmagic/unboxed/Offset;)V"), + PREPAREINT("prepareInt", true, "()I"), + PREPAREINT_OFS("prepareInt", true, "(Lorg/vmmagic/unboxed/Offset;)I"), + PREPAREADDRESS("prepareAddress", true, "()Lorg/vmmagic/unboxed/Address;"), + PREPAREADDRESS_OFS("prepareAddress", true, "(Lorg/vmmagic/unboxed/Offset;)Lorg/vmmagic/unboxed/Address;"), + PREPAREWORD("prepareWord", true, "()Lorg/vmmagic/unboxed/Word;"), + PREPAREWORD_OFS("prepareWord", true, "(Lorg/vmmagic/unboxed/Offset;)Lorg/vmmagic/unboxed/Word;"), + PREPAREOBJECTREFERENCE("prepareObjectReference", true, "()Lorg/vmmagic/unboxed/ObjectReference;"), + PREPAREOBJECTREFERENCE_OFS("prepareObjectReference", true, + "(Lorg/vmmagic/unboxed/Offset;)Lorg/vmmagic/unboxed/ObjectReference;"), + ATTEMPTINT("attempt", true, "(II)Z"), + ATTEMPTINT_OFS("attempt", true, "(IILorg/vmmagic/unboxed/Offset;)Z"), + ATTEMPTADDRESS("attempt", true, "(Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/Address;)Z"), + ATTEMPTADDRESS_OFS("attempt", true, + "(Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/Offset;)Z"), + ATTEMPTOBJECTREFERENCE("attempt", true, + "(Lorg/vmmagic/unboxed/ObjectReference;Lorg/vmmagic/unboxed/ObjectReference;)Z"), + ATTEMPTOBJECTREFERENCE_OFS("attempt", true, + "(Lorg/vmmagic/unboxed/ObjectReference;Lorg/vmmagic/unboxed/ObjectReference;" + + "Lorg/vmmagic/unboxed/Offset;)Z"), + ATTEMPTWORD("attempt", true, "(Lorg/vmmagic/unboxed/Word;Lorg/vmmagic/unboxed/Word;)Z"), + ATTEMPTWORD_OFS("attempt", true, + "(Lorg/vmmagic/unboxed/Word;Lorg/vmmagic/unboxed/Word;Lorg/vmmagic/unboxed/Offset;)Z"), + FROMOBJECT("fromObject", true), + FROMADDRESS("fromAddress", true), + GETOBJECTTYPE("getObjectType", true), + GETTIB("getTIB", true), + GETOBJECTFLAGS("getObjectFlags", true), + SETOBJECTFLAGS("setObjectFlags", true), + TOOBJECT("toObject", true), + GETARRAYDATA("getArrayData", true), + GETOBJECTCOLOR("getObjectColor", true), + ISFINALIZED("isFinalized", true), + ATOMICADD("atomicAdd", true), + ATOMICAND("atomicAnd", true), + ATOMICOR("atomicOr", true), + ATOMICSUB("atomicSub", true), + GETCURRENTFRAME("getCurrentFrame", true), + GETTIMESTAMP("getTimeStamp", true), + INTBITSTOFLOAT("intBitsToFloat", false), + FLOATTORAWINTBITS("floatToRawIntBits", false), + LONGBITSTODOUBLE("longBitsToDouble", false), + DOUBLETORAWLONGBITS("doubleToRawLongBits", false), + BREAKPOINT("breakPoint", true), + DIFF("diff", false), + NULLREFERENCE("nullReference", false), + CURRENTPROCESSOR("currentProcessor", true, "()Lorg/jnode/vm/scheduler/VmProcessor;"), + GETSHAREDSTATICSFIELDADDRESS("getSharedStaticFieldAddress", true), + GETISOLATEDSTATICSFIELDADDRESS("getIsolatedStaticFieldAddress", true), + ISRUNNINGJNODE("isRunningJNode", false, "()Z"), + + // Array classes + ARR_CREATE("create", true), + ARR_GET("get", true), + ARR_SET("set", true), + ARR_LENGTH("length", false); + + private final String name; + private final String signature; + private final boolean permissionRequired; + private static BootableHashMap<VmMethod, MagicMethod> methods = new BootableHashMap<VmMethod, MagicMethod>(); + + private MagicMethod(String name, boolean permissionRequired) { + this.name = name; + this.signature = null; + this.permissionRequired = permissionRequired; + } + + private MagicMethod(String name, boolean permissionRequired, String signature) { + this.name = name; + this.permissionRequired = permissionRequired; + this.signature = signature; + } + + public static MagicMethod get(VmMethod method) { + MagicMethod mm = methods.get(method); + if (mm != null) { + return mm; + } + final String mname = method.getName(); + final String msignature = method.getSignature(); + + for (MagicMethod m : values()) { + if (m.name.equals(mname)) { + if ((m.signature == null) || m.signature.equals(msignature)) { + methods.put(method, m); + return m; + } + + } + } + throw new InternalError("Unknown method " + mname + '#' + msignature + " in " + + method.getDeclaringClass().getName()); + } + + /** + * Is MagicPermission required for this method. + * + * @return + */ + final boolean isPermissionRequired() { + return this.permissionRequired; + } + } + + /** + * Is the given method allowed to call magic code. + * + * @param caller + */ + public static void testMagicPermission(MagicMethod callee, VmMethod caller) + throws SecurityException { + if (callee.isPermissionRequired()) { + if (!caller.getDeclaringClass().isMagicPermissionGranted()) { + System.out.println("MagicPermission is not granted for type: " + + caller.getDeclaringClass().getName()); + // throw new SecurityException("MagicPermission is not granted + // for method: " + caller.getFullName()); + } + } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ls...@us...> - 2010-03-28 19:26:44
|
Revision: 5741 http://jnode.svn.sourceforge.net/jnode/?rev=5741&view=rev Author: lsantha Date: 2010-03-28 19:26:38 +0000 (Sun, 28 Mar 2010) Log Message: ----------- Added support for releasing the bytecode visitor, other fixes in reusing bytecode visitors. Modified Paths: -------------- trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86Level1ACompiler.java Modified: trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java =================================================================== --- trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java 2010-03-28 19:12:41 UTC (rev 5740) +++ trunk/core/src/core/org/jnode/vm/compiler/NativeCodeCompiler.java 2010-03-28 19:26:38 UTC (rev 5741) @@ -240,38 +240,49 @@ protected CompiledMethod doCompile(VmMethod method, NativeStream os, int level, boolean isBootstrap) { final CompiledMethod cm = new CompiledMethod(level); - if (method.isNative()) { - Object label = new Label(method.getMangledName()); - cm.setCodeStart(os.getObjectRef(label)); - } else { - // Create the visitor - CompilerBytecodeVisitor bcv = createBytecodeVisitor(method, - cm, os, level, isBootstrap); - // Wrap in verifier if needed - if (!(bcv instanceof VerifyingCompilerBytecodeVisitor)) { - bcv = new VerifyingCompilerBytecodeVisitor<CompilerBytecodeVisitor>(bcv); + try { + if (method.isNative()) { + Object label = new Label(method.getMangledName()); + cm.setCodeStart(os.getObjectRef(label)); + } else { + // Create the visitor + CompilerBytecodeVisitor bcv = getBytecodeVisitor(method, cm, os, level, isBootstrap); + + try { + // Wrap in verifier if needed + if (!(bcv instanceof VerifyingCompilerBytecodeVisitor)) { + bcv = new VerifyingCompilerBytecodeVisitor<CompilerBytecodeVisitor>(bcv); + } + // Get the bytecode + final VmByteCode bc = method.getBytecode(); + // Create the control flow graph + ControlFlowGraph cfg = (ControlFlowGraph) bc.getCompilerData(); + if (cfg == null) { + cfg = new ControlFlowGraph(bc); + bc.setCompilerData(cfg); + } + // Compile the code 1 basic block at a time + final CompilerBytecodeParser parser = new CompilerBytecodeParser(bc, cfg, bcv); + bcv.startMethod(method); + for (BasicBlock bb : cfg) { + bcv.startBasicBlock(bb); + parser.parse(bb.getStartPC(), bb.getEndPC(), false); + bcv.endBasicBlock(); + } + bcv.endMethod(); + + //remove the compiler data to save memory, will be regenerated if needed + bc.setCompilerData(null); + } finally { + releaseBytecodeVisitor(bcv); + } } - // Get the bytecode - final VmByteCode bc = method.getBytecode(); - // Create the control flow graph - ControlFlowGraph cfg = (ControlFlowGraph) bc.getCompilerData(); - if (cfg == null) { - cfg = new ControlFlowGraph(bc); - bc.setCompilerData(cfg); - } - // Compile the code 1 basic block at a time - final CompilerBytecodeParser parser = new CompilerBytecodeParser( - bc, cfg, bcv); - bcv.startMethod(method); - for (BasicBlock bb : cfg) { - bcv.startBasicBlock(bb); - parser.parse(bb.getStartPC(), bb.getEndPC(), false); - bcv.endBasicBlock(); - } - bcv.endMethod(); - - //remove the compiler data to save memory, will be regenerated if needed - bc.setCompilerData(null); + } catch (RuntimeException x) { + System.err.println("ERROR in compilation of " + method.getFullName()); + throw x; + } catch (Error x) { + System.err.println("ERROR in compilation of " + method.getFullName()); + throw x; } return cm; @@ -286,8 +297,8 @@ * @param isBootstrap * @return The compiled method */ - protected abstract CompiledMethod doCompileAbstract(VmMethod method, - NativeStream os, int level, boolean isBootstrap); + protected abstract CompiledMethod doCompileAbstract(VmMethod method, NativeStream os, int level, + boolean isBootstrap); /** * Create the visitor that converts bytecodes into native code. @@ -299,10 +310,17 @@ * @param isBootstrap * @return The new bytecode visitor. */ - protected abstract CompilerBytecodeVisitor createBytecodeVisitor( - VmMethod method, CompiledMethod cm, NativeStream os, int level, - boolean isBootstrap); + protected abstract CompilerBytecodeVisitor createBytecodeVisitor(VmMethod method, CompiledMethod cm, + NativeStream os, int level, boolean isBootstrap); + protected CompilerBytecodeVisitor getBytecodeVisitor(VmMethod method, CompiledMethod cm, NativeStream os, + int level, boolean isBootstrap) { + return createBytecodeVisitor(method, cm, os, level, isBootstrap); + } + + protected void releaseBytecodeVisitor(CompilerBytecodeVisitor visitor) { + + } /** * Initialize this compiler * Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86Level1ACompiler.java =================================================================== --- trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86Level1ACompiler.java 2010-03-28 19:12:41 UTC (rev 5740) +++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86Level1ACompiler.java 2010-03-28 19:26:38 UTC (rev 5741) @@ -20,8 +20,6 @@ package org.jnode.vm.x86.compiler.l1a; -import java.util.ArrayList; -import java.util.List; import org.jnode.assembler.NativeStream; import org.jnode.assembler.ObjectResolver; import org.jnode.assembler.x86.X86BinaryAssembler; @@ -96,8 +94,6 @@ private final ThreadLocal<X86BytecodeVisitor> byteCodeVisitorHolder = new ThreadLocal<X86BytecodeVisitor>(); - private final ThreadLocal<List<X86BytecodeVisitor>> byteCodeVisitorListHolder = - new ThreadLocal<List<X86BytecodeVisitor>>(); /** * Create the visitor that converts bytecodes into native code. * @@ -115,37 +111,14 @@ final EntryPoints entryPoints = getEntryPoints(); X86BytecodeVisitor byteCodeVisitor = byteCodeVisitorHolder.get(); if (byteCodeVisitor == null) { - byteCodeVisitor = new X86BytecodeVisitor(os, cm, isBootstrap, entryPoints, - getMagicHelper(), getTypeSizeInfo()); - byteCodeVisitorHolder.set(byteCodeVisitor); + byteCodeVisitor = new X86BytecodeVisitor(os, cm, isBootstrap, entryPoints, getMagicHelper(), + getTypeSizeInfo()); } else { - if (byteCodeVisitor.isWorking()) { - //slow path - List<X86BytecodeVisitor> vlist = byteCodeVisitorListHolder.get(); - if (vlist == null) { - vlist = new ArrayList<X86BytecodeVisitor>(); - byteCodeVisitorListHolder.set(vlist); - } - byteCodeVisitor = null; - for (X86BytecodeVisitor bv : vlist) { - if (!bv.isWorking()) { - byteCodeVisitor = bv; - break; - } - } - if (byteCodeVisitor == null) { - byteCodeVisitor = new X86BytecodeVisitor(os, cm, isBootstrap, entryPoints, - getMagicHelper(), getTypeSizeInfo()); - vlist.add(byteCodeVisitor); - } else { - byteCodeVisitor.reset(os, cm, isBootstrap, entryPoints, getMagicHelper(), getTypeSizeInfo()); - } - } else { - byteCodeVisitor.reset(os, cm, isBootstrap, entryPoints, getMagicHelper(), getTypeSizeInfo()); - } + byteCodeVisitorHolder.remove(); + byteCodeVisitor.reset(os, cm, isBootstrap, entryPoints, getMagicHelper(), getTypeSizeInfo()); } cbv = byteCodeVisitor; - if (inlineMethods /*&& ((X86Assembler)os).isCode32()*/) { + if (inlineMethods) { final VmClassLoader loader = method.getDeclaringClass().getLoader(); return new OptimizingBytecodeVisitor(entryPoints, cbv, loader); } else { @@ -153,7 +126,18 @@ } } - private final MagicHelper getMagicHelper() { + @Override + protected synchronized void releaseBytecodeVisitor(CompilerBytecodeVisitor visitor) { + X86BytecodeVisitor bv; + if (inlineMethods) { + bv = (X86BytecodeVisitor) ((OptimizingBytecodeVisitor) visitor).getDelegate(); + } else { + bv = (X86BytecodeVisitor) visitor; + } + byteCodeVisitorHolder.set(bv); + } + + private MagicHelper getMagicHelper() { final MagicHelper helper = magicHelperHolder.get(); if (helper != null) { return helper; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |