|
From: <kon...@us...> - 2006-12-16 15:06:30
|
Revision: 2933
http://jnode.svn.sourceforge.net/jnode/?rev=2933&view=rev
Author: konkubinaten
Date: 2006-12-16 07:06:27 -0800 (Sat, 16 Dec 2006)
Log Message:
-----------
Update to support the setting of default compiler
Modified Paths:
--------------
branches/jikesRVM/core/src/core/org/jnode/vm/LoadCompileService.java
branches/jikesRVM/core/src/core/org/jnode/vm/x86/VmX86Architecture.java
Modified: branches/jikesRVM/core/src/core/org/jnode/vm/LoadCompileService.java
===================================================================
--- branches/jikesRVM/core/src/core/org/jnode/vm/LoadCompileService.java 2006-12-15 16:55:41 UTC (rev 2932)
+++ branches/jikesRVM/core/src/core/org/jnode/vm/LoadCompileService.java 2006-12-16 15:06:27 UTC (rev 2933)
@@ -39,6 +39,8 @@
private final NativeCodeCompiler[] testCompilers;
private static boolean started = false;
+
+ private static int defaultCompiler = 0;
/**
* Default ctor
@@ -177,14 +179,21 @@
*/
private void doCompile(VmMethod vmMethod, int optLevel,
boolean enableTestCompilers) {
+
final NativeCodeCompiler cmps[];
- int index;
+
+ int index;
+ if (optLevel == 0)
+ index = 0;
+ else if (defaultCompiler == 0)
+ index = optLevel;
+ else
+ index = defaultCompiler;
+
if (enableTestCompilers) {
- index = optLevel;
optLevel += compilers.length;
cmps = testCompilers;
} else {
- index = optLevel;
cmps = compilers;
}
@@ -342,4 +351,8 @@
return "Error in class loading: ";
}
}
+
+ public static void setDefaultCompiler(int defaultCompiler) {
+ LoadCompileService.defaultCompiler = defaultCompiler;
+ }
}
Modified: branches/jikesRVM/core/src/core/org/jnode/vm/x86/VmX86Architecture.java
===================================================================
--- branches/jikesRVM/core/src/core/org/jnode/vm/x86/VmX86Architecture.java 2006-12-15 16:55:41 UTC (rev 2932)
+++ branches/jikesRVM/core/src/core/org/jnode/vm/x86/VmX86Architecture.java 2006-12-16 15:06:27 UTC (rev 2933)
@@ -147,7 +147,8 @@
this.compilers[1] = new X86Level1ACompiler();
}
this.compilers[2] = new JikesRVMOptCompiler();
- this.compilers[3] = new X86Level1ACompiler();
+ //this.compilers[3] = this.compilers[2];
+ this.compilers[3] = this.compilers[1];
this.testCompilers = null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|