joeq-checkins Mailing List for joeq virtual machine
Status: Alpha
Brought to you by:
joewhaley
You can subscribe to this list here.
2002 |
Jan
(6) |
Feb
(67) |
Mar
(34) |
Apr
(53) |
May
(82) |
Jun
(72) |
Jul
(145) |
Aug
(107) |
Sep
(327) |
Oct
(105) |
Nov
(51) |
Dec
(118) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(45) |
Feb
(78) |
Mar
(184) |
Apr
(32) |
May
(108) |
Jun
(26) |
Jul
(100) |
Aug
(171) |
Sep
(90) |
Oct
(185) |
Nov
(107) |
Dec
(104) |
2004 |
Jan
(2) |
Feb
(71) |
Mar
(217) |
Apr
(157) |
May
(103) |
Jun
(33) |
Jul
(12) |
Aug
(163) |
Sep
(100) |
Oct
(120) |
Nov
(36) |
Dec
(20) |
2005 |
Jan
(99) |
Feb
(52) |
Mar
(45) |
Apr
(28) |
May
(46) |
Jun
(3) |
Jul
(8) |
Aug
(8) |
Sep
(26) |
Oct
(3) |
Nov
|
Dec
(8) |
2006 |
Jan
(25) |
Feb
(84) |
Mar
(57) |
Apr
(3) |
May
(3) |
Jun
(7) |
Jul
(6) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(2) |
2007 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(3) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2014 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <joe...@us...> - 2014-02-26 06:27:26
|
Revision: 2484 http://sourceforge.net/p/joeq/svn/2484 Author: joewhaley Date: 2014-02-26 06:27:08 +0000 (Wed, 26 Feb 2014) Log Message: ----------- Fix putstatic_* in reflective interpreter. Thanks to Ryan Propper for finding this bug. Modified Paths: -------------- trunk/joeq_core/joeq/Runtime/BasicReflectionImpl.java Modified: trunk/joeq_core/joeq/Runtime/BasicReflectionImpl.java =================================================================== --- trunk/joeq_core/joeq/Runtime/BasicReflectionImpl.java 2008-10-30 01:02:25 UTC (rev 2483) +++ trunk/joeq_core/joeq/Runtime/BasicReflectionImpl.java 2014-02-26 06:27:08 UTC (rev 2484) @@ -528,44 +528,44 @@ } public void putstatic_I(jq_StaticField f, int v) { Assert._assert(f.getType() == jq_Primitive.INT); - f.getDeclaringClass().setStaticData(f, v); + Reflection.obj_trav.putStaticFieldValue(f, new Integer(v)); } public void putstatic_L(jq_StaticField f, long v) { Assert._assert(f.getType() == jq_Primitive.LONG); - f.getDeclaringClass().setStaticData(f, v); + Reflection.obj_trav.putStaticFieldValue(f, new Long(v)); } public void putstatic_F(jq_StaticField f, float v) { Assert._assert(f.getType() == jq_Primitive.FLOAT); - f.getDeclaringClass().setStaticData(f, v); + Reflection.obj_trav.putStaticFieldValue(f, new Float(v)); } public void putstatic_D(jq_StaticField f, double v) { Assert._assert(f.getType() == jq_Primitive.DOUBLE); - f.getDeclaringClass().setStaticData(f, v); + Reflection.obj_trav.putStaticFieldValue(f, new Double(v)); } public void putstatic_A(jq_StaticField f, Object v) { Assert._assert(v == null || TypeCheck.isAssignable(jq_Reference.getTypeOf(v), f.getType())); Assert._assert(!f.getType().isAddressType()); - f.getDeclaringClass().setStaticData(f, v); + Reflection.obj_trav.putStaticFieldValue(f, v); } public void putstatic_P(jq_StaticField f, Address v) { Assert._assert(f.getType().isAddressType()); - f.getDeclaringClass().setStaticData(f, v); + Reflection.obj_trav.putStaticFieldValue(f, v); } public void putstatic_Z(jq_StaticField f, boolean v) { Assert._assert(f.getType() == jq_Primitive.BOOLEAN); - f.getDeclaringClass().setStaticData(f, v?1:0); + Reflection.obj_trav.putStaticFieldValue(f, Convert.getBoolean(v)); } public void putstatic_B(jq_StaticField f, byte v) { Assert._assert(f.getType() == jq_Primitive.BYTE); - f.getDeclaringClass().setStaticData(f, (int)v); + Reflection.obj_trav.putStaticFieldValue(f, new Byte(v)); } public void putstatic_S(jq_StaticField f, short v) { Assert._assert(f.getType() == jq_Primitive.SHORT); - f.getDeclaringClass().setStaticData(f, (int)v); + Reflection.obj_trav.putStaticFieldValue(f, new Short(v)); } public void putstatic_C(jq_StaticField f, char v) { Assert._assert(f.getType() == jq_Primitive.CHAR); - f.getDeclaringClass().setStaticData(f, (int)v); + Reflection.obj_trav.putStaticFieldValue(f, new Character(v)); } public int arraylength(Object o) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cu...@us...> - 2008-10-30 01:02:29
|
Revision: 2483 http://joeq.svn.sourceforge.net/joeq/?rev=2483&view=rev Author: cunkel Date: 2008-10-30 01:02:25 +0000 (Thu, 30 Oct 2008) Log Message: ----------- we sometimes put NDs in hashmaps with other types so we must be prepared to compare for equality against them. (it seems like some fluke of the jdk hashmap that this hasn't been triggered before.) Modified Paths: -------------- trunk/joeq_core/joeq/Class/jq_NameAndDesc.java Modified: trunk/joeq_core/joeq/Class/jq_NameAndDesc.java =================================================================== --- trunk/joeq_core/joeq/Class/jq_NameAndDesc.java 2007-10-30 05:17:36 UTC (rev 2482) +++ trunk/joeq_core/joeq/Class/jq_NameAndDesc.java 2008-10-30 01:02:25 UTC (rev 2483) @@ -25,7 +25,14 @@ public final Utf8 getName() { return name; } public final Utf8 getDesc() { return desc; } - public boolean equals(Object o) { return equals((jq_NameAndDesc)o); } + public boolean equals(Object o) { + if (o instanceof jq_NameAndDesc) { + return equals((jq_NameAndDesc)o); + } + else { + return false; + } + } public boolean equals(jq_NameAndDesc that) { return this.name == that.name && this.desc == that.desc; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cu...@us...> - 2007-10-30 05:17:40
|
Revision: 2482 http://joeq.svn.sourceforge.net/joeq/?rev=2482&view=rev Author: cunkel Date: 2007-10-29 22:17:36 -0700 (Mon, 29 Oct 2007) Log Message: ----------- allow roots to change (if underlying does.) Modified Paths: -------------- trunk/joeq_core/joeq/Compiler/Quad/FilteredCallGraph.java Modified: trunk/joeq_core/joeq/Compiler/Quad/FilteredCallGraph.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Quad/FilteredCallGraph.java 2007-09-24 23:26:27 UTC (rev 2481) +++ trunk/joeq_core/joeq/Compiler/Quad/FilteredCallGraph.java 2007-10-30 05:17:36 UTC (rev 2482) @@ -35,7 +35,7 @@ } public void setRoots(Collection roots) { - Assert.UNREACHABLE(); + base.setRoots(roots); } public Collection getTargetMethods(Object context, ProgramLocation callSite) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cu...@us...> - 2007-09-24 23:26:28
|
Revision: 2481 http://joeq.svn.sourceforge.net/joeq/?rev=2481&view=rev Author: cunkel Date: 2007-09-24 16:26:27 -0700 (Mon, 24 Sep 2007) Log Message: ----------- remove some debugging code. Modified Paths: -------------- trunk/jwutil/main/src/java/jwutil/graphs/SCCPathNumbering.java Modified: trunk/jwutil/main/src/java/jwutil/graphs/SCCPathNumbering.java =================================================================== --- trunk/jwutil/main/src/java/jwutil/graphs/SCCPathNumbering.java 2007-08-09 08:50:48 UTC (rev 2480) +++ trunk/jwutil/main/src/java/jwutil/graphs/SCCPathNumbering.java 2007-09-24 23:26:27 UTC (rev 2481) @@ -87,14 +87,14 @@ if (TRACE_NUMBERING) System.out.print("done."); if (TRACE_NUMBERING) System.out.print("Root SCCs: " + sccs); - DumpDotGraph ddg = new DumpDotGraph(); + /* DumpDotGraph ddg = new DumpDotGraph(); ddg.setNavigator(graph.getNavigator()); ddg.setNodeSet(new HashSet(graph.list())); try { ddg.dump("out.txt"); } catch (IOException e1) { e1.printStackTrace(); - } + } */ SCComponent scc = graph.getFirst(); while (scc != null) { @@ -198,9 +198,6 @@ } private void addEdges(SCComponent scc1) { - if(scc1.getId() == 36 || scc1.getId() == 14) { - System.out.println("HERE"); - } if (TRACE_NUMBERING) System.out.println("Adding edges SCC"+scc1.getId()); Range r1 = (Range) sccNumbering.get(scc1); if (scc1.prevLength() == 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2007-08-09 08:50:51
|
Revision: 2480 http://joeq.svn.sourceforge.net/joeq/?rev=2480&view=rev Author: joewhaley Date: 2007-08-09 01:50:48 -0700 (Thu, 09 Aug 2007) Log Message: ----------- Update homepage url. Modified Paths: -------------- trunk/joeq_core/xdocs/about/bootstrapping.xml trunk/joeq_core/xdocs/index.xml Modified: trunk/joeq_core/xdocs/about/bootstrapping.xml =================================================================== --- trunk/joeq_core/xdocs/about/bootstrapping.xml 2007-08-09 08:48:26 UTC (rev 2479) +++ trunk/joeq_core/xdocs/about/bootstrapping.xml 2007-08-09 08:50:48 UTC (rev 2480) @@ -14,7 +14,7 @@ </p> <p> John Whaley. -<a href="http://www.stanford.edu/~jwhaley/papers/reflection01.pdf">System +<a href="http://suif.stanford.edu/~jwhaley/papers/reflection01.pdf">System Checkpointing Using Reflection and Program Analysis</a>. Proceedings of the Third International Conference on Metalevel Architectures and Separation of Crosscutting Concerns, REFLECTION 2001, Kyoto, Japan, @@ -81,7 +81,7 @@ a list in jq.on_vm_startup. Code in that list is executed at program startup. </p> <p> -<a href="http://www.stanford.edu/~jwhaley/papers/reflection01.pdf">System +<a href="http://suif.stanford.edu/~jwhaley/papers/reflection01.pdf">System Checkpointing Using Reflection and Program Analysis</a>. </p> </section> Modified: trunk/joeq_core/xdocs/index.xml =================================================================== --- trunk/joeq_core/xdocs/index.xml 2007-08-09 08:48:26 UTC (rev 2479) +++ trunk/joeq_core/xdocs/index.xml 2007-08-09 08:50:48 UTC (rev 2480) @@ -27,9 +27,9 @@ <p> Want to learn more? Check out our overview paper that appeared in ACM SIGPLAN Workshop on Interpreters, Virtual Machines and Emulators 2003 ( - <a href="http://www.stanford.edu/~jwhaley/papers/ivme03.pdf">PDF</a>, + <a href="http://suif.stanford.edu/~jwhaley/papers/ivme03.pdf">PDF</a>, <a href="http://joeq.sourceforge.net/ivme03/">HTML</a>). - You can also see a <a href="http://www.stanford.edu/~jwhaley/sun-talk.ppt">presentation</a> + You can also see a <a href="http://suif.stanford.edu/~jwhaley/sun-talk.ppt">presentation</a> I did on joeq at Sun Microsystems. More information is available at the <a href="about/index.html">What is joeq?</a> link on the left, and on our This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2007-08-09 08:48:31
|
Revision: 2479 http://joeq.svn.sourceforge.net/joeq/?rev=2479&view=rev Author: joewhaley Date: 2007-08-09 01:48:26 -0700 (Thu, 09 Aug 2007) Log Message: ----------- Update homepage url. Modified Paths: -------------- trunk/jwutil/xdocs/navigation.xml Modified: trunk/jwutil/xdocs/navigation.xml =================================================================== --- trunk/jwutil/xdocs/navigation.xml 2007-08-09 08:44:11 UTC (rev 2478) +++ trunk/jwutil/xdocs/navigation.xml 2007-08-09 08:48:26 UTC (rev 2479) @@ -6,7 +6,7 @@ <item name="SUIF Compiler Group" href="http://suif.stanford.edu" /> <item name="Author's Homepage" - href="http://www.stanford.edu/~jwhaley/" /> + href="http://suif.stanford.edu/~jwhaley/" /> </links> <menu name="Overview"> <item name="What is it?" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2007-08-09 08:44:14
|
Revision: 2478 http://joeq.svn.sourceforge.net/joeq/?rev=2478&view=rev Author: joewhaley Date: 2007-08-09 01:44:11 -0700 (Thu, 09 Aug 2007) Log Message: ----------- Update homepage url. Modified Paths: -------------- trunk/jwutil/project.xml Modified: trunk/jwutil/project.xml =================================================================== --- trunk/jwutil/project.xml 2007-06-15 22:23:21 UTC (rev 2477) +++ trunk/jwutil/project.xml 2007-08-09 08:44:11 UTC (rev 2478) @@ -33,7 +33,7 @@ <roles> <role>Project Manager</role> </roles> - <url>http://www.stanford.edu/~jwhaley</url> + <url>http://suif.stanford.edu/~jwhaley</url> <timezone>-8</timezone> </developer> </developers> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2007-06-15 22:23:22
|
Revision: 2477 http://svn.sourceforge.net/joeq/?rev=2477&view=rev Author: joewhaley Date: 2007-06-15 15:23:21 -0700 (Fri, 15 Jun 2007) Log Message: ----------- Added Google Analytics. Modified Paths: -------------- trunk/joeq_core/xdocs/navigation.xml Modified: trunk/joeq_core/xdocs/navigation.xml =================================================================== --- trunk/joeq_core/xdocs/navigation.xml 2007-02-28 19:14:41 UTC (rev 2476) +++ trunk/joeq_core/xdocs/navigation.xml 2007-06-15 22:23:21 UTC (rev 2477) @@ -49,6 +49,14 @@ <item name="joeq source code (20030812)" href="http://prdownloads.sourceforge.net/joeq/joeq_source_20030812.tar.gz"/> </menu> + <footer> +<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> +</script> +<script type="text/javascript"> +_uacct = "UA-72567-4"; +urchinTracker(); +</script> + </footer> <search/> </body> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2007-02-28 19:14:45
|
Revision: 2476 http://svn.sourceforge.net/joeq/?rev=2476&view=rev Author: joewhaley Date: 2007-02-28 11:14:41 -0800 (Wed, 28 Feb 2007) Log Message: ----------- Added main() method to QuadInterpreter. Modified Paths: -------------- trunk/joeq_core/joeq/Interpreter/QuadInterpreter.java Modified: trunk/joeq_core/joeq/Interpreter/QuadInterpreter.java =================================================================== --- trunk/joeq_core/joeq/Interpreter/QuadInterpreter.java 2006-12-24 09:44:50 UTC (rev 2475) +++ trunk/joeq_core/joeq/Interpreter/QuadInterpreter.java 2007-02-28 19:14:41 UTC (rev 2476) @@ -3,6 +3,7 @@ // Licensed under the terms of the GNU LGPL; see COPYING for details. package joeq.Interpreter; +import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; @@ -29,8 +30,10 @@ import joeq.Compiler.Quad.RegisterFactory; import joeq.Compiler.Quad.Operand.ParamListOperand; import joeq.Compiler.Quad.RegisterFactory.Register; +import joeq.Main.HostedVM; import joeq.Memory.Address; import joeq.Runtime.Reflection; +import joeq.UTF.Utf8; import joeq.Util.Templates.ListIterator; import jwutil.collections.Filter; import jwutil.util.Assert; @@ -263,6 +266,36 @@ System.setSecurityManager(sm); } + public static void main(String[] s_args) throws Throwable { + String s = s_args[0]; + int dotloc = s.lastIndexOf('.'); + String rootMethodClassName = s.substring(0, dotloc); + String rootMethodName = s.substring(dotloc+1); + + HostedVM.initialize(); + + jq_Class c = (jq_Class)PrimordialClassLoader.loader.getOrCreateBSType("L"+rootMethodClassName.replace('.','/')+";"); + c.cls_initialize(); + + jq_StaticMethod rootm = null; + Utf8 rootm_name = Utf8.get(rootMethodName); + for(Iterator it = Arrays.asList(c.getDeclaredStaticMethods()).iterator(); + it.hasNext(); ) { + jq_StaticMethod m = (jq_StaticMethod)it.next(); + if (m.getName() == rootm_name) { + rootm = m; + break; + } + } + if (rootm == null) + Assert.UNREACHABLE("root method not found: "+rootMethodClassName+"."+rootMethodName); + Object[] args = ReflectiveInterpreter.parseMethodArgs(rootm.getParamWords(), rootm.getParamTypes(), s_args, 0); + + QuadInterpreter q = interpretMethod(rootm, args); + + System.out.println(q); + } + public static QuadInterpreter interpretMethod(jq_Method f, Object[] params) { QuadInterpreter s = new QuadInterpreter(f); s.trapOnSystemExit(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2006-12-24 09:44:54
|
Revision: 2475 http://svn.sourceforge.net/joeq/?rev=2475&view=rev Author: joewhaley Date: 2006-12-24 01:44:50 -0800 (Sun, 24 Dec 2006) Log Message: ----------- JDK 1.5 now bootstraps correctly again. Modified Paths: -------------- trunk/joeq_core/joeq/Compiler/Analysis/BDD/BuildBDDIR.java trunk/joeq_core/joeq/Compiler/Analysis/BDD/relations.csta trunk/joeq_core/joeq/Compiler/Analysis/BDD/rules.cspafly trunk/joeq_core/joeq/Compiler/Analysis/BDD/rules.csta trunk/joeq_core/joeq/Compiler/Analysis/BDD/rules.panotype trunk/joeq_core/joeq/Compiler/Analysis/BDD/rules.ta trunk/joeq_core/joeq/Runtime/ObjectTraverser.java trunk/joeq_native/joeq/Bootstrap/MultiPassBootImage.java trunk/joeq_native/joeq/Bootstrap/SinglePassBootImage.java trunk/joeq_native/joeq/ClassLib/sun15_linux/Interface.java Removed Paths: ------------- trunk/joeq_native/joeq/ClassLib/sun15_linux/java/io/FileDescriptor.java Modified: trunk/joeq_core/joeq/Compiler/Analysis/BDD/BuildBDDIR.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/BDD/BuildBDDIR.java 2006-12-24 07:54:24 UTC (rev 2474) +++ trunk/joeq_core/joeq/Compiler/Analysis/BDD/BuildBDDIR.java 2006-12-24 09:44:50 UTC (rev 2475) @@ -61,7 +61,7 @@ Map/*ProgramLocation,Quad*/ allocMap; String dumpDir = System.getProperty("bdddumpdir", ""); - boolean DUMP_TUPLES = !System.getProperty("dumptuples", "yes").equals("no"); + boolean DUMP_TUPLES = !System.getProperty("dumptuples", "no").equals("no"); String varOrderDesc = "method_quadxtargetxfallthrough_member_constant_opc_srcs_dest_srcNum"; @@ -699,7 +699,9 @@ public int quadIdFromInvokeBCLocation(ProgramLocation.BCProgramLocation bc) { Object o = invokeMap.get(bc); - Assert._assert(o != null); + if (o == null) { + Assert.UNREACHABLE(bc+" has no mapping"); + } return quadMap.get(o); } Modified: trunk/joeq_core/joeq/Compiler/Analysis/BDD/relations.csta =================================================================== (Binary files differ) Modified: trunk/joeq_core/joeq/Compiler/Analysis/BDD/rules.cspafly =================================================================== (Binary files differ) Modified: trunk/joeq_core/joeq/Compiler/Analysis/BDD/rules.csta =================================================================== (Binary files differ) Modified: trunk/joeq_core/joeq/Compiler/Analysis/BDD/rules.panotype =================================================================== (Binary files differ) Modified: trunk/joeq_core/joeq/Compiler/Analysis/BDD/rules.ta =================================================================== (Binary files differ) Modified: trunk/joeq_core/joeq/Runtime/ObjectTraverser.java =================================================================== --- trunk/joeq_core/joeq/Runtime/ObjectTraverser.java 2006-12-24 07:54:24 UTC (rev 2474) +++ trunk/joeq_core/joeq/Runtime/ObjectTraverser.java 2006-12-24 09:44:50 UTC (rev 2475) @@ -116,6 +116,9 @@ } catch (IllegalAccessException x) { Assert.UNREACHABLE(); return null; + } catch (IllegalArgumentException x) { + System.err.println("Cannot access "+f2+" in object of type "+base.getClass()); + throw x; } } Modified: trunk/joeq_native/joeq/Bootstrap/MultiPassBootImage.java =================================================================== --- trunk/joeq_native/joeq/Bootstrap/MultiPassBootImage.java 2006-12-24 07:54:24 UTC (rev 2474) +++ trunk/joeq_native/joeq/Bootstrap/MultiPassBootImage.java 2006-12-24 09:44:50 UTC (rev 2475) @@ -1379,8 +1379,14 @@ e = new SymbolTableEntry("joeq_code_startaddress", 0, 0, STB_GLOBAL, STT_OBJECT, text); symtab.addSymbol(e); + e = new SymbolTableEntry("joeq_code_endaddress", bca.size(), 0, STB_GLOBAL, STT_OBJECT, text); + symtab.addSymbol(e); + e = new SymbolTableEntry("joeq_data_startaddress", 0, 0, STB_GLOBAL, STT_OBJECT, data); symtab.addSymbol(e); + + e = new SymbolTableEntry("joeq_data_endaddress", heapCurrent, 0, STB_GLOBAL, STT_OBJECT, data); + symtab.addSymbol(e); } it = text_relocs1.iterator(); Modified: trunk/joeq_native/joeq/Bootstrap/SinglePassBootImage.java =================================================================== --- trunk/joeq_native/joeq/Bootstrap/SinglePassBootImage.java 2006-12-24 07:54:24 UTC (rev 2474) +++ trunk/joeq_native/joeq/Bootstrap/SinglePassBootImage.java 2006-12-24 09:44:50 UTC (rev 2475) @@ -357,6 +357,19 @@ jq_Reference jqType = (jq_Reference)Reflection.getJQType(objType); if (TRACE) out.println("Laying out object @"+addr.stringRep()+": "+objType+" "+Strings.hex(System.identityHashCode(o))); + if (o instanceof java.io.FileDescriptor && + o != java.io.FileDescriptor.in && + o != java.io.FileDescriptor.out && + o != java.io.FileDescriptor.err) { + int fd = Reflection.getfield_I(o, ((jq_Class)jqType).getOrCreateInstanceField("fd", "I")); + out.println("Warning: File descriptor "+fd+" will not be valid in bootstrap image."); + HashSet visited = new HashSet(); + UnknownObjectException x = new UnknownObjectException(o); + boolean found = findReferencePath(o, x, visited); + if (found) { + SinglePassBootImage.out.println(x); + } + } int status = 0; HeapAddress p_vtable = (HeapAddress) addr.offset(ObjectLayout.VTABLE_OFFSET); HeapAddress vtable = getAddressOf(p_vtable, jqType.getVTable()); Modified: trunk/joeq_native/joeq/ClassLib/sun15_linux/Interface.java =================================================================== --- trunk/joeq_native/joeq/ClassLib/sun15_linux/Interface.java 2006-12-24 07:54:24 UTC (rev 2474) +++ trunk/joeq_native/joeq/ClassLib/sun15_linux/Interface.java 2006-12-24 09:44:50 UTC (rev 2475) @@ -80,38 +80,16 @@ nullStaticFields.add(k.getOrCreateStaticField("first", "Lsun/misc/Cleaner;")); nullStaticFields.add(k.getOrCreateStaticField("dummyQueue", "Ljava/lang/ref/ReferenceQueue;")); - // reflective access not allowed. - k = (jq_Class) PrimordialClassLoader.loader.getOrCreateBSType("Ljava/io/FileDescriptor;"); - nullStaticFields.add(k.getOrCreateStaticField("in", "Ljava/io/FileDescriptor;")); - nullStaticFields.add(k.getOrCreateStaticField("out", "Ljava/io/FileDescriptor;")); - nullStaticFields.add(k.getOrCreateStaticField("err", "Ljava/io/FileDescriptor;")); + // Leads to an open file handle. + k = (jq_Class) PrimordialClassLoader.loader.getOrCreateBSType("Lsun/security/provider/NativePRNG;"); + nullStaticFields.add(k.getOrCreateStaticField("INSTANCE", "Lsun/security/provider/NativePRNG$RandomIO;")); - // we need to reinitialize in/out/err on startup. - if (jq.on_vm_startup != null) { - Object[] args = { } ; - k = (jq_Class)PrimordialClassLoader.loader.getOrCreateBSType("Ljava/io/FileDescriptor;"); - joeq.Class.jq_Method init_fd = k.getOrCreateStaticMethod("init", "()V"); - joeq.Bootstrap.MethodInvocation mi = new joeq.Bootstrap.MethodInvocation(init_fd, args); - jq.on_vm_startup.add(mi); - System.out.println("Added call to reinitialize in/out/err file descriptors on joeq startup: "+mi); - } + // Leads to an open file handle. + // TODO: needs reinit. + k = (jq_Class) PrimordialClassLoader.loader.getOrCreateBSType("Lsun/security/provider/SeedGenerator;"); + nullStaticFields.add(k.getOrCreateStaticField("instance", "Lsun/security/provider/SeedGenerator;")); } - /* - public java.lang.Object mapInstanceField(java.lang.Object o, Clazz.jq_InstanceField f) { - if (o instanceof FileDescriptor) { - String fieldName = f.getName().toString(); - if (fieldName.equals("fd")) { - if (o == FileDescriptor.in) return Integer.valueOf(0); - if (o == FileDescriptor.out) return Integer.valueOf(1); - if (o == FileDescriptor.err) return Integer.valueOf(2); - System.out.println("File descriptor will be stale: "+o); - } - } - return super.mapInstanceField(o, f); - } - */ - public static final jq_StaticField valueOffsetField; static { @@ -130,4 +108,5 @@ return super.mapStaticField(f); } } + } Deleted: trunk/joeq_native/joeq/ClassLib/sun15_linux/java/io/FileDescriptor.java =================================================================== --- trunk/joeq_native/joeq/ClassLib/sun15_linux/java/io/FileDescriptor.java 2006-12-24 07:54:24 UTC (rev 2474) +++ trunk/joeq_native/joeq/ClassLib/sun15_linux/java/io/FileDescriptor.java 2006-12-24 09:44:50 UTC (rev 2475) @@ -1,31 +0,0 @@ -// FileDescriptor.java, created Fri Apr 5 18:36:41 2002 by joewhaley -// Copyright (C) 2001-3 John Whaley <jw...@al...> -// Licensed under the terms of the GNU LGPL; see COPYING for details. -package joeq.ClassLib.sun15_linux.java.io; - -/* - * @author John Whaley <jw...@al...> - * @version $Id$ - */ -class FileDescriptor { - int fd; - private long handle; - - static FileDescriptor in; - static FileDescriptor out; - static FileDescriptor err; - - private /* */ FileDescriptor(int fd) { - this.fd = fd; - } - - public static void init() { - in = new FileDescriptor(0); - out = new FileDescriptor(0); - err = new FileDescriptor(0); - //in.fd = 0; - //out.fd = 1; - //err.fd = 2; - } - -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2006-12-24 07:54:26
|
Revision: 2474 http://svn.sourceforge.net/joeq/?rev=2474&view=rev Author: joewhaley Date: 2006-12-23 23:54:24 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Fix for corrupt ELF files. Thanks to Alan Ryan for tracking this down. Also an incomplete attempt at getting bootstrapping working on the newest JDK 1.5. Modified Paths: -------------- trunk/joeq_native/joeq/Bootstrap/SinglePassBootImage.java trunk/joeq_native/joeq/ClassLib/sun15_linux/Interface.java trunk/joeq_native/joeq/ClassLib/sun15_linux/java/io/FileDescriptor.java trunk/joeq_native/joeq/Linker/ELF/ELFOutput.java trunk/joeq_native/joeq/Linker/ELF/ELFRandomAccessFile.java trunk/jwutil/main/src/java/jwutil/io/DataOutputByteBuffer.java Modified: trunk/joeq_native/joeq/Bootstrap/SinglePassBootImage.java =================================================================== --- trunk/joeq_native/joeq/Bootstrap/SinglePassBootImage.java 2006-11-06 09:30:45 UTC (rev 2473) +++ trunk/joeq_native/joeq/Bootstrap/SinglePassBootImage.java 2006-12-24 07:54:24 UTC (rev 2474) @@ -1443,8 +1443,14 @@ e = new SymbolTableEntry("joeq_code_startaddress", 0, 0, STB_GLOBAL, STT_OBJECT, text); symtab.addSymbol(e); + e = new SymbolTableEntry("joeq_code_endaddress", bca.size(), 0, STB_GLOBAL, STT_OBJECT, text); + symtab.addSymbol(e); + e = new SymbolTableEntry("joeq_data_startaddress", 0, 0, STB_GLOBAL, STT_OBJECT, data); symtab.addSymbol(e); + + e = new SymbolTableEntry("joeq_data_endaddress", heapCurrent, 0, STB_GLOBAL, STT_OBJECT, data); + symtab.addSymbol(e); } it = text_relocs1.iterator(); @@ -1521,7 +1527,7 @@ byte[] b; if (heapBuffer.hasArray()) b = heapBuffer.array(); else { - b = new byte[heapBuffer.position()]; + b = new byte[heapCurrent]; heapBuffer.position(0); heapBuffer.get(b); } Modified: trunk/joeq_native/joeq/ClassLib/sun15_linux/Interface.java =================================================================== --- trunk/joeq_native/joeq/ClassLib/sun15_linux/Interface.java 2006-11-06 09:30:45 UTC (rev 2473) +++ trunk/joeq_native/joeq/ClassLib/sun15_linux/Interface.java 2006-12-24 07:54:24 UTC (rev 2474) @@ -50,6 +50,11 @@ k = (jq_Class) PrimordialClassLoader.getJavaLangClass(); nullInstanceFields.add(k.getOrCreateInstanceField("name", "Ljava/lang/String;")); + // generated during reflective access. + k = (jq_Class) PrimordialClassLoader.loader.getOrCreateBSType("Ljava/lang/reflect/Field;"); + nullInstanceFields.add(k.getOrCreateInstanceField("fieldAccessor", "Lsun/reflect/FieldAccessor;")); + nullInstanceFields.add(k.getOrCreateInstanceField("overrideFieldAccessor", "Lsun/reflect/FieldAccessor;")); + // crashes on reflective access. k = (jq_Class) PrimordialClassLoader.loader.getOrCreateBSType("Lsun/reflect/UnsafeStaticFieldAccessorImpl;"); nullInstanceFields.add(k.getOrCreateInstanceField("base", "Ljava/lang/Object;")); @@ -75,6 +80,12 @@ nullStaticFields.add(k.getOrCreateStaticField("first", "Lsun/misc/Cleaner;")); nullStaticFields.add(k.getOrCreateStaticField("dummyQueue", "Ljava/lang/ref/ReferenceQueue;")); + // reflective access not allowed. + k = (jq_Class) PrimordialClassLoader.loader.getOrCreateBSType("Ljava/io/FileDescriptor;"); + nullStaticFields.add(k.getOrCreateStaticField("in", "Ljava/io/FileDescriptor;")); + nullStaticFields.add(k.getOrCreateStaticField("out", "Ljava/io/FileDescriptor;")); + nullStaticFields.add(k.getOrCreateStaticField("err", "Ljava/io/FileDescriptor;")); + // we need to reinitialize in/out/err on startup. if (jq.on_vm_startup != null) { Object[] args = { } ; Modified: trunk/joeq_native/joeq/ClassLib/sun15_linux/java/io/FileDescriptor.java =================================================================== --- trunk/joeq_native/joeq/ClassLib/sun15_linux/java/io/FileDescriptor.java 2006-11-06 09:30:45 UTC (rev 2473) +++ trunk/joeq_native/joeq/ClassLib/sun15_linux/java/io/FileDescriptor.java 2006-12-24 07:54:24 UTC (rev 2474) @@ -15,10 +15,17 @@ static FileDescriptor out; static FileDescriptor err; + private /* */ FileDescriptor(int fd) { + this.fd = fd; + } + public static void init() { - in.fd = 0; - out.fd = 1; - err.fd = 2; + in = new FileDescriptor(0); + out = new FileDescriptor(0); + err = new FileDescriptor(0); + //in.fd = 0; + //out.fd = 1; + //err.fd = 2; } } Modified: trunk/joeq_native/joeq/Linker/ELF/ELFOutput.java =================================================================== --- trunk/joeq_native/joeq/Linker/ELF/ELFOutput.java 2006-11-06 09:30:45 UTC (rev 2473) +++ trunk/joeq_native/joeq/Linker/ELF/ELFOutput.java 2006-12-24 07:54:24 UTC (rev 2474) @@ -22,7 +22,7 @@ public DataOutput getOutput() { return out; } public void write_byte(byte v) throws IOException { - out.write(v); + out.writeByte(v); } public void write_bytes(byte[] v) throws IOException { Modified: trunk/joeq_native/joeq/Linker/ELF/ELFRandomAccessFile.java =================================================================== --- trunk/joeq_native/joeq/Linker/ELF/ELFRandomAccessFile.java 2006-11-06 09:30:45 UTC (rev 2473) +++ trunk/joeq_native/joeq/Linker/ELF/ELFRandomAccessFile.java 2006-12-24 07:54:24 UTC (rev 2474) @@ -96,7 +96,7 @@ } public void write_byte(byte v) throws IOException { - file.write(v); + file.writeByte(v); } public void write_bytes(byte[] v) throws IOException { @@ -105,25 +105,25 @@ public void write_half(int v) throws IOException { if (isLittleEndian()) { - file.write((byte)v); - file.write((byte)(v>>8)); + file.writeByte((byte)v); + file.writeByte((byte)(v>>8)); } else { - file.write((byte)(v>>8)); - file.write((byte)v); + file.writeByte((byte)(v>>8)); + file.writeByte((byte)v); } } public void write_word(int v) throws IOException { if (isLittleEndian()) { - file.write((byte)v); - file.write((byte)(v>>8)); - file.write((byte)(v>>16)); - file.write((byte)(v>>24)); + file.writeByte((byte)v); + file.writeByte((byte)(v>>8)); + file.writeByte((byte)(v>>16)); + file.writeByte((byte)(v>>24)); } else { - file.write((byte)(v>>24)); - file.write((byte)(v>>16)); - file.write((byte)(v>>8)); - file.write((byte)v); + file.writeByte((byte)(v>>24)); + file.writeByte((byte)(v>>16)); + file.writeByte((byte)(v>>8)); + file.writeByte((byte)v); } } Modified: trunk/jwutil/main/src/java/jwutil/io/DataOutputByteBuffer.java =================================================================== --- trunk/jwutil/main/src/java/jwutil/io/DataOutputByteBuffer.java 2006-11-06 09:30:45 UTC (rev 2473) +++ trunk/jwutil/main/src/java/jwutil/io/DataOutputByteBuffer.java 2006-12-24 07:54:24 UTC (rev 2474) @@ -31,7 +31,7 @@ * @see java.io.DataOutput#write(int) */ public void write(int b) throws IOException { - buf.putInt(b); + buf.put((byte)b); } /* (non-Javadoc) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2006-11-06 09:32:41
|
Revision: 2473 http://svn.sourceforge.net/joeq/?rev=2473&view=rev Author: joewhaley Date: 2006-11-06 01:30:45 -0800 (Mon, 06 Nov 2006) Log Message: ----------- Remove bogus absolute reference to junit jar. Modified Paths: -------------- trunk/joeq_test/.classpath Modified: trunk/joeq_test/.classpath =================================================================== --- trunk/joeq_test/.classpath 2006-07-20 06:51:52 UTC (rev 2472) +++ trunk/joeq_test/.classpath 2006-11-06 09:30:45 UTC (rev 2473) @@ -2,8 +2,8 @@ <classpath> <classpathentry kind="src" path=""/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="lib" path="C:/eclipse/plugins/org.junit_3.8.1/junit.jar"/> <classpathentry kind="src" path="/joeq_core"/> <classpathentry kind="src" path="/joeq_native"/> + <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3.8.1"/> <classpathentry kind="output" path=""/> </classpath> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2006-07-20 06:51:56
|
Revision: 2472 Author: joewhaley Date: 2006-07-19 23:51:52 -0700 (Wed, 19 Jul 2006) ViewCVS: http://svn.sourceforge.net/joeq/?rev=2472&view=rev Log Message: ----------- Update path to JavaBDD library. Modified Paths: -------------- trunk/joeq_core/Makefile trunk/joeq_core/project.properties Modified: trunk/joeq_core/Makefile =================================================================== --- trunk/joeq_core/Makefile 2006-07-17 16:02:56 UTC (rev 2471) +++ trunk/joeq_core/Makefile 2006-07-20 06:51:52 UTC (rev 2472) @@ -1,6 +1,6 @@ #MODULES = $(wildcard ../*) MODULES = ../joeq_core ../joeq_native ../joeq_x86 -SUPPORT_LIBS = joeq/Support/javabdd-1.0b2.jar joeq/Support/jwutil-1.0.jar +SUPPORT_LIBS = joeq/Support/javabdd-2.0.jar joeq/Support/jwutil-1.0.jar JDK14SUPPORT_LIB = joeq/Support/java14.jar ifeq (${OS},Windows_NT) @@ -70,7 +70,7 @@ ### RULES FOR BUILDING BOOT IMAGES # bootstrap: joeq/Main/Bootstrapper.class - java -Xbootclasspath/a:$(JDK14SUPPORT_LIB) -cp $(BOOTSTRAP_CLASSPATH) -mx480M joeq.Main.Bootstrapper + java -Xbootclasspath/a:$(JDK14SUPPORT_LIB) -cp $(BOOTSTRAP_CLASSPATH) -mx600M joeq.Main.Bootstrapper bootstrap-sun142-linux: javac java -cp $(BOOTSTRAP_CLASSPATH) -ms320M -mx320M joeq.Main.Bootstrapper -cl ../joeq_native/joeq/ClassLib/sun142_linux/classlist.txt Modified: trunk/joeq_core/project.properties =================================================================== --- trunk/joeq_core/project.properties 2006-07-17 16:02:56 UTC (rev 2471) +++ trunk/joeq_core/project.properties 2006-07-20 06:51:52 UTC (rev 2472) @@ -20,7 +20,7 @@ # Tell maven where to find support jars. maven.jar.override = on maven.jar.jwutil = ${basedir}/joeq/Support/jwutil-1.0.jar -maven.jar.javabdd = ${basedir}/joeq/Support/javabdd-1.0b2.jar +maven.jar.javabdd = ${basedir}/joeq/Support/javabdd-2.0.jar # Properties for Javadoc generation. maven.javadoc.links = http://java.sun.com/j2se/1.4.2/docs/api/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2006-07-17 16:03:02
|
Revision: 2471 Author: joewhaley Date: 2006-07-17 09:02:56 -0700 (Mon, 17 Jul 2006) ViewCVS: http://svn.sourceforge.net/joeq/?rev=2471&view=rev Log Message: ----------- Update maven project files to JavaBDD 2.0. Modified Paths: -------------- trunk/joeq_core/project.xml Modified: trunk/joeq_core/project.xml =================================================================== --- trunk/joeq_core/project.xml 2006-07-17 05:20:48 UTC (rev 2470) +++ trunk/joeq_core/project.xml 2006-07-17 16:02:56 UTC (rev 2471) @@ -81,8 +81,8 @@ <dependency> <groupId>javabdd</groupId> <artifactId>javabdd</artifactId> - <version>1.0b2</version> - <jar>javabdd-1.0b2.jar</jar> + <version>2.0</version> + <jar>javabdd-2.0.jar</jar> <type>jar</type> <url>http://javabdd.sourceforge.net</url> </dependency> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2006-07-17 05:21:11
|
Revision: 2470 Author: joewhaley Date: 2006-07-16 22:20:48 -0700 (Sun, 16 Jul 2006) ViewCVS: http://svn.sourceforge.net/joeq/?rev=2470&view=rev Log Message: ----------- Upgraded to latest JavaBDD 2.0 and jwutil libraries. Modified Paths: -------------- trunk/joeq_core/.classpath trunk/joeq_core/joeq/Compiler/Analysis/BDD/BuildBDDIR.java trunk/joeq_core/joeq/Compiler/Analysis/IPA/CollectionFinder.java trunk/joeq_core/joeq/Compiler/Analysis/IPA/PA.java trunk/joeq_core/joeq/Compiler/Analysis/IPA/PACallGraph.java trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAProxy.java trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAQuery.java trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAResultSelector.java trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAResults.java trunk/joeq_core/joeq/Compiler/Analysis/IPA/ParameterAliasing.java trunk/joeq_core/joeq/Compiler/Analysis/Primitive/PrimitivePA.java trunk/joeq_core/joeq/Compiler/Analysis/Primitive/PrimitivePACallGraph.java trunk/joeq_core/joeq/Support/jwutil-1.0.jar Added Paths: ----------- trunk/joeq_core/joeq/Support/javabdd-2.0.jar Removed Paths: ------------- trunk/joeq_core/joeq/Support/javabdd-1.0b2.jar Modified: trunk/joeq_core/.classpath =================================================================== --- trunk/joeq_core/.classpath 2006-07-17 05:20:43 UTC (rev 2469) +++ trunk/joeq_core/.classpath 2006-07-17 05:20:48 UTC (rev 2470) @@ -2,8 +2,8 @@ <classpath> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry excluding="target/" kind="src" path=""/> + <classpathentry exported="true" kind="lib" path="joeq/Support/jwutil-1.0.jar"/> + <classpathentry sourcepath="/JavaBDD" kind="lib" path="joeq/Support/javabdd-2.0.jar"/> <classpathentry kind="lib" path="joeq/Support/java14.jar"/> - <classpathentry exported="true" sourcepath="/jwutil/main/src/java" kind="lib" path="joeq/Support/jwutil-1.0.jar"/> - <classpathentry exported="true" sourcepath="/JavaBDD" kind="lib" path="joeq/Support/javabdd-1.0b2.jar"/> <classpathentry kind="output" path=""/> </classpath> Modified: trunk/joeq_core/joeq/Compiler/Analysis/BDD/BuildBDDIR.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/BDD/BuildBDDIR.java 2006-07-17 05:20:43 UTC (rev 2469) +++ trunk/joeq_core/joeq/Compiler/Analysis/BDD/BuildBDDIR.java 2006-07-17 05:20:48 UTC (rev 2470) @@ -39,6 +39,7 @@ import net.sf.javabdd.BDD; import net.sf.javabdd.BDDDomain; import net.sf.javabdd.BDDFactory; +import net.sf.javabdd.BDDVarSet; /** * BuildBDDIR @@ -505,11 +506,11 @@ } void dumpRelation(BufferedWriter dos, String name, BDD relation) throws IOException { - int[] a = relation.support().scanSetDomains(); + BDDDomain[] a = relation.support().getDomains(); dos.write(name+" ( "); for (int i = 0; i < a.length; ++i) { if (i > 0) dos.write(", "); - BDDDomain d = bdd.getDomain(a[i]); + BDDDomain d = a[i]; dos.write(d.toString()+" : "); if (d == quad || d == fallthrough || d == target) dos.write("quad "); else if (d == method) dos.write("method "); @@ -576,37 +577,42 @@ return; } Assert._assert(!relation.isOne()); - BDD rsup = relation.support(); - int[] a = rsup.scanSetDomains(); + BDDVarSet rsup = relation.support(); + BDDDomain[] a = rsup.getDomains(); rsup.free(); - BDD allDomains = bdd.one(); + BDDVarSet allDomains = bdd.emptySet(); + BDDDomain primaryDomain = null; + BDDVarSet allButPrimary = bdd.emptySet(); System.out.print(fileName+" domains {"); dos.write("#"); for (int i = 0; i < a.length; ++i) { - BDDDomain d = bdd.getDomain(a[i]); + BDDDomain d = a[i]; System.out.print(" "+d.toString()); dos.write(" "+d.toString()+":"+d.varNum()); - allDomains.andWith(d.set()); + allDomains.unionWith(d.set()); + if (i == 0) + primaryDomain = d; + else + allButPrimary.unionWith(d.set()); } dos.write("\n"); System.out.println(" } = "+relation.nodeCount()+" nodes"); - BDDDomain primaryDomain = bdd.getDomain(a[0]); int lines = 0; - BDD foo = relation.exist(allDomains.exist(primaryDomain.set())); + BDD foo = relation.exist(allButPrimary); for (Iterator i = foo.iterator(primaryDomain.set()); i.hasNext(); ) { BDD q = (BDD) i.next(); q.andWith(relation.id()); while (!q.isZero()) { BDD sat = q.satOne(allDomains, false); - BDD sup = q.support(); - int[] b = sup.scanSetDomains(); + BDDVarSet sup = q.support(); + BDDDomain[] b = sup.getDomains(); sup.free(); BigInteger[] v = sat.scanAllVar(); sat.free(); BDD t = bdd.one(); for (int j = 0, k = 0, l = 0; j < bdd.numberOfDomains(); ++j) { BDDDomain d = bdd.getDomain(j); - if (k >= a.length || a[k] != j) { + if (k >= a.length || a[k].getIndex() != j) { Assert._assert(v[j].signum() == 0, "v["+j+"] is "+v[j]); //dos.write("* "); t.andWith(d.domain()); @@ -614,7 +620,7 @@ } else { ++k; } - if (l >= b.length || b[l] != j) { + if (l >= b.length || b[l].getIndex() != j) { Assert._assert(v[j].signum() == 0, "v["+j+"] is "+v[j]); dos.write("* "); t.andWith(d.domain()); Modified: trunk/joeq_core/joeq/Compiler/Analysis/IPA/CollectionFinder.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/IPA/CollectionFinder.java 2006-07-17 05:20:43 UTC (rev 2469) +++ trunk/joeq_core/joeq/Compiler/Analysis/IPA/CollectionFinder.java 2006-07-17 05:20:48 UTC (rev 2470) @@ -118,7 +118,7 @@ public BDD calculateConcreteTypes(BDD types, boolean removeNull) { TypedBDD tb = (TypedBDD)types; BDD t = tb.getDomainSet().contains(_r.H1c) ? - types.relprod(_r.hT, _r.H1set.and(_r.H1cset)) : + types.relprod(_r.hT, _r.H1set.union(_r.H1cset)) : types.relprod(_r.hT, _r.H1set); // Remove NULL if it's present Modified: trunk/joeq_core/joeq/Compiler/Analysis/IPA/PA.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/IPA/PA.java 2006-07-17 05:20:43 UTC (rev 2469) +++ trunk/joeq_core/joeq/Compiler/Analysis/IPA/PA.java 2006-07-17 05:20:48 UTC (rev 2470) @@ -3,20 +3,6 @@ // Licensed under the terms of the GNU LGPL; see COPYING for details. package joeq.Compiler.Analysis.IPA; -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.FilenameFilter; -import java.io.IOException; -import java.io.PrintStream; -import java.io.PrintWriter; -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.math.BigInteger; import java.util.AbstractMap; import java.util.ArrayList; import java.util.Arrays; @@ -32,6 +18,20 @@ import java.util.Set; import java.util.StringTokenizer; import java.util.TreeSet; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.FilenameFilter; +import java.io.IOException; +import java.io.PrintStream; +import java.io.PrintWriter; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.math.BigInteger; import joeq.Class.PrimordialClassLoader; import joeq.Class.jq_Array; import joeq.Class.jq_Class; @@ -95,6 +95,7 @@ import net.sf.javabdd.BDDDomain; import net.sf.javabdd.BDDFactory; import net.sf.javabdd.BDDPairing; +import net.sf.javabdd.BDDVarSet; import net.sf.javabdd.TypedBDDFactory; import net.sf.javabdd.TypedBDDFactory.TypedBDD; /** @@ -274,11 +275,11 @@ BDDPairing V1toV2, V2toV1, H1toH2, ItoI2, I2toI, H2toH1, V1H1toV2H2, V2H2toV1H1; BDDPairing V1ctoV2c, V1cV2ctoV2cV1c, V1cH1ctoV2cV1c; BDDPairing T2toT1, T1toT2; - BDDPairing H1toV1c[], V1ctoH1[]; BDD V1csets[], V1cH1equals[]; - BDD V1set, V2set, H1set, H2set, T1set, T2set, Fset, Mset, Nset, Cset, Iset, I2set, Zset; - BDD V1V2set, V1Fset, V2Fset, V1FV2set, V1H1set, H1Fset, H2Fset, H1H2set, H1FH2set; - BDD IMset, INset, INH1set, INT2set, T2Nset, MZset; - BDD V1cset, V2cset, H1cset, H2cset, V1cV2cset, V1cH1cset, H1cH2cset; + BDDPairing H1toV1c[], V1ctoH1[]; BDDVarSet V1csets[]; BDD V1cH1equals[]; + BDDVarSet V1set, V2set, H1set, H2set, T1set, T2set, Fset, Mset, Nset, Cset, Iset, I2set, Zset; + BDDVarSet V1V2set, V1Fset, V2Fset, V1FV2set, V1H1set, H1Fset, H2Fset, H1H2set, H1FH2set; + BDDVarSet IMset, INset, INH1set, INT2set, T2Nset, MZset; + BDDVarSet V1cset, V2cset, H1cset, H2cset, V1cV2cset, V1cH1cset, H1cH2cset; BDD V1cdomain, V2cdomain, H1cdomain, H2cdomain; BDDDomain makeDomain(String name, int bits) { @@ -418,43 +419,43 @@ V1set = V1.set(); if (V1c.length > 0) { - V1cset = bdd.one(); + V1cset = bdd.emptySet(); V1cdomain = bdd.one(); for (int i = 0; i < V1c.length; ++i) { - V1cset.andWith(V1c[i].set()); + V1cset.unionWith(V1c[i].set()); V1cdomain.andWith(V1c[i].domain()); } - V1set.andWith(V1cset.id()); + V1set.unionWith(V1cset.id()); } V2set = V2.set(); if (V2c.length > 0) { - V2cset = bdd.one(); + V2cset = bdd.emptySet(); V2cdomain = bdd.one(); for (int i = 0; i < V2c.length; ++i) { - V2cset.andWith(V2c[i].set()); + V2cset.unionWith(V2c[i].set()); V2cdomain.andWith(V2c[i].domain()); } - V2set.andWith(V2cset.id()); + V2set.unionWith(V2cset.id()); } H1set = H1.set(); if (H1c.length > 0) { - H1cset = bdd.one(); + H1cset = bdd.emptySet(); H1cdomain = bdd.one(); for (int i = 0; i < H1c.length; ++i) { - H1cset.andWith(H1c[i].set()); + H1cset.unionWith(H1c[i].set()); H1cdomain.andWith(H1c[i].domain()); } - H1set.andWith(H1cset.id()); + H1set.unionWith(H1cset.id()); } H2set = H2.set(); if (H2c.length > 0) { - H2cset = bdd.one(); + H2cset = bdd.emptySet(); H2cdomain = bdd.one(); for (int i = 0; i < H2c.length; ++i) { - H2cset.andWith(H2c[i].set()); + H2cset.unionWith(H2c[i].set()); H2cdomain.andWith(H2c[i].domain()); } - H2set.andWith(H2cset.id()); + H2set.unionWith(H2cset.id()); } T1set = T1.set(); T2set = T2.set(); @@ -465,28 +466,28 @@ Iset = I.set(); I2set = I2.set(); Zset = Z.set(); - V1cV2cset = (V1c.length > 0) ? V1cset.and(V2cset) : bdd.zero(); - H1cH2cset = (H1c.length > 0) ? H1cset.and(H2cset) : bdd.zero(); + V1cV2cset = (V1c.length > 0) ? V1cset.union(V2cset) : bdd.emptySet(); + H1cH2cset = (H1c.length > 0) ? H1cset.union(H2cset) : bdd.emptySet(); if (V1c.length > 0) { - V1cH1cset = (H1c.length > 0) ? V1cset.and(H1cset) : V1cset; + V1cH1cset = (H1c.length > 0) ? V1cset.union(H1cset) : V1cset; } else { - V1cH1cset = (H1c.length > 0) ? H1cset : bdd.zero(); + V1cH1cset = (H1c.length > 0) ? H1cset : bdd.emptySet(); } - V1V2set = V1set.and(V2set); - V1FV2set = V1V2set.and(Fset); - V1H1set = V1set.and(H1set); - V1Fset = V1set.and(Fset); - V2Fset = V2set.and(Fset); - IMset = Iset.and(Mset); - INset = Iset.and(Nset); - INH1set = INset.and(H1set); - INT2set = INset.and(T2set); - H1Fset = H1set.and(Fset); - H2Fset = H2set.and(Fset); - H1H2set = H1set.and(H2set); - H1FH2set = H1Fset.and(H2set); - T2Nset = T2set.and(Nset); - MZset = Mset.and(Zset); + V1V2set = V1set.union(V2set); + V1FV2set = V1V2set.union(Fset); + V1H1set = V1set.union(H1set); + V1Fset = V1set.union(Fset); + V2Fset = V2set.union(Fset); + IMset = Iset.union(Mset); + INset = Iset.union(Nset); + INH1set = INset.union(H1set); + INT2set = INset.union(T2set); + H1Fset = H1set.union(Fset); + H2Fset = H2set.union(Fset); + H1H2set = H1set.union(H2set); + H1FH2set = H1Fset.union(H2set); + T2Nset = T2set.union(Nset); + MZset = Mset.union(Zset); A = bdd.zero(); vP = bdd.zero(); @@ -548,7 +549,7 @@ if (CARTESIAN_PRODUCT && false) { H1toV1c = new BDDPairing[MAX_PARAMS]; V1ctoH1 = new BDDPairing[MAX_PARAMS]; - V1csets = new BDD[MAX_PARAMS]; + V1csets = new BDDVarSet[MAX_PARAMS]; V1cH1equals = new BDD[MAX_PARAMS]; for (int i = 0; i < MAX_PARAMS; ++i) { H1toV1c[i] = bdd.makePair(H1, V1c[i]); @@ -679,8 +680,8 @@ * Finds invocation sites with no destinations. */ void traceNoDestanation() { - System.out.println("IE consists of " + IE.satCount(Iset.and(Mset)) + " elements."); - for(Iterator iter = IE.iterator(Iset.and(Mset)); iter.hasNext(); ) { + System.out.println("IE consists of " + IE.satCount(Iset.union(Mset)) + " elements."); + for(Iterator iter = IE.iterator(Iset.union(Mset)); iter.hasNext(); ) { BDD b = (BDD) iter.next(); int I_i = b.scanVar(I).intValue(); int M_i = b.scanVar(M).intValue(); @@ -1798,7 +1799,7 @@ } } - public void dumpWithV1c(BDD z, BDD set) { + public void dumpWithV1c(BDD z, BDDVarSet set) { BDD a = z.exist(V1cset); for (Iterator i = a.iterator(set); i.hasNext(); ) { BDD b = (BDD) i.next(); @@ -1842,7 +1843,7 @@ BDD q = (BDD) i.next(); // V2cxIxV1cxM BigInteger I_i = q.scanVar(I); System.out.println("Invocation site "+TS.elementName(I.getIndex(), I_i)); - BDD a = q.exist(IMset.and(V1cset)); // V2c + BDD a = q.exist(IMset.union(V1cset)); // V2c Iterator k = null; boolean bool1; if (a.isOne()) { @@ -1860,13 +1861,13 @@ for ( ; k.hasNext(); ) { BDD s = (BDD) k.next(); // V2cxIxV1cxM if (!bool1) { - System.out.println(" under context "+s.exist(IMset.and(V1cset)).toStringWithDomains(TS)); + System.out.println(" under context "+s.exist(IMset.union(V1cset)).toStringWithDomains(TS)); } for (Iterator j = s.iterator(Mset); j.hasNext(); ) { BDD r = (BDD) j.next(); // V2cxIxV1cxM BigInteger M_i = r.scanVar(M); System.out.println(" calls "+TS.elementName(M.getIndex(), M_i)); - BDD b = r.exist(IMset.and(V2cset)); + BDD b = r.exist(IMset.union(V2cset)); if (b.isOne()) { System.out.println(" all contexts"); } else if (b.satCount(V1cset) > 16) { @@ -1874,7 +1875,7 @@ } else { for (Iterator m = r.iterator(V1cset); m.hasNext(); ) { BDD t = (BDD) m.next(); - System.out.println(" context "+t.exist(IMset.and(V2cset)).toStringWithDomains(TS)); + System.out.println(" context "+t.exist(IMset.union(V2cset)).toStringWithDomains(TS)); } } } @@ -1892,7 +1893,7 @@ BigInteger H_i = r.scanVar(H1); System.out.println(" "+TS.elementName(H1.getIndex(), H_i)); if (USE_VCONTEXT) { - BDD a = r.exist(V1.set().and(H1set)); + BDD a = r.exist(V1.set().union(H1set)); if (a.isOne()) { System.out.println(" under all contexts"); } else { @@ -1979,7 +1980,7 @@ IEcs.orWith(t7); // Add the context for statically-bound call edges. - BDD t8 = staticCalls.relprod(vP, V1.set().and(H1.set())); // V1xIxM x V1cxV1xH1cxH1 = V1cxIxH1cxM + BDD t8 = staticCalls.relprod(vP, V1.set().union(H1.set())); // V1xIxM x V1cxV1xH1cxH1 = V1cxIxH1cxM t8.replaceWith(V1cH1ctoV2cV1c); // V2cxIxV1cxM IEcs.orWith(t8); } else if (CARTESIAN_PRODUCT) { @@ -2018,7 +2019,7 @@ BDD t9 = t8.relprod(vP, V1.set()); // IxV1 x V1cxV1xH1cxH1 = V1cxIxH1cxH1 if (TRACE_BIND) { System.out.println("t9 ="); - dumpWithV1c(t9, Iset.and(H1set)); + dumpWithV1c(t9, Iset.union(H1set)); } t8.free(); @@ -2046,7 +2047,7 @@ // Now, filter out unrealizables. // IxV1c[i]xV1xH1cxH1 x V2cxIxV1c[i] = V1cxV1xH1cxH1 // 13% - BDD newPt2 = newPt.relprod(context, V2cset.and(Iset)); + BDD newPt2 = newPt.relprod(context, V2cset.union(Iset)); newPt.free(); if (TRACE_BIND) dumpVP(newPt2); @@ -2188,7 +2189,7 @@ if(REFLECTION_STAT){ System.out.println("There are " + (int)t11.satCount(Iset) + " calls to Class.newInstance"); } - BDD t3 = t2.relprod(t11, bdd.zero()); // IxV1 + BDD t3 = t2.and(t11); // IxV1 t11.free(); t1.free(); BDD t31 = t3.replace(ItoI2); // I2xV1 @@ -2208,7 +2209,7 @@ t4.free(); if(TRACE_REFLECTION && TRACE) out.println("t41: " + t41.toStringWithDomains(TS) + " of size " + t41.satCount(Iset)); - BDD t6 = t41.relprod(actual, Iset.and(H1set)); // V2xI2xZ + BDD t6 = t41.relprod(actual, Iset.union(H1set)); // V2xI2xZ if(TRACE_REFLECTION_DOMAINS) out.println("t6: " + getBDDDomains(t6)); t41.free(); BDD t7 = t6.restrict(Z.ithVar(1)); // V2xI2 @@ -2228,7 +2229,7 @@ out.println("t9: " + getBDDDomains(t9)); } BDD constructorIE = bdd.zero(); - for(Iterator iter = t9.iterator(H1set.and(I2set)); iter.hasNext();){ + for(Iterator iter = t9.iterator(H1set.union(I2set)); iter.hasNext();){ BDD h = (BDD) iter.next(); //if(TRACE_REFLECTION_DOMAINS) out.println("h: " + getBDDDomains(h)); int h_i = h.scanVar(H1).intValue(); @@ -2321,7 +2322,7 @@ constructorIE.free(); if(TRACE_REFLECTION && !reflectiveCalls.isZero()){ out.println("reflectiveCalls: " + reflectiveCalls.toStringWithDomains(TS) + - " of size " + reflectiveCalls.satCount(Iset.and(Mset))); + " of size " + reflectiveCalls.satCount(Iset.union(Mset))); } BDD new_reflectiveCalls = reflectiveCalls.apply(old_reflectiveCalls, BDDFactory.diff); @@ -2331,11 +2332,11 @@ if(TRACE_REFLECTION) { out.println("Discovered new_reflectiveCalls: " + new_reflectiveCalls.toStringWithDomains(TS) + - " of size " + new_reflectiveCalls.satCount(Iset.and(H1set))); + " of size " + new_reflectiveCalls.satCount(Iset.union(H1set))); } // add the new points-to for reflective calls - for(Iterator iter = new_reflectiveCalls.iterator(Iset.and(Mset)); iter.hasNext();){ + for(Iterator iter = new_reflectiveCalls.iterator(Iset.union(Mset)); iter.hasNext();){ BDD i_bdd = (BDD) iter.next(); int I_i = i_bdd.scanVar(I).intValue(); ProgramLocation mc = (ProgramLocation) Imap.get(I_i); @@ -2398,21 +2399,21 @@ if(REFLECTION_STAT){ System.out.println("There are " + (int)t1.satCount(Iset) + " calls to Class.newInstance"); } - BDD t3 = Iret.relprod(t1, bdd.zero()).replace(V1toV2); // IxV2 - BDD t32 = t3.relprod(A, bdd.zero()); // I1xV2 x V1xV2 = I1xV1xV2 + BDD t3 = Iret.and(t1).replace(V1toV2); // IxV2 + BDD t32 = t3.and(A); // I1xV2 x V1xV2 = I1xV1xV2 //System.out.println("t32: " + t32.toStringWithDomains(TS)); Assert._assert(T1.size().equals(T2.size())); BDD notEqualTypes = (buildEquals(T1, T2)).not(); - BDD t33 = t32.relprod(vT, bdd.zero()); // I1xV1xV2 x V1xT1 = I1xV1xV2xT1 + BDD t33 = t32.and(vT); // I1xV1xV2 x V1xT1 = I1xV1xV2xT1 //System.out.println("t33: " + t33.toStringWithDomains(TS)); - BDD t34 = t33.relprod(vT.replace(V1toV2).replace(T1toT2), bdd.zero()); // I2xV1xV2xT1 x V2xT2 = I2xV1xV2xT1xT2 + BDD t34 = t33.and(vT.replace(V1toV2).replace(T1toT2)); // I2xV1xV2xT1 x V2xT2 = I2xV1xV2xT1xT2 //System.out.println("t34: " + t34.toStringWithDomains(TS)); BDD tuples = t34.relprod(notEqualTypes, T2set); //System.out.println("t35: " + t35.toStringWithDomains(TS)); // V1xV2xIxT1 t1.free(); t3.free(); t32.free(); t33.free(); t34.free(); BDD constructorIE = bdd.zero(); - for(Iterator iter = tuples.iterator(V1set.and(V2set).and(Iset).and(T1set)); iter.hasNext();){ + for(Iterator iter = tuples.iterator(V1set.union(V2set).union(Iset).union(T1set)); iter.hasNext();){ BDD tuple = (BDD) iter.next(); int V1_i = tuple.scanVar(V1).intValue(); int V2_i = tuple.scanVar(V2).intValue(); @@ -2466,7 +2467,7 @@ if(TRACE_REFLECTION && !reflectiveCalls.isZero()){ out.println("reflectiveCalls: " + reflectiveCalls.toStringWithDomains(TS) + - " of size " + reflectiveCalls.satCount(Iset.and(Mset))); + " of size " + reflectiveCalls.satCount(Iset.union(Mset))); } BDD new_reflectiveCalls = reflectiveCalls.apply(old_reflectiveCalls, BDDFactory.diff); @@ -2476,11 +2477,11 @@ if(TRACE_REFLECTION) { out.println("Discovered new_reflectiveCalls: " + new_reflectiveCalls.toStringWithDomains(TS) + - " of size " + new_reflectiveCalls.satCount(Iset.and(Mset))); + " of size " + new_reflectiveCalls.satCount(Iset.union(Mset))); } // add the new points-to for reflective calls - for(Iterator iter = new_reflectiveCalls.iterator(Iset.and(Mset)); iter.hasNext();){ + for(Iterator iter = new_reflectiveCalls.iterator(Iset.union(Mset)); iter.hasNext();){ BDD i_bdd = (BDD) iter.next(); int I_i = i_bdd.scanVar(I).intValue(); ProgramLocation mc = (ProgramLocation) Imap.get(I_i); @@ -2790,7 +2791,7 @@ BDD t9_i = t8_i.relprod(vP, V1.set()); // IxV1 x V1cxV1xH1cxH1 = V1cxIxH1cxH1 if (TRACE_BIND) { System.out.println("t9 ="); - dumpWithV1c(t9_i, Iset.and(H1set)); + dumpWithV1c(t9_i, Iset.union(H1set)); } t8_i.free(); @@ -2820,7 +2821,7 @@ // Now, filter out unrealizables. // IxV1c[i]xV1xH1cxH1 x V2cxIxV1c[i] = V1cxV1xH1cxH1 // 13% - BDD newPt2 = newPt.relprod(newContext, V2cset.and(Iset)); + BDD newPt2 = newPt.relprod(newContext, V2cset.union(Iset)); newPt.free(); if (TRACE_BIND) dumpVP(newPt2); @@ -3677,15 +3678,10 @@ } public static List activeDomains(BDD r) { - BDDFactory bdd = r.getFactory(); - BDD s = r.support(); - int[] a = s.scanSetDomains(); + BDDVarSet s = r.support(); + BDDDomain[] a = s.getDomains(); s.free(); - if (a == null) return null; - List result = new ArrayList(a.length); - for (int i = 0; i < a.length; ++i) { - result.add(bdd.getDomain(a[i])); - } + List result = Arrays.asList(a); return result; } @@ -3747,31 +3743,31 @@ bdd_save(dumpfilename+".S", S); System.out.println("L: "+(long) L.satCount(V1FV2set)+" relations, "+L.nodeCount()+" nodes"); bdd_save(dumpfilename+".L", L); - System.out.println("vT: "+(long) vT.satCount(V1.set().and(T1set))+" relations, "+vT.nodeCount()+" nodes"); + System.out.println("vT: "+(long) vT.satCount(V1.set().union(T1set))+" relations, "+vT.nodeCount()+" nodes"); bdd_save(dumpfilename+".vT", vT); - System.out.println("hT: "+(long) hT.satCount(H1.set().and(T2set))+" relations, "+hT.nodeCount()+" nodes"); + System.out.println("hT: "+(long) hT.satCount(H1.set().union(T2set))+" relations, "+hT.nodeCount()+" nodes"); bdd_save(dumpfilename+".hT", hT); - System.out.println("aT: "+(long) aT.satCount(T1set.and(T2set))+" relations, "+aT.nodeCount()+" nodes"); + System.out.println("aT: "+(long) aT.satCount(T1set.union(T2set))+" relations, "+aT.nodeCount()+" nodes"); bdd_save(dumpfilename+".aT", aT); - System.out.println("cha: "+(long) cha.satCount(T2Nset.and(Mset))+" relations, "+cha.nodeCount()+" nodes"); + System.out.println("cha: "+(long) cha.satCount(T2Nset.union(Mset))+" relations, "+cha.nodeCount()+" nodes"); bdd_save(dumpfilename+".cha", cha); - System.out.println("actual: "+(long) actual.satCount(Iset.and(Zset).and(V2.set()))+" relations, "+actual.nodeCount()+" nodes"); + System.out.println("actual: "+(long) actual.satCount(Iset.union(Zset).union(V2.set()))+" relations, "+actual.nodeCount()+" nodes"); bdd_save(dumpfilename+".actual", actual); - System.out.println("formal: "+(long) formal.satCount(MZset.and(V1.set()))+" relations, "+formal.nodeCount()+" nodes"); + System.out.println("formal: "+(long) formal.satCount(MZset.union(V1.set()))+" relations, "+formal.nodeCount()+" nodes"); bdd_save(dumpfilename+".formal", formal); - System.out.println("Iret: "+(long) Iret.satCount(Iset.and(V1.set()))+" relations, "+Iret.nodeCount()+" nodes"); + System.out.println("Iret: "+(long) Iret.satCount(Iset.union(V1.set()))+" relations, "+Iret.nodeCount()+" nodes"); bdd_save(dumpfilename+".Iret", Iret); - System.out.println("Mret: "+(long) Mret.satCount(Mset.and(V2.set()))+" relations, "+Mret.nodeCount()+" nodes"); + System.out.println("Mret: "+(long) Mret.satCount(Mset.union(V2.set()))+" relations, "+Mret.nodeCount()+" nodes"); bdd_save(dumpfilename+".Mret", Mret); - System.out.println("Ithr: "+(long) Ithr.satCount(Iset.and(V1.set()))+" relations, "+Ithr.nodeCount()+" nodes"); + System.out.println("Ithr: "+(long) Ithr.satCount(Iset.union(V1.set()))+" relations, "+Ithr.nodeCount()+" nodes"); bdd_save(dumpfilename+".Ithr", Ithr); - System.out.println("Mthr: "+(long) Mthr.satCount(Mset.and(V2.set()))+" relations, "+Mthr.nodeCount()+" nodes"); + System.out.println("Mthr: "+(long) Mthr.satCount(Mset.union(V2.set()))+" relations, "+Mthr.nodeCount()+" nodes"); bdd_save(dumpfilename+".Mthr", Mthr); - System.out.println("mI: "+(long) mI.satCount(INset.and(Mset))+" relations, "+mI.nodeCount()+" nodes"); + System.out.println("mI: "+(long) mI.satCount(INset.union(Mset))+" relations, "+mI.nodeCount()+" nodes"); bdd_save(dumpfilename+".mI", mI); - System.out.println("mV: "+(long) mV.satCount(Mset.and(V1.set()))+" relations, "+mV.nodeCount()+" nodes"); + System.out.println("mV: "+(long) mV.satCount(Mset.union(V1.set()))+" relations, "+mV.nodeCount()+" nodes"); bdd_save(dumpfilename+".mV", mV); - System.out.println("mC: "+(long) mC.satCount(Mset.and(C.set()))+" relations, "+mC.nodeCount()+" nodes"); + System.out.println("mC: "+(long) mC.satCount(Mset.union(C.set()))+" relations, "+mC.nodeCount()+" nodes"); bdd_save(dumpfilename+".mC", mC); System.out.println("sync: "+(long) sync.satCount(V1.set())+" relations, "+sync.nodeCount()+" nodes"); bdd_save(dumpfilename+".sync", sync); @@ -3783,15 +3779,15 @@ bdd_save(dumpfilename+".IE", IE); BuildBDDIR.dumpTuples(bdd, dumpfilename+".IE.tuples", IE); if (IEcs != null) { - System.out.println("IEcs: "+(long) IEcs.satCount(IMset.and(V1cV2cset))+" relations, "+IEcs.nodeCount()+" nodes"); + System.out.println("IEcs: "+(long) IEcs.satCount(IMset.union(V1cV2cset))+" relations, "+IEcs.nodeCount()+" nodes"); bdd_save(dumpfilename+".IEcs", IEcs); } if (vPfilter != null) { - System.out.println("vPfilter: "+(long) vPfilter.satCount(V1.set().and(H1.set()))+" relations, "+vPfilter.nodeCount()+" nodes"); + System.out.println("vPfilter: "+(long) vPfilter.satCount(V1.set().union(H1.set()))+" relations, "+vPfilter.nodeCount()+" nodes"); bdd_save(dumpfilename+".vPfilter", vPfilter); } if (hPfilter != null) { - System.out.println("hPfilter: "+(long) hPfilter.satCount(H1.set().and(Fset).and(H1.set()))+" relations, "+hPfilter.nodeCount()+" nodes"); + System.out.println("hPfilter: "+(long) hPfilter.satCount(H1.set().union(Fset).union(H1.set()))+" relations, "+hPfilter.nodeCount()+" nodes"); bdd_save(dumpfilename+".hPfilter", hPfilter); } if (IEfilter != null) { @@ -5490,15 +5486,15 @@ BDDDomain quad = bddIRBuilder.getQuadDomain(); BDDDomain member = bddIRBuilder.getMemberDomain(); System.out.println("vReg: " - + (long) vReg.satCount(V1.set().and(reg.set().and(M.set()))) + + (long) vReg.satCount(V1.set().union(reg.set().union(M.set()))) + " relations, " + vReg.nodeCount() + " nodes"); bdd_save(dumpPath + "/vReg.bdd", vReg); System.out.println("iQuad: " - + (long) iQuad.satCount(I.set().and(quad.set())) + + (long) iQuad.satCount(I.set().union(quad.set())) + " relations, " + iQuad.nodeCount() + " nodes"); bdd_save(dumpPath + "/iQuad.bdd", iQuad); System.out.println("fMember: " - + (long) fMember.satCount(F.set().and(member.set())) + + (long) fMember.satCount(F.set().union(member.set())) + " relations, " + fMember.nodeCount() + " nodes"); bdd_save(dumpPath + "/fMember.bdd", fMember); //System.out.println("hQuad: "+(long) sync.satCount(H1.set().and(quad.set()))+" relations, "+hQuad.nodeCount()+" nodes"); Modified: trunk/joeq_core/joeq/Compiler/Analysis/IPA/PACallGraph.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/IPA/PACallGraph.java 2006-07-17 05:20:43 UTC (rev 2469) +++ trunk/joeq_core/joeq/Compiler/Analysis/IPA/PACallGraph.java 2006-07-17 05:20:48 UTC (rev 2470) @@ -18,6 +18,7 @@ import net.sf.javabdd.BDD; import net.sf.javabdd.BDDDomain; import net.sf.javabdd.BDDFactory; +import net.sf.javabdd.BDDVarSet; /** * PACallGraph @@ -92,7 +93,7 @@ public static class BDDSet extends AbstractSet { BDD b; BDDDomain d; - BDD dset; + BDDVarSet dset; IndexedMap map; public BDDSet(BDD b, BDDDomain d, IndexedMap map) { this.b = b; Modified: trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAProxy.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAProxy.java 2006-07-17 05:20:43 UTC (rev 2469) +++ trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAProxy.java 2006-07-17 05:20:48 UTC (rev 2470) @@ -330,41 +330,41 @@ public net.sf.javabdd.BDDPairing T1toT2; public net.sf.javabdd.BDDPairing[] H1toV1c; public net.sf.javabdd.BDDPairing[] V1ctoH1; - public net.sf.javabdd.BDD[] V1csets; + public net.sf.javabdd.BDDVarSet[] V1csets; public net.sf.javabdd.BDD[] V1cH1equals; - public net.sf.javabdd.BDD V1set; - public net.sf.javabdd.BDD V2set; - public net.sf.javabdd.BDD H1set; - public net.sf.javabdd.BDD H2set; - public net.sf.javabdd.BDD T1set; - public net.sf.javabdd.BDD T2set; - public net.sf.javabdd.BDD Fset; - public net.sf.javabdd.BDD Mset; - public net.sf.javabdd.BDD Nset; - public net.sf.javabdd.BDD Iset; - public net.sf.javabdd.BDD Zset; - public net.sf.javabdd.BDD V1V2set; - public net.sf.javabdd.BDD V1Fset; - public net.sf.javabdd.BDD V2Fset; - public net.sf.javabdd.BDD V1FV2set; - public net.sf.javabdd.BDD V1H1set; - public net.sf.javabdd.BDD H1Fset; - public net.sf.javabdd.BDD H2Fset; - public net.sf.javabdd.BDD H1H2set; - public net.sf.javabdd.BDD H1FH2set; - public net.sf.javabdd.BDD IMset; - public net.sf.javabdd.BDD INset; - public net.sf.javabdd.BDD INH1set; - public net.sf.javabdd.BDD INT2set; - public net.sf.javabdd.BDD T2Nset; - public net.sf.javabdd.BDD MZset; - public net.sf.javabdd.BDD V1cset; - public net.sf.javabdd.BDD V2cset; - public net.sf.javabdd.BDD H1cset; - public net.sf.javabdd.BDD H2cset; - public net.sf.javabdd.BDD V1cV2cset; - public net.sf.javabdd.BDD V1cH1cset; - public net.sf.javabdd.BDD H1cH2cset; + public net.sf.javabdd.BDDVarSet V1set; + public net.sf.javabdd.BDDVarSet V2set; + public net.sf.javabdd.BDDVarSet H1set; + public net.sf.javabdd.BDDVarSet H2set; + public net.sf.javabdd.BDDVarSet T1set; + public net.sf.javabdd.BDDVarSet T2set; + public net.sf.javabdd.BDDVarSet Fset; + public net.sf.javabdd.BDDVarSet Mset; + public net.sf.javabdd.BDDVarSet Nset; + public net.sf.javabdd.BDDVarSet Iset; + public net.sf.javabdd.BDDVarSet Zset; + public net.sf.javabdd.BDDVarSet V1V2set; + public net.sf.javabdd.BDDVarSet V1Fset; + public net.sf.javabdd.BDDVarSet V2Fset; + public net.sf.javabdd.BDDVarSet V1FV2set; + public net.sf.javabdd.BDDVarSet V1H1set; + public net.sf.javabdd.BDDVarSet H1Fset; + public net.sf.javabdd.BDDVarSet H2Fset; + public net.sf.javabdd.BDDVarSet H1H2set; + public net.sf.javabdd.BDDVarSet H1FH2set; + public net.sf.javabdd.BDDVarSet IMset; + public net.sf.javabdd.BDDVarSet INset; + public net.sf.javabdd.BDDVarSet INH1set; + public net.sf.javabdd.BDDVarSet INT2set; + public net.sf.javabdd.BDDVarSet T2Nset; + public net.sf.javabdd.BDDVarSet MZset; + public net.sf.javabdd.BDDVarSet V1cset; + public net.sf.javabdd.BDDVarSet V2cset; + public net.sf.javabdd.BDDVarSet H1cset; + public net.sf.javabdd.BDDVarSet H2cset; + public net.sf.javabdd.BDDVarSet V1cV2cset; + public net.sf.javabdd.BDDVarSet V1cH1cset; + public net.sf.javabdd.BDDVarSet H1cH2cset; public net.sf.javabdd.BDD V1cdomain; public net.sf.javabdd.BDD V2cdomain; public net.sf.javabdd.BDD H1cdomain; Modified: trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAQuery.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAQuery.java 2006-07-17 05:20:43 UTC (rev 2469) +++ trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAQuery.java 2006-07-17 05:20:48 UTC (rev 2470) @@ -67,7 +67,7 @@ BDD params = _r.formal.relprod(methodBDD, _r.Mset); //System.out.println("params: " + params.toStringWithDomains()); TypedBDD contexts = (TypedBDD)params.relprod(_r.vP, - _r.V1.set().andWith(_r.H1cset).andWith(_r.H1.set()).andWith(_r.Z.set()) ); + _r.V1.set().unionWith(_r.H1cset).unionWith(_r.H1.set()).unionWith(_r.Z.set()) ); //System.out.println("contexts: \n" + paResults.toString(contexts, -1)); //TypedBDD pointsTo = (TypedBDD)params.relprod(r.vP, r.V1cH1cset); //System.out.println("pointsTo: \n" + paResults.toString(pointsTo, -1)); @@ -91,12 +91,12 @@ t = t2; //TypedBDD t = (TypedBDD)params.relprod(r.vP, r.V1.set()); - TypedBDD pointsTo = (TypedBDD)context.relprod(t, _r.V1cset.andWith(_r.H1cset)); + TypedBDD pointsTo = (TypedBDD)context.relprod(t, _r.V1cset.union(_r.H1cset)); t.free(); t = (TypedBDD)pointsTo.exist(_r.Z.set()); //System.out.println(t.satCount() + ", " + pointsTo.satCount()); - int pointsToSize = (int)pointsTo.satCount(_r.H1.set().and(_r.Zset)); + int pointsToSize = (int)pointsTo.satCount(_r.H1.set().union(_r.Zset)); int projSize = (int)t.satCount( _r.H1.set() ); if(projSize < pointsToSize) { if(!printedInfo.getValue()) { @@ -185,7 +185,7 @@ // these are the modified heap locations mods = _r.S.relprod(param, _r.V1set); // H1xH1cxFxV2xV1cxV2c } else { - BDD method_plus_context0 = methodBDD.andWith(_r.V1cset); + BDD method_plus_context0 = methodBDD.andWith(_r.V1c[0].ithVar(0)); BDD reachableVars = _paResults.getReachableVars(method_plus_context0); // V1xV1c reachableVars = reachableVars.exist(_r.V1cset); reachableVars.or(param); Modified: trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAResultSelector.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAResultSelector.java 2006-07-17 05:20:43 UTC (rev 2469) +++ trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAResultSelector.java 2006-07-17 05:20:48 UTC (rev 2470) @@ -231,7 +231,7 @@ BDD fBDD = r.F.ithVar(fieldIndex); // F // 2. project out H1, get all H2 elements - BDD h2 = r.H1FH2set.relprod(fBDD, r.H1set); // H2 + BDD h2 = r.hP.relprod(fBDD, r.H1set.union(r.Fset)); // H2 // 3. get all types of H2 elements TypedBDD typesOfH2 = (TypedBDD) h2.replace(r.H2toH1).relprod(r.hT, r.H1set); Modified: trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAResults.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAResults.java 2006-07-17 05:20:43 UTC (rev 2469) +++ trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAResults.java 2006-07-17 05:20:48 UTC (rev 2470) @@ -71,7 +71,9 @@ import net.sf.javabdd.BDDDomain; import net.sf.javabdd.BDDFactory; import net.sf.javabdd.BDDPairing; +import net.sf.javabdd.BDDVarSet; import net.sf.javabdd.TypedBDDFactory.TypedBDD; +import net.sf.javabdd.TypedBDDFactory.TypedBDDVarSet; /** * Records results for pointer analysis. The results can be saved and reloaded. @@ -190,7 +192,7 @@ } else if (command.equals("relprod")) { TypedBDD bdd1 = parseBDD(results, st.nextToken()); TypedBDD bdd2 = parseBDD(results, st.nextToken()); - TypedBDD set = parseBDDset(results, st.nextToken()); + TypedBDDVarSet set = parseBDDset(results, st.nextToken()); TypedBDD r = (TypedBDD) bdd1.relprod(bdd2, set); results.add(r); } else if (command.equals("replace")) { @@ -215,7 +217,7 @@ TypedBDD bdd1 = parseBDD(results, st.nextToken()); TypedBDD r = bdd1; while (st.hasMoreTokens()) { - TypedBDD set = parseBDDset(results, st.nextToken()); + TypedBDDVarSet set = parseBDDset(results, st.nextToken()); r = (TypedBDD) r.exist(set); } results.add(r); @@ -743,12 +745,12 @@ /** For a given TypedBDD, return its domains. * This duplicates TypedBDD.getDomains() which for unknown reasons is not public. */ - TypedBDD getDomains(TypedBDD b) { - TypedBDD dset = (TypedBDD) b.getFactory().one(); + TypedBDDVarSet getDomains(TypedBDD b) { + TypedBDDVarSet dset = (TypedBDDVarSet) b.getFactory().emptySet(); Set domains = b.getDomainSet(); for (Iterator i = domains.iterator(); i.hasNext(); ) { BDDDomain d = (BDDDomain) i.next(); - dset.andWith(d.set()); + dset.unionWith(d.set()); } return dset; } @@ -835,12 +837,12 @@ return null; } - TypedBDD parseBDDset(List a, String s) { + TypedBDDVarSet parseBDDset(List a, String s) { BDDDomain d = parseDomain(s); if (d != null) { - return (TypedBDD) d.set(); + return (TypedBDDVarSet) d.set(); } - return parseBDD(a, s); + return (TypedBDDVarSet) parseBDD(a, s).toVarSet(); } public static final int DEFAULT_NUM_TO_PRINT = 10; @@ -848,11 +850,11 @@ public String toString(TypedBDD b, int numToPrint) { if (b == null) return "<you passed 'null' to PAResult.toString>"; if (b.isZero()) return "<empty>"; - TypedBDD dset = (TypedBDD) b.getFactory().one(); + TypedBDDVarSet dset = (TypedBDDVarSet) b.getFactory().emptySet(); Set domains = b.getDomainSet(); for (Iterator i = domains.iterator(); i.hasNext(); ) { BDDDomain d = (BDDDomain) i.next(); - dset.andWith(d.set()); + dset.unionWith(d.set()); } StringBuffer sb = new StringBuffer(); int j = 0; @@ -1080,7 +1082,7 @@ BDD result = r.bdd.zero(); BDD allInvokes = r.mI.exist(r.Nset); BDD new_m = method_plus_context0.id(); - BDD V2cIset = r.Iset.and(r.V2cset); + BDDVarSet V2cIset = r.Iset.union(r.V2cset); BDD IEcs = (r.CONTEXT_SENSITIVE || r.OBJECT_SENSITIVE) ? r.IEcs : r.IE; for (int k=1; ; ++k) { //System.out.println("Iteration "+k); @@ -1180,7 +1182,7 @@ BDDDomain H3; BDDPairing H1toH3, H3toH1; - BDD H3set; + BDDVarSet H3set; public void initializeExtraDomains() { if (H3 == null) { @@ -1198,7 +1200,7 @@ BDD invokes = r.IE.relprod(m_bdd, r.Mset); invokes.andWith(r.Z.ithVar(0)); System.out.println("Invokes: "+invokes.toStringWithDomains()); - BDD bar = r.actual.relprod(invokes, r.Iset.and(r.Zset)); + BDD bar = r.actual.relprod(invokes, r.Iset.union(r.Zset)); System.out.println("Actual: "+bar.toStringWithDomains()); bar.replaceWith(r.V2toV1); @@ -1208,12 +1210,12 @@ invokes = r.IE.relprod(m_bdd, r.Mset); invokes.andWith(r.Z.ithVar(1)); System.out.println("Invokes: "+invokes.toStringWithDomains()); - BDD bar2 = r.actual.relprod(invokes, r.Iset.and(r.Zset)); + BDD bar2 = r.actual.relprod(invokes, r.Iset.union(r.Zset)); System.out.println("Actual: "+bar2.toStringWithDomains()); bar2.replaceWith(r.V2toV1); bar.orWith(bar2); - if (r.CONTEXT_SENSITIVE || r.OBJECT_SENSITIVE) bar.andWith(r.V1cset); + if (r.CONTEXT_SENSITIVE || r.OBJECT_SENSITIVE) bar.andWith(r.V1c[0].domain()); return bar; } @@ -1222,10 +1224,10 @@ // find objects that are pointed to by only one object. BDD hP_ci = r.hP.exist(r.H1cH2cset).exist(r.Fset); - BDD set = r.H1.set().and(r.H2.set()); + BDDVarSet set = r.H1.set().unionWith(r.H2.set()); BDD one_to_one = r.H1.buildEquals(H3).andWith(r.H2.domain()); - BDD my_set = r.H1.set().andWith(H3.set()); + BDDVarSet my_set = r.H1.set().unionWith(H3.set()); BDD b = hP_ci.replace(H1toH3); // H3xH2 b.andWith(hP_ci.id()); // H1xH3xH2 @@ -1292,7 +1294,7 @@ int outer = 0; while (!relationsToCheck.isZero()) { - System.out.print((long)relationsToCheck.satCount(r.H1set.and(H3set))+" relations remaining. \r"); + System.out.print((long)relationsToCheck.satCount(r.H1set.union(H3set))+" relations remaining. \r"); ++outer; BDD h_a = relationsToCheck.satOne(r.H1set, false); BDD h1 = h_a.exist(H3set); h_a.free(); @@ -1313,7 +1315,7 @@ BDD r1 = a1.relprod(sameType23, r.H2set); // FxH3 BDD r3 = a3.relprod(sameType23, r.H2set); // H1xFxH3 - ok = r3.relprod(r1, r.Fset.and(H3set)); // H1 + ok = r3.relprod(r1, r.Fset.union(H3set)); // H1 //System.out.println("Match approx: "+ok.toStringWithDomains(r.TS)); foo.applyWith(ok, BDDFactory.diff); @@ -1380,7 +1382,7 @@ System.out.println("Number of fields="+r.Fmap.size()); //System.out.println("Number of stores="+r.S.satCount(r.V1.set().andWith(r.F.set()).andWith(r.V2.set()))); //System.out.println("Number of loads="+r.L.satCount(r.V1.set().andWith(r.F.set()).andWith(r.V2.set()))); - System.out.println("Number of callgraph edges="+r.IE.satCount(r.Iset.and(r.Mset))); + System.out.println("Number of callgraph edges="+r.IE.satCount(r.Iset.union(r.Mset))); BDD all_v1 = r.vP.exist(r.H1set); all_v1.orWith(r.A.exist(r.V2set)); @@ -1509,7 +1511,7 @@ } { - BDD vCalls = r.mI.exist(r.Mset.and(r.Nset)); + BDD vCalls = r.mI.exist(r.Mset.union(r.Nset)); double d = vCalls.satCount(r.Iset); System.out.println("Virtual call sites: "+d); double e = r.IE.satCount(r.IMset); @@ -1646,7 +1648,7 @@ } int I_i = r.Imap.get(loc); BDD i = r.I.ithVar(I_i); - BDD m_c = r.IEcs.relprod(i, r.V2cset.and(r.Iset)); + BDD m_c = r.IEcs.relprod(i, r.V2cset.union(r.Iset)); // get transitive mod set for this particular method call BDD s = getTransitiveModSet(m_c); BDD q = s.exist(r.H1cset); @@ -1672,7 +1674,7 @@ } int I_i = r.Imap.get(invoke); BDD i = r.I.ithVar(I_i); - BDD m_c = r.IEcs.relprod(i, r.V2cset.and(r.Iset)); + BDD m_c = r.IEcs.relprod(i, r.V2cset.union(r.Iset)); BDD s = getTransitiveRefSet(m_c); BDD q = s.exist(r.H1cset); @@ -1756,14 +1758,14 @@ * @see java.util.AbstractCollection#size() */ public int size() { - return (int) heapLocations.satCount(r.H1.set().and(r.Fset)); + return (int) heapLocations.satCount(r.H1.set().union(r.Fset)); } /* (non-Javadoc) * @see java.util.AbstractCollection#iterator() */ public Iterator iterator() { - final Iterator i = heapLocations.iterator(r.H1.set().and(r.Fset)); + final Iterator i = heapLocations.iterator(r.H1.set().union(r.Fset)); return new UnmodifiableIterator() { public boolean hasNext() { return i.hasNext(); Modified: trunk/joeq_core/joeq/Compiler/Analysis/IPA/ParameterAliasing.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/IPA/ParameterAliasing.java 2006-07-17 05:20:43 UTC (rev 2469) +++ trunk/joeq_core/joeq/Compiler/Analysis/IPA/ParameterAliasing.java 2006-07-17 05:20:48 UTC (rev 2470) @@ -78,7 +78,7 @@ Assert._assert(_r.H1.set() != null); Assert._assert(_r.Z.set() != null); TypedBDD contexts = // V1c - (TypedBDD)params.relprod ( _r.vP, _r.V1.set().and(_r.H1cset).andWith(_r.H1.set()).andWith(_r.Z.set()) ); + (TypedBDD)params.relprod ( _r.vP, _r.V1.set().union(_r.H1cset).unionWith(_r.H1.set()).unionWith(_r.Z.set()) ); //System.out.println("contexts: \n" + contexts.toStringWithDomains()); //TypedBDD pointsTo = (TypedBDD)params.relprod(r.vP, r.V1cH1cset); //System.out.println("pointsTo: \n" + paResults.toString(pointsTo, -1)); @@ -95,7 +95,7 @@ Assert._assert(_r.vPfilter != null); TypedBDD pointsTo = (TypedBDD)_r.vP.and(_r.vPfilter.id()); // restrict by the type filter - TypedBDD t2 = (TypedBDD)params.relprod(pointsTo, _r.V1.set().and(_r.V1cset)); + TypedBDD t2 = (TypedBDD)params.relprod(pointsTo, _r.V1.set().union(_r.V1cset)); pointsTo.free(); pointsTo = t2; //t = (TypedBDD)t2.exist(_r.Z.set()); @@ -143,7 +143,7 @@ boolean processContext(jq_Method m, MethodSummary ms, BDD t, TypedBDD context, ModifiableBoolean printedInfo){ boolean result = false; - TypedBDD pointsTo = (TypedBDD)context.relprod(t, (TypedBDD) _r.V1cset.and(_r.H1cset)); // H1xZ + TypedBDD pointsTo = (TypedBDD)context.relprod(t, _r.V1cset.union(_r.H1cset)); // H1xZ //System.out.println("pointsTo: " + pointsTo.toStringWithDomains()); t.free(); Modified: trunk/joeq_core/joeq/Compiler/Analysis/Primitive/PrimitivePA.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/Primitive/PrimitivePA.java 2006-07-17 05:20:43 UTC (rev 2469) +++ trunk/joeq_core/joeq/Compiler/Analysis/Primitive/PrimitivePA.java 2006-07-17 05:20:48 UTC (rev 2470) @@ -3,20 +3,6 @@ // Licensed under the terms of the GNU LGPL; see COPYING for details. package joeq.Compiler.Analysis.Primitive; -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.FilenameFilter; -import java.io.IOException; -import java.io.PrintStream; -import java.io.PrintWriter; -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.math.BigInteger; import java.util.AbstractMap; import java.util.ArrayList; import java.util.Arrays; @@ -31,6 +17,20 @@ import java.util.Properties; import java.util.Set; import java.util.TreeSet; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.FilenameFilter; +import java.io.IOException; +import java.io.PrintStream; +import java.io.PrintWriter; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.math.BigInteger; import joeq.Class.PrimordialClassLoader; import joeq.Class.jq_Array; import joeq.Class.jq_Class; @@ -93,6 +93,7 @@ import net.sf.javabdd.BDDDomain; import net.sf.javabdd.BDDFactory; import net.sf.javabdd.BDDPairing; +import net.sf.javabdd.BDDVarSet; import net.sf.javabdd.TypedBDDFactory; import net.sf.javabdd.TypedBDDFactory.TypedBDD; /** @@ -258,11 +259,11 @@ BDDPairing V1toV2, V2toV1, H1toH2, ItoI2, I2toI, H2toH1, V1H1toV2H2, V2H2toV1H1; BDDPairing V1ctoV2c, V1cV2ctoV2cV1c, V1cH1ctoV2cV1c; BDDPairing T2toT1, T1toT2; - BDDPairing H1toV1c[], V1ctoH1[]; BDD V1csets[], V1cH1equals[]; - BDD V1set, V2set, H1set, H2set, T1set, T2set, Fset, Mset, Nset, Iset, I2set, Zset; - BDD V1V2set, V1Fset, V2Fset, V1FV2set, V1H1set, H1Fset, H2Fset, H1H2set, H1FH2set; - BDD IMset, INset, INH1set, INT2set, T2Nset, MZset; - BDD V1cset, V2cset, H1cset, H2cset, V1cV2cset, V1cH1cset, H1cH2cset; + BDDPairing H1toV1c[], V1ctoH1[]; BDDVarSet V1csets[]; BDD V1cH1equals[]; + BDDVarSet V1set, V2set, H1set, H2set, T1set, T2set, Fset, Mset, Nset, Iset, I2set, Zset; + BDDVarSet V1V2set, V1Fset, V2Fset, V1FV2set, V1H1set, H1Fset, H2Fset, H1H2set, H1FH2set; + BDDVarSet IMset, INset, INH1set, INT2set, T2Nset, MZset; + BDDVarSet V1cset, V2cset, H1cset, H2cset, V1cV2cset, V1cH1cset, H1cH2cset; BDD V1cdomain, V2cdomain, H1cdomain, H2cdomain; BDDDomain makeDomain(String name, int bits) { @@ -395,43 +396,43 @@ V1set = V1.set(); if (V1c.length > 0) { - V1cset = bdd.one(); + V1cset = bdd.emptySet(); V1cdomain = bdd.one(); for (int i = 0; i < V1c.length; ++i) { - V1cset.andWith(V1c[i].set()); + V1cset.unionWith(V1c[i].set()); V1cdomain.andWith(V1c[i].domain()); } - V1set.andWith(V1cset.id()); + V1set.unionWith(V1cset.id()); } V2set = V2.set(); if (V2c.length > 0) { - V2cset = bdd.one(); + V2cset = bdd.emptySet(); V2cdomain = bdd.one(); for (int i = 0; i < V2c.length; ++i) { - V2cset.andWith(V2c[i].set()); + V2cset.unionWith(V2c[i].set()); V2cdomain.andWith(V2c[i].domain()); } - V2set.andWith(V2cset.id()); + V2set.unionWith(V2cset.id()); } H1set = H1.set(); if (H1c.length > 0) { - H1cset = bdd.one(); + H1cset = bdd.emptySet(); H1cdomain = bdd.one(); for (int i = 0; i < H1c.length; ++i) { - H1cset.andWith(H1c[i].set()); + H1cset.unionWith(H1c[i].set()); H1cdomain.andWith(H1c[i].domain()); } - H1set.andWith(H1cset.id()); + H1set.unionWith(H1cset.id()); } H2set = H2.set(); if (H2c.length > 0) { - H2cset = bdd.one(); + H2cset = bdd.emptySet(); H2cdomain = bdd.one(); for (int i = 0; i < H2c.length; ++i) { - H2cset.andWith(H2c[i].set()); + H2cset.unionWith(H2c[i].set()); H2cdomain.andWith(H2c[i].domain()); } - H2set.andWith(H2cset.id()); + H2set.unionWith(H2cset.id()); } T1set = T1.set(); T2set = T2.set(); @@ -441,28 +442,28 @@ Iset = I.set(); I2set = I2.set(); Zset = Z.set(); - V1cV2cset = (V1c.length > 0) ? V1cset.and(V2cset) : bdd.zero(); - H1cH2cset = (H1c.length > 0) ? H1cset.and(H2cset) : bdd.zero(); + V1cV2cset = (V1c.length > 0) ? V1cset.union(V2cset) : bdd.emptySet(); + H1cH2cset = (H1c.length > 0) ? H1cset.union(H2cset) : bdd.emptySet(); if (V1c.length > 0) { - V1cH1cset = (H1c.length > 0) ? V1cset.and(H1cset) : V1cset; + V1cH1cset = (H1c.length > 0) ? V1cset.union(H1cset) : V1cset; } else { - V1cH1cset = (H1c.length > 0) ? H1cset : bdd.zero(); + V1cH1cset = (H1c.length > 0) ? H1cset : bdd.emptySet(); } - V1V2set = V1set.and(V2set); - V1FV2set = V1V2set.and(Fset); - V1H1set = V1set.and(H1set); - V1Fset = V1set.and(Fset); - V2Fset = V2set.and(Fset); - IMset = Iset.and(Mset); - INset = Iset.and(Nset); - INH1set = INset.and(H1set); - INT2set = INset.and(T2set); - H1Fset = H1set.and(Fset); - H2Fset = H2set.and(Fset); - H1H2set = H1set.and(H2set); - H1FH2set = H1Fset.and(H2set); - T2Nset = T2set.and(Nset); - MZset = Mset.and(Zset); + V1V2set = V1set.union(V2set); + V1FV2set = V1V2set.union(Fset); + V1H1set = V1set.union(H1set); + V1Fset = V1set.union(Fset); + V2Fset = V2set.union(Fset); + IMset = Iset.union(Mset); + INset = Iset.union(Nset); + INH1set = INset.union(H1set); + INT2set = INset.union(T2set); + H1Fset = H1set.union(Fset); + H2Fset = H2set.union(Fset); + H1H2set = H1set.union(H2set); + H1FH2set = H1Fset.union(H2set); + T2Nset = T2set.union(Nset); + MZset = Mset.union(Zset); A = bdd.zero(); vP = bdd.zero(); @@ -523,7 +524,7 @@ if (CARTESIAN_PRODUCT && false) { H1toV1c = new BDDPairing[MAX_PARAMS]; V1ctoH1 = new BDDPairing[MAX_PARAMS]; - V1csets = new BDD[MAX_PARAMS]; + V1csets = new BDDVarSet[MAX_PARAMS]; V1cH1equals = new BDD[MAX_PARAMS]; for (int i = 0; i < MAX_PARAMS; ++i) { H1toV1c[i] = bdd.makePair(H1, V1c[i]); @@ -1754,7 +1755,7 @@ } } - public void dumpWithV1c(BDD z, BDD set) { + public void dumpWithV1c(BDD z, BDDVarSet set) { BDD a = z.exist(V1cset); for (Iterator i = a.iterator(set); i.hasNext(); ) { BDD b = (BDD) i.next(); @@ -1798,7 +1799,7 @@ BDD q = (BDD) i.next(); // V2cxIxV1cxM BigInteger I_i = q.scanVar(I); System.out.println("Invocation site "+TS.elementName(I.getIndex(), I_i)); - BDD a = q.exist(IMset.and(V1cset)); // V2c + BDD a = q.exist(IMset.union(V1cset)); // V2c Iterator k = null; boolean bool1; if (a.isOne()) { @@ -1816,13 +1817,13 @@ for ( ; k.hasNext(); ) { BDD s = (BDD) k.next(); // V2cxIxV1cxM if (!bool1) { - System.out.println(" under context "+s.exist(IMset.and(V1cset)).toStringWithDomains(TS)); + System.out.println(" under context "+s.exist(IMset.union(V1cset)).toStringWithDomains(TS)); } for (Iterator j = s.iterator(Mset); j.hasNext(); ) { BDD r = (BDD) j.next(); // V2cxIxV1cxM BigInteger M_i = r.scanVar(M); System.out.println(" calls "+TS.elementName(M.getIndex(), M_i)); - BDD b = r.exist(IMset.and(V2cset)); + BDD b = r.exist(IMset.union(V2cset)); if (b.isOne()) { System.out.println(" all contexts"); } else if (b.satCount(V1cset) > 16) { @@ -1830,7 +1831,7 @@ } else { for (Iterator m = r.iterator(V1cset); m.hasNext(); ) { BDD t = (BDD) m.next(); - System.out.println(" context "+s.exist(IMset.and(V2cset)).toStringWithDomains(TS)); + System.out.println(" context "+t.exist(IMset.union(V2cset)).toStringWithDomains(TS)); } } } @@ -1848,7 +1849,7 @@ BigInteger H_i = r.scanVar(H1); System.out.println(" "+TS.elementName(H1.getIndex(), H_i)); if (USE_VCONTEXT) { - BDD a = r.exist(V1.set().and(H1set)); + BDD a = r.exist(V1.set().union(H1set)); if (a.isOne()) { System.out.prin... [truncated message content] |
From: <joe...@us...> - 2006-07-17 05:20:47
|
Revision: 2469 Author: joewhaley Date: 2006-07-16 22:20:43 -0700 (Sun, 16 Jul 2006) ViewCVS: http://svn.sourceforge.net/joeq/?rev=2469&view=rev Log Message: ----------- Upgraded to latest JavaBDD 2.0 and jwutil libraries. Removed Paths: ------------- trunk/joeq_test/simple/bddtest.java Deleted: trunk/joeq_test/simple/bddtest.java =================================================================== --- trunk/joeq_test/simple/bddtest.java 2006-07-11 06:03:49 UTC (rev 2468) +++ trunk/joeq_test/simple/bddtest.java 2006-07-17 05:20:43 UTC (rev 2469) @@ -1,74 +0,0 @@ -// bddtest.java, created Jul 13, 2003 9:28:32 PM by John Whaley -// Copyright (C) 2003 John Whaley -// Licensed under the terms of the GNU LGPL; see COPYING for details. -package simple; - -import java.util.Arrays; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import net.sf.javabdd.BDD; -import net.sf.javabdd.BDDDomain; -import net.sf.javabdd.BDDFactory; - -/** - * bddtest - * - * @author John Whaley - * @version $Id$ - */ -public class bddtest { - - public static void main(String[] args) throws IOException { - BDDFactory bdd = BDDFactory.init(1000000, 10000); - - BDDDomain[] domains = bdd.extDomain(new int[] { 10, 8 }); - int[] order = new int[bdd.varNum()]; - - BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); - for (;;) { - buildRandomPermutation(order); - printPermutation(order); - bdd.setVarOrder(order); - System.out.print("Enter low: "); - int lo = Integer.parseInt(in.readLine()); - System.out.print("Enter high: "); - int hi = Integer.parseInt(in.readLine()); - for (int i=0; i<domains.length; ++i) { - BDD b = domains[i].varRange(lo, hi); - System.out.println(b.toStringWithDomains()+" = "+b.nodeCount()+" nodes"); - buildRandomPermutation(order); - printPermutation(order); - bdd.setVarOrder(order); - System.out.println(b.toStringWithDomains()+" = "+b.nodeCount()+" nodes"); - buildRandomPermutation(order); - printPermutation(order); - bdd.setVarOrder(order); - System.out.println(b.toStringWithDomains()+" = "+b.nodeCount()+" nodes"); - buildRandomPermutation(order); - printPermutation(order); - bdd.setVarOrder(order); - System.out.println(b.toStringWithDomains()+" = "+b.nodeCount()+" nodes"); - } - } - } - - static void printPermutation(int[] a) { - for (int i=0; i<a.length; ++i) { - System.out.print(a[i]+" "); - } - System.out.println(); - } - - static void buildRandomPermutation(int[] a) { - Arrays.fill(a, -1); - int n = 0; - java.util.Random r = new java.util.Random(); - while (n < a.length) { - int k = r.nextInt(a.length); - if (a[k] == -1) { - a[k] = n++; - } - } - } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2006-07-11 06:03:53
|
Revision: 2468 Author: joewhaley Date: 2006-07-10 23:03:49 -0700 (Mon, 10 Jul 2006) ViewCVS: http://svn.sourceforge.net/joeq/?rev=2468&view=rev Log Message: ----------- Fix silly recursion bug. Modified Paths: -------------- trunk/jwutil/main/src/java/jwutil/collections/SortedIntArraySet.java Modified: trunk/jwutil/main/src/java/jwutil/collections/SortedIntArraySet.java =================================================================== --- trunk/jwutil/main/src/java/jwutil/collections/SortedIntArraySet.java 2006-06-08 03:03:13 UTC (rev 2467) +++ trunk/jwutil/main/src/java/jwutil/collections/SortedIntArraySet.java 2006-07-11 06:03:49 UTC (rev 2468) @@ -3,7 +3,6 @@ // Licensed under the terms of the GNU LGPL; see COPYING for details. package jwutil.collections; -import java.util.Collection; import java.util.NoSuchElementException; import java.util.RandomAccess; import java.io.Serializable; @@ -260,8 +259,6 @@ public boolean equals(Object arg0) { if (arg0 instanceof SortedIntArraySet) return equals((SortedIntArraySet)arg0); - if (arg0 instanceof Collection) - return equals((Collection)arg0); return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: John W. <joe...@us...> - 2006-07-10 03:39:22
|
Update of /cvsroot/joeq/jwutil/main/src/java/jwutil/collections In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv10189/main/src/java/jwutil/collections Modified Files: SortedIntArraySet.java Log Message: Fixed silly infinite recursion bug. Index: SortedIntArraySet.java =================================================================== RCS file: /cvsroot/joeq/jwutil/main/src/java/jwutil/collections/SortedIntArraySet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SortedIntArraySet.java 3 Sep 2005 05:10:12 -0000 1.5 --- SortedIntArraySet.java 10 Jul 2006 03:39:17 -0000 1.6 *************** *** 261,266 **** if (arg0 instanceof SortedIntArraySet) return equals((SortedIntArraySet)arg0); - if (arg0 instanceof Collection) - return equals((Collection)arg0); return false; } --- 261,264 ---- |
From: <joe...@us...> - 2006-06-08 03:03:20
|
Revision: 2467 Author: joewhaley Date: 2006-06-07 20:03:13 -0700 (Wed, 07 Jun 2006) ViewCVS: http://svn.sourceforge.net/joeq/?rev=2467&view=rev Log Message: ----------- Fixed a silly cut-and-paste bug. Modified Paths: -------------- trunk/jwutil/main/src/java/jwutil/graphs/SCComponent.java Modified: trunk/jwutil/main/src/java/jwutil/graphs/SCComponent.java =================================================================== --- trunk/jwutil/main/src/java/jwutil/graphs/SCComponent.java 2006-06-07 23:12:58 UTC (rev 2466) +++ trunk/jwutil/main/src/java/jwutil/graphs/SCComponent.java 2006-06-08 03:03:13 UTC (rev 2467) @@ -266,7 +266,7 @@ } } Collection next = nav.next(node); - for (Iterator j = prev.iterator(); j.hasNext();) { + for (Iterator j = next.iterator(); j.hasNext();) { Object jnext = j.next(); if (!nodes.contains(jnext)) { isExit[i] = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2006-06-08 02:57:34
|
Revision: 2465 Author: joewhaley Date: 2006-06-07 16:03:17 -0700 (Wed, 07 Jun 2006) ViewCVS: http://svn.sourceforge.net/joeq/?rev=2465&view=rev Log Message: ----------- Simple modifications to reduce Eclipse warnings, mostly about unused variables. Modified Paths: -------------- trunk/joeq_core/joeq/Class/jq_Array.java trunk/joeq_core/joeq/Class/jq_Class.java trunk/joeq_core/joeq/Class/jq_Field.java trunk/joeq_core/joeq/Class/jq_Method.java trunk/joeq_core/joeq/Compiler/Analysis/BDD/BuildBDDIR.java trunk/joeq_core/joeq/Compiler/Analysis/FlowInsensitive/MethodSummary.java trunk/joeq_core/joeq/Compiler/Analysis/FlowInsensitive/ReflectionInformationProvider.java trunk/joeq_core/joeq/Compiler/Analysis/IPA/ObjectNamingSupport.java trunk/joeq_core/joeq/Compiler/Analysis/IPA/PA.java trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAMethodSummary.java trunk/joeq_core/joeq/Compiler/Analysis/Primitive/PrimitiveMethodSummary.java trunk/joeq_core/joeq/Compiler/BytecodeAnalysis/ControlFlowGraph.java trunk/joeq_core/joeq/Compiler/Dataflow/LivenessAnalysis.java trunk/joeq_core/joeq/Compiler/Quad/AndersenPointerAnalysis.java trunk/joeq_core/joeq/Compiler/Quad/BasicBlock.java trunk/joeq_core/joeq/Compiler/Quad/BytecodeToQuad.java trunk/joeq_core/joeq/Compiler/Quad/ControlFlowGraph.java trunk/joeq_core/joeq/Compiler/Quad/Dominators.java trunk/joeq_core/joeq/Compiler/Quad/MethodInline.java trunk/joeq_core/joeq/Compiler/Quad/Operator.java trunk/joeq_core/joeq/Compiler/Quad/PointerExplorer.java trunk/joeq_core/joeq/Compiler/Quad/SSA/EnterSSA.java trunk/joeq_core/joeq/Interpreter/QuadInterpreter.java trunk/joeq_core/joeq/Main/FindBestPermutation.java trunk/joeq_core/joeq/Runtime/Reflection.java Modified: trunk/joeq_core/joeq/Class/jq_Array.java =================================================================== --- trunk/joeq_core/joeq/Class/jq_Array.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Class/jq_Array.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -356,7 +356,7 @@ } private static Delegate attemptDelegate(String s) { - String type = "array delegate"; + //String type = "array delegate"; try { Class c = Class.forName(s); return (Delegate)c.newInstance(); Modified: trunk/joeq_core/joeq/Class/jq_Class.java =================================================================== --- trunk/joeq_core/joeq/Class/jq_Class.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Class/jq_Class.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -2677,7 +2677,7 @@ } private static Delegate attemptDelegate(String s) { - String type = "class delegate"; + //String type = "class delegate"; try { Class c = Class.forName(s); return (Delegate)c.newInstance(); Modified: trunk/joeq_core/joeq/Class/jq_Field.java =================================================================== --- trunk/joeq_core/joeq/Class/jq_Field.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Class/jq_Field.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -79,7 +79,7 @@ } private static Delegate attemptDelegate(String s) { - String type = "field delegate"; + //String type = "field delegate"; try { Class c = Class.forName(s); return (Delegate)c.newInstance(); Modified: trunk/joeq_core/joeq/Class/jq_Method.java =================================================================== --- trunk/joeq_core/joeq/Class/jq_Method.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Class/jq_Method.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -426,7 +426,7 @@ } private static Delegate attemptDelegate(String s) { - String type = "method delegate"; + //String type = "method delegate"; try { Class c = Class.forName(s); return (Delegate)c.newInstance(); Modified: trunk/joeq_core/joeq/Compiler/Analysis/BDD/BuildBDDIR.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/BDD/BuildBDDIR.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/Analysis/BDD/BuildBDDIR.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -244,7 +244,7 @@ time = System.currentTimeMillis() - time; totalTime += time; System.out.println("Method: " + cfg.getMethod() + " time: " + time); - int qSize = totalQuads; + //int qSize = totalQuads; //int nodes = allQuads.nodeCount(); //System.out.println("Quads: " +qSize+", nodes: "+nodes+", average: // "+(float)nodes/qSize); Modified: trunk/joeq_core/joeq/Compiler/Analysis/FlowInsensitive/MethodSummary.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/FlowInsensitive/MethodSummary.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/Analysis/FlowInsensitive/MethodSummary.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -5454,7 +5454,6 @@ for (Iterator k = bb.iterator(); k.hasNext(); ) { Quad q = (Quad) k.next(); t.writeString("quad "+q.getID()+" "); - int num = 0; for (Iterator l = q.getUsedRegisters().iterator(); l.hasNext(); ) { RegisterOperand op = (RegisterOperand) l.next(); t.writeString("op "); Modified: trunk/joeq_core/joeq/Compiler/Analysis/FlowInsensitive/ReflectionInformationProvider.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/FlowInsensitive/ReflectionInformationProvider.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/Analysis/FlowInsensitive/ReflectionInformationProvider.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -220,7 +220,6 @@ * reads answers from a file. * */ public static class CribSheetReflectionInformationProvider extends ReflectionInformationProvider { - private static boolean TRACE = true; private static final String DEFAULT_CRIB_FILE = "reflection.spec"; public CribSheetReflectionInformationProvider(String cribSheetFileName){ @@ -239,7 +238,6 @@ public static void main(String[] args) { HostedVM.initialize(); CodeCache.AlwaysMap = true; - TRACE = true; CribSheetReflectionInformationProvider provider = new CribSheetReflectionInformationProvider(args[0]); Modified: trunk/joeq_core/joeq/Compiler/Analysis/IPA/ObjectNamingSupport.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/IPA/ObjectNamingSupport.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/Analysis/IPA/ObjectNamingSupport.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -225,7 +225,6 @@ String readSources(String namesFile) throws IOException { BufferedReader di = new BufferedReader(new FileReader(namesFile)); - int lineno = 1; String line = di.readLine(); String firstLine = null; Modified: trunk/joeq_core/joeq/Compiler/Analysis/IPA/PA.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/IPA/PA.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/Analysis/IPA/PA.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -1874,7 +1874,7 @@ } else { for (Iterator m = r.iterator(V1cset); m.hasNext(); ) { BDD t = (BDD) m.next(); - System.out.println(" context "+s.exist(IMset.and(V2cset)).toStringWithDomains(TS)); + System.out.println(" context "+t.exist(IMset.and(V2cset)).toStringWithDomains(TS)); } } } @@ -2120,11 +2120,9 @@ BigInteger pos = BigInteger.ZERO; int maxSkip = -1; - boolean hasDontCare = false; for (i=0; i<domain_n_varnum; ++i) { int val = set[var[i]]; if (val == 0) { - hasDontCare = true; if (maxSkip == i-1) maxSkip = i; } @@ -2556,12 +2554,12 @@ Node n = (Node) Hmap.get(h_i); if(n instanceof MethodSummary.ConcreteTypeNode){ ConcreteTypeNode cn = (ConcreteTypeNode) n; - String stringConst = (String) MethodSummary.stringNodes2Values.get(n); + String stringConst = (String) MethodSummary.stringNodes2Values.get(cn); if(stringConst != null){ // System.out.println(I_bdd.toStringWithDomains(TS) + " -> " + stringConst); if(stringConst == null){ if(missingConst.get(stringConst) == null){ - if(TRACE_FORNAME) System.err.println("No constant string for " + n + " at " + n); + if(TRACE_FORNAME) System.err.println("No constant string for " + cn + " at " + n); missingConst.put(stringConst, new Integer(0)); } continue; @@ -3652,10 +3650,6 @@ } } - private void dumpCallGraphAsDot(CallGraph cg, String dotFileName) throws IOException { - PathNumbering pn = countCallGraph(cg, null, false); - dumpCallGraphAsDot(pn, cg, dotFileName); - } private void dumpCallGraphAsDot(PathNumbering pn, CallGraph cg, String dotFileName) throws IOException { if (pn != null) { BufferedWriter dos = null; @@ -5457,7 +5451,6 @@ Assert._assert(DUMP_SSA); String dumpPath = System.getProperty("pa.dumppath", ""); jq_MethodVisitor mv = null; - ControlFlowGraphVisitor cfgv = null; Assert._assert(bddIRBuilder != null); mv = new ControlFlowGraphVisitor.CodeCacheVisitor(bddIRBuilder, true); Modified: trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAMethodSummary.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAMethodSummary.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/Analysis/IPA/PAMethodSummary.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -25,7 +25,6 @@ import joeq.Compiler.Analysis.FlowInsensitive.MethodSummary.CheckCastNode; import joeq.Compiler.Analysis.FlowInsensitive.MethodSummary.ConcreteObjectNode; import joeq.Compiler.Analysis.FlowInsensitive.MethodSummary.ConcreteTypeNode; -import joeq.Compiler.Analysis.FlowInsensitive.MethodSummary.FakeParamNode; import joeq.Compiler.Analysis.FlowInsensitive.MethodSummary.GlobalNode; import joeq.Compiler.Analysis.FlowInsensitive.MethodSummary.Node; import joeq.Compiler.Analysis.FlowInsensitive.MethodSummary.UnknownTypeNode; @@ -34,7 +33,6 @@ import joeq.Compiler.Quad.Operand; import joeq.Compiler.Quad.Operator; import joeq.Compiler.Quad.Quad; -import joeq.Compiler.Quad.MethodInline.InlineSelectedCalls; import joeq.Main.HostedVM; import jwutil.collections.Pair; import jwutil.util.Assert; @@ -250,7 +248,6 @@ jq_Method replacement = null; if(pa.USE_BOGUS_SUMMARIES) { - jq_Type[] paramTypes = mc.getParamTypes(); Operand.ParamListOperand listOp = Operator.Invoke.getParamList(q); jq_Type type = listOp.length() > 0 ? listOp.get(0).getType() : null; replacement = PA.getBogusSummaryProvider().getReplacementMethod(target, type); Modified: trunk/joeq_core/joeq/Compiler/Analysis/Primitive/PrimitiveMethodSummary.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Analysis/Primitive/PrimitiveMethodSummary.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/Analysis/Primitive/PrimitiveMethodSummary.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -881,8 +881,8 @@ Register dest_r = InstanceOf.getDest(obj).getRegister(); Operand src = InstanceOf.getSrc(obj); if (src instanceof RegisterOperand) { - RegisterOperand rop = ((RegisterOperand)src); - Register src_r = rop.getRegister(); + //RegisterOperand rop = ((RegisterOperand)src); + //Register src_r = rop.getRegister(); setRegister(dest_r, UnknownTypeNode.get(dest_r.getType())); } else { Node n = handleConst((ConstOperand) src, new QuadProgramLocation(method, obj)); Modified: trunk/joeq_core/joeq/Compiler/BytecodeAnalysis/ControlFlowGraph.java =================================================================== --- trunk/joeq_core/joeq/Compiler/BytecodeAnalysis/ControlFlowGraph.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/BytecodeAnalysis/ControlFlowGraph.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -25,9 +25,6 @@ /** Array of basic blocks, ordered by their appearance in the bytecode. */ private final BasicBlock[] basic_blocks; - /** Array of exception handler entrypoints, ordered by their appearance - * in the bytecode. */ - private final BasicBlock[] handler_entries; /** Map from basic blocks to their JSR info. * There is JSR info associated with the entry and exit blocks of each * JSR subroutine. */ @@ -36,7 +33,6 @@ /** Creates new ControlFlowGraph */ private ControlFlowGraph(int n_bb, int n_handlers) { basic_blocks = new BasicBlock[n_bb]; - handler_entries = new BasicBlock[n_handlers]; } /** Returns the entry basic block. */ Modified: trunk/joeq_core/joeq/Compiler/Dataflow/LivenessAnalysis.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Dataflow/LivenessAnalysis.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/Dataflow/LivenessAnalysis.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -54,7 +54,7 @@ if (TRACE) System.out.println("Bit vector size: "+bitVectorSize); - Map regToDefs = new HashMap(); + //Map regToDefs = new HashMap(); transferFunctions = new HashMap(); emptySet = new UnionBitVectorFact(bitVectorSize); emptyTF = new GenKillTransferFunction(bitVectorSize); Modified: trunk/joeq_core/joeq/Compiler/Quad/AndersenPointerAnalysis.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Quad/AndersenPointerAnalysis.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/Quad/AndersenPointerAnalysis.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -279,7 +279,6 @@ } int numTypes = PrimordialClassLoader.loader.getNumTypes(); System.out.println("Number of RTA classes: "+numTypes); - int nMethods = 0; jq_Type[] types = PrimordialClassLoader.loader.getAllTypes(); Set methods = new HashSet(); for (int i = 0; i < numTypes; ++i) { Modified: trunk/joeq_core/joeq/Compiler/Quad/BasicBlock.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Quad/BasicBlock.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/Quad/BasicBlock.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -58,8 +58,6 @@ private static final int EXCEPTION_HANDLER_ENTRY = 0x1; /** JSR subroutine entry point. */ private static final int JSR_ENTRY = 0x2; - /** This basic block ends in a 'ret'. */ - private static final int ENDS_IN_RET = 0x4; /** Creates new entry node. Only to be called by ControlFlowGraph. */ static BasicBlock createStartNode() { Modified: trunk/joeq_core/joeq/Compiler/Quad/BytecodeToQuad.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Quad/BytecodeToQuad.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/Quad/BytecodeToQuad.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -95,7 +95,6 @@ private RegisterFactory rf; private boolean[] visited; - private boolean uncond_branch; private LinkedList regenerate; private HashMap quad2bci = new HashMap(); @@ -233,7 +232,6 @@ } this.quad_bb.removeAllQuads(); this.bc_bb = bc_bb; - this.uncond_branch = false; this.current_state.overwriteWith(start_states[bc_bb.id]); if (this.quad_bb.isExceptionHandlerEntry()) { // TODO: find non-exceptional branches to exception handler entries and split the basic block. @@ -1031,7 +1029,6 @@ } public void visitGOTO(int target) { super.visitGOTO(target); - this.uncond_branch = true; saveStackIntoRegisters(); BasicBlock target_bb = quad_bbs[bc_cfg.getBasicBlockByBytecodeIndex(target).id]; Quad q = Goto.create(quad_cfg.getNewQuadID(), Goto.GOTO.INSTANCE, new TargetOperand(target_bb)); @@ -1046,7 +1043,6 @@ } public void visitJSR(int target) { super.visitJSR(target); - this.uncond_branch = true; joeq.Compiler.BytecodeAnalysis.BasicBlock target_bcbb = bc_cfg.getBasicBlockByBytecodeIndex(target); BasicBlock target_bb = quad_bbs[target_bcbb.id]; BasicBlock successor_bb = quad_bbs[bc_bb.id+1]; @@ -1087,7 +1083,6 @@ } public void visitRET(int i) { super.visitRET(i); - this.uncond_branch = true; saveStackIntoRegisters(); RegisterOperand op0 = makeLocal(i, jq_ReturnAddressType.INSTANCE); Quad q = Ret.create(quad_cfg.getNewQuadID(), Ret.RET.INSTANCE, op0); @@ -1138,7 +1133,6 @@ } public void visitTABLESWITCH(int default_target, int low, int high, int[] targets) { super.visitTABLESWITCH(default_target, low, high, targets); - this.uncond_branch = true; Operand op0 = current_state.pop_I(); saveStackIntoRegisters(); BasicBlock target_bb = quad_bbs[bc_cfg.getBasicBlockByBytecodeIndex(default_target).id]; @@ -1153,7 +1147,6 @@ } public void visitLOOKUPSWITCH(int default_target, int[] values, int[] targets) { super.visitLOOKUPSWITCH(default_target, values, targets); - this.uncond_branch = true; Operand op0 = current_state.pop_I(); saveStackIntoRegisters(); BasicBlock target_bb = quad_bbs[bc_cfg.getBasicBlockByBytecodeIndex(default_target).id]; @@ -1167,7 +1160,6 @@ } public void visitIRETURN() { super.visitIRETURN(); - this.uncond_branch = true; Operand op0 = current_state.pop_I(); Quad q = Return.create(quad_cfg.getNewQuadID(), Return.RETURN_I.INSTANCE, op0); appendQuad(q); @@ -1175,7 +1167,6 @@ } public void visitLRETURN() { super.visitLRETURN(); - this.uncond_branch = true; Operand op0 = current_state.pop_L(); Quad q = Return.create(quad_cfg.getNewQuadID(), Return.RETURN_L.INSTANCE, op0); appendQuad(q); @@ -1183,7 +1174,6 @@ } public void visitFRETURN() { super.visitFRETURN(); - this.uncond_branch = true; Operand op0 = current_state.pop_F(); Quad q = Return.create(quad_cfg.getNewQuadID(), Return.RETURN_F.INSTANCE, op0); appendQuad(q); @@ -1191,7 +1181,6 @@ } public void visitDRETURN() { super.visitDRETURN(); - this.uncond_branch = true; Operand op0 = current_state.pop_D(); Quad q = Return.create(quad_cfg.getNewQuadID(), Return.RETURN_D.INSTANCE, op0); appendQuad(q); @@ -1199,7 +1188,6 @@ } public void visitARETURN() { super.visitARETURN(); - this.uncond_branch = true; // could be A or R Operand op0 = current_state.pop(); jq_Type t = getTypeOf(op0); @@ -1218,7 +1206,6 @@ } public void visitVRETURN() { super.visitVRETURN(); - this.uncond_branch = true; Quad q = Return.create(quad_cfg.getNewQuadID(), Return.RETURN_V.INSTANCE); appendQuad(q); current_state.clearStack(); @@ -2019,7 +2006,6 @@ } public void visitATHROW() { super.visitATHROW(); - this.uncond_branch = true; Operand op0 = current_state.pop_A(); Quad q = Return.create(quad_cfg.getNewQuadID(), Return.THROW_A.INSTANCE, op0); appendQuad(q); @@ -2757,6 +2743,9 @@ public static class jq_ReturnAddressType extends jq_Reference { public static final jq_ReturnAddressType INSTANCE = new jq_ReturnAddressType(); + public static jq_ReturnAddressType create(BasicBlock bb) { + return new jq_ReturnAddressType(bb); + } private BasicBlock returnTarget; private jq_ReturnAddressType() { super(Utf8.get("L&ReturnAddress;"), PrimordialClassLoader.loader); } private jq_ReturnAddressType(BasicBlock returnTarget) { @@ -2786,6 +2775,11 @@ public String toString() { return "<retaddr> (target="+returnTarget+")"; } public boolean equals(Object rat) { if (!(rat instanceof jq_ReturnAddressType)) return false; + BasicBlock rt = ((jq_ReturnAddressType)rat).returnTarget; + if (rt == null) + return returnTarget == null; + if (returnTarget == null) + return false; return ((jq_ReturnAddressType)rat).returnTarget.equals(this.returnTarget); } public int hashCode() { @@ -2813,7 +2807,7 @@ } private static UnsafeHelper attemptDelegate(String s) { - String type = "BC2Q delegate"; + //String type = "BC2Q delegate"; try { Class c = Class.forName(s); return (UnsafeHelper)c.newInstance(); Modified: trunk/joeq_core/joeq/Compiler/Quad/ControlFlowGraph.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Quad/ControlFlowGraph.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/Quad/ControlFlowGraph.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -9,15 +9,11 @@ import java.util.HashSet; import java.util.Iterator; import java.util.Map; -import java.util.Map.Entry; import joeq.Class.jq_Method; -import joeq.Compiler.Analysis.IPA.ProgramLocation.BCProgramLocation; import joeq.Compiler.Quad.Operand.BasicBlockTableOperand; import joeq.Compiler.Quad.Operand.ParamListOperand; import joeq.Compiler.Quad.Operand.RegisterOperand; import joeq.Compiler.Quad.Operand.TargetOperand; -import joeq.Compiler.Quad.Operator.New; -import joeq.Compiler.Quad.Operator.NewArray; import joeq.Compiler.Quad.RegisterFactory.Register; import joeq.Util.Templates.List; import joeq.Util.Templates.ListIterator; Modified: trunk/joeq_core/joeq/Compiler/Quad/Dominators.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Quad/Dominators.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/Quad/Dominators.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -235,7 +235,7 @@ // for each Z in {idom(z) = X} do for (Iterator z = getDominatorNode(X).getChildren().iterator(); z.hasNext();) { DominatorNode zVertex = (DominatorNode) z.next(); - BasicBlock Z = zVertex.getBasicBlock(); + //BasicBlock Z = zVertex.getBasicBlock(); // for each Y in DF(Z) do for (BitStringIterator y = zVertex.dominance_frontier .iterator(); y.hasNext();) { Modified: trunk/joeq_core/joeq/Compiler/Quad/MethodInline.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Quad/MethodInline.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/Quad/MethodInline.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -3,25 +3,21 @@ // Licensed under the terms of the GNU LGPL; see COPYING for details. package joeq.Compiler.Quad; +import java.util.Collection; +import java.util.HashMap; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; -import java.util.Collection; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; import joeq.Class.jq_Class; import joeq.Class.jq_Method; import joeq.Class.jq_Primitive; import joeq.Class.jq_Type; -import joeq.Compiler.Analysis.IPA.PA; import joeq.Compiler.Analysis.IPA.ProgramLocation; import joeq.Compiler.Analysis.IPA.ProgramLocation.QuadProgramLocation; import joeq.Compiler.BytecodeAnalysis.BytecodeVisitor; import joeq.Compiler.Quad.Operand.ConditionOperand; import joeq.Compiler.Quad.Operand.IConstOperand; -import joeq.Compiler.Quad.Operand.MethodOperand; import joeq.Compiler.Quad.Operand.ParamListOperand; import joeq.Compiler.Quad.Operand.RegisterOperand; import joeq.Compiler.Quad.Operand.TargetOperand; @@ -50,7 +46,7 @@ Oracle oracle; CallGraph cg; - private static Map fakeMethodOperand = new HashMap(); + //private static Map fakeMethodOperand = new HashMap(); public MethodInline(Oracle o) { this.oracle = o; @@ -571,47 +567,4 @@ if (TRACE) out.println(CodeCache.getCode(callee.getMethod()).getRegisterFactory().fullDump()); } - private static jq_Class getClassByName(String className) { - jq_Class theClass = (jq_Class)jq_Type.parseType(className); - Assert._assert(theClass != null, className + " is not available."); - theClass.prepare(); - - return theClass; - } - /** - * @param fakeString - * @param originalMethod - * @return replacement method or null - */ - private static jq_Method findReplacementMethod(jq_Class fakeString, jq_Method originalMethod) { - for(Iterator iter = fakeString.getMembers().iterator(); iter.hasNext();){ - Object o = iter.next(); - if(!(o instanceof jq_Method)) continue; - jq_Method m = (jq_Method) o; - - if(!m.getName().toString().equals(originalMethod.getName().toString())){ - continue; - } - - if(m.getParamTypes().length != originalMethod.getParamTypes().length){ - continue; - } - - boolean allMatch = true; - for(int i = 0; i < originalMethod.getParamTypes().length; i++){ - if(m.getParamTypes()[i] != originalMethod.getParamTypes()[i]){ - allMatch = false; - break; - } - } - if(!allMatch) { - continue; - } - - // done with the tests: m is good - return m; - } - - return null; - } } Modified: trunk/joeq_core/joeq/Compiler/Quad/Operator.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Quad/Operator.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/Quad/Operator.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -3888,7 +3888,7 @@ } private static Delegate attemptDelegate(String s) { - String type = "quad-operator delegate"; + //String type = "quad-operator delegate"; try { Class c = Class.forName(s); return (Delegate)c.newInstance(); Modified: trunk/joeq_core/joeq/Compiler/Quad/PointerExplorer.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Quad/PointerExplorer.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/Quad/PointerExplorer.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -481,7 +481,6 @@ Set s = (Set) methodToSpecializations.get(m); int current = 0; if (s != null) { -uphere: for (Iterator i=s.iterator(); i.hasNext(); ) { Specialization s2 = (Specialization) i.next(); Assert._assert(s2.target.getMethod() == m); Modified: trunk/joeq_core/joeq/Compiler/Quad/SSA/EnterSSA.java =================================================================== --- trunk/joeq_core/joeq/Compiler/Quad/SSA/EnterSSA.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Compiler/Quad/SSA/EnterSSA.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -120,7 +120,6 @@ } } if (copyNeeded) { - boolean copyRequested = false; Iterator out2 = ehl.mayCatch(pei.getThrownExceptions()).iterator(); while (out2.hasNext()) { ExceptionHandler eh = (ExceptionHandler) out2.next(); Modified: trunk/joeq_core/joeq/Interpreter/QuadInterpreter.java =================================================================== --- trunk/joeq_core/joeq/Interpreter/QuadInterpreter.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Interpreter/QuadInterpreter.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -232,11 +232,11 @@ public void checkAccept(String host, int port) {} public void checkAccess(Thread t) {} public void checkAccess(ThreadGroup t) {} - public void checkAwtEventQueueAccess(ThreadGroup t) {} + public void checkAwtEventQueueAccess() {} public void checkConnect(String host, int port) {} public void checkConnect(String host, int port, Object context) {} public void checkCreateClassLoader() {} - public void checkDelete() {} + public void checkDelete(String file) {} public void checkExec(String file) {} public void checkExit(int status) { output(); } public void checkLink(String lib) {} Modified: trunk/joeq_core/joeq/Main/FindBestPermutation.java =================================================================== --- trunk/joeq_core/joeq/Main/FindBestPermutation.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Main/FindBestPermutation.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -67,7 +67,7 @@ String ordering = System.getProperty("bddordering"); boolean reverse = System.getProperty("bddnoreverse") == null; String filename = args[0]; - int nDomains = countDomains(ordering); + //int nDomains = countDomains(ordering); //pg = new PermutationGenerator(nDomains); boolean flip = false; boolean updated = true; Modified: trunk/joeq_core/joeq/Runtime/Reflection.java =================================================================== --- trunk/joeq_core/joeq/Runtime/Reflection.java 2006-06-06 23:59:22 UTC (rev 2464) +++ trunk/joeq_core/joeq/Runtime/Reflection.java 2006-06-07 23:03:17 UTC (rev 2465) @@ -385,7 +385,7 @@ } private static Delegate attemptDelegate(String s) { - String type = "reflection delegate"; + //String type = "reflection delegate"; try { Class c = Class.forName(s); return (Delegate)c.newInstance(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2006-06-08 02:44:41
|
Revision: 2466 Author: joewhaley Date: 2006-06-07 16:12:58 -0700 (Wed, 07 Jun 2006) ViewCVS: http://svn.sourceforge.net/joeq/?rev=2466&view=rev Log Message: ----------- Simple modifications to reduce Eclipse warnings, mostly about unused variables. Modified Paths: -------------- trunk/joeq_native/joeq/Allocator/SimpleAllocator.java trunk/joeq_native/joeq/Main/Bootstrapper.java trunk/joeq_native/joeq/Scheduler/jq_Thread.java Modified: trunk/joeq_native/joeq/Allocator/SimpleAllocator.java =================================================================== --- trunk/joeq_native/joeq/Allocator/SimpleAllocator.java 2006-06-07 23:03:17 UTC (rev 2465) +++ trunk/joeq_native/joeq/Allocator/SimpleAllocator.java 2006-06-07 23:12:58 UTC (rev 2466) @@ -774,7 +774,6 @@ boolean lastWasFree = false; // Walk over current block. - outer: while (currBlockEnd.difference(p) > 0) { if (TRACE_FREELIST) Debug.write("ptr=", p); Modified: trunk/joeq_native/joeq/Main/Bootstrapper.java =================================================================== --- trunk/joeq_native/joeq/Main/Bootstrapper.java 2006-06-07 23:03:17 UTC (rev 2465) +++ trunk/joeq_native/joeq/Main/Bootstrapper.java 2006-06-07 23:12:58 UTC (rev 2466) @@ -361,7 +361,7 @@ public int compare(Object o1, Object o2) { return ((jq_Type)o1).getDesc().toString().compareTo(((jq_Type)o2).getDesc().toString()); } - public boolean equals(Object o1, Object o2) { return o1 == o2; } + public boolean equals(Object o) { return this == o; } }); System.out.println("Types:"); Set packages = new LinearSet(); @@ -538,13 +538,10 @@ it = classset.iterator(); while (it.hasNext()) { jq_Type t = (jq_Type) it.next(); - if (t.isReferenceType()) { - jq_Reference r = (jq_Reference) t; - if (t.isClassType()) { - jq_Class k = (jq_Class) t; - objmap.initStaticData(k); - objmap.addStaticFieldRelocs(k); - } + if (t.isClassType()) { + jq_Class k = (jq_Class) t; + objmap.initStaticData(k); + objmap.addStaticFieldRelocs(k); } } Modified: trunk/joeq_native/joeq/Scheduler/jq_Thread.java =================================================================== --- trunk/joeq_native/joeq/Scheduler/jq_Thread.java 2006-06-07 23:03:17 UTC (rev 2465) +++ trunk/joeq_native/joeq/Scheduler/jq_Thread.java 2006-06-07 23:12:58 UTC (rev 2466) @@ -37,7 +37,6 @@ private volatile int thread_switch_enabled; // C code relies on this field being third. private jq_NativeThread native_thread; - private Throwable exception_object; private final Thread thread_object; jq_Thread next; private jq_CompiledCode entry_point; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2006-06-06 23:59:44
|
Revision: 2464 Author: joewhaley Date: 2006-06-06 16:59:22 -0700 (Tue, 06 Jun 2006) ViewCVS: http://svn.sourceforge.net/joeq/?rev=2464&view=rev Log Message: ----------- Added svn:ignore properties. Property Changed: ---------------- trunk/joeq_core/joeq/Allocator/ trunk/joeq_core/joeq/Class/ trunk/joeq_core/joeq/ClassLib/ trunk/joeq_core/joeq/ClassLib/Common/ trunk/joeq_core/joeq/Compiler/ trunk/joeq_core/joeq/Compiler/Analysis/BDD/ trunk/joeq_core/joeq/Compiler/Analysis/FlowInsensitive/ trunk/joeq_core/joeq/Compiler/Analysis/IPA/ trunk/joeq_core/joeq/Compiler/Analysis/IPSSA/ trunk/joeq_core/joeq/Compiler/Analysis/IPSSA/Apps/ trunk/joeq_core/joeq/Compiler/Analysis/IPSSA/Utils/ trunk/joeq_core/joeq/Compiler/Analysis/Primitive/ trunk/joeq_core/joeq/Compiler/BytecodeAnalysis/ trunk/joeq_core/joeq/Compiler/Dataflow/ trunk/joeq_core/joeq/Compiler/Quad/ trunk/joeq_core/joeq/Compiler/Quad/IPA/ trunk/joeq_core/joeq/Compiler/Quad/SSA/ trunk/joeq_core/joeq/Interpreter/ trunk/joeq_core/joeq/Main/ trunk/joeq_core/joeq/Memory/ trunk/joeq_core/joeq/Runtime/ trunk/joeq_core/joeq/Support/ trunk/joeq_core/joeq/UTF/ trunk/joeq_core/joeq/Util/ trunk/joeq_core/joeq/Util/IO/ trunk/joeq_core/joeq/Util/SyntheticGraphs/ trunk/joeq_core/joeq/Util/Templates/ trunk/joeq_native/joeq/Allocator/ trunk/joeq_native/joeq/Assembler/ trunk/joeq_native/joeq/Bootstrap/ trunk/joeq_native/joeq/Class/ trunk/joeq_native/joeq/ClassLib/Common/ trunk/joeq_native/joeq/ClassLib/Common/java/io/ trunk/joeq_native/joeq/ClassLib/Common/java/lang/ trunk/joeq_native/joeq/ClassLib/Common/java/lang/ref/ trunk/joeq_native/joeq/ClassLib/Common/java/lang/reflect/ trunk/joeq_native/joeq/ClassLib/Common/java/net/ trunk/joeq_native/joeq/ClassLib/Common/java/security/ trunk/joeq_native/joeq/ClassLib/Common/java/util/ trunk/joeq_native/joeq/ClassLib/Common/java/util/zip/ trunk/joeq_native/joeq/ClassLib/Common/sun/misc/ trunk/joeq_native/joeq/ClassLib/apple13_osx/ trunk/joeq_native/joeq/ClassLib/apple13_osx/java/lang/ trunk/joeq_native/joeq/ClassLib/apple13_osx/java/util/zip/ trunk/joeq_native/joeq/ClassLib/ibm13_linux/ trunk/joeq_native/joeq/ClassLib/ibm13_linux/com/ibm/jvm/ trunk/joeq_native/joeq/ClassLib/ibm13_linux/java/lang/ trunk/joeq_native/joeq/ClassLib/ibm13_linux/java/lang/ref/ trunk/joeq_native/joeq/ClassLib/ibm13_linux/java/util/zip/ trunk/joeq_native/joeq/ClassLib/ibm13_win32/ trunk/joeq_native/joeq/ClassLib/ibm13_win32/java/lang/ trunk/joeq_native/joeq/ClassLib/ibm13_win32/java/lang/ref/ trunk/joeq_native/joeq/ClassLib/ibm13_win32/java/util/zip/ trunk/joeq_native/joeq/ClassLib/pa/ trunk/joeq_native/joeq/ClassLib/pa/java/security/ trunk/joeq_native/joeq/ClassLib/sun13_linux/ trunk/joeq_native/joeq/ClassLib/sun13_linux/java/lang/ trunk/joeq_native/joeq/ClassLib/sun13_linux/java/util/zip/ trunk/joeq_native/joeq/ClassLib/sun13_win32/ trunk/joeq_native/joeq/ClassLib/sun13_win32/java/io/ trunk/joeq_native/joeq/ClassLib/sun13_win32/java/lang/ trunk/joeq_native/joeq/ClassLib/sun13_win32/java/util/zip/ trunk/joeq_native/joeq/ClassLib/sun142_linux/ trunk/joeq_native/joeq/ClassLib/sun142_linux/java/lang/ trunk/joeq_native/joeq/ClassLib/sun142_win32/ trunk/joeq_native/joeq/ClassLib/sun142_win32/java/lang/ trunk/joeq_native/joeq/ClassLib/sun14_linux/ trunk/joeq_native/joeq/ClassLib/sun14_linux/java/io/ trunk/joeq_native/joeq/ClassLib/sun14_linux/java/lang/ trunk/joeq_native/joeq/ClassLib/sun14_linux/java/util/zip/ trunk/joeq_native/joeq/ClassLib/sun14_win32/ trunk/joeq_native/joeq/ClassLib/sun14_win32/java/io/ trunk/joeq_native/joeq/ClassLib/sun14_win32/java/lang/ trunk/joeq_native/joeq/ClassLib/sun14_win32/java/util/zip/ trunk/joeq_native/joeq/ClassLib/sun15_linux/ trunk/joeq_native/joeq/ClassLib/sun15_linux/java/io/ trunk/joeq_native/joeq/ClassLib/sun15_linux/java/lang/ trunk/joeq_native/joeq/ClassLib/sun15_linux/java/util/concurrent/atomic/ trunk/joeq_native/joeq/ClassLib/sun15_linux/sun/misc/ trunk/joeq_native/joeq/ClassLib/sun15_win32/ trunk/joeq_native/joeq/ClassLib/sun15_win32/java/io/ trunk/joeq_native/joeq/ClassLib/sun15_win32/java/lang/ trunk/joeq_native/joeq/ClassLib/sun15_win32/java/util/concurrent/atomic/ trunk/joeq_native/joeq/ClassLib/sun15_win32/sun/misc/ trunk/joeq_native/joeq/Compiler/BytecodeAnalysis/ trunk/joeq_native/joeq/Compiler/Quad/ trunk/joeq_native/joeq/Debugger/ trunk/joeq_native/joeq/Interpreter/ trunk/joeq_native/joeq/Linker/ELF/ trunk/joeq_native/joeq/Main/ trunk/joeq_native/joeq/Runtime/ trunk/joeq_native/joeq/Scheduler/ trunk/joeq_native/joeq/Synchronization/ trunk/joeq_x86/joeq/Assembler/x86/ trunk/joeq_x86/joeq/Compiler/Quad/x86/ trunk/joeq_x86/joeq/Compiler/Reference/x86/ trunk/joeq_x86/joeq/Scheduler/ Property changes on: trunk/joeq_core/joeq/Allocator ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Class ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/ClassLib ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/ClassLib/Common ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Compiler ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Compiler/Analysis/BDD ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Compiler/Analysis/FlowInsensitive ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Compiler/Analysis/IPA ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Compiler/Analysis/IPSSA ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Compiler/Analysis/IPSSA/Apps ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Compiler/Analysis/IPSSA/Utils ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Compiler/Analysis/Primitive ___________________________________________________________________ Name: svn:ignore - data + *.class Property changes on: trunk/joeq_core/joeq/Compiler/BytecodeAnalysis ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Compiler/Dataflow ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Compiler/Quad ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Compiler/Quad/IPA ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Compiler/Quad/SSA ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Interpreter ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Main ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Memory ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Runtime ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Support ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/UTF ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Util ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Util/IO ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Util/SyntheticGraphs ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_core/joeq/Util/Templates ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/Allocator ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/Assembler ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/Bootstrap ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/Class ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/Common ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/Common/java/io ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/Common/java/lang ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/Common/java/lang/ref ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/Common/java/lang/reflect ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/Common/java/net ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/Common/java/security ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/Common/java/util ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/Common/java/util/zip ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/Common/sun/misc ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/apple13_osx ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/apple13_osx/java/lang ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/apple13_osx/java/util/zip ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/ibm13_linux ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/ibm13_linux/com/ibm/jvm ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/ibm13_linux/java/lang ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/ibm13_linux/java/lang/ref ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/ibm13_linux/java/util/zip ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/ibm13_win32 ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/ibm13_win32/java/lang ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/ibm13_win32/java/lang/ref ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/ibm13_win32/java/util/zip ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/pa ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/pa/java/security ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun13_linux ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun13_linux/java/lang ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun13_linux/java/util/zip ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun13_win32 ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun13_win32/java/io ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun13_win32/java/lang ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun13_win32/java/util/zip ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun142_linux ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun142_linux/java/lang ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun142_win32 ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun142_win32/java/lang ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun14_linux ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun14_linux/java/io ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun14_linux/java/lang ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun14_linux/java/util/zip ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun14_win32 ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun14_win32/java/io ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun14_win32/java/lang ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun14_win32/java/util/zip ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun15_linux ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun15_linux/java/io ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun15_linux/java/lang ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun15_linux/java/util/concurrent/atomic ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun15_linux/sun/misc ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun15_win32 ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun15_win32/java/io ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun15_win32/java/lang ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun15_win32/java/util/concurrent/atomic ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/ClassLib/sun15_win32/sun/misc ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/Compiler/BytecodeAnalysis ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/Compiler/Quad ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/Debugger ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/Interpreter ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/Linker/ELF ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/Main ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/Runtime ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/Scheduler ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_native/joeq/Synchronization ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_x86/joeq/Assembler/x86 ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_x86/joeq/Compiler/Quad/x86 ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_x86/joeq/Compiler/Reference/x86 ___________________________________________________________________ Name: svn:ignore + *.class Property changes on: trunk/joeq_x86/joeq/Scheduler ___________________________________________________________________ Name: svn:ignore + *.class This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2006-06-06 08:33:21
|
Revision: 2463 Author: joewhaley Date: 2006-06-06 01:33:15 -0700 (Tue, 06 Jun 2006) ViewCVS: http://svn.sourceforge.net/joeq/?rev=2463&view=rev Log Message: ----------- Remove unused field. Modified Paths: -------------- trunk/jwutil/main/src/java/jwutil/graphs/Dominators.java Modified: trunk/jwutil/main/src/java/jwutil/graphs/Dominators.java =================================================================== --- trunk/jwutil/main/src/java/jwutil/graphs/Dominators.java 2006-06-06 08:30:44 UTC (rev 2462) +++ trunk/jwutil/main/src/java/jwutil/graphs/Dominators.java 2006-06-06 08:33:15 UTC (rev 2463) @@ -64,11 +64,6 @@ private int[] semi; /** - * Map for labeling the nodes. - */ - private Map map; - - /** * True if we are computing post-dominators, false otherwise. */ private boolean post; @@ -83,7 +78,6 @@ int num = setLabels(start); - map = new HashMap(1 + num / 4); vertex = new Object[num]; semi = new int[num]; parent = new Object[num]; @@ -115,7 +109,6 @@ ancestor = null; label = null; buckets = null; - map = null; } private IndexMap labels; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2006-06-06 08:30:53
|
Revision: 2462 Author: joewhaley Date: 2006-06-06 01:30:44 -0700 (Tue, 06 Jun 2006) ViewCVS: http://svn.sourceforge.net/joeq/?rev=2462&view=rev Log Message: ----------- Fix bug in method signatures, found by clever Eclipse compiler. Modified Paths: -------------- trunk/jwutil/main/src/java/jwutil/console/ResidentJava.java Modified: trunk/jwutil/main/src/java/jwutil/console/ResidentJava.java =================================================================== --- trunk/jwutil/main/src/java/jwutil/console/ResidentJava.java 2006-06-06 08:02:27 UTC (rev 2461) +++ trunk/jwutil/main/src/java/jwutil/console/ResidentJava.java 2006-06-06 08:30:44 UTC (rev 2462) @@ -57,11 +57,11 @@ public void checkAccept(String host, int port) {} public void checkAccess(Thread t) {} public void checkAccess(ThreadGroup t) {} - public void checkAwtEventQueueAccess(ThreadGroup t) {} + public void checkAwtEventQueueAccess() {} public void checkConnect(String host, int port) {} public void checkConnect(String host, int port, Object context) {} public void checkCreateClassLoader() {} - public void checkDelete() {} + public void checkDelete(String file) {} public void checkExec(String file) {} public void checkExit(int status) { throw new SystemExitException(status); @@ -98,7 +98,6 @@ public static String readLine(InputStream in) throws IOException { char[] buf = new char[256]; StringBuffer s = null; - outer: for (;;) { int j; for (j = 0; j < buf.length; ++j) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <joe...@us...> - 2006-06-06 08:02:34
|
Revision: 2461 Author: joewhaley Date: 2006-06-06 01:02:27 -0700 (Tue, 06 Jun 2006) ViewCVS: http://svn.sourceforge.net/joeq/?rev=2461&view=rev Log Message: ----------- Removed unused variable. Modified Paths: -------------- trunk/jwutil/main/src/java/jwutil/strings/Utf8.java Modified: trunk/jwutil/main/src/java/jwutil/strings/Utf8.java =================================================================== --- trunk/jwutil/main/src/java/jwutil/strings/Utf8.java 2006-05-21 07:55:02 UTC (rev 2460) +++ trunk/jwutil/main/src/java/jwutil/strings/Utf8.java 2006-06-06 08:02:27 UTC (rev 2461) @@ -133,7 +133,6 @@ * Returns the new offset in the byte array. */ public static int toUtf8(char c, byte[] to, int off, int end) { - int k = 0; if ((c >= 0x0001) && (c <= 0x007F)) { to[off++] = (byte) c; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |