|
Message
From: cvs at opencores.org<cvs@o...>
Date: Mon Jul 30 03:42:08 CEST 2007
Subject: [cvs-checkins] MODIFIED: jop ...
Date: 00/07/07 30:03:42 Modified: jop/java/tools/src/com/jopdesign/build MethodInfo.java Log: invoke <clinit> when short enough Revision Changes Path 1.8 jop/java/tools/src/com/jopdesign/build/MethodInfo.java http://www.opencores.org/cvsweb.shtml/jop/java/tools/src/com/jopdesign/build/MethodInfo.java.diff?r1=1.7&r2=1.8 (In the diff below, changes in quantity of whitespace are not shown.) Index: MethodInfo.java =================================================================== RCS file: /cvsroot/martin/jop/java/tools/src/com/jopdesign/build/MethodInfo.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- MethodInfo.java 7 Mar 2006 10:15:15 -0000 1.7 +++ MethodInfo.java 30 Jul 2007 01:42:07 -0000 1.8 @@ -74,6 +74,7 @@ // System.err.println(" ++++++++++++ "+methodId+" --> mlocals ="+mlocals+" margs ="+margs); len = (m.getCode().getCode().length + 3)/4; + // TODO: couldn't len=JOP...MAX_SIZE/4 be ok? if (len>=JOPizer.METHOD_MAX_SIZE/4 || mreallocals>31 || margs>31) { // we interprete clinit on JOP - no size restriction if (!m.getName().equals("<clinit>")) { @@ -96,7 +97,7 @@ public void dumpMethodStruct(PrintWriter out, int addr) { - if (methodId.equals(JOPizer.clinitSig)) { + if (methodId.equals(JOPizer.clinitSig) && len>=JOPizer.METHOD_MAX_SIZE/4) { out.println("\t// no size for <clinit> - we iterpret it and allow larger methods!"); } // java_lang_String @@ -119,8 +120,9 @@ out.println("\t\t//\tlocals: "+(mreallocals+margs)+" args size: "+margs); int word1 = codeAddress << 10 | len; - // we allow only large <clinit> methods - if (methodId.equals(JOPizer.clinitSig)) { + // no length on large <clinit> methods + // get interpreted at start - see Startup.clazzinit() + if (methodId.equals(JOPizer.clinitSig) && len>=JOPizer.METHOD_MAX_SIZE/4) { word1 = codeAddress << 10; } int word2 = cli.cpoolAddress << 10 | mreallocals << 5 | margs;
|
 |