projects
/
nestedvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cleanup runtime compiler, auto lessconstants
[nestedvm.git]
/
src
/
org
/
ibex
/
nestedvm
/
ClassFileCompiler.java
diff --git
a/src/org/ibex/nestedvm/ClassFileCompiler.java
b/src/org/ibex/nestedvm/ClassFileCompiler.java
index
64269fb
..
e600097
100644
(file)
--- a/
src/org/ibex/nestedvm/ClassFileCompiler.java
+++ b/
src/org/ibex/nestedvm/ClassFileCompiler.java
@@
-53,7
+53,15
@@
public class ClassFileCompiler extends Compiler implements CGConst {
public void setWarnWriter(PrintStream warn) { this.warn = warn; }
protected void _go() throws Exn, IOException {
public void setWarnWriter(PrintStream warn) { this.warn = warn; }
protected void _go() throws Exn, IOException {
- if(lessConstants) throw new Exn("ClassFileCompiler doesn't support -o lessconstants");
+ try {
+ __go();
+ } catch(ClassGen.Exn e) {
+ e.printStackTrace();
+ throw new Exn("Class generation exception: " + e.toString());
+ }
+ }
+
+ private void __go() throws Exn, IOException {
if(!pruneCases) throw new Exn("-o prunecases MUST be enabled for ClassFileCompiler");
// Class
if(!pruneCases) throw new Exn("-o prunecases MUST be enabled for ClassFileCompiler");
// Class
@@
-558,6
+566,7
@@
public class ClassFileCompiler extends Compiler implements CGConst {
// add another copy and jump over
int b = mg.add(GOTO);
// add another copy and jump over
int b = mg.add(GOTO);
+ insnTargets[(pc+4-startOfMethod)/4].setTarget(mg.size());
emitInstruction(-1,nextInsn,01); // delay slot
mg.setArg(b,mg.size());
emitInstruction(-1,nextInsn,01); // delay slot
mg.setArg(b,mg.size());