You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by wj...@apache.org on 2006/08/23 18:43:09 UTC
svn commit: r434075 - in
/incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk:
Assert.java Collection.java Memory.java ObjectModel.java Options.java
ReferenceGlue.java Scanning.java Strings.java
Author: wjwashburn
Date: Wed Aug 23 09:43:07 2006
New Revision: 434075
URL: http://svn.apache.org/viewvc?rev=434075&view=rev
Log:
cleaned up package includes and formatting
Modified:
incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Assert.java
incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Collection.java
incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Memory.java
incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/ObjectModel.java
incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Options.java
incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/ReferenceGlue.java
incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Scanning.java
incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Strings.java
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Assert.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Assert.java?rev=434075&r1=434074&r2=434075&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Assert.java (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Assert.java Wed Aug 23 09:43:07 2006
@@ -17,12 +17,8 @@
package org.apache.HarmonyDRLVM.mm.mmtk;
-import org.mmtk.policy.Space;
-
-import org.vmmagic.unboxed.*;
import org.vmmagic.pragma.*;
-
public class Assert extends org.mmtk.vm.Assert implements Uninterruptible {
protected final boolean getVerifyAssertionsConstant() { return true;}
@@ -73,12 +69,6 @@
}
}
-
- /**
- * <code>true</code> if assertions should be verified
- */
- /* public static final boolean VerifyAssertions = VM.VerifyAssertions; */
-
public final void _assert(boolean cond, String s) throws InlinePragma {
System.out.println("******org.apache.HarmonyDRLVM.mm.mmtk.Assert._assert(): " + s);
s.notifyAll(); // this should cause a stack trace and exit
@@ -112,10 +102,7 @@
}
/**
- * Checks if the virtual machine is running. This value changes, so
- * the call-through to the VM must be a method. In Jikes RVM, just
- * returns VM.runningVM.
- *
+ * Checks if the virtual machine is running.
* @return <code>true</code> if the virtual machine is running
*/
public final boolean runningVM() { return true; }
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Collection.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Collection.java?rev=434075&r1=434074&r2=434075&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Collection.java (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Collection.java Wed Aug 23 09:43:07 2006
@@ -20,13 +20,8 @@
import org.mmtk.plan.CollectorContext;
import org.mmtk.plan.MutatorContext;
import org.mmtk.utility.Constants;
-import org.mmtk.utility.Finalizer;
-import org.mmtk.utility.heap.HeapGrowthManager;
-import org.mmtk.utility.ReferenceProcessor;
-import org.mmtk.utility.options.Options;
-import org.mmtk.vm.*;
-import org.vmmagic.unboxed.*;
+import org.mmtk.vm.*;
import org.vmmagic.pragma.*;
public class Collection extends org.mmtk.vm.Collection implements Constants, Uninterruptible {
@@ -45,11 +40,8 @@
* statics at the completion of this routine will be reflected in
* the boot image. Any objects referenced by those statics will be
* transitively included in the boot image.
- *
- * This is called from MM_Interface.
*/
public static final void init() throws InterruptiblePragma {
- //wjw NoGC does not have a collector, do nothing for starts
System.out.println("org.apache.HarmonyDRLVM.mm.mmtk.Collection.init() has been called -1-");
VM.assertions._assert(false);
}
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Memory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Memory.java?rev=434075&r1=434074&r2=434075&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Memory.java (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Memory.java Wed Aug 23 09:43:07 2006
@@ -19,12 +19,10 @@
import org.mmtk.plan.Plan;
import org.mmtk.policy.ImmortalSpace;
import org.mmtk.policy.Space;
-import org.mmtk.utility.Constants;
-
import org.mmtk.vm.VM;
import org.vmmagic.unboxed.*;
import org.vmmagic.pragma.*;
-
+import org.mmtk.utility.Constants;
public class Memory extends org.mmtk.vm.Memory
implements Constants, Uninterruptible {
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/ObjectModel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/ObjectModel.java?rev=434075&r1=434074&r2=434075&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/ObjectModel.java (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/ObjectModel.java Wed Aug 23 09:43:07 2006
@@ -18,8 +18,6 @@
import org.mmtk.utility.scan.MMType;
import org.mmtk.utility.Constants;
-import org.mmtk.utility.alloc.Allocator;
-
import org.vmmagic.unboxed.*;
import org.vmmagic.pragma.*;
import org.mmtk.vm.*;
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Options.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Options.java?rev=434075&r1=434074&r2=434075&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Options.java (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Options.java Wed Aug 23 09:43:07 2006
@@ -33,25 +33,8 @@
* @return the vm specific key.
*/
public final String getKey(String name) {
-
System.out.println("org.apache.HarmonyDRLVM.mm.mmtk.Options.getKey(String) " + name);
-
- int space = name.indexOf(' ');
- if (space < 0) return name.toLowerCase();
-
- String word = name.substring(0, space);
- String key = word.toLowerCase();
-
- do {
- int old = space+1;
- space = name.indexOf(' ', old);
- if (space < 0) {
- key += name.substring(old);
- return key;
- }
- key += name.substring(old, space);
- } while (true);
-
+ return null;
}
/**
@@ -84,43 +67,5 @@
public final void warn(Option o, String message) {
System.out.println("WARNING: Option '" + o.getKey() + "' : " +
message);
- }
-
-
- /**
- * Take a string (most likely a command-line argument) and try to proccess it
- * as an option command. Return true if the string was understood, false
- * otherwise.
- *
- * @param arg a String to try to process as an option command
- * @return true if successful, false otherwise
- */
- public static boolean process(String arg) {
-
- // First handle the "option commands"
- if (arg.equals("help")) {
- System.out.println("org.apache.HarmonyDRLVM.mm.mmtk.process() help was called"); //printHelp();
- return true;
- }
- if (arg.equals("printOptions")) {
- System.out.println("org.apache.HarmonyDRLVM.mm.mmtk.process() printOptions was called"); //printHelp();//printOptions();
- return true;
- }
- if (arg.equals("")) {
- System.out.println("org.apache.HarmonyDRLVM.mm.mmtk.process() <zip> was called"); //printHelp();
- //printHelp();
- return true;
- }
-
- // Required format of arg is 'name=value'
- // Split into 'name' and 'value' strings
- int split = arg.indexOf('=');
- if (split == -1) {
- System.out.println(" Illegal option specification!\n \""+arg+
- "\" must be specified as a name-value pair in the form of option=value");
- return false;
- }
-
- return false;
}
}
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/ReferenceGlue.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/ReferenceGlue.java?rev=434075&r1=434074&r2=434075&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/ReferenceGlue.java (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/ReferenceGlue.java Wed Aug 23 09:43:07 2006
@@ -57,13 +57,7 @@
* Put this Reference object on its ReferenceQueue (if it has one)
* when its referent is no longer sufficiently reachable. The
* definition of "reachable" is defined by the semantics of the
- * particular subclass of Reference. The implementation of this
- * routine is determined by the the implementation of
- * java.lang.ref.ReferenceQueue in GNU classpath. It is in this
- * class rather than the public Reference class to ensure that Jikes
- * has a safe way of enqueueing the object, one that cannot be
- * overridden by the application program.
- *
+ * particular subclass of Reference.
* @see java.lang.ref.ReferenceQueue
* @param addr the address of the Reference object
* @param onlyOnce <code>true</code> if the reference has ever
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Scanning.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Scanning.java?rev=434075&r1=434074&r2=434075&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Scanning.java (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Scanning.java Wed Aug 23 09:43:07 2006
@@ -15,14 +15,11 @@
*/
package org.apache.HarmonyDRLVM.mm.mmtk;
-
import org.mmtk.plan.TraceLocal;
-import org.mmtk.utility.deque.*;
import org.mmtk.utility.scan.*;
import org.mmtk.utility.Constants;
import org.mmtk.vm.VM;
-
import org.vmmagic.unboxed.*;
import org.vmmagic.pragma.*;
@@ -38,43 +35,35 @@
/**
* Delegated scanning of a object, processing each pointer field
- * encountered. <b>Jikes RVM never delegates, so this is never
- * executed</b>.
- *
+ * encountered.
* @param object The object to be scanned.
*/
public final void scanObject(TraceLocal trace, ObjectReference object)
throws UninterruptiblePragma, InlinePragma {
- // Never reached
- VM.assertions._assert(false);
+ VM.assertions._assert(false); //debug when you hit this
}
/**
* Delegated precopying of a object's children, processing each pointer field
- * encountered. <b>Jikes RVM never delegates, so this is never
- * executed</b>.
+ * encountered.
*
* @param object The object to be scanned.
*/
public final void precopyChildren(TraceLocal trace, ObjectReference object)
throws UninterruptiblePragma, InlinePragma {
- // Never reached
- VM.assertions._assert(false);
+ VM.assertions._assert(false); //debug when you hit this
}
/**
* Delegated enumeration of the pointers in an object, calling back
- * to a given plan for each pointer encountered. <b>Jikes RVM never
- * delegates, so this is never executed</b>.
- *
+ * to a given plan for each pointer encountered.
* @param object The object to be scanned.
* @param _enum the Enumerator object through which the trace
* is made
*/
public final void enumeratePointers(ObjectReference object, Enumerator _enum)
throws UninterruptiblePragma, InlinePragma {
- // Never reached
- VM.assertions._assert(false);
+ VM.assertions._assert(false); //debug when you hit this
}
/**
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Strings.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Strings.java?rev=434075&r1=434074&r2=434075&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Strings.java (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/MMTk/ext/vm/HarmonyDRLVM/org/apache/HarmonyDRLVM/mm/mmtk/Strings.java Wed Aug 23 09:43:07 2006
@@ -72,13 +72,19 @@
int dstBegin, int dstEnd)
throws LogicallyUninterruptiblePragma {
-
int len = src.length();
- int n = (dstBegin + len <= dstEnd) ? len : (dstEnd - dstBegin);
- for (int i = 0; i < n; i++)
- {
- Barriers.setArrayNoBarrierStatic(dst, dstBegin + i, src.charAt(i));
- }
- return n;
+ int span = 0;
+ if (dstBegin + span <= dstEnd)
+ {
+ span = len;
+ } else
+ {
+ span = dstEnd - dstBegin;
+ }
+ for (int xx = 0; xx < span; xx++)
+ {
+ Barriers.setArrayNoBarrierStatic(dst, dstBegin + xx, src.charAt(xx) );
+ }
+ return span;
}
}