2007-04-09 C. Scott Ananian * Support/jutil.jar: New jutil jar file with better assertions in WorkSet: if the objects' hashcodes are changing out from under us we should be able to see it now. 2007-04-07 C. Scott Ananian * Backend/Runtime1/method-root.properties: VMMain.run() is invoked via Thread.run(). * Support/cpvm.jar, Support/reflect-thunk.jar: Update cpvm.jar and reflect-thunk.jar to match runtime. 2007-04-05 C. Scott Ananian * Analysis/Transactions/SyncTransformer.java: Ensure the 'removetrans' option actually removes all the calls to readT/writeT. Print out a summary of the options to SyncTransformer so we can be sure we didn't mistype some command-line arg. 2007-04-03 C. Scott Ananian * Analysis/Transactions/SyncTransformer.java: Fix bogus assertion (didn't update it when I added the new removetrans option). * Backend/Runtime1/method-root.properties, Backend/Runtime1/transact-root.properties: Add the 8859-1 decoders to the transaction roots, as they can be invoked in transactional context under certain circumstances (since they're demand loaded). Also add IllegalMonitorStateException to the roots. * Analysis/Transactions/SyncTransformer.java: Add option to strip out the transactions from the code, so we can see the non-transactional overhead. * Analysis/DomTree.java: Add a cast to work around a javac bug. * Support/jutil.jar: Add more assertions to WorkSet (although the crash we were seeing was probably a JVM bug, not our fault). 2007-03-31 C. Scott Ananian * Analysis/Transactions/SyncTransformer.java: Fix use of FieldOracle (now matches thesis). 2007-03-23 C. Scott Ananian * Analysis/Instr/WeightedSet.java, Support/jutil.jar, Util/MapComparator.java, Util/SortedMapComparator.java: Update to latest version of JUtil. * IR/Quads/Translate.java: Don't merge code paths with different active MONITORENTER instructions. This ensures that each MONITOREXIT is dominated by a single MONITORENTER, which makes synchronization transformations (including transactions) much much easier. * Analysis/Transactions/SyncTransformer.java: Add option to partially turn on the smarter check oracles. * bin/run-java: Emit debugging stuff to stderr, not stdout. * Analysis/Transactions/HoistingCheckOracle.java: Don't allow hoisting over a MONITOREXIT. * Main/Transactions.java: If the harpoon.trans.memopt flag is given, apply memory optimization when building transactionally. * Analysis/Quads/QuadClassHierarchy.java, Backend/Runtime1/init-safe.properties, Backend/Runtime1/method-root.properties: Updates for classpath 0.08's new threading code (see corresponding update for Runtime). 2007-03-13 C. Scott Ananian * Backend/PreciseC/TreeToC.java: Work around bug in gcc-3.4 (and other versions?) which refuses to accept an aliased symbol as a constant in a field declaration. 2007-03-12 C. Scott Ananian * bin/build-precisec: gcc 4.0 and later break FLEX. Don't waste time right now trying to figure out why. * bin/run-java: reflect-thunk.jar has moved in the Runtime. * Support/precisec-makefile.template: Add -fno-unit-at-a-time to precisec makefile to keep gcc from reordering things. * Backend/PreciseC/TreeToC.java: Suppress 'packed' attribute on byte-sized data types to avoid a warning in gcc 4.1. Add 'used' attribute to data structures to try to avoid pruning by gcc 4.1. 2007-02-07 C. Scott Ananian * bin/build-arm-hack, bin/build-arm-pnk, bin/build-precisec, bin/build-roles, bin/build-spec, bin/run-java: Our various build scripts actually have bash dependencies. 2006-01-09 salcianu * Analysis/PA2/AllocSync/AllocSyncOneMethod.java, Analysis/PA2/IntraProc.java, Analysis/PA2/WPPointerAnalysisCompStage.java: small changes for debug * Analysis/PA2/WPPointerAnalysis.java: fixing a bug 2006-01-07 salcianu * Analysis/PA2/AllocSync/WPAllocSyncCompStage.java, Analysis/PA2/Mutation/WPMutationAnalysisCompStage.java: small changes * Backend/Runtime1/init-safe.properties: fixing a small error * bin/build-precisec: if KEEP_ARCHIVE is off, make sure to delete the dir with the generated sources; I assume the .a archive and the sources for it are both relevant for debugging, but irrelevant otherwise * bin/alt-build-spec: changes in Alex\'s script * Support/_202_jess-root-set: commented out an irrelevant line * Backend/Runtime1/init-safe.properties: another change that weas required for classpath-0.08 * Main/SAMain.java: add the initcheck version of each root method to the root set; if we know that a method may be invoked via reflection, then we have to assume that it may be invoked from the initializers. This change makes sure the initcheck version of these methods gets produced. Specjvm98 with classpath could not compile without this change: its static initializers do use reflection ... * Backend/Runtime1/method-root.properties: more comments * Analysis/Quads/InitializerTransform.java: added a public method to get the CHECKED version of a method; used from SAMain to add to the root set a few initcheck methods that may be called via reflection from the static initializers * Analysis/ClassHierarchy.java: small javadoc change * Support/_999_checkit-root-set-classpath: _999_checkit would not compile otherwise 2006-01-05 salcianu * bin/alt-build-spec: fixing a small error * Support/glibj-0.08.zip: new version of glib-0.08.zip that goes around some bug in the InitializerTransform (IT): IT does not handle reflection in static initializers; ideally we need to have a property file with methods invoked via refelction from the static initializers * Support/jpaul.jar: upgraded to a newer version of jpaul * bin/alt-build-spec: Alternative script for building the specjvm98 applications. I'm actually very curious how we were able to compile these applications using the old script (while using the classpath / not sunjdk library). Here is some info, taken from the comments at the beginning of that script: # Alternative build script for the SPECJvm98 applications Unlike in # the original script, the entry point for each application $s (e.g., # _200_check) is the class spec.benchmarks.$s.Main # # MOTIVATION: the original script causes a lot of unused awt classes # to be compiled ... and the Flex runtime does not support any # graphics. In particular, the produced executable fails during the # execution of *all* class initializers, when the static initializers # of some (otherwise unused) awt classes are invoked. 2005-12-10 salcianu * Util/LightBasicBlocks/SCCLBBFactory.java, Analysis/CallGraph.java, Analysis/MemOpt/Util.java, Analysis/MetaMethods/MetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/PA2/AllocSync/LoopDetector.java, Analysis/PA2/WPPointerAnalysis.java, Analysis/PointerAnalysis/PointerAnalysis.java, Support/jpaul.jar: many small changes to accomodate a class name change in jpaul's interface: j. Bloch's talk to MIT did not remain without consequences: next day Adam submitted 10 name change suggestions 2005-12-01 salcianu * Analysis/DataFlow/InstrSolver.java, Analysis/MemOpt/Util.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/PA2/PAUtil.java, Analysis/PA2/WPPointerAnalysis.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/Stats.java, Analysis/Quads/DeepInliner/DeepInliner.java, Support/jpaul.jar: new jpaul version; there were many suggestions from Adam Kiezunm and I apply them one by one 2005-11-30 salcianu * Support/jpaul.jar: newer version of jpaul.jar * Analysis/PA2/GraphOptimizations.java, Analysis/PA2/MapRelPAEdgeSet.java, Analysis/PA2/Mutation/MutationNFA.java, Analysis/PA2/Mutation/PURITY-README.html, Analysis/PointerAnalysis/LightMap.java: Small changes having to do with changes in the names of a few jpaul methods (thanks to Adam Kiezun for suggesting them). * Main/Purity.java, Analysis/PA2/Mutation/PURITY-README.html: small changes * Analysis/PA2/Mutation/PURITY-README.html: added info on getting the source code 2005-11-21 salcianu * Analysis/Quads/QuadClassHierarchy.java: Fixing an embarassing bug (I think introduced by me while "cleaning" up the code a few weeks ago): from the caller perspective, there is no point changing a value of a parameter if you don't return it ... 2005-11-06 salcianu * Analysis/PA2/Mutation/WPMutationAnalysisCompStage.java: Small change to some recently added code, to make sure that Flex can continue to analyze itself (some newly added code invoked a method that is not in GNU Classpath 0.08, nor in our additions to it). * Analysis/PA2/Mutation/PURITY-README.html, Analysis/PA2/Mutation/flex-self-test: missing link fixed * Support/jpaul.jar: new jpaul lib * Main/Purity.java: new version * Util/Options/Option.java: Additional test to prevent the creation of options with a name that contains space: there is more than enough naming flexibility even without space :) * Analysis/PA2/Flags.java, Analysis/PA2/Mutation/PURITY-README.html, Analysis/PA2/Mutation/WPMutationAnalysisCompStage.java, Analysis/PA2/Mutation/flex-self-test, Analysis/PA2/Mutation/make-purity-kit, Analysis/PA2/Mutation/purity-test, Analysis/PA2/WPPointerAnalysisCompStage.java: 1. Adding an option suggested by Michael Ernst: --daikon-purity-file It instructs the purity analysis to putput a file containing the names of all pure methods. 2. Per David Saff's suggestion, changed the purity analyis kit to use "suppJars" instead of "aux" as the name of the subdir with the auxiliary .jars required by the analysis implementation (jutil.jar and jpaul.jar). It turns out that Windows has big problems with directories names "aux"; that's a shame for the Windows authors ... 2005-10-25 salcianu * Analysis/PA2/Mutation/purity-test: smal change in a testing script * Analysis/ClassHierarchy.java, Analysis/PA2/PAUtil.java, ClassFile/HClass.java, Support/jpaul.jar: yet another minor change in jpaul.jar 2005-10-24 salcianu * Support/jpaul.jar: new version of jpaul * Analysis/PA2/PAUtil.java, Analysis/PA2/WPPointerAnalysis.java: removing some forgotten debugging code 2005-10-15 salcianu * Analysis/ClassHierarchy.java, Analysis/PreciseGC/WriteBarrierQuadPass.java, Analysis/Quads/QuadClassHierarchy.java, ClassFile/HClass.java: Moved ClassHierarchy.parents(HClass) into HClass.parents() The set of parents of a class is a class-local information, and this method belongs to the HClass class. However, children is a whole-program info, and it remains in the ClassHierarchy class. 2005-10-14 salcianu * Analysis/ClassHierarchy.java: Added Javadoc: now, it should be clear what callable methods and usable/reachable classes are * Analysis/ClassHierarchy.java: better Javadoc 2005-10-13 salcianu * Analysis/Quads/QuadClassHierarchy.java: small changes * Analysis/Quads/QuadClassHierarchy.java: rearranged a bit the code from discoverInstantiatedClass and fixed the comments * Analysis/Quads/QuadClassHierarchy.java: identation and naming changes * Analysis/PA2/Mutation/PURITY-README.html: small change * Main/SAMain.java: irrelevant: changed justification 2005-10-09 salcianu * Analysis/PA2/Mutation/PURITY-README.html: even more doc 2005-10-08 salcianu * Analysis/PA2/Mutation/PURITY-README.html: improved doc * Analysis/PA2/Mutation/PURITY-README.html, Analysis/PA2/Mutation/PURITY-README.txt, Analysis/PA2/Mutation/make-purity-kit: Transformed the README for the purity analysis tool from a .txt into a .html. 2005-10-06 salcianu * ClassFile/HClass.java: adding more comments * ClassFile/HClass.java: adding javadoc * Analysis/PA2/Mutation/purity-test: fixing silly typo 2005-10-05 salcianu * Analysis/PA2/Mutation/PURITY-README.txt, Analysis/PA2/Mutation/flex-self-test, Analysis/PA2/Mutation/purity-test, Main/Purity.java, Util/Timer.java: new version of the purity tool * Support/jpaul.jar: tiny change: removal of an annoying debug message * ClassFile/ImplMagic.java: better caching for the ImplMagic HClass implem. * IR/Bytecode/OpConstant.java, IR/RawClass/ConstantClass.java: better warning message * Main/SAMain.java: better timing * Analysis/PA2/Flags.java, Analysis/PA2/Mutation/WPMutationAnalysisCompStage.java, Analysis/PA2/Mutation/flex-self-test, Analysis/PA2/Mutation/make-purity-kit, Analysis/PA2/Mutation/purity-test, Analysis/PA2/PAUtil.java, Analysis/PA2/Stats.java, Analysis/PA2/WPPointerAnalysis.java: Small changes everywhere: more accurate timing etc. * Analysis/PA2/WPPointerAnalysisCompStage.java: Notice how we do the cg computation between HClass.enterImmutableEpoch(); and HClass.exitImmutableEpoch(); It feels good to be fast :) I will now reattempt to self-analyze flex: last time I had to stop the call graph construction after more than 3 hours ... * Analysis/Quads/CallGraphImpl.java: The promised commit of CallGraphImpl: actually, it doesn't contain anything to motivate the huge speed (25+x) I've encountered. The speed-up is done externally, by entering into an immutability Epoch for HClass'es. However, a small optimization: factored out of the loop some potentially expensive computation, especially HMethod.getDescriptor() that, you guessed it!, does not always use caching, because HMethods are mutable. * ClassFile/HClass.java: Caching support added to HClass. If you ever profiled harpoon.Analysis.Quads.CallGraphImpl in isolation, you may have noticed how slow it is (for Jolden BH, more than 69secs; for comparison, pointer analysis itself takes 28secs). After investigating the issue, I've identified the problem: the ultra-hyper-super-slow method HClass.getMethod(String name, String descriptor) that does a linear search over all methods declared in a class. Naturally, if something is slow and you call it in many places, you try to add caching or some better search datastruct (it is trivial to build a key tree that allows the search of a word in a huge dictionary in time linear in the length of the searched word). However, there is a catch: in Flex, HClass and HMethod are mutable, so caching would be incorrect ... [ Darko, in case you read this, I think you once complained about the purely functional datastructs used in some MSR compiler infrastructure. I think having all the important datastructs purely functional was the best decision that MSR group ever did. Please send them my greetings :) ] I think the mutability of HClass and HMethod (and the fact that the internal representation of such classes is completely exposed - witness the non-private, non-final, package-level "String name;" in ClassFile/HClassCls.java) is a design mistake (especially when you combine this mutational feature" combined with the lazy, on-demand code factories). However, it seems too hard to fix now and I strated feeling really motivated to graduate soon! As an alternative, I've added the possibility of defining "immutablity epochs" for HClass objects: in such an epoch, all HClass'es are guaranteed to stay unchanged, and caching makes sense. If one wants to do a mutation on HClass'es, the current epoch (if any) is terminated, which renders all the HClass caches I've added irrelevant (thanks to an epoch numbering system, these caches will get thrown away without being used in the next immutability epoch). The way this mechanism is supposed to be used is HClass.enterImmutableEpoch(); /* Big computation that does not mutate HClass'es. E.g. call graph computation (not just the creation of the harpoon.Analysis.Quads.(Caching)CallGraph - that doesn't perform too much computation - instead, a sequence of callee computations that actually does something */ HClass.exitImmutableEpoch(); Javadoc for these new static methods will be added soon (repeating some of the things from this commit message). Very soon, a commit on the CallGraphImpl class will show a clear example of using this new feature. * Support/jpaul.jar: Updated version of the jpaul library, with a high-performance work-queue (unlike a work-set, a work-queue does not enforce the set property; same element can be in the queue multiple times). 2005-10-02 salcianu * Analysis/PA2/Mutation/PURITY-README.txt: incremented version number 2005-10-01 salcianu * Analysis/PA2/Mutation/PURITY-README.txt, Analysis/PA2/Mutation/make-purity-kit: small changes * Analysis/PA2/Mutation/flex-self-test, Analysis/PA2/Mutation/flex-self-test.sh: file rename * Support/glibj-0.08-extra.jar: newer version of our gnu cp additions; make sure Collection is a subinterface of Iterable 2005-09-30 salcianu * Support/reflect-thunk.jar: New reflect-thunk.jar with the latest changes in AccessibleObject.java from the Harpoon Runtime. You should now be able to ask Flex to parse and analyze itself using the Analysis/PA2/flex-self script * Support/glibj-0.08.zip: Added the .zip file with the GNU Classpath 0.08 implem. of the Java standard library to our Support file. This way, Flex users (if any) can simply checkout the compiler and start doing some analysis. No need to go through the pain of compiling classpath if you only need to do some analysis. I agree, for actually building executables, one needs the native libraries from Classpath too, but not all Flex applications involve compilation. * IR/Bytecode/OpConstant.java, IR/RawClass/ConstantClass.java: Improvisational hack to allow Flex to parse itself. Here is a brioef overview of the problem: the ldc_w bytecode instruction can be used to load a Class constant (not just an integer or a string). Somehow, Flex will try to construct an IR.Bytecode.OpConstant object; this failed in the old version because ConstantClass was not a subclass of ConstantValue. Not being an expert in this part of the compiler, I've improvized something, with the help of a few clearly marked changes in the two files below. At run time, the first time each of the modifications are invoked, a very clear warning will be printed, but Flex will continue running. Analysis-wise, it seems that everything is OK; no idea about the code generator. I agree that this is ugly. The best way to solve it would be to read the Java bytecode spec again and properly implement the current hackish improvisations. For easy reference, I attach here a (still unreplied) email to Scott about the bug that triggered this hack. It's interesting that this bug was triggered only now: the ldc_w specification I've read online is from '99, and it speaks about class constants (unsupported in our infrastructure). To: cananian@mit.edu Subject: More info on the most recent bug report Date: Tue, 27 Sep 2005 10:05:53 -0400 From: "Alexandru D. Salcianu" Hello Scott! After a bit of debugging, I've discovered that the problem (see my previous email atttached at the end of this one) occurs while Flex build the IR.Bytecode for the class initializer (i.e., ) of class net.cscott.jutil.PersistentTreeNode. I've used javap to look into the structure of the corresponding .class file: javap -c -p -verbose net.cscott.jutil.PersistentTreeNode | less (with an appropriate CLASSPATH in my env.) Here is the problematic code static {}; Code: Stack=4, Locals=8, Args_size=0 0: ldc_w #69; //class net/cscott/jutil/PersistentTreeNode 3: invokevirtual #70; //Method java/lang/Class.desiredAssertionStatus:()Z 6: ifne 13 9: iconst_1 10: goto 14 13: iconst_0 14: putstatic #23; //Field $assertionsDisabled:Z and here is a small fragment from the constant pool: const #68 = Method #279.#280; // java/io/PrintStream.println:(Ljava/lang/String;)V const #69 = class #281; // net/cscott/jutil/PersistentTreeNode const #70 = Method #282.#283; // java/lang/Class.desiredAssertionStatus:()Z Unfortunately, harpoon.IR.Bytecode.OpConstant does not support class constants: it works only with ConstantValues and ConstantClass is not a ConstantValue ... Making ConstantClass a ConstantValue requires defining an appropriate value() method. So, in Flex, how do I construct the java.lang.Class for a given string class name? I could use the system class loader, but I strongly doubt this is the correct way: (1) it bypasses the Linker and it doesn't load from harpoon.class.path, and (2) I don't think it's consistent with the way Flex supports reflection. Any ideas? Thanks, Alex PS: I'm a busy person myself and I fully understand that you don't have too much time. Still, at least a short reply from time to time would be appropriate, at least to inform me that my emails do not disappear in a black-hole :) ------- Forwarded Message To: cananian@mit.edu Subject: Flex problem with JDK 1.5 Date: Mon, 26 Sep 2005 22:03:56 -0400 From: "Alexandru D. Salcianu" Hi Scott! I'm trying to get the purity tool I've built using Flex to analyze itself (or at least to parse itself in the first stage). Here is an error I get: [LOADING ./aux/jutil.jar/net/cscott/jutil/Default$EmptyMap$EmptyMapSet.class] [LOADING ./aux/jutil.jar/net/cscott/jutil/Default$2.class] [LOADING ./aux/jutil.jar/net/cscott/jutil/UnmodifiableIterator.class] [LOADING ./aux/jutil.jar/net/cscott/jutil/PersistentMap$1.class] Exception in thread "main" java.lang.Error: Unknown constant pool entry: CONSTANT_Class: net/cscott/jutil/PersistentTreeNode {281} at harpoon.IR.Bytecode.OpConstant.(OpConstant.java:69) at harpoon.IR.Bytecode.InGen.(InGen.java:180) at harpoon.IR.Bytecode.Code.getElementsL(Code.java:127) at harpoon.IR.Bytecode.Code.getTryBlocks(Code.java:239) at harpoon.IR.Quads.Translate.trans(Translate.java:536) at harpoon.IR.Quads.QuadWithTry.(QuadWithTry.java:38) at harpoon.IR.Quads.QuadWithTry$2.convert(QuadWithTry.java:94) at harpoon.IR.Quads.CloneSynthesizer.convert(CloneSynthesizer.java:63) at harpoon.ClassFile.CachingCodeFactory.convert(CachingCodeFactory.java:58) at harpoon.ClassFile.CachingCodeFactory.convert(CachingCodeFactory.java:58) at harpoon.Analysis.Transformation.MethodMutator$1.convert(MethodMutator.java:67) at harpoon.ClassFile.CachingCodeFactory.convert(CachingCodeFactory.java:58) at harpoon.Analysis.Quads.QuadClassHierarchy.(QuadClassHierarchy.java:202) at harpoon.Main.SAMain$BuildQuadForm.real_action(SAMain.java:565) at harpoon.Main.CompilerStageEZ.action(CompilerStageEZ.java:37) at harpoon.Main.SAMain.main(SAMain.java:118) at harpoon.Main.Purity.main(Purity.java:82) salcianu@retezat:~/purity-kit$ You'll find the code that generates the error at http://www.mit.edu/~salcianu/purity-kit-crash.tgz The .tgz uncompresses into a directory called purity-kit; it contains a script called crash.sh that will illustrate the problem (before using it, you'll need to edit it to indicate the place where the JDK 1.5 rt.jar is. After that, just urn the edited crash.sh Let me know if you gave any insight into this error! Alex * Analysis/PA2/Mutation/flex-self-test.sh: script that tests Flex by running the purity analysis on itself * ClassFile/CachingCodeFactory.java, ClassFile/ImplMagic.java, Main/Purity.java: no changes: occasional whitespaces added * IR/Bytecode/Code.java, Main/SAMain.java: 1. Fixed the class Javadoc for SAMain: it contained some ancient phrase about StrongArm. Those days are gone! 2. Added a new version "--verbose-bytecode-method" that allows us to see which methods are actually parsed by Flex from bytecode. I've found this option quite useful while struggling to add the GNU Classpath 0.08 extra classes to allow Flex to parse itself. * Support/glibj-0.08-extra.jar: small changes: making sure all java files have the right copyright notice - GNU GPL * Support/glibj-0.08-extra.jar: jar with several class implementations that allow Flex to parse and analyze itself (when using this jar and GNU Classpath 0.08). Contains a pretty detailed README.txt that explains what those classes are and how to edit them. It's unclear whether Flex can actually generate a correct executable of itself, as after 4 weeks of frustrating work, I'm still unable to use Flex to compile anything with GNU Classpath... DON'T RUSH into using Flex to analyze itself! There are a few more commits that I have to do, after I clear out the mess around those edits. Once that is done, I'll tag the files with something like flex_self_parse_gnu_cp_0_08 such that we have a checkpoint. 2005-09-29 salcianu * Analysis/PA2/Mutation/make-purity-kit, Analysis/PA2/Mutation/purity-test: small changes in the scripts associated with the purity analysis kit * Main/Purity.java: Better way to obtain the root dir of the purity kit * Main/Settings.java: better javadoc * ClassFile/ImplMagic.java: adding some more empty lines for clarity * ClassFile/HClassSyn.java: small changes * Analysis/AbstractClassFixupRelinker.java: better assertion message * Analysis/Quads/SCC/SCCAnalysis.java: Code restructuring to go around some JDK 1.5.0 bug. All versions of Sun JDK 1.5.0 I've tried (_02, _4, and _05) generate incorrect code for SCCAnalysis: they generate byecode that references an anonymous inner classes (SCCAnalysis$1) that is never written to disk by the javac compiler (SCCAnalysis$2/3/4 luckier - they get written to the disk). This error surfaced when I was trying to parse Flex with itself. It seems that JDK 1.5.0 was confused by the many static inner classes of SCCAnalysis. Without changing the semantics or the protection level (package), I've placed almost all such classes outside SCCAnalysis. Now, Flex seems able to parse itself + GNU classpath 0.08. Unclear if Flex can compile itself down to native code: I didn't succeed in making Flex generate ANY executable with GNU classpath-0.08. 2005-09-28 salcianu * Analysis/Quads/QuadClassHierarchy.java: During recent debugging, I had to investigate QuadClassHierarchy (no bug was found in it, but understamding it was essential for finding the real bugs). I took this opportunity to make the code easier to read and understand; in particular, the long constructor has been split into several methods. * Analysis/ClassHierarchy.java: Small change performed while debugging one of the previously mentioned bugs: the Javadoc of this class lacks a clear definition of usable/reachable class (reachable is not transitive subclassing). I propose such a definition in a TODO comment. Hopefully, this comment will motivate people to improve the Javadoc for ClassHierarchy. * ClassFile/HMethodImpl.java: Better hashCode - the last commit made Flex really slow. Current version is faster than classical version, the one before my most recent commit: instead of computing the method descriptor (by doing a bunch of appends to a StringBuffer), we use the hashCodes of the parameters and the hashCode of the return type. I remember that Wes once noticed that Flex spends most of its time constructing HMethod descriptors. QUESTION: can't we cash the hashCode and the descriptor of an HMethod? The speed improvements would be HUGE! * ClassFile/HMethodImpl.java: Changed the equals method of HMethodImpl. In Java, two otherwise identical methods with different return types are DISTINCT (in particular, they have a distinct descriptor). In case there are any doubts, please run javap harpoon.IR.Assem.Instr\$4 and notice the two get(int) methods (one returns an Object, the other an Instr). These methods are created by the compiler, in "corner cases" (that's oure codename for "situations that expose bugs); e.g., refinement of the return type in a subclass. The old "equals" did not reflect this, preventing Flex from parsing itself: while constructing HClass'es, Flex had the impression that some classes have duplicate methods. This was another highly unpleasant bug ... * IR/Quads/CALL.java: Better assertion messages * IR/Quads/Quad.java: New method: toLongString - provides more info than the usual toString * ClassFile/ImplMagic.java: Quick fix for an UNUSUALLY NASTY BUG: different implementation of HClass do not agree on the definition of equals. For HClassProxy, equals means equality of the string descriptor. For every single other HClass (sub)class I've seen (and there are many of them: HClass, HClassImpl, HClassCls, HClassSyn, and, last but not least!, the informatively named ImplMagic$MagicClass), so, for all of other HClass'es, equals is inherited from Object, i.e., object identity. As a consequence, the equals relation on HClass^2 is NOT symmetric, leading to a wide range of ugly bugs related to the use of HClass'es in collections ... javac should definitely contain Bill Pugh's detector of easy bugs / suspicious code (such as defining hashCode without defining equals, which would have caught this problem). A couple of years ago, after a similar debug marathon, I though about such a tool; Bill Pugh was faster. Currently, I've just added an equals method in ImplMagic$MagicClass. This is a temporary fix: the best way would be to implement equals and hashCode at the level of HClass. Is there any reason why two HClass'es with the same descriptor should not be equal? 2005-09-27 salcianu * Analysis/PA2/Flags.java, Analysis/PA2/Mutation/PURITY-README.txt: small changes left uncommited * IR/Bytecode/OpConstant.java: more informative error message; such that we know the method that we parse when the error occurs 2005-09-22 salcianu * .cvsignore, Analysis/PA2/Mutation/WPMutationAnalysisCompStage.java: Many small changes done while making the purity analysis tool. * Main/Purity.java: Convenient entry point for the pointer analysis (as executed in the pointer analysis kit generated by Analysis/PA2/Mutation/make-purity-kit). Minimal arguments, does not need any special property or environment settings, so it's well-suited for programmatic use of the analysis. The "minimal arguments" feature has a downside: the class is pretty rigid as to where each required file is on the disk; you should not attempt to use it outside the purity analysis kit. * Analysis/PA2/Mutation/PURITY-README.txt, Analysis/PA2/Mutation/make-purity-kit, Analysis/PA2/Mutation/purity-test: Files for creating a purity analysis kit. They seem to work; a first version (0.00 - everything has a beginning!) of the kit has been created. It's available from http://www.mit.edu/~salcianu/purity2 (the final 2 is important). 2005-09-21 salcianu * Analysis/PA2/Flags.java, Analysis/PA2/Mutation/WPMutationAnalysisCompStage.java, Analysis/PA2/PAUtil.java, Analysis/PA2/Stats.java, Analysis/PA2/WPPointerAnalysis.java: more changes on PA stats: adding command line option (off by default) * .cvsignore, Analysis/PA2/Mutation/MAUtil.java, Analysis/PA2/Mutation/WPMutationAnalysisCompStage.java, Analysis/PA2/PAUtil.java, Analysis/PA2/Stats.java, Analysis/PA2/WPPointerAnalysis.java, GNUmakefile, Util/Timer.java: adding statistics 2005-09-20 salcianu * Analysis/PA2/Flags.java, Analysis/PA2/InterProcConsGen.java, Analysis/PA2/IntraProc.java: fixing a small bug 2005-09-19 salcianu * Support/jpaul.jar: new version of jpaul.jar 2005-09-18 salcianu * Analysis/PA2/AllocSync/AllocSyncOneMethod.java, Analysis/PA2/AllocSync/WPAllocSyncCompStage.java, Analysis/PA2/Mutation/WPMutationAnalysisCompStage.java, Analysis/PA2/InterProcConsGen.java, Analysis/PA2/PAUtil.java, Analysis/PA2/PointerAnalysis.java, Analysis/PA2/WPPointerAnalysis.java: Technical changes * Main/SAMain.java, Main/Settings.java: better mesages 2005-09-16 salcianu * Analysis/IOEffectAnalysis.java, Analysis/PA2/InterProcConsGen.java, Analysis/PA2/quasi-safe.sunjdk.properties, Analysis/io-methods.classpath-0.08.properties, Analysis/io-methods.sunjdk.properties: adding properties for IOEffectAnalysis * Main/Settings.java: better error message * Main/SAMain.java, Main/Settings.java, Support/jpaul.jar: New code to check that the right version of classpath is on harpoon.class.path. Currently, the user specifies which standard library implem. he wants to use (sunjdk or classpath-VER, where VER is also user-specified, with teh default being classpath-0.08). Next, Flxe uses some heuristics to check that the right std. lib is on harpoon.class.path (currently, we grab the constant content of the field gnu.classpath.Configuration; for sunjdk, we just assume it's correct). In the future, we may consider not requiring any command line option about the std lib, and just look on the classpath. The reason I'm not inclined to do so yet is that we currently support just two versions of classpath, and I feel that the user must be VERY AWARE of what he's using. * Analysis/PA2/PAUtil.java: Forgotten commit. * Analysis/PA2/Flags.java, Analysis/PA2/SpecialInterProc.java: deleting comments; verbosity made conditional 2005-09-15 salcianu * GNUmakefile: finally managed to inform the makefile about the newly added properties * Analysis/PA2/SpecialInterProc.java, Analysis/PA2/quasi-safe.classpath-0.08.properties: add code to use the full info from quasi-safe properties * Instrumentation/AllocationStatistics/AllocationInstrCompStage.java: fixing the enabling condition 2005-09-14 salcianu * GNUmakefile: changes to take into account the new quasi-safe properties files * bin/run-java: make sure we start with an empty set of javaopts; external entities can pass additional options as comman line options; I dislike hidden passing of args via env vars, properties etc. * bin/build-precisec: Simplifications: 1. The previous special processing to add some of my options is gone 2. I couldn't find any meaning for the -Dsample=value option. I deleted it. * Analysis/PA2/SpecialInterProc.java: reading quasi-safe methods from a property file, instead of initializing them by hand * Analysis/PA2/AllocSync/WPAllocSyncCompStage.java: fixing typo * Analysis/PA2/Flags.java: setting two common defaults * Main/RegularCompilerStageEZ.java: unnecessary now * Main/MZFCompilerStage.java: From now on, using the mzf stage will require explicitly activating it using the "--mzf" command option. Ideally, all the (MANY!) properties should be converted to command line options, and each of them should be enough for turning on the ENABLED flag (that is currently done by "--mzf"). After this change, people running only compilation will no longer have to wonder "why is the mzf stage invoked?" * Main/CodeGenerator.java: small change * Main/SAMain.java: small changes; mainly to take into account that certain stages should be executed only if we generate code (default case) and not for pure analyses * Main/Settings.java: Providing a place for truly global settings, such as the standard library implementation we use (currently, one of sunjdk or classpath-0.xx). I think the compiler should be VERY aware of what standard library it is using, and pick the appropriate property files (see the quasi-safe.*.properties files from Analysis/PA2). The distinction between different stdlibs should be done based on a command line option (and different classpaths) instead of cvs branches If we use branches, how are we going to distribute the compiler? as a CVS repository? Multiple distributions? (one for each supported stdlib?) * Analysis/PA2/quasi-safe.sunjdk.properties: quasi-safe for sunjdk * Analysis/PA2/quasi-safe.classpath-0.08.properties: file with quasi-safe methods; the first paragraphs of comments explain what such a method is 2005-09-13 salcianu * Analysis/PA2/IntraProc.java: Change the semantics of a method from pointer analysis to fix a bug eomDirGblEsc should return all externally-visible globally lost nodes - some of the direct gbl esc nodes may not be visible from outside; eomAllGblEsc returns even the nodes that are not reachable from params/return - these are the nodes compressed into GBL Maybe the name of the method should be changed too at some point * Analysis/PA2/Mutation/WPMutationAnalysisCompStage.java: changes in the statistics gathering code * Analysis/PA2/SpecialInterProc.java: better protection against missing methods in an analysis optimization * Analysis/IOEffectAnalysis.java, Analysis/PA2/Mutation/MutationAnalysis.java: Making the code more resilient against certain missing methods (the methods may not be there simply because they are not invoked by the analyzed program). * Analysis/PA2/InterProcConsGen.java: adding missing constraint 2005-09-12 salcianu * Main/CodeGenerator.java: Print longer description for the compiled methods. If the user dislikes compiler output, there is a special command line option for making it non-verbose. * bin/run-java: If CLASSPATH_HOME is not set by the user, set it to ${FLEX_DIR}/../classpath-install. If this directory does not exist, or for whatever reason the classpath .zip is not there, the usual processing resumes: try classpath-config, look for the usual location for the installed debian package. Also made sure that if .zip is found, the script fails loudly, instead of continuing. * Analysis/Quads/InitializerTransform.java: At Scott's suggestion, make sure that an error encountered while reading the init-safe property file results in a Runtime Exception being thrown by teh compiler. Normally, this will cause the entire compiler to die. Alternatively, a top level class may decide to catch the exception, print some informative message, and try something else. 2005-09-08 salcianu * Analysis/Quads/InitializerTransform.java: Small changes to make sure that one problematic line in the root set file does not cause Flex to skip the rest of the file: now, Flex prints a warning message, and continues with the other lines from the file. 2005-09-07 salcianu * Support/jpaul.jar: latest jpaul.jar * Analysis/IOEffectAnalysis.java, Analysis/PA2/Mutation/MAUtil.java, Analysis/PA2/Mutation/MLabel.java, Analysis/PA2/Mutation/MutRegExpSimplifier.java, Analysis/PA2/Mutation/MutationAnalysis.java, Analysis/PA2/Mutation/WPMutationAnalysisCompStage.java, Support/jpaul.jar: added simple analysis to detect IO effects - separated from the pointer/mutation analysis; there was no link between them anyway 2005-09-06 salcianu * Analysis/PA2/Mutation/MutRegExpSimplifier.java, Analysis/PA2/Mutation/MutationAnalysis.java, Analysis/PA2/Mutation/MutationNFA.java, Analysis/PA2/Mutation/WPMutationAnalysisCompStage.java: adding a simplifier to make regexps nicer 2005-09-05 salcianu * Analysis/PA2/InterProcConsGen.java, Analysis/PA2/Mutation/MutationAnalysis.java, Analysis/PA2/Mutation/WPMutationAnalysisCompStage.java, Analysis/PA2/PAUtil.java, Analysis/PA2/SpecialInterProc.java, Analysis/PA2/WPPointerAnalysisCompStage.java, Support/jpaul.jar: more changes in the mutation analysis - mostly output formatting * Analysis/PA2/Flags.java, Analysis/PA2/InterProcAnalysisResult.java, Analysis/PA2/IntraProc.java, Analysis/PA2/PAUtil.java: small changes in the pa v.2 code * Analysis/PA2/Mutation/MAUtil.java, Analysis/PA2/Mutation/MutationAnalysis.java, Analysis/PA2/Mutation/MutationNFA.java, Analysis/PA2/Mutation/ParamInfo.java, Analysis/PA2/Mutation/WPMutationAnalysisCompStage.java: Ported "safe parameter" detection (as described in the VMCAI'05 paper) to the new implementation of the pointer analysis. Hopefully, it is now robust enough to be used by other people too. * Analysis/PA2/Mutation/MLabel.java, Analysis/PA2/Mutation/MutationAnalysis.java, Analysis/PA2/Mutation/NoAnalysisResultException.java, Analysis/PA2/Mutation/WPMutationAnalysisCompStage.java: Added some classes for the mutation analysis. 2005-09-02 salcianu * Analysis/PA2/AllocSync/WPAllocSyncCompStage.java, Analysis/PA2/Mutation/WPMutationAnalysisCompStage.java, Support/jpaul.jar, Analysis/PA2/WPPointerAnalysis.java, Analysis/PA2/WPPointerAnalysisCompStage.java: Changes to accomodate the latest reorganization of the pa compiler changes. * Main/CodeGenerator.java, Main/SAMain.java: Reorganized the compiler stages attached to the pointer analysis. Added a new option "--no-code-gen" for situations where only analysis is desired, without any code generation (e.g., purity analysis). If you don't use this option, the compiler works a before. * Analysis/PA2/CallConstraint.java, Analysis/PA2/GraphOptimizations.java, Analysis/PA2/Mutation/MutationNFA.java, Analysis/PA2/Mutation/WPMutationAnalysisCompStage.java, Analysis/PA2/SpecialInterProc.java, Analysis/PA2/WPMutationAnalysisCompStage.java, Analysis/PA2/WPPointerAnalysis.java, Analysis/PA2/WVar.java: reorganization of code for the mutation analysis 2005-09-01 salcianu * Analysis/PA2/Mutation/MutationNFA.java, Analysis/PA2/NodeRepository.java, Analysis/PA2/PAEdgeSet.java, Analysis/PA2/PAUtil.java, Analysis/PA2/WPMutationAnalysisCompStage.java, Analysis/PA2/WVar.java, Analysis/PA2/WriteConstraint.java: adding more code for the purity/mutation analysis 2005-08-31 salcianu * Analysis/CallGraph.java, Analysis/PA2/Flags.java, Analysis/PA2/GraphOptimizations.java, Analysis/PA2/SpecialInterProc.java, Analysis/PA2/TypeFilter.java, Analysis/PA2/WPMutationAnalysisCompStage.java, Analysis/PA2/WPPointerAnalysisCompStage.java, Main/SAMain.java, Support/jpaul.jar: today's edits 2005-08-30 salcianu * Analysis/PA2/AllocSync/WPAllocSyncCompStage.java, Analysis/PA2/CallConstraint.java, Analysis/PA2/DSFactories.java, Analysis/PA2/Flags.java, Analysis/PA2/GraphOptimizations.java, Analysis/PA2/IPResTupleImpl.java, Analysis/PA2/InterProcAnalysisResult.java, Analysis/PA2/InterProcConsGen.java, Analysis/PA2/IntraProc.java, Analysis/PA2/PAUtil.java, Analysis/PA2/WPPointerAnalysis.java, Analysis/PA2/WPPointerAnalysisCompStage.java, Support/jpaul.jar: ported mutation analysis to new pointer analysis implem 2005-08-29 salcianu * Analysis/PA2/AllocSync/WPAllocSyncCompStage.java, Analysis/PA2/Flags.java, Analysis/PA2/InterProcConsGen.java, Analysis/PA2/IntraProc.java, Analysis/PA2/MapRelPAEdgeSet.java, Analysis/PA2/WPPointerAnalysis.java, Analysis/PA2/WPPointerAnalysisCompStage.java, Support/jpaul.jar: Latest changes in the Pointer Analysis v2 (PA2) implementation. Optimizations that trade precision for speed: 1. Consider as unanalyzable the calls with too many callees (currently, the threshold is set at 15). 2. Consider as unanalyzable the intra-scc calls from too big SCCs As a result, the pointer analysis of javac takes less than 5 minutes (down from more than 2hours in the TOPLAS submission - old implem., and the results are actually better). 2005-08-26 salcianu * Analysis/PA2/MapRelPAEdgeSet.java, GNUmakefile, Support/RegExps.jar, Support/jpaul.jar, bin/run-java: The code from RegExps.jar has been integrated (in a highly improved form) in the jpaul library (Support/jpaul.jar). No need for a separate .jar now. 2005-08-18 salcianu * Analysis/PA2/DSFactories.java, Analysis/PA2/MapRelPAEdgeSet.java, Support/jpaul.jar: small changes 2005-08-17 salcianu * Analysis/EventDriven/ToAsync.java, Analysis/MetaMethods/MetaAllCallers.java, Analysis/MetaMethods/MetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphAbstr.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/MetaMethods/SmartCallGraph.java, Instrumentation/AllocationStatistics/AllocationNumberingStub.java, Support/jpaul.jar, Util/TypeInference/TypeInference.java, IR/Quads/SSIRename.java: Changes to accomodate the switch from harpoon.Util.DataStructs to jpaul.DataStructs * Analysis/PointerAnalysis/AbstrPAEdgeSet.java, Analysis/PointerAnalysis/AbstrRelation.java, Analysis/PointerAnalysis/AbstrRelationMapBased.java, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/ComputeInterProcMuClosure.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/EdgeOrdering.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/LightMap.java, Analysis/PointerAnalysis/LightPAEdgeSet.java, Analysis/PointerAnalysis/LightRelation.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/Matching.java, Analysis/PointerAnalysis/PAEdge.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PASync.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/Relation.java, Analysis/PointerAnalysis/RelationEntryVisitor.java, Analysis/PointerAnalysis/RelationImpl.java: To make sure harpoon.Analysis.PointerAnalysis continues to compile, several classes from the now disappeared harpoon.Util.DataStructs have been moved here: they are a few differences between these classes and those from jpaul.DataStructs and I could not do all the changes. Which would also be senseless: Analysis.PointerAnalysis will dissapear in a few weeks, as PA2 become more mature. * Analysis/CallGraph.java, Analysis/DataFlow/InstrSolver.java, Analysis/MemOpt/ComputeAnAe.java, Analysis/MemOpt/Util.java, Analysis/MetaMethods/MetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/PointerAnalysis/EdgesNCallees.java, Analysis/PointerAnalysis/MethodHole.java, Analysis/PointerAnalysis/PointsToGraph.java, Util/LightBasicBlocks/CachingSCCLBBFactory.java, Util/LightBasicBlocks/SCCLBBFactory.java: Changes to accomodate the switch from harpoon.Util.Graphs to jpaul * Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/ODInformation.java, Analysis/PointerAnalysis/ODInterProcPA.java, Analysis/PointerAnalysis/ODMAInfo.java, Analysis/PointerAnalysis/ODNodeStatus.java, Analysis/PointerAnalysis/ODParIntGraph.java, Analysis/PointerAnalysis/ODParIntGraphPair.java, Analysis/PointerAnalysis/ODPointerAnalysis.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/Stats.java: Removed ODPointerAnalysis and the attached files. Nobody used this in many, many years, and it's a nuisance every time we change something. If it's really necessary, anybody can check into an older version of the compiler. * bin/run-java: self-explanatory changes * Support/jpaul.jar: jpaul.jar added as any binary file should be: with -kb:) * Support/jpaul.jar: remove jpaul.jar; it will be added again with the -kb option 2005-08-16 salcianu * Support/jpaul.jar: Sorry for this: jpaul.jar 2.1 should finally be in now. * Analysis/PA2/AllocSync/ASFlags.java, Analysis/PA2/AllocSync/AllCallers.java, Analysis/PA2/AllocSync/AllCallersImpl.java, Analysis/PA2/AllocSync/AllocSyncOneMethod.java, Analysis/PA2/AllocSync/WPAllocSyncCompStage.java, Analysis/PA2/CallConstraint.java, Analysis/PA2/CloneCallConstraint.java, Analysis/PA2/DSFactories.java, Analysis/PA2/GraphOptimizations.java, Analysis/PA2/IntraProc.java, Analysis/PA2/LoadConstraint1.java, Analysis/PA2/LoadConstraint2.java, Analysis/PA2/StaticStoreConstraintF.java, Analysis/PA2/StoreConstraint.java, Analysis/PA2/StoreConstraintF.java, Analysis/PA2/TypeFilterConstraint.java, Analysis/PA2/WPPointerAnalysisCompStage.java, Support/jpaul.jar: 1. Commit the new version of jpaul.jar (2.1) 2. Various changes here and there to make sure the code compiles with the new version. 2005-08-09 salcianu * Main/SAMain.java: Added an option to trigger loader verbosity: --verbose-load; causes the loader to show where it loads each class from. * Analysis/PA2/AllocSync/WPAllocSyncCompStage.java: small addition (a method that creates the right pipeline of compiler stages: pointer analysis + stack alloc. client - invoked from SAMain). * Main/SAMain.java: Changes in the top-level compiler driver to invoke PA v.2 and its stack allocation client (stack allocation is really great for debugging pa). * Analysis/PA2/AllocSync/ASFlags.java, Analysis/PA2/AllocSync/AllocSyncOneMethod.java, Analysis/PA2/AllocSync/Debug.java, Analysis/PA2/AllocSync/LoopDetector.java, Analysis/PA2/AllocSync/WPAllocSyncCompStage.java: Stack allocation and sync. removal client of the pointer analysis. For the moment, only the stack allocation (as locks are becoming thinner, sync removal doesn't have very much priority on my TODO list). * Analysis/PA2/AnalysisPolicy.java, Analysis/PA2/CallConstraint.java, Analysis/PA2/CloneCallConstraint.java, Analysis/PA2/DSFactories.java, Analysis/PA2/EVar.java, Analysis/PA2/EdgeSetVar.java, Analysis/PA2/FVar.java, Analysis/PA2/Flags.java, Analysis/PA2/FullAnalysisResult.java, Analysis/PA2/GraphOptimizations.java, Analysis/PA2/IPResTupleImpl.java, Analysis/PA2/IVar.java, Analysis/PA2/InterProcAnalysisResult.java, Analysis/PA2/InterProcConsGen.java, Analysis/PA2/IntraProc.java, Analysis/PA2/LVar.java, Analysis/PA2/LoadConstraint1.java, Analysis/PA2/LoadConstraint2.java, Analysis/PA2/MapRelEdgeSetFactory.java, Analysis/PA2/MapRelPAEdgeSet.java, Analysis/PA2/NodeRepository.java, Analysis/PA2/NodeSetVar.java, Analysis/PA2/OVar.java, Analysis/PA2/PAEdgeSet.java, Analysis/PA2/PANode.java, Analysis/PA2/PAUtil.java, Analysis/PA2/PointerAnalysis.java, Analysis/PA2/SpecialInterProc.java, Analysis/PA2/StaticStoreConstraintF.java, Analysis/PA2/StoreConstraint.java, Analysis/PA2/StoreConstraintF.java, Analysis/PA2/TypeFilter.java, Analysis/PA2/TypeFilterConstraint.java, Analysis/PA2/WPPointerAnalysis.java, Analysis/PA2/WPPointerAnalysisCompStage.java: New implementation of the pointer analysis, using the jpaul analysis library. More to come. * GNUmakefile, Support/RegExps.jar, Support/jpaul.jar: Some of my code uses two libraries I wrote: jpaul and RegExps (in time, RegExps will be added to jpaul). I've added these libraries as .jar's into Support, and changed GNUmakefile to make sure the code from the repository compiles OK. * Analysis/Quads/DeepInliner/package.html: small change * Analysis/Quads/DeepInliner/DeepInliner.java, Analysis/Quads/DeepInliner/InlineChain.java, Analysis/Quads/DeepInliner/OneLevelInliner.java, Analysis/Quads/DeepInliner/package.html: Package with inling related code. The main goal is inlining arbitrary-length call paths, but it also contains contains code for inlining just one call. * ClassFile/Loader.java: The printing of the "[LOADING " messages is now controlled by a static flag (off by default). A command line flag may turn it on, if desired. * Util/Timer.java: To ease its use, a Timer gets started as soon as it is created. Old code, that manually started the Timer, should not be affected. * Util/Util.java: Added a small method to retrieve the method whose code a quad is part of. * Analysis/EventDriven/ContCodeNoSSA.java: Small change to make sure flex compiles. * Analysis/Quads/CallGraphImpl.java: CallGraphImpl.java * IR/Quads/Quad.java, IR/Quads/QuadSSI.java: unimportant changes * IR/Quads/QuadNoSSA.java: Bug fix: propagate the allocation info when converting QuadRSSx into QuadNoSSA. * IR/Quads/RSSxToNoSSA.java: Made the code more readable: 1. Embellish identation 2. Make use of the JDK 1.5 for construct 3. Eliminate useless fields: object fields should be used to store things that are relevant for the object state, not just as a quick way of passing around frequent params ... 2005-01-20 C. Scott Ananian * Support/jutil.jar, Analysis/Instr/RegAlloc.java: Update to the latest version of JUtil (just re-org of the MultiMapFactory interface). 2004-07-02 C. Scott Ananian * Analysis/Transactions/SyncTransformer.java: Current transactions impl doesn't support nested transactions. 2004-07-01 C. Scott Ananian * Backend/Runtime1/ObjectBuilder.java, Backend/Runtime1/TreeBuilder.java, IR/Tree/ToTree.java, Main/Transactions.java: Revert more arraybloat code. * IR/Tree/ToTree.java, Main/Transactions.java, Analysis/Transactions/BitFieldNumbering.java, Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreeDataFilter.java, Analysis/Transactions/TreePostPass.java, Backend/Runtime1/DataReflection1.java, Backend/Runtime1/DataStrings.java, Backend/Runtime1/ObjectBuilder.java, Backend/Runtime1/TreeBuilder.java, Analysis/SizeOpt/MostlyZeroFinder.java: Update Transactions implementation to match SPIN model. Get rid of arraybloat and readflags. * Support/jutil.jar: Update JUtil with a version compiled to work with JDK1.5b2 and which eliminates some old workarounds for buggy early versions of JSR-14 compilers. * Runtime/Transactions/TransactionAbortException.java: Replace string concatenation with explicit use of StringBuffer to be compatible with minilib, as javac 1.5 now uses StringBuilder to implement concatenation. * Backend/PreciseC/TreeToC.java: Suppress a gcc warning about labels at end of compound statements being deprecated by inserting a null statement (read, semicolon). * Analysis/Maps/ExecMapProxy.java, Analysis/ReachingDefsAltImpl.java, Util/SortedMapComparator.java, Analysis/Quads/CollectSyncStats.java, Analysis/Quads/ComponentOfReducer.java: Minor updates to support JDK1.5b2: remove some work-arounds needed for earlier versions of the compiler; add a parameter to an implementation of SecurityManager (not needed iff this class is compiled with -source 1.4, which I don't want to do), remove parameterizations from right-hand sides of instanceof (in AugSetFactory, done by making a surrounding class static so that it doesn't inherit the parameters of the parent). We also work-around a new bug in the ternary ? operator, in Util/SortedMapComparator. 2004-06-28 C. Scott Ananian * Main/Transactions.java, Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreePostPass.java: Revert 2003-12-08 commit which "hack[ed] and chop[ped] out the readflags and array bloat stuff". This gives us a working version to grab the pces04 benchmarks with. * Runtime/Transactions/TransactionAbortException.java: Replace string concatenation with explicit use of StringBuffer to be minilib-friendly with JDK1.5 (which otherwise would use StringBuilder to implement string concatenation). * IR/Tree/ToTree.java, Main/Transactions.java, Analysis/Transactions/BitFieldNumbering.java, Analysis/Transactions/NOTES, Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TRANS-ALG.txt, Analysis/Transactions/TreeDataFilter.java, Analysis/Transactions/TreePostPass.java, Backend/Runtime1/DataReflection1.java, Backend/Runtime1/DataStrings.java, Backend/Runtime1/ObjectBuilder.java, Backend/Runtime1/TreeBuilder.java: Branch csa-ecoop04 (transactions work) updated to CVS head. * Analysis/Transactions/NOTES, Analysis/Transactions/TRANS-ALG.txt: New file. * Analysis/SizeOpt/MostlyZeroFinder.java: Branch csa-ecoop04 (transactions work) updated to CVS head. 2004-06-25 C. Scott Ananian * Analysis/Transactions/AltArrayTransformer.java: The beginnings of code to substitute an alternate array implementation for the standard java one. Imported from csa-ecoop04 branch. Big problems with such an approach: how does it communicate with JNI code? [we give new implementations to the JNI array-access methods?] How does it communicate with ObjectBuilder? [esp for strings] * Runtime/AltArray/ArrayImplJavaType.jt, Runtime/AltArray/ChunkArrayJavaType.jt, Runtime/AltArray/SimpleArrayJavaType.jt: Array implementations should have a length() method. [Change imported from csa-ecoop04 branch.] * Backend/Runtime1/DataReflectionMemberList.java: Update javadoc to explicitly mention that we emit reflection tables for Constructor objects. Add a more-sophisticated 'isConstructor' test that correctly recognizes constructors split by the initializer transform. * Backend/Runtime1/class-root.properties, Backend/Runtime1/method-root.properties: Some updates to the root sets for classpath 0.08, having to do with gnu.java.security.provider.Gnu. 2004-05-26 C. Scott Ananian * Backend/Runtime1/init-safe.properties, Support/cpvm.jar: Update to classpath 0.08. * Backend/Runtime1/DataReflection1.java: Support Class.constructor cache field of classpath 0.08. * bin/run-java: CLASSPATH home should point to the *installed* home of classpath, not the uninstalled location of the sources (this makes it consistent with the Runtime configuration, which also points to the installed prefix). 2004-04-22 C. Scott Ananian * Backend/Runtime1/init-safe.properties: Update to classpath 0.08. 2004-04-21 C. Scott Ananian * GNUmakefile: Tag properties files for classpath 0.07. Classpath 0.08 has been released now. 2004-04-05 C. Scott Ananian * GNUmakefile: Update the canonical web host. * Backend/Runtime1/init-safe.properties: More fixes for classpath 0.07. * Backend/Runtime1/init-safe.properties: Updates to support classpath v0.07. 2004-03-19 C. Scott Ananian * Analysis/PointerAnalysis/ParIntGraph.java: PAField isn't checked in. 2004-03-06 salcianu * Util/LightBasicBlocks/LightBasicBlock.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/ODMAInfo.java, Analysis/PointerAnalysis/ODPointerAnalysis.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/Stats.java, Analysis/MemOpt/Util.java, Analysis/DataFlow/InstrSolver.java: Small changes throughout the code. SCComponent internals has been changed to not use TreeSet: it requires a well-defined Comparator, and coming up with one that works for any objects it's non trivial. The new implementation uses harpoon.Util.ArraySet for small strongly connected components and HashSets for the others. 2004-03-05 salcianu * Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/ODPointerAnalysis.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointerAnalysisCompStage.java, Analysis/PointerAnalysis/Stats.java: More cleaning * Util/LightBasicBlocks/CachingSCCLBBFactory.java, Util/LightBasicBlocks/SCCLBBFactory.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/ODMAInfo.java, Analysis/PointerAnalysis/ODPointerAnalysis.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/Stats.java, Analysis/MemOpt/Util.java: more code cleaning + GJ 2004-03-04 salcianu * Util/LightBasicBlocks/CachingSCCLBBFactory.java, Util/LightBasicBlocks/SCCLBBFactory.java, Util/BasicBlocks/CachingSCCBBFactory.java, Util/BasicBlocks/SCCBBFactory.java, Analysis/MemOpt/Util.java, Analysis/MetaMethods/MetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/ODMAInfo.java, Analysis/PointerAnalysis/ODPointerAnalysis.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/Stats.java, Analysis/PointerAnalysis/SyncElimination.java, Analysis/CallGraph.java: 1. Code cleaning in the harpoon.Util.Graphs package - the code of one class from that package was recently qualified as "crazy mess", so I had to do some cleaning. Unfortunately, I was unable to get the generic types working so I put the generic types only as comments. The GJ errors I got are very un-informative; e.g., "Type error; expected Vertex[]; found Vertex[] and so on. As the graph package is used in many places, I would be happy to have it GJized at some point. We now have a pretty decent digraph library: directed graphs, component graphs, topologically sorted component graphs, navigators, dfs etc. 2. Modified some files to cope with changes from harpoon.Util.Graphs 3. Deleted the unused harpoon.Analysis.PointerAnalysis.SyncElimination. 2004-02-09 C. Scott Ananian * bin/cvsblame.pl: Remove '-l' option to cvs command, since the latest versions of cvs no longer support it. 2004-02-08 C. Scott Ananian * GNUmakefile: Refer to the JDK 1.5.0 version of the standard doc API. * Util/Collections/package.html: Try to make the migration to JUtil clearer in the docs. * GNUmakefile: bin/jsr14-2.0 has been removed. * GNUmakefile, bin/find-gj, bin/jsr14-2.0, bin/run-java: Better support for locating a Java 1.5 compiler. The script bin/find-gj is now responsible, and checks jikes, javac, $JSR14DISTR/scripts/javac, etc. The bin/run-java script will also use bin/find-gj to invoke $JSR14DISTR/scripts/java if necessary. * IR/Assem/Instr.java, Tools/Annotation/Java12.cup, Analysis/Quads/DispatchTreeTransformation.java, Analysis/Quads/MemoryOptimization.java, Analysis/Quads/QuadClassHierarchy.java, Backend/Runtime1/DataClaz.java, ClassFile/Relinker.java, Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/ODMAInfo.java, Analysis/PointerAnalysis/SyncElimination.java: More automatic for-conversions; these classes had some cases which fooled the bin/replace-for.perl script and so had to be reviewed manually. * IR/Properties/UseDefer.java: Don't throw away parameterization. 2004-02-07 C. Scott Ananian * Analysis/Instr/AppelRegAlloc.java, Analysis/Instr/AppelRegAllocClasses.java, Analysis/Instr/AppelRegAllocStd.java, Analysis/Instr/LocalCffRegAlloc.java: Generic-ify some register allocator classes. Also do some for-conversion. * Analysis/Quads/AbstrCallGraph.java, Analysis/CallGraph.java: Generic-ify Alex's Graph classes. SCComponent was skipped, for the most part, because it's a crazy mess, and because some arrays would have to be turned into Lists for the parameterized types to work right. * Util/TypeInference/ArrayInfo.java, Util/TypeInference/TypeInference.java, Util/Options/Option.java, Util/Collections/AbstractGraph.java, Util/Graph.java, Instrumentation/AllocationStatistics/AllocationNumberingStub.java, Instrumentation/AllocationStatistics/AllocationStatistics.java, Instrumentation/AllocationStatistics/InstrumentAllocs.java, Instrumentation/AllocationStatistics/InstrumentAllocs2.java, Interpret/Tree/OffsetMap32.java, Main/CompStagePipeline.java, Main/SAMain.java, Main/Sizer.java, IR/Quads/Pattern.java, IR/Quads/Prune.java, IR/Quads/Quad.java, IR/Quads/QuadSSI.java, IR/Quads/ReHandler.java, IR/Quads/ResilientUnHandler.java, IR/Quads/SSIRename.java, IR/Quads/TESTER.java, IR/Quads/Translate.java, IR/Quads/UnHandler.java, IR/Tree/ToTree.java, ClassFile/HClassArraySyn.java, ClassFile/Loader.java, IR/Jasmin/Jasmin.java, Backend/RuntimeTiny/CompleteClazNumbering.java, Backend/RuntimeTiny/DataClazTable.java, Backend/RuntimeTiny/TinyClassFieldMap.java, Backend/StrongARM/AccelRFInfo.java, Backend/StrongARM/Code.java, Backend/Generic/GCInfo.java, Backend/Generic/MaxMunchCG.java, Backend/PreciseC/Frame.java, Backend/PreciseC/TreeToC.java, Backend/Runtime1/DataGC.java, Backend/Runtime1/DataInitializers.java, Backend/Runtime1/DataInterfaceList.java, Backend/Runtime1/DataReflection1.java, Backend/Runtime1/DataReflection2.java, Backend/Runtime1/DataReflectionMemberList.java, Backend/Runtime1/ObjectBuilder.java, Backend/Analysis/BasicGCInfo.java, Backend/Analysis/ClassFieldMap.java, Backend/Analysis/InitializerOrdering.java, Backend/Analysis/MakeGCThreadSafe.java, Backend/CSAHack/FlowGraph/AssemFlowGraph.java, Backend/CSAHack/RegAlloc/DerivationGenerator.java, Backend/CSAHack/RegAlloc/RegAlloc.java, Backend/CSAHack/RegAlloc/Spiller.java, Analysis/Tree/AlignmentAnalysis.java, Analysis/Tree/DominatingMemoryAccess.java, Analysis/Tree/TreeFolding.java, Analysis/TypeInference/IntraProc.java, Analysis/SizeOpt/BitWidthAnalysis.java, Analysis/SizeOpt/ConstructorClassifier.java, Analysis/SizeOpt/Field2Method.java, Analysis/SizeOpt/FieldReducer.java, Analysis/SizeOpt/MZFChooser.java, Analysis/SizeOpt/MZFCompressor.java, Analysis/SizeOpt/MZFExternalize.java, Analysis/SizeOpt/MZFWidenType.java, Analysis/SizeOpt/MostlyZeroFinder.java, Analysis/SizeOpt/ProfileParser.java, Analysis/SizeOpt/SizeCounters.java, Analysis/Transactions/CloneImplementer.java, Analysis/Transactions/GlobalFieldOracle.java, Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreeDataFilter.java, Analysis/Transactions/TreePostPass.java, Analysis/Quads/CachingCallGraph.java, Analysis/Quads/CallGraphImpl2.java, Analysis/Quads/CollectSyncStats.java, Analysis/Quads/DefiniteInitOracle.java, Analysis/Quads/FieldSyncOracle.java, Analysis/Quads/InitializerTransform.java, Analysis/Quads/NewMover.java, Analysis/Quads/QuadInterferenceGraph.java, Analysis/Quads/SSIToSSAMap.java, Analysis/Quads/SmallMethodInliner.java, Analysis/Realtime/CheesyPACheckRemoval.java, Analysis/Realtime/PACheckRemoval.java, Analysis/Realtime/ThreadToRealtimeThread.java, Analysis/RoleInference/RoleInference.java, Analysis/PointerAnalysis/AbstrPAEdgeSet.java, Analysis/PointerAnalysis/AllocSyncOptCompStage.java, Analysis/PointerAnalysis/ComputeInterProcMuClosure.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/EdgeOrdering.java, Analysis/PointerAnalysis/EdgesNCallees.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/LightPAEdgeSet.java, Analysis/PointerAnalysis/Matching.java, Analysis/PointerAnalysis/MethodHole.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/ODInformation.java, Analysis/PointerAnalysis/ODInterProcPA.java, Analysis/PointerAnalysis/ODParIntGraph.java, Analysis/PointerAnalysis/ODPointerAnalysis.java, Analysis/PointerAnalysis/PAEdge.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PARTJSupportCompStage.java, Analysis/PointerAnalysis/PASync.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointerAnalysisCompStage.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/Stats.java, Analysis/PreciseGC/AllocationHoisting.java, Analysis/PreciseGC/DynamicWBInserter.java, Analysis/PreciseGC/DynamicWBQuadPass.java, Analysis/PreciseGC/MRAFactory.java, Analysis/PreciseGC/RCTransformer.java, Analysis/PreciseGC/WriteBarrierStats.java, Analysis/Quads/ArrayUnroller.java, Analysis/MemOpt/AddMemoryPreallocation.java, Analysis/MemOpt/ComputeAnAe.java, Analysis/MemOpt/IAStatistics.java, Analysis/MemOpt/IncompatibilityAnalysis.java, Analysis/MemOpt/MultiMapUtils.java, Analysis/MemOpt/PreallocData.java, Analysis/MemOpt/PreallocOpt.java, Analysis/MemOpt/SSILiveness.java, Analysis/MemOpt/Util.java, Analysis/MetaMethods/FakeMetaCallGraph.java, Analysis/MetaMethods/MetaAllCallers.java, Analysis/MetaMethods/MetaCallGraphAbstr.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/MetaMethods/SmartCallGraph.java, Analysis/Loops/LoopFinder.java, Analysis/LowQuad/Loop/MyLowQuadNoSSA.java, Analysis/EventDriven/CloningVisitor.java, Analysis/EventDriven/ToAsync.java, Analysis/GraphColoring/OptimisticGraphColorer.java, Analysis/GraphColoring/SimpleGraphColorer.java, Analysis/Instr/AppelRegAllocClasses.java, Analysis/Instr/AppelRegAllocFsk.java, Analysis/Instr/BasePointerPreservingUseDefer.java, Analysis/Instr/Check.java, Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/RegAllocOpts.java, Analysis/Instr/RegFile.java, Analysis/Instr/SpillHeuristics.java, Analysis/Instr/Verify.java, Analysis/DataFlow/BackwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/ForwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/LiveVars.java, Analysis/DataFlow/ReachingDefs.java, Analysis/DataFlow/ReachingHCodeElements.java, Analysis/DynamicSyncRemoval/SyncRemover.java, Analysis/AbstractClassFixupRelinker.java, Analysis/AllCallers.java, Analysis/Companions/DataFlowSolver.java, Analysis/Companions/SingularFinder.java, Analysis/DomFrontier.java, Analysis/EdgesIterator.java, Analysis/Place.java, Analysis/Reachable.java, Analysis/ReachingDefsAltImpl.java, Analysis/ReachingDefsCachingImpl.java, Analysis/ReachingDefsImpl.java, Analysis/SESE.java, Analysis/SSxReachingDefsImpl.java, Analysis/UseDef.java, Analysis/UseDefChecker.java: Bulk convert all code to the new for-each statement syntax, using the bin/replace-for.perl script: bin/munge . | bin/replace-for.perl | bin/unmunge It's not perfect --- it doesn't detect when the Iterator.remove() method is used, for example --- but it does a pretty good job. * bin/replace-for.perl: Allow 'final' modifier; allow specifying full package name of Iterator and Arrays. Fix the non-parameterized case: you must include an explicit cast from Object; the sugar won't do it for you (too bad!). * Tools/Annotation/Java12.cup, Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/Spec.java, bin/annotate.perl, bin/replace-jutil.perl, bin/run-java, Temp/LabelList.java, Temp/Temp.java, Temp/TempFactory.java, Support/gjlib2.jar, Support/jutil.jar, Support/gjlib.jar, Main/CHStats.java, Main/CallGraph.java, Main/CodeGenerator.java, Main/CompStagePipeline.java, Main/CompilerStageEZ.java, Main/CompilerState.java, Main/EDMain.java, Main/EDXMain.java, Main/EventDriven.java, Main/JMain.java, Main/Lint.java, Main/SAMain.java, ClassFile/HClass.java, ClassFile/HClassArray.java, ClassFile/HClassImpl.java, ClassFile/HClassProxy.java, ClassFile/HCode.java, ClassFile/Linker.java, ClassFile/Loader.java, ClassFile/Relinker.java, Instrumentation/AllocationStatistics/InstrumentAllocs.java, Instrumentation/AllocationStatistics/InstrumentAllocs2.java, Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/OffsetMap32.java, Backend/Sparc/RegFileInfo.java, Backend/StrongARM/AccelRFInfo.java, Backend/StrongARM/Code.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/InstrBuilder.java, Backend/StrongARM/RegFileInfo.java, Backend/PreciseC/Frame.java, Backend/PreciseC/IdentifyNoHandler.java, Backend/PreciseC/TreeToC.java, Backend/Runtime1/DataInterfaceList.java, Backend/RuntimeTiny/Runtime.java, Backend/Sparc/CodeGen.spec, Backend/Generic/InstrBuilder.java, Backend/Generic/MaxMunchCG.java, Backend/Generic/RegFileInfo.java, Backend/MIPS/Code.java, Backend/MIPS/CodeGen.spec, Backend/MIPS/RegFileInfo.java, Backend/Maps/CHFinalMap.java, Backend/Analysis/ClassFieldMap.java, Backend/Analysis/InitializerOrdering.java, Backend/Analysis/InterfaceMethodMap.java, Backend/CSAHack/RegAlloc/DerivationGenerator.java, Backend/CSAHack/RegAlloc/RegAlloc.java, Util/Collections/AbstractGraph.java, Util/Collections/AbstractHeap.java, Util/Collections/AbstractMapEntry.java, Util/Collections/AggregateMapFactory.java, Util/Collections/AggregateSetFactory.java, Util/Collections/BinaryHeap.java, Util/Collections/BinaryTree.java, Util/Collections/BinomialHeap.java, Util/Collections/BitSetFactory.java, Util/Collections/CollectionFactory.java, Util/Collections/CollectionWrapper.java, Util/Collections/DisjointSet.java, Util/Collections/Environment.java, Util/Collections/Factories.java, Util/Collections/FibonacciHeap.java, Util/Collections/GenericInvertibleMap.java, Util/Collections/GenericInvertibleMultiMap.java, Util/Collections/GenericMultiMap.java, Util/Collections/Graph.java, Util/Collections/HashEnvironment.java, Util/Collections/Heap.java, Util/Collections/IntervalTree.java, Util/Collections/InvertibleMap.java, Util/Collections/InvertibleMultiMap.java, Util/Collections/LinearMap.java, Util/Collections/LinearSet.java, Util/Collections/ListFactory.java, Util/Collections/ListWrapper.java, Util/Collections/MapFactory.java, Util/Collections/MapSet.java, Util/Collections/MapWrapper.java, Util/Collections/MultiMap.java, Util/Collections/MultiMapFactory.java, Util/Collections/MultiMapSet.java, Util/Collections/PairMapEntry.java, Util/Collections/PersistentEnvironment.java, Util/Collections/PersistentMap.java, Util/Collections/PersistentMapFactory.java, Util/Collections/PersistentSet.java, Util/Collections/PersistentSetFactory.java, Util/Collections/PersistentTreeNode.java, Util/Collections/RedBlackTree.java, Util/Collections/ReverseIterator.java, Util/Collections/ReverseListIterator.java, Util/Collections/SetFactory.java, Util/Collections/SetWrapper.java, Util/Collections/SnapshotIterator.java, Util/Collections/TestMap.java, Util/Collections/TestSet.java, Util/Collections/UniqueStack.java, Util/Collections/UniqueVector.java, Util/Collections/UnmodifiableIterator.java, Util/Collections/UnmodifiableListIterator.java, Util/Collections/UnmodifiableMultiMap.java, Util/Collections/WorkSet.java, Util/BitString.java, Util/CloneableIterator.java, Util/CombineIterator.java, Util/Default.java, Util/EnumerationIterator.java, Util/FilterIterator.java, Util/HClassUtil.java, Util/Indexer.java, Util/IteratorEnumerator.java, Util/ListComparator.java, Util/MapComparator.java, Util/ReferenceUnique.java, Util/SortedMapComparator.java, Util/Tuple.java, Util/Util.java, IR/Tree/Code.java, IR/Tree/ExpList.java, IR/Tree/ToTree.java, IR/Tree/ToTreeHelpers.java, IR/Tree/Tree.java, IR/Tree/TreeFactory.java, IR/Tree/TreeGrapher.java, IR/Tree/TreeUseDefer.java, IR/Properties/CFGrapher.java, IR/Properties/UseDefer.java, IR/Quads/Code.java, IR/Quads/HANDLER.java, IR/Quads/HandlerSet.java, IR/Quads/Pattern.java, IR/Quads/Peephole.java, IR/Quads/Prune.java, IR/Quads/Quad.java, IR/Quads/RSSxToNoSSA.java, IR/Quads/ReHandler.java, IR/Quads/ReHandlerToSSA.java, IR/Quads/ResilientUnHandler.java, IR/Quads/SSIRename.java, IR/Quads/SSIToSSA.java, IR/Quads/TESTER.java, IR/Quads/ToNoSSA.java, IR/Quads/Translate.java, IR/Quads/UnHandler.java, IR/Bytecode/Liveness.java, IR/Jasmin/Jasmin.java, IR/LowQuad/DerivationMap.java, IR/Assem/Code.java, IR/Assem/Instr.java, IR/Assem/InstrGroup.java, IR/Assem/InstrLABEL.java, Analysis/TypeInference/InterProc.java, Analysis/Transactions/AnalysisCheckOracle.java, Analysis/Transactions/DominatingCheckOracle.java, Analysis/Transactions/GlobalFieldOracle.java, Analysis/Transactions/HoistingCheckOracle.java, Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreeDataFilter.java, Analysis/Transformation/MethodSplitter.java, Analysis/Tree/AlgebraicSimplification.java, Analysis/Tree/AlignmentAnalysis.java, Analysis/Tree/CacheEquivalence.java, Analysis/Tree/DominatingMemoryAccess.java, Analysis/Tree/JumpOptimization.java, Analysis/Tree/TreeFolding.java, Analysis/RoleInference/RoleInference.java, Analysis/SizeOpt/BitWidthAnalysis.java, Analysis/SizeOpt/ConstructorClassifier.java, Analysis/SizeOpt/Field2Method.java, Analysis/SizeOpt/FieldReducer.java, Analysis/SizeOpt/MZFChooser.java, Analysis/SizeOpt/MZFCompressor.java, Analysis/SizeOpt/MZFExternalize.java, Analysis/SizeOpt/MZFWidenType.java, Analysis/SizeOpt/MostlyZeroFinder.java, Analysis/SizeOpt/ProfileParser.java, Analysis/SizeOpt/SizeCounters.java, Analysis/Quads/SCC/SCCAnalysis.java, Analysis/Quads/SCC/SCCOptimize.java, Analysis/Realtime/CheckAdder.java, Analysis/Realtime/ClassReplacer.java, Analysis/Realtime/QuantaChecker.java, Analysis/Realtime/Realtime.java, Analysis/PreciseGC/MRAFactory.java, Analysis/PreciseGC/WriteBarrierQuadPass.java, Analysis/Quads/ArrayCopyInliner.java, Analysis/Quads/ArrayUnroller.java, Analysis/Quads/BasicCSE.java, Analysis/Quads/CallGraphImpl.java, Analysis/Quads/CallGraphImpl2.java, Analysis/Quads/CoalescingToNoSSA.java, Analysis/Quads/ComponentOfReducer.java, Analysis/Quads/DeadCode.java, Analysis/Quads/DefiniteInitOracle.java, Analysis/Quads/FieldSyncOracle.java, Analysis/Quads/InitializerTransform.java, Analysis/Quads/MayReadOracle.java, Analysis/Quads/MemoryOptimization.java, Analysis/Quads/MethodTraceFactory.java, Analysis/Quads/NewMover.java, Analysis/Quads/Nonvirtualize.java, Analysis/Quads/QuadClassHierarchy.java, Analysis/Quads/QuadInterferenceGraph.java, Analysis/Quads/QuadLiveness.java, Analysis/Quads/SSIToSSAMap.java, Analysis/Quads/SmallMethodInliner.java, Analysis/Quads/TypeSwitchRemover.java, Analysis/Quads/Unreachable.java, Analysis/Quads/Virtualize.java, Analysis/MemOpt/IncompatibilityAnalysis.java, Analysis/MemOpt/MultiMapUtils.java, Analysis/MemOpt/MyGraphColorer.java, Analysis/MemOpt/SSILiveness.java, Analysis/Partition/Profile.java-old, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/ODInterProcPA.java, Analysis/PointerAnalysis/ODMAInfo.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointerAnalysisCompStage.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/SyncElimination.java, Analysis/Loops/LoopFinder.java, Analysis/Loops/Loops.java, Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/BasicInductions.java, Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopInvariance.java, Analysis/LowQuad/Loop/LoopMap.java, Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/Maps/ExecMapProxy.java, Analysis/GraphColoring/AbstractGraph.java, Analysis/GraphColoring/Graph.java, Analysis/GraphColoring/GraphImpl.java, Analysis/GraphColoring/OptimisticGraphColorer.java, Analysis/GraphColoring/SimpleGraphColorer.java, Analysis/GraphColoring/SparseGraph.java, Analysis/GraphColoring/SparseNode.java, Analysis/Instr/AppelRegAlloc.java, Analysis/Instr/AppelRegAllocClasses.java, Analysis/Instr/AppelRegAllocFsk.java, Analysis/Instr/AppelRegAllocStd.java, Analysis/Instr/EqTempSets.java, Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/HTempMap.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/SpillHeuristics.java, Analysis/Instr/Verify.java, Analysis/Instr/WeightedSet.java, Analysis/DynamicSyncRemoval/SyncRemover.java, Analysis/EnvBuilder/EnvBuilder.java, Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/CloningVisitor.java, Analysis/EventDriven/EventDriven.java, Analysis/EventDriven/LockRemove.java, Analysis/EventDriven/ToAsync.java, Analysis/Counters/EpilogMutator.java, Analysis/Counters/RuntimeMethodCloner.java, Analysis/DataFlow/BackwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/CachingLiveTemps.java, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/DataFlow/ForwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/InstrSolver.java, Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/LiveVars.java, Analysis/DataFlow/ReachingDefs.java, Analysis/DataFlow/ReachingHCodeElements.java, Analysis/DataFlow/ReversePostOrderEnumerator.java, Analysis/DataFlow/Solver.java, Analysis/DataFlow/SpaceHeavyLiveTemps.java, Analysis/DataFlow/TreeSolver.java, Analysis/Companions/DataFlowSolver.java, Analysis/Companions/QuadFlowGraph.java, Analysis/Companions/SingularFinder.java, Analysis/Companions/StaticValue.java, Analysis/AbstractClassFixupRelinker.java, Analysis/BasicBlock.java, Analysis/ClassHierarchy.java, Analysis/CycleEq.java, Analysis/DomFrontier.java, Analysis/DomTree.java, Analysis/EdgesIterator.java, Analysis/FCFGBasicBlock.java, Analysis/GenericContextFactory.java, Analysis/Place.java, Analysis/PointsToAnalysis.java, Analysis/Reachable.java, Analysis/ReachingDefsAltImpl.java, Analysis/ReachingDefsCachingImpl.java, Analysis/ReachingDefsImpl.java, Analysis/SESE.java, Analysis/SSxReachingDefsImpl.java, Analysis/UseDef.java, GNUmakefile, gj-files, gj-files-2: Discard multi-stage compile: as of this commit, all code in FLEX builds with the 2.4a1 version of the JSR14 compiler, or, equivalently the 1.5.0b1 JDK. Removed gj-files, gj-files-2, Support/gjlib.jar, and Support/gjlib2.jar, as they are unnecessary now that all of our code can be compiled with a single compiler. Most code in harpoon.Util.Collections (and some in harpoon.Util) has been split out into a separate 'JUtil' package, available from: http://cscott.net/Projects/JUtil/ A binary .jar of JUtil is in Support/jutil.jar. Some javadoc and makefile rules have been changed to indicate this; there has also been a large-scale search-and-replace on 'import' statements to migrate to JUtil's package. [bin/annotate.perl might not work on the sinjdoc-generated JUtil documentation yet; this should be fixed.] Most of the necessary changes to upgrade to the latest JSR14 spec occurred in the JUtil package, as collections implementations were most heavily affected by the addition of variance to the type system. The 'Worklist' interface was not migrated to JUtil, and JUtil's 'WorkSet' does not implement it. We've added a bridge implementation of WorkSet (Util/Collections/WorkSet.java) which does implement Worklist to aid migration; in some places we've also changed 'Worklist' in interfaces to 'WorkSet' (see DataFlowBasicBlockVisitor.java, for example). [WorkSet is generally unnecessary now that the JDK includes java.util.LinkedHashSet, but is included for backward-compatibility.] The CombineIterator constructor is slightly different in JUtil as well, since arrays of parameterized types are no longer allowed; Main/EDMain.java and Main/EDXMain.java contain corresponding adjustments. Other changes required by the latest JSR14 compiler: The latest compiler does not allow creation of generic arrays ('new E[]' where E is a type variable); we've followed the strategy used by java.util.ArrayList of explicitly casting a 'new Object[]' to an 'E[]'. [Analysis/GenericContextFactory.java'] Mutually-recursive classes required a little bit of tweaking, as the scope rules changed such that inner classes are not in-scope at type-variable declaration time. [Analysis/PointsToAnalysis.java, Util/Collections/AbstractGraph.java, Util/Collections/Graph.java] Arrays of parameterized types are verboten; all instances of these were changed to Lists of the parameterized type. [Analysis/Quads/ArrayUnroller.java, Analysis/Quads/MemoryOptimization.java, Analysis/Quads/QuadLiveness.java] There is another slight JSR14-compiler bug [reported to Sun] with 'instanceof' comparisons of variables whose type is parameterized. An explicit type cast to the raw type is required to work around this. [Analysis/Maps/ExecMapProxy.java] Another minor bug [reported to Sun] exists with type-resolution in constructor invocations; a few places in FLEX require explicit casts on the constructor's arguments to work around this. [Analysis/BasicBlock.java, Analysis/DomTree.java, Analysis/Reachable.java, Analysis/ReachingDefsAltImpl.java, Analysis/ReachingDefsImpl.java, Analysis/SSxReachingDefsImpl.java, Analysis/RoleInference/RoleInference.java] Some classes were slightly generified to play nicely with other generified code. [Analysis/PointerAnalysis/PointerAnalysisCompStage, Backend/MIPS/CodeGen.spec, Backend/Sparc/CodeGen.spec, Backend/StrongARM/CodeGen.spec, IR/Quads/Code.java, IR/Quads/SSIRename.java, Temp/LabelList.java, Util/ListComparator.java, Util/MapComparator.java, Util/SortedMapComparator.java] We gave more-specific types to clone() methods. [ClassFile/HCode.java, Temp/Temp.java, Util/CloneableIterator.java] In one case, a work-around for an earlier versions of the JSR14 compiler was removed. [IR/Assem/InstrGroup.java] * bin/replace-for.perl: Extend the 'replace-for' script to handle for-Iterator loops masquerading as while loops as well (which is found in some old crufty bits of FLEX). * Support/gjlib2.jar, IR/Tree/ToTreeHelpers.java, IR/Tree/TreeGrapher.java, Support/gjlib.jar, IR/Bytecode/Instr.java, IR/Properties/CFGraphable.java, IR/Properties/CFGrapher.java, IR/Quads/Quad.java, Analysis/Tree/JumpOptimization.java, Backend/Analysis/BasicGCInfo.java, IR/Assem/Instr.java, IR/Assem/InstrGroup.java, IR/Assem/InstrLABEL.java, Analysis/DataFlow/ReachingDefs.java, Analysis/Loops/LoopFinder.java, Analysis/Transactions/HoistingCheckOracle.java, Analysis/BasicBlock.java, Analysis/EdgesIterator.java: Removed edge/pred/succ methods from CFGrapher/CFGraphable; these have been deprecated for a while, and are replaced with edgeC/predC/succC. The edge/pred/succ methods can't be ported to Java 1.5 because of their use of arrays of parameterized types. Also changed the signature for edgeC/predC/succC from Collection to List, because various bits of old code used the array returned by edge/pred/succ as a list (i.e. depended on the consistent order of the items in the array). This required some cascading changes to the code. Updated gjlib and gjlib2 after these changes. * Util/ArrayIterator.java: Extended ArrayIterator to make it implement ListIterator, not just Iterator. 2004-01-30 C. Scott Ananian * Util/Collections/package.html: Tweak Util.Collections package documentation a bit. * Analysis/BasicBlock.java: Remove unused deprecated methods. * Support/jutil.jar, GNUmakefile, bin/replace-jutil.perl: Add JUtil package to FLEX. * Analysis/MemOpt/IncompatibilityAnalysis.java, Analysis/MemOpt/MultiMapUtils.java, Analysis/MemOpt/SSILiveness.java, Analysis/AbstractClassFixupRelinker.java: Remove "import *" statements. 2004-01-13 C. Scott Ananian * bin/replace-for.perl: Extend the script to better handle wildcard types. 2004-01-12 C. Scott Ananian * Support/gjlib2.jar, Support/gjlib.jar: Update gjlib.jar/gjlib2.jar. * bin/jsr14-2.0: Un-hard-code /home/cananian. 2003-12-07 C. Scott Ananian * Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreePostPass.java, Main/Transactions.java: Hack and chop out the readflags and array bloat stuff. * Analysis/Transactions/AltArrayTransformer.java: New file. * Analysis/Transactions/AltArrayTransformer.java, gj-files: Start implementation of transformation code that will rewrite array accesses to chunk (etc) them. * Runtime/AltArray/ArrayImplJavaType.jt, Runtime/AltArray/ChunkArrayJavaType.jt, Runtime/AltArray/SimpleArrayJavaType.jt: Tweak AltArray implementation to support two other operations done on arrays: ALENGTH and COMPONENTOF. 2003-12-01 C. Scott Ananian * IR/Tree/ToTree.java: Fix multi-dim array initialization with array bloat. 2003-11-14 C. Scott Ananian * Backend/Runtime1/DataReflection1.java: Static class objects should have appropriate read flags. * Analysis/Transactions/BitFieldNumbering.java, Analysis/Transactions/SyncTransformer.java: Added explicit fields to each object to hold transaction list and reader list. Ignore these when doing the bitfieldnumbering. * Analysis/Transactions/TreeDataFilter.java: Reserve enough space for 64-bit archs. * Analysis/Transactions/BitFieldNumbering.java, Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreePostPass.java, Backend/Runtime1/DataStrings.java, Backend/Runtime1/ObjectBuilder.java, Backend/Runtime1/TreeBuilder.java, Main/Transactions.java, Analysis/SizeOpt/MostlyZeroFinder.java: Change array representation to allow for 1 bit-per-element read flags. All read flags are at the start of the array to make alignment simple; we can think about re-doing to representation to distribute the bits among the elements later. BitFieldNumbering no longer reserves space in object for the array flags. Also made read flags 64-bit safe (untested). BitFieldNumbering now allocates longs instead of ints on 64-bit platforms. Prototypes of C interface functions have changed; tweak TreePostPass to match. DataStrings needs to know about the read flags for java.lang.String, since they're not bundled into Object any more. ObjectBuilder needs to emit appropriate read flags when it emits arrays. TreeBuilder pads the array size appropriately to allow for flags. * Backend/PreciseC/TreeToC.java: Fix the following former bug in TreeToC: // XXX: another buglet here: the ToTree transformation can // create dead code by converting CJUMP(0, iffalse, iftrue) to // JUMP(iffalse) (similarly with non-zero constants). If this // happens, then eventually we'll try to translate the dead // code. If there is a CALL in the dead code, then we'll ask // the LiveVars about it, and the LiveVars will assert because // the CALL is not found in its basic block set. We should // probably attempt to skip translation of executable (ie non-data) // Trees which are not live. --CSA 13-mar-2003 We fix this by adding a call to Reachable, which identifies (un)reachable code in the Tree form. We then avoid translating unreachable trees. This is a little bit tricky because we don't want to skip SEQ, DATUM, LABEL, ALIGN, etc; or sub-expressions, like the dest and source trees of MOVE for example. I've got a conditional which I think does the trick; a slight side-effect is that gcc now complains about "labels at the end of compound statements". I don't think the warning is serious. * Analysis/Reachable.java: Overly-strict assertion: predecessors of PHI nodes will not be visited before the PHI node is visited. 2003-11-11 C. Scott Ananian * gj-files, Analysis/Reachable.java: Added a simple reachability analysis, used to work around a bug in PreciseC/TreeToC, to wit: // the ToTree transformation can // create dead code by converting CJUMP(0, iffalse, iftrue) to // JUMP(iffalse) (similarly with non-zero constants). If this // happens, then eventually we'll try to translate the dead // code. If there is a CALL in the dead code, then we'll ask // the LiveVars about it, and the LiveVars will assert because // the CALL is not found in its basic block set. We should // probably attempt to skip translation of executable (ie non-data) // Trees which are not live. --CSA 13-mar-2003 2003-11-05 C. Scott Ananian * Analysis/Transactions/SyncTransformer.java: Allow compiling a non-transactional (locking) binary with all the transactional transformations, to allow a more fair apples-to-apples comparison. * bin/build-spec: Prevent concurrent spec builds from overwriting each other's root set. 2003-11-04 salcianu * Main/SAMain.java: extra option info * Analysis/PointerAnalysis/PointerAnalysisCompStage.java: changed default call graph 2003-11-02 C. Scott Ananian * Analysis/Transactions/SyncTransformer.java: Fix problem with noNestedTransactions. 2003-10-30 C. Scott Ananian * Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreePostPass.java: Add ISCA functionality to SyncTransformer: allow use of hardware transaction mechanism; also add facility to log transactional/ non-transactional reads and writes for analysis of transaction size, etc. 2003-10-28 salcianu * Analysis/MemOpt/PreallocOpt.java: Old change * Analysis/PointerAnalysis/ComputeInterProcMuClosure.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/PAAllocSyncCompStage.java, Analysis/PointerAnalysis/PointerAnalysis.java: Long-overdue code cleanup: 1. remove useless file 2. manual dead-code elimination 2003-10-27 C. Scott Ananian * Backend/PreciseC/TreeToC.java: Match a fix to runtime: The ISO C99 standard actually defines uint32_t, uint64_t as int types, instead of the legacy u_int32_t, u_int64_t, etc. Replace all occurences of u_intXX_t with uintXX_t to avoid problems, especially on MIPS/IRIX/R6000, where u_int64_t appears not to be defined (but uint64_t is). 2003-10-26 salcianu * Analysis/PointerAnalysis/PointerAnalysis.java: Old changes for the TOPLAS paper * Analysis/PointerAnalysis/NodeRepository.java: Old changes * Analysis/PointerAnalysis/ComputeInterProcMuClosure.java, Analysis/PointerAnalysis/InterProcPA.java: Old changes * Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/PAEscapeFunc.java: Old changes wiating to be commited * Analysis/PointerAnalysis/PointerAnalysisCompStage.java: typo 2003-10-21 C. Scott Ananian * IR/Tree/ToTree.java, Backend/Runtime1/ObjectBuilder.java: Fixed (last?) two 64-bit bugs in FLEX backend: a) add proper padding after length when building arrays in ObjectBuilder b) add an alignment hint in ToTree (for TreeToC) about the last element of a constant initialization table. Otherwise the structure containing this element might be arbitrarily aligned (to 4- or 8-bytes). Also committed a helpful assertion info message in ToTree which has been sitting in my sources for a while. 2003-10-20 C. Scott Ananian * Backend/RuntimeTiny/DataClazTable.java, Backend/RuntimeTiny/ObjectBuilder.java, Backend/Runtime1/DataClaz.java, Backend/Runtime1/DataConfigChecker.java, Backend/Runtime1/DataGC.java, Backend/Runtime1/DataInitializers.java, Backend/Runtime1/DataJavaMain.java, Backend/Runtime1/DataReflection1.java, Backend/Runtime1/DataReflection2.java, Backend/Runtime1/DataReflectionMemberList.java, Backend/Runtime1/DataStaticFields.java, Backend/Runtime1/ObjectBuilder.java, Backend/Runtime1/StubCode.java: Fix pervasive 64-bit alignment problems: we should align all structures containing pointers to a pointer-size boundary. This means ALIGN(8) instead of ALIGN(4) on 64-bit platforms. * Support/gjlib.jar, Support/gjlib2.jar: Update gjlib.jar and gjlib2.jar to keep up with source code and gj-files changes. * gj-files: Add some Runtime stuff to gj-files, as they've acquired dependencies. * Backend/RuntimeTiny/Runtime.java, Backend/Runtime1/DataClaz.java, Backend/Runtime1/DataReflection2.java, Backend/Runtime1/DataReflectionMemberList.java, Backend/Runtime1/Runtime.java, Backend/Runtime1/TreeBuilder.java: Add appropriate padding to our data structures so that pointers are all appropriately aligned on 64-bit platforms. We rearrange the claz data structure slightly in the process (even for 32-bit platforms), so you must update your Runtime concurrently with this update to Code. We also update RuntimeTiny so that the extra information it adds to the claz structure is also 64-bit clean; these updates have not been tested. You're wasting a lot of space by using 64-bit pointers, anyway, so RuntimeTiny will probably be the least of your concerns. * Analysis/Tree/AlgebraicSimplification.java, IR/Tree/BINOP.java: Some 64-bit fixes: even when pointers are long, we allow INT offsets. This requires some silent coercions during algebraic simplification and BINOP evaluation. 2003-10-08 C. Scott Ananian * Backend/PreciseC/TreeToC.java: Add comments to some constants to make it easier to pick our strings in the C source. Work around a structure alignment issue on MIPS by emitting aligned(4) on all structures missing an explicit alignment tag. On most archs this will do nothing, as 4 is the default structure alignment. However, on MIPS this will prevent the structure from being 8-byte aligned. * GNUmakefile: Distribute Support/minilib.jar, Support/cpvm.jar, and Support/reflect-thunk.jar (all GPLed sources). 2003-10-06 C. Scott Ananian * Backend/PreciseC/TreeToC.java: Fix alignment problem on IRIX builds. 2003-10-03 C. Scott Ananian * Backend/Runtime1/minilib.transact-root.properties: Fix transactions root set for minilib. * Analysis/Transactions/ArrayCopyImplementer.java: Classpath/minilib move System.arraycopy to VMSystem.arraycopy. Handle it there as well, and don't die if System (or VMSystem) is not a valid class in your path. * Analysis/PointerAnalysis/InterProcPA.java: Handle cut-down class libraries more gracefully. * Support/minilib.jar: Updated minilib with integer i/o. * Support/minilib.jar: Update "minilib" standard library. * IR/Bytecode/OpConstant.java: Don't require that the standard library have all wrapper classes: the minilib library doesn't. * Backend/Runtime1/minilib.init-safe.properties, Backend/Runtime1/minilib.method-root.properties: Add Console methods to init-safe list. Re-add NoSuchMethodError and NoSuchFieldError to minilib. * Backend/Runtime1/minilib.class-root.properties, Backend/Runtime1/minilib.init-safe.properties, Backend/Runtime1/minilib.method-root.properties: Update minilib property files to reflect the much-reduced size of the minilib library compared to classpath. * Backend/Runtime1/init-safe.properties: In classpath 0.06, the getClass() method belongs to Object, not VMObject. Also, currentTimeMillis() belongs to VMSystem, not System. * Backend/Runtime1/Runtime.java: "minilib" support when -Dharpoon.runtime1.minilib is true (bin/run-java will take care of this for you). "with_classpath_needed" goes in the configuration set, as minilib uses the same native libraries as classpath. * Backend/Runtime1/minilib.class-root.properties, Backend/Runtime1/minilib.init-safe.properties, Backend/Runtime1/minilib.method-root.properties, Backend/Runtime1/minilib.transact-root.properties, Backend/Runtime1/minilib.transact-safe.properties: Copy runtime properties for minilib from those from classpath 0.06. * bin/run-java, Support/minilib.jar: Add preliminary "minilib" support, for compiling applications with a drastically cut down standard library. 2003-09-25 C. Scott Ananian * bin/build-precisec: Add extra support for saving alex's pre-analysis results with the option --alex-save to build-precisec. * Backend/Runtime1/init-safe.properties: File.lengthInternal() is in classpath 0.06, and needs to be init-safe. 2003-09-16 C. Scott Ananian * GNUmakefile: Different versions of property files for classpath 0.04/0.05/0.06 and CVS head. 2003-09-11 C. Scott Ananian * GNUmakefile: Add more useful scripts to the .tgz distribution (and srcdoc). 2003-09-05 C. Scott Ananian * Main/Javap.java: Some work on '-c' option (bytecode disassembly). * Main/Javap.java: Fix how constructors and static initializers are printed. * IR/RawClass/AttributeCode.java: More javadoc typo fixes. * Main/Javap.java: Implement the '-l' option; work on '-c' and '-verbose'. * IR/RawClass/Attribute.java, IR/RawClass/AttributeCode.java, IR/RawClass/AttributeConstantValue.java, IR/RawClass/AttributeExceptions.java, IR/RawClass/AttributeInnerClasses.java, IR/RawClass/AttributeLineNumberTable.java, IR/RawClass/AttributeLocalVariableTable.java, IR/RawClass/AttributeSignature.java, IR/RawClass/AttributeSourceFile.java, IR/RawClass/AttributeSynthetic.java, IR/RawClass/Constant.java, IR/RawClass/ConstantDouble.java, IR/RawClass/ConstantLong.java: Slightly refactor the RawClass classfile parser. This package might need to be substantially redone after Java 1.5 is released, which will have classfile format changes. 1) Don't use magic constants: define attribute name fields in the appropriate attribute class, and use the fields instead. 2) Assert that the attribute names are appropriate. 3) Make constant.entrySize() public, so that constant_pools arrays can be interpreted from outside this package. 4) Fix a minor javadoc typo in the Constant class. 2003-08-28 C. Scott Ananian * Main/Javap.java: Add skeleton code showing desired format/location of output generated by -l, -c, and -verbose. * Main/Javap.java: Implement '-public', '-protected', '-package', and '-private' command-line options. * Main/Javap.java: Parse more javap options; implement '-s' and '-help' options, multiple class names on command-line. 2003-08-27 C. Scott Ananian * Main/Javap.java: Add some doc on the Varargs attribute from the GJ forum. 2003-07-28 C. Scott Ananian * Tools/Annotation/Java12.cup: Factor out scope pushenv/popenv into an action on a null production. This avoids creating a separate action case for every pushenv/popenv call. * Tools/Annotation/Lex/Keyword.java, Tools/Annotation/Lex/Lexer.java, Tools/Annotation/Lex/Separator.java, Tools/Annotation/Java12.cup: Update Annotation tool grammar to Java 1.5 (prototype 2.2). This is the 28-Jul-2003 release of the CUP Java Grammar. * IR/Quads/Pattern.java, IR/Quads/ReHandler.java: Java 1.5 has made 'enum' a reserved keyword -- it can't be used as a variable name. Rename these variables in existing code _enum_ instead. * Analysis/Transactions/SyncTransformer.java: Add an option to flatten all nested transactions into a single top-level transaction. * Analysis/Partition/Main.java, Analysis/PointerAnalysis/InterThreadPA.java: Java 1.5 has made 'enum' a reserved keyword -- it can't be used as a variable name. Rename these variables in existing code _enum_ instead. 2003-07-24 wbeebee * Analysis/Realtime/realtime-method.properties: Added new doneInit to the RTJ rootset. 2003-07-23 C. Scott Ananian * Main/Javap.java: Support varargs methods (JSR-201/prototype 2.2 feature). * Main/Javap.java: Update to understand and emit GJ prototype 2.2 variance syntax. * GNUmakefile, gj-files, Support/gjlib.jar: Update makefile/gj-files to support JDK 1.4.2, which is slightly more picky about interoperating with GJ code than was JDK 1.4.1. We should work with both now. Also commit a workaround which always builds all of the GJ files, because the v1.3 GJ compiler tends to go nuts about Map.Entry otherwise. 2003-07-22 C. Scott Ananian * Analysis/Transactions/SyncTransformer.java: Keep allocation information up-to-date during the transformation. * Analysis/Transactions/CloneImplementer.java: Add allocation information to the generated clone() implementations. 2003-07-22 wbeebee * Support/locale-root-set-classpath: More stuff to compile and run ATR. 2003-07-21 C. Scott Ananian * Support/gjlib.jar: Update gjlib.jar after transactions branch merge. * GNUmakefile: 'make cvs-update-classpath-0.05' will ensure you are using the properties files appropriate for classpath 0.05. CVS HEAD tracks classpath HEAD, which is probably not what you want for stable development. * Backend/Runtime1/transact-root.properties, Main/CodeGenerator.java, Main/Transactions.java, Runtime/Transactions/CommitRecord.java, Analysis/Transactions/BitFieldNumbering.java, Analysis/Transactions/CloneImplementer.java, Analysis/Transactions/HoistingCheckOracle.java, Analysis/Transactions/MethodGenerator.java, Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreeDataFilter.java, Analysis/Transactions/TreePostPass.java, gj-files: Merge trans-11-jul-2003 branch with HEAD. The branch contained my reimplementation of the transactions transformation, which is now stable enough to replace the previous implementation. * Analysis/Transactions/SyncTransformer.java: Disable the currently-broken SmartCheckOracle and some questionable uses of the field oracle. * Analysis/Transactions/SyncTransformer.java, Backend/Runtime1/transact-root.properties, Main/Transactions.java: Allow specification of "transaction root methods" via a property file. These are method roots which may be invoked in the context of a transaction, necessitating the addition of "with transaction" versions of each of the given methods to the prior root set. * Backend/Runtime1/transact-root.properties: New file. * Analysis/Transactions/BitFieldNumbering.java: An extra assert for more-informative debugging. * Analysis/Transactions/CloneImplementer.java, gj-files: Bug fix: eagerly cache object fields to implement clone() method, so that later field additions aren't reflected in implementation of clone(). The problem here was that SyncTransformer was adding transaction-specific fields to the object, which CloneImplementer was then incorrectly trying to read and write (and then SyncTransformer was trying to transform those reads and writes, etc, etc). Eager generation of the clone method fixes the problem (as does eager caching of the information required for generation, which is the technique we actually use). 2003-07-16 C. Scott Ananian * Analysis/Transactions/SyncTransformer.java: New method prototype for setWriteFlags(). 2003-07-15 C. Scott Ananian * Analysis/Transactions/TreeDataFilter.java: New file. * Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreeDataFilter.java, Main/CodeGenerator.java, Main/Transactions.java, Runtime/Transactions/ImplHelper.java, gj-files: New redirection method which adds transaction information to the JNI environment, instead of calling specially-named versions of JNI methods. Also add information about bit field numbering to the runtime reflection information, so that the JNI support code can do the Right Thing at field read/writes with the environment's transaction. TreeDataFilter is a pretty big hack. But not *too* evil. * Runtime/Transactions/CommitRecord.java: Never give up on the top-level transaction. * Backend/Runtime1/init-safe.properties: Note the proper fix to the java.lang.Thread.start/initDone hack. * Main/Sizer.java: Update Sizer to work with realistic root set. * Analysis/Transactions/SyncTransformer.java: Bug fix: TypeMap doesn't give exact information for the component type of an array, since all sub-integer types are squashed into HClass.Int. So use the AGET's own idea of the type when TypeMap reports a primitive component type. * Analysis/Transactions/SyncTransformer.java: Oops: one-line bug fix. This was a cut-and-paste error. * Analysis/Transactions/MethodGenerator.java, Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreePostPass.java: Make Transactions.MethodGenerator.generatedMethodSet from a method into a field. Add stubs for the generated methods in SyncTransformer (perhaps move this into MethodGenerator?) so that (even though they are unreferenced and unused) they don't cause link errors in the output. * Analysis/Transactions/SyncTransformer.java: Doc updates. * Analysis/Transactions/TreePostPass.java: Bugfix to TreePostPass: use the correct native-C function names. * Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreePostPass.java: Factor out read and write field checks into native code. Refactor TreePostPass to remove duplicate code. 2003-07-14 C. Scott Ananian * Backend/Runtime1/TreeBuilder.java, Backend/Runtime2/TreeBuilder.java: Refactor harpoon.Backend.Runtime2.TreeBuilder._call_FNI_Monitor so that we don't duplicate code from Runtime1. Also add a mechanism to Runtime2 to allow skipping the runtime check-before-monitor, because the DynamicSyncRemoval stage already does this. (You still need the runtime2 check if you're not compiling with DynamicSyncRemoval, of course.) * Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreePostPass.java: Bulk update of FLEX transactions code to support modified Runtime function signatures. Also, more flexible Tree-rewriting system to transform the java calls into (inline-able) native calls. * Analysis/Transactions/BitFieldNumbering.java: GJ-ize BitFieldNumbering; also add a publically-readable set of all the new 'bitfield' fields that have been added, so that we can recognize them in the TreePostPass. 2003-07-11 C. Scott Ananian * Analysis/Transactions/HoistingCheckOracle.java, Analysis/Transactions/MethodGenerator.java, Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreePostPass.java: Enable TreePostPass optimization of C native methods implementing transactional/non-transactional reads: replace field references by proper offsets, etc. Extends MethodGenerator to keep a reverse map around; extends SyncTransformer to keep some additional information about methods and fields around and to pass it to TreePostPass. A comment about behavior with sigma functions added to HoistingCheckOracle. * gj-files: Compile TreePostPass with GJ compiler, like all the other files in Analysis/Transactions. * Analysis/DynamicSyncRemoval/TreeCallOpt.java, Main/DynamicSyncRemoval.java: In accordance with the last commit, rename the special DynamicSyncRemoval helper method from DYNSYNC_isNoSync to EXACT_isNoSync. This means an explicit entry in TreeToC is no longer required. Also, move the configuration checking code back where it used to be, since we *do* require the Runtime to be appropriately considered, even if all the calls to our "special" method end up inlined away in tree form. (This is because the compiler will still emit reflection references and JNI stubs for the no-longer-used method, since the inlining happens too late in the compilation for anyone to notice that it has suddenly gone unused. Hence we need to have the Runtime include symbols which match the generated references and stubs.) * Backend/PreciseC/TreeToC.java: Instead of letting entries to 'exactproto' proliferate, simply allow any method name which starts with 'EXACT_' (which no JNI or FLEX-generated method will do) to be an 'exactproto' method. This means that calls will be emitted in a form which allows C-compiler inlining and FLEX won't try to guess a reasonable prototype for the function (you are responsible for declaring it yourself, in some way via precisec.h). * Analysis/Transactions/SyncTransformer.java: Hoist read operations out into native code, using the MethodGenerator. * IR/Quads/SSIToSSA.java: Create reverse mappings in SSIToSSA so that it can be used to generate an HCodeAndMaps showing the correspondence between SSI and SSA form. * ClassFile/HCodeAndMaps.java: Make HCodeAndMaps non-final so that users can extend it to add additional correspondence information if they like. * Analysis/Transactions/MethodGenerator.java: A helper class for the transactions transformation which creates new native helper methods. * Analysis/Quads/TypeInfo.java, Analysis/UseDef.java, Support/gjlib.jar, gj-files: GJ-ized TypeInfo and UseDef; also removed some unused methods from UseDef. 2003-07-10 C. Scott Ananian * IR/Quads/UnHandler.java: Work around broken java compilers (I think it's jikes at fault here) which don't guarantee that every MONITORENTER is matched by a MONITOREXIT. Technically, the MONITOREXIT could fail with an exception (in FLEX, a null pointer exception, but in other places also any one of a number of runtime exceptions) at which point the MONITOREXIT should *continue to be retried* until it succeeds. Jikes allows execution to leave the method without releasing the held lock. We work around this by assuming, for Flex's sake, that MONITOREXIT will never fail -- not even by a NullPointerException. This is not true for arbitrary bytecode but *ought* to be true for bytecode generated by legal Java programs; any NullPointerException should be thrown before the MONITORENTER on the lock, and the compiler should guarantee that the MONITORENTER and MONITOREXIT are using the same value. This means that in *our* IR, at least, MONITORENTER and MONITOREXIT are always properly matched, even if they aren't in the buggy input bytecode. Sigh. You can use -Dharpoon.all.monitorexits.are.safe=true if, for some reason, you want to disable this workaround and are confident that your input bytecode is valid. * Backend/Runtime1/transact-safe.properties: The DynamicSyncImpl.isNoSync() check function is transactions-safe. * Support/gjlib.jar: Updating gjlib.jar. * Analysis/DynamicSyncRemoval/SyncRemover.java: Properly propagate AllocationInformation when we clone parts of a method. * Main/DynamicSyncRemoval.java, Analysis/DynamicSyncRemoval/TreeCallOpt.java: Don't require special runtime configuration unless we actually require the special native functions. 2003-07-09 C. Scott Ananian * Backend/Runtime2/TreeBuilder.java, Analysis/DynamicSyncRemoval/TreeCallOpt.java: Factor out 'fetchHash' from Runtime2.TreeBuilder, which allows us to use it in DynamicSyncRemoval.TreeCallOpt to make a more efficient synchronization test (no method call required). * Analysis/DynamicSyncRemoval/SyncRemover.java, Analysis/DynamicSyncRemoval/TreeCallOpt.java, Backend/PreciseC/TreeToC.java, Runtime/DynamicSyncImpl.java: Reverse the sense of the dynamic synchronization removal check. A tiny bit more efficient this way; also consistent with the AllocationProperties name and the runtime2 implementation. * Analysis/DynamicSyncRemoval/SyncRemover.java, Analysis/DynamicSyncRemoval/TreeCallOpt.java, Backend/PreciseC/TreeToC.java, Runtime/DynamicSyncImpl.java: Complete the dynamic synchronization removal code: a) Move the function prototype used to harpoon.Runtime.DynamicSyncImpl It shouldn't be in the transactions package. b) Fix the PHI placement in the SyncRemoval transformation. c) Add DYNSYNC_isSync to TreeToC's list of exactproto functions, so that it can be inlined. * IR/Quads/Translate.java: A real bug fix: protect the MONITOREXIT with a handler, in case some exception is thrown while executing it. This ensures that every exit from the method will *always* go through the MONITOREXIT, even if there's a null-pointer exception or some such while evaluating the MONITOREXIT. (In this case, you're likely to infinite loop by retrying the MONITOREXIT, but this is better than leaving the method with locks still held.) * IR/Quads/Print.java: Minor bug fix to IR/Quads/Print.java: I don't think this bug could ever actually be seen, because the HEADER quad would *always* be followed by its default successor. But still... * bin/replace-for.perl: Commit a script that's been lying around my tree to autoconvert code to use the new foreach syntax. Unfortunately, Sun hasn't yet released a compiler that can properly compile this syntax, so we're not auto-converting anything yet. Maybe next month. (I wrote this back at FCRC in June.) * Main/Graph.java, Main/JMain.java, Main/Main.java, Main/Options.java, Main/Run.java: Add the dynamic synchronization removal pass to Main/Options, so that it can be invoked by harpoon.Main.Main. This required passing a linker around, so a number of the utility classes in harpoon.Main had to be touched. * Analysis/DynamicSyncRemoval/SyncRemover.java, Analysis/DynamicSyncRemoval/TreeCallOpt.java, Analysis/DynamicSyncRemoval/package.html, Main/DynamicSyncRemoval.java, Main/SAMain.java, gj-files: New dynamic synchronization removal pass. This duplicates code between MONITORENTER and MONITOREXIT and adds a check at the top to determine whether it is going to take the synchronized path or the unsynchronized pass. This transformation helps the Transactions code take advantage of sync removal better than the only-style implementation (which buries the check in the implementation of fni_monitorEnter) does. * Analysis/SizeOpt/MostlyZeroFinder.java: Fix comments which had gotten out-of-sync with the implementation. * Util/Options/Option.java, Main/CompStagePipeline.java, Main/CompilerStage.java, Main/CompilerStageEZ.java, Main/CompilerState.java, Main/SAMain.java, Support/gjlib.jar, Support/gjlib2.jar, gj-files: GJization. 2003-07-08 C. Scott Ananian * Main/SAMain.java: Fixed a bug in Alex's factory-ification of allocation strategies: sometimes we need to use a slightly different version of a strategy depending on which backend is chosen. In this case, the C calling semantics don't allow an *external* stack allocation function (because the memory would be allocated on the stack of the allocation function itself and then destroyed when the allocation function returned) so we have to inline a call to alloca when using the precise-c backend. Our native code backends don't have this problem, because we do magic, so we stack allocate with the (external) NSTK_alloc() function. * Support/precisec-no-sect-makefile.template: Work around AIX problems with large numbers of files on the command-line by building and linking object files in chunks of 100 files. This, regrettably, makes the Makefile more complicated. But AIX will do that to ya. * GNUmakefile: Move from .lcs. to .csail. domains. 2003-07-07 C. Scott Ananian * bin/build-precisec: Because I'm lazy: make --alex Do The Right Thing for compiling with Alex's analysis and stack allocation. Not as tweakable as Alex's own build scripts, but what could be simpler than bin/build-precisec --alex Hello HIC ? And it even works! 2003-07-04 C. Scott Ananian * Support/precisec-no-sect-makefile.template: Shorten the filenames of the SECTION_*.o objects (to just *.o) to work around losing OSes which impose limits on the maximum command-line length. Compiling _200_check in the SPECjvm98 benchmarks otherwise overflows the 24k byte command-line limit on AIX. * bin/build-spec, bin/run-java: It's been long enough: classpath is now the default FLEX class library. Alex (and others?), use export USE_SUN_JDK=1 in your environment if you want to keep using the Sun libraries. * IR/Tree/ToTree.java: Last AIX fixes: inline tables (switch jump tables, array initialization tables) need padding afterwards on AIX, because the compiler is not smart enough to correctly align the code afterwards. In particular, function pointers seem to be implemented via an indirection in AIX, and the function pointer indirection is misaligned after an inline table. With these changes, "Hello, world" (finally!) works on PowerPC AIX. 2003-07-03 C. Scott Ananian * Support/precisec-makefile.template, Support/precisec-no-sect-makefile.template: Improve the precisec makefile templates: 1) automatically determine whether -fno-zero-initialized-in-bss is required, and include it in CFLAGS if it is. 2) both styles of precisec build now link all the object files together into one Java.o file, and then wrap this in Java.a for backwards and mutual compatibility. The .o file is tagged INTERMEDIATE, which ought to encourage 'make' to clean it up. * Backend/PreciseC/TreeToC.java: More tweaks to allow the NO_SECTION_SUPPORT build: coalesce back-to-back labels (since gcc frowns on zero-length structures; we also assert that we're not generating these anymore), fix CODETABLEs (should always be static), and add a note about -fno-zero-initialized-in-bss. * Backend/Runtime1/DataReflection1.java, Backend/Runtime1/DataReflection2.java, Backend/Runtime1/DataReflectionMemberList.java: Always place a DATUM following a label, to prevent empty structures from showing up in the PreciseC backend. Not only will empty structures be moved to .bss (although -fno-zero-initialized-in-bss will prevent that), gcc has odd ideas about their alignment and size. * Main/SAMain.java, bin/build-precisec: It's been long enough: let's admit that harpoon.alloc.strategy=bdw really is and ought to be the default. Keep the default value in place for flexc_options in bin/build-precisec, just to show people where java property options ought to go. * Backend/PreciseC/TreeToC.java, GNUmakefile, Main/CodeGenerator.java, Support/precisec-no-sect-makefile.template: Support architectures/operating systems which don't allow multiple sections in object files. AIX is one of these losers; old "a.out" ports of Linux used to be another. 2003-06-24 C. Scott Ananian * Support/gjlib2.jar: New gjlib2.jar with Alex's recently-committed serialization changes. 2003-06-24 salcianu * Util/Collections/PersistentMap.java: make PersistentMap serializable 2003-06-20 C. Scott Ananian * Backend/Runtime1/transact-safe.properties: Methods which are transaction-safe for classpath 0.05. * Analysis/Transactions/CloneImplementer.java: Tweak the CloneImplementer so that it works with GNU classpath as well as the Sun JDK. (Classpath has an additional VMObject.clone() method we need to deal with.) * Analysis/Quads/NewMover.java: Fix a bug in NewMover which could cause it to move NEWs too far, trampling on redefinitions of the variables involved in the NEW. Seen in the .class$ methods generated by the jikes compiler for class literal references (Foo.class). 2003-06-19 C. Scott Ananian * IR/Tree/ToTree.java: New versions of gcc decide to super-optimize our PreciseC output, moving all-zero structures to the .bss segment from the .data segment. We depend on the sequential ordering of some of these structures (the ones implementing multi-part tables of various kinds, especially array initialization tables) and gcc causes us to break. In particular, the SPEC 222_mpegaudio benchmark breaks in spec.benchmarks._222_mpegaudio.nb.(). Now we trim zero elements from the start and end of array initializers (since the array is given to us zero'ed out anyway), ensuring that gcc doesn't move those bits around on us. * Backend/Runtime1/init-safe.properties, Backend/Runtime1/method-root.properties: Small tweaks to properties files for classpath 0.05. Committing on the classpath_0_05 branch; the main branch continues to follow classpath CVS. * Backend/Runtime1/transact-safe.properties: transact-safe properties for classpath. This version is empty; we'll create appropriate transact-safe properties for classpath 0.05 on the classpath_0_05 branch, and then merge then into head when/if the properties are updated for classpath CVS. * Support/gjlib.jar: Update gjlib.jar, since I added files to gj-files. * IR/Assem/InstrJUMP.java, gj-files: Add some additional files to gj-files to work around a bug in the Java 1.4.2-beta compiler --- for once, not a GJ compiler bug! I don't recommend using 1.4.2-beta at this time; keep using 1.4.1_03 instead. 2003-06-17 C. Scott Ananian * Support/gjlib.jar, Support/gjlib2.jar, gj-files: Updated the bootstrapping lists and jars. * Analysis/Context.java, Analysis/GenericContextFactory.java, Analysis/PointsToAnalysis.java: Finally check in the GJ-ized Context-related classes. * Analysis/Transactions/SyncTransformer.java: GJ-ize SyncTransformer. 2003-06-16 C. Scott Ananian * Util/Collections/BinaryHeap.java: Remove unnecessary 'import' statements, which confuse the 1.3 prototype GJ compiler. 2003-06-14 C. Scott Ananian * Util/Collections/TestSet.java: Added test for PersistentSet to TestSet class. * Util/Collections/PersistentSetFactory.java: Add a fast (ln N * ln M) implementation of containsAll for PersistentSets. * Util/Collections/PersistentTreeNode.java: Bug fix in persistent tree iterator: hasNext was returning an inverted result. 2003-06-10 C. Scott Ananian * Support/gjlib2.jar, Util/Collections/PersistentSetFactory.java, gj-files-2: Added 'PersistentSetFactory' analog to 'PersistentMapFactory'. Both are based on the persistent randomized treaps implemented in the PersistentTreeNode class. * Support/gjlib.jar, Support/gjlib2.jar: Update gjlibs. [forgot to 'cvs update' before my last check-in, so perhaps the earlier commit missed some of Alex's recent changes.] * Analysis/Instr/RegAlloc.java: Add a missing typecast. * GNUmakefile, Support/gjlib2.jar, bin/find-gj, bin/jsr14-2.0, gj-files, gj-files-2: Extend FLEX make process to support the v2 JSR-14 prototype compiler, which has fewer and different bugs than the v1.x prototype. We now require three compilers to build FLEX from scratch, which is decidedly non-ideal -- but the goal is to move back to two compilers by getting rid of either the v1.x or the non-JSR-14 compiler. * Util/Collections/PersistentMap.java, Util/Collections/PersistentMapFactory.java, Util/Collections/PersistentSet.java, Util/Collections/PersistentTreeNode.java: Bug fixes for PersistentTreeNode: allow null keys (assuming the comparator's okay with this). PersistentTreeNode: add 'putAll' method for quick merging of treaps. Reworked PersistentMap/PersistentSet to work with updated PersistentTreeNode interface. Added 'PersistentMapFactory' class which uses PersistentTrees to implement a map which maximally reuses space using hash-consing, and also allows constant-time set equality testing. * IR/Assem/InstrCALL.java, IR/Assem/InstrMEM.java: Fix impedance mismatch between non-GJ-ized InstrCALL and InstrMEM and their GJ-ized superclass. 2003-06-08 C. Scott Ananian * Util/Collections/PersistentTreeNode.java: Final stage of the PersistentTreeNode restructuring: parameterize the allocation function --- which also requires adding an extra recursive parameter to the PersistentTreeNode class. Provide a sample implementation, 'WithValue', with illustrates how to extend the base class with a 'value' field, as well as to cache map hash codes. * Util/Collections/PersistentTreeNode.java: Stage 3 of check-in: make the 'value' field in the base class optional; virtualize all existing uses of it. * Util/Collections/PersistentTreeNode.java: Stage 2 of the commit: define an appropriate iterator method over treaps of PersistentTreeNode. Because the trees are persistent, we don't have to worry about concurrent updates. * Util/Collections/PersistentTreeNode.java: Stage 1 of the PersistentTreeNode update: a) javadoc for the full functionality (not all implemented in stage 1 check-in) b) add heapKey double-hashing code, and tweak code so that all trees are treaps. This keeps them balanced. c) Some primitive debug and self-test methods. 2003-06-05 salcianu * Analysis/PointerAnalysis/ArtificialTempFactory.java: deleted unused class * Support/gjlib.jar: newer gjlib.jar * Analysis/PointerAnalysis/AllocSyncOptCompStage.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/MetaMethods/FakeMetaCallGraph.java: small changes 2003-06-04 salcianu * Support/gjlib.jar: new gjlib.jar * Instrumentation/AllocationStatistics/AllocationInstrCompStage.java, Instrumentation/AllocationStatistics/AllocationNumbering.java: small changes * Analysis/Realtime/CheesyPACheckRemoval.java, Analysis/Realtime/PACheckRemoval.java: Small changes to comply with the changes in the PointerAnalysis constructor. * Analysis/PointerAnalysis/AbstrPAEdgeSet.java, Analysis/PointerAnalysis/AllocSyncOptCompStage.java, Analysis/PointerAnalysis/ComputeInterProcMuClosure.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/LightPAEdgeSet.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/ODPointerAnalysis.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/ParIntGraphPair.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointerAnalysisCompStage.java, Analysis/PointerAnalysis/PointsToGraph.java: Many, many changes from the past weeks of debugging. In addition to debugging, I also did some optimizations. Most importantly, when computing the summary of a method, all nodes that escape globally (i.e., are reachable from a static field and/or a native method) are compressed into the special LOST node. Other important change: edges that are inconsistent with the type declarations are not allowed. This improved the precision A LOT! (e.g., it allowed us to remove 96% syncs for JLex!) The code is still ridden with debug stuff. It will get better after I manage to process javac (the only SpecJVM that still eludes me ...) * Analysis/MetaMethods/FakeMetaCallGraph.java: unimportant changes * Analysis/MetaMethods/MetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphAbstr.java: Made sure MetaCallGraphs are DiGraphs too. This way, getting all the callable methods comes from free (DiGraph has methods for reachability). * Analysis/Quads/AbstrCallGraph.java: Added some default (but still safe) implementation for getRunMethods(). * Analysis/CallGraph.java: Made sure that CallGraph appropriately subclasses harpoon.Util.Graphs.DiGraph * Backend/Runtime2/TreeBuilder.java: added curly braces for clarity * IR/Tree/SEQ.java: changed comment 2003-05-31 wbeebee * Main/Options.java: Added none to pass through bytecode through harpoon.Main.Main because javac produced bad bytecode and I want a working Javap. 2003-05-30 C. Scott Ananian * Main/Javap.java: Fix bug parsing array signatures with variance. Confirmed with Neal Gafter that this is the proper parsing, even though the prototype JSR-14 compiler is buggy in this regard. * Main/Javap.java: Correct for bug in JSR-14 spec for signatures of nested parameterized types. * Main/Javap.java: Extends JavaP to handle new variance specifications in JSR-14. 2003-05-29 C. Scott Ananian * Util/Collections/PersistentTreeNode.java: Noticed bug in PersistentTreeNode.isSame(). This method was unused, though, so the bug wasn't hurting anyone. 2003-05-22 wbeebee * Backend/Runtime1/init-safe.properties: Fix to eliminate dependency on ipaq servo controller when compiling normal Classpath programs with FLEX... 2003-05-21 wbeebee * Backend/Runtime1/init-safe.properties: Updated to match classpath, added ipaq.IPaqServoController.setup() to compile embedded servo controller. 2003-05-15 C. Scott Ananian * Analysis/Companions/SingularFinder.java: Trim the amount of information stored per-method. * Util/Collections/PersistentTreeNode.java: Efficiency hack: == implies isSame(). * Analysis/Companions/SingularFinder.java: Complete implementation of SingularFinder. Some restructuring/efficiency work still to be done. * Analysis/Companions/QuadFlowGraph.java: Add useC() and defC() methods to the QNodes in QuadFlowGraph in order to separate the uses/defs associated with the phis/sigmas with the other uses and defs in the node. * Util/Collections/BinomialHeap.java, Util/Collections/PersistentTreeNode.java: Revert workaround for old (pre-1.3 prototype) GJ compiler brokenness. Thankfully, the GJ compiler hasn't been broken this way anymore for a while. 2003-05-12 salcianu * Analysis/MemOpt/ComputeAnAe.java: allowing Flex to compile again. 2003-05-12 C. Scott Ananian * Analysis/Companions/SingularOracle.java: Pairwise singularity is no longer important, as it's not the building block for mutual singularity any more. In the new formulation, mutual singularity is the building block, and even single-point singularity is expressed in terms of the mutual singularity of a singleton set. * Analysis/Companions/QuadFlowGraph.java, gj-files: Add QuadFlowGraph class, which is a variant of the usual flow graph exported by the IR.Quads Code, Quad, and Edge classes in that additional nodes are added before PHIs and after SIGMAs in order to make the expression of dataflow equations more straightforward. * Analysis/Companions/DataFlowSolver.java: Generalize DataFlowSolver to work over arbitrary Graphs, not just Graphs made up of HCodeElements and HCodeEdges. 2003-05-10 salcianu * bin/run-java: Small change to allow us to pass an explicit stack size for the JVM: just define and export FLEXSTACK. Similar to FLEXMEM (this one is for heap space). * Util/LightBasicBlocks/LightBasicBlock.java: All functionality from Reachability.java was moved into DiGraph.java. 2003-05-09 C. Scott Ananian * Analysis/Companions/SingularFinder.java: Quick fix to make FLEX compile: didn't catch this because my local copy of SingularFinder is much modified. * Support/gjlib.jar: Update gjlib.jar after gj-izing and tweaking class hierarchy. * IR/Bytecode/Code.java, gj-files: GJ-ize Bytecode.Code, which allows it to be a Graph. * IR/Assem/Code.java, IR/Quads/Code.java: Assem.Code and Quad.Code are Graphs. * Util/Collections/Graph.java: Distinguish "operations on Graphs" from "things that are Graphs". Things that are graphs need not implement every graph-theoretic algorithm which could be applied to graphs. * Util/Collections/package.html: Update harpoon.Util.Collections package documentation. * IR/Assem/Instr.java, IR/Bytecode/Instr.java, IR/Properties/CFGEdge.java, IR/Properties/CFGraphable.java, IR/Quads/Quad.java: CFGraphable now extends Graph.Node, and CFGEdge extends Graph.Edge. * gj-files: Update to gj-file to go with the previous commit's package renaming; a separate commit so that it doesn't get the RENAME tag of the previous commit. * Util/Collections/AbstractGraph.java, Util/Collections/Graph.java, Util/Collections/MutableGraph.java, Analysis/Companions/AbstractGraph.java, Analysis/Companions/Graph.java, Analysis/Companions/MutableGraph.java: Moved graph abstraction to harpoon.Util.Collections package, which is more appropriate. [This is a different (node-based, not navigator-oriented) abstraction than Alex's in harpoon.Util.Graphs. Use which you like.] @RENAME: Analysis/Companions Util/Collections@ * Analysis/Companions/MutableGraph.java: Javadoc update. * gj-files, Analysis/Companions/AbstractGraph.java, Analysis/Companions/Graph.java, Analysis/Companions/MutableGraph.java: Split Graph into MutableGraph and Graph, and get rid of the 'value' field in Nodes -- if it is necessary, the user's subclass of node will include it. Rename Graph.Node.pred/succ to precC and succC for compatibility with CFGraphable. Now CFGraphable can extend Node.Graph and CFGEdge can extend Node.Edge to allow CFGs to be treated as Graphs w/o restricting Graphs to control-flow graphs. Appropriate changes to AbstractGraph, which now extends MutableGraph. * IR/Properties/CFGEdge.java, IR/Quads/Edge.java, Support/gjlib.jar, Analysis/MemOpt/IncompatibilityAnalysis.java, Analysis/MemOpt/SSILiveness.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/ODMAInfo.java, IR/Assem/InstrEdge.java, IR/Bytecode/Instr.java, Analysis/DataFlow/SpaceHeavyLiveTemps.java: Remove redundant toCFG() and fromCFG() methods, since to() and from() are allowed to have the properly-narrowed covariant return type. Change users to use just plain to() and from(). [to() used to return a HCodeElement, while toCFG() returned a CFGraphable. Now they both return the appropriate subclass of HCodeElement&CFGraphable; i.e. IR.Quads.Edge.to() returns a Quad.] 2003-05-08 C. Scott Ananian * Analysis/Companions/DataFlowSolver.java: Silly scott -- compile before you commit. Added a forgotten import statement. * Analysis/Companions/DataFlowSolver.java, gj-files: A *simple* parameterized dataflow solver. * IR/Bytecode/Instr.java, Support/gjlib.jar, gj-files: GJ-ize harpoon.IR.Bytecode.Instr so that it can implement the a properly-parameterized CFGraphable interface. Add it to gj-files, along with some subclasses, and rebuild gjlib.jar. * IR/Assem/Instr.java, IR/Assem/InstrEdge.java, IR/Quads/Edge.java, IR/Quads/Quad.java, IR/Properties/CFGEdge.java, IR/Properties/CFGraphable.java: Change the parameterization of CFGraphable/CFGEdge to use mutually recursive type variable bounds, to make the relation between CFGEdge and CFGraphable clear. (That is, if an implementation G of CFGraphable returns edge class E, then the to()/from() methods of E will return specific instances of of G, not generic instances of CFGraphable.) Tweak Quad, Edge, Instr, and InstrEdge classes to provide the new correct parameterization. 2003-05-08 wbeebee * Backend/Runtime1/method-root.properties: To compile ATR under GNU Classpath 2003-05-07 C. Scott Ananian * Analysis/Companions/AbstractGraph.java, Analysis/Companions/Graph.java: Added javadoc. * Analysis/Companions/AbstractGraph.java: Add javadoc. * Util/Collections/AggregateMapFactory.java: Add a null-check to entrySet.add() to allow AggregateMaps to pass the tests in TestMap. Also tweak some of the access modifiers. * Support/gjlib.jar, gj-files: Update gj-files with newly added sources and rebuild gjlib.jar. * Util/Collections/TestMap.java: Fix TestMap class to avoid ClassCastException thrown by JSR-14-compiled implementations of Map.entrySet(). Not sure if this is a bug in the tester or in the JSR-14 implementation. * Util/Collections/LinearSet.java: Added constructor taking a collection which is required to allow LinearSet to be tested by the TestSet class. * Util/Collections/LinearMap.java: More implementation of constructor taking a Map. Fix implementation of entrySet() to pass tests in TestMap and disallow the inadvertent creation of MultiMaps (multiple value entries for one key). * Util/Collections/BitSetFactory.java: Fix BitStringSet implementation of hashCode() and equals() to conform with specification for Set implementations. This allows this class to pass the Set tests in the TestSet class. * Analysis/Companions/SingularFinder.java: Implementation of the SingularFinder interface. Destined to be quickly rewritten. * Analysis/Companions/SingularOracle.java: Interface description for the singular value analysis. * Analysis/Companions/StaticValue.java: A static value is a pair of a variable and a use point. * GNUmakefile: The 'gjdoc' tool has changed names: it is now 'sinjdoc' (for "sinjdoc is not javadoc", of course --- it's better!). * Analysis/Companions/package.html: Described the (current and future) contents of this package. 2003-05-06 salcianu * gj-files: Moved some files in gj-files in the section # not GJ-ized, but we need to co-compile these to satisfy dependencies. 2003-05-06 C. Scott Ananian * Util/Collections/AggregateSetFactory.java: Improve efficiency still further by removing the Map.Entry objects from the representation of AggregateSet. We also create a new 'Header' superclass which removes unused fields from the Header object; this is a bit of over-optimization, likely, but it does serve to elucidate the code. Fixed a bug in the EntryList.add() method where we weren't checking that the next field was non-null. * Util/Collections/WorkSet.java: Add a comment about the preconditions necessary to make this method work (prevents erroneous reuse of the code where these conditions don't hold). * gj-files: Re-alphabetized gj-files. * Support/gjlib.jar: Forgot to add a new gjlib.jar with the files I recently added to gj-files. This .jar should contain Alex's updates as well. 2003-05-06 salcianu * Support/gjlib.jar: new gjlib.jar to help you compile the latest version of Flex 2003-05-06 C. Scott Ananian * Analysis/Companions/AbstractGraph.java, Analysis/Companions/Graph.java, gj-files: Add (yet another) graph abstraction to FLEX. This one is specifically designed for efficiency, flexibility, extensibility, and type-safety. 2003-05-06 salcianu * gj-files: update gj-files such that the new code compiles * Analysis/AllCallers.java: small change * Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/MAInfo.java: debug code * Analysis/PointerAnalysis/ODMAInfo.java, Analysis/PointerAnalysis/ODPointerAnalysis.java: making sure Frederic's analysis still compiles after the last changes. * Analysis/PointerAnalysis/NodeRepository.java: Performance tricks: 1. All allocation sites for exceptions (and there are many of them), can be coalesced into a single inside node. Controlled by COALESCE_EXCEPTIONS. Use if you don't need too much precision for exception nodes (the usual case). Tremendous reduction in the number of nodes! 2. All objects returned from native methods can be coalesced into a single RETURN node. Similarly, all objects thrown from native methods can be coalesced into a single EXCP node. Controlled by COALESCE_RESULTS_FROM_NATIVES. I don't see any reason why this flag should be turned off. Significant reduction in the number of nodes! After these optimizations, the analysis runs on JLEX in 136 seconds! 2003-05-06 C. Scott Ananian * Util/Collections/AggregateSetFactory.java: Reworked the AggregateSetFactory to implement remove() efficiently (in O(1) time) and to fix a bug where the set implementation would inadvertently keep live the set providing their initial contents. 2003-05-06 salcianu * Analysis/PointerAnalysis/ParIntGraph.java: more detailed graph node statistics * Analysis/PointerAnalysis/PointsToGraph.java: fixed grammar mistake * Analysis/PointerAnalysis/PANode.java: New node: CONST - models all constant objects. Of course, we can extend this to have one node for each constant object; unnecessary for the moment and too costly (for small benchmarks, we want to number of nodes to be as small as possible) * Analysis/PointerAnalysis/LightPAEdgeSet.java: Fixed evil "mutation behind the scene" bug, due to a forgotten ".clone()". * Analysis/PointerAnalysis/PointerAnalysis.java: 1. Proper treatment of CONST. "v = CONST obj" deletes previous edges from v (we didn't do this before, which resulted in some unnececessary imprecisions); also, if obj is an object, puts v to point the only node that models all constant objects. This node is unessential for stack/thread allocation (we obviously don't need to stack allocate these immortal objects; that's why we didn't care too much about it before), but it's good for completeness anyway. 2. Remove a previous precision enhancing hack rendered useless by 1. * Util/BasicBlocks/SCCBBFactory.java, Analysis/MemOpt/Util.java, Util/LightBasicBlocks/SCCLBBFactory.java: Small changes to reflect the fact that harpoon.Util.Graphs.SCComponent.Navigator is now harpoon.Util.Graphs.Navigator. * Analysis/MetaMethods/MetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/MetaMethods/SmartCallGraph.java, Analysis/CallGraph.java, Analysis/Quads/AbstrCallGraph.java, Analysis/Quads/CachingCallGraph.java, Analysis/Quads/CallGraph.java, Analysis/Quads/CallGraphImpl2.java: CallGraphs and MetaCallGraphs now extend the just introduced DiGraph. This way, if you ever work on an analysis that explores the call graph top-down, you can call the method getTopDownComponentView() of the call graph and obtain a top-down sorted list of the call graph strongly connected components. Currently, the list uses next/prev fields in the SCCs; it will be cleaner to have a real java.util.List, but there is too much code to change right now ... If you work on a bottom-up analysis, you simply iterate over that list in reverse order. Some analyses (e.g. PointerAnalysis) were already doing the things described above. As the things get more elegant, they will become accessible to other analyses too. 2003-05-04 salcianu * bin/copyright.perl: putting a more stable email address 2003-05-03 C. Scott Ananian * Util/Default.java: Add left()/right() methods to Default.PairList. * prj.el: Update prj.el to latest version of JDE. * Temp/package.html: Correct javadoc spelling error. 2003-05-01 salcianu * Analysis/MemOpt/IADriver.java: Useless file: entire functionality for IncomaptibilityAnalysis is now available via SAMain. * Analysis/PointerAnalysis/MAInfo.java, Main/SAMain.java: USE_OLD_CLINIT_STRATEGY is gone! rip * Analysis/Quads/SmallMethodInliner.java: fixed comment to reflect reality 2003-04-30 salcianu * Analysis/MemOpt/Util.java, Support/gjlib.jar, Analysis/AllCallers.java: Cleaner AllCallers * Analysis/PointerAnalysis/MAInfo.java: Modified MAInfo to use the top-down view of a meta-callgraph from MetaCallGraph (instead of building a new one from scratch) + other cosmetic changes. * Analysis/MetaMethods/MetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphAbstr.java: Added methods for getting Top-Down / Bottom-Up views of a meta-callgraph. * Main/CompStagePipeline.java, Main/SAMain.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/PointerAnalysisCompStage.java, Analysis/Realtime/Realtime.java: Various changes to integrate the new compiler stages in the top level module (SAMain). * Analysis/PointerAnalysis/AllocSyncOptCompStage.java, Analysis/PointerAnalysis/PARTJSupportCompStage.java: Two new compiler stages: - stage for memory allocation optimizations and sync removal via pointer analysis - stage that uses pointer analysis results to offer some support to RTJ programs (debugging and check removal). 2003-04-29 wbeebee * Backend/Runtime1/init-safe.properties, Backend/Runtime1/method-root.properties: More GNU Classpath support... 2003-04-23 salcianu * bin/build-precisec: BUG FIX: build-precisec used to painstakingly collect the JVM options (-D...) from the command line and next throw them away ... (i.e., javaopts was not passed to run-java, nor was it exported). They are now properly passed to run-java, right AFTER ${flexc_options:="-Dharpoon.alloc.strategy=bdw"} This way, if your command line options specify a different allocation strategy, SAMain will actually see it :) 2003-04-22 C. Scott Ananian * Backend/MIPS/CodeGen.spec, Backend/StrongARM/CodeGen.spec, Util/Collections/BinaryTree.java, Util/Collections/IntervalTree.java, Util/Collections/RedBlackTree.java: javadoc "@see" tag syntax fixes. * GNUmakefile: Location of CVS history browsing web app has changed (although the old address redirects to the new address). 2003-04-21 salcianu * Analysis/MemOpt/PreallocOpt.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/PointerAnalysisCompStage.java, Analysis/Realtime/Realtime.java, Instrumentation/AllocationStatistics/AllocationInstrCompStage.java, Main/CodeGenerator.java, Main/CompStagePipeline.java, Main/CompilerStage.java, Main/CompilerStageEZ.java, Main/EventDrivenTransformation.java, Main/MZFCompilerStage.java, Main/RegularCompilerStageEZ.java, Main/RoleInference.java, Main/SAMain.java, Main/Transactions.java, Support/gjlib.jar: Code reorganization. * Analysis/PointerAnalysis/PAAllocSyncCompStage.java: Compiler stage for stack allocation and sync removal. 2003-04-18 salcianu * Analysis/MetaMethods/MetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphAbstr.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointerAnalysisCompStage.java, Main/SAMain.java, Support/gjlib.jar: Moving more functionality from PAMain into PointerAnalysisCompStage * Util/Collections/PersistentMap.java, Util/Collections/PersistentTreeNode.java: Make more stuff Serializable. * Main/CompilerStageEZ.java, Main/CompilerState.java: Added a new field to CompilerState: PersistentMap attribs. These map can be used to store those things that are too unusual and don't deserve a field on their own. Of course, the entire CompilerState can be just a PersistentMap; however, fields have the advantage of strong typing. * Main/CodeGenerator.java: The debugging options for the register allocation are controlled by the debug.reg-alloc environment property. * Main/CompStagePipeline.java: Two CompilerStages can be combined into a single one, using a CompStagePipeline. * Backend/Maps/FieldMap.java, Backend/Maps/MethodMap.java, Backend/Maps/NameMap.java, Backend/Runtime1/AllocationStrategy.java, Backend/Runtime1/ObjectBuilder.java, Backend/Runtime1/Runtime.java, Backend/Generic/Frame.java, Backend/Generic/LocationFactory.java, Backend/Generic/RegFileInfo.java, Backend/Generic/Runtime.java: Declared some classes Serializable, such that we can serialize CompilerStates * Analysis/MemOpt/PreallocOpt.java: unnecessary code deleted * Analysis/Realtime/CheesyPACheckRemoval.java, Analysis/Realtime/PACheckRemoval.java: Small changes to accomodate the slight change of interface in PointerAnalysis (I dropped one argument of its constructor). * Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointerAnalysisCompStage.java, Main/CompilerStageEZ.java, Main/SAMain.java: New compiler stage: PointerAnalysisCompStage (constructs a PointerAnalysis object). Gradually, things from the "deceased" PAMain are moved into the new compiler stage architecture. * Analysis/MemOpt/PreallocOpt.java, Analysis/MetaMethods/FakeMetaCallGraph.java, Analysis/MetaMethods/SmartCallGraph.java: Simplified a bit the SmartCallGraph / FakeMetaCallGraph interface: you can now pass them the SAMain-style program roots (taht may include classes, not only methods). Updated PreallocOpt to reflect this. * Main/CodeGenerator.java: Fix a help message. The new command line options cannot be coalesced. Therefore, "-OPR" becomes "-O -P -R". 2003-04-17 salcianu * Main/SAMain.java: cosmetic changes * Main/CodeGenerator.java, Main/SAMain.java: Some of the options in CodeGenerator were too reg-alloc-debug-specific (and were poluting the listing of our compiler options). By default, they are not included; if you need them, set the DEBUG flag on. 2003-04-16 salcianu * Support/gjlib.jar: Updated Support/gjlib.jar file. * Analysis/MemOpt/run_experiments: Update scripts to take advantage of the new harpoon.Util.Option package: new options may have multiple args, so we don't have to package multiple args in a single one (i.e. "-Z file1,file2"; we can now use "-Z file1 file2") * .cvsignore: small change * bin/build-mipsda, bin/build-mipsvp, bin/build-roles: changes similar to the one from build-precisec: -bMIPS became -b MIPS etc. * bin/build-precisec: Small change: our new options require the option arguments (compulsory and/or optional args) to be separated from the actual option. So, "-bprecisec" should now be written "-b precisec". * Analysis/Realtime/Realtime.java: Small changes to make Realtime-related processing fit in our CompilerStage architecture. * Main/SAMain.java: BIG changes. SAMain has been rewritten around the CompilerStage abstraction. The compiler is now a pipeline of stages; we built the pipeline at the beginning of the compiler and next pump the program through it. I think it now looks far nicer than the several hundred lines of the suggestively named "do_it" method. Here is a sample: private static void buildTreeFormPipeline() { addStage(new LowQuadToTree()); addStage(new WriteBarriers.WBDynamicWBTreePass()); addStage(new PreallocOpt.TreePass()); ... addStage(new RegularTreePass()); ... addStage(new RegularCompilerStageEZ("sanity-check-tree") { protected void real_action() { hcf = harpoon.Analysis.Tree.DerivationChecker.codeFactory(hcf); hcf = new CachingCodeFactory(hcf); } }); } Actions of SAMain: 1. construct pipeline of stages 2. grab options from all the stages from the pipeline and parse them by calling Option.parseOptions 3. build an initial compiler state 4. pump it through the pipeline: the pipeline starts with BuildQuadForm and ends with CodeGenerator. Almost all of the previous functionality of SAMain has been retained. The only exceptions are THREAD_INLINER and "-i" (load a serialized code factory), things were added when we're struggling with pointer analysis research (if my memory is correct) and never used afterwards. We can add them, if the public demand is overwhelming :) * Main/CodeGenerator.java: CodeGenerator has been engineered to be a CompilerStage. Actually, theer should be several compiler stages here. Unfortunately, I'm not very familiarv with this code, so I don't know where to draw the lines between the different (potential) stages, so I put all of them in a big stage. * Main/CompilerState.java: Updated JavaDoc * Main/CompilerState.java: Changes in the CompilerState abstraction: to be safe against field addition / deletion in CompilerState, the only permitted way of creating a CompilerState is: 1. at the beginning of the program: start with an empty CompilerState (i.e., all fields are null): CompiletState.EMPTY_STATE 2. change one element of an already existing CompilerState, thus producing a new CompilerState (no mutation), identical to teh original, except for the changed element. To enforce 2, the only constructor of CompilerState is now private. * Analysis/MemOpt/PreallocOpt.java: Modifications for implemting the Memory Prealloc. Optimization in the new staged architecture. * Instrumentation/AllocationStatistics/AllocationInstrCompStage.java: Compiler stage for the allocation instrumentation: options + code + static fields in one place, OUTSIDE SAMain! * Main/EventDrivenTransformation.java, Main/MIPSOptimizations.java, Main/MZFCompilerStage.java, Main/RoleInference.java, Main/Transactions.java, Main/WriteBarriers.java: New classes: I moved the code specific to advanced optimizations into external CompilerStages (see the list below). Each such stage has its own list of options (together with their help). Hopefully, all these stages wil be one day moved into their respective packages. * Main/CompilerStageEZ.java: Easy to use CompilerStage (I wrote this class after filling my 10540NR-EZ!). "easy" means that it's asy to cut and paste code from the previous version of SAMain into it: - Has an implementation of "action" that 1. calls "enabled" (abstract) to see whether the stage is activated or not. 2. unpacks the input CompilerState (into fields named hcf, classHierarchy, linker, roots), 3. calls "real_action" (abstract) 4. packs the resulting hcf, classHierarchy etc. and returns the resulting CompilerState. - packing and unpacking are safe against field additions to CompilerState (e.g., if tomorrow somebody decides to add a new field into CompilerState, that field will be propagated unchanged across stages that don't change it, without any modification to the existing stages). - Subclasses have to implement "enabled" and "real_action". real_action code can refer to hcf, classHierarchy and the other identifiers you enjoyed in SAMain. * Main/CompilerStage.java: New abstraction: CompilerStage. Hopefully, our compiler will be just a pipeline of compiler stages. Each compiler stage: - has a list of options (harpoon.Util.Options.Option) - does some processing (action) that takes a compiler state and returns another compiler state (reminder: a compiler state encapsulates all the data relevant to the program being compiled: code factory, main method, linker, roots etc.) - for debugging and friedly messages, each stage has a name * Main/ODPAMain.java, Main/PAMain.java: Remove PAMain and ODPAMain; these things will (hopefully) be integrated in SAMain. They prevented reorganization of SAMain. * Util/Options/Option.java: Small change. * Util/Options/Option.java: New package: Options - command line options, nicer than Getopt. Advantages: 1. object-oriented code - no more (huge) switch; dynamic dispatch of the "action" method instead. 2. the option name, the action it does (usually setting some boolean flags), and the help message all in one place. 3. Option.parseOptions takes a list/array of Strings and a list of options, parses the options that appear among those strings and return the unparsed Strings. Therefore, you can have several modules gradually parsing their options, instead of centralizing it in one place. Note: the code is pre-GJ-ed: it has all the generic types, but commented out (when the GJ compiler becomes more stable, we will uncomment them) 2003-04-14 C. Scott Ananian * GNUmakefile: Update the 'make backup' command to reflect the new location of the CVS repository. * GNUmakefile: Use gjdoc instead of javadoc to generate documentation; javadoc don't (yet) handle parameterized types. Also, correct the location of the overview.html file. * Tools/Annotation/Java12.cup: Update annotation tool to latest version of JSR-14 grammar. 2003-04-10 C. Scott Ananian * Main/Javap.java: Suppress 'extends java.lang.Object' in type variable bounds if there are no non-object bounds. * IR/Tree/TreeKind.java, IR/package.html: Javadoc fixes. 2003-04-09 C. Scott Ananian * bin/annotate.perl: Reg-exp match for HTML tag should be case-insensitive. Lower-case tags are mandatory for XHTML. * bin/build-spec-arm-hack, bin/build-spec-arm-pnk, bin/build-spec-mipsda, bin/build-spec-mipsvp, bin/build-spec-precisec, bin/interpret, bin/run-java: Handle spaces in arguments to scripts better. * Main/Javap.java: Fix a bug with our parsing of JSR-14 type parameter descriptor strings. The declaration 'extends Object & Comparable' is different from 'extends Comparable' because the erasure differs. We were conflating these two cases. 2003-04-08 salcianu * Main/SAMain.java, Analysis/MemOpt/PreallocOpt.java: one more commit before our group eating * Main/CompilerState.java, Main/SAMain.java: small changes * Main/CodeGenerator.java, Main/ODPAMain.java, Main/PAMain.java, Main/SAMain.java: Additional code cleaning in SAMain 2003-04-07 salcianu * Analysis/MemOpt/run_experiments, Analysis/MemOpt/time_experiments: Minor changes: putting some scripts in good shape. 2003-04-02 salcianu * Main/CodeGenerator.java, Main/SAMain.java: comments * Main/CodeGenerator.java, Main/CompilerState.java, Main/ODPAMain.java, Main/PAMain.java, Main/SAMain.java: MASSIVE restructuring: 1. New abstraction: CompilerState - tuple of things that constitute the state of the compiler: main method, set of roots, code factory, etc. Ideally, we'll split the compiler in several stages, each taking a CompilerState and returning a new one (to avoid errors, CompilerState is immutable!) 2. Code generating code was moved into CodeGenerator.java, together with its many, many options (there is a huge number of options for the register allocator, how many of them are actually used?). Hopefully, other compiler stages will be moved out of SAMain. SAMain should consist only of option parsing and the big, top-level structure. Many, many things remain to be done ... 2003-04-01 salcianu * Main/SAMain.java: Ongoing code cleaning in SAMain.java. * Main/ODPAMain.java, Main/PAMain.java, Main/SAMain.java: Fixed bug in SAMain + some forgotten commits. 2003-03-31 salcianu * Main/SAMain.java: Big changes to make SAMain more comprehensible. So far, the idea was to split the huge do_it() method into smaller units and to move the fancy optimizations into separate methods at the end of SAMain. 2003-03-28 salcianu * Main/SAMain.java: Code cleaning in SAMain: three things have been moved out of main / do_it: getMainMethod constructFrame checkOptionConsistency * Backend/Backend.java: added comments * Main/Sizer.java, Main/EDMain.java, Main/EDXMain.java, Main/EventDriven.java, Main/JMain.java, Main/ODPAMain.java, Main/Options.java, Main/PAMain.java, Main/SAMain.java, Backend/Backend.java: Added a top level class for the many backends we have: harpoon.Backend.Backend Cleaning SAMain: the constants used to simulate an enumeration for the backend kind (precisec, mips etc) have been moved harpoon.Backend.Backend: Backend.PRECISEC, Backend.MIPS. This new class also contains a convenient method Backend.getFrame (the former frameFromString from Options.java). 2003-03-18 C. Scott Ananian * Tools/Annotation/Java12.cup: Extend source code annotation tool to better handle type variables declared in class declaration. Still not perfect: 1) the scope of the class variables currently starts after the parameter block. That means that the second A in the definition > will not be linked correctly. 2) a good solution to this would be to move the scope declarations to the class_body_declarations production, making each class_body_declaration a new scope. Then some other means of implementing newInner() must be found to prevent class A defined in B.foo() and class A defined in B.bar() from conflicting. 3) HMethodTypeVariables are not handled. This is partly due to the scope issues above, and partly because the current QualName abstraction doesn't provide a good means to represent them. (perhaps add another 'method' field to the qual name?) Also the grammar is factored awkwardly for passing the eventual method name to the type variable declaration. (method type parameters can't be annotated until the method name is known, but can be referenced in the parameter block before the method name is parsed.) I did refactor code into doClassDeclaration with the result that inner classes and interfaces should be handled better (documentation comments linked, etc). * GNUmakefile: Move and un-export TARSOURCE, NONEMPTYPKGS, and PKGSWITHJAVASRC to keep the size of the exported environment down. (xargs wail failing with 'environment too large' in 'make clean' after several new source files were added to FLEX.) 2003-03-17 salcianu * Support/gjlib.jar: Updated version of Support/gjlib.jar * Analysis/MemOpt/get_stats, Analysis/MemOpt/run_experiments, Analysis/MemOpt/time_experiments: small changes in the scripts * Runtime/CounterSupport.java: small hack to take allignment into account (in an approximate manner). * ClassFile/HClassMutator.java, ClassFile/HField.java, ClassFile/HMethod.java: Improved JavaDoc. 2003-03-17 C. Scott Ananian * prj.el: Update copyright date on JDE skeleton. * ClassFile/HClass.java, ClassFile/HClassTypeVariable.java, ClassFile/HField.java, ClassFile/HFieldImpl.java, ClassFile/HFieldProxy.java, ClassFile/HMethod.java, ClassFile/HMethodImpl.java, ClassFile/HMethodProxy.java, ClassFile/HMethodTypeVariable.java, ClassFile/HParameterizedType.java, ClassFile/HType.java, ClassFile/HTypeVariable.java, Support/gjlib.jar, gj-files: Extend ClassFile package with skeletal support for parameterized types. Support was added to the IR.RawClass package some time ago (see Main.Javap for a use), but we haven't yet reflected that additional information into the HClass object. This commit still doesn't make the parameterized signatures visible; it just adds the API from the JSR14 spec which, when eventually implemented, will expose the parameterized types. For now, all of the new methods throw a RuntimeException if used. 2003-03-17 salcianu * ClassFile/HMethodMutator.java: better doc * bin/build-precisec: Big fix: if PRECISEC_FLAGS is defined as "`-g -O9`" it will be interpreted as a sigle token by gcc, and reported as an invalid option. 2003-03-16 kkz * Support/gjlib.jar: A new, more up-to-date gjlib.jar from a clean checkout of the source. 2003-03-16 salcianu * Analysis/MemOpt/IAStatistics.java, Analysis/MemOpt/PreallocOpt.java, Main/SAMain.java: Slight modification in the memory preallocation optimization to avoid adding any new class to the class hierarchy (and avoid the 22% slowdown for jess). 2003-03-15 kkz * IR/Quads/QuadSSI.java: Now we can make QuadSSI out of ResilientNoSSA. * IR/Quads/ResilientNoSSA.java, IR/Quads/ResilientUnHandler.java: Better handling for code in a try block; for exceptions that are going to be caught, throw them anyway, otherwise use the 'resilient' handling technique. 2003-03-13 C. Scott Ananian * Backend/PreciseC/TreeToC.java: Added a comment about a buglet Karen found, so that if it turns out to bit us again, we can Do The Right Thing about it. A decent work-around for the moment is to run SCCOptimize on the Quad form before translation to Tree. 2003-03-11 C. Scott Ananian * ClassFile/HClass.java, Support/gjlib.jar, gj-files: GJ-ize harpoon.ClassFile.HClass and modernize the Collections used. Have to add HClassArray, HClassPrimitive, and HClassProxy to gj-files in order for the Comparable interface to be implemented correctly. Updated gj-files and Support/gjlib.jar. [this commit is just pointless tweaking that I stumbled across as I tried to pin down a bug compiling HArrayMethod] * Analysis/PreciseGC/DynamicWBTreePass.java, Analysis/PreciseGC/WriteBarrierConstElim.java, Analysis/PreciseGC/WriteBarrierTreePass.java, gj-files, Support/gjlib.jar: The Tree Simplification class takes a List, not a plain list. Update PreciseGC/DynamicWBTreePass, PreciseGC/WriteBarrierConstElim, and PreciseGC/WriteBarrierTreePass to pass a correctly-parameterized list to their superclass. Some further GJ-ization done where appropriate. Updated gj-files and Support/gjlib.jar. As of this commit, FLEX is fully-parameterized; that is, it ought to compile correctly in its entirely using a proper implementation of the JSR-14 specification for generic java. (This doesn't mean that every class uses parameterized types, or even that even class that *ought* to use parameterized types does, but simply that FLEX has a consistent type definition using in some cases "raw" types.) In an ideal world, we would now be able to use a GJ compiler to compile all of FLEX, without using the current two-stage compilation process. Unfortunately, we cannot because the current JSR-14 prototype version 1.3, although it fixes many bugs found in its predecessors, still has the following three issues: 1) the compiler itself throws an exception when compiling Java12.java 2) The type-inference engine seems unable to resolve a call to Arrays.sort(Object[], Comparator) as a valid call to void sort(T[], Comparator) (probably according to spec, but breaks backward compatibility) 3) A bug in compiling HArrayField/HArrayMethod, which extend Comparable but not directly. So we are sticking with our two-phase compile for the moment. JSR-14 compiler version 1.3 -- which I encourage you to download and install from http://java.sun.com/people/gbracha/generics-update.html if you are still using 1.2 or earlier -- does fix many earlier bugs, and Sun is committed to distributing this with version 1.5 of the JDK, so I anticipate we will not have to use our two-phase compile for long. I may in fact switch to a mostly-GJ compile, with special treatment only for the 14 files which trigger the above 3 bugs. Also, jikes and a number of other java compiler projects are moving to support the JSR-14 GJ extensions, so I expect us to be just a little ahead of the curve here. * Backend/Analysis/InsertWriteBarrier.java, Backend/Analysis/MakeGCThreadSafe.java, Analysis/Tree/DeadCodeElimination.java, Analysis/Tree/JumpOptimization.java, Support/gjlib.jar, gj-files: The Tree Simplification class takes a List, not a plain list. Update DeadCodeElimination, JumpOptimization, InsertWriteBarrier, and MakeGCThreadSafe to pass a correctly-parameterized list to their superclass. Some further GJ-ization done where appropriate. Updated gj-files and Support/gjlib.jar. * IR/Quads/SSIToSSA.java, IR/LowQuad/LowQuadSSI.java, Analysis/LowQuad/Loop/MyLowQuadSSI.java, Analysis/EventDriven/EventDrivenCode.java, Analysis/EnvBuilder/EnvCode.java, Support/gjlib.jar, gj-files: Add a missing parameter to Analysis/EnvBuilder/EnvCode, Analysis/EventDriven/EventDrivenCode and Analysis/LowQuad/Loop/MyLowQuadSSI to get them to extend their parameterized superclass correctly. Also noticed a parameterization deficiency in LowQuadSSI, which suggested GJ-izing SSIToSSA as well. Updated gj-files and Support/gjlib.jar. * Analysis/DefaultAllocationInformation.java, Analysis/DefaultAllocationInformationMap.java, Analysis/AllocationInformationMap.java, Support/gjlib.jar, gj-files: GJ-ize AllocationInformationMap, DefaultAllocationInformation, and DefaultAllocationInformationMap to be consistent with the GJ-ized Analysis/Maps/AllocationInformation. Updated gj-files and Support/gjlib.jar. * IR/Tree/CanonicalTreeCode.java, IR/Tree/OptimizedTreeCode.java, gj-files, Support/gjlib.jar: GJ-ize CanonicalTreeCode and OptimizedTreeCode to fix a non-parameterized override of a parameterized method in the superclass (Tree.Code). This furthers the goal of getting *all* of FLEX to compile with the GJ compiler. (Note that Tools/Annotation/Java12.java currently crashes the GJ compiler, sadly enough.) 2003-03-11 wbeebee * Backend/Runtime1/class-root.properties, Backend/Runtime1/init-safe.properties, Backend/Runtime1/method-root.properties: Updated for Classpath * Support/awt-root-set, Support/cpvm.jar, Support/imagerec-root-set, Support/jacorb-root-set-classpath, Support/locale-root-set-classpath, Support/reflect-thunk.jar, Support/servo.jar: New roots for new GNU Classpath, AWT support, and Image Recognition. 2003-03-10 C. Scott Ananian * IR/Quads/Code.java, Analysis/Quads/ArrayUnroller.java, Analysis/Quads/TypeSwitchRemover.java, Analysis/Quads/Unreachable.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/LowQuad/DerivationChecker.java, Support/gjlib.jar, gj-files: Fixed some users of Derivation to use the parameterized version. This involved GJ-izing DerivationChecker, TypeSwitchRemover, and Unreachable. The tighter type for Unreachable.prune() necessitated changes to ArrayUnroller and MAInfo. Updated gj-files and Support/gjlib.jar as well. * IR/Quads/ResilientNoSSA.java, IR/LowQuad/Code.java, IR/LowQuad/DerivationMap.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java, IR/LowQuad/LowQuadSSI.java, Support/gjlib.jar, gj-files: GJ-ize IR/LowQuad/{Code,DerivationMap,LowQuadNoSSA,LowQuadSSA,LowQuadSSI}.java and IR/Quads/ResilientNoSSA.java to correct non-parameterized override of parameterized method in superclass. This furthers the goal of getting all of FLEX to compile with the GJ compiler, doing away with the current two-stage approach. Current GJ compiler still throws a null-pointer exception on some FLEX file (still trying to find the source), but the parameterized type-inference bugs of previous versions seem to have been corrected in version 1.3 of the JSR-14 compiler. Fixing IR/LowQuad/Code required parameterizing IR/LowQuad/DerivationMap, since the base Derivation interface is parameterized on HCodeElement type. Note that DerivationMap.transfer() lets you transfer types from a derivation of an HCodeElement element type dissimilar from your own. As a random aside, I'm still rather unhappy with the way strongly-typed tuples interact with the List interface -- they must always extends List because the get(i) method returns different types based on the value of the integer parameter. This makes it hard to extract the fields of the typed tuple in a type-safe manner. (See the Default.PairList class and its use in IR/LowQuad/DerivationMap and elsewhere.) Ideas here are welcomed. Updated Support/gjlib.jar, since we added new classes to gj-files. Karen, note that IR/Quads/ResilientNoSSA has been GJ-ized. * bin/find-gj: Fix file leak when using result caching. Also change prefix to be different from the autoconf test I borrowed this code from, to decrease the odds of stepping on each other's files. * bin/build-spec: Commit a forgotten building-spec-with-classpath patch. * Util/Collections/CollectionFactory.java, Util/Collections/Factories.java, Util/Collections/ListFactory.java, Util/Collections/SetFactory.java: Remove spurious 'import' statements. * bin/find-gj, .cvsignore, GNUmakefile: Made Makefile smarter about looking for a JSR-14 GJ compiler, and what options to give to it. The new bin/find-gj script tries compiling GJ code with jikes and javac first (in anticipation of a future where this support will be added to the standard tools) and then tries the JSR14DISTR javac script and some other guesses for standard locations. Each compiler is tried with both the '-source 1.4 -gj' and '-source 1.5' means of asking for GJ compatibility. To make this check faster, put the value found in .find-gj-cache in the environment variable JCC5. 2003-03-07 salcianu * Analysis/MemOpt/PreallocAllocationStrategy.java, Analysis/MemOpt/PreallocOpt.java: PreallocAllocationStrategy now extends BDWAllocationStrategy instead of MallocAll.... For non-preallocated site, we now may use GC_malloc_atomic which saves some execution time. 2003-03-05 C. Scott Ananian * bin/build-precisec: Shell variable assignments inside of $() may be done in a subshell and thus not correctly propagated to the parent shell. Move the default assignment out of the sub-shell to fix the problem. Thanks to Alex for the bug-finding and fix. 2003-03-03 salcianu * Analysis/MemOpt/get_stats, Analysis/MemOpt/run_experiments, Analysis/MemOpt/time_experiments: small changes * Support/gjlib.jar, Analysis/PointerAnalysis/MyAP.java, Analysis/Maps/AllocationInformation.java, Analysis/AllocationInformationMap.java, Analysis/ChainedAllocationProperties.java, Analysis/DefaultAllocationInformation.java: 1. Technical changes into the AllocationProperties 2. New version of Support/gjlib.jar * Analysis/MemOpt/run_experiments, Analysis/MemOpt/time_experiments: modified scripts; still far from ideal * Backend/PreciseC/Frame.java: Put the runtime selection code into a separate method; hopefully, at some point it will be factored out of PreciseC.Frame as a RuntimeFactory. * Main/SAMain.java: 1. Added long options to SAMain (we almost exhausted all the letters) 2. Changes to make sure the chain of code factories is the same in the cases of PREALLOC_OPT and ONLY_SYNC_REMOVAL (useful for timing measurements) 3. Simplified a bit the printing of the help messages: I've put all the help messages in help_lines - an array of strings. If you add a new option and want to add some info on it, just add some more elements to help_lines. * Analysis/MemOpt/AddMemoryPreallocation.java, Analysis/MemOpt/IAStatistics.java, Analysis/MemOpt/PreallocAllocationStrategy.java, Analysis/MemOpt/PreallocOpt.java: More info this time: (we've just verified that cvs commit works again) Various modifications to Memory Preallocation optimization: 1. Changes to take advantage of the soon-to-be-commited modification to BDW 2. Concentrate debug code into PreallocOpt.java 3. Add flag PreallocOpt.ONLY_SYNC_REMOVAL: run the IncompatibilityAnalysis and remove syncs on all the preallocatable objects, but don't actually preallocate them. Mostly for timing reasons: we want to measure only the difference due to memory preallocation - the memory preallocation opt. has to involve sync removal (otherwise, there are problems in the GC with the finalizers for the inflated objects). * Analysis/MemOpt/PreallocData.java: new class 2003-02-24 wbeebee * Analysis/MemOpt/PreallocOpt.java: Eliminate debugging output in the default case 2003-02-22 salcianu * Main/SAMain.java: Code cleaning: use CombineIterator(it1, it2) instead of CombineIterator(new Iterator[] { it1, it2} ) * Analysis/MemOpt/AddMemoryPreallocation.java: Removed some debug code 2003-02-21 salcianu * Main/SAMain.java, Instrumentation/AllocationStatistics/AllocationStatistics.java, Analysis/MemOpt/AddMemoryPreallocation.java, Analysis/MemOpt/IncompatibilityAnalysis.java, Analysis/MemOpt/PreallocAllocationStrategy.java, Analysis/MemOpt/PreallocOpt.java, Analysis/MemOpt/get_stats, Analysis/MemOpt/run_experiments, Analysis/MemOpt/time_experiments: various changes 2003-02-19 kkz * IR/Quads/ResilientNoSSA.java, IR/Quads/ResilientUnHandler.java: Added ResilientNoSSA pass for converting Quad-with-Try to a form of NoSSA with "resilient" exception handling---instead of throwing an exception, program will try to continue executing as far as this is possible. 2003-02-14 salcianu * Analysis/MemOpt/get_stats, Analysis/MemOpt/run_experiments, Analysis/MemOpt/time_experiments: Added my building, timing and statistics gathering scripts. Normally, we put scripts in bin; however, as these scripts are highly specialized, I decided to put them in Analysis/MemOpt. * Util/Timer.java, Analysis/MemOpt/AddMemoryPreallocation.java, Analysis/MemOpt/IAStatistics.java, Analysis/MemOpt/IncompatibilityAnalysis.java, Analysis/MemOpt/PreallocOpt.java: Small improvements and modifications. 2003-02-12 salcianu * Util/Util.java, Support/gjlib.jar, Main/ODPAMain.java, Main/PAMain.java, Instrumentation/AllocationStatistics/AllocationNumbering.java, Instrumentation/AllocationStatistics/AllocationStatistics.java, Analysis/PointerAnalysis/ComputeInterProcMuClosure.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/ODInterProcPA.java, Analysis/PointerAnalysis/ODMAInfo.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/Stats.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/MemOpt/IAStatistics.java, Analysis/MemOpt/IncompatibilityAnalysis.java, Analysis/MemOpt/PreallocAllocationStrategy.java: Refactoring (what a wonderful word!) Many pretty-printers have been moved from Analysis.PointerAnalysis.Debug to Util.Util, thus removing the un-natural dependencies of several packages on Analysis.PointerAnalysis. After a long battle with GJ bugs, I've managed to compile the code. Support/gjlib.jar has been rebuilt and it's now commited, so you shoudn't have any of these problems. 2003-02-11 salcianu * Analysis/MemOpt/package.html: Added a package.html file for the harpoon.Analysis.MemOpt package (the incompatibility analysis + preallocation optimization). * Instrumentation/AllocationStatistics/AllocationStatistics.java, Runtime/CounterSupport.java, Analysis/MemOpt/IAStatistics.java: Various changes for the allocation site instrumentation. * Main/Options.java, Backend/PreciseC/Frame.java: Comments + default case: if the AllocationStrategy passed to PreciseC.Frame is null, use the default "malloc"-based strategy. * Main/Options.java, Main/SAMain.java, Backend/PreciseC/Frame.java: The rest of the code for implementing the "AllocationStrategyFactory" trick. Note: it was implemented only for PreciseC.Frame (the other Frame's are unaffected - fortunately, their code was anyway much cleaner) * Backend/Runtime1/AllocationStrategyFactory.java: New class: AllocationStrategyFactory Given a Frame, produces an AllocationStrategy (and we have MANY of them: Instrumented, Preallocated, RTJ, nifty, niftystats, bdw, malloc etc.) Remember that messy code in PreciseC.Frame for detecting the appropriate AllocationStrategy? I'm moving it into SAMain: SAMain creates a Frame by passing it an appropriate AllocationStrategyFactory, based on the command line options and the value of "harpoon.alloc.strategy". Hopefully, this will eliminate many strange dependencies (why should Frame depend on command line args and static fields scattered all over the code?) The reason we pass a factory, and not an AllocationStrategy is that most AllocationStrategies constructors require a frame; therefore, they cannot be created before the call to the constructor of Frame. * Instrumentation/AllocationStatistics/AllocationNumbering.java, Instrumentation/AllocationStatistics/AllocationNumberingInterf.java, Instrumentation/AllocationStatistics/AllocationNumberingStub.java, Instrumentation/AllocationStatistics/InstrumentAllocs.java, Instrumentation/AllocationStatistics/InstrumentAllocs2.java, Instrumentation/AllocationStatistics/InstrumentedAllocationStrategy.java, Instrumentation/AllocationStatistics/UnknownAllocationSiteError.java: New allocation instrumentation appears to work! InstrumentedAllocationStrategy contains the only example I know about of generating a (non-native) CALL in tree form from scratch (not just converting a low quad PCALL intop a tree CALL). It's actually very neat and easy, but it's always hard to do it without any example. New class: UnknownAllocationSiteError for the case where we want to find the unique ID of an allocation site that was not seen by AllocationNUmbering (previously, we were just throwing Error). Not an Exception as 1) it's not supposed to be caught outside the instrumentation pacakage and 2) declaring thrown exceptions is not that fun. 2003-02-10 salcianu * Instrumentation/AllocationStatistics/AllocationNumbering.java, Instrumentation/AllocationStatistics/InstrumentAllocs2.java, Instrumentation/AllocationStatistics/InstrumentedAllocationStrategy.java: more work on the allocation site instrumentation 2003-02-09 salcianu * Main/SAMain.java, Analysis/MemOpt/AddMemoryPreallocation.java, Analysis/MemOpt/IAStatistics.java, Analysis/MemOpt/IncompatibilityAnalysis.java: More code cleaning * Runtime/CounterSupport.java, Instrumentation/AllocationStatistics/AllocationStatistics.java: More work on the new instrumentation for the allocation sites: - added a new method count2(allocID, length) in CounterSupport: it will be called by the instrumentation to record how many objects and how much space weas allocated at each site - refactored some of the code in CounterSupport - more intuitive names (i.e. "long array[]" was not that informative) - modified both the code that outputs the instrumentation results (in CounterSupport) and the parsing code from AllocationStatistics) 2003-02-08 salcianu * Instrumentation/AllocationStatistics/InstrumentedAllocationStrategy.java: More work on instrumentation * Support/gjlib.jar: updated Support/gjlib.jar * Instrumentation/AllocationStatistics/InstrumentAllocs2.java: Added more comments * Analysis/MemOpt/PreallocOpt.java, Analysis/Maps/AllocationInformation.java, Analysis/DefaultAllocationInformation.java: small changes * Analysis/PointerAnalysis/MyAP.java: small change * Instrumentation/AllocationStatistics/InstrumentAllocs.java, Instrumentation/AllocationStatistics/InstrumentAllocs2.java, Instrumentation/AllocationStatistics/InstrumentedAllocationStrategy.java: Adding several new instrumenatation classes for allocation sites. This instrumentation is made at the Tree format level, where we have access to the size of the allocated memory (which can be quite difficult to compute in Quad form, especially for multi-dimensional arrays). * Analysis/ChainedAllocationProperties.java: Convenient class to allow us to update some of the allocation properties attached with an allocation site. * Analysis/MemOpt/AddMemoryPreallocation.java: Remove debug code * Analysis/DefaultAllocationInformationMap.java: New class: combination of AllocationInformationMap and DefaultAllocationInformation. * Analysis/AllocationInformationMap.java: Remove debug test * Analysis/MemOpt/TestMemOpt.java: Remove unused file 2003-02-07 salcianu * IR/Tree/ESEQ.java, IR/Tree/SEQ.java: Moderate a bit some comments * IR/Tree/ESEQ.java, IR/Tree/SEQ.java: Added convenient constructors to SEQ and ESEQ. 2003-02-03 salcianu * Main/ODPAMain.java, Main/PAMain.java, Main/SAMain.java, Instrumentation/AllocationStatistics/AllocationNumbering.java, Instrumentation/AllocationStatistics/AllocationNumberingStub.java, Instrumentation/AllocationStatistics/AllocationStatistics.java, Instrumentation/AllocationStatistics/package.html, Instrumentation/package.html: More code cleaning of the allocation statistics package and some package.html files (one of them is a full tutorial). * Analysis/PointerAnalysis/InstrumentSyncOps.java: added back accidentally removed file * Main/MemOptMain.java, Main/ODPAMain.java, Main/PAMain.java, Main/SAMain.java, Instrumentation/AllocationStatistics/AllocationNumbering.java, Instrumentation/AllocationStatistics/AllocationNumberingInterf.java, Instrumentation/AllocationStatistics/AllocationNumberingStub.java, Instrumentation/AllocationStatistics/AllocationStatistics.java, Instrumentation/AllocationStatistics/InstrumentAllocs.java, Analysis/PointerAnalysis/AllocationNumbering.java, Analysis/PointerAnalysis/AllocationStatistics.java, Analysis/PointerAnalysis/InstrumentAllocs.java, Analysis/PointerAnalysis/InstrumentSyncOps.java, Analysis/MemOpt/IAStatistics.java, Analysis/MemOpt/PreallocOpt.java: New directories for instrumentation code: Instrumentation, Instrumentation/AllocationStatistics Moved the allocation instr. code from PointerAnalysis to Instrumentation/AllocationStatistics * Analysis/PointerAnalysis/AllocationNumbering.java, Analysis/PointerAnalysis/AllocationStatistics.java: Code cleaning 2003-01-31 wbeebee * Analysis/Realtime/init-safe.properties, Analysis/Realtime/rtjperf-method.properties: Changes to accomodate GNU Classpath 0.05. * Backend/Runtime1/init-safe.properties, Backend/Runtime1/method-root.properties: Upgrades to make FLEX compatible with GNU Classpath 0.05. 2003-01-08 wbeebee * Analysis/Realtime/thread-method.properties: Support masking of handlers so that the user can temporarily turn off certain handlers... 2003-01-07 salcianu * Analysis/MemOpt/IAStatistics.java: One more forgotten commit ... * Support/gjlib.jar: up-to-date Support/gjlib.jar * Main/MemOptMain.java, Main/SAMain.java, Analysis/PointerAnalysis/Debug.java, Analysis/MemOpt/AddMemoryPreallocation.java, Analysis/MemOpt/IADriver.java, Analysis/MemOpt/IAStatistics.java, Analysis/MemOpt/IncompatibilityAnalysis.java, Analysis/MemOpt/PreallocAllocationStrategy.java, Analysis/MemOpt/PreallocOpt.java: forgotten commits (1 month ...) for the memory preallocation experiments 2002-12-04 salcianu * Support/gjlib.jar: updated gjlib.jar * Analysis/PointerAnalysis/AllocationNumbering.java, Analysis/PointerAnalysis/AllocationStatistics.java, Analysis/MemOpt/IAStatistics.java, Analysis/MemOpt/IncompatibilityAnalysis.java, Analysis/MemOpt/PreallocOpt.java: Many chnages for grabbing the right statistics. 2002-12-02 salcianu * Main/SAMain.java, Analysis/PointerAnalysis/AllocationNumbering.java, Analysis/PointerAnalysis/AllocationStatistics.java, Analysis/MemOpt/AddMemoryPreallocation.java, Analysis/MemOpt/PreallocAllocationStrategy.java, Analysis/MemOpt/PreallocOpt.java: With Scott's help, I fixed my allocation instrumentation code to work fine with obfuscated code (e.g., mpegaudio) that uses Unicode characters in the method/classes names. Wes, I think your application at Berkley has some chances :) Even if you didn't travel to Zimbabwe to discover your roots, you work in a project that allows people to fully express their personality by using identifiers rooted in their native culture :) Wait until I start using Romanian words in the FLEX code (of course, just kidding) * Main/SAMain.java, Analysis/PointerAnalysis/AllocationNumbering.java: 1. priniting some statistics in AllocationNumbering 2. by default, sync and calls are not instrumented (only allocations are) * Analysis/PointerAnalysis/AllocationNumbering.java, Analysis/PointerAnalysis/AllocationStatistics.java: small changes to process some benchmarks * Main/SAMain.java: Correcting the default value of INSTRUMENT_ALLOCS_STUB * Support/gjlib.jar, Main/SAMain.java, Analysis/PointerAnalysis/AllocationStatistics.java: Sorry for all the people that had trouble compiling FLEX this morning; hopefully, it should be all solved now. * Analysis/MemOpt/PreallocOpt.java, Support/gjlib.jar: new gjlib.jar + small changes in PreallocOpt * Main/MemOptMain.java, Main/PAMain.java, Main/SAMain.java: small changes * Analysis/PointerAnalysis/AllocationStatistics.java, Analysis/MemOpt/IAStatistics.java: forgotten commit 2002-12-01 salcianu * Main/MemOptMain.java, Main/SAMain.java, IR/Quads/QuadSSI.java: various changes * Analysis/PointerAnalysis/AllocationStatistics.java, Analysis/MemOpt/IAStatistics.java: more code for statistics * Analysis/MemOpt/PreallocOpt.java, Analysis/PointerAnalysis/AllocationNumbering.java, Analysis/PointerAnalysis/InstrumentAllocs.java: lots of hacking for generating statistics 2002-11-30 salcianu * Support/gjlib.jar: minot changes * Analysis/Quads/DeadCode.java, IR/Quads/Code.java, IR/Quads/QuadSSI.java: Added a new parameter to IR.Quads.Code.replace: teh map of old temps to new temps. On long term, DeadCode.optimize shoudl simply call replace, without dirrectly handling the allocation information conversion details. 2002-11-30 wbeebee * Support/gjlib.jar: Alex forgot to make a new gjlib.jar file after committing his changes to includes from GJized Harpoon Code. This broke recompiling from scratch. I'm committing the new gjlib.jar that includes Alex's changes. 2002-11-30 salcianu * Analysis/MetaMethods/FakeMetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphImpl.java: unimportant changes * Analysis/MetaMethods/SmartCallGraph.java: Make sure SmartCallGraph fully implements the CallGraph interface. * Analysis/MemOpt/AddMemoryPreallocation.java, Analysis/MemOpt/IADriver.java, Analysis/MemOpt/IncompatibilityAnalysis.java, Analysis/MemOpt/PreallocOpt.java, Main/SAMain.java: Final commits for this evening. The memory pre-allocation optimization is now known to work on JLex (the biggest program tried so far). 1. Better organization of the code to minimize the impact on SAMain (which is pretty cluttered anyway) 2. Lots of new Javadoc comments 3. Removed some unused debugging code (not all debugging code, though, as tough times awaits me!) * IR/Quads/Code.java, IR/Quads/QuadSSI.java, Analysis/Quads/DeadCode.java: 1. New method added to harpoon.IR.Quads.Code: notifyReplace(oldQuad, newQuad) When an optimization (e.g., DeadCode.optimize()) replaces a quad with another one, it should call notifyReplace such that the Code object has a chance of updating some method-wide mappings, e.g., the quad NoSSA <-> quad SSI mappings that Ovy and I need to maintain (such that we can move results between these two quad formats). Subclasses of Code should override this method with whatever code they need to maintain the consistency of their own data with respect to quad replacement. 2. DeadCode.optimize() was modified to invoke notifyReplace 3. QuadSSI overrides notifyReplace; as a consequence, it is now able to remove the dead code and avoid some spectacular program crash in the backend due to forgotten TYPECAST (apparently, all TYPECASTs should be replaced with INSTANCEOFs). 2002-11-29 salcianu * Analysis/MemOpt/PreallocOpt.java: more code for the preallocation optimization * IR/Tree/Tree.java: 1. Tree.unlink() is now public 2. unlink code has been changed to cut BOTH parent->child and child->parent links 2002-11-29 ovy * Analysis/MemOpt/IADriver.java, Analysis/MemOpt/IncompatibilityAnalysis.java: - optimization to enable us to run on the javac benchmark in reasonable time for a change - re-enabled SSI prebuild in IADriver to get timings compatible with those in the POPL paper 2002-11-29 salcianu * Main/SAMain.java, Analysis/MemOpt/AddMemoryPreallocation.java, Analysis/MemOpt/PreallocAllocationStrategy.java, Backend/PreciseC/Frame.java: New AllocationStrategy to support the memory preallocation optimization. Some other related related changes. * Analysis/MemOpt/IncompatibilityAnalysis.java: small changes in the comments * Analysis/PointerAnalysis/MyAP.java: added cope to deal with the new Alloc. Properties * Analysis/Maps/AllocationInformation.java: New method for the memory preallocation optimization getMemoryChunkField(). * Analysis/AllocationInformationMap.java, Analysis/DefaultAllocationInformation.java: Added some code to support the new addition to the AllocationProperties. * Analysis/Quads/AbstrCallGraph.java, Analysis/Quads/CachingCallGraph.java, Analysis/Quads/CallGraph.java, Analysis/Quads/CallGraphImpl.java: Small changes: - added a load_caches method to CachingCallGraph to measure the call construction time - added an optional operation getRunMethods() to the CallGraph interface * Util/Collections/WorkSet.java: making some things Serializable 2002-11-27 salcianu * Main/SAMain.java, Analysis/MemOpt/PreallocOpt.java: Set the default value of OVY_PREALLO_OPT to false. * Analysis/MemOpt/PreallocOpt.java: Commented out some code to allow FLEX to compile. * Analysis/MemOpt/PreallocOpt.java: New class: code for the static preallocation optimization (using Ovy's IncompatibilityAnalysis). More to come. * Main/MemOptMain.java, Main/PAMain.java, Main/SAMain.java, Main/Sizer.java: Various small changes. Among other things, all the root set creation code has been taken out of the huge SAMain.do_it method and put into a separated method. It would be good to do the same thing with the rest of do_it (it's really TOO big!). Also added OVY_PREALLOC_OPT flag and code to call the static preallocation optimization enabled by Ovy's analysis. * Analysis/PointerAnalysis/ComputeInterProcMuClosure.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/LightPAEdgeSet.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/Matching.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java: Forgotten commit: small modifications in the Pointer Analysis code. 2002-11-25 wbeebee * Analysis/Realtime/QuantaChecker.java, Analysis/Realtime/Realtime.java: Added support for preemptive and non-preemptive scheduling. 2002-10-11 wbeebee * Analysis/Realtime/realtime-method.properties: Runtime calls a few more methods for RTJ now... 2002-10-09 wbeebee * bin/build-precisec: Set up so that HOST_PREFIX="arm-linux-" is all you need for build-precisec to use the correct cross-compiler. 2002-10-09 salcianu * Main/SAMain.java: The infamous "alexhack" is gone! 2002-10-04 salcianu * Main/MemOptMain.java: removed some dead code * Analysis/PointerAnalysis/AllocationNumbering.java, Analysis/PointerAnalysis/InstrumentAllocs.java: adding some comments * Analysis/Realtime/Realtime.java, Analysis/Realtime/RealtimeRuntime.java: inessential, formatting changes 2002-09-29 wbeebee * Analysis/Quads/ArrayCopyInliner.java: Now inlines all methods beginning with arraycopy, like arraycopy_backwards... 2002-09-27 wbeebee * Analysis/Quads/ArrayCopyInliner.java: Wasn't actually inlining arraycopy's.... this one does. And if someone else names something arraycopy - it gets inlined too. 2002-09-27 C. Scott Ananian * Analysis/SizeOpt/BitWidthAnalysis.java: Weird bug found by Wes in size optimizations as applied to java.awt.event.FocusEvent.paramString() when compiling the StringGrid JacORB client: occasionally we'd identify a field as definitely initialized, and then the class supposed to do the definite initialization would end up uninstantiated. So all the GETs waiting to see what the field would end up becoming languish and Bad Things Happen. Now we add a little check at the end of the analysis for uninitialized definitely-initialized fields and set them to *some* value so that the analysis can complete. The next QuadClassHierarchy analysis done will then pick up on the fact that no constructors for these classes are ever called and make all of the virtual methods of the classes unreachable. If you really wanted, you could then iterate the Bitwidth optimizations with the new information about uncallable methods --- the only way to avoid the iteration is by doing classhierarchy analysis concurrent with the bitwidth analysis, and the bitwidth analysis is hairy enough as it is! Cliff Click's thesis work addressed this work of problem. And now he's working for Sun on their server JVM. Coincidence? Yes. 2002-09-26 C. Scott Ananian * Main/SAMain.java: Tweak this to keep all the inline-arraycopy'ing together in one place. 2002-09-26 wbeebee * Main/SAMain.java: Inline arraycopies with the -Dharpoon.inline.arraycopy=true option... 2002-09-25 C. Scott Ananian * Backend/Runtime1/sunjdk.init-safe.properties: Who was I kidding? Thread.start() isn't init-safe! [This was added in revision 1.3 of init-safe.properties, apparently to make the JacORB clients compile. I'm about to fix this issue 'for real'.] 2002-09-24 wbeebee * Backend/Runtime1/ROOTS-README: A discussion of roots and what they mean... * Backend/Runtime1/class-root.properties: Needed a comment - so [Ljava.lang.ClassLoader; comes from jikes compiling ClassLoader.class. * Backend/Runtime1/class-root.properties: [Ljava/lang/Classloader is needed for Classpath 2002-09-24 C. Scott Ananian * Backend/Runtime1/init-safe.properties: init-safe properties for java.lang.Thread were still those left over from sunjdk. Properly updated them for GNU classpath based on our (now complete) implementation of Thread.java's native methods. * Backend/Runtime1/init-safe.properties: Revert part of previous commit. I decided that pretending runFinalization() was safe was a bad idea. We now have a runFinalization$$initcheck() method which warns and dies instead. Also, the Runtime.insertSystemProperties hack was just plain wrong. This was a bug in Classpath, not our bug. * bin/run-java: Allow specification of CLASSPATH_HOME in the environment to override the classpath-config script. This lets you more easily use CVS pulls of GNU classpath. 2002-09-24 wbeebee * Backend/Runtime1/init-safe.properties: Lots of java.io.ObjectInputStream is actually init-safe. Runtime.insertSystemProperties is not init-safe though, since being init-safe would involve it in an initialization cycle that actually isn't OK (as opposed to the initialization cycles that are OK that are specifically allowed by the JLS and break any attempts to statically eliminate this possibly non-deterministic source of runtime errors.) Runtime.runFinalization is most certainly not init-safe, but we'll pretend it's safe because we can't easily figure out what it might depend on -> and, well, if you're finalizers can't handle a somewhat broken (and possibly uninitialized) world, it's your own fault. Realize, though that this means another source of runtime errors for programs which depend on finalization. java.net.PlainSocketImpl.available is init-safe - and maybe we might get around to actually implementing it the right way (as opposed to always returning a zero). Thread.nativeInit, nativeSetPriority, and sleep are also all init-safe. * Support/jacorb-root-set, Support/jacorb-root-set-sunjdk: jacorb-root-set is different depending on whether you use Classpath or the SunJDK. @RENAME: jacorb-root-set jacorb-root-set-sunjdk@ * Support/jacorb-root-set-classpath: jacorb-root-set is different depending on whether you use Classpath or the SunJDK. @SPLIT: jacorb-root-set jacorb-root-set-classpath@ 2002-09-21 C. Scott Ananian * IR/Quads/Translate.java: Bug fix for the 'missing HANDLER' bug exposed by the com.sun.media.jai.util.Service class. Thanks to Wes for rediscovering this bug, which I'd lost the test case for. And my new fix makes more sense than my old fix, so all's well that ends well. Basically, fixupHandlers() was calling s.recordHandlers() with a bogus State object, and it was coming back to haunt it. Now we store a valid State with the PHI, and all's well. Added some new toString() methods for debugging, too. 2002-09-19 wbeebee * Analysis/AbstractClassFixupRelinker.java: Ditching extraneous output. 2002-09-19 C. Scott Ananian * IR/Bytecode/OpMethod.java: jikes v1.16 has decided to start invoking methods of arrays directly, which broke some of our bytecode-parsing code. However, it seems that JLS 10.7 supports them, even though it is obvious that the bytecode format was never designed for this --- so we'll go ahead and play along with jikes for the moment. 2002-09-13 wbeebee * Analysis/Quads/ArrayCopyInliner.java, Analysis/Quads/SmallMethodInliner.java: Whoops - forgot where IntMap was... * Analysis/Quads/ArrayCopyInliner.java, Analysis/Quads/SmallMethodInliner.java: Modified SmallMethodInliner to support overriding the score function and created ArrayCopyInliner to ensure that arraycopy's were inlined. 2002-09-10 wbeebee * Analysis/AbstractClassFixupRelinker.java: Bug: forDescriptor -> fixup causes infinite recursion on forDescriptor Scott fix: fixup after forDescriptor has returned to top level. This is OK because we don't care about fixup until class emit time - at which time everything's in the cache anyway. 2002-09-10 C. Scott Ananian * Analysis/AbstractClassFixupRelinker.java: Whoops -- committed AbstractClassFixupRelinker with some tweaks to the comments lying unsaved in a hidden emacs window. This commit just updates the documentation to explain our rationale better. * Analysis/AbstractClassFixupRelinker.java: Be more aggressive in fixing up classes mentioned in other classes. This seems to prevent us from delaying the fixup until the "worst possible time", i.e. when FLEX is in the middle of changing class and method signatures during some transformation. The specific bug I was seeing (that this commit fixes) had to do with the unused and uncompiled class java.awt.RenderingHints being "fixed up" in the middle of InitializerTransform when HClass.getMutator() was called on java.awt.Component. Component had a *field* of type RenderingHints which got 'relinked' during the creation of the mutator; this caused RenderingHints to be 'fixed up' at a point *after* the split of Map.entrySet() to Map.entrySet$$initcheck(). Since RenderingHints was not only uninstantiated, but unreferenced in compiled code (I think the Component class containing the RenderingHints field was uninstantiable in this program), the MethodSplitter of course did not split RenderingHints.entrySet() to RenderingHints.entrySet$$initcheck (MethodSplitter didn't even know about RenderingHints because it didn't show up anywhere in the ClassHierarchy). Because RenderingHints didn't contain the RenderingHints.entrySet$$initcheck method needed to implement the (already split) Map.entrySet$$initcheck interface method, AbstractClassFixupRelinker was dying on an assertion. Changing to a more aggressive strategy ensures that RenderingHints is fixed up *before* InitializerTransform is run, bypassing the whole problem. * Backend/Runtime1/method-root.properties: Add NoSuchFieldException and NoSuchMethodException, which are thrown by the native implementations of Class.getField(), Class.getMethod(), and Class.getConstructor(). * Main/SAMain.java, IR/LowQuad/Translate.java, Analysis/Quads/Virtualize.java, Support/gjlib.jar, gj-files: Bug-fix for dangling symbols when building with GNU classpath. java.security.CodeSource referenced the final method java.net.URL.hashCode (there were similar references to java.net.URL.equals); however, java.net.URL was never instantiated by the code, so the QuadClassHierarchy correctly inferred that java.net.URL.hashCode was uncallable. The harpoon.IR.LowQuad.Translate class converted the virtual call to URL.hashCode() to a non-virtual call because URL.hashCode() was final. However, this non-virtual call leaves a dangling reference to a method which will never be compiled. The correct thing to do is to avoid non-virtualizing uncallable methods; this is what harpoon.Analysis.Quads.Nonvirtualize does, for example. But harpoon.IR.LowQuad.Translate isn't really smart enough to do this itself; it doesn't know anything about class hierarchies or callable methods and I'd like to keep it that way. So I've just disabled the "smart" non-virtualization in LowQuad.Translate, and added another invocation of Analysis.Quads.Nonvirtualize in the factory chain just before the conversion to low-quad. This means that our end-result will be the same (actually, maybe slightly better). There's a parallel case having to do with explicit non-virtual references in input bytecode to methods later found uncallable (i.e. references that were non-virtual from the start, as opposed to virtual references that we've made non-virtual at some point). The new Virtualize pass takes care of these, even though I haven't actually come across this problem in the bytecode inputs we're seeing at the moment. Also updated gj-files and Support/gjlib.jar with the new GJ code (the Virtualize pass). * Support/cpvm.jar, Support/reflect-thunk.jar, bin/run-java: Improve GNU Classpath support in bin/run-java: now uses classpath-config, if available, to locate the GNU Classpath glibj.zip file, and uses the versions of reflect-thunk.jar and cpvm.jar from RUNTIME_DIR, if possible (otherwise it looks for these in Support). Added up-to-date versions of reflect-thunk.jar and cpvm.jar to Support to better enable Runtime-less compilation. * Backend/Runtime1/init-safe.properties, Backend/Runtime1/method-root.properties: Tweak the init-safe and method-root properties to get 'Hello, world' to run on GNU classpath. If the size of the arrays in gnu.java.io.decode.Decoder8859_1/gnu.java.io.encode.Encoder8859_1 get to be a problem, you could always use your own (different) default encoding. Look at gnu.java.io.EncodingManager. 2002-09-09 C. Scott Ananian * Backend/Runtime1/method-root.properties: Valid method root set for GNU classpath. 2002-09-08 C. Scott Ananian * Backend/Runtime1/init-safe.properties: More classpath init-safe properties hacking: ClassLoader has no native methods; using a pure-java implementation of printStackTrace(), and nativeGetLibname, nativeLoad, and insertSystemProperties in java.lang.Runtime are safe. * Backend/Runtime1/init-safe.properties: Added init-safe entries for VMClassLoader and VMSecurityManager. * Backend/Runtime1/DataReflection1.java, Backend/Runtime1/init-safe.properties: Update init-safe properties and DataReflection1 table generation to correspond with the newly-minted implementation of java.lang.Class for GNU classpath. 2002-09-06 C. Scott Ananian * Support/reflect-thunk.jar: Updated reflect-thunk.jar with the recent changes to Runtime/src/java.lang.reflect --- primarily, Method/Field/Constructor were made subclasses of AccessibleObject. * Backend/Runtime1/class-root.properties, Backend/Runtime1/init-safe.properties: Add class root properties for GNU classpath. Fix some problems with the init-safe properties for classpath: a missing newline, and some method name ambiguity problems that required adding signature information. * ClassFile/Linker.java: Make the cause of parsing errors more obvious. * Backend/Runtime1/init-safe.properties: Initial set of init-safe properties for Classpath, verified against its native implementations. 2002-09-06 wbeebee * Analysis/Realtime/Realtime.java: Now CheckQuanta no longer needs to be called to support thread switching. This has a (small) performance benefit, reduces the size of instrumented methods, doesn't guarantee thread progress, but provides support for C threads as well as Java threads. scheduleID is used to schedule a C thread as opposed to a Java thread. C threads obey the convention of having negative UID's, which Java threads have positive UID's. This way, the RTJ scheduler can schedule RealtimeThreads with real-time constraints with a higher priority than C threads that do not have such constraints unless the C thread explicitly informs the RTJ scheduler otherwise. Soon, C threads will use a completely POSIX-compliant interface (enabling snarfing multithreaded native code for use in RTJ-enabled real-time systems). 2002-09-05 C. Scott Ananian * GNUmakefile: Hmm... the buggy bash version is more buggy than I thought --- surrounding the offending command in an 'if' doesn't help, because it dies w/ a syntax error on the contents of the if even if the body of the if is never executed. So here's another way to workaround the problem. 2002-09-05 wbeebee * Support/realtime.jar: Removing realtime.jar. 2002-09-04 C. Scott Ananian * bin/run-java: Change canonical location of realtime.jar: ${REALTIME_DIR}/realtime.jar (which defaults to ~/Harpoon/Realtime/realtime.jar). Remove Support/realtime.jar. This pre-built file is available from the flex web page if it is needed (otherwise just check out Realtime and run make). * Support/gjlib.jar: Support/gjlib.jar appeared to be out-dated; in particular the compiled version of harpoon.ClassFile.HCode was out-of-date. * GNUmakefile: Oops: last commit broke the build, due to an overly-long command line. This should fix it. 2002-09-03 wbeebee * bin/find-flex-dir: Create a REALTIME_DIR environment variable. 2002-09-03 C. Scott Ananian * GNUmakefile: Work around broken versions of bash, which can't deal with 'for' statements with no elements in the list. * Analysis/SizeOpt/MZFExternalize.java: Remove use of deprecated HCode.getElements() in MZFExternalize. * Analysis/SizeOpt/MZFChooser.java, Analysis/SizeOpt/MZFCompressor.java, Analysis/SizeOpt/MZFWidenType.java: Change the type of the interface from using Integer to Number to hide implementation details. * IR/Tree/Code.java, IR/Quads/Code.java, IR/Bytecode/Code.java, ClassFile/HCode.java: Completely remove the deprecated 'getElementsE()' method of HCode, thanks to Wes' deprecation-reduction work. Also remove getElementsI() in harpoon.IR.Bytecode.Code, which now duplicates code in the superclass. Add deprecation tages to Quads.Code.getElements() and Tree.Code.getElements(), which were causing the @deprecation tag in HCode.getElements() to be overruled in many cases. This exposes many more uses of getElements(), unfortunately --- maybe this method shouldn't be deprecated after all? * Util/Graph.java, Main/TypesMain.java, IR/Quads/ReHandlerToSSA.java, IR/Bytecode/Code.java, Analysis/TypeInference/IntraProc.java, Analysis/SizeOpt/FieldReducer.java, Analysis/SizeOpt/MZFCompressor.java, Analysis/SizeOpt/MZFWidenType.java, Analysis/SizeOpt/MostlyZeroFinder.java, Analysis/SizeOpt/SizeCounters.java, Analysis/Quads/SCC/SCCOptimize.java: The other half of Wes' "reduce deprecation" patch; modified to use SnapshotIterators where necessary. * Support/gjlib.jar, gj-files, Analysis/Quads/ComponentOfReducer.java, Analysis/Quads/MemoryOptimization.java, Analysis/Quads/MethodTraceFactory.java, Analysis/Quads/Nonvirtualize.java, Analysis/Counters/EpilogMutator.java, Analysis/Counters/RuntimeMethodCloner.java: GJ-ize and reduce deprecation in: harpoon.Analysis.Counters.EpilogMutator harpoon.Analysis.Counters.RuntimeMethodCloner harpoon.Analysis.Quads.ComponentOfReducer harpoon.Analysis.Quads.MemoryOptimization harpoon.Analysis.Quads.MethodTraceFactory harpoon.Analysis.Quads.Nonvirtualize.java This is based on wbeebee's original 'reduce deprecation' patch; note however the use of SnapshotIterator, necessary to preserve correctness. * Analysis/SizeOpt/Field2Method.java, Analysis/SizeOpt/FieldReducer.java, Analysis/SizeOpt/MZFChooser.java, Analysis/SizeOpt/MZFCompressor.java, Analysis/SizeOpt/MZFExternalize.java, Analysis/SizeOpt/MZFWidenType.java, Analysis/SizeOpt/MostlyZeroFinder.java, Analysis/SizeOpt/SizeCounters.java, Support/gjlib.jar, Util/Default.java, gj-files: GJ-ize the harpoon.Analysis.SizeOpt package. This required exposing the PairList class of harpoon.Util.Default; not sure if this was a good or bad choice, in retrospect. The types are more precise & informative, sure, but I'm not convinced they are more *useful*. 2002-09-02 C. Scott Ananian * Analysis/Maps/AllocationInformation.java, Analysis/Maps/ConstMap.java, Analysis/Maps/ConstMapProxy.java, Analysis/Maps/DefaultMap.java, Analysis/Maps/Derivation.java, Analysis/Maps/ExactTypeMap.java, Analysis/Maps/ExactTypeMapProxy.java, Analysis/Maps/ExecMap.java, Analysis/Maps/ExecMapProxy.java, Analysis/Maps/MapProxy.java, Analysis/Maps/TypeMap.java, Analysis/Maps/TypeMapProxy.java, Analysis/Maps/UseDefMap.java, Support/gjlib.jar, gj-files: GJ-ize the harpoon.Analysis.Maps package & rebuild Support/gjlib.jar. 2002-09-01 C. Scott Ananian * IR/Tree/Code.java, IR/Tree/TreeCode.java, IR/Quads/Code.java, IR/Quads/Quad.java, IR/Quads/QuadNoSSA.java, IR/Quads/QuadRSSx.java, IR/Quads/QuadSSA.java, IR/Quads/QuadSSI.java, IR/Quads/QuadWithTry.java, ClassFile/HCode.java, ClassFile/HCodeAndMaps.java, Support/gjlib.jar, Analysis/Transformation/MethodMutator.java, gj-files: 1) GJ-ized HCodeAndMaps. 2) Changed signature of HCode.clone() to return parameterized HCodeAndMaps. 3) Changed classes in IR/Quads and IR/Tree to implement this new signature. Ended up further GJ-izing Quad.java, Tree/Code.java. 4) Used parameterized HCodeAndMaps to parameterize MethodMutator. 5) Rebuilt Support/gjlib.jar with these changes. * Temp/CloningTempMap.java, gj-files: GJ-ized CloningTempMap. * IR/Quads/HANDLER.java, IR/Quads/PHI.java, Analysis/Quads/AbstrCallGraph.java, Analysis/Quads/CallGraphImpl.java: GJ-ized several classes, removing 'unchecked cast' warnings. 2002-08-30 C. Scott Ananian * GNUmakefile: Bug-fix to keep 'make jar' from building the jar file *twice*. (Once for the Harpoon.jar target, and once for the Harpoon.jar.TIMESTAMP target.) * Analysis/Realtime/CheckAdder.java, Analysis/Realtime/ClassReplacer.java, Analysis/Realtime/QuantaChecker.java: Fix bugs introduced by Wes' commit on Wed, 14 Aug 2002 16:51:51. He was trying to reduce the use of deprecated methods, but his changes could cause illegal concurrent modification of the HCode by the visitor during iteration. Thanks to Patrick for pointing me to the 'snapshot' vocabulary which I've used in my fix. Moral: beware 'trivial' changes! * ClassFile/HCode.java: Note that the getElementsL() method of HCode does not necessarily give a snapshot view (unlike getElements(), whose interface dictates it must). * IR/Tree/TreeFactory.java, IR/Tree/Code.java, IR/Tree/Data.java, IR/Tree/Tree.java, IR/Quads/Code.java, IR/Quads/Quad.java, IR/Assem/Code.java, IR/Assem/Instr.java, Support/gjlib.jar: Make iterators returned by getElementsI() fail-fast under concurrent modification. (Note that there is no way to modify the underlying representation for harpoon.IR.Bytecode.Code, so that iterator doesn't need to be fail-fast.) Also update Support/gjlib.jar w/ these changes, as we've added fields and whatnot. Now incorrect substitutions of getElementsI() for getElements() in cases where element mutation is done during the iteration should be detected and a ConcurrentModificationException thrown. (Previously, the iterator would get confused, perhaps silently.) * Util/Collections/ReverseIterator.java, Util/Collections/SnapshotIterator.java, gj-files: As per Patrick's advice, create a 'SnapshotIterator' class which can be used when we want to mutate a collection underneath an iterator without the iterator noticing. So the old: Quad[] ql = (Quad[]) hc.getElements(); for (int i=0; i it=new SnapshotIterator(hc.getElementsI()); it.hasNext(); ) it.next().accept(visitor); Note that this transformation is *not* safe without the construction of the SnapshotIterator, as the iterator returned by hc.getElementsI() will get *very* confused if your visitor starts modifying elements underneath it. The next commit will make the iterator "fail-fast" (see http://java.sun.com/docs/books/tutorial/collections/implementations/general.html ) so that bugs of this sort are detected. Also modified ReverseIterator so that it extends SnapshotIterator and does not duplicate code. * IR/Bytecode/Code.java: Remove unnecessary definitions of getElements() and getElementsE(); use the superclass's implementation instead (which also has better javadoc). * Util/ArrayIterator.java, Util/Default.java, Util/EnumerationIterator.java, Util/FilterIterator.java, Support/gjlib.jar: Missed a few changes necessary for the Util->Util.Collections move; packages in harpoon.Util which used the moved classes now need import statements. Committed a Support/gjlib.jar which contains the updates. * Util/Collections/BinaryHeap.java, Util/Collections/BinomialHeap.java, Util/Collections/DisjointSet.java, Util/Collections/FibonacciHeap.java, Util/Collections/PersistentMap.java, Util/Collections/PersistentSet.java, IR/Tree/Code.java, IR/Tree/ExpList.java, IR/Quads/Code.java, IR/Quads/HANDLER.java, IR/Quads/HandlerSet.java, IR/Quads/Translate.java, IR/Properties/CFGrapher.java, IR/Assem/Code.java, IR/Assem/Instr.java, IR/Assem/InstrLABEL.java, Backend/StrongARM/AccelRFInfo.java, Backend/Analysis/ClassFieldMap.java, Backend/PreciseC/TreeToC.java, Analysis/Quads/ArrayUnroller.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/AppelRegAlloc.java, Analysis/Instr/AppelRegAllocClasses.java, Analysis/GraphColoring/AbstractGraph.java, Analysis/GraphColoring/SparseGraph.java, Analysis/DataFlow/CachingLiveTemps.java, Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/SpaceHeavyLiveTemps.java, IR/Bytecode/Liveness.java, ClassFile/Loader.java, Analysis/BasicBlock.java, Analysis/CycleEq.java, Analysis/EdgesIterator.java, Analysis/FCFGBasicBlock.java, Analysis/SESE.java, gj-files: Necessary code updates to reflect the move of ReverseIterator, ReverseListIterator, UnmodifiableIterator and UnmodifiableListIterator to the harpoon.Util.Collections package. Also updates the entries in gj-files. Support/gjlib.jar should be updated as well, but I'm going to do a single update later to account for several changes I'm about to check in. * Util/Collections/ReverseIterator.java, Util/Collections/ReverseListIterator.java, Util/Collections/UnmodifiableIterator.java, Util/Collections/UnmodifiableListIterator.java, Util/ReverseIterator.java, Util/ReverseListIterator.java, Util/UnmodifiableIterator.java, Util/UnmodifiableListIterator.java: Moved ReverseIterator, ReverseListIterator, UnmodifiableIterator, and UnmodifiableListIterator to harpoon.Collections.Util package (from harpoon.Util package). @RENAME: Util Util/Collections@ 2002-08-14 wbeebee * Analysis/Realtime/CheckAdder.java, Analysis/Realtime/ClassReplacer.java, Analysis/Realtime/QuantaChecker.java, Analysis/Realtime/ThreadToRealtimeThread.java: Reduced deprecation. Fixed ThreadToRealtimeThread/ClassReplacer -> they now actually replace Threads with RealtimeThreads. I would have found this bug earlier had we had a regression tester... * Analysis/Quads/QuadCounter.java: Updated to reduce deprecation. 2002-08-12 wbeebee * Analysis/Realtime/init-safe.properties: RTJ currently works only with Sun JDK. This will change when Classpath comes... * Analysis/Realtime/RealtimeRuntime.java, Analysis/Realtime/init-safe.properties, Analysis/Realtime/thread-method.properties: Eliminated PriorityScheduler-specific things from rootset. INCREF and DECREF should be init-safe (since RefCountArea.instance(), which is necessary to call them, satisfies all of the dependencies). Also, a bug fix in RealtimeRuntime, thanks to Scott - RTJ should now build referring to sunjdk.*.properties rather than the old *.properties. 2002-08-08 C. Scott Ananian * Main/EDMain.java, Main/EDXMain.java, Main/EventDriven.java, Main/JMain.java, Main/ODPAMain.java, Main/Options.java, Main/PAMain.java, Main/SAMain.java, Main/Sizer.java, Backend/Runtime1/Runtime.java, Analysis/MemOpt/TestMemOpt.java: Removed deprecated static runtimeCallableMethods() method from harpoon.Backend.Runtime1.Runtime for good; now all of its old users need to acquire a handle on a Frame object. Made these changes where needed. In the process, restructured co-dependent SAMain/PAMain so that the frame object is created earlier and there is a single place where backend names are parsed into the appropriate Frame objects. Added frameFromString() method to harpoon.Main.Options. 2002-08-08 wbeebee * Backend/Runtime1/Runtime.java: Nothing like maintaining deprecated code! 2002-08-08 C. Scott Ananian * Support/gjlib.jar: Updated Support/gjlib.jar to account for recent changes to Backend/Runtime1/Runtime.java (added classpath support, moved sun jdk properties files). 2002-08-07 salcianu * Main/PAMain.java: 1. Reverting last change performed on PAMain: > Fixed an obvious (?) one-character typo in Alex's PAMain code. > Alex, if you're reading this, can you verify that this is correct? One should not trust obvious things :) USE_OLD_STYLE was mainly a debug hack to allow me to play with the analysis without the code duplication introduced by the new static initializer policy. If USE_OLD_STYLE is false, it means that the new static initializer transf. has already been applied to the HCodeFactory that the analysis saw. Therefore, it is not necessary to have SAMain do it again. Two years ago, "SAMain.USE_OLD_CLINIT_STRATEGY = true" achieved this but we should probably have a more elegant NEW_CLINIT_ALREADY_DONE option in SAMain. 2. If one wants to analyze an application for which the old static initializer policy fails, then USE_OLD_STYLE must be set to "false". Therefore it's better to have "USE_OLD_STYLE = false" by default (and modify it only when debugging). Done. Anyway, PAMain prints precise messages about the static initializer policy that it uses. 2002-08-07 C. Scott Ananian * Main/PAMain.java: Update PAMain to account for the great properties file renaming. Alex should really be getting this from Runtime.resourcePath(...). 2002-08-07 andoni * Main/PAMain.java: Fixed an obvious (?) one-character typo in Alex's PAMain code. Alex, if you're reading this, can you verify that this is correct? 2002-08-06 C. Scott Ananian * Backend/Runtime1/Runtime.java: Configuration checking: make sure that we don't accidentally compile against sun's jdk and then try to link against gnu classpath, or vice-versa. Of course, you'll get a *ton* of link errors if you try this, but hopefully the 'check_with_classpath_needed' or 'check_with_sunjdk_needed' error will help resolve confusion. * Util/ParseUtil.java: Better feedback if parsing a properties file fails: we now tell you the filename, as well as the line number (not always obvious!). * bin/run-java, Backend/Runtime1/Runtime.java: The other shoe drops: changes to the build environment to allow run-java to use the GNU classpath libraries and Runtime1 to use the sunjdk-prefixed properties files. * Backend/Runtime1/class-root.properties, Backend/Runtime1/field-root.properties, Backend/Runtime1/init-safe.properties, Backend/Runtime1/method-root.properties, Backend/Runtime1/mzf-unsafe.properties, Backend/Runtime1/sunjdk.class-root.properties, Backend/Runtime1/sunjdk.field-root.properties, Backend/Runtime1/sunjdk.init-safe.properties, Backend/Runtime1/sunjdk.method-root.properties, Backend/Runtime1/sunjdk.mzf-unsafe.properties, Backend/Runtime1/sunjdk.transact-safe.properties, Backend/Runtime1/sunjdk.writebarrier-safe.properties, Backend/Runtime1/transact-safe.properties, Backend/Runtime1/writebarrier-safe.properties: Renamed all existing properties files with a sunjdk. prefix to prepare for the coming move to GNU classpath. The GNU versions of these properties will have no prefix. @RENAME: Backend/Runtime1/ Backend/Runtime1/sunjdk.@ * Backend/Runtime1/DataStrings.java: The first glimmer of GNU classpath support. * bin/build-precisec: We should surround the value of KEEP_ARCHIVE in quotes to protect against the (usual) case where it is undefined. But, surprisingly, it seems to work anyway. That's because GNU test/bash seems to be smart enough to work around this user error: CORRECT: $ if [ -z "" ]; then echo hi; fi STILL WORKS: $ if [ -z ]; then echo hi; fi Anyway, I've fixed the problem in build-precisec, even though it's not really a (visible) problem. 2002-08-05 C. Scott Ananian * IR/Quads/Prune.java: Incorrect description (reverse pre-order is not the same as post-order). But (surprisingly?) the implementation was correct. 2002-08-02 C. Scott Ananian * Analysis/Quads/SCC/SCCAnalysis.java, Analysis/SizeOpt/BitWidthAnalysis.java: Parallel changes to SCCAnalysis and BitWidthAnalysis: our evaluation of INSTANCEOF was being a little too aggressive in determining that a test was *definitely false*. (This applies also to the COMPONENTOF and TYPESWITCH quads.) If either side of the instanceof is an *interface type*, then we can't ever say the test is definitely false (unless both sides are "exact"). This was a big thinko on my part; I clearly wasn't considering interfaces at all when I wrote this code. But Alex Andoni found that we were compiling some JacORB code incorrectly, which led me to this bug. Thanks, Alex! 2002-07-31 C. Scott Ananian * bin/build-precisec: Allow using bin/build-precisec to compile without -O9 by overriding PRECISEC_CFLAGS. But we'll complain if you do, so that you don't forget that you MUST USE -O9 FOR BENCHMARKS. Use the PRECISEC_CFLAGS option like this: PRECISEC_CFLAGS= bin/build-precisec ... or PRECISEC_CFLAGS=-g bin/build-precisec ... Here are some common options compared: PRECISEC_CFLAGS= <- small binaries, fastest compile. can't debug. PRECISEC_CFLAGS=-g <- biggest binaries, fast compile. PRECISEC_CFLAGS=-O9 <- smallest binaries, slower compile. can't debug. PRECISEC_CFLAGS=-g -O9 <- big binaries, slowest compile. Wes' idea to compile some key binaries with -O9 and without is a good one, although I'm hesitant to waste *too* many cycles on this: it seems that if a regression test starts failing, a human being can manually compile with -O0 pretty easily to see if that's the reason why. 2002-07-30 C. Scott Ananian * build: Removed ./build as it was: 1) named incorrectly. Should be something like 'build-rtj'. 2) placed incorrectly. All scripts belong in the bin/ subdirectory. 3) Uses #!/bin/bash2 as the first line; bash2 is certainly not on any debian machines, and I would guess is not on any machines except the original committer's. 4) Doesn't support additional options, such as -Dfoo=bar, which are likely to be necessary to enable various obscure flex features. (The way bin/build-precisec and friends do it isn't ideal, but it's better than nothing.) I'm giving this the benefit of the doubt and assuming it's of general use and not specific to the testing framework -- commands embedded in the regression tests have no need to be short or user-friendly, since no humans ever have to type them. I've proactively removed this as I'm about to build a new distributions of FLEX to upload to the web page for Christian Hammer, and I'm trying to avoid confusing him with a script named 'build' that it may seem to him that he should run. It can be easily recovered with cd Harpoon/Code ; cvs update -r1.1 -p build and then re-committed (if necessary) under a new name in a new location with #3 (certainly) and #4 (hopefully) fixed. 2002-07-30 salcianu * Analysis/PointerAnalysis/PointerAnalysis.java: Fix a bug and make Christian Hammer happy. I was over-zealous in saving memory: on some code path that never occured in the previous uses of the Pointer Analysis, some data was prematurely deallocated (by setting the only reference to it to be null). 2002-07-30 dumi * build: A script needed by regression testing (and, in general, a good shortcut if you don't want to write long bin/build-precisec....... commands). I hope it'll not harm anything if I commit it in Code. Will be updated soon, after I figure out how to make scripts from repository do the same things as the scripts that I have only on my machine 2002-07-26 C. Scott Ananian * Backend/PreciseC/TreeToC.java: Karen's quick fix that makes our (precise-c) output 100% repeatable. 2002-07-26 wbeebee * Analysis/Realtime/realtime-method.properties: Revert! Revert! 2002-07-26 C. Scott Ananian * Backend/PreciseC/TreeToC.java: Sort the list of prototypes at the start of the c file so that output is repeatable across runs. Originally I just wrapped a TreeSet around sym2decl.values(), but this slowed the output routine down -- there are a lot of symbols and it had to allocate a tree node for each. In the version I'm committing here I've converted the set to a String[] to do the sorting, to keep things fast. I don't have any empirical evidence to prove that the speed difference matters. But I did it just the same. =) 2002-07-26 wbeebee * Analysis/Realtime/realtime-method.properties: Forgot a root for RTJ TCK. 2002-07-26 C. Scott Ananian * Util/HClassUtil.java: HClass.commonParent() was missing a case: merging two primitive arrays is *possible*: int[] and float[] yield Object; float[][] and double[][] yield Object[], etc. Alex Andoni found this bug, which showed up when compiling the class harpoon.Runtime.ArrayCopy. 2002-07-23 C. Scott Ananian * Support/gjlib.jar: Fix the build-from-scratch problems. Y'all can remove your .ignore files now. 2002-07-22 C. Scott Ananian * Analysis/Quads/SCC/SCCAnalysis.java, Analysis/SizeOpt/BitWidthAnalysis.java: Bug fix in SCC analysis/optimization. SCCAnalysis (and its parallel, SizeOpt.BitWidthAnalysis) was not properly accounting for flips in the sign bit caused by overflow. For example, if you take an integer with range 0-255 and cast it to a byte, the new range is *not* 0-127, because the "overflow" bit 8 flips the sign. The new range should be -128-127. This was a systemic oversight in the analysis; I didn't account for sign flips during adds/multiplies/etc either. DIV/REM are still unaccounted for; I'm not sure if sign flips can happen during overflow on division-type operations. Alex Andoni found this bug in the optimized version of java.text.Utility.RLEStringToByteArray(). Thanks, Alex! 2002-07-18 kkz * Backend/Runtime1/TreeBuilder.java, Analysis/PreciseGC/DynamicWBInserter.java, Analysis/PreciseGC/DynamicWBTreePass.java, Analysis/PreciseGC/PointsToQuadVisitor.java: New files for dynamic write barrier support. Added to Backend/Runtime1/TreeBuilder method for generating tree form for directly clearing next to low bit of hashcode field. 2002-07-18 C. Scott Ananian * Analysis/Quads/DeadCode.java: Fix bug in DeadCode where removed useless quads were being re-added to the worklist and revisited (because they used temps and thus were mentioned in the useMap). Revisiting a deleted CJMP was causing us to die horribly trying to remove a non-existent edge to a PHI. Alex Andoni found this bug; much obliged. We now use an InvertibleMultiMap for the useMap and remove all entries in useMap corresponding to deleted quads at the time the quad is removed. InvertibleMultiMaps can be very very handy sometimes. 2002-07-18 wbeebee * Analysis/Realtime/thread-method.properties: Scheduler.getDefaultScheduler() should be used for initialization, not PriorityScheduler.getScheduler() - to conform to the new spec. 2002-07-17 wbeebee * Analysis/Realtime/rtjperf-method.properties: I would ideally like to eliminate all dependencies on java.util.Date, since that includes the locale-root-set, which takes forever to compile and sometimes runs out of stack space - but it looks like the spec for javax.realtime.AbsoluteTime has methods that return a java.util.Date - so anything that touches AbsoluteTime is going to need locale-root-set. 2002-07-16 C. Scott Ananian * IR/Quads/Quad.java: Removed explicit recursion from copyone(), because Sun's jvm crashes if the stack gets too deep. * IR/Quads/Prune.java: Sharply reduce the amount of stack space required by IR/Quads/Prune: instead of needing a frame for every quad in the method (which runs out of stack space for Very Large methods), we now need frames sufficient for the # of quads in the largest basic block. This will (hopefully) keep us from running out of stack space when compiling realtime-java code to which Wes has added all manner of checks. 2002-07-16 wbeebee * Analysis/Realtime/RealtimeAllocationStrategy.java: Remember that SEGMENT.STRING_CONSTANTS are for string objects to be interned only - SEGMENT.TEXT is more appropriate for char* like strings. It seems to me that this bug bit me before, the day my MEng thesis was due - debugged once again with the help of that famous cananian 2002-07-16 C. Scott Ananian * Analysis/Transformation/MethodSplitter.java: Karen discovered that MethodSplitter rather doesn't like it if you ask convert() for a split version of a method before you've asked for the original version. This small patch should fix matters. * Support/gjlib.jar: Committing updated gjlib.jar. Not sure it's necessary, but RealtimeRuntime changed and it's better safe than sorry. 2002-07-15 wbeebee * Analysis/Realtime/RealtimeRuntime.java, Analysis/Realtime/init-safe.properties, Support/realtime.jar: RTJPerf contains an init-safe native method call. (no initCheck required) 2002-07-12 C. Scott Ananian * Tools/Annotation/Lex/Lexer.java, Tools/Annotation/Java12.cup: Import java 1.5 grammar and extend our source annotation tool so that we can annotate java 1.4+GJ sources. An updated srcdoc will be on the FLEX web site in the morning. [Use wdiff to verify the parallel to the java 1.5 grammar distributed with CUP.] 2002-07-11 C. Scott Ananian * Tools/Annotation/Lex/FIFO.java: Use standard JDK1.4 'assert' statement instead of home-spun ASSERT() method in FIFO class imported with java 1.5 lexer. * bin/cvsblame.pl: Fix infinite loop in cvsblame.pl script when tag mentioned in commit message is not actually present in the file. * Tools/Annotation/Lex/FIFO.java, Tools/Annotation/Lex/Lexer.java, Tools/Annotation/Java12.cup: Update source-annotation lexer to latest Java 1.5 lexer distributed with CUP. [Note that parser still handles Java 1.4 only.] * GNUmakefile: Old linux kernels (2.2.x?) had trouble with the very long command-lines which our new faster 'make java' rule was giving to /bin/sh. Work around this by testing whether there are any files to rebuild using only the *first word* of the out-of-date files list, instead of using the whole list. [Karen found this bug.] Also added ##out-of-date## to the 'make clean' rule. This file is generated as a side-effect of 'make java' and may stick around if you abort a compile. * .cvsignore: Added a few new entries to .cvsignore to account for recent changes in the top-level makefile. Also .cvsignore'd tmp-root-set, which build-spec-foo generates. * Main/SAMain.java: Temporarily turn off JumpOptimization. It has a bug but I can't get the assertion to fail anymore. demo.grid.Server from the JacORB 1.3.30 distribution compiles to an infinite loop with JumpOptimization enabled, however. [identifying why seems to be an interesting case of the halting problem, although soluble in practice.] * Analysis/AbstractClassFixupRelinker.java, Support/gjlib.jar: Alex Andoni found a bug in AbstractClassFixupRelinker: interfaces *can* have non-interface methods; namely, they can have static initializers. Handle this case properly in AbstractClassFixupRelinker now (and check in an updated gjlib.jar for bootstrapping). 2002-07-10 C. Scott Ananian * Support/gjlib.jar: Updated Support/gjlib.jar with recent AbstractClassFixupRelinker changes. * Analysis/AbstractClassFixupRelinker.java: Add a missing GJ type to remove an 'unchecked operation' warning. * Analysis/AbstractClassFixupRelinker.java: Fix a buglet with the 'fix superclass first' recursion. * IR/Quads/Translate.java: Document a bug in IR/Quads/Translate, and add a pair of asserts to catch it. I was working on a fix for this, and then I lost the test case. So email me if you ever see these assertions fail, so that I can fix this bug properly! 2002-07-08 C. Scott Ananian * Main/SAMain.java: Turn on use of AbstractClassFixupRelinker. This relinker adds abstract method declarations in abstract classes which javac v1.4 fails to include. * Analysis/AbstractClassFixupRelinker.java, ClassFile/Linker.java, gj-files, Support/gjlib.jar: Added a Relinker subclass which automatically fixes up abstract classes so that they always define abstract methods for all the interface methods they implement. Newer versions of Sun's javac compiler don't do this anymore, but FLEX depends on it. 2002-07-07 C. Scott Ananian * GNUmakefile: dumi found a bug with my .ignore dependency. oops. the makefile didn't work if you didn't have a .ignore file. now it should work properly. 2002-07-06 wbeebee * Analysis/Realtime/rtjperf-method.properties, Support/realtime.jar: Updated properties for RTJPerf. * Analysis/Realtime/rtjperf-method.properties: Added roots for RTJPerf 2002-07-05 C. Scott Ananian * GNUmakefile: Makefile improvements: make sure files modified between start of compile and end of compile still get marked as 'out-of-date' for the next compile. [Slight race condition still, but should be much narrower than before.] Also do the right thing if .ignore changes. 2002-07-05 wbeebee * Support/realtime.jar, Analysis/Realtime/Realtime.java, Analysis/Realtime/rtjperf-method.properties: RTJPerf clock now requires extra roots! * Analysis/Realtime/thread-method.properties: Corrected method used by RTJ Thread support 2002-07-01 C. Scott Ananian * bin/run-java: realtime.jar is not (usually) present in Support/ anymore. Special-casing this one file is not the best way to do this, but after talking to Wes seems the most practical at the moment. 2002-07-01 wbeebee * Support/.cvsignore, Support/realtime.jar: Use make in the Realtime directory to generate a realtime.jar file. 2002-06-27 wbeebee * Analysis/Realtime/realtime-method.properties: Fixed rootset. * Support/realtime.jar, Main/SAMain.java, Analysis/Realtime/HeapCheckAdder.java, Analysis/Realtime/QuantaChecker.java, Analysis/Realtime/Realtime.java, Analysis/Realtime/realtime-class.properties, Analysis/Realtime/realtime-method.properties, Analysis/Realtime/stats-method.properties, Analysis/Realtime/thread-method.properties, GNUmakefile: Fixed HeapCheckAdder and QuantaChecker so that they can take CanonicalTreeCode and spit out CanonicalTreeCode. Turned off Realtime-Threads by default, can be enabled with _threads option after the -t for RTJ. Updated the RTJ rootset adder to be properties-aware. Now, roots for RTJ are listed in the appropriate properties file rather than being hard-coded in Java. * Analysis/Realtime/Realtime.java: Fixed pretty print of options for RTJ. * Support/realtime.jar, Analysis/Realtime/Realtime.java, Backend/PreciseC/Frame.java: Fixed rootset. Eliminated fake_scopes option because it was primarily there to support legacy Benchmarks which have since been fixed. Punting legacy code to simplify life. 2002-06-25 C. Scott Ananian * Backend/PreciseC/TreeToC.java: Revert cata's changes, which are complete bogus. If you notice, he adds a "\n" to a string right before a call to nl(), which adds a newline. (Lots of other "\n"s added, too.) However, he had EMIT_LINE_DIRECTIVES=true, so he was actually *asking* FLEX to make every effort to keep everything on one line so that the Java and C line numbers match up. @REVERT: 1.5 TreeToC.java@ 2002-06-25 dumi * Support/realtime.jar, Backend/PreciseC/TreeToC.java, Analysis/Realtime/QuantaChecker.java, Analysis/Realtime/Realtime.java: Commit of Cata's stuff from months of uncommited code. If things break, revert to the version before this one. 2002-06-25 kkz * Analysis/PreciseGC/WriteBarrierQuadPass.java, Runtime/PreciseGC/WriteBarrier.java: Factored out generic write barrier functionality from WriteBarrierQuadPass. Added dynamic write barrier support to WriteBarrier. * Analysis/PreciseGC/DynamicWBQuadPass.java, Analysis/PreciseGC/MRAFactory.java, Analysis/PreciseGC/WriteBarrierConstElim.java, Analysis/PreciseGC/WriteBarrierData.java, Analysis/PreciseGC/WriteBarrierInserter.java, Analysis/PreciseGC/WriteBarrierStats.java, Analysis/PreciseGC/WriteBarrierTreePass.java, Main/SAMain.java: Added DynamicWBQuadPass. Also factored out various generic write barrier functionality from MRAFactory and WriteBarrierQuadPass, and addedWriteBarrierInserter pass. * Backend/Runtime1/TreeBuilder.java, Analysis/PointerAnalysis/MyAP.java, Analysis/EventDriven/CloningVisitor.java, Analysis/Maps/AllocationInformation.java, Analysis/AllocationInformationMap.java, Analysis/DefaultAllocationInformation.java: Added property to AllocationInformation to support dynamic write barriers. 2002-06-25 wbeebee * Main/SAMain.java: A wbOptLevel of 0 indicates no write barrier support - which is whatt a multi-threaded program should have. 2002-06-18 C. Scott Ananian * Analysis/Quads/QuadClassHierarchy.java: Slightly improve QuadClassHierarchy's handling for Class, Field, and Method constants. The real trick would be to handle the Constructor.newInstance() and Method.invoke() calls intelligently, though, and we don't do that. * Support/jacorb-root-set: Use this root set to compile CORBA applications using JacORB 1.3.30. This has been tested on the JacORB demo.grid.Client, but should work for servers (including the JacORB nameserver) as well. 2002-06-11 C. Scott Ananian * Analysis/Transformation/MethodSplitter.java: Fix a bug with the InitializerTransformer's splitting of Object[].clone() methods. Basically, A[].clone() wouldn't get split because Object[].clone() is marked final, and the ClassHierarchy says that A[] is a child of Object[]. But in *real* java semantics, the superclass of A[] is *Object* and Object.clone() is not final, thus A[].clone() should be split. There may be a deeper bug here, and I'm sure this inheritance boondoggle is going to bite someone else, eventually. But this commit fixes the bug for now. * GNUmakefile: Speed up compile times by only rebuilding source files which have changed since the last compilation. Deleting the file 'out-of-date' will force everything to be rebuilt. Also, if you type 'make' when *nothing* seems to be out-of-date, we'll rebuild everything, just to be sure. Let me know if this makefile change behaves as you expect or if you find files which for some reason or another are not being properly rebuilt or are always rebuilt or some such. With this change to the makefile, build times drop (for me) from 52s user time to under 9s (i.e > 5x speedup). If you're not using JDK1.4 already, you might consider grabbing that, too, as the javac in 1.4 is pretty fast. Hope this makes your compiling experiences happier! 2002-06-10 C. Scott Ananian * Support/gjlib.jar, GNUmakefile: Add 'gj-files' to distributed harpoon.tgz; update Support/gjlib.jar. * GNUmakefile: Add precompiled Support/gjlib.jar to the source tgz bundle, as this is necessary for building FLEX w/o the Sun gj compiler. * Analysis/MemOpt/IncompatibilityAnalysis.java: Fix ovy's erroneous calls to getField(boolean) so that FLEX will compile again. * Backend/Runtime1/init-safe.properties: Added some missing init-safe methods; these were added during the process of making JacORB clients compile correctly. * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/CloningVisitor.java, Analysis/EnvBuilder/EnvBuilder.java: Remove bogus 'import harpoon.ClassFile.Relinker' statements, which are not needed at all. I'm just cleaning up dependencies here to make it easier to see what code really uses Relinker capabilities. 2002-06-08 C. Scott Ananian * Support/locale-root-set: java.text.resources.DateFormatZoneData_en_US, like java.text.resources.LocaleElements_en_US, is requested but not present in JDK1.1. So it *shouldn't* be mentioned in the locale-root-set. This is just a note for future hackers who might notice the Class.forName() call requesting these two classes. * bin/run-java: Add the classpath implementation of the java.math package to the default FLEX classpath. * GNUmakefile: Update JDKDOCLINK to jdk 1.4 (from jdk 1.2). 2002-06-06 C. Scott Ananian * Analysis/Tree/AlgebraicSimplification.java: (Finally) address a long-standing oversight: we now simplify certain unary operations on a constant, so that -(-100) is simplified to (100); similarly for the ~ operator and int-to-{byte,char,short} conversions. * Analysis/Tree/JumpOptimization.java: Fix an over-zealous assertion in the JumpOptimization code. * Backend/PreciseC/TreeToC.java: Bug-fix: negating a negative number was creating code like "--100" which was interpreted by the C lexer as a syntax error (pre-decrement of an integer constant). Simply fixed by adding a space after the negation operator to yield "- -100" in such cases --- then the lexer will no longer combine the two tokens into the pre/post decrement operator. 2002-06-05 C. Scott Ananian * Support/cpmath.jar: GNU classpath's pure-java version of the java.math package. Compiled from CVS grabbed at 10:54pm EST 2002-06-05. Java sources are included in the .jar. 2002-06-05 ovy * Main/MemOptMain.java: Changed to reflect small API change in IncompatibilityAnalysis. * Analysis/MemOpt/IADriver.java, Analysis/MemOpt/IncompatibilityAnalysis.java: Separated sample main method, added comments, code cleanups. 2002-05-11 salcianu * Analysis/MemOpt/Util.java: a little bit more debug/stat code 2002-05-11 ovy * Analysis/MemOpt/Util.java: Fixed null pointer exception due to native methods. 2002-05-11 salcianu * Analysis/MemOpt/Util.java: bug fix 2002-05-10 salcianu * Analysis/MemOpt/Util.java: reverting the last change ... * Analysis/MemOpt/Util.java, gj-files: Slight modification to Analysis.MemOpt.Util. * Analysis/MemOpt/Util.java: Finishing some stuff for Ovy. * Analysis/PointerAnalysis/Stats.java, Analysis/MemOpt/Util.java: New file: Analysis.MemOpt.Util containts some stuff to help Ovy. * Analysis/PointerAnalysis/Stats.java: Small_change 2002-05-02 salcianu * GNUmakefile: Added one command to recompile just one class. Really useful now that the addition of GJ increased the compilation time A LOT. Don't use it if you changed class interfaces. Should be removed when the makefile will be smart enough to recompile only the necessary things. * Analysis/MemOpt/IncompatibilityAnalysis.java: Small changes. * Analysis/Realtime/CheesyPACheckRemoval.java, Analysis/Realtime/PACheckRemoval.java: Modified two classes to use the new constructor for MetaCallGraphImpl * Main/EDMain.java, Main/EDXMain.java, Main/EventDriven.java, Main/MemOptMain.java, Main/ODPAMain.java, Main/PAMain.java, Main/SAMain.java, Analysis/MetaMethods/GenType.java, Analysis/MetaMethods/MetaCallGraphAbstr.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/MetaMethods/SmartCallGraph.java: 1. Modified the constructors for meta / smart call graphs: they now require a linker (in addition to their former parameters). All classes that called this constructors have been modified too. 2. Found and fixed a (quite important) bug in MetaCallGraphAbstr.java It's funny that it never occured in practice before! Isn't this amazing? Maybe someone up there really cares about me :) 3. Added some code top the meta call graph to keep track of the things that are put in collections and maps. This allows us to trim the call graph a bit. More can be done but I think the real solution is to have a real Data Polymorphic CPA-like call graph construction. 2002-05-01 kkz * GNUmakefile: Scott fixed evil bug in makefile relating to shell meta characters in .ignore file. 2002-04-25 ovy * Analysis/MemOpt/IncompatibilityAnalysis.java: Debugging code for JLex experiment. 2002-04-24 ovy * Util/BinHeapPriorityQueue.java, Analysis/MemOpt/IncompatibilityAnalysis.java: Fixed stupid bug in BinHeap PQ. IA cleanups. 2002-04-24 salcianu * ClassFile/CachingCodeFactory.java, Main/MemOptMain.java: As promised, CachingCodeFactory has been reverted to its previous behavior. * Main/MemOptMain.java, Main/SAMain.java, Analysis/MemOpt/IncompatibilityAnalysis.java, Analysis/MemOpt/MyGraphColorer.java, ClassFile/CachingCodeFactory.java: CachingCodeFactory has been slightly modified. It seems to me that when we call ccf.put(m, hcode), we don't want to clean all the underlying code factories (especially because usually the code factory used by a CachingCodeFactory is non-caching). I will create a new class that implements this behavior in shot time (<2 hours). For the time being, I simply commented out one instruction from CachingCodeFactory.put. Plenty of changes. * IR/Quads/QuadSSI.java: fix an evil bug! 2002-04-23 salcianu * Runtime/CounterSupport.java, Main/MemOptMain.java, Main/SAMain.java, Analysis/MemOpt/IncompatibilityAnalysis.java, Analysis/PointerAnalysis/AllocationNumbering.java, Analysis/PointerAnalysis/InstrumentAllocs.java: new file: MemOptMain - main file for the MemOpt project (will be merged into SAMain when it becomes mature enough) small modifications in several other files 2002-04-23 ovy * Analysis/MemOpt/IncompatibilityAnalysis.java: Added some methods to support Alex's instrumental analysis. Ovy * Analysis/MemOpt/IncompatibilityAnalysis.java, Analysis/MemOpt/MultiMapUtils.java, Analysis/MemOpt/MyGraphColorer.java, Analysis/MemOpt/SSILiveness.java: Added my MemOpt code. This is under heavy construction, so if youre not Alex, do not use. More comments and readability improvements will come after around May 10, when my thesis is due. Ovy * IR/Quads/QuadSSI.java: Made QuadSSI do the following if a static flag is set: -- keep the quadMap from SSI rename -- do not execute dead code optimization, which changes quads without keeping a mapping around. This is a short term hack which enables me to map quads from nossa to ssi. Not sure what the long term solution is, though (change DeadCode to keep mappings?) The flag is not set by default, so existing code should work fine. Ovy * Util/BinHeapPriorityQueue.java, Util/MaxPriorityQueue.java: New implementation for BinHeapPriorityQueue, supporting all binary heap operations fast (plus, it's not on crack). Extended MaxPriorityQueue to reflect the new operations. Will add comments to BinHeapPriorityQueue soon. Ovy 2002-04-21 salcianu * Analysis/PointerAnalysis/InterProcPA.java, Analysis/MetaMethods/MetaCallGraphImpl.java: Bug fix: I hope MetaCallGraphImpl supports now the SSx (x \in {A,I}) forms 2002-04-20 salcianu * Analysis/MetaMethods/MetaCallGraphImpl.java: Tentative bug fix to MetaCallGraphImpl.java 2002-04-17 salcianu * Main/PAMain.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/MetaMethods/SmartCallGraph.java: MetaCallGraphImpl (and SmartCallGraph too) should now work with QuadSSA/SSI (in addition to QuadNoSSA). They seem to work correctly. 2002-04-12 salcianu * Main/PAMain.java: Eliminated lots of unused code. * Analysis/MetaMethods/SmartCallGraph.java: Adding a convenient constructor. * Analysis/Quads/AbstrCallGraph.java, Analysis/Quads/CallGraphImpl.java: small changes 2002-04-12 C. Scott Ananian * GNUmakefile: Fixup GNUmakefile to use tar-over-ssh instead of scp for the install links, which minimizes the number of times one has to enter a password and also works around current scp breakage on lm. Also updated the 'backup' target so that it works no matter where you are and doesn't chew up (unavailable) disk space on lm. Finally, fixes the 'doc' target to actually work -- well for magic-3-1 sources, that is. Javadoc doesn't handle parameterized types yet. Removed obsolete 'oldfirst' and 'olderfirst' target. 2002-04-11 salcianu * Analysis/Quads/SSICallGraph.java, Analysis/MemOpt/ComputeAnAe.java, Analysis/MemOpt/TestMemOpt.java, Analysis/Quads/CallGraphImpl.java: Various changes. * gj-files: Some of the classes I modified use GJ. * Util/Util.java, IR/Quads/Code.java: At Scott's suggestion, I removed seelctQuads and selectCALLs from harpoon.Util.Util. An improved version of them has been placed in harpoon.IR.Quads.Code (which is indeed more appropriate). Now, you can select all the quads with a given property from a code. Here are two applications: selectCALLs - good in some call graph implementations selectAllocations - get all the [A]NEWs from a method (Karen might find this useful). 2002-04-11 C. Scott Ananian * GNUmakefile, Support/gjlib.jar: Build correctly from scratch. Also rebuild gjlib.jar to purge some locally-modified versions of class files from it. 2002-04-11 salcianu * Analysis/Quads/AbstrCallGraph.java, Analysis/Quads/CachingCallGraph.java, Analysis/Quads/CallGraph.java, Analysis/Quads/CallGraphImpl.java, Analysis/Quads/SSICallGraph.java: 1. added abstract class ABstrCallGraph to store some common code for SSICallGraph and CallGraphImpl 2. small changes in the other files 2002-04-11 C. Scott Ananian * Tools/Annotation/Lex/Keyword.java, Tools/Annotation/Lex/Lexer.java, Tools/Annotation/Java12.cup, Tools/Annotation/Main.java: Update the annotation tool to Java 1.4 (this means we now recognize the 'assert' statement). Also sync'ed it somewhat with the latest release of the CUP JavaGrammar package. The annotation tool doesn't yet work with parameterized types; that should be the next update. * IR/Quads/ASET.java, IR/Quads/CALL.java, IR/Quads/CJMP.java, IR/Quads/COMPONENTOF.java, IR/Quads/CONST.java, IR/Quads/DEBUG.java, IR/Quads/FOOTER.java, IR/Quads/GET.java, IR/Quads/HANDLER.java, IR/Quads/HEADER.java, IR/Quads/INSTANCEOF.java, IR/Quads/LABEL.java, IR/Quads/METHOD.java, IR/Quads/MONITORENTER.java, IR/Quads/MONITOREXIT.java, IR/Quads/MOVE.java, IR/Quads/NEW.java, IR/Quads/NOP.java, IR/Quads/OPER.java, IR/Quads/PHI.java, IR/Quads/Quad.java, IR/Quads/QuadValueVisitor.java, IR/Quads/RETURN.java, IR/Quads/SET.java, IR/Quads/SIGMA.java, IR/Quads/SWITCH.java, IR/Quads/THROW.java, IR/Quads/TYPECAST.java, IR/Quads/TYPESWITCH.java, IR/Quads/XI.java, IR/LowQuad/LowQuad.java, IR/LowQuad/LowQuadValueVisitor.java, IR/LowQuad/PAOFFSET.java, IR/LowQuad/PARRAY.java, IR/LowQuad/PFCONST.java, IR/LowQuad/PFIELD.java, IR/LowQuad/PFOFFSET.java, IR/LowQuad/PGET.java, IR/LowQuad/PMCONST.java, IR/LowQuad/PMETHOD.java, IR/LowQuad/PMOFFSET.java, IR/LowQuad/PSET.java, IR/Quads/AGET.java, IR/Quads/ALENGTH.java, IR/Quads/ANEW.java, IR/Quads/ARRAYINIT.java, Support/gjlib.jar: Add new QuadValueVisitor and LowQuadValueVisitor which use the magic of parameterized types to allow you to return a value from a visitor. For those of you not using GJ, just pretend the return type is 'Object' and it will work. Updated gj-files to add the ValueVisitors; also updated the bootstrap Support/gjlib.jar file. 2002-04-10 C. Scott Ananian * gj-files: Add new QuadValueVisitor and LowQuadValueVisitor which use the magic of parameterized types to allow you to return a value from a visitor. For those of you not using GJ, just pretend the return type is 'Object' and it will work. Updated gj-files to add the ValueVisitors; also updated the bootstrap Support/gjlib.jar file. * Util/Util.java, Analysis/Quads/SSICallGraph.java: Reverted the addition of some unnecessary methods to harpoon.Util.Util: I'm trying to keep the public API of FLEX as small as possible. Util is full of too much stuff as it is; it's hard enough for people to find what they're looking for. Adding more methods willy-nilly doesn't help this. If I had time, I'd go through and eliminate all the getElements()/getElementsE()/getElementsI() redundancies in FLEX, too, but unfortunately I don't. At the moment, at least. Rewrote some code in Analysis/Quads/SSICallGraph.java to show how this functionality should be achieved. Left in selectQuads and selectCALLs for now; I'm trusting that Alex will find a more appropriate place for them as soon as he's finished merging to CVS HEAD. But *please* don't use the obsolete Hashtable and Vector classes in public APIs! They have been superceded by the Map and List classes; use these instead. Since harpoon.Util.Util is compiled by GJ, I took the opportunity to add proper parameterized types to these methods, which also serves the purpose of better documenting the API. (Vector of *what*? List of *what*?) 2002-04-10 salcianu * Analysis/Quads/SSICallGraph.java: SSICallGraph implements harpoon.Analysis.Quads.CallGraph for SSI code. It is basically a wrapper around CallGraphImpl2 to hide the different calling format for CallGraphImpl2.calls(cs, rd, etm). To avoid creating ReachingDefs and ExactTypeMap multiple times, when we call it for the first time with a call site from a method hm, we analyze all the call sites from that method and cache the results. Has caching for both calls(hm) and calls(hm, cs); This way one can use the power of CallGraphImpl2 in a regular harpoon.Analysis.Quads.CallGraph (CallGraphImpl2 itself implements just harpoon.Analysis.CallGraph). * Util/Util.java: New method: convert(obj, map) returns the image of obj through map (if any) or obj (unmodified) otherwise. 2002-04-09 C. Scott Ananian * bin/migrate-assert.perl, bin/run-java, Util/TypeInference/TypeInference.java, Util/LightBasicBlocks/LightBasicBlock.java, Util/Collections/AbstractHeap.java, Util/Collections/AbstractMapEntry.java, Util/Collections/AggregateMapFactory.java, Util/Collections/AggregateSetFactory.java, Util/Collections/BinaryHeap.java, Util/Collections/BinaryTree.java, Util/Collections/BinomialHeap.java, Util/Collections/BitSetFactory.java, Util/Collections/CollectionFactory.java, Util/Collections/CollectionWrapper.java, Util/Collections/DisjointSet.java, Util/Collections/Environment.java, Util/Collections/Factories.java, Util/Collections/FibonacciHeap.java, Util/Collections/GenericInvertibleMap.java, Util/Collections/GenericInvertibleMultiMap.java, Util/Collections/GenericMultiMap.java, Util/Collections/HashEnvironment.java, Util/Collections/Heap.java, Util/Collections/IntervalTree.java, Util/Collections/InvertibleMap.java, Util/Collections/InvertibleMultiMap.java, Util/Collections/LinearMap.java, Util/Collections/LinearSet.java, Util/Collections/ListFactory.java, Util/Collections/ListWrapper.java, Util/Collections/MapFactory.java, Util/Collections/MapSet.java, Util/Collections/MapWrapper.java, Util/Collections/MultiMap.java, Util/Collections/MultiMapFactory.java, Util/Collections/MultiMapSet.java, Util/Collections/PairMapEntry.java, Util/Collections/PersistentEnvironment.java, Util/Collections/PersistentMap.java, Util/Collections/PersistentSet.java, Util/Collections/PersistentTreeNode.java, Util/Collections/RedBlackTree.java, Util/Collections/SetFactory.java, Util/Collections/SetWrapper.java, Util/Collections/UniqueStack.java, Util/Collections/UniqueVector.java, Util/Collections/UnmodifiableMultiMap.java, Util/Collections/WorkSet.java, Util/ArrayEnumerator.java, Util/ArrayFactory.java, Util/ArrayIterator.java, Util/ArraySet.java, Util/BinHeapPriorityQueue.java, Util/BinaryRelation.java, Util/BitString.java, Util/CloneableIterator.java, Util/CombineEnumerator.java, Util/CombineIterator.java, Util/Default.java, Util/EnumerationIterator.java, Util/FilterEnumerator.java, Util/FilterIterator.java, Util/Grapher.java, Util/HClassUtil.java, Util/Indexer.java, Util/IteratorEnumerator.java, Util/NullEnumerator.java, Util/ReverseEnumerator.java, Util/ReverseIterator.java, Util/ReverseListIterator.java, Util/SingletonEnumerator.java, Util/Timer.java, Util/UnmodifiableIterator.java, Util/UnmodifiableListIterator.java, Util/Util.java, Util/Worklist.java, Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Spec.java, Tools/Annotation/Java12.cup, Temp/CloningTempMap.java, Temp/Temp.java, Runtime/MZFExternalMap.java, Support/gjlib.jar, Interpret/Tree/Method.java, Interpret/Tree/ObjectRef.java, Interpret/Tree/OffsetMap32.java, Interpret/Tree/Ref.java, Interpret/Tree/StaticState.java, Main/EDMain.java, Main/EDXMain.java, Main/Javap.java, Main/Javap2.java, Main/ODPAMain.java, Main/PAMain.java, Main/SAMain.java, Interpret/Quads/ArrayRef.java, Interpret/Quads/INClass.java, Interpret/Quads/InterpretedThrowable.java, Interpret/Quads/Method.java, Interpret/Quads/ObjectRef.java, Interpret/Quads/Ref.java, Interpret/Quads/StaticState.java, Interpret/Tree/ArrayRef.java, Interpret/Tree/ClazPointer.java, Interpret/Tree/DefaultFrame.java, Interpret/Tree/InterpreterOffsetMap.java, IR/Tree/CONST.java, IR/Tree/CanonicalTreeCode.java, IR/Tree/Code.java, IR/Tree/DATUM.java, IR/Tree/Data.java, IR/Tree/DerivationGenerator.java, IR/Tree/ESEQ.java, IR/Tree/EXPR.java, IR/Tree/INVOCATION.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/METHOD.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/NATIVECALL.java, IR/Tree/OPER.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/Print.java, IR/Tree/RETURN.java, IR/Tree/SEGMENT.java, IR/Tree/SEQ.java, IR/Tree/Stm.java, IR/Tree/TEMP.java, IR/Tree/THROW.java, IR/Tree/ToCanonicalTree.java, IR/Tree/ToTree.java, IR/Tree/ToTreeHelpers.java, IR/Tree/Translation.java, IR/Tree/Tree.java, IR/Tree/TreeCode.java, IR/Tree/TreeGrapher.java, IR/Tree/TreeUseDefer.java, IR/Tree/TreeVerifyingVisitor.java, IR/Tree/UNOP.java, IR/RawClass/AccessFlags.java, IR/RawClass/Attribute.java, IR/RawClass/AttributeSignature.java, IR/Tree/ALIGN.java, IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Quads/Translate.java, IR/Quads/UnHandler.java, IR/Quads/XI.java, IR/Quads/AGET.java, IR/Quads/ALENGTH.java, IR/Quads/ANEW.java, IR/Quads/ARRAYINIT.java, IR/Quads/ASET.java, IR/Quads/CALL.java, IR/Quads/CJMP.java, IR/Quads/COMPONENTOF.java, IR/Quads/CONST.java, IR/Quads/CloneSynthesizer.java, IR/Quads/Code.java, IR/Quads/DEBUG.java, IR/Quads/Edge.java, IR/Quads/GET.java, IR/Quads/HANDLER.java, IR/Quads/HandlerSet.java, IR/Quads/INSTANCEOF.java, IR/Quads/METHOD.java, IR/Quads/MONITORENTER.java, IR/Quads/MONITOREXIT.java, IR/Quads/MOVE.java, IR/Quads/NEW.java, IR/Quads/OPER.java, IR/Quads/PHI.java, IR/Quads/Pattern.java, IR/Quads/Peephole.java, IR/Quads/Print.java, IR/Quads/Prune.java, IR/Quads/Quad.java, IR/Quads/ReHandler.java, IR/Quads/SET.java, IR/Quads/SIGMA.java, IR/Quads/SSIRename.java, IR/Quads/SSIToSSA.java, IR/Quads/SWITCH.java, IR/Quads/THROW.java, IR/Quads/TYPECAST.java, IR/Quads/TYPESWITCH.java, IR/Quads/TempChain.java, IR/Quads/ThreadInliner.java, IR/Quads/ToNoSSA.java, IR/Properties/CFGEdge.java, IR/Properties/CFGraphable.java, IR/Properties/CFGrapher.java, IR/Properties/UseDefable.java, IR/Properties/UseDefer.java, IR/LowQuad/DerivationMap.java, IR/LowQuad/LowQuadSSI.java, IR/LowQuad/PAOFFSET.java, IR/LowQuad/PCALL.java, IR/LowQuad/PCONST.java, IR/LowQuad/PFCONST.java, IR/LowQuad/PFOFFSET.java, IR/LowQuad/PGET.java, IR/LowQuad/PMCONST.java, IR/LowQuad/PMOFFSET.java, IR/LowQuad/POPER.java, IR/LowQuad/PPTR.java, IR/LowQuad/PSET.java, IR/Jasmin/Jasmin.java, IR/Bytecode/InMerge.java, IR/Bytecode/Instr.java, IR/Bytecode/Op.java, IR/Assem/Code.java, IR/Assem/Instr.java, IR/Assem/InstrEdge.java, IR/Assem/InstrFactory.java, IR/Assem/InstrGroup.java, IR/Assem/InstrLABEL.java, IR/Assem/InstrMOVE.java, ClassFile/ClassPointer.java, ClassFile/Factories.java, ClassFile/HClass.java, ClassFile/HClassArraySyn.java, ClassFile/HClassProxy.java, ClassFile/HClassSyn.java, ClassFile/HCode.java, ClassFile/HCodeEdge.java, ClassFile/HConstructor.java, ClassFile/HConstructorSyn.java, ClassFile/HField.java, ClassFile/HFieldImpl.java, ClassFile/HFieldSyn.java, ClassFile/HInitializer.java, ClassFile/HInitializerSyn.java, ClassFile/HMember.java, ClassFile/HMemberProxy.java, ClassFile/HMethod.java, ClassFile/HMethodImpl.java, ClassFile/HMethodSyn.java, ClassFile/HPointer.java, ClassFile/ImplMagic.java, ClassFile/Linker.java, ClassFile/Loader.java, ClassFile/Relinker.java, Backend/StrongARM/Code.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/CodeGen.spec.coarseInstrs, Backend/StrongARM/CodeGen.spec.instrGroups, Backend/StrongARM/InstrBuilder.java, Backend/StrongARM/RegFileInfo.java, Backend/StrongARM/TwoWordTemp.java, Backend/Sparc/Code.java, Backend/Sparc/CodeGen.spec, Backend/Sparc/RegFileInfo.java, Backend/Sparc/TempBuilder.java, Backend/RuntimeTiny/ClazNumbering.java, Backend/RuntimeTiny/CompleteClazNumbering.java, Backend/RuntimeTiny/DataClazTable.java, Backend/RuntimeTiny/FixUnaligned.java, Backend/RuntimeTiny/ObjectBuilder.java, Backend/RuntimeTiny/PreOrderClazNumbering.java, Backend/RuntimeTiny/Runtime.java, Backend/RuntimeTiny/TinyClassFieldMap.java, Backend/RuntimeTiny/TinyPackedClassFieldMap.java, Backend/RuntimeTiny/TreeBuilder.java, Backend/RuntimeTiny/package.html, Backend/Runtime2/Runtime.java, Backend/Runtime2/TreeBuilder.java, Backend/Runtime1/Data.java, Backend/Runtime1/DataClaz.java, Backend/Runtime1/DataGC.java, Backend/Runtime1/DataStaticFields.java, Backend/Runtime1/DataStrings.java, Backend/Runtime1/HeapStatsAllocationStrategy.java, Backend/Runtime1/NiftyAllocationStrategy.java, Backend/Runtime1/ObjectBuilder.java, Backend/Runtime1/Runtime.java, Backend/Runtime1/SPAllocationStrategy.java, Backend/Runtime1/TreeBuilder.java, Backend/PreciseC/Frame.java, Backend/PreciseC/IdentifyNoHandler.java, Backend/PreciseC/TreeToC.java, Backend/Maps/DefaultNameMap.java, Backend/Maps/FieldMap.java, Backend/MIPS/BypassLatchSchedule.java, Backend/MIPS/Code.java, Backend/MIPS/CodeGen.spec, Backend/MIPS/InstrBuilder.java, Backend/MIPS/RegFileInfo.java, Backend/MIPS/StackInfo.java, Backend/Generic/Code.java, Backend/Generic/CodeGen.java, Backend/Generic/GCInfo.java, Backend/Generic/InstrBuilder.java, Backend/Generic/MaxMunchCG.java, Backend/Generic/RegFileInfo.java, Backend/Generic/Runtime.java, Backend/CSAHack/RegAlloc/Color.java, Backend/CSAHack/RegAlloc/DerivationGenerator.java, Backend/CSAHack/RegAlloc/RegAlloc.java, Backend/Analysis/BasicGCInfo.java, Backend/Analysis/ClassFieldMap.java, Backend/Analysis/ClassMethodMap.java, Backend/Analysis/InitializerOrdering.java, Backend/Analysis/InsertWriteBarrier.java, Backend/Analysis/InterfaceMethodMap.java, Backend/Analysis/MakeGCThreadSafe.java, Backend/Analysis/PackedClassFieldMap.java, Backend/Analysis/SortedClassFieldMap.java, Backend/CSAHack/FlowGraph/AssemFlowGraph.java, Analysis/TypeInference/ClassCone.java, Analysis/TypeInference/IntraProc.java, Analysis/Tree/AlgebraicSimplification.java, Analysis/Tree/AlignmentAnalysis.java, Analysis/Tree/CacheEquivalence.java, Analysis/Tree/ConstantPropagation.java, Analysis/Tree/DeadCodeElimination.java, Analysis/Tree/DominatingMemoryAccess.java, Analysis/Tree/JumpOptimization.java, Analysis/Tree/MemHoisting.java, Analysis/Tree/Simplification.java, Analysis/Tree/TreeFolding.java, Analysis/Transformation/MethodMutator.java, Analysis/Transformation/MethodSplitter.java, Analysis/Transactions/AnalysisCheckOracle.java, Analysis/Transactions/ArrayCopyImplementer.java, Analysis/Transactions/BitFieldNumbering.java, Analysis/Transactions/CheckOracle.java, Analysis/Transactions/CloneImplementer.java, Analysis/Transactions/DominatingCheckOracle.java, Analysis/Transactions/SimpleCheckOracle.java, Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreePostPass.java, Analysis/SizeOpt/BitWidthAnalysis.java, Analysis/SizeOpt/ConstructorClassifier.java, Analysis/SizeOpt/Field2Method.java, Analysis/SizeOpt/FieldReducer.java, Analysis/SizeOpt/MZFChooser.java, Analysis/SizeOpt/MZFCompressor.java, Analysis/SizeOpt/MZFExternalize.java, Analysis/SizeOpt/MZFWidenType.java, Analysis/SizeOpt/MostlyZeroFinder.java, Analysis/RoleInference/LocalVariableNamer.java, Analysis/Quads/SCC/SCCAnalysis.java, Analysis/Quads/SCC/SCCOptimize.java, Analysis/Realtime/CheckAdder.java, Analysis/Realtime/CheckAdderNoSSA.java, Analysis/Realtime/CheckAdderWithTry.java, Analysis/Realtime/CheesyPACheckRemoval.java, Analysis/Realtime/ClassReplacer.java, Analysis/Realtime/PACheckRemoval.java, Analysis/Realtime/QuantaChecker.java, Analysis/Realtime/Realtime.java, Analysis/Realtime/RealtimeRuntime.java, Analysis/Realtime/Stats.java, Analysis/Realtime/ThreadToRealtimeThread.java, Analysis/PreciseGC/AllocationHoisting.java, Analysis/PreciseGC/MRAFactory.java, Analysis/PreciseGC/RCTransformer.java, Analysis/PreciseGC/WriteBarrierConstElim.java, Analysis/PreciseGC/WriteBarrierData.java, Analysis/PreciseGC/WriteBarrierPostPass.java, Analysis/PreciseGC/WriteBarrierQuadPass.java, Analysis/PreciseGC/WriteBarrierStats.java, Analysis/PreciseGC/WriteBarrierTreePass.java, Analysis/Quads/ArrayUnroller.java, Analysis/Quads/CallGraphImpl.java, Analysis/Quads/CallGraphImpl2.java, Analysis/Quads/CoalescingToNoSSA.java, Analysis/Quads/DeadCode.java, Analysis/Quads/DefiniteInitOracle.java, Analysis/Quads/DispatchTreeTransformation.java, Analysis/Quads/InitializerTransform.java, Analysis/Quads/MayReadOracle.java, Analysis/Quads/MemoryOptimization.java, Analysis/Quads/MethodInliningCodeFactory.java, Analysis/Quads/MustParamOracle.java, Analysis/Quads/NewMover.java, Analysis/Quads/QuadClassHierarchy.java, Analysis/Quads/QuadInterferenceGraph.java, Analysis/Quads/QuadLiveness.java, Analysis/Quads/SimpleConstMap.java, Analysis/Quads/TypeInfo.java, Analysis/Quads/TypeSwitchRemover.java, Analysis/Quads/Unreachable.java, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/ArtificialTempFactory.java, Analysis/PointerAnalysis/EdgesNCallees.java, Analysis/PointerAnalysis/InstrumentSyncOps.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/LightPAEdgeSet.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/MethodHole.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/ODInformation.java, Analysis/PointerAnalysis/ODInterProcPA.java, Analysis/PointerAnalysis/ODMAInfo.java, Analysis/PointerAnalysis/ODParIntGraph.java, Analysis/PointerAnalysis/ODPointerAnalysis.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/Partition/Profile.java-old, Analysis/MetaMethods/GenType.java, Analysis/MetaMethods/MetaAllCallers.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/MetaMethods/MetaMethod.java, Analysis/MemOpt/ComputeAnAe.java, Analysis/MemOpt/TestMemOpt.java, Analysis/Maps/Derivation.java, Analysis/Maps/UseDefMap.java, Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/BasicInductions.java, Analysis/LowQuad/Loop/Induction.java, Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/LowQuad/Loop/MyLowQuadNoSSA.java, Analysis/LowQuad/Loop/MyLowQuadSSI.java, Analysis/GraphColoring/OptimisticGraphColorer.java, Analysis/GraphColoring/SparseGraph.java, Analysis/Instr/AppelRegAlloc.java, Analysis/Instr/AppelRegAllocClasses.java, Analysis/Instr/AppelRegAllocFsk.java, Analysis/Instr/AppelRegAllocStd.java, Analysis/Instr/Check.java, Analysis/Instr/EqTempSets.java, Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/RegFile.java, Analysis/Instr/SpillHeuristics.java, Analysis/Instr/Verify.java, Analysis/Instr/Web.java, Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/CloningVisitor.java, Analysis/DataFlow/ReversePostOrderEnumerator.java, Analysis/DataFlow/ReversePostOrderIterator.java, Analysis/DataFlow/SpaceHeavyLiveTemps.java, Analysis/DataFlow/TreeSolver.java, Analysis/EnvBuilder/EnvBuilder.java, Analysis/Counters/EpilogMutator.java, Analysis/Counters/RuntimeMethodCloner.java, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/DataFlow/LiveTemps.java, Analysis/Counters/CounterFactory.java, Analysis/AllocationInformationMap.java, Analysis/BasicBlock.java, Analysis/BasicBlockFactoryInterf.java, Analysis/BasicBlockInterf.java, Analysis/ClassHierarchy.java, Analysis/CycleEq.java, Analysis/DefaultAllocationInformation.java, Analysis/DomTree.java, Analysis/FCFGBasicBlock.java, Analysis/InterferenceGraph.java, Analysis/Liveness.java, Analysis/PointsToAnalysis.java, Analysis/ReachingDefs.java, Analysis/ReachingDefsAltImpl.java, Analysis/ReachingDefsCachingImpl.java, Analysis/ReachingDefsImpl.java, Analysis/SESE.java, Analysis/SSxReachingDefsImpl.java, Analysis/UseDef.java, GNUmakefile, gj-files: Merge java-1-5 branch with FLEX head. @MERGE: java-1-5@ This means we're now using Java 1.4-style asserts uniformly throughout FLEX and that we're GJ-enabled. You *will* need a Java 1.4-compatible compiler (and runtime?) but you *won't* necessarily need a GJ-compiler to build FLEX. Briefly, asserts are now of the form: assert : "optional description message or object"; instead of Util.ASSERT(expression, "optional description message or object"); And most of the foundation classes now have gj types; you can use them or not. If you decide to go GJ in your class, you will need to add its filename to Harpoon/Code/gj-files and install the 1.2 prototype GJ compiler. More details are at: http://www.flex-compiler.lcs.mit.edu/Harpoon/jsr14.txt I've auto-converted asserts in all currently-checked-in code; if you've got a substantial amount of uncommitted code that you'd like converted, email me and I'll send you the convert script. * Support/CUP.jar: Having source files in the .jar seems to confuse javac. Moving the source files to a separate SRC/ directory path inside the jar seems to fix things. * Support/gjlib.jar: Whoops; last version checked in was built from modified harpoon.ClassFile.* sources. This version should be clean. * IR/Tree/Print.java: Make the PrintCallback passed to IR/Tree/Print be a PrintCallback. * Main/Javap.java, Main/Javap2.java: Add two implementations of javap-like functionality using our classfile infrastructure. harpoon.Main.Javap uses the low-level harpoon.IR.RawClass.ClassFile code, and fully support GJ signatures; harpoon.Main.Javap2 uses the higher-level harpoon.ClassFile.HClass code, and (as a consequence) doesn't (yet) emits only the 'erased' types of GJ classes. Both should work fine on non-GJ classes. * Main/Javap.java, Main/Javap2.java: New file. * Support/gjlib.jar: Improve GNUmakefile to support building even w/o GJ compiler (using pre-built Support/gjlib.jar binaries). * Support/gjlib.jar: New file. * GNUmakefile: Improve GNUmakefile to support building even w/o GJ compiler (using pre-built Support/gjlib.jar binaries). * Util/Collections/BinomialHeap.java: Workaround recursive inference bug in javac, not that we know exactly what is it. * Analysis/Instr/RegAlloc.java, Analysis/Instr/RegFile.java: Remove unnecessary 'import harpoon.Util.Collections.LinearMap' statements, since neither of these classes actually use LinearMap. Nothing does, really. * Util/Collections/DisjointSet.java, Util/Collections/Environment.java, Util/Collections/HashEnvironment.java, Util/Collections/LinearMap.java, Util/Collections/PersistentEnvironment.java, Util/Collections/PersistentMap.java, Util/Collections/PersistentSet.java, Util/Collections/PersistentTreeNode.java, gj-files: GJ-ize DisjointSet, LinearMap, Environment (and all subclasses) and PersistentTreeNode (and all classes which use it). PersistentTreeNode isolated a bug in the prototype 1.2 GJ compiler; look for 'XXX BUG IN JAVAC' to find it. The workaround code should be reverted when the bug is fixed. 2002-04-07 C. Scott Ananian * Analysis/SizeOpt/ConstructorClassifier.java: Add comment informed by writing up OOPSLA paper on this analysis. * GNUmakefile, gj-files: Add newly-GJ-ized files to the gj-files list. Makefile improvements: add gj-files as a dependency of the 'java' target. Use the $JSR14DISTR environment variable to define the path to JCC5. Add '-gj' to the JCC5 command-line, as it is needed for the 1.2 prototype compiler. * Analysis/Quads/QuadInterferenceGraph.java: GJ-ize QuadInterferenceGraph so that it conforms to the GJ-ized InterferenceGraph class. * Util/Collections/CollectionWrapper.java, Util/Collections/GenericInvertibleMap.java, Util/Collections/GenericInvertibleMultiMap.java, Util/Collections/GenericMultiMap.java, Util/Collections/LinearSet.java, Util/Collections/ListWrapper.java, Util/Collections/MapWrapper.java, Util/Collections/MultiMap.java, Util/Collections/UnmodifiableMultiMap.java, Util/Collections/WorkSet.java, Util/Default.java: Keep up with GJ prototype 1.2 changes: new signature for addAll, putAll, etc and constructors are covariant. harpoon.Util.Default has new unmodifiableCollection() method which doesn't yet work properly due to a bug in the GJ compiler; we've worked around the bug by adding an extra parameter to help the type inference engine. We also rejiggered the type signature of the Default.pair() method to allow pair elements of differing types so that we don't break as much existing code. We also narrowed the type of MultiMap.entrySet() to require a MultiMapSet as the return value. * Analysis/Instr/RegAlloc.java: GJ-ize return type of defC() so that the InstrMEM subclass within RegAlloc conforms to the GJ-ized UseDefable interface. * Util/Collections/UniqueStack.java, Util/Collections/UniqueVector.java: GJ-ize the UniqueStack and UniqueVector collections classes. * Main/EDMain.java, Main/EDXMain.java, Main/SAMain.java, IR/Assem/Code.java, IR/Assem/Instr.java, IR/Assem/InstrEdge.java, IR/Assem/InstrFactory.java, IR/Assem/InstrGroup.java, IR/Assem/InstrLABEL.java: GJ-ize the base harpoon.IR.Assem Instr IR classes. I think all the IRs are now GJ-ized. * Util/Collections/Factories.java: Update the harpoon.Util.Collections.Factories class to reflect the new covariance of the CollectionFactory classes. Also removed some now-unnecessary workarounds for 1.0 prototype GJ compiler bugs. * Util/Collections/AggregateMapFactory.java: Newly GJ-ize the harpoon.Util.Collections.AggregateMapFactory. * Util/Util.java: GJ-ize the Util.set_diff() method. * ClassFile/HCode.java: Tiny tweak to add the proper parameterized type to a nop PrintCallback instantiation. * Analysis/Transactions/AnalysisCheckOracle.java, Analysis/Transactions/DominatingCheckOracle.java, Analysis/Transactions/SimpleCheckOracle.java: Use more-specific return type for CheckSet.clone(). Newly GJ-ize DominatingCheckOracle and SimpleCheckOracle. * Analysis/Liveness.java, Analysis/Quads/QuadLiveness.java: GJ-ize the harpoon.Analysis.Liveness class and all subclasses. * Util/Collections/AbstractHeap.java, Util/Collections/BinaryHeap.java, Util/Collections/BinomialHeap.java, Util/Collections/FibonacciHeap.java, Util/Collections/Heap.java: GJ-ize the Heap classes in harpoon.Util.Collections. * Util/Collections/AggregateSetFactory.java, Util/Collections/BitSetFactory.java, Util/Collections/CollectionFactory.java, Util/Collections/ListFactory.java, Util/Collections/MapFactory.java, Util/Collections/MultiMapFactory.java, Util/Collections/SetFactory.java: Allow co-variance in the CollectionFactory classes; that is, we can create a Collection from a Collection of objects of a more restricted type. Also removes some workarounds needed for compiling with the 1.0 prototype GJ compiler---these are no longer neede with the 1.2 prototype. * Util/Collections/InvertibleMultiMap.java, Util/UnmodifiableListIterator.java, IR/Properties/CFGEdge.java, IR/Tree/TreeUseDefer.java, Analysis/BasicBlock.java, Analysis/ReachingDefsAltImpl.java, Analysis/ReachingDefsCachingImpl.java, Analysis/ReachingDefsImpl.java, Analysis/SSxReachingDefsImpl.java: Removed workarounds for bugs in the 1.0 prototype GJ compiler that are made unnecessary by the 1.2 prototype GJ compiler. 2002-04-03 salcianu * Analysis/Quads/CachingCallGraph.java, Analysis/MemOpt/ComputeAnAe.java, Analysis/MemOpt/TestMemOpt.java: 1. new class: CachingCallGraph.java is caching wrapper for CallGraph's (harpoon.Analysis.Quads.CallGraph has caching just for calls(hm), in some situations, it's good to cache calls(hm, cs) too). 2. minor changes here and there 2002-04-02 salcianu * Analysis/MemOpt/TestMemOpt.java: TestMemOpt.java is a simple class to allow Ovidiu and I to play with classes from the MemOpt package. When the project will grow more mature. We'll have a real top level class in harpoon.Main. * Analysis/MemOpt/ComputeAnAe.java: 1. new package harpoon.Analysis.MemOpt for the memory optimization for embedded system (the projected EMSOFT submission). Idea: detect a minimal number of sets of allocation sites that can share the same memory space (because no two objects allocated at sites from the same set can be live at the same time). 2. small class that computes some internal variables that Ovidiu and I require for the incompatibility detection: detecting the pairs of allocation sites that cannot share the same state. For each analyzable method m, ComputeAnAe computes: an(m) = allocation sites that may be encountered on a path that starts at the beginning of m and ends on its normal exit (the exit for RETURN). We consider transitive callees. ae(m) = same as an(m) but now we are interested in paths that end on the exceptional exit of m (the exit for unhandled THROW instructions) This computation is an easy application of the inclusion constraint solver harpoon.Util.Constraints.InclusionConstraints. * Util/Graph.java, Util/Util.java, Analysis/Quads/CallGraphImpl.java, Main/PAMain.java: Small changes. * Analysis/BasicBlockInterfVisitor.java: The visitor pattern in action, once again :) This way, one can process BasicBlock's and FCFGBasicBlock's (and future implems of BasicBlockInterf) without instanceof's. * Analysis/Tree/TreeFolding.java: Some method take a BasicBlockInterf arg now (more general that the previous BasicBlock arg). Shouldn't cause any difference. * Analysis/PreciseGC/WriteBarrierQuadPass.java: WorkSet has moved from harpoon.Util to harpoon.Util.Collections Fix the WriteBarrierQuadPass.java to reflect this. * Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java: Minor changes in the pa code. * Analysis/Instr/RegAlloc.java: Replacing BasicBlock with BasicBlockInterf. Shouldn't cause any problem. * Analysis/DataFlow/BackwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/DataFlow/ForwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/InstrSolver.java, Analysis/DataFlow/LiveVars.java, Analysis/DataFlow/ReachingDefs.java, Analysis/DataFlow/ReachingHCodeElements.java: Minor changes: some methods now take BasicBlockInterf's instead of just BasicBlock's. Shouldn't interfere with anything else. 2002-03-27 kkz * Main/SAMain.java, Backend/Runtime1/writebarrier-safe.properties, Analysis/PreciseGC/MRAFactory.java, Analysis/PreciseGC/RCTransformer.java, Analysis/PreciseGC/WriteBarrierQuadPass.java: Many changes to RC transformation, plus some experimental code for write barrier removal. Also added new compiler options to SAMain for different flavors of write barrier removal. 2002-03-27 C. Scott Ananian * Util/Collections/IntervalTree.java: Bug fix from Kim Roland Rasmussen ; including felix's email as well as rasmussen's in this commit message, because no one seems to be sure if this was actually a bug or not. On the assumption that it is, I'm committing it. If you're using this code and you notice something weird going on, you might want to have a hard look at this (and possibly revert it?). * IR/RawClass/Attribute.java, IR/RawClass/AttributeSignature.java: Add support for GJ 'Signature' attribute on classes/methods/fields. The HClass infrastructure doesn't do anything with this attribute yet, but we parse it at least. * IR/RawClass/AttributeSignature.java: New file. * IR/RawClass/AccessFlags.java: Add RawClass support for 'strictfp' modifier, introduced in Java 1.2. 2002-03-21 C. Scott Ananian * Backend/RuntimeTiny/Runtime.java: Fix formatting of pretty-print 'options' status output. * Backend/PreciseC/Frame.java, Backend/Runtime1/HeapStatsAllocationStrategy.java: Add new 'heapstats' allocation strategy, which interfaces with the --with-live-heap-statistics option of the Runtime to emit maximum live heap statistics for both object and array allocations separately. * Backend/Runtime1/HeapStatsAllocationStrategy.java: New file. * GNUmakefile: Clean up ChangeLog output by removing CVSROOT prefix on every file. 2002-03-20 C. Scott Ananian * Backend/RuntimeTiny/ObjectBuilder.java, Backend/RuntimeTiny/Runtime.java, Backend/RuntimeTiny/TinyPackedClassFieldMap.java, Backend/RuntimeTiny/TreeBuilder.java, Backend/Runtime1/Runtime.java: Add hashcode compression support to RuntineTiny. Note that the array length field is still forced to a word boundary at this point; I'll fix this at some point in the future. There are issues with Object[].length when the component pointers still need to be word-aligned. * Backend/Runtime1/TreeBuilder.java: Remove some 'final' modifiers to allow a subclass more leeway to move things around. * Backend/Runtime1/ObjectBuilder.java: Refactoring Runtime1/ObjectBuilder to better accomodate oddly-sized and shaped object headers. Also, allow the ClassFieldMap to position the length field, in preparation for (perhaps) variably-sized length fields. NOTE that the TreeBuilder uses its own idea of the ALENGTH offset (doesn't consult the ClassFieldMap) so this will have to be fixed if the ClassFieldMap ever decides to put the length in a funky place. * Backend/RuntimeTiny/TinyPackedClassFieldMap.java: The java '%' operator behaves strangely on negative numbers. Replace the fancy 'alignment' computation with a simple one which will be correct w/ negative offsets. * Runtime/MZFExternalMap.java: Fix documentation error: the named parameters appear in the wrong order here when compared to the implementation in Runtime/src/mzf and the use in Code/Analysis/SizeOpt/MZFExternalize. 2002-03-19 C. Scott Ananian * Analysis/SizeOpt/MZFWidenType.java: It's important to widen *all* methods (not just callable ones) to keep the system sane. Methods implement interfaces and extend superclasses, and the interface and superclass methods must be altered in the same way the method is if these relationships are to remain fixed. The easiest way to ensure that is to alter *all* methods in the same way. * Analysis/Quads/QuadClassHierarchy.java, Main/SAMain.java: Add mechanism to add an *instantiated* array class to the root set. Also add hack to SAMain that keeps String[] in the root set even when doing MZF splitting on String (which would tend to widen the type of the array). Note that RuntimeTiny requires this array to be in the *instantiated* class set so that its claz gets a low index during claz compression. * homeBackend/Runtime1/DataClaz.java: Add an assertion to DataClaz to help debugging. * Backend/RuntimeTiny/DataClazTable.java, Backend/StrongARM/Code.java, Analysis/Instr/AppelRegAlloc.java: Fix assertions with side-effects. These three were especially bad side-effects, too: they caused non-termination when assertions were disabled. 2002-03-18 C. Scott Ananian * Util/Collections/GenericInvertibleMultiMap.java, Util/Collections/GenericMultiMap.java, Util/Collections/MultiMap.java, Util/Collections/UnmodifiableMultiMap.java: BUG FIX: when I was adding typed to MultiMap to GJ-ize it, I inadvertently changed the running time of Map.entrySet().contains() from O(1) to O(N)! What happened is that I used the wrong type on the contains() method and so the method didn't override the base AbstractCollection.contains() implementation, which has an O(N) running-time. Yuck. Fixed, by making MultiMap.contains(key, value) and MultiMap.remove(key, value) both take Objects instead of exact key and value types. This is consistent w/ the interface of the other Map and Collection methods in the JDK API. However, it means that we can't make MultiMap implement BinaryRelation, because GJ doesn't support covariant subtyping of method parameters, sigh. Fixing this bug should make the BitwidthAnalysis run *much* faster. * bin/run-java: Move the '-ea' to the JAVA definition so that JAVA=jdb debugging still works. 2002-03-16 C. Scott Ananian * Analysis/DomTree.java: Workaround javac bug by ensuring that we have complete parameterized signatures for all constructors! (Otherwise we get a VerifyError at runtime, sigh.) * Backend/RuntimeTiny/TinyPackedClassFieldMap.java: New file. * Backend/RuntimeTiny/TinyPackedClassFieldMap.java, Backend/RuntimeTiny/TreeBuilder.java: New, improved, field packer. Makes better use of 'holes' left by any necessary padding. * Backend/PreciseC/Frame.java: Allow easier use of custom allocators. * Backend/RuntimeTiny/ObjectBuilder.java, Backend/RuntimeTiny/Runtime.java, Backend/RuntimeTiny/TinyClassFieldMap.java, Backend/RuntimeTiny/TreeBuilder.java, gj-files: Add support for allocating fields in the empty space left by a compressed claz pointer. 2002-03-15 C. Scott Ananian * Backend/Runtime1/ObjectBuilder.java: Refactor ObjectBuilder to eliminate duplicate code and fix a bug w/ incorrect output of classes with padding between fields. * Backend/RuntimeTiny/TinyClassFieldMap.java, Backend/RuntimeTiny/TreeBuilder.java: Added TinyClassFieldMap which more-correctly lays out fields in the sizeopt context: you can separately specified *forced* alignments (like for pointers) and *preferred* alignments (everything else). Only pads when necessary for a forced alignment. * Backend/RuntimeTiny/TinyClassFieldMap.java: New file. * Backend/Analysis/SortedClassFieldMap.java, gj-files: Added TinyClassFieldMap which more-correctly lays out fields in the sizeopt context: you can separately specified *forced* alignments (like for pointers) and *preferred* alignments (everything else). Only pads when necessary for a forced alignment. * Util/ReverseIterator.java, Util/ReverseListIterator.java: GJ-ized ReverseIterator. Added new ReverseListIterator class, which is more efficient on List's iterators. * Util/ReverseListIterator.java: New file. * gj-files: GJ-ized ReverseIterator. Added new ReverseListIterator class, which is more efficient on List's iterators. * Backend/Runtime1/ObjectBuilder.java, gj-files: GJ-ized harpoon.Backend.Runtime1.ObjectBuilder. * Backend/RuntimeTiny/FixUnaligned.java, Backend/RuntimeTiny/Runtime.java, Backend/RuntimeTiny/TreeBuilder.java: Add first-draft byte-aligned fields support. This is a pretty broken way to do things, as FixUnaligned can't deal w/ floats and generally doesn't have enough information about the fields it is dealing with. But luckily for us, x86 will transparently handle unaligned accesses (probably slowly, but still) so we don't really need to worry about this just yet. * Backend/RuntimeTiny/FixUnaligned.java: New file. * Backend/Runtime1/TreeBuilder.java, gj-files: Add first-draft byte-aligned fields support. This is a pretty broken way to do things, as FixUnaligned can't deal w/ floats and generally doesn't have enough information about the fields it is dealing with. But luckily for us, x86 will transparently handle unaligned accesses (probably slowly, but still) so we don't really need to worry about this just yet. * IR/Tree/CanonicalTreeCode.java, IR/Tree/ToCanonicalTree.java: Widened types so that you can pass a Code (doesn't have to be a TreeCode) through the canonicalization process. This is very useful if you are taking what *used* to be a canonical tree, munging it, and then attempting to re-canonicalize it, since CanonicalTreeCode extends Code but not TreeCode. * Analysis/Tree/AlignmentAnalysis.java: Made several fields and methods public so that AlignmentAnalysis is actually *useful* from outside its package. * Analysis/Tree/MemHoisting.java, Analysis/Tree/Simplification.java, gj-files: GJ-ized Analysis/Tree/Simplification and its subclass MemHoisting. * IR/Properties/CFGrapher.java, Util/UnmodifiableListIterator.java: Work around javac bugs. In the CFGrapher case, the code was valid but yielded an 'unchecked' warning; but javac massacred the code-gen resulting in a VerifyError thrown when the bytecode for the class was executed. Corrected this by fixing the decl to not generate the 'unchecked' warning. In the UnmodifiableListIterator case, this is bug in how the GJ compiler handles final methods. I've reported it to Sun and hopefully it will be fixed. In the meantime, we must mark the methods as non-final to work around the problem. 2002-03-14 C. Scott Ananian * Analysis/Tree/AlignmentAnalysis.java: New file. * Analysis/Tree/AlignmentAnalysis.java, Analysis/Tree/CacheEquivalence.java, gj-files: Split CacheEquivalence analysis in two so that I can re-use the dataflow alignment analysis from it. The split probably needs some polishing yet, but it'll do for now. Added a bit of extra GJ-goodness while I was at it. * Analysis/ReachingDefs.java, Analysis/ReachingDefsAltImpl.java, Analysis/ReachingDefsCachingImpl.java, Analysis/ReachingDefsImpl.java, Analysis/SSxReachingDefsImpl.java: GJ-ized all ReachingDefs implementations. * Analysis/BasicBlock.java, Analysis/BasicBlockFactoryInterf.java, Analysis/BasicBlockInterf.java: GJ-ified the BasicBlock/BasicBlock.Factory interfaces & implementations. * Util/Collections/BitSetFactory.java, Util/BitString.java, Util/Indexer.java: GJ-ified the BitSetFactory and the BitString and Indexer classes which it uses. 2002-03-13 C. Scott Ananian * Util/ArrayEnumerator.java, Util/Default.java, Analysis/Quads/SCC/SCCAnalysis.java, Analysis/Maps/UseDefMap.java, Analysis/DataFlow/ReversePostOrderEnumerator.java, Analysis/UseDef.java: Removed the last of the Enumeration-based classes from harpoon.Util (except for EnumerationIterator and IteratorEnumerator, needed for compatibility w/ old interfaces). * Util/Collections/WorkSet.java, Util/FilterIterator.java, Tools/PatMat/Spec.java, Temp/Temp.java, Interpret/Tree/ArrayRef.java, Interpret/Tree/ClazPointer.java, Interpret/Tree/Ref.java, Interpret/Tree/StaticState.java, Interpret/Quads/Ref.java, IR/Tree/Data.java, IR/Tree/OptimizedTreeCode.java, IR/Bytecode/Instr.java, Backend/StrongARM/CodeGen.spec, Backend/MIPS/CodeGen.spec, Analysis/PointerAnalysis/InstrumentSyncOps.java, Analysis/Tree/TreeFolding.java, Analysis/SESE.java: Remapped all the '/*final*/' declarations inserted in the hoary past of this compiler when the various java compilers had buggy final checking back to 'final'. I.e. made a lot of fields final again which we had to make unfinal ages ago to work around javac bugs. But the bugs are gone. Bring back the finals! * Util/ArrayIterator.java: Fix a javadoc typo. * Util/CombineEnumerator.java, Util/FilterEnumerator.java, Util/NullEnumerator.java, Util/ReverseEnumerator.java, Util/SingletonEnumerator.java: Remove unused *Enumerator classes. (We should all be using Iterators by now.) * Analysis/Tree/CacheEquivalence.java, Analysis/DomTree.java, gj-files: gj-ified harpoon.Analysis.DomTree (tough, this code was written a *long* time ago! made things use the 1.2 collections api while i was at it), and harpoon.Analysis.Tree.CacheEquivalence. * IR/Properties/CFGrapher.java, IR/Properties/UseDefer.java, IR/Tree/Code.java, IR/Tree/TreeCode.java, IR/Tree/TreeGrapher.java, IR/Tree/TreeUseDefer.java: GJ-ized CFGrapher and UseDefer (and subclasses). * Util/Collections/AggregateSetFactory.java, Util/FilterIterator.java: GJ-ized harpoon.Util.FilterIterator and harpoon.Util.Collections.AggregateSetFactory. Note that: 1) the jsr14 GJ spec doc has a much more elegant means of doing mapping functions, using non-static inner classes. See the 'Zipper' example in the text. We used an more inelegant approach to maintain compatibility w/ existing code. Maybe someday we'll "upgrade". 2) AggregateSetFactory is one of the places where one would wish that the types of the generated sets we're so tightly tied to the type of the Factory; i.e. it would be nice to have a generic factory that could make Sets for any V. However, the MapSetFactory (which turns MapFactorys into SetFactories that generate MapSets) would then be impossible to type-check. Ce la vi. 2002-03-11 C. Scott Ananian * Backend/RuntimeTiny/ObjectBuilder.java, Backend/RuntimeTiny/PreOrderClazNumbering.java, Backend/RuntimeTiny/Runtime.java, Backend/RuntimeTiny/TreeBuilder.java: Finished implementation of claz compression in the Code. It works on Hello, world now. I had to add an extension mechanism to harpoon.Backend.Runtime1.DataClaz to make this all work right, and provide a way to override/subclass the harpoon.Backend.Runtime1.ObjectBuilder. Next commit will make this work in the Runtime. * Backend/RuntimeTiny/ObjectBuilder.java: New file. * Backend/Runtime1/ObjectBuilder.java, Backend/Runtime1/Runtime.java, Backend/Runtime1/TreeBuilder.java, gj-files, homeBackend/Runtime1/DataClaz.java: Finished implementation of claz compression in the Code. It works on Hello, world now. I had to add an extension mechanism to harpoon.Backend.Runtime1.DataClaz to make this all work right, and provide a way to override/subclass the harpoon.Backend.Runtime1.ObjectBuilder. Next commit will make this work in the Runtime. * homeBackend/Runtime1/DataClaz.java: GJ-ify harpoon.Backend.Runtime1.DataClaz. * gj-files, Util/UnmodifiableListIterator.java, Backend/Maps/FieldMap.java, Backend/Analysis/ClassFieldMap.java, Backend/Analysis/PackedClassFieldMap.java, Backend/Analysis/SortedClassFieldMap.java: GJ-icize harpoon.Backend.Maps.FieldMap and its subclasses. Also GJ-ed harpoon.Util.UnmodifiableListIterator (needed for the above). 2002-03-10 C. Scott Ananian * Backend/RuntimeTiny/ClazNumbering.java, Backend/RuntimeTiny/CompleteClazNumbering.java, Backend/RuntimeTiny/DataClazTable.java, Backend/RuntimeTiny/PreOrderClazNumbering.java, Backend/RuntimeTiny/Runtime.java, Backend/RuntimeTiny/TreeBuilder.java, Backend/RuntimeTiny/package.html: Check in first draft of claz compression support. We don't actually resize the field yet, but we do store the index and do the dereference. The rest will come in due time. =) Note that we had to change TreeBuilder._claz_ from private to protected to allow our subclass to work properly; we also added some configuration checking to Runtime1 and Runtime2 to detect a runtime/code mismatch (it wouldn't do for one of them to compress the claz and not the other). * Backend/RuntimeTiny/ClazNumbering.java, Backend/RuntimeTiny/CompleteClazNumbering.java, Backend/RuntimeTiny/DataClazTable.java, Backend/RuntimeTiny/PreOrderClazNumbering.java, Backend/RuntimeTiny/Runtime.java, Backend/RuntimeTiny/TreeBuilder.java, Backend/RuntimeTiny/package.html: New file. * Backend/Runtime2/Runtime.java, Backend/Runtime1/Runtime.java, Backend/Runtime1/TreeBuilder.java, gj-files: Check in first draft of claz compression support. We don't actually resize the field yet, but we do store the index and do the dereference. The rest will come in due time. =) Note that we had to change TreeBuilder._claz_ from private to protected to allow our subclass to work properly; we also added some configuration checking to Runtime1 and Runtime2 to detect a runtime/code mismatch (it wouldn't do for one of them to compress the claz and not the other). * Backend/PreciseC/Frame.java: Extended the runtime selection to use reflection. This way we don't have to keep changing this code whenever we add a new runtime subclass. Kept a static reference to Runtime1 so that FLEX built w/ itself doesn't need a manual root-set specification. I'm not entirely sure I'm happy w/ the cleanness of this code, so I'm not applying the change to all the Backends' Frames yet. I'm going to let it sit for a while in the tree, and if it doesn't make me too unhappy, then I'll spread it to the rest. * Analysis/Quads/QuadClassHierarchy.java: Bug fix: we should never return interfaces in the 'instantiated classes' list. * Backend/Runtime2/Runtime.java, Backend/Runtime2/TreeBuilder.java, Backend/Runtime1/Data.java, Backend/Runtime1/Runtime.java, Analysis/Realtime/RealtimeRuntime.java, gj-files: Further GJ-ized harpoon.Backend.Runtime1.Runtime and all its subclasses. Also made _DATUM methods of Runtime1.Data protected, so that we can properly use them in subclasses. * gj-files: Updated gj-files to list all the new GJ-ized classes modified in the last few commits. * IR/Tree/Code.java, IR/Tree/Stm.java, IR/Tree/Tree.java, Backend/Runtime1/DataStrings.java, Backend/Runtime1/Runtime.java, Backend/Runtime1/TreeBuilder.java, Backend/Generic/Runtime.java: GJ-ize the Backend/Runtime interface (which required GJ-izing the harpoon.IR.Tree package as well). * Util/Collections/ListWrapper.java: GJ-ize the ListWrapper class. * Analysis/Quads/QuadClassHierarchy.java, IR/Quads/Code.java: Remove newly-unnecessary javac bug workarounds. * ClassFile/ClassPointer.java, ClassFile/Factories.java, ClassFile/HClass.java, ClassFile/HClassSyn.java, ClassFile/HConstructor.java, ClassFile/HField.java, ClassFile/HFieldImpl.java, ClassFile/HInitializer.java, ClassFile/HMember.java, ClassFile/HMemberProxy.java, ClassFile/HMethod.java, ClassFile/HMethodImpl.java, ClassFile/HPointer.java: GJ-ize all remaining files in harpoon.ClassFile package. Modulo a javac bug in ClassFile/ClassPointer.java, you can compile all classes in harpoon.ClassFile w/ the jsr14 compiler now. * bin/fm-javadoc-cmd: This script builds a javadoc .pdf using framemaker on athena. The 1.2-beta1 MIF doclet has some bugs, so this isn't quite ready for prime-time yet. * Tools/PatMat/Spec.java, Backend/Generic/RegUseDefer.java, Analysis/DataFlow/BackwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/ForwardDataFlowBasicBlockVisitor.java, Backend/CSAHack/FlowGraph/AssemFlowGraph.java: Javadoc @see tag fixes. * GNUmakefile, overview.html: Added an 'overview.html' file, which shows up in the generated javadoc. * Tools/PatMat/Spec.java: javadoc fix. 2002-03-09 C. Scott Ananian * GNUmakefile: Fix wrong *s on JDOCGROUPs options. Fix improper quoting of JDOCGROUP. Portability fixes. * Main/Raw.java, Backend/Generic/Code.java, Analysis/PointerAnalysis/EdgesNCallees.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/Instr/AppelRegAllocClasses.java, Analysis/Instr/EqTempSets.java, Analysis/FCFGBasicBlock.java: Fix typos in javadoc comments. * GNUmakefile: Some portability fixes and javadoc improvements. 2002-03-06 C. Scott Ananian * Analysis/PreciseGC/RCTransformer.java: WorkSet was moved from harpoon.Util to harpoon.Util.Collections some time ago. Karen probably has old .class files for the previous name still lying around. 2002-03-04 C. Scott Ananian * Analysis/PointsToAnalysis.java: Abstract interface for points-to analyses. * Analysis/PointsToAnalysis.java: New file. * GNUmakefile, bin/run-java, gj-files: Updated build environment to: 1) support more GJ-ed files (gj-files) 2) merge 'java5' and 'java' targets (GNUMakefile) 3) enable assertions by default (bin/run-java) * Analysis/Transactions/AnalysisCheckOracle.java, Analysis/Transactions/CheckOracle.java, Analysis/Quads/QuadClassHierarchy.java, Analysis/ClassHierarchy.java, Analysis/InterferenceGraph.java: GJ-ized some of the analyses. Makes the behavior of those interface methods that return Collections much easier to understand. * IR/Quads/Code.java, IR/Quads/Edge.java, IR/Quads/Print.java, IR/Quads/Quad.java: Bring the core Quad classes into the GJ age. Note that the separate nextEdge() and succ() methods are no longer necessary, as they return exactly the same types. (Same for prevEdge()/pred() and a few more methods.) Also, predC()/succC() should return a List instead of a Collection and then the prevEdge(i) calls could be replaced by succC().get(i). With a little tweaking to the implementatin of predC()/succC() this would have almost identical performance, while greatly reducing the size of the Quad interface. These more-aggressive GJ-izations haven't been done (yet) to preserve compatibility w/ legacy FLEX code. * Temp/Temp.java, IR/Properties/CFGEdge.java, IR/Properties/CFGraphable.java, IR/Properties/UseDefable.java, ClassFile/HCode.java, ClassFile/HCodeEdge.java: GJ-ify most of the core FLEX classes: HCode, HCodeEdge, CFGEdge, CFGraphable, UseDefable, Temp. Note that some of these could be further simplified now that GJ has given us co-variant return types, but these changes would require more changes to the 'legacy' FLEX code than I'm willing to do right now. * Util/Collections/CollectionFactory.java, Util/Collections/ListFactory.java, Util/Collections/SetFactory.java, Util/Default.java: Workaround bugs in javac which prohibit the casting of Set to Set and so forth. Revert most of this commit when these bugs are fixed. * Util/ArrayFactory.java, Util/ArrayIterator.java, Util/ArraySet.java, Util/CombineIterator.java, Util/EnumerationIterator.java, Util/Grapher.java, Util/IteratorEnumerator.java, Util/Util.java: More GJ-izing the Collections-related Util classes. Adding parameterized types where they make sense. 2002-02-28 kkz * Analysis/PreciseGC/RCTransformer.java: Transformation for recursive constructors. 2002-02-27 kkz * Analysis/PreciseGC/AllocationHoisting.java, Analysis/PreciseGC/MRAFactory.java: Minor changes to make allocation hoisting work for the olden benchmarks. 2002-02-27 C. Scott Ananian * Util/Collections/AbstractMapEntry.java, Util/Collections/CollectionFactory.java, Util/Collections/CollectionWrapper.java, Util/Collections/Factories.java, Util/Collections/GenericInvertibleMap.java, Util/Collections/GenericInvertibleMultiMap.java, Util/Collections/GenericMultiMap.java, Util/Collections/InvertibleMap.java, Util/Collections/InvertibleMultiMap.java, Util/Collections/LinearSet.java, Util/Collections/ListFactory.java, Util/Collections/MapFactory.java, Util/Collections/MapSet.java, Util/Collections/MapWrapper.java, Util/Collections/MultiMap.java, Util/Collections/MultiMapFactory.java, Util/Collections/MultiMapSet.java, Util/Collections/PairMapEntry.java, Util/Collections/SetFactory.java, Util/Collections/SetWrapper.java, Util/Collections/UnmodifiableMultiMap.java, Util/Collections/WorkSet.java: Migrated much of our harpoon.Util.Collections package to GJ. The lack of subtyping w/ parametric types (i.e. Factory being a subtype of Factory) is a real problem w/ our CollectionFactory stuff... but we'll deal. Moved MultiMap.Factory to MultiMapFactory to be consistent w/ the other *Factory classes. Added a new Default.EMPTY_MULTIMAP field. Hacked GNUmakefile to build only the classes in Harpoon/Code/gj-files using the GJ compiler, since it still has some *issues* (like insisting that java.util.Set is not a consistent subtype of java.util.Collection due to quibbles with the toArray() method). The rest of the classes are built using the standard java compiler. Yay, backwards-compatibility. Look for the XXX BUG IN JAVAC comments (in particular, in Util/Collections/Factories and Util/Collections/InvertibleMultiMap) to find the places were what I think to be perfectly OK GJ code gives the current GJ prototype compiler fits. Fix these bits when either the compiler, or my understanding of GJ, improves. * Util/Collections/MultiMapFactory.java: New file. * Util/BinaryRelation.java, Util/Default.java, Util/UnmodifiableIterator.java, Util/Worklist.java, Analysis/Instr/RegAlloc.java, GNUmakefile, gj-files: Migrated much of our harpoon.Util.Collections package to GJ. The lack of subtyping w/ parametric types (i.e. Factory being a subtype of Factory) is a real problem w/ our CollectionFactory stuff... but we'll deal. Moved MultiMap.Factory to MultiMapFactory to be consistent w/ the other *Factory classes. Added a new Default.EMPTY_MULTIMAP field. Hacked GNUmakefile to build only the classes in Harpoon/Code/gj-files using the GJ compiler, since it still has some *issues* (like insisting that java.util.Set is not a consistent subtype of java.util.Collection due to quibbles with the toArray() method). The rest of the classes are built using the standard java compiler. Yay, backwards-compatibility. Look for the XXX BUG IN JAVAC comments (in particular, in Util/Collections/Factories and Util/Collections/InvertibleMultiMap) to find the places were what I think to be perfectly OK GJ code gives the current GJ prototype compiler fits. Fix these bits when either the compiler, or my understanding of GJ, improves. * gj-files: New file. * Util/TypeInference/TypeInference.java, bin/migrate-assert.perl: Globally replace all instances of our Util.ASSERT function with the proper JDK1.4 'assert' keyword. Also check in a script, bin/migrate-assert.perl, which does *most* of these replacements for us (feed it a munged version of the source, and unmunge the output). Notably exceptions that can't be automagically done are in Tools/PatMat/MaximalMunchCGG.java. Some others, too. Hacked GNUMakefile to indicate that (current versions of) jikes will no longer compile this code. Fixed 'make java' target so that javac will. THIS COMMIT IS ONLY ON THE java-1-5 BRANCH. THE HEAD IS STILL pre-java 1.4 and jikes-compatible. * bin/migrate-assert.perl: New file. * Util/LightBasicBlocks/LightBasicBlock.java, Util/Collections/BinaryHeap.java, Util/Collections/BinaryTree.java, Util/Collections/BinomialHeap.java, Util/Collections/BitSetFactory.java, Util/Collections/DisjointSet.java, Util/Collections/Factories.java, Util/Collections/FibonacciHeap.java, Util/Collections/GenericMultiMap.java, Util/Collections/HashEnvironment.java, Util/Collections/RedBlackTree.java, Util/Collections/WorkSet.java, Util/ArrayIterator.java, Util/BinHeapPriorityQueue.java, Util/BitString.java, Util/CloneableIterator.java, Util/HClassUtil.java, Util/Timer.java, Util/Util.java, Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Spec.java, Temp/CloningTempMap.java, Temp/Temp.java, Tools/Annotation/Java12.cup, Main/EDMain.java, Main/EDXMain.java, Main/ODPAMain.java, Main/PAMain.java, Main/SAMain.java, Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/Method.java, Interpret/Tree/ObjectRef.java, Interpret/Tree/OffsetMap32.java, Interpret/Tree/StaticState.java, Interpret/Quads/ArrayRef.java, Interpret/Quads/INClass.java, Interpret/Quads/InterpretedThrowable.java, Interpret/Quads/Method.java, Interpret/Quads/ObjectRef.java, Interpret/Quads/StaticState.java, Interpret/Tree/ArrayRef.java, Interpret/Tree/DefaultFrame.java, IR/Tree/ALIGN.java, IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/CanonicalTreeCode.java, IR/Tree/Code.java, IR/Tree/DATUM.java, IR/Tree/DerivationGenerator.java, IR/Tree/ESEQ.java, IR/Tree/EXPR.java, IR/Tree/INVOCATION.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/METHOD.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/NATIVECALL.java, IR/Tree/OPER.java, IR/Tree/Print.java, IR/Tree/RETURN.java, IR/Tree/SEGMENT.java, IR/Tree/SEQ.java, IR/Tree/TEMP.java, IR/Tree/THROW.java, IR/Tree/ToCanonicalTree.java, IR/Tree/ToTree.java, IR/Tree/ToTreeHelpers.java, IR/Tree/Translation.java, IR/Tree/Tree.java, IR/Tree/TreeGrapher.java, IR/Tree/TreeUseDefer.java, IR/Tree/TreeVerifyingVisitor.java, IR/Tree/UNOP.java, IR/Quads/AGET.java, IR/Quads/ALENGTH.java, IR/Quads/ANEW.java, IR/Quads/ARRAYINIT.java, IR/Quads/ASET.java, IR/Quads/CALL.java, IR/Quads/CJMP.java, IR/Quads/COMPONENTOF.java, IR/Quads/CONST.java, IR/Quads/CloneSynthesizer.java, IR/Quads/Code.java, IR/Quads/DEBUG.java, IR/Quads/Edge.java, IR/Quads/GET.java, IR/Quads/HANDLER.java, IR/Quads/HandlerSet.java, IR/Quads/INSTANCEOF.java, IR/Quads/METHOD.java, IR/Quads/MONITORENTER.java, IR/Quads/MONITOREXIT.java, IR/Quads/MOVE.java, IR/Quads/NEW.java, IR/Quads/OPER.java, IR/Quads/PHI.java, IR/Quads/Pattern.java, IR/Quads/Peephole.java, IR/Quads/Print.java, IR/Quads/Prune.java, IR/Quads/Quad.java, IR/Quads/ReHandler.java, IR/Quads/SET.java, IR/Quads/SIGMA.java, IR/Quads/SSIRename.java, IR/Quads/SSIToSSA.java, IR/Quads/SWITCH.java, IR/Quads/THROW.java, IR/Quads/TYPECAST.java, IR/Quads/TYPESWITCH.java, IR/Quads/TempChain.java, IR/Quads/ThreadInliner.java, IR/Quads/ToNoSSA.java, IR/Quads/Translate.java, IR/Quads/UnHandler.java, IR/Quads/XI.java, IR/LowQuad/DerivationMap.java, IR/LowQuad/LowQuadSSI.java, IR/LowQuad/PAOFFSET.java, IR/LowQuad/PCALL.java, IR/LowQuad/PCONST.java, IR/LowQuad/PFCONST.java, IR/LowQuad/PFOFFSET.java, IR/LowQuad/PGET.java, IR/LowQuad/PMCONST.java, IR/LowQuad/PMOFFSET.java, IR/LowQuad/POPER.java, IR/LowQuad/PPTR.java, IR/LowQuad/PSET.java, IR/Jasmin/Jasmin.java, IR/Bytecode/InMerge.java, IR/Bytecode/Op.java, IR/Assem/Code.java, IR/Assem/Instr.java, IR/Assem/InstrGroup.java, IR/Assem/InstrMOVE.java, ClassFile/HClassArraySyn.java, ClassFile/HClassProxy.java, ClassFile/HClassSyn.java, ClassFile/HConstructorSyn.java, ClassFile/HFieldSyn.java, ClassFile/HInitializerSyn.java, ClassFile/HMemberProxy.java, ClassFile/HMethodSyn.java, ClassFile/ImplMagic.java, ClassFile/Linker.java, ClassFile/Loader.java, ClassFile/Relinker.java, Backend/StrongARM/CodeGen.spec.coarseInstrs, Backend/StrongARM/CodeGen.spec.instrGroups, Backend/StrongARM/InstrBuilder.java, Backend/StrongARM/RegFileInfo.java, Backend/StrongARM/TwoWordTemp.java, ClassFile/ClassPointer.java, ClassFile/HClass.java, Backend/StrongARM/Code.java, Backend/StrongARM/CodeGen.spec, Backend/Sparc/Code.java, Backend/Sparc/CodeGen.spec, Backend/Sparc/RegFileInfo.java, Backend/Sparc/TempBuilder.java, Backend/Runtime1/DataGC.java, Backend/Runtime1/DataStaticFields.java, Backend/Runtime1/NiftyAllocationStrategy.java, Backend/Runtime1/ObjectBuilder.java, Backend/Runtime1/Runtime.java, Backend/Runtime1/SPAllocationStrategy.java, Backend/Runtime1/TreeBuilder.java, homeBackend/Runtime1/DataClaz.java, Backend/PreciseC/Frame.java, Backend/PreciseC/IdentifyNoHandler.java, Backend/PreciseC/TreeToC.java, Backend/MIPS/InstrBuilder.java, Backend/MIPS/RegFileInfo.java, Backend/MIPS/StackInfo.java, Backend/Maps/DefaultNameMap.java, Backend/MIPS/BypassLatchSchedule.java, Backend/MIPS/Code.java, Backend/MIPS/CodeGen.spec, Backend/Generic/Code.java, Backend/Generic/CodeGen.java, Backend/Generic/GCInfo.java, Backend/Generic/InstrBuilder.java, Backend/Generic/MaxMunchCG.java, Backend/Generic/RegFileInfo.java, Backend/Generic/Runtime.java, Backend/CSAHack/RegAlloc/Color.java, Backend/CSAHack/RegAlloc/DerivationGenerator.java, Backend/CSAHack/RegAlloc/RegAlloc.java, Backend/Analysis/ClassMethodMap.java, Backend/Analysis/InitializerOrdering.java, Backend/Analysis/InsertWriteBarrier.java, Backend/Analysis/InterfaceMethodMap.java, Backend/Analysis/MakeGCThreadSafe.java, Backend/Analysis/PackedClassFieldMap.java, Backend/CSAHack/FlowGraph/AssemFlowGraph.java, Backend/Analysis/BasicGCInfo.java, Backend/Analysis/ClassFieldMap.java, Analysis/TypeInference/ClassCone.java, Analysis/TypeInference/IntraProc.java, Analysis/Tree/AlgebraicSimplification.java, Analysis/Tree/CacheEquivalence.java, Analysis/Tree/ConstantPropagation.java, Analysis/Tree/DeadCodeElimination.java, Analysis/Tree/DominatingMemoryAccess.java, Analysis/Tree/JumpOptimization.java, Analysis/Tree/MemHoisting.java, Analysis/Tree/Simplification.java, Analysis/Tree/TreeFolding.java, Analysis/Transactions/ArrayCopyImplementer.java, Analysis/Transactions/BitFieldNumbering.java, Analysis/Transactions/CloneImplementer.java, Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreePostPass.java, Analysis/Transformation/MethodMutator.java, Analysis/Transformation/MethodSplitter.java, Analysis/SizeOpt/BitWidthAnalysis.java, Analysis/SizeOpt/ConstructorClassifier.java, Analysis/SizeOpt/Field2Method.java, Analysis/SizeOpt/FieldReducer.java, Analysis/SizeOpt/MZFChooser.java, Analysis/SizeOpt/MZFCompressor.java, Analysis/SizeOpt/MZFExternalize.java, Analysis/SizeOpt/MZFWidenType.java, Analysis/SizeOpt/MostlyZeroFinder.java, Analysis/Realtime/Stats.java, Analysis/Realtime/ThreadToRealtimeThread.java, Analysis/RoleInference/LocalVariableNamer.java, Analysis/Realtime/CheckAdder.java, Analysis/Realtime/CheckAdderNoSSA.java, Analysis/Realtime/CheckAdderWithTry.java, Analysis/Realtime/CheesyPACheckRemoval.java, Analysis/Realtime/ClassReplacer.java, Analysis/Realtime/PACheckRemoval.java, Analysis/Realtime/QuantaChecker.java, Analysis/Realtime/Realtime.java, Analysis/Quads/DispatchTreeTransformation.java, Analysis/Quads/InitializerTransform.java, Analysis/Quads/MayReadOracle.java, Analysis/Quads/MemoryOptimization.java, Analysis/Quads/MethodInliningCodeFactory.java, Analysis/Quads/MustParamOracle.java, Analysis/Quads/NewMover.java, Analysis/Quads/QuadClassHierarchy.java, Analysis/Quads/SCC/SCCAnalysis.java, Analysis/Quads/SCC/SCCOptimize.java, Analysis/Quads/SimpleConstMap.java, Analysis/Quads/TypeInfo.java, Analysis/Quads/TypeSwitchRemover.java, Analysis/Quads/Unreachable.java, Analysis/Quads/ArrayUnroller.java, Analysis/Quads/CallGraphImpl.java, Analysis/Quads/CallGraphImpl2.java, Analysis/Quads/CoalescingToNoSSA.java, Analysis/Quads/DeadCode.java, Analysis/Quads/DefiniteInitOracle.java, Analysis/PreciseGC/AllocationHoisting.java, Analysis/PreciseGC/MRAFactory.java, Analysis/PreciseGC/WriteBarrierConstElim.java, Analysis/PreciseGC/WriteBarrierData.java, Analysis/PreciseGC/WriteBarrierPostPass.java, Analysis/PreciseGC/WriteBarrierQuadPass.java, Analysis/PreciseGC/WriteBarrierStats.java, Analysis/PreciseGC/WriteBarrierTreePass.java, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/ArtificialTempFactory.java, Analysis/PointerAnalysis/EdgesNCallees.java, Analysis/PointerAnalysis/InstrumentSyncOps.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/LightPAEdgeSet.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/MethodHole.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/ODInformation.java, Analysis/PointerAnalysis/ODInterProcPA.java, Analysis/PointerAnalysis/ODMAInfo.java, Analysis/PointerAnalysis/ODParIntGraph.java, Analysis/PointerAnalysis/ODPointerAnalysis.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/MetaMethods/GenType.java, Analysis/MetaMethods/MetaAllCallers.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/MetaMethods/MetaMethod.java, Analysis/Partition/Profile.java-old, Analysis/Maps/Derivation.java, Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/BasicInductions.java, Analysis/LowQuad/Loop/Induction.java, Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/LowQuad/Loop/MyLowQuadNoSSA.java, Analysis/LowQuad/Loop/MyLowQuadSSI.java, Analysis/Instr/AppelRegAlloc.java, Analysis/Instr/AppelRegAllocClasses.java, Analysis/Instr/AppelRegAllocFsk.java, Analysis/Instr/AppelRegAllocStd.java, Analysis/Instr/Check.java, Analysis/Instr/EqTempSets.java, Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/RegFile.java, Analysis/Instr/SpillHeuristics.java, Analysis/Instr/Verify.java, Analysis/Instr/Web.java, Analysis/GraphColoring/OptimisticGraphColorer.java, Analysis/GraphColoring/SparseGraph.java, Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/CloningVisitor.java, Analysis/EnvBuilder/EnvBuilder.java, Analysis/Counters/CounterFactory.java, Analysis/Counters/EpilogMutator.java, Analysis/Counters/RuntimeMethodCloner.java, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/ReversePostOrderEnumerator.java, Analysis/DataFlow/ReversePostOrderIterator.java, Analysis/DataFlow/SpaceHeavyLiveTemps.java, Analysis/DataFlow/TreeSolver.java, Analysis/AllocationInformationMap.java, Analysis/BasicBlock.java, Analysis/ClassHierarchy.java, Analysis/CycleEq.java, Analysis/DefaultAllocationInformation.java, Analysis/DomTree.java, Analysis/FCFGBasicBlock.java, Analysis/ReachingDefsAltImpl.java, Analysis/ReachingDefsImpl.java, Analysis/SESE.java, Analysis/SSxReachingDefsImpl.java, GNUmakefile: Globally replace all instances of our Util.ASSERT function with the proper JDK1.4 'assert' keyword. Also check in a script, bin/migrate-assert.perl, which does *most* of these replacements for us (feed it a munged version of the source, and unmunge the output). Notably exceptions that can't be automagically done are in Tools/PatMat/MaximalMunchCGG.java. Some others, too. Hacked GNUMakefile to indicate that (current versions of) jikes will no longer compile this code. Fixed 'make java' target so that javac will. THIS COMMIT IS ONLY ON THE java-1-5 BRANCH. THE HEAD IS STILL pre-java 1.4 and jikes-compatible. 2002-02-26 C. Scott Ananian * Util/TypeInference/TypeInference.java, Util/LightBasicBlocks/LightBasicBlock.java, Util/Collections/BinaryHeap.java, Util/Collections/BinaryTree.java, Util/Collections/BinomialHeap.java, Util/Collections/BitSetFactory.java, Util/Collections/DisjointSet.java, Util/Collections/Factories.java, Util/Collections/FibonacciHeap.java, Util/Collections/GenericMultiMap.java, Util/Collections/HashEnvironment.java, Util/Collections/RedBlackTree.java, Util/Collections/WorkSet.java, Util/ArrayIterator.java, Util/BinHeapPriorityQueue.java, Util/BitString.java, Util/CloneableIterator.java, Util/HClassUtil.java, Util/Timer.java, Util/Util.java, Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Spec.java, Tools/Annotation/Java12.cup, Temp/CloningTempMap.java, Temp/Temp.java, Main/EDMain.java, Main/EDXMain.java, Main/ODPAMain.java, Main/PAMain.java, Main/SAMain.java, Support/Jasminpatch, Support/Jasminpatch2, Interpret/Tree/DefaultFrame.java, Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/Method.java, Interpret/Tree/ObjectRef.java, Interpret/Tree/OffsetMap32.java, Interpret/Tree/StaticState.java, Interpret/Quads/ArrayRef.java, Interpret/Quads/INClass.java, Interpret/Quads/InterpretedThrowable.java, Interpret/Quads/Method.java, Interpret/Quads/ObjectRef.java, Interpret/Quads/StaticState.java, Interpret/Tree/ArrayRef.java, IR/Tree/ALIGN.java, IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/CanonicalTreeCode.java, IR/Tree/Code.java, IR/Tree/DATUM.java, IR/Tree/DerivationGenerator.java, IR/Tree/ESEQ.java, IR/Tree/EXPR.java, IR/Tree/INVOCATION.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/METHOD.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/NATIVECALL.java, IR/Tree/OPER.java, IR/Tree/Print.java, IR/Tree/RETURN.java, IR/Tree/SEGMENT.java, IR/Tree/SEQ.java, IR/Tree/TEMP.java, IR/Tree/THROW.java, IR/Tree/ToCanonicalTree.java, IR/Tree/ToTree.java, IR/Tree/ToTreeHelpers.java, IR/Tree/Translation.java, IR/Tree/Tree.java, IR/Tree/TreeGrapher.java, IR/Tree/TreeUseDefer.java, IR/Tree/TreeVerifyingVisitor.java, IR/Tree/UNOP.java, IR/LowQuad/LowQuadSSI.java, IR/LowQuad/PAOFFSET.java, IR/LowQuad/PCALL.java, IR/LowQuad/PCONST.java, IR/LowQuad/PFCONST.java, IR/LowQuad/PFOFFSET.java, IR/LowQuad/PGET.java, IR/LowQuad/PMCONST.java, IR/LowQuad/PMOFFSET.java, IR/LowQuad/POPER.java, IR/LowQuad/PPTR.java, IR/LowQuad/PSET.java, IR/Quads/AGET.java, IR/Quads/ALENGTH.java, IR/Quads/ANEW.java, IR/Quads/ARRAYINIT.java, IR/Quads/ASET.java, IR/Quads/CALL.java, IR/Quads/CJMP.java, IR/Quads/COMPONENTOF.java, IR/Quads/CONST.java, IR/Quads/CloneSynthesizer.java, IR/Quads/Code.java, IR/Quads/DEBUG.java, IR/Quads/Edge.java, IR/Quads/GET.java, IR/Quads/HANDLER.java, IR/Quads/HandlerSet.java, IR/Quads/INSTANCEOF.java, IR/Quads/METHOD.java, IR/Quads/MONITORENTER.java, IR/Quads/MONITOREXIT.java, IR/Quads/MOVE.java, IR/Quads/NEW.java, IR/Quads/OPER.java, IR/Quads/PHI.java, IR/Quads/Pattern.java, IR/Quads/Peephole.java, IR/Quads/Print.java, IR/Quads/Prune.java, IR/Quads/Quad.java, IR/Quads/ReHandler.java, IR/Quads/SET.java, IR/Quads/SIGMA.java, IR/Quads/SSIRename.java, IR/Quads/SSIToSSA.java, IR/Quads/SWITCH.java, IR/Quads/THROW.java, IR/Quads/TYPECAST.java, IR/Quads/TYPESWITCH.java, IR/Quads/TempChain.java, IR/Quads/ThreadInliner.java, IR/Quads/ToNoSSA.java, IR/Quads/Translate.java, IR/Quads/UnHandler.java, IR/Quads/XI.java, IR/LowQuad/DerivationMap.java, IR/Bytecode/Op.java, IR/Jasmin/Jasmin.java, IR/Bytecode/InMerge.java, IR/Assem/Code.java, IR/Assem/Instr.java, IR/Assem/InstrGroup.java, IR/Assem/InstrMOVE.java, ClassFile/HClass.java, ClassFile/HClassArraySyn.java, ClassFile/HClassProxy.java, ClassFile/HClassSyn.java, ClassFile/HConstructorSyn.java, ClassFile/HFieldSyn.java, ClassFile/HInitializerSyn.java, ClassFile/HMemberProxy.java, ClassFile/HMethodSyn.java, ClassFile/ImplMagic.java, ClassFile/Linker.java, ClassFile/Loader.java, ClassFile/Relinker.java, Backend/StrongARM/Code.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/CodeGen.spec.coarseInstrs, Backend/StrongARM/CodeGen.spec.instrGroups, Backend/StrongARM/InstrBuilder.java, Backend/StrongARM/RegFileInfo.java, Backend/StrongARM/TwoWordTemp.java, ClassFile/ClassPointer.java, Backend/Sparc/Code.java, Backend/Sparc/CodeGen.spec, Backend/Sparc/RegFileInfo.java, Backend/Sparc/TempBuilder.java, Backend/Runtime1/DataClaz.java, Backend/Runtime1/DataGC.java, Backend/Runtime1/DataStaticFields.java, Backend/Runtime1/NiftyAllocationStrategy.java, Backend/Runtime1/ObjectBuilder.java, Backend/Runtime1/Runtime.java, Backend/Runtime1/SPAllocationStrategy.java, Backend/Runtime1/TreeBuilder.java, Backend/Runtime1/mzf-unsafe.properties, Backend/PreciseC/Frame.java, Backend/PreciseC/IdentifyNoHandler.java, Backend/PreciseC/TreeToC.java, Backend/Maps/DefaultNameMap.java, Backend/MIPS/BypassLatchSchedule.java, Backend/MIPS/Code.java, Backend/MIPS/CodeGen.spec, Backend/MIPS/InstrBuilder.java, Backend/MIPS/RegFileInfo.java, Backend/MIPS/StackInfo.java, Backend/Generic/Code.java, Backend/Generic/CodeGen.java, Backend/Generic/GCInfo.java, Backend/Generic/InstrBuilder.java, Backend/Generic/MaxMunchCG.java, Backend/Generic/RegFileInfo.java, Backend/Generic/Runtime.java, Backend/CSAHack/RegAlloc/Color.java, Backend/CSAHack/RegAlloc/DerivationGenerator.java, Backend/CSAHack/RegAlloc/RegAlloc.java, Backend/CSAHack/FlowGraph/AssemFlowGraph.java, Analysis/TypeInference/IntraProc.java, Backend/Analysis/BasicGCInfo.java, Backend/Analysis/ClassFieldMap.java, Backend/Analysis/ClassMethodMap.java, Backend/Analysis/InitializerOrdering.java, Backend/Analysis/InsertWriteBarrier.java, Backend/Analysis/InterfaceMethodMap.java, Backend/Analysis/MakeGCThreadSafe.java, Backend/Analysis/PackedClassFieldMap.java, Analysis/TypeInference/ClassCone.java, Analysis/Transformation/MethodSplitter.java, Analysis/Tree/AlgebraicSimplification.java, Analysis/Tree/CacheEquivalence.java, Analysis/Tree/ConstantPropagation.java, Analysis/Tree/DeadCodeElimination.java, Analysis/Tree/DerivationChecker.java, Analysis/Tree/DominatingMemoryAccess.java, Analysis/Tree/JumpOptimization.java, Analysis/Tree/MemHoisting.java, Analysis/Tree/Simplification.java, Analysis/Tree/TreeFolding.java, Analysis/Transformation/MethodMutator.java, Analysis/SizeOpt/ConstructorClassifier.java, Analysis/SizeOpt/Field2Method.java, Analysis/SizeOpt/FieldReducer.java, Analysis/SizeOpt/MZFChooser.java, Analysis/SizeOpt/MZFCompressor.java, Analysis/SizeOpt/MZFExternalize.java, Analysis/SizeOpt/MZFWidenType.java, Analysis/SizeOpt/MostlyZeroFinder.java, Analysis/Transactions/ArrayCopyImplementer.java, Analysis/Transactions/BitFieldNumbering.java, Analysis/Transactions/CloneImplementer.java, Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreePostPass.java, Analysis/SizeOpt/BitWidthAnalysis.java, Analysis/RoleInference/LocalVariableNamer.java, Analysis/Quads/SCC/SCCOptimize.java, Analysis/Realtime/CheckAdder.java, Analysis/Realtime/CheckAdderNoSSA.java, Analysis/Realtime/CheckAdderWithTry.java, Analysis/Realtime/CheesyPACheckRemoval.java, Analysis/Realtime/ClassReplacer.java, Analysis/Realtime/PACheckRemoval.java, Analysis/Realtime/QuantaChecker.java, Analysis/Realtime/Realtime.java, Analysis/Realtime/Stats.java, Analysis/Realtime/ThreadToRealtimeThread.java, Analysis/Quads/ArrayUnroller.java, Analysis/Quads/CallGraphImpl.java, Analysis/Quads/CallGraphImpl2.java, Analysis/Quads/CoalescingToNoSSA.java, Analysis/Quads/DeadCode.java, Analysis/Quads/DefiniteInitOracle.java, Analysis/Quads/DispatchTreeTransformation.java, Analysis/Quads/InitializerTransform.java, Analysis/Quads/MayReadOracle.java, Analysis/Quads/MemoryOptimization.java, Analysis/Quads/MethodInliningCodeFactory.java, Analysis/Quads/MustParamOracle.java, Analysis/Quads/NewMover.java, Analysis/Quads/QuadClassHierarchy.java, Analysis/Quads/SCC/SCCAnalysis.java, Analysis/Quads/SimpleConstMap.java, Analysis/Quads/TypeInfo.java, Analysis/Quads/TypeSwitchRemover.java, Analysis/Quads/Unreachable.java, Analysis/PreciseGC/AllocationHoisting.java, Analysis/PreciseGC/MRAFactory.java, Analysis/PreciseGC/WriteBarrierConstElim.java, Analysis/PreciseGC/WriteBarrierData.java, Analysis/PreciseGC/WriteBarrierPostPass.java, Analysis/PreciseGC/WriteBarrierQuadPass.java, Analysis/PreciseGC/WriteBarrierStats.java, Analysis/PreciseGC/WriteBarrierTreePass.java, Analysis/PointerAnalysis/ODMAInfo.java, Analysis/PointerAnalysis/ODParIntGraph.java, Analysis/PointerAnalysis/ODPointerAnalysis.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/Partition/Profile.java-old, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/ArtificialTempFactory.java, Analysis/PointerAnalysis/EdgesNCallees.java, Analysis/PointerAnalysis/InstrumentSyncOps.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/LightPAEdgeSet.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/MethodHole.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/ODInformation.java, Analysis/PointerAnalysis/ODInterProcPA.java, Analysis/MetaMethods/MetaMethod.java, Analysis/Maps/Derivation.java, Analysis/MetaMethods/GenType.java, Analysis/MetaMethods/MetaAllCallers.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/BasicInductions.java, Analysis/LowQuad/Loop/Induction.java, Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/LowQuad/Loop/MyLowQuadNoSSA.java, Analysis/LowQuad/Loop/MyLowQuadSSI.java, Analysis/LowQuad/DerivationChecker.java, Analysis/Instr/AppelRegAlloc.java, Analysis/Instr/AppelRegAllocClasses.java, Analysis/Instr/AppelRegAllocFsk.java, Analysis/Instr/AppelRegAllocStd.java, Analysis/Instr/Check.java, Analysis/Instr/EqTempSets.java, Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/RegFile.java, Analysis/Instr/SpillHeuristics.java, Analysis/Instr/Verify.java, Analysis/Instr/Web.java, Analysis/GraphColoring/OptimisticGraphColorer.java, Analysis/GraphColoring/SparseGraph.java, Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/CloningVisitor.java, Analysis/EnvBuilder/EnvBuilder.java, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/ReversePostOrderEnumerator.java, Analysis/DataFlow/ReversePostOrderIterator.java, Analysis/DataFlow/SpaceHeavyLiveTemps.java, Analysis/DataFlow/TreeSolver.java, Analysis/Counters/CounterFactory.java, Analysis/Counters/EpilogMutator.java, Analysis/Counters/RuntimeMethodCloner.java, Analysis/AllocationInformationMap.java, Analysis/BasicBlock.java, Analysis/ClassHierarchy.java, Analysis/CycleEq.java, Analysis/DefaultAllocationInformation.java, Analysis/DomTree.java, Analysis/FCFGBasicBlock.java, Analysis/ReachingDefsAltImpl.java, Analysis/ReachingDefsImpl.java, Analysis/SESE.java, Analysis/SSxReachingDefsImpl.java: Renamed harpoon.Util.Util.assert() to harpoon.Util.Util.ASSERT() so as not to conflict with the Java 1.4 'assert' keyword. On a separate branch, I will check in changes that replace our ASSERT with the new native keyword, but I'm not going to force everyone on the main trunk to upgrade to 1.4 just yet. (Also, I don't think our Runtime supports the 'assert' feature yet, and I'd like to ensure that FLEX is still able to compile FLEX.) * Analysis/GenericContextFactory.java: Bug-fix to context creation code. * Analysis/SizeOpt/BitWidthAnalysis.java, Analysis/Context.java, Analysis/GenericContextFactory.java: Checked in a general-purpose well-documented implementation of Context (as in "context-sensitive" and "context-insensitive"), and change BitWidthAnalysis to use this implementation instead of its home-grown one. * IR/RawClass/ClassFile.java: Bug-fix for ClassFile Raw pretty-printer. This one has been sitting in my tree for a while. 2002-02-25 C. Scott Ananian * Analysis/Partition/Profile.java-old: Moved old Profile.java from magic-1-2 branch into Analysis/Partition and give it a -old suffix since it is too old to compile correctly anymore. @RENAME: QuadSSA/Profile.java Partition/Profile.java-old@ * bin/annotate.perl, bin/annotate.sh, bin/brilliance.tcsh, bin/browse-roles, bin/build-arm-hack, bin/build-arm-pnk, bin/build-mipsda, bin/build-mipsvp, bin/build-precisec, bin/build-roles, bin/build-roles-browse, bin/build-spec, bin/build-spec-arm-hack, bin/build-spec-arm-pnk, bin/build-spec-mipsda, bin/build-spec-mipsvp, bin/build-spec-precisec, bin/copyright.perl, bin/cvsblame.pl, bin/find-flex-dir, bin/interpret, bin/keywords.sed, bin/munge, bin/remove-stars.perl, bin/run-java, bin/source-markup.perl, bin/test-collections, bin/unmunge, bin/unmunge.awk, Util/LightBasicBlocks/CachingLBBConverter.java, Util/LightBasicBlocks/CachingSCCLBBFactory.java, Util/LightBasicBlocks/LBBConverter.java, Util/LightBasicBlocks/LightBasicBlock.java, Util/LightBasicBlocks/SCCLBBFactory.java, Util/TypeInference/ArrayInfo.java, Util/TypeInference/CachingArrayInfo.java, Util/TypeInference/ExactTemp.java, Util/TypeInference/TypeInference.java, Util/Collections/MultiMapSet.java, Util/Collections/PairMapEntry.java, Util/Collections/PersistentEnvironment.java, Util/Collections/PersistentMap.java, Util/Collections/PersistentSet.java, Util/Collections/PersistentTreeNode.java, Util/Collections/RedBlackTree.java, Util/Collections/SetFactory.java, Util/Collections/SetWrapper.java, Util/Collections/TestMap.java, Util/Collections/TestSet.java, Util/Collections/UniqueStack.java, Util/Collections/UniqueVector.java, Util/Collections/UnmodifiableMultiMap.java, Util/Collections/WorkSet.java, Util/Collections/package.html, Util/Collections/AbstractHeap.java, Util/Collections/AbstractMapEntry.java, Util/Collections/AggregateMapFactory.java, Util/Collections/AggregateSetFactory.java, Util/Collections/BinaryHeap.java, Util/Collections/BinaryTree.java, Util/Collections/BinomialHeap.java, Util/Collections/BitSetFactory.java, Util/Collections/CollectionFactory.java, Util/Collections/CollectionWrapper.java, Util/Collections/DisjointSet.java, Util/Collections/Environment.java, Util/Collections/Factories.java, Util/Collections/FibonacciHeap.java, Util/Collections/GenericInvertibleMap.java, Util/Collections/GenericInvertibleMultiMap.java, Util/Collections/GenericMultiMap.java, Util/Collections/HashEnvironment.java, Util/Collections/Heap.java, Util/Collections/IntervalTree.java, Util/Collections/InvertibleMap.java, Util/Collections/InvertibleMultiMap.java, Util/Collections/LinearMap.java, Util/Collections/LinearSet.java, Util/Collections/ListFactory.java, Util/Collections/ListWrapper.java, Util/Collections/MapFactory.java, Util/Collections/MapSet.java, Util/Collections/MapWrapper.java, Util/Collections/MultiMap.java, Util/BasicBlocks/BBConverter.java, Util/BasicBlocks/CachingBBConverter.java, Util/BasicBlocks/CachingSCCBBFactory.java, Util/BasicBlocks/SCCBBFactory.java, Util/ReverseIterator.java, Util/Set.java, Util/SingletonEnumerator.java, Util/SortedMapComparator.java, Util/Timer.java, Util/Tuple.java, Util/UComp.java, Util/UniqueFIFO.java, Util/UniqueStack.java, Util/UniqueVector.java, Util/UnmodifiableIterator.java, Util/UnmodifiableListIterator.java, Util/Util.java, Util/Worklist.java, Util/package.html, Tools/PatMat/doc-files/instr-selection-tool.html, Util/ArrayEnumerator.java, Util/ArrayFactory.java, Util/ArrayIterator.java, Util/ArraySet.java, Util/BinHeapPriorityQueue.java, Util/BinaryRelation.java, Util/BitString.java, Util/CloneableIterator.java, Util/CombineEnumerator.java, Util/CombineIterator.java, Util/Default.java, Util/EnumerationIterator.java, Util/FIFO.java, Util/FilterEnumerator.java, Util/FilterIterator.java, Util/Graph.java, Util/Grapher.java, Util/HClassUtil.java, Util/Indexer.java, Util/IteratorEnumerator.java, Util/ListComparator.java, Util/MapComparator.java, Util/MaxPriorityQueue.java, Util/NullEnumerator.java, Util/ParseUtil.java, Util/PredicateWrapper.java, Util/ReferenceUnique.java, Util/ReverseEnumerator.java: Merge magic-2-0 branch back to HEAD. @MERGE: magic-2-0@ * Tools/PatMat/.cvsignore: Merge magic-2-0 branch back to HEAD. * Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/CommutativityExpander.java, Tools/PatMat/ErrorMsg.java, Tools/PatMat/Lexer.jlex, Tools/PatMat/Main.java, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Parser.cup, Tools/PatMat/README, Tools/PatMat/Spec.java, Tools/PatMat/package.html, Tools/Annotation/Lex/BooleanLiteral.java, Tools/Annotation/Lex/CharacterLiteral.java, Tools/Annotation/Lex/Comment.java, Tools/Annotation/Lex/DocumentationComment.java, Tools/Annotation/Lex/DoubleLiteral.java, Tools/Annotation/Lex/EOF.java, Tools/Annotation/Lex/EndOfLineComment.java, Tools/Annotation/Lex/EscapedUnicodeReader.java, Tools/Annotation/Lex/FloatLiteral.java, Tools/Annotation/Lex/Identifier.java, Tools/Annotation/Lex/InputElement.java, Tools/Annotation/Lex/IntegerLiteral.java, Tools/Annotation/Lex/Keyword.java, Tools/Annotation/Lex/Lexer.java, Tools/Annotation/Lex/LinePos.java, Tools/Annotation/Lex/Literal.java, Tools/Annotation/Lex/LongLiteral.java, Tools/Annotation/Lex/NullLiteral.java, Tools/Annotation/Lex/NumericLiteral.java, Tools/Annotation/Lex/Operator.java, Tools/Annotation/Lex/Separator.java, Tools/Annotation/Lex/StringLiteral.java, Tools/Annotation/Lex/Token.java, Tools/Annotation/Lex/TraditionalComment.java, Tools/Annotation/Lex/WhiteSpace.java, Tools/Annotation/Lex/package.html, Tools/Annotation/package.html: Merge magic-2-0 branch back to HEAD. @MERGE: magic-2-0@ * Tools/Annotation/.cvsignore: Merge magic-2-0 branch back to HEAD. * Tools/Annotation/Java12.cup, Tools/Annotation/Lexer.java, Tools/Annotation/Main.java, Tools/README, Test/PA/Test5/A.java, Test/PA/Test6/EscapeTest.java, Test/PA/Test3/multiset.java, Test/PA/Test4/Sum.java, Test/PA/Hashtable.template, Test/PA/Str2StrMap.java, Test/PA/Test1/complex.java, Test/PA/Test2/Server.java, Test/PA/s, Support/NullCodeGen.template, Support/_200_check-root-set, Support/_202_jess-root-set, Support/cpzip.jar, Support/datagram-root-set, Support/jasmin.jar, Support/locale-root-set, Support/mipsda-makefile.template, Support/nativecode-makefile.template, Support/precisec-makefile.template, Support/realtime.jar, Support/reflect-thunk.jar, Support/rmi-root-set, Support/samain-root-set, Support/servo.jar, Support/video.jar, Support/volano-root-set, Temp/CloningTempMap.java, Temp/Label.java, Temp/LabelList.java, Temp/Temp.java, Temp/TempFactory.java, Temp/TempList.java, Temp/TempMap.java, Temp/WritableTempMap.java, Temp/package.html, Test/EventDriven/EventDriven3, Test/EventDriven/WebServer.jar, Support/CUP.jar, Support/Jasminpatch, Support/Jasminpatch2, Support/Lex.jar, Runtime/PreciseGC/WriteBarrier.java, Runtime/Transactions/CommitRecord.java, Runtime/Transactions/TransactionAbortException.java, Runtime/Transactions/package.html: Merge magic-2-0 branch back to HEAD. @MERGE: magic-2-0@ * Runtime/AltArray/.cvsignore: Merge magic-2-0 branch back to HEAD. * Runtime/AltArray/ArrayImplJavaType.jt, Runtime/AltArray/ChunkArrayJavaType.jt, Runtime/AltArray/SimpleArrayJavaType.jt, Runtime/AltArray/package.html, NOTES/BackendTODO, NOTES/OptimizationsTODO, NOTES/codegen-out.java, NOTES/instr-selection-tool, NOTES/jls.problems, RunTime/Monitor.properties, Runtime/ArrayCopy.java, Runtime/CounterSupport.java, Runtime/Counters.java, Runtime/MZFExternalMap.java, Runtime/package.html, Main/Run.java, Main/SAMain.java, Main/Sizer.java, Main/TypesMain.java, Interpret/Tree/Method.java, Interpret/Tree/NativeMethod.java, Interpret/Tree/NativeStackFrame.java, Interpret/Tree/NullNativeMethod.java, Interpret/Tree/ObjectRef.java, Interpret/Tree/OffsetMap.java, Interpret/Tree/OffsetMap32.java, Interpret/Tree/Pointer.java, Interpret/Tree/PointerTypeChangedException.java, Interpret/Tree/README, Interpret/Tree/Ref.java, Interpret/Tree/StackFrame.java, Interpret/Tree/StaticState.java, Interpret/Tree/StringPointer.java, Interpret/Tree/Support.java, Interpret/Tree/TestRun.java, Interpret/Tree/TreeStackFrame.java, Interpret/Tree/UndefinedPointer.java, Interpret/Tree/UndefinedRef.java, Interpret/Tree/package.html, Main/CHStats.java, Main/CallGraph.java, Main/EDMain.java, Main/EDXMain.java, Main/EventDriven.java, Main/Graph.java, Main/JMain.java, Main/Lint.java, Main/Main.java, Main/ODPAMain.java, Main/Options.java, Main/PAMain.java, Main/ProfileMain.java, Main/Raw.java, Interpret/Tree/AllocationInfo.java, Interpret/Tree/AllocationStrategy.java, Interpret/Tree/ArrayPointer.java, Interpret/Tree/ArrayRef.java, Interpret/Tree/ClazPointer.java, Interpret/Tree/ConstPointer.java, Interpret/Tree/Debug.java, Interpret/Tree/DefaultAllocationStrategy.java, Interpret/Tree/DefaultFrame.java, Interpret/Tree/FieldPointer.java, Interpret/Tree/FieldValueList.java, Interpret/Tree/HCLibrary.java, Interpret/Tree/HClassInfo.java, Interpret/Tree/INClass.java, Interpret/Tree/INFile.java, Interpret/Tree/INFileInputStream.java, Interpret/Tree/INFileOutputStream.java, Interpret/Tree/INFloatDouble.java, Interpret/Tree/INObject.java, Interpret/Tree/INRandomAccessFile.java, Interpret/Tree/INRuntime.java, Interpret/Tree/INString.java, Interpret/Tree/INSystem.java, Interpret/Tree/InterfaceList.java, Interpret/Tree/InterfaceListPointer.java, Interpret/Tree/InterpretedThrowable.java, Interpret/Tree/InterpreterAllocationStrategy.java, Interpret/Tree/InterpreterCachingCodeFactory.java, Interpret/Tree/InterpreterOffsetMap.java, IR/Tree/PreciselyTyped.java, IR/Tree/Print.java, IR/Tree/README, IR/Tree/RETURN.java, IR/Tree/SEGMENT.java, IR/Tree/SEQ.java, IR/Tree/Stm.java, IR/Tree/StmList.java, IR/Tree/TEMP.java, IR/Tree/THROW.java, IR/Tree/ToCanonicalTree.java, IR/Tree/ToTree.java, IR/Tree/ToTreeHelpers.java, IR/Tree/Translation.java, IR/Tree/Tree.java, IR/Tree/TreeCode.java, IR/Tree/TreeDerivation.java, IR/Tree/TreeFactory.java, IR/Tree/TreeGrapher.java, IR/Tree/TreeKind.java, IR/Tree/TreeUseDefer.java, IR/Tree/TreeVerifyingVisitor.java, IR/Tree/TreeVisitor.java, IR/Tree/Type.java, IR/Tree/Typed.java, IR/Tree/UNOP.java, IR/Tree/Uop.java, IR/Tree/package.html, Interpret/Quads/ArrayRef.java, Interpret/Quads/FieldValueList.java, Interpret/Quads/HCLibrary.java, Interpret/Quads/INClass.java, Interpret/Quads/INClassLoader.java, Interpret/Quads/INFile.java, Interpret/Quads/INFileInputStream.java, Interpret/Quads/INFileOutputStream.java, Interpret/Quads/INFileSystem.java, Interpret/Quads/INFloatDouble.java, Interpret/Quads/INMath.java, Interpret/Quads/INObject.java, Interpret/Quads/INRandomAccessFile.java, Interpret/Quads/INResourceBundle.java, Interpret/Quads/INRuntime.java, Interpret/Quads/INString.java, Interpret/Quads/INSystem.java, Interpret/Quads/InterpretedThrowable.java, Interpret/Quads/Method.java, Interpret/Quads/NativeMethod.java, Interpret/Quads/NativeStackFrame.java, Interpret/Quads/NullNativeMethod.java, Interpret/Quads/ObjectRef.java, Interpret/Quads/QuadStackFrame.java, Interpret/Quads/Ref.java, Interpret/Quads/StackFrame.java, Interpret/Quads/StaticState.java, Interpret/Quads/Support.java, Interpret/Quads/package.html, IR/Tree/ALIGN.java, IR/Tree/BINOP.java, IR/Tree/Bop.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/CanonicalTreeCode.java, IR/Tree/Code.java, IR/Tree/DATUM.java, IR/Tree/Data.java, IR/Tree/DerivationGenerator.java, IR/Tree/ESEQ.java, IR/Tree/EXPR.java, IR/Tree/Exp.java, IR/Tree/ExpList.java, IR/Tree/INVOCATION.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/METHOD.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/NATIVECALL.java, IR/Tree/OPER.java, IR/Tree/OptimizedTreeCode.java, IR/RawClass/AccessFlags.java, IR/RawClass/Attribute.java, IR/RawClass/AttributeCode.java, IR/RawClass/AttributeConstantValue.java, IR/RawClass/AttributeExceptions.java, IR/RawClass/AttributeInnerClasses.java, IR/RawClass/AttributeLineNumberTable.java, IR/RawClass/AttributeLocalVariableTable.java, IR/RawClass/AttributeSourceFile.java, IR/RawClass/AttributeSynthetic.java, IR/RawClass/AttributeUnknown.java, IR/RawClass/ClassDataException.java, IR/RawClass/ClassDataInputStream.java, IR/RawClass/ClassDataOutputStream.java, IR/RawClass/ClassFile.java, IR/RawClass/Constant.java, IR/RawClass/ConstantClass.java, IR/RawClass/ConstantDouble.java, IR/RawClass/ConstantFieldref.java, IR/RawClass/ConstantFloat.java, IR/RawClass/ConstantInteger.java, IR/RawClass/ConstantInterfaceMethodref.java, IR/RawClass/ConstantLong.java, IR/RawClass/ConstantMethodref.java, IR/RawClass/ConstantNameAndType.java, IR/RawClass/ConstantString.java, IR/RawClass/ConstantUtf8.java, IR/RawClass/ConstantValue.java, IR/RawClass/ExceptionTable.java, IR/RawClass/FieldInfo.java, IR/RawClass/InnerClass.java, IR/RawClass/LineNumberTable.java, IR/RawClass/LocalVariableTable.java, IR/RawClass/MethodInfo.java, IR/RawClass/README, IR/RawClass/package.html, IR/Quads/AGET.java, IR/Quads/ALENGTH.java, IR/Quads/ANEW.java, IR/Quads/ARRAYINIT.java, IR/Quads/ASET.java, IR/Quads/CALL.java, IR/Quads/CJMP.java, IR/Quads/COMPONENTOF.java, IR/Quads/CONST.java, IR/Quads/CleanHandlers.java, IR/Quads/CloneSynthesizer.java, IR/Quads/Code.java, IR/Quads/DEBUG.java, IR/Quads/Edge.java, IR/Quads/Eval.java, IR/Quads/FOOTER.java, IR/Quads/GET.java, IR/Quads/HANDLER.java, IR/Quads/HEADER.java, IR/Quads/HandInfo.java, IR/Quads/HandlerSet.java, IR/Quads/HashMapList.java, IR/Quads/INSTANCEOF.java, IR/Quads/LABEL.java, IR/Quads/METHOD.java, IR/Quads/MONITORENTER.java, IR/Quads/MONITOREXIT.java, IR/Quads/MOVE.java, IR/Quads/NEW.java, IR/Quads/NOP.java, IR/Quads/OPER.java, IR/Quads/OperVisitor.java, IR/Quads/PHI.java, IR/Quads/Pattern.java, IR/Quads/Peephole.java, IR/Quads/Print.java, IR/Quads/Prune.java, IR/Quads/Qop.java, IR/Quads/Quad.java, IR/Quads/QuadFactory.java, IR/Quads/QuadKind.java, IR/Quads/QuadNoSSA.java, IR/Quads/QuadRSSx.java, IR/Quads/QuadSSA.java, IR/Quads/QuadSSI.java, IR/Quads/QuadVisitor.java, IR/Quads/QuadWithTry.java, IR/Quads/README, IR/Quads/RETURN.java, IR/Quads/RSSxToNoSSA.java, IR/Quads/ReHandler.java, IR/Quads/ReHandlerToSSA.java, IR/Quads/SET.java, IR/Quads/SIGMA.java, IR/Quads/SSIRename.java, IR/Quads/SSIToSSA.java, IR/Quads/SWITCH.java, IR/Quads/TESTER.java, IR/Quads/THROW.java, IR/Quads/TYPECAST.java, IR/Quads/TYPESWITCH.java, IR/Quads/TempChain.java, IR/Quads/ThreadInliner.java, IR/Quads/ToNoSSA.java, IR/Quads/Translate.java, IR/Quads/UnHandler.java, IR/Quads/XI.java, IR/Quads/package.html, IR/LowQuad/LowQuad.java, IR/LowQuad/LowQuadFactory.java, IR/LowQuad/LowQuadKind.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java, IR/LowQuad/LowQuadSSI.java, IR/LowQuad/LowQuadVisitor.java, IR/LowQuad/PAOFFSET.java, IR/LowQuad/PARRAY.java, IR/LowQuad/PCALL.java, IR/LowQuad/PCONST.java, IR/LowQuad/PFCONST.java, IR/LowQuad/PFIELD.java, IR/LowQuad/PFOFFSET.java, IR/LowQuad/PGET.java, IR/LowQuad/PMCONST.java, IR/LowQuad/PMETHOD.java, IR/LowQuad/PMOFFSET.java, IR/LowQuad/POPER.java, IR/LowQuad/PPTR.java, IR/LowQuad/PSET.java, IR/LowQuad/README, IR/LowQuad/Translate.java, IR/LowQuad/package.html, IR/Properties/CFGEdge.java, IR/Properties/CFGraphable.java, IR/Properties/CFGrapher.java, IR/Properties/Edges.java, IR/Properties/Renameable.java, IR/Properties/UseDef.java, IR/Properties/UseDefable.java, IR/Properties/UseDefer.java, IR/Properties/package.html, IR/LowQuad/Code.java, IR/LowQuad/DerivationMap.java, IR/LowQuad/LQop.java, IR/Jasmin/Jasmin.java, IR/Jasmin/TempInfo.java, IR/Jasmin/package.html, IR/Assem/InstrCALL.java, IR/Assem/InstrDIRECTIVE.java, IR/Assem/InstrEdge.java, IR/Assem/InstrFactory.java, IR/Assem/InstrGroup.java, IR/Assem/InstrJUMP.java, IR/Assem/InstrLABEL.java, IR/Assem/InstrMEM.java, IR/Assem/InstrMOVE.java, IR/Assem/InstrVisitor.java, IR/Assem/README, IR/Assem/package.html, IR/Bytecode/Code.java, IR/Bytecode/InCti.java, IR/Bytecode/InGen.java, IR/Bytecode/InMerge.java, IR/Bytecode/InRet.java, IR/Bytecode/InSwitch.java, IR/Bytecode/Instr.java, IR/Bytecode/Liveness.java, IR/Bytecode/Op.java, IR/Bytecode/OpClass.java, IR/Bytecode/OpConstant.java, IR/Bytecode/OpField.java, IR/Bytecode/OpLocalVariable.java, IR/Bytecode/OpMethod.java, IR/Bytecode/Operand.java, IR/Bytecode/package.html, IR/Assem/Code.java, IR/Assem/Instr.java, IR/AIRE/IR_DelayMechanism.java, IR/AIRE/IR_Kind.java, IR/AIRE/IR_Mode.java, IR/AIRE/IR_Pure.java, IR/AIRE/IR_SignalKind.java, IR/AIRE/IR_SourceLanguage.java, Contrib/getopt/package.html, IR/Registration.java, IR/package.html, ClassFile/DuplicateClassException.java, ClassFile/DuplicateMemberException.java, ClassFile/Factories.java, ClassFile/HArrayField.java, ClassFile/HArrayMethod.java, ClassFile/HClass.java, ClassFile/HClassArray.java, ClassFile/HClassArraySyn.java, ClassFile/HClassCls.java, ClassFile/HClassImpl.java, ClassFile/HClassMutator.java, ClassFile/HClassPrimitive.java, ClassFile/HClassProxy.java, ClassFile/HClassSyn.java, ClassFile/HCode.java, ClassFile/HCodeAndMaps.java, ClassFile/HCodeElement.java, ClassFile/HCodeFactory.java, ClassFile/HConstructor.java, ClassFile/HConstructorImpl.java, ClassFile/HConstructorProxy.java, ClassFile/HConstructorSyn.java, ClassFile/HData.java, ClassFile/HDataElement.java, ClassFile/HField.java, ClassFile/HFieldImpl.java, ClassFile/HFieldMutator.java, ClassFile/HFieldProxy.java, ClassFile/HFieldSyn.java, ClassFile/HInitializer.java, ClassFile/HInitializerImpl.java, ClassFile/HInitializerProxy.java, ClassFile/HInitializerSyn.java, ClassFile/HMember.java, ClassFile/HMemberProxy.java, ClassFile/HMethod.java, ClassFile/HMethodImpl.java, ClassFile/HMethodMutator.java, ClassFile/HMethodProxy.java, ClassFile/HMethodSyn.java, ClassFile/HPointer.java, ClassFile/ImplGNU.java, ClassFile/ImplMagic.java, ClassFile/Linker.java, ClassFile/Loader.java, ClassFile/NoSuchClassException.java, ClassFile/NoSuchMemberException.java, ClassFile/Relinker.java, ClassFile/SerializableCodeFactory.java, ClassFile/UniqueName.java, ClassFile/package.html, Backend/StrongARM/Frame.java, Backend/StrongARM/InstrBuilder.java, Backend/StrongARM/README, Backend/StrongARM/RegFileInfo.java, Backend/StrongARM/TempBuilder.java, Backend/StrongARM/TempVisitor.java, Backend/StrongARM/TwoWordTemp.java, Backend/StrongARM/package.html, Backend/StrongARM/strongarm.flex, ClassFile/CachingCodeFactory.java, ClassFile/ClassPointer.java: Merge magic-2-0 branch back to HEAD. @MERGE: magic-2-0@ * Backend/StrongARM/.cvsignore: Merge magic-2-0 branch back to HEAD. * Backend/StrongARM/AccelRFInfo.java, Backend/StrongARM/Code.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/CodeGen.spec.coarseInstrs, Backend/StrongARM/CodeGen.spec.instrGroups: Merge magic-2-0 branch back to HEAD. @MERGE: magic-2-0@ * Backend/Sparc/.cvsignore: Merge magic-2-0 branch back to HEAD. * Backend/Runtime2/TreeBuilder.java, Backend/Sparc/Code.java, Backend/Sparc/CodeGen.spec, Backend/Sparc/Frame.java, Backend/Sparc/InstrBuilder.java, Backend/Sparc/README, Backend/Sparc/RegFileInfo.java, Backend/Sparc/TempBuilder.java, Backend/Sparc/package.html, Backend/Runtime1/DataConfigChecker.java, Backend/Runtime1/DataGC.java, Backend/Runtime1/DataInitializers.java, Backend/Runtime1/DataInterfaceList.java, Backend/Runtime1/DataJavaMain.java, Backend/Runtime1/DataReflection1.java, Backend/Runtime1/DataReflection2.java, Backend/Runtime1/DataReflectionMemberList.java, Backend/Runtime1/DataStaticFields.java, Backend/Runtime1/DataStrings.java, Backend/Runtime1/MallocAllocationStrategy.java, Backend/Runtime1/NiftyAllocationStrategy.java, Backend/Runtime1/NullAllocationStrategy.java, Backend/Runtime1/ObjectBuilder.java, Backend/Runtime1/Runtime.java, Backend/Runtime1/RuntimeInformation.java, Backend/Runtime1/SPAllocationStrategy.java, Backend/Runtime1/StubCode.java, Backend/Runtime1/TreeBuilder.java, Backend/Runtime1/class-root.properties, Backend/Runtime1/field-root.properties, Backend/Runtime1/init-safe.properties, Backend/Runtime1/method-root.properties, Backend/Runtime1/mzf-unsafe.properties, Backend/Runtime1/package.html, Backend/Runtime1/transact-safe.properties, Backend/Runtime1/writebarrier-safe.properties, Backend/Runtime2/Runtime.java, Backend/Runtime1/AllocationStrategy.java, Backend/Runtime1/AppelAllocationStrategy.java, Backend/Runtime1/BDWAllocationStrategy.java, Backend/Runtime1/Data.java, Backend/Runtime1/DataClaz.java, Backend/Maps/MethodMap.java, Backend/Maps/NameMap.java, Backend/Maps/package.html, Backend/Pentium/README, Backend/PreciseC/Frame.java, Backend/PreciseC/IdentifyNoHandler.java, Backend/PreciseC/PGCNiftyAllocationStrategy.java, Backend/PreciseC/PGCNiftyAllocationStrategyWithStats.java, Backend/PreciseC/TreeToC.java, Backend/PreciseC/package.html, Backend/Maps/BackendDerivation.java, Backend/Maps/CHFinalMap.java, Backend/Maps/ClassDepthMap.java, Backend/Maps/DefaultClassDepthMap.java, Backend/Maps/DefaultFinalMap.java, Backend/Maps/DefaultInlineMap.java, Backend/Maps/DefaultNameMap.java, Backend/Maps/FieldMap.java, Backend/Maps/FinalMap.java, Backend/Maps/InlineMap.java: Merge magic-2-0 branch back to HEAD. @MERGE: magic-2-0@ * Backend/MIPS/.cvsignore: Merge magic-2-0 branch back to HEAD. * Backend/MIPS/BypassLatchSchedule.java, Backend/MIPS/Code.java, Backend/MIPS/CodeGen.spec, Backend/MIPS/Frame.java, Backend/MIPS/InstrBuilder.java, Backend/MIPS/RegFileInfo.java, Backend/MIPS/StackInfo.java, Backend/MIPS/TempBuilder.java, Backend/MIPS/TempVisitor.java, Backend/MIPS/package.html, Backend/JavaByte/README, Backend/Jouette/CodeGen.spec, Backend/Generic/Code.java, Backend/Generic/CodeGen.java, Backend/Generic/Frame.java, Backend/Generic/GCInfo.java, Backend/Generic/InstrBuilder.java, Backend/Generic/LocationFactory.java, Backend/Generic/MaxMunchCG.java, Backend/Generic/README, Backend/Generic/RegFileInfo.java, Backend/Generic/RegUseDefer.java, Backend/Generic/Runtime.java, Backend/Generic/RuntimeInformation.java, Backend/Generic/TempBuilder.java, Backend/Generic/package.html, Backend/CSAHack/RegAlloc/Code.java, Backend/CSAHack/RegAlloc/Color.java, Backend/CSAHack/RegAlloc/DerivationGenerator.java, Backend/CSAHack/RegAlloc/InterferenceGraph.java, Backend/CSAHack/RegAlloc/Liveness.java, Backend/CSAHack/RegAlloc/MoveList.java, Backend/CSAHack/RegAlloc/RegAlloc.java, Backend/CSAHack/RegAlloc/RegWork.java, Backend/CSAHack/RegAlloc/Set.java, Backend/CSAHack/RegAlloc/Spiller.java, Backend/CSAHack/Graph/Graph.java, Backend/CSAHack/Graph/Node.java, Backend/CSAHack/Graph/NodeList.java, Backend/CSAHack/FlowGraph/AssemFlowGraph.java, Backend/CSAHack/FlowGraph/FlowGraph.java, Backend/Analysis/BasicGCInfo.java, Backend/Analysis/ClassFieldMap.java, Backend/Analysis/ClassMethodMap.java, Backend/Analysis/GCTraceStore.java, Backend/Analysis/InitializerOrdering.java, Backend/Analysis/InsertWriteBarrier.java, Backend/Analysis/InterfaceMethodMap.java, Backend/Analysis/JLSRuntimeInformation.java, Backend/Analysis/MakeGCThreadSafe.java, Backend/Analysis/PackedClassFieldMap.java, Backend/Analysis/SortedClassFieldMap.java, Backend/Analysis/SunJDKRuntimeInformation.java, Backend/Analysis/package.html, Analysis/Tree/AlgebraicSimplification.java, Analysis/Tree/CacheEquivalence.java, Analysis/Tree/Canonicalize.java, Analysis/Tree/ConstantPropagation.java, Analysis/Tree/DeadCodeElimination.java, Analysis/Tree/DerivationChecker.java, Analysis/Tree/DominatingMemoryAccess.java, Analysis/Tree/JumpOptimization.java, Analysis/Tree/MemHoisting.java, Analysis/Tree/Simplification.java, Analysis/Tree/TreeFolding.java, Analysis/Tree/package.html, Analysis/TypeInference/AuxUniqueFIFO.java, Analysis/TypeInference/ClassCone.java, Analysis/TypeInference/FieldType.java, Analysis/TypeInference/InterProc.java, Analysis/TypeInference/IntraProc.java, Analysis/TypeInference/SetHClass.java, Analysis/Transformation/MethodMutator.java, Analysis/Transformation/MethodSplitter.java, Analysis/Transformation/package.html, Analysis/Transactions/SimpleCheckOracle.java, Analysis/Transactions/SimpleFieldOracle.java, Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreePostPass.java, Analysis/Transactions/package.html, Analysis/SizeOpt/Field2Method.java, Analysis/SizeOpt/FieldReducer.java, Analysis/SizeOpt/MZFChooser.java, Analysis/SizeOpt/MZFCompressor.java, Analysis/SizeOpt/MZFExternalize.java, Analysis/SizeOpt/MZFWidenType.java, Analysis/SizeOpt/MostlyZeroFinder.java, Analysis/SizeOpt/ProfileParser.java, Analysis/SizeOpt/SizeCounters.java, Analysis/SizeOpt/package.html, Analysis/Transactions/AnalysisCheckOracle.java, Analysis/Transactions/ArrayCopyImplementer.java, Analysis/Transactions/BitFieldNumbering.java, Analysis/Transactions/CheckOracle.java, Analysis/Transactions/CloneImplementer.java, Analysis/Transactions/DominatingCheckOracle.java, Analysis/Transactions/FieldOracle.java, Analysis/Transactions/GlobalFieldOracle.java, Analysis/Transactions/HoistingCheckOracle.java, Analysis/RoleInference/LocalVariableNamer.java, Analysis/RoleInference/RoleInference.java, Analysis/SizeOpt/BitWidthAnalysis.java, Analysis/SizeOpt/ConstructorClassifier.java, Analysis/Realtime/AllCheckRemoval.java, Analysis/Realtime/CheckAdder.java, Analysis/Realtime/CheckAdderNoSSA.java, Analysis/Realtime/CheckAdderWithTry.java, Analysis/Realtime/CheckRemoval.java, Analysis/Realtime/CheesyPACheckRemoval.java, Analysis/Realtime/ClassReplacer.java, Analysis/Realtime/HeapCheckAdder.java, Analysis/Realtime/NoHeapCheckRemoval.java, Analysis/Realtime/PACheckRemoval.java, Analysis/Realtime/PrintFactory.java, Analysis/Realtime/QuantaChecker.java, Analysis/Realtime/README, Analysis/Realtime/Realtime.java, Analysis/Realtime/RealtimeAllocationStrategy.java, Analysis/Realtime/RealtimeRuntime.java, Analysis/Realtime/SimpleCheckRemoval.java, Analysis/Realtime/Stats.java, Analysis/Realtime/ThreadToRealtimeThread.java, Analysis/Realtime/package.html, Analysis/Quads/SCC/SCCAnalysis.java, Analysis/Quads/SCC/SCCOptimize.java, Analysis/Quads/SCC/package.html, Analysis/Quads/ArrayInitRemover.java, Analysis/Quads/ArrayUnroller.java, Analysis/Quads/BasicCSE.java, Analysis/Quads/CallGraph.java, Analysis/Quads/CallGraphImpl.java, Analysis/Quads/CallGraphImpl2.java, Analysis/Quads/CoalescingToNoSSA.java, Analysis/Quads/CollectSyncStats.java, Analysis/Quads/ComponentOfReducer.java, Analysis/Quads/DeadCode.java, Analysis/Quads/DefiniteInitOracle.java, Analysis/Quads/DispatchTreeTransformation.java, Analysis/Quads/FieldSyncOracle.java, Analysis/Quads/InitializerTransform.java, Analysis/Quads/MayReadOracle.java, Analysis/Quads/MemoryOptimization.java, Analysis/Quads/MethodInliningCodeFactory.java, Analysis/Quads/MethodTraceFactory.java, Analysis/Quads/MustParamOracle.java, Analysis/Quads/NewMover.java, Analysis/Quads/Nonvirtualize.java, Analysis/Quads/QuadClassHierarchy.java, Analysis/Quads/QuadCounter.java, Analysis/Quads/QuadInterferenceGraph.java, Analysis/Quads/QuadLiveness.java, Analysis/Quads/SSIStats.java, Analysis/Quads/SSIToSSAMap.java, Analysis/Quads/SimpleConstMap.java, Analysis/Quads/SmallMethodInliner.java, Analysis/Quads/TypeInfo.java, Analysis/Quads/TypeSwitchRemover.java, Analysis/Quads/Unreachable.java, Analysis/Quads/package.html, Analysis/PreciseGC/AllocationHoisting.java, Analysis/PreciseGC/MRA.java, Analysis/PreciseGC/MRAFactory.java, Analysis/PreciseGC/WriteBarrierConstElim.java, Analysis/PreciseGC/WriteBarrierData.java, Analysis/PreciseGC/WriteBarrierPostPass.java, Analysis/PreciseGC/WriteBarrierPrePass.java, Analysis/PreciseGC/WriteBarrierQuadPass.java, Analysis/PreciseGC/WriteBarrierStats.java, Analysis/PreciseGC/WriteBarrierTreePass.java, Analysis/PointerAnalysis/ODMAInfo.java, Analysis/PointerAnalysis/ODNodeStatus.java, Analysis/PointerAnalysis/ODParIntGraph.java, Analysis/PointerAnalysis/ODParIntGraphPair.java, Analysis/PointerAnalysis/ODPointerAnalysis.java, Analysis/PointerAnalysis/PAEdge.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEdgeVisitor.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PALoad.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PANodeVisitor.java, Analysis/PointerAnalysis/PASync.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/PAWorkList.java, Analysis/PointerAnalysis/PAWorkSet.java, Analysis/PointerAnalysis/PAWorkStack.java, Analysis/PointerAnalysis/ParActionVisitor.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/ParIntGraphPair.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/Stats.java, Analysis/PointerAnalysis/SyncElimination.java, Analysis/PointerAnalysis/AbstrPAEdgeSet.java, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/ActionVisitor.java, Analysis/PointerAnalysis/AllocationNumbering.java, Analysis/PointerAnalysis/ArtificialTempFactory.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/EdgeOrdering.java, Analysis/PointerAnalysis/EdgesNCallees.java, Analysis/PointerAnalysis/InstrumentAllocs.java, Analysis/PointerAnalysis/InstrumentSyncOps.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/LightPAEdgeSet.java, Analysis/PointerAnalysis/ListCell.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/Matching.java, Analysis/PointerAnalysis/MethodHole.java, Analysis/PointerAnalysis/MyAP.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/ODInformation.java, Analysis/PointerAnalysis/ODInterProcPA.java, Analysis/MetaMethods/MetaMethod.java, Analysis/MetaMethods/SmartCallGraph.java, Analysis/Partition/Main.java, Analysis/Partition/Partition.java, Analysis/Partition/PartitionGraphViewer.java, Analysis/Partition/WGNode.java, Analysis/Partition/WeightedGraph.java, Analysis/Maps/ConstMapProxy.java, Analysis/Maps/DefaultMap.java, Analysis/Maps/Derivation.java, Analysis/Maps/ExactTypeMap.java, Analysis/Maps/ExactTypeMapProxy.java, Analysis/Maps/ExecMap.java, Analysis/Maps/ExecMapProxy.java, Analysis/Maps/InvariantsMap.java, Analysis/Maps/MapProxy.java, Analysis/Maps/SetTypeMap.java, Analysis/Maps/TypeMap.java, Analysis/Maps/TypeMapProxy.java, Analysis/Maps/UseDefMap.java, Analysis/MetaMethods/FakeMetaCallGraph.java, Analysis/MetaMethods/GenType.java, Analysis/MetaMethods/MetaAllCallers.java, Analysis/MetaMethods/MetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphAbstr.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/Maps/AllInductionsMap.java, Analysis/Maps/AllocationInformation.java, Analysis/Maps/BasicInductionsMap.java, Analysis/Maps/ConstMap.java, Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/BasicInductions.java, Analysis/LowQuad/Loop/Induction.java, Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopInvariance.java, Analysis/LowQuad/Loop/LoopMap.java, Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/LowQuad/Loop/MyLowQuadNoSSA.java, Analysis/LowQuad/Loop/MyLowQuadSSI.java, Analysis/LowQuad/Loop/WorkTempMap.java, Analysis/LowQuad/Loop/package.html, Analysis/Loops/Loops.java, Analysis/Loops/package.html, Analysis/LowQuad/DerivationChecker.java, Analysis/LowQuad/package.html, Analysis/Instr/BasePointerPreservingUseDefer.java, Analysis/Instr/Check.java, Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/EqTempSets.java, Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/HTempMap.java, Analysis/Instr/IgnoreSpillUseDefer.java, Analysis/Instr/InstrMOVEproxy.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/RegAllocOpts.java, Analysis/Instr/RegFile.java, Analysis/Instr/SpillHeuristics.java, Analysis/Instr/TempInstrPair.java, Analysis/Instr/Verify.java, Analysis/Instr/Web.java, Analysis/Instr/WeightedSet.java, Analysis/Instr/package.html, Analysis/Loops/LoopFinder.java, Analysis/Instr/AppelRegAlloc.java, Analysis/Instr/AppelRegAllocClasses.java, Analysis/Instr/AppelRegAllocFsk.java, Analysis/Instr/AppelRegAllocStd.java, Analysis/GraphColoring/AbstractGraph.java, Analysis/GraphColoring/Color.java, Analysis/GraphColoring/ColorFactory.java, Analysis/GraphColoring/ColorableGraph.java, Analysis/GraphColoring/ColorableGraphImpl.java, Analysis/GraphColoring/ColorableNode.java, Analysis/GraphColoring/DefaultSparseNode.java, Analysis/GraphColoring/DirectedGraph.java, Analysis/GraphColoring/EdgeNotPresentException.java, Analysis/GraphColoring/Graph.java, Analysis/GraphColoring/GraphColorer.java, Analysis/GraphColoring/GraphImpl.java, Analysis/GraphColoring/GraphVisualizer.java, Analysis/GraphColoring/IllegalEdgeException.java, Analysis/GraphColoring/NoFactorySetException.java, Analysis/GraphColoring/Node.java, Analysis/GraphColoring/NodeAlreadyColoredException.java, Analysis/GraphColoring/NodeNotColoredException.java, Analysis/GraphColoring/NodeNotPresentInGraphException.java, Analysis/GraphColoring/NodeNotRemovedException.java, Analysis/GraphColoring/ObjectNotModifiableException.java, Analysis/GraphColoring/OptimisticGraphColorer.java, Analysis/GraphColoring/SimpleGraphColorer.java, Analysis/GraphColoring/SparseGraph.java, Analysis/GraphColoring/SparseNode.java, Analysis/GraphColoring/UnableToColorGraph.java, Analysis/GraphColoring/UnboundedGraphColorer.java, Analysis/GraphColoring/WrongNodeTypeException.java, Analysis/GraphColoring/package.html, Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/BMethod.java, Analysis/EventDriven/CloningVisitor.java, Analysis/EventDriven/ContCode.java, Analysis/EventDriven/ContCodeNoSSA.java, Analysis/EventDriven/ContCodeSSI.java, Analysis/EventDriven/EventDriven.java, Analysis/EventDriven/EventDrivenCode.java, Analysis/EventDriven/LockRemove.java, Analysis/EventDriven/ToAsync.java, Analysis/DataFlow/ForwardDataFlowQuadVisitor.java, Analysis/DataFlow/InstrSolver.java, Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/LiveVars.java, Analysis/DataFlow/QuadEnumerator.java, Analysis/DataFlow/ReachingDefs.java, Analysis/DataFlow/ReachingHCodeElements.java, Analysis/DataFlow/ReversePostOrderEnumerator.java, Analysis/DataFlow/ReversePostOrderIterator.java, Analysis/DataFlow/Solver.java, Analysis/DataFlow/SpaceHeavyLiveTemps.java, Analysis/DataFlow/TreeSolver.java, Analysis/DataFlow/package.html, Analysis/EnvBuilder/EnvBuilder.java, Analysis/EnvBuilder/EnvCode.java, Analysis/DataFlow/BackwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/BackwardDataFlowQuadVisitor.java, Analysis/DataFlow/CachingLiveTemps.java, Analysis/DataFlow/DESIGN, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/DataFlow/DataFlowQuadVisitor.java, Analysis/DataFlow/ForwardDataFlowBasicBlockVisitor.java, Analysis/Counters/CounterFactory.java, Analysis/Counters/EpilogMutator.java, Analysis/Counters/RuntimeMethodCloner.java, Analysis/Counters/package.html, Analysis/ContBuilder/ContBuilder.java, Analysis/DefaultAllocationInformation.java, Analysis/DomFrontier.java, Analysis/DomTree.java, Analysis/EdgesIterator.java, Analysis/FCFGBasicBlock.java, Analysis/InterferenceGraph.java, Analysis/Liveness.java, Analysis/Place.java, Analysis/ReachingDefs.java, Analysis/ReachingDefsAltImpl.java, Analysis/ReachingDefsCachingImpl.java, Analysis/ReachingDefsImpl.java, Analysis/SESE.java, Analysis/SSxReachingDefsImpl.java, Analysis/TypeInfo.java, Analysis/UseDef.java, Analysis/UseDefChecker.java, Analysis/package.html, Analysis/AllCallers.java, Analysis/AllocationInformationMap.java, Analysis/BasicBlock.java, Analysis/BasicBlockFactoryInterf.java, Analysis/BasicBlockInterf.java, Analysis/BasicBlockInterfVisitor.java, Analysis/CallGraph.java, Analysis/ClassHierarchy.java, Analysis/CycleEq.java: Merge magic-2-0 branch back to HEAD. @MERGE: magic-2-0@ * .cvsignore: Merge magic-2-0 branch back to HEAD. * GNUmakefile, SELF-BUILDING, TODO, prj.el: Merge magic-2-0 branch back to HEAD. @MERGE: magic-2-0@ 2002-02-06 witchel * Analysis/Tree/DominatingMemoryAccess.java: Commit random permuter for DA register allocator. Take out an unnecessary call to DomTree. Boy, this checkin was a long time coming! 2002-01-16 bdemsky * ClassFile/Relinker.java: (cananian change) Reverted version 1.1.4.11, which commented out some code which was, indeed, needed. Added a comment to explain when it is used. 2002-01-09 salcianu * Util/LightBasicBlocks/LightBasicBlock.java, Util/BasicBlocks/BBConverter.java: Small changes 2002-01-02 bdemsky * Analysis/LowQuad/Loop/BasicInductions.java, Analysis/LowQuad/Loop/LoopAnalysis.java: fixes 2001-12-16 salcianu * Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PointsToGraph.java: Inessential changes * Util/LightBasicBlocks/LBBConverter.java, Util/LightBasicBlocks/LightBasicBlock.java, Util/LightBasicBlocks/SCCLBBFactory.java: LightBasicBlock has been modified such that it can keep pred/succ according to the exceptional flow of execution (pred = protected basic blocks, succ = handlers protecting instrs. from this basic block) LightBasicBlock has been hacked in a quite nice way, instead of subclassing. * Util/BasicBlocks/BBConverter.java, Util/BasicBlocks/CachingBBConverter.java, Util/BasicBlocks/SCCBBFactory.java: For quad-with-try, BBConverter (and all the related classes) produce FCFGBasicBlock's. Minor changes. * Analysis/Realtime/CheesyPACheckRemoval.java, Analysis/Realtime/PACheckRemoval.java: Changes to comply with the change in the MetaCallGraphImpl interface. * Analysis/DataFlow/DataFlowBasicBlockVisitor.java: We now use BasicBlockInterfVisitor instead of BasicBlockVisitor. * Analysis/FCFGBasicBlock.java: Basic blocks for the Factored Control Flow Graph (implicit and factored treatment of exceptions). * Analysis/FCFGBasicBlock.java: New file. * Analysis/BasicBlock.java: BasicBlock.Factory now implements BasicBlockFactoryInterf. * Analysis/BasicBlockFactoryInterf.java: Interface defining the common behavious for a Factory of basic blocks (BasicBlockInterf's). BasicBlock.Factory and FCFGBasicBlock.Factory both implement it. * Analysis/BasicBlockFactoryInterf.java: New file. * Analysis/BasicBlockInterfVisitor.java, Analysis/BasicBlockVisitor.java: BasicBlockInterfVisitor replaces BasicBlockVisitor. The root of the hierarchy of basic block like classes is no longer BasicBlock (as John Whaley expected when he first wrote BasicBlock.java) but BasicBlockInterf. * Analysis/BasicBlockInterfVisitor.java: New file. * Analysis/BasicBlockInterf.java: The FCFGBasicBlock class (soon to be commited) is a basic block structure for the Factored Control Flow Graph (implicit and factored treatment of exceptions). As an FCFGBasicBlock is not a normal BasicBlock, I didn't want to subclass it from BasicBlock. Instead, I introduced an interface to capture the common traits of BasicBlocks and FCFGBasicBlocks. * Analysis/BasicBlockInterf.java: New file. 2001-12-15 salcianu * Util/Graph.java, Util/Util.java: A small change to make sure that the previously adverstised magic behaviour (read my previous commit message) actually happen in all cases. * Util/Graph.java: Added method printBBCFG. It produces a VCG-format of a (light) basic block CFG. It works with both CFG and Factored CFG (implicit and factored representation of exceptions). harpoon.Main.Graph was modified to use this method (in addition to its previous functionality). Type java harpoon.Main.Graph -pass to-quad BBCFG | xvcg - and something funny should happen (if you have vcg installed). * Main/EDMain.java, Main/EDXMain.java, Main/EventDriven.java, Main/Graph.java, Main/ODPAMain.java, Main/PAMain.java, Main/SAMain.java: Small modifications to comply with the latest change in the MetaCallGraphImpl class. * Analysis/MetaMethods/MetaCallGraphImpl.java: A minor change: MetaCallGraphImpl needs a CachingCodeFactory and not a BBConvertor. The BBConvertor was used just to obtain the underlying code factory. So, why not passing it directly? 2001-12-07 bdemsky * Analysis/LowQuad/Loop/BasicInductions.java: revert ovy's changes... 2001-12-06 C. Scott Ananian * Analysis/Quads/ComponentOfReducer.java: New file. * Analysis/Quads/ComponentOfReducer.java: The ComponentOfReducer pass converts some COMPONENTOF operations into more efficient INSTANCEOF operations. * Backend/Runtime1/TreeBuilder.java: Unify 'instanceof' implementation (both class and interface case) for INSTANCEOF and COMPONENTOF tests. We now re-use the same code instead of duplicating essentially identical tests in these two places. (This paves the way for unified optimizations of the interface instanceof test.) 2001-12-04 kkz * Analysis/PreciseGC/MRAFactory.java: Bug fix. Size of map may stay the same despite changes. 2001-11-27 bdemsky * Analysis/LowQuad/Loop/LoopOptimize.java: -l (loop optimization) works for "Hello World" now... Waiting for deadcode pass to be derivation safe... So right now deadcode is turned off... 2001-11-26 bdemsky * Analysis/LowQuad/Loop/MyLowQuadNoSSA.java, IR/Quads/RSSxToNoSSA.java: Fixed derivation information for newly created temps... * Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/LowQuad/Loop/MyLowQuadNoSSA.java, Analysis/LowQuad/Loop/MyLowQuadSSI.java: Fixing derivation problems with Loop Optimizations...problems still remain, but getting closer to having a working pass... * Analysis/Loops/LoopFinder.java: bug sneaked past me first time...ovy should be happy now. 2001-11-20 bdemsky * Analysis/Loops/LoopFinder.java: Shame on Scott...breaking the Loop Analysis code... So the analysis calculates the header node...then scott's code calculates the incoming edges to the header node using the CFGrapher...all is good, except the root loop has no incoming edges to the header node. Then scott's rewritten loopentrance code calls this and looks for destinations of these edges... 2001-11-20 ovy * Analysis/LowQuad/Loop/BasicInductions.java, Analysis/LowQuad/Loop/LoopAnalysis.java: Fixed two bugs in induction analysis and for-loop analysis, probably caused by code rot. -- Ovy 2001-11-19 C. Scott Ananian * ClassFile/Relinker.java: Potential sketch: un-do a hack added to the relinker when too many class/field/method equality tests depended on reference-equality. The unwrapped version of a field should almost always be the proxy. Previously, we'd try to use the 'linker' version of the proxy class when we had a local mutated version of an originally linked class. But this fails horribly when we create new classes that don't exist in the original linker. We shouldn't need to 'pretend' we've got the originally-linked class anymore. Leaving the code commented-out (instead of outright deleted) just in case there's some subtle gotcha that I'm forgetting to account for. * Main/SAMain.java: Tweak the root-set if 'mzf.compressor' is turned on. * Analysis/SizeOpt/MZFCompressor.java, Analysis/SizeOpt/MZFWidenType.java: MZFCompressor: make a better effort never to call 'convert()' on an uncallable method. Also, keep track of 'mentioned classes'. MZFWidenType: add code to widen the parameter and return types of all callable methods, and widen the declared types of all fields. This ensures proper type-safety after we've split our classes. * Analysis/SizeOpt/ConstructorClassifier.java: Add statistics code to print out some basic static statistics on the number and types of static specializations performed (these are numbers used in the PLDI'02 paper). * Runtime/MZFExternalMap.java: Make all operations on MZFExternalMap synchronized for safety when transforming multi-threaded code. * Backend/Runtime1/mzf-unsafe.properties: Add java.io.File (for 'path' field) and java.lang.ThreadGroup (because of compiled-in mentions in descriptors) to list of classes which are unsafe for us to mzf-optimize. * Analysis/SizeOpt/MZFExternalize.java: Actually turn on the field-removal code in MZFExternalize (otherwise our size statistics won't show any benefit!) * Analysis/SizeOpt/MZFChooser.java: Bug fix: we can't discriminate constructors which define fields as a simple function of the 'this' pointer, because at the point the discrimination needs to be done, 'this' isn't defined yet. 2001-11-14 C. Scott Ananian * Analysis/Counters/RuntimeMethodCloner.java, Main/SAMain.java: Bug fix: the harpoon.Analysis.Counters.RuntimeMethodCloner makes static methods out of virtual ones. When it does this, the type analysis passes no longer "know" that parameter #0 is 'this' and thus guaranteed non-null. They they complain that they can't prove that all the necessary null-checks are being done. We now add a null check to the cloned methods to fix this problem. (In doing so, we no longer can accept SSI form input to the CounterFactory; so a slight tweak to Main/SAMain was needed to give it QuadNoSSA instead.) * ClassFile/HFieldProxy.java, ClassFile/HMethodProxy.java: Be more careful about calling flushMemberMap() and updateMemberMap() when the underlying proxy's hashcode may change. In particular, we were forgetting to do this for the FieldMutator.setType() method. I also wrapped the final updateMemberMap() invocations in a finally clause, to ensure that they happen even if the underlying mutator flags an error of some sort (like a 'DuplicateMethodException', for instance). This seems to be sufficient to guarantee that HFieldProxy and HMethodProxy objects are reference-unique. * Analysis/SizeOpt/MZFCompressor.java: Be more careful about only pulling callable methods through the code factories. When chaining after FieldReducer (or any transformation which removes methods/fields) things start to break if we try to pull brand new code straight from disk all the way through the code factory path: fields and methods fail to resolve when read in from the bytecode file, for instance. We now maintain our own 'callable' Set which we can add our 'new' methods to as we create them. * Analysis/SizeOpt/MZFExternalize.java: Enable setting the 'MZF external hash map' threshold using system property harpoon.sizeopt.mzf.threshold. Default is 75%; i.e. it takes fields where more than 75% of the allocated objects have a single constant value for the field. Setting above 100% will effectively disable this transformation. * Analysis/SizeOpt/ConstructorClassifier.java, Main/SAMain.java: ConstructorClassifier now uses SimpleConstMap instead of SCCAnalysis --- which means it now also runs correctly after the BitwidthAnalysis optimizer has hyper-optimized everything. * Analysis/SizeOpt/BitWidthAnalysis.java: Print out number of classes in the class hierarchy along with all the other bitwidth statistics. We need this number to determine how effecting claz compression would be. * Analysis/Quads/SimpleConstMap.java: Add a very simple implementation of ConstMap which works just as well as SCCAnalysis as long as the HCode has been put through SCCOptimize at some point in the past. * Analysis/Quads/SimpleConstMap.java: New file. * Analysis/SizeOpt/MZFExternalize.java: Bug-fix: the INSTANCEOF test in the getter's type-check must be protected from null! We also add a pair of assertions to guarantee that the form we are creating is in fact QuadRSSx. * Main/JMain.java, IR/Quads/ReHandler.java, IR/Quads/ReHandlerToSSA.java, Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopOptimize.java: Rename harpoon.Analysis.SSITOSSAMap to harpoon.Analysis.Quads.SSIToSSAMap. @RENAME: Analysis/SSITOSSAMap Analysis/Quads/SSIToSSAMap@ * Analysis/Quads/SSIToSSAMap.java: New file. * Analysis/Quads/SSIToSSAMap.java, Analysis/SSITOSSAMap.java: Rename harpoon.Analysis.SSITOSSAMap to harpoon.Analysis.Quads.SSIToSSAMap. @RENAME: Analysis/SSITOSSAMap Analysis/Quads/SSIToSSAMap@ * Analysis/SizeOpt/ConstructorClassifier.java: Change 'SCCAnalysis' declaration in makeClassification() routine to just plain 'ConstMap', in preparation for replacement of SCCAnalysis with a SimpleConstMap. See -- after we run the bitwidth pass, the program has been super-optimized to the point where SCCAnalysis can't reconstruct all the invariants which it knows ought to be true. So it chokes and dies when run in ConstructorClassifier. I could loosen the checks in SCCAnalysis, but I prefer to use a simpler implementation of ConstMap instead -- all the constants should have been made manifest as CONSTs by the bitwidth pass, anyway. * Analysis/SizeOpt/BitWidthAnalysis.java, Analysis/Quads/SCC/SCCAnalysis.java: Parallel changes to SCCAnalysis and BitWidthAnalysis: the raiseE logic was *still* slightly wrong! As written it would infinite loop whenever the program had a PHI edge which led to itself. The rewrite should fix all known problems with raiseE (I sure hope!). * Analysis/SizeOpt/MZFCompressor.java, Analysis/SizeOpt/MZFExternalize.java: Add 'MZFExternalize' class which transforms fields into references to an external hashmap (the interface to which is defined in Runtime/MZFExternalMap). One-line change to MZFCompressor to turn this functionality on. * Analysis/SizeOpt/MZFExternalize.java: New file. * Runtime/MZFExternalMap.java: Add 'MZFExternalize' class which transforms fields into references to an external hashmap (the interface to which is defined in Runtime/MZFExternalMap). One-line change to MZFCompressor to turn this functionality on. * Runtime/MZFExternalMap.java: New file. * Analysis/SizeOpt/MZFCompressor.java, Analysis/SizeOpt/ProfileParser.java: Extended ProfileParser so that it can tell us the percentage of fields which always contain the given 'mostly' value. Interface changes mean that tweaks to MZFCompressor are needed, as well. * IR/Quads/QuadNoSSA.java: Reworked QuadNoSSA so that its constructors only pay attention to the codename of the given Code -- it no longer requires you to cast to one of the canonical subclasses of Code (QuadWithTry, QuadNoSSA, etc). This continues my effort to make it easier to implement polymorphic transformations (transformations which always yield the same form of output as they are given as input, for example). You really shouldn't have to subclass QuadRSSx (for example) to create your own Code -- it should suffice to subclass Code and declare your form with an appropriate returned string from Code.getName(). 2001-11-13 C. Scott Ananian * Analysis/SizeOpt/ProfileParser.java: Don't abort if we don't find a field: it could just mean that the Bitwidth analysis has gotten to it before us and removed it. Print a message to stderr, so we know what's going on, but continue as if nothing was wrong. * Main/SAMain.java, bin/build-spec: Require 'mzf.compressor=true' property before turning on the MZFCompressor, and tweak build-spec to automagically include mzf profiling data on the command-line if it finds an appropriately-named profile file. * Analysis/SizeOpt/MZFCompressor.java: MZFCompressor needs to move static initializers to the top-most class, or they will not be run when needed. * Main/SAMain.java: Add NewMover. Add system property to turn on MZF profile-guided transformations. * Analysis/SizeOpt/MZFCompressor.java: bug fix: pull everything through the ConstructorClassifier before we start messing with the classes. Otherwise we get "mysterious" bugs due to the ConstructorClassifer working with inconsistent versions of the code. * Main/SAMain.java: Add code to allow us to emit code for classes with very long names. Previously, the 'new FileWriter' call would throw a FileNotFoundException when the filename was too long (filenames are created from class names; long class names produce long file names) and compilation would halt. Now we catch that exception and attempt to substitute a shorter (but still unique) name. This would be easier if Sun's 'File.createTempFile' method worked as the documentation says it does; see code comments for more info. Also added a little bit more information on the problem to the error message printed when file output fails. * Analysis/SizeOpt/ProfileParser.java: I accidentally checked in a JDK1.4-ism: there's a RuntimeException constructor in 1.4 which takes a java.lang.Throwable as an argument, but all previous JDK's just have the takes-a-String constructor. Add a call to .toString() so that we compile everywhere. * Analysis/SizeOpt/MZFCompressor.java: Bug fix: instead of copying the interfaces from the *old* class to the *new* class, we were copying them from the new class to the new class. Oops. Three-character fix. * Backend/Runtime1/mzf-unsafe.properties: Add java.io.FileInputStream to the list of classes *not* to try to mzf-optimize: the 'fd' field really is needed, although all of its uses are in native code. * Analysis/SizeOpt/MZFChooser.java: Complete implementation of MZFChooser. We now handle both constant and 'known to be a parameter' cases. Input is SSA, output is RSSx. * Analysis/SizeOpt/MZFCompressor.java: Turn on MZFWidenType. Wrap the codefactory produced in a CachingCodeFactory just to be on the safe side (since many of the transformations are not idempotent). Make the widen() and wrap() methods non-private so that MZFChooser can share them. * Analysis/SizeOpt/MZFWidenType.java: Add new 'MZFWidenType' class to correct 'instanceof'-type problems that resulted from splitting types. If we had a (x instanceof Foo) expression and then Foo was split into Foo$2, Foo$1, and Foo (where Foo inherits from Foo$1 which inherites from Foo$2), then the instanceof statement needs to be transformed into (x instanceof Foo$2) to allow us to choose to instantiate any one of the split types. Likewise for TYPESWITCH, and ANEW operations must also be modified in the same way to ensure that an array formerly of type Foo[] be able to hold items of type Foo$1 and Foo$2 as well. * Analysis/SizeOpt/MZFWidenType.java: New file. * Analysis/SizeOpt/ConstructorClassifier.java: Bug-fix: don't modify 'classification' values in Map after we recursively invoke 'classifyMethod()'. Make our own copies of the Classification object! [This fixes problem where a method which invoked a 'this' constructor would get mixed up with the method it invoked.] * Analysis/SizeOpt/MZFChooser.java: New file. * Analysis/SizeOpt/MZFChooser.java, Analysis/SizeOpt/MZFCompressor.java: Start work on the transformation to use the split types generated by MZFCompressor. Fix bug where constructors-that-aren't-HConstructors were ending up in the wrong class. * Analysis/SizeOpt/ConstructorClassifier.java: Add accessor methods for the analysis results. Also make ConstructorClassifier deal with 'null' constants better. 2001-11-12 C. Scott Ananian * Analysis/SizeOpt/MZFCompressor.java, Backend/Runtime1/mzf-unsafe.properties: Add a stop-list for classes which we can't mess with without disturbing the runtime. Tweak the naming of the split classes a bit. Don't move static methods---it's unnecessary and screws with JNI method naming. These changes suffice to compile and run 'Hello, world' successfully. * Backend/Runtime1/mzf-unsafe.properties: New file. * Analysis/SizeOpt/MZFCompressor.java: Finish initial implementation of MZFCompressor. It now actually splits fields as it should. =) * ClassFile/Relinker.java: Add 'move()' method to Relinker which allows you to easily move fields and methods from one class to another (transparently updating all existing references to the fields/methods). Also fix a buglet in Relinker.makeArray() where it was impossible to create arrays of class types created by 'createMutableClass()'. * Backend/Runtime1/DataInterfaceList.java: Make sure interface list has no duplicates. (It's not a problem if it does, but it wastes space.) * Analysis/SizeOpt/Field2Method.java: Export the getter/setter-to-field maps (and their inverses), as unmodifiable maps. * ClassFile/HConstructorProxy.java, ClassFile/HFieldProxy.java, ClassFile/HInitializerProxy.java, ClassFile/HMemberProxy.java, ClassFile/HMethodProxy.java: Bug fix: 'HMemberProxy's shouldn't change their hashcode when they are relinked (otherwise the relinked members will get lost in any hashtables they are present in). 2001-11-11 kkz * Analysis/PreciseGC/AllocationHoisting.java, Analysis/PreciseGC/MRAFactory.java, Analysis/PreciseGC/WriteBarrierQuadPass.java, Main/SAMain.java: Added dynamic dispatch handling to the anaylsis and added option switches to make it easier to run benchmarks. 2001-11-11 C. Scott Ananian * Analysis/SizeOpt/MZFCompressor.java: MZFCompressor now uses the new Field2Method transformer. * Analysis/SizeOpt/Field2Method.java: Add new 'Field2Method' transformation which turns GET/SET operations on specified fields into calls to accessor (getter/setter) methods. * Analysis/SizeOpt/Field2Method.java: New file. * Util/Collections/AggregateMapFactory.java: Bug fixes for AggregateMap: throw NoSuchElementException when appropriate in entrySet().iterator().next() method; fix implementation of entrySet().remove() (size and list weren't being updated). * IR/LowQuad/LowQuadSSI.java, Analysis/Quads/TypeInfo.java: Removed 'QuadSSI' type-casts, to allow these classes to play nicer with *any* subclass of harpoon.IR.Quads.Code which reports its 'code name' to be "quad-ssi". This makes it easier to implement analyses/transformations which work on more than one code type. 2001-11-10 kkz * Analysis/PreciseGC/WriteBarrierTreePass.java: Fix for bug. After constant propagation, some parameters are constants instead of TEMPs. * Backend/PreciseC/TreeToC.java: Changes to try to get inlined write barriers. * Analysis/PreciseGC/AllocationHoisting.java, Analysis/PreciseGC/MRA.java, Analysis/PreciseGC/MRAFactory.java, Analysis/PreciseGC/WriteBarrierQuadPass.java, Main/SAMain.java: Snapshot of working analysis. 2001-11-10 C. Scott Ananian * Analysis/SizeOpt/ConstructorClassifier.java, Analysis/SizeOpt/MZFCompressor.java, Analysis/SizeOpt/ProfileParser.java: Add interrogation methods to ProfileParser and ConstructorClassifier (also turn off debugging dump in ConstructorClassifier). Add beginnings of new MZFCompressor class which will use the MZF profiling information to optimize out mostly-zero fields. Right now all it does is sort the profiling information to determine the order in which fields ought to be 'compressed' and what value they 'mostly' have. * Analysis/SizeOpt/MZFCompressor.java: New file. 2001-11-09 C. Scott Ananian * Util/ParseUtil.java: A little better input checking in ParseUtil; also make BadLineException constructor public like it should be! * Analysis/SizeOpt/ProfileParser.java: Add a class to parse the output of the SizeCounters statistics code, to guide the operation of the (to-be-written) MZFCompressor transformation. * Analysis/SizeOpt/ProfileParser.java: New file. * Analysis/Quads/NewMover.java: Don't move NEWs past SIGMAs by default. (This can create more than one NEW corresponding to a single constructor invocation, which may very well confuse people.) * Analysis/Quads/DefiniteInitOracle.java, Analysis/Quads/MayReadOracle.java: The evil optimizations to make the benchmarks work out nicely begin. This check-in adds a gnarly special case to the MayReadOracle to help improve the accuracy of DefiniteInitOracle. Basically, you can have constructors of the form: (this example taken from _202_jess) Token(Token t) { this.tag = t.tag; ... } The MayReadOracle normally says that field 'Token.tag' is "possibly read" before the write to 'this.tag'. However, in this case we know that 't.tag' is not a write to 'this.tag' because no parameters to a constructor can be 'this' (or an alias) (excluding the very first, hidden, parameter, which is *always* 'this'). So now MayReadOracle has a 'specialHandlingForConstructors' mode where it ignores writes to fields whose object ref *must* be a non-'this' parameter. This mode probably isn't useful for anything but DefiniteInitOracle --- but that's alright, turn it off if you don't need it. * Analysis/Quads/MustParamOracle.java: Add a toString() method to facilitate debugging. * Analysis/SizeOpt/ConstructorClassifier.java: Bug fix: forgot to map parameters to 'this()' constructor invocation to the parameters of the caller (parameter #1 of the callee is not necessarily parameter #1 of the caller, etc). * Analysis/SizeOpt/ConstructorClassifier.java: Update ConstructorClassifier to collect per-field information on whether a specific constructor initializes the field with a constant, a method parameter, never initializes it, or "does something else". No public interrogation methods yet; not sure yet the best way to query the data. I'll write the query methods as I write the class transformation routine that will use them. * Analysis/SizeOpt/SizeCounters.java: Bug-fix: size counters was using wrong counter names for the rounded unread/const fields tallies. 2001-11-08 C. Scott Ananian * Analysis/Quads/MustParamOracle.java: The MustParam analysis isn't terribly useful unless its query methods are public. This commit makes them public. * Analysis/SizeOpt/ConstructorClassifier.java: First commit of a new pass to identify whether certain constructors are amenable to mostly-zero field transformations. In particular, we're looking for fields which aren't written outside of the constructor, where we can prove that the value written in the constructor is either a constant, or always the same as one of the constructor parameters. Right now all this class does is identify 'subclass final' fields (definition of this term is included in the class). I'm checking it in because I'm going home and want to transfer my work to the laptop. =) * Analysis/SizeOpt/ConstructorClassifier.java: New file. * Util/Collections/GenericMultiMap.java: GenericMultiMap was wasting most of the benefits obtained by things like the BitSetFactory by iterating over elements *itself* do implement methods like 'addAll'. I suspect I broke this while trying to add the size field to the code, sigh. Well, I've fixed it now. We use operations on collections as much as possible to get the speed gains. Also fixed the implementation of 'equals' when passed 'null'. * Analysis/Quads/NewMover.java: Extend NewMover so that it can push NEWs past SIGMAs. * Util/Collections/GenericMultiMap.java: Remove unused 'size' field; fix 'isEmpty()' implementation. * Util/Collections/GenericMultiMap.java: Bug fixes to GenericMultiMap: first, the size() method could be very wrong as we can't intercept direct modifications to the Collections returned by getValues(key). I introduced this bug on 2001-11-04, sorry about that. Second, the EntrySet() and values() iterators could terminate too soon because of an 'if' which should have been a 'while'. This was another November 4th bug. It just wasn't my day, apparently. * Analysis/Quads/NewMover.java: Bug-fix: NewMover didn't deal with METHOD quads with arity>1. Fixed now. At this point, the code is at the 'runs Hello world' stage. It does very well for expressions like 'new HashSet(new TreeSet(new HashSet()))' but (because it doesn't move NEWs past SIGMAs) doesn't optimize 'new Integer( cond ? x : y )' the way it could. * Util/Collections/GenericInvertibleMultiMap.java: Bug-fix: GenericInvertibleMultiMap would throw a ConcurrentModificationException if you called the 'remove' method on a key with more than one element in its value set. Simple fix. * Analysis/Quads/NewMover.java: Better handling of MOVEs in NewMover: the last committed version tended to let the MOVEs slip too far (out of a handler block, for instance). Now we always dump all associated MOVEs at the same point we cough up the NEW. Also broke the state information apart from the MoveVisitor traversal information. * IR/Quads/Quad.java: Have Quad.remove() return the edge which spans the now-removed quad (since if you need this, it is very difficult to get otherwise). This is consistent now with the interface to Quad.addEdge(). Of course, you can ignore the return value if you like. =) * Main/Options.java, Analysis/Quads/NewMover.java: Add the 'NewMover' transformation, which attempts to move NEW quads as close as possible to the invocation of their constructor. It is useful when transforming classes and constructors or (when doing gc-related analyses) for making the 'this' object more likely to be 'most-recently allocated'. * Analysis/Quads/NewMover.java: New file. 2001-11-07 C. Scott Ananian * Util/Collections/TestSet.java: Extend TestSet to be a much more complete test of the Set functionality. Now this class (correctly) discovers that UniqueVector, UniqueStack, and BitSetFactory implement Sets which don't adhere to the java.util.Set specification for the behavior of equals() and hashCode(). There is no way that UniqueVector and UniqueStack can adhere to the interfaces of *both* List *and* Set simultaneously. This is a bug in the Java Collections API, according to me. * Util/Collections/BitSetFactory.java: Bug this in BitSetFactory.equals() -- no longer throws NullPointerException if you give it a 'null' (returns 'false' as it should). There are other problems with this method, though: it doesn't accept *any* java.util.Set, like the Set interface contract says it should. * Util/Collections/TestSet.java: Oops: TestSet shouldn't be public. * Util/Collections/TestSet.java: Removed 'import *'. * Util/Collections/AggregateMapFactory.java, Util/Collections/BinaryHeap.java, Util/Collections/BinomialHeap.java, Util/Collections/Factories.java, Util/Collections/FibonacciHeap.java, Util/Collections/GenericMultiMap.java, Util/Collections/TestMap.java, Util/Default.java, Tools/Annotation/Java12.cup, Main/CHStats.java, Main/CallGraph.java, Main/EDMain.java, Main/EDXMain.java, Main/EventDriven.java, Main/JMain.java, Main/ODPAMain.java, Main/PAMain.java, Main/TypesMain.java, IR/Tree/ToTreeHelpers.java, IR/Quads/TESTER.java, IR/Quads/ToNoSSA.java, IR/Quads/Translate.java, IR/Quads/Pattern.java, IR/Quads/Peephole.java, IR/Quads/RSSxToNoSSA.java, IR/Quads/ReHandler.java, IR/Quads/SSIRename.java, IR/Quads/SSIToSSA.java, IR/Jasmin/Jasmin.java, IR/Bytecode/Liveness.java, ClassFile/HClass.java, ClassFile/HClassImpl.java, ClassFile/HClassProxy.java, Backend/Runtime1/DataInterfaceList.java, Backend/Maps/CHFinalMap.java, Backend/CSAHack/RegAlloc/Liveness.java, Backend/CSAHack/RegAlloc/RegAlloc.java, Backend/Analysis/BasicGCInfo.java, Backend/Analysis/InitializerOrdering.java, Backend/Analysis/InterfaceMethodMap.java, Backend/Analysis/MakeGCThreadSafe.java, Analysis/TypeInference/ClassCone.java, Analysis/TypeInference/IntraProc.java, Analysis/Tree/CacheEquivalence.java, Analysis/Tree/JumpOptimization.java, Analysis/Transformation/MethodSplitter.java, Analysis/Transactions/GlobalFieldOracle.java, Analysis/SizeOpt/BitWidthAnalysis.java, Analysis/Quads/SCC/SCCAnalysis.java, Analysis/RoleInference/RoleInference.java, Analysis/Quads/BasicCSE.java, Analysis/Quads/CallGraphImpl.java, Analysis/Quads/CallGraphImpl2.java, Analysis/Quads/CoalescingToNoSSA.java, Analysis/Quads/DeadCode.java, Analysis/Quads/FieldSyncOracle.java, Analysis/Quads/InitializerTransform.java, Analysis/Quads/MayReadOracle.java, Analysis/Quads/MemoryOptimization.java, Analysis/Quads/QuadClassHierarchy.java, Analysis/Quads/QuadLiveness.java, Analysis/Quads/TypeInfo.java, Analysis/Quads/Unreachable.java, Analysis/PreciseGC/MRAFactory.java, Analysis/PointerAnalysis/InstrumentAllocs.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/ODMAInfo.java, Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/BasicInductions.java, Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopInvariance.java, Analysis/LowQuad/Loop/LoopMap.java, Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/Loops/LoopFinder.java, Analysis/Loops/Loops.java, Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/RegFile.java, Analysis/GraphColoring/GraphImpl.java, Analysis/GraphColoring/SparseGraph.java, Analysis/GraphColoring/SparseNode.java, Analysis/Instr/EqTempSets.java, Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/CloningVisitor.java, Analysis/EventDriven/EventDriven.java, Analysis/EventDriven/LockRemove.java, Analysis/EventDriven/ToAsync.java, Analysis/GraphColoring/Graph.java, Analysis/EnvBuilder/EnvBuilder.java, Analysis/AllCallers.java, Analysis/BasicBlock.java, Analysis/ClassHierarchy.java, Analysis/DataFlow/InstrSolver.java, Analysis/DataFlow/Solver.java, Analysis/DataFlow/TreeSolver.java, Analysis/DomFrontier.java, Analysis/EdgesIterator.java, Analysis/Place.java, Analysis/ReachingDefsAltImpl.java, Analysis/ReachingDefsImpl.java, Analysis/SSITOSSAMap.java: Changes to import statements necessary after the great Renaming Of Many Classes from the harpoon.Util to the harpoon.Util.Collections package. It's so nice to have sed working for me to make these changes. * Util/Collections/AbstractMapEntry.java, Util/Collections/DisjointSet.java, Util/Collections/Environment.java, Util/Collections/HashEnvironment.java, Util/Collections/LinearMap.java, Util/Collections/PairMapEntry.java, Util/Collections/PersistentEnvironment.java, Util/Collections/PersistentMap.java, Util/Collections/PersistentSet.java, Util/Collections/PersistentTreeNode.java, Util/Collections/UniqueStack.java, Util/Collections/UniqueVector.java, Util/Collections/WorkSet.java: Moved many collections-related classes from the harpoon.Util package to the harpoon.Util.Collections package. There's lots still left in harpoon.Util, but every little bit helps. This is motivated by finding out that Felix didn't find the DisjointSet when he apparently looked for it in harpoon.Util.Collections; now it will be where he was apparently expecting it. The next commit will contain the associated changes to all the files which mention these. Classes moved: Environment, HashEnvironment, PersistentEnvironment, DisjointSet, LinearMap, WorkSet, UniqueStack, UniqueVector, AbstractMapEntry, PairMapEntry, PersistentMap, PersistentSet, PersistentTreeNode. @RENAME: Util/ Util/Collections/@ * Util/Collections/AbstractMapEntry.java, Util/Collections/DisjointSet.java, Util/Collections/Environment.java, Util/Collections/HashEnvironment.java, Util/Collections/LinearMap.java, Util/Collections/PairMapEntry.java, Util/Collections/PersistentEnvironment.java, Util/Collections/PersistentMap.java, Util/Collections/PersistentSet.java, Util/Collections/PersistentTreeNode.java, Util/Collections/UniqueStack.java, Util/Collections/UniqueVector.java, Util/Collections/WorkSet.java: New file. * Util/AbstractMapEntry.java, Util/DisjointSet.java, Util/Environment.java, Util/HashEnvironment.java, Util/LinearMap.java, Util/PairMapEntry.java, Util/PersistentEnvironment.java, Util/PersistentMap.java, Util/PersistentSet.java, Util/PersistentTreeNode.java, Util/UniqueStack.java, Util/UniqueVector.java, Util/WorkSet.java: Moved many collections-related classes from the harpoon.Util package to the harpoon.Util.Collections package. There's lots still left in harpoon.Util, but every little bit helps. This is motivated by finding out that Felix didn't find the DisjointSet when he apparently looked for it in harpoon.Util.Collections; now it will be where he was apparently expecting it. The next commit will contain the associated changes to all the files which mention these. Classes moved: Environment, HashEnvironment, PersistentEnvironment, DisjointSet, LinearMap, WorkSet, UniqueStack, UniqueVector, AbstractMapEntry, PairMapEntry, PersistentMap, PersistentSet, PersistentTreeNode. @RENAME: Util/ Util/Collections/@ * Support/rmi-root-set: Add trailing newline to this file to make editors happier. * GNUmakefile: Tweaks so that 'make java' works better. * Main/SAMain.java, Analysis/SizeOpt/MostlyZeroFinder.java: Extend mostly-zero finder so that it can find other small constants if given a 'harpoon.mzf.lookfor' property. * Util/Collections/TestSet.java: Add a very small tester for Set implementations. * Util/Collections/TestSet.java: New file. * Util/Collections/DisjointSetStructure.java, Util/Collections/LLDisjointSetStructure.java: Removed Felix's DisjointSetStructure class (and LLDisjointSetStructure implementation) since: 1) he never used these classes anywhere in the FLEX codebase. 2) harpoon.Util.DisjointSet was written six months before his versions, has a much cleaner interface, and implements the complete CLR algorithm. * Util/Collections/TestMap.java: New file. * Util/Collections/MapTest.java, Util/Collections/TestMap.java: Renamed 'MapTest' to 'TestMap' so that all the testing classes would end up listed together alphabetically. @RENAME: MapTest TestMap@ * Analysis/Quads/MustParamOracle.java: Remove 'import *' statements. * Analysis/Quads/DefiniteInitOracle.java: Removed now-unused isSafe() methods from DefiniteInitOracle. * Analysis/Quads/DefiniteInitOracle.java, Analysis/Quads/MustParamOracle.java: Factor out 'must be this' analysis into separate module 'MustParamOracle'. The MustParamOracle actually works for *any* parameter (not just parameter 0, which is 'this') and is thus useful for analyses other than the DefiniteInitOracle. * Analysis/Quads/MustParamOracle.java: New file. * Analysis/Quads/DefiniteInitOracle.java: Make DefiniteInitOracle much more precise (and useful!) by using the new MayReadOracle to better eliminate definite initializations of fields which may have already been read. Our exit point code is now drastically simplified: only RETURNs are exit points (the CALL nastiness is taken care of by MayRead, which consults a FieldSyncOracle for the interprocedural information). * Analysis/Quads/FieldSyncOracle.java: Add facility to query entire *sets* of fields read/written as well as individual fields. This makes it more useful to outside analyses (in particular, the MayReadOracle). * Analysis/Quads/MayReadOracle.java: Add a new 'may-read' analysis, which will tell you which fields have possibly been read before a given edge in a cfg. This allows you to determine (for example) that a given value written to a field in a constructor is actually the *first* value of the field which is visible. * Analysis/Quads/MayReadOracle.java: New file. * Analysis/SizeOpt/BitWidthAnalysis.java: Make BitWidthAnalysis quieter about finding definitely initialized fields. * Analysis/SizeOpt/SizeCounters.java: Add better counters for unread and constant fields identified by the BitWidthAnalysis. * GNUmakefile: Cleaned up 'doc' building rules. 'doc-install' target no longer uses scp, since this seems to have stopped working on lm. * Analysis/Quads/CallGraph.java: Fix typo in javadoc. * Analysis/Quads/FieldSyncOracle.java: Make FieldSyncOracle public, since it's so gosh-darn useful. 2001-11-06 C. Scott Ananian * Analysis/Quads/DefiniteInitOracle.java: calls to methods which are guaranteed not to read (directly or indirectly) any fields in the current class are now not exit points. * Analysis/SizeOpt/SizeCounters.java: size counters was forgetting to take into account fields which we've determined are constant or unread! * Analysis/Quads/DefiniteInitOracle.java: Improvements/bug-fixes to DefiniteInitOracle: bug-fix in findThisVars that was causing the set of thisvars to always be empty -- basically we were treating the definition of the canonical 'this' in the METHOD quad as a destructive definition of a not-this variable. Oops. Rearranged the iteration code at the end so that it's a while instead of a do-while loop. This was just a clean-up. Improvements to findNextExitPoint: THROWs are not exit points, since the constructor does not complete successfully. Neither are CALLs to 'this' or 'super' constructors. Improvements to findDefInit: a call to a 'this' constructor is a definite initialization of all the fields which that constructor definitely initializes (recursive invocation of the analysis). We changed factored out a 'getNotDefInit' method and had it cache its results to make the recursive invocation work best. * IR/Quads/UnHandler.java: Optimized the translation of INSTANCEOF's null-check to aid analysis. Before, we were merging the boolean result of the instanceof, resulting in an 'unknown' value in SCC-type analyses. Now we try to directly dispatch instead, creating SIGMA functions wherein we can embed the information discovered by the INSTANCEOF. On the true edge we should now be able to tell that the variable tested is both non-null and has the desired type. * Analysis/SizeOpt/BitWidthAnalysis.java: Narrow type of 'this' for virtual method calls. * GNUmakefile: Don't force ssh version 1 any more, because lm doesn't support it. * Analysis/Quads/DefiniteInitOracle.java: Two bug fixes for DefiniteInitOracle: first: split constructors generated by the initializer-transform were fooling us. we'd see no constructors for a type (and thus, paradoxically, conclude that all fields were definitely initialized) because all the constructors had been split to execute in class initializers. second: I forgot to remove the notthisvars set from thisvars before returning it. oops. 2001-11-05 C. Scott Ananian * Analysis/SizeOpt/BitWidthAnalysis.java, Analysis/Quads/DefiniteInitOracle.java: Add an analysis to look for 'definitely initialized' fields: fields which must always be assigned before the object they are in escapes. These fields escape the 'default-zero' values of java: we are guaranteed that no one will ever see the default zero value for definitely initialized fields, and so we don't have to add the zeros in our value analyses. * Analysis/Quads/DefiniteInitOracle.java: New file. * Analysis/SizeOpt/BitWidthAnalysis.java, Analysis/Quads/SCC/SCCAnalysis.java: Parallel changes to SCCAnalysis and BitWidthAnalysis: finish the implementation of the REM, SHL, SHR, USHR, and XOR operation analysis. [Before we just assumed very conservative values for the results of these operations.] I also cleaned up the multiplication analysis a little bit. 2001-11-04 C. Scott Ananian * Analysis/SizeOpt/SizeCounters.java: Add a little bit of code to count how many pointer words are allocated in the course of the program. This will help us assess the effectiveness of pointer-shrinking techniques. * Analysis/SizeOpt/BitWidthAnalysis.java, Analysis/Quads/SCC/SCCAnalysis.java: Bug fix: gosh, this was a hard one to track down. The BitWidthAnalysis (and the SCCAnalysis that it is descended from) may under certain rare circumstances process a Wv item on the worklist (mentioning a variable in the PHI which has been raised) *before* it processes the Wq entry which would make the corresponding edge executable. Thus the evaluation of the PHI skips over a (perfectly legit) input value on an incoming edge (which hasn't yet been marked executable). By the edge *is* raised to executable, the PHI function is already in the Eq set, and so we never get a chance to re-evaluate it. Unless some input variable of the PHI is raised again, it will forever have the wrong value for its output. The solution is simple: marking an edge leading to a PHI executable should put the PHI back on the work list. I also added a simple toString() method to the Context objects, to aid in debugging. * Backend/Runtime1/class-root.properties, Backend/Runtime1/method-root.properties: New file. * Backend/Runtime1/Runtime.java, Backend/Runtime1/class-root.properties, Backend/Runtime1/method-root.properties: The method and class roots lists are now read in from properties files (wherein we can specify the proper classes/methods much more elegantly, with copious comments, etc) instead of being hard-coded in the runtimeCallableMethods() source. Look for the files Backend/Runtime1/method-root.properties and Backend/Runtime1/class-root.properties if you need to change something. Note that this makes it possible to elegantly subclass the Runtime: your runtime can override resourcePath() to have it fetch all resources from (say) harpoon/Backend/Runtime2. In your new properties files, you can 'include harpoon/Backend/Runtime1/method-root.properties' to use all of the old method roots, and then add your own afterward. * Analysis/SizeOpt/BitWidthAnalysis.java: Make my inter-procedural bitwidth analysis context-sensitive, for a user-defined level of context set with the 'harpoon.sizeopt.context' property. Levels of context greater than one are very slow! This check-in also exercises the new MapSet interface, and shows how to create a MultiMap of Maps by passing a MapFactory through Factories.mapSetFactory to create a CollectionFactory suitable for the MultiMap's value bags. * Util/Collections/AggregateMapFactory.java: Extend the entrySet() returned by AggregateMap to support the add operation in certain circumstances (those cases where the behavior of add is consistent with both Set and Map). * Util/Default.java: Add Default.entry() factory method to create Map.Entry objects. I wish this could be rolled into Default.pair(), which creates 2-entry List objects, but the short-sighted folk at Sun made the hashCode specifications for List and Map.Entry incompatible. Gah. 2001-11-03 C. Scott Ananian * Util/Collections/MapTest.java: Refactor the code slightly to allow testing MapFactories as well as direct implementations of java.util.Map. Added test clauses for AggregateMapFactory, Factories.synchronizedMapFactory(), and Factories.hashMapFactory. * Util/Collections/AggregateMapFactory.java: Create AggregateMapFactory, heavily influenced by AggregateSetFactory. This allows you to combine many small hashmaps into one large one, with hopefully improved memory utilization. Tested with MapTest. * Util/Collections/AggregateMapFactory.java: New file. * Util/Collections/Factories.java: Added 'mapSetFactory()' and 'multiMapSetFactory()' methods to the Util.Collections.Factories class, which allow you to obtain a MapSet / MultiMapSet SetFactory from any MapFactory. There's even a little optimization tweak to recognize the case where the given map type already returns appropriate MapSets as a result of the map.entrySet() method, in which case we can skip the creation of a wrapper class. * Util/Collections/GenericInvertibleMultiMap.java, Util/Collections/GenericMultiMap.java, Util/Collections/MapSet.java, Util/Collections/MultiMapSet.java: Added interface definitions for MapSet and MultiMapSet, which are Sets of Map.Entry's which let you obtain a Map and MultiMap (respectively) view. This way, the Set returned from Map.entrySet() can be used to obtain the original Map again, to do quick lookup of keys, for example. The MapSets can be stored as values in a MultiMap to obtain multi-level hash tables. An example: ((MapSet)mmap.getValues("foo")).asMap().containsKey("bar") Not the most elegant thing around (parameterized types would make this cleaner), but it will work. HashEnvironment, GenericInvertibleMultiMap, and GenericMultiMap have been slightly tweaked to return MapSet/MultiMapSets instead of plain Sets. * Util/Collections/MapSet.java, Util/Collections/MultiMapSet.java: New file. * Util/HashEnvironment.java: Added interface definitions for MapSet and MultiMapSet, which are Sets of Map.Entry's which let you obtain a Map and MultiMap (respectively) view. This way, the Set returned from Map.entrySet() can be used to obtain the original Map again, to do quick lookup of keys, for example. The MapSets can be stored as values in a MultiMap to obtain multi-level hash tables. An example: ((MapSet)mmap.getValues("foo")).asMap().containsKey("bar") Not the most elegant thing around (parameterized types would make this cleaner), but it will work. HashEnvironment, GenericInvertibleMultiMap, and GenericMultiMap have been slightly tweaked to return MapSet/MultiMapSets instead of plain Sets. * Util/Collections/MapTest.java: Added 'MapTest', which is test code (liberally borrowed from the Mauve project) to test implementations of java.util.Map for correctness. Note that because our MultiMap interface is a semantically consistent extension of Map (ie, all the Map methods behave properly if you don't use any of the MultiMap features), we can also use MapTest to (partially) test the MultiMap implementations for correctness. java.util.HashMap, GenericInvertibleMap, GenericInvertibleMultiMap, and GenericMultiMap pass this test suite with no errors. harpoon.Util.LinearMap fails in the entrySet() method checks, because it doesn't prohibit you from 'add'ing elements which are not Map.Entry's to the entrySet. This is a safety error but not a correctness problem. harpoon.Util.HashEnvironment doesn't support the remove() operation on its entrySet(), keySet(), or values() collections; the test-suite reports this failure. Otherwise it passes. * Util/Collections/MapTest.java: New file. * Util/Collections/MultiMap.java, Util/Collections/UnmodifiableMultiMap.java: Add 'addAll(MultiMap)' method to MultiMap interface. This method was mentioned in the comments to putAll(Map m), but wasn't actually declared (doh!). Also added MultiMap.size() [also inherited from Map], so that I could add a clarifying javadoc comment on its proper return value. * Util/Collections/MapWrapper.java: Bug fix! MapWrapper wasn't properly proxy'ing the toString(), hashCode(), and equals() methods, meaning that a wrapped map wouldn't behave properly as a key in a map, and wouldn't compare equal with maps with identical contents. Fixed now. * Util/Collections/GenericMultiMap.java: Rework GenericMultiMap so that the collections returned by keySet(), valueSet(), and entrySet() are fully modifiable. Also factored out 'size' field (instead of counting up the entries in the entrySet() every time) for efficiency. Also added 'allAll(MultiMap)' method. The entrySet() for a multimap returns a Set of 'Map.Entry's, where there may be multiple 'Map.Entry's with the same key (because this is a multimap). This makes it consistent with the semantics of entrySet() for a standard java.util.Map. * Util/Collections/GenericInvertibleMultiMap.java: Add standard 'takes a map' and 'takes a multimap' constructors for classes which extend java.util.Map and harpoon.Util.Collections.MultiMap, respectively. Add 'addAll(MultiMap)' method. Implement 'entrySet()' method properly. * Util/Collections/GenericInvertibleMap.java: Add the standard 'takes a Map' constructor for classes which implement java.util.Map. * Util/Default.java: Extend the default comparator to deal better with nulls: the compareTo() method we eventually invoke doesn't handle 'null' inputs for some classes in the system library (java.lang.String.compareTo(), for example). * Analysis/Quads/MethodTraceFactory.java: Remove 'import *' statements. * Analysis/Quads/MethodTraceFactory.java: New file. * Analysis/Quads/MethodTraceFactory.java: The MethodTraceFactory adds DEBUG quads to allow you to see what methods are being called in your code. This is helpful when debugging against a known-good executable: you can look for the first non-identical line to find out where your 'bad guy' starts going wrong. * Analysis/SizeOpt/BitWidthAnalysis.java: Calls to Thread.start() 'magically' cause calls to Thread.run(). This allows 205_raytrace and 227_mtrt to make it through our analysis. * Analysis/Counters/RuntimeMethodCloner.java: Add a little more information to the warnings we print out, since source file and line number information are often not present for library code. * Analysis/Counters/CounterFactory.java: Never allow counters to be added to counters code (this produces bogus numbers because the counters code will be executing while we're trying to print out the numbers). 2001-11-02 C. Scott Ananian * IR/Tree/ToTree.java, Backend/PreciseC/TreeToC.java: Add support for the DEBUG quad to the tree-form converter. Now you can debug you programs 'easily' by adding DEBUG quads to key points. [Perhaps I ought to provide a universal means for *disabling* output from DEBUG quads? I haven't done it yet.] * Analysis/SizeOpt/BitWidthAnalysis.java: Fields can't have bitwidths wider than the types they are defined to hold. * Runtime/Counters.java: Some small edits to improve the predictability (non-virtuality) of method calls in the Counters runtime -- mostly we're trying to eliminate virtual calls to Object.toString(), which we can't clone properly. 2001-11-01 C. Scott Ananian * Analysis/Counters/CounterFactory.java, Analysis/Counters/RuntimeInliner.java, Analysis/Counters/RuntimeMethodCloner.java: New (better!) anti-counter counting code. We now copy (non-virtual or final) methods referenced in harpoon.Runtime.Counters into the counters class. Then refusing to add counters to code in harpoon.Runtime.Counters ensures that the counter code isn't itself counted. Limitations: some methods are virtual and can't be cloned. * Analysis/Counters/RuntimeMethodCloner.java, Analysis/Counters/RuntimeInliner.java: New file. * Analysis/Counters/CounterFactory.java, Analysis/Counters/RuntimeInliner.java: The code executed while in the harpoon.Runtime.Counters package messes up the statistics. We create new Strings while we're trying to report how many strings have been created, for example. Not Good. The RuntimeInliner class is a first attempt at remedying this by cloning code used by the report method and placing it inline, thus making it easier to delimit what *not* to add statistics to. But inlining is an awful solution because we need to inline too much and our code size explodes all over the place. Checking this in as a first draft; I'm starting to write a better version (which adds procedures to the Counters class) right now. * Analysis/Quads/SCC/SCCAnalysis.java: Port default-case SWITCH analysis improvement from SizeOpt.BitWidthAnalysis over to Quads.SCC.SCCAnalysis. * Analysis/SizeOpt/BitWidthAnalysis.java: Improve analysis of switch statements so that we can tell when bit-width information rules out the possibility of the default case executing. * Analysis/Quads/SCC/SCCOptimize.java: Bug fix: SCCOptimize couldn't handle SWITCH quads with some non-executable edges. Fixed now. 2001-10-31 C. Scott Ananian * Analysis/SizeOpt/FieldReducer.java: Add 'no mutate' option to FieldReducer, controlled by the property harpoon.sizeopt.no-field-reducer. This allows us to generate statistics 'as if' the field reductions have taken place, without actually reducing the fields or mutating the field accesses. Also removed a stray 'hc.getElements()' call that was inserted once upon a time for debugging and then forgotten. * Analysis/SizeOpt/SizeCounters.java: Added Yet Another counter to SizeCounters so that we can see what effect rounding fields to the nearest byte will have. * Analysis/Quads/DeadCode.java: In SSI form, phis or sigmas with the same sources will always produce the same values and so the destinations of these functions should be renamed so that they refer to the same temp ("value information" in SSI parlance). The DeadCode routine tried to do this, but it forgot that renamings have a way of propagating: once I rename two temps mentioned in a PHI/SIGMA, I may have created other PHIs or SIGMAs that now have identical sources and need renaming. This latter causes problems in SCC analysis because properties of one of the temps-that-should-have-been-renamed-the-same are not transfered over to the other (ie, one temp will have a null pointer check done on it, and its 'non-null-ness' after a SIGMA will not propagate to the other). I added a little bit of code to add PHI and SIGMA uses back to the worklist after a renaming so that all appropriate renamings are done. 2001-10-30 C. Scott Ananian * Main/SAMain.java, Analysis/SizeOpt/FieldReducer.java, Analysis/SizeOpt/SizeCounters.java: Add additional 'bit counter' statistics so that we can see how many bits the field reducer could trim away in an ideal case. * Analysis/Transformation/MethodMutator.java: Make MethodMutator.codeFactory() non-final, as there are some legitimate circumstances where you might want to over-ride it (to insert a transformation *after* the method mutator, for example). * Analysis/SizeOpt/MostlyZeroFinder.java, Backend/Runtime1/DataConfigChecker.java: Remove 'import *' statements. 2001-10-29 C. Scott Ananian * Analysis/SizeOpt/MostlyZeroFinder.java: Add 'mostly zero finder' statistics code: this finds fields which are almost always zero, and gives a rough estimate of the maximum memory we could save by optimizing these fields out into hashtables. * Analysis/SizeOpt/MostlyZeroFinder.java: New file. * Main/SAMain.java: Add 'mostly zero finder' statistics code: this finds fields which are almost always zero, and gives a rough estimate of the maximum memory we could save by optimizing these fields out into hashtables. * Analysis/Transactions/AnalysisCheckOracle.java, Analysis/Transactions/BitFieldNumbering.java, Analysis/Transactions/CheckOracle.java, Analysis/Transactions/DominatingCheckOracle.java, Analysis/Transactions/HoistingCheckOracle.java, Analysis/Transactions/SimpleCheckOracle.java, Analysis/Transactions/SyncTransformer.java: New synchronization transformation code (this has been sitting in my tree uncommitted for too long). This version only allocates a shadow object on *writes*. Since there are roughly 10x more reads than writes, this should improve our performance immeasurably. The new code doesn't have runtime support yet, but I'm working on it. * Main/SAMain.java, Backend/Runtime1/DataConfigChecker.java, Backend/Runtime1/Runtime.java: Add support for configuration-checking between FLEX and the C runtime system. This code creates references in FLEX's emitted compiled code that need to match labels in the compiled C runtime. If these do not match, we'll get a linker error which (hopefully) will indicate clearly what the problem is -- for example, that FLEX expects the runtime to be compiled --with-precise-c, for example, when the runtime was not. Hopefully this will end the hours of searching for elusive "bugs" which turn out to be simply mis-configurations. * Backend/Runtime1/DataConfigChecker.java: New file. * Backend/Generic/Runtime.java: Add support for configuration-checking between FLEX and the C runtime system. This code creates references in FLEX's emitted compiled code that need to match labels in the compiled C runtime. If these do not match, we'll get a linker error which (hopefully) will indicate clearly what the problem is -- for example, that FLEX expects the runtime to be compiled --with-precise-c, for example, when the runtime was not. Hopefully this will end the hours of searching for elusive "bugs" which turn out to be simply mis-configurations. * Backend/Runtime1/Runtime.java: bug fix: field numberings are calculated and fixed in cache just as soon as TreeBuilder is created (through call to objectSize() on java.lang.Object) which is often *before* transformations which can add/remove/mutate the fields. So now we re-create all these caches at the time of the setClassHierarchy() call, which should be after all these transformations are complete. * Analysis/SizeOpt/SizeCounters.java: Collect statistics on object allocation by type (which class is responsible for the most allocated bytes?). * Analysis/Counters/CounterFactory.java: Slight modification to counter behavior: we used to skip all counter code if it was executed before the CounterFactory class was initialized. Now we just skip the locking mechanism: if the CounterFactory hasn't been initialized then we're still in single-threaded mode, so not locking is safe. This allows us to gather more statistics from the static initializer portion of the execution. 2001-10-22 kkz * Analysis/PreciseGC/AllocationHoisting.java: Code in flux. Checking this in so that other people can compile. 2001-10-21 kkz * Analysis/PreciseGC/AllocationHoisting.java: New file. * Analysis/PreciseGC/AllocationHoisting.java: Transformation for write barrier removal. 2001-10-19 kkz * Backend/Runtime1/writebarrier-safe.properties: New file. * Backend/Runtime1/writebarrier-safe.properties, Main/SAMain.java, Analysis/PreciseGC/MRA.java, Analysis/PreciseGC/MRAFactory.java, Analysis/PreciseGC/WriteBarrierQuadPass.java: State of the analysis: write barrier removal handles assignments to the most recently allocated object including those within "safe" initializers. Added concept of exception sets of object classes so that calls are no longer completely destructive for the MRA analysis. To make that work, added a properties file for "safe" native methods (i.e. those free of java-visible allocations.) Also added -x and -y options to SAMain for write barrier removal and statistics, respectively. 2001-10-18 C. Scott Ananian * Main/SAMain.java: Check that the given main() method is actually a static method with the proper signature (otherwise the Runtime will give a very strange error when you run the result). Also make the 'optimize' flag inline small methods too. * Backend/PreciseC/TreeToC.java: Fix a type-checking issue in the code generated by the preciseC backend. Under aggressive method inlining, we were generating code such as (_String_2349a)+8 where _String_2349a was defined as a 'struct _String_2349a'; the addition here would be incorrect, although in actual practice the bug was caught because 'struct _String_2349a' was an incomplete type. Casting all pointers to 'void *' fixes the bug and makes the C compiler error go away too. * IR/Tree/UNOP.java, Analysis/Tree/AlgebraicSimplification.java: Two bug fixes in Algebraic Simplification: first, the guard intended to prevent optimizing expressions involving the NULL constant was a little over-eager and accidentally prevented *any* optimization involving pointers. Second, the types of two UNOPs in div2mul_positive were incorrect, causing type errors when compiling using the precisec backend. The correctness/incorrectness of this can easily be automated, so I've added the appropriate assertion to the harpoon.IR.Tree.UNOP constructor. * Analysis/Quads/SmallMethodInliner.java: Slightly more inlining by default. 2001-10-18 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/PANode.java: Fixing a small error 2001-10-18 C. Scott Ananian * Support/video.jar: Updated video.jar with new version of Runtime/src/cam/AltVideo.java class. 2001-10-15 kkz * Main/SAMain.java, Analysis/PreciseGC/MRA.java, Analysis/PreciseGC/MRAFactory.java, Analysis/PreciseGC/WriteBarrierQuadPass.java: More progress on MRA analysis. Now incorporates initializer optimization. * Analysis/PreciseGC/MRAFactory.java: New file. 2001-10-13 kkz * Analysis/PreciseGC/MRA.java, Analysis/PreciseGC/WriteBarrierQuadPass.java: Fixed up WBQP. Now uses MRA analysis to get rid of more write barriers. 2001-10-12 kkz * Analysis/PreciseGC/MRA.java: Most-Recently-Debugged version of Most-Recently-Allocated Object dataflow analysis. Yeah! * Analysis/PreciseGC/MRA.java: New file. 2001-10-12 C. Scott Ananian * Backend/Runtime2/TreeBuilder.java: Fixed this DerivationChecker error that Frederic found: Assertion Failure: Can't determine type for MEM. MOVE( MEM( BINOP(add, TEMP(BRIANTEMP0), CONST(4))), BINOP(add, MEM( BINOP(add, TEMP(BRIANTEMP0), CONST(4))), CONST(2))) at harpoon.Analysis.Tree.DerivationChecker.ASSERT(DerivationChecker.java:72) You could either declare the MEM an HClass.Void, or treat it as an integer. As the value of the field at this point in execution should be a hashcode (not a pointer), I changed the declaration to Int. 2001-10-04 C. Scott Ananian * Main/Raw.java: Add main routine to dump raw class file data (useful for debugging sometimes). * Main/Raw.java: New file. * Interpret/Quads/INResourceBundle.java: Removed 'import *' statement using bin/remove-stars.perl. 2001-10-02 C. Scott Ananian * ClassFile/ClassPointer.java: A little extra caution in the ClassPointer constructor (checking that we are given a valid descriptor). 2001-10-01 kkz * Main/SAMain.java, Analysis/PreciseGC/WriteBarrierStats.java: More changes to enable printing of write barrier list. * Analysis/PreciseGC/WriteBarrierQuadPass.java: Changes to enable printing of write barrier list. 2001-09-28 C. Scott Ananian * Interpret/Quads/INResourceBundle.java: Improve quad interpreter (by adding implementations of additional native methods) so that quad interpreter can interpret the quad interpreter. * Interpret/Quads/INResourceBundle.java: New file. * Interpret/Quads/INClassLoader.java, Interpret/Quads/INFileInputStream.java, Interpret/Quads/Support.java: Improve quad interpreter (by adding implementations of additional native methods) so that quad interpreter can interpret the quad interpreter. * Interpret/Quads/Method.java: Update quad interpreter to handle class CONST types. * SELF-BUILDING: More self-building details. [setting JAVA_HOME, building the quad interpreter.] 2001-09-26 C. Scott Ananian * Interpret/Quads/StaticState.java, Interpret/Quads/Method.java, Main/Run.java: Add '-quiet' option to harpoon.Main.Run quad interpreter, so that we can have 'just like java' output (without any of our debugging trace cruft) if we need to. * IR/Tree/ToTree.java: Fixed a Tree translation problem when the input contains 'conflicting phi functions'. Found in TreeMap.successor() as well as the TestPhi test case in Tests/Java/Semantics. * Main/JMain.java: Remove unnecessary import dependence on Analysis.ToSSA (which no longer exists). * Analysis/ToSSA.java: Renamed Analysis.ToSSA to IR.Quads.ReHandlerToSSA and made it non-public. New code should use IR.Quads.SSIToSSA instead. @RENAME: Analysis/ToSSA.java IR/Quads/ReHandlerToSSA.java@ * IR/Quads/ReHandlerToSSA.java: New file. * IR/Quads/ReHandler.java, IR/Quads/ReHandlerToSSA.java: Renamed Analysis.ToSSA to IR.Quads.ReHandlerToSSA and made it non-public. New code should use IR.Quads.SSIToSSA instead. @RENAME: Analysis/ToSSA.java IR/Quads/ReHandlerToSSA.java@ * IR/Quads/XI.java: make XI quads non-public, since no-one actually generates them (yet?). * Main/Options.java: Allow generation of QuadSSA form on the command-line. * Interpret/Quads/Method.java: Ease quad code type check to allow interpreting QuadSSA and QuadRSSx forms. Fix bug in PHI interpretation which would yield erroneous results when interpreting a set of 'conflicted phi' functions. * IR/Quads/RSSxToNoSSA.java: Fix bug with 'conflicting PHI functions' in RSSxToNoSSA. See the 'TestPhi' test case in Tests/Java/Semantics. Also simplified/clarified the code a bit. Do we need to worry about conflicting sigma functions? * IR/Quads/PHI.java, IR/Quads/ToNoSSA.java: Optimize ToNoSSA to avoid generating lots of unnecessary variable names when not necessary. * IR/Quads/RSSxToNoSSA.java: Simplify RSSxToNoSSA by using the Quad.replace() function (this also fixes some subtle bugs when quads have edges which point to themselves). 2001-09-25 C. Scott Ananian * IR/Quads/ToNoSSA.java: Bug fix to ToNoSSA: the destination of a phi function may well be named as one of the sources of a different phi function, so we must be careful not to overwrite dsts until all the sources have been evaluated. Think of this PHI: x1=phi(x0, y1); y1=phi(x0, x1). * Analysis/EventDriven/ContCodeNoSSA.java: ContCodeNoSSA was returning the wrong codename. * ClassFile/HCode.java: Add a newline and a call to PrintWriter.flush() to the HCode.print() generic implementation, to make this behave like the other print methods. (In particular, this makes the bytecode output 'look right'.) * Backend/Runtime1/init-safe.properties: Add some additional initializer-safe methods to Runtime1's property list. These are needed to compile harpoon.Main.Run (the quad interpreter). * Main/SAMain.java: The CounterFactory code factory needs its input *not* to be in quad-with-try form. We convert to quad-ssi, since that's what the subsequent passes will work best on. 2001-09-24 C. Scott Ananian * Backend/Runtime1/DataClaz.java, Backend/Runtime1/DataReflection2.java, Backend/Runtime1/TreeBuilder.java, Backend/Analysis/InterfaceMethodMap.java: Fix bug in invoking interface methods which have the same signature as methods inherited from java.lang.Object. These methods didn't show up in the dispatch table, but were being allocated space by the InterfaceMethodMap and dispatched via there anyway. Now we just ban these methods from the interface dispatch table outright. InterfaceMethodMap asserts that we don't expect to see these methods there and everyone else recognizes when they see an interface method inherited from Object and use the java.lang.Object direct class method dispatch entry instead. * Backend/Analysis/InterfaceMethodMap.java: Fix bogus 'equals()' method in HmNode which would cause errors if two distinct methods ended up with the same hashcode. Haven't seen a bug due to this yet, but it's only a matter of time. Replaced the 'paramTypes' field with the easier-to-compare descriptor string while I was at it. * Backend/Runtime1/init-safe.properties: Add init-safe entry for RandomAccessFile.getFilePointer(), needed by the GNU classpath implementation of the java.util.zip package, which is used when compiling FLEX with itself. 2001-09-21 C. Scott Ananian * Backend/Runtime1/init-safe.properties: We don't need to add methods in java.util.zip to the init-safe set anymore, since we're using the Classpath pure-java implementation of java.util.zip. * Main/SAMain.java: We were adding the size counters twice! What a dork I am! * bin/interpret: Rewrite the interpret script to use bin/run-java. * bin/run-java: Add Support/cpzip.jar (the GNU classpath pure-java implementation of java.util.zip) to the standard FLEX harpoon.class.path. This means we don't have to do an evil JNI implementation of Sun's java.util.zip crap in the JDK 1.1 classes.zip. * Support/cpzip.jar: GNU classpath's pure-java version of the java.util.zip package. Compiled from CVS grabbed at 6:24pm EST 2001-09-21. Java sources are included in the .jar. * Support/cpzip.jar: New file. * Backend/Runtime1/DataClaz.java, Backend/Runtime1/TreeBuilder.java: Fix our translation of the COMPONENTOF test: we weren't handling arrays of interface types correctly. We do now. [Bug found while compiling FLEX with itself; we use lots of HMethod[] arrays in FLEX, and HMethod is an interface.] 2001-09-20 C. Scott Ananian * Main/SAMain.java: Add support for the bitwidth optimizations and size counters to SAMain. * IR/Quads/ToNoSSA.java: Bug-fixes for ToNoSSA: I'm not sure how this class ever worked. Perhaps it was never really used? ToNoSSA was trying to merge temps *and* clone quads at the same time--bad idea! It would often discover a necessary merge *after* it had already cloned several quads with the *old* name of the Temp, and never go back and update them with the merged name. The fix is very simple: we go through the code first quickly and do all the merges, *then* we go back and do all the cloning. The functions of the NameMap and the CloningTempMap have been merged, with a boolean and assertions to keep the merging step separate from the cloning step. * bin/run-java: Put -D options to run-java in the right place. * Analysis/SizeOpt/BitWidthAnalysis.java: Use consistent ordering for before/after statistics. 2001-09-19 C. Scott Ananian * Support/samain-root-set: New file. * Support/samain-root-set, SELF-BUILDING: Update instructions for building FLEX with itself; you need a special root set (Support/samain-root-set) which is also added in this commit. At the moment the samain-root-set only contains the standard locale support classes. * Backend/Runtime1/init-safe.properties: Add a few more methods to the list of initializer-safe methods; these are necessary in order to compile FLEX with itself. * Backend/Runtime1/Runtime.java: Add the 'void' primitive type to the Runtime's root set, as it is referenced (using Class.forName) by the static initializer of the java.lang.Void class. (Discovered while compiling FLEX with itself.) * Backend/Runtime1/DataStrings.java: Handle java.lang.String.offset field specially in the object builder, to allow size optimizations to remove this field where possible (all string objects created have offset==0). * Analysis/Quads/SCC/SCCOptimize.java: Allow SCCOptimize to handle CALLs with one or both outgoing edges non-executable, by turning these outgoing edges into infinite loops. We saw this when running interprocedural BitWidthAnalysis, which was smart enough to detect CALL sites where either an exceptional or a normal return was impossible. * Analysis/Quads/QuadClassHierarchy.java: Correct bug seen in java.io.ObjectInputStream.inputArray() when compiling FLEX with itself: QuadClassHierarchy when given quad-with-try form as input did not count TYPECASTs as naming a class to be discovered, even though they would be turned into INSTANCEOF quads which would reference that class during the conversion to quad-no-ssa. This caused an undefined reference to _Class__3F in the output in the above method. This bug is now fixed: the type mentioned in a TYPECAST is properly discovered, just as if it were an INSTANCEOF. * bin/run-java: When 'source'ing bin/run-java, the 'exit $?' command will cause the caller script to abruptly exit, not what we want. Since what we want is the exit status of the last command anyway, we can just eliminate the exit statement ('return' might be a good alternative otherwise). * bin/build-arm-hack, bin/build-arm-pnk, bin/build-mipsda, bin/build-mipsvp, bin/build-precisec, bin/build-roles, bin/find-flex-dir: Oops -- the bin/run-java subroutine wasn't properly inheriting the various environment variables set in the bin/build-* scripts. Also export the variables set in bin/find-flex-dir, so that if this script is invoked again from a subprocess, the same settings will be used. * bin/build-arm-hack, bin/build-arm-pnk, bin/build-mipsda, bin/build-mipsvp, bin/build-precisec, bin/build-roles, bin/find-flex-dir, bin/run-java: Clean up common code in bin/build-* scripts by factoring out bin/find-flex-dir (which sets $FLEX_DIR, $HARPOON_DIR, and $RUNTIME_DIR) and bin/run-java (which invokes java with the appropriate harpoon.class.path and suchnot). * bin/find-flex-dir: New file. * bin/build-precisec: Revert revision 1.1.2.21, wherein Wes removed the '-g' option from bin/build-precisec. Bad Wes. No biscuit. How can we debug without -g? 2001-09-18 C. Scott Ananian * Util/SortedMapComparator.java: New file. * Util/SortedMapComparator.java: SortedMapComparator is a slightly more efficient version of MapComparator for use when the Maps in question are really SortedMaps. * SELF-BUILDING: Check in some notes on how to build FLEX with FLEX. * SELF-BUILDING: New file. * Backend/Runtime1/field-root.properties: Added flexible field root specification to BitWidthAnalysis (fields which are read/written by native code, and thus must be treated conservatively). The field roots are read from the 'field-root.properties' resource in the runtime's resource path. FieldReducer: eviscerate methods which the BitWidthAnalysis determines are uncallable. This avoids lots of problems caused by over-optimization of what the analysis knows to be dead-code. Also throw away writes to compile-time constant fields. * Backend/Runtime1/field-root.properties: New file. * Analysis/SizeOpt/BitWidthAnalysis.java, Analysis/SizeOpt/FieldReducer.java: Added flexible field root specification to BitWidthAnalysis (fields which are read/written by native code, and thus must be treated conservatively). The field roots are read from the 'field-root.properties' resource in the runtime's resource path. FieldReducer: eviscerate methods which the BitWidthAnalysis determines are uncallable. This avoids lots of problems caused by over-optimization of what the analysis knows to be dead-code. Also throw away writes to compile-time constant fields. * IR/Quads/Peephole.java, IR/Quads/QuadNoSSA.java, IR/Quads/QuadWithTry.java: Remove unused/unnecessary allowFarMoves parameter. * IR/Quads/Peephole.java: Bug fix to Peephole: the SwapVisitor was ignoring handler status, resulting in swaps of protected and unprotected quads. This (along with the bug described in the previous commit to this file) caused problems compiling harpoon.IR.Quads.RSSxToNoSSA, because the definition of lv2_0 was being moved across the handler boundary. This caused potential executions of the handler before lv2_0 had been defined, resulting in type errors converting to low-quad-ssi form. The Peephole visitor has been revamped, too. Instead of forbidding any change to 'protected quads' (those with handlers), we use a much simpler rule: no movement of quads is allowed across handler boundaries. [We also had to reorder the 'Qp instanceof FOOTER' rule, because the FOOTER was being interpreted as a new handler context. Now we deal with FOOTERs first.] This rule should be applicable for all well-formed code generated from java source, as no variables defined inside the try block may legitimately be referenced from outside the try or in the catch or finally, so moving definitions around inside the try block is acceptable. I *think* the rule is applicable for all bytecode which passes the verifier, too, but I'm not certain. [As part of these new simpler rules, we re-enable moves past calls when the CALL is in the same handler context as the MOVE.] The 'allowFarMoves' parameter is now unused. The rules described above work perfectly well for both quad-with-try and no-try forms. Finally, we use a UniqueStack instead of a simple Stack now for the to-do list, which results in less needlessly duplicated work. * IR/Quads/Peephole.java: Bug fix: when protected quads are replaced their replacements are not protected. 2001-09-18 vkuncak * bin/build-roles-browse: Bild & Browse dynamic role inference trivial script. * bin/build-roles-browse: New file. * bin/browse-roles: A script to run dynamic role inference. * bin/browse-roles: New file. 2001-09-18 C. Scott Ananian * Analysis/Quads/SCC/SCCOptimize.java: Add a pair of assertions to SCCOptimize to catch some things that might go wrong. [Very useful while debugging the size optimizations, which invoke SCCOptimize as a subroutine.] * IR/Quads/Translate.java: Bug fix: the Comparator given to the TreeMap mapping pairs to generated HANDLER nodes was ignoring the second component of the tuple. This caused exception handlers inside finally blocks to be incorrectly merged (because the JSR context was being ignored in the key). When compiling FLEX with FLEX, this manifested itself as a type-check error (eventually) in harpoon.ClassFile.Loader$SystemLinker.forDescriptor0(). 2001-09-17 C. Scott Ananian * Util/MapComparator.java: Remove 'import *' statements. (oops) * bin/run-java: New file. * bin/run-java: Provide a shell to invoke java with the options we use in bin/build-*. This way you can invoke (for example) harpoon.Main.Main and be assured that you're using the same classpath and other properties as when you use the bin/build-precisec script. [Maybe bin/build-precisec should invoke bin/run-java as a subroutine?] * Util/MapComparator.java: Added a comparator for Maps, which creates a sorted list of key,value pairs and then invokes ListComparator on that. * Util/MapComparator.java: New file. * bin/build-precisec: Add 'MAKEOPT' variable for specifying make options (like '-j2') on the command-line to bin/build-precisec. * Util/ParseUtil.java: Added parse utility function to parse a field name from a string. * Util/Default.java: Made the 'EMPTY_MAP' implementation a SortedMap for maximal utility. [since an empty map is trivially also a sorted map] * IR/Bytecode/InRet.java: The 'toString' method of the 'ret' bytecode opcode previously didn't include its operand. Fixed now. * Backend/Runtime1/ObjectBuilder.java: Make FLEX output files repeatable by using the same seed for objectbuilder's hashcodes. 2001-09-17 bdemsky * bin/build-roles: Build role script * bin/build-roles: New file. * Backend/Runtime1/ObjectBuilder.java: Role Discovery updates... ObjectBuilder has to give default values to UID fields... Safe to always do, because normal java.lang.Object doesn't have a UID field. 2001-09-13 C. Scott Ananian * IR/Tree/ToTree.java: Rewrite dfsTraverse to use an explicit stack instead of recursion: this should help us compile larger programs, even in the face of java's silly small-stack restrictions. * IR/Tree/ToTree.java: Rewrite dfsTraverse to take a single Edge, in preparation for making it non-recursive. * GNUmakefile: Use SSH protocol 1 when doing 'make install' 'make srcdoc-install' etc. 2001-09-12 C. Scott Ananian * bin/cvsblame.pl: Add support for :ext: format CVSROOT strings where 'host' is specified instead of 'user@host'. * Analysis/SizeOpt/FieldReducer.java: Removed 'import *' statements via script. 2001-08-30 kkz * Runtime/PreciseGC/WriteBarrier.java: Added unique ids for each call site. * Analysis/PreciseGC/WriteBarrierConstElim.java: New file. * Analysis/PreciseGC/WriteBarrierConstElim.java: Pass for removing write barriers for sources that are constants. * Main/SAMain.java: Changes to SAMain to include the new write-barrier passes. * Analysis/PreciseGC/WriteBarrierQuadPass.java, Analysis/PreciseGC/WriteBarrierStats.java: New file. * Analysis/PreciseGC/WriteBarrierQuadPass.java, Analysis/PreciseGC/WriteBarrierStats.java: Pass to add write barriers to replace WriteBarrierPrePass, which is not as accurate, and a pass to tag each write barrier call site with a unique id for statistics-gathering purposes. * Analysis/PreciseGC/WriteBarrierPrePass.java: Minor changes. This pass is now superseded by WriteBarrierTreePass anyhow. But wanted to keep repository up-to-date with newest version. * Analysis/PreciseGC/WriteBarrierTreePass.java: New file. * Analysis/PreciseGC/WriteBarrierTreePass.java: Pass for converting write barrier calls to a more efficient in-line implementation. Currently just calls a c function. Will be made more efficient. * Analysis/PreciseGC/WriteBarrierData.java: Data pass for getting runtime statistics about write-barriers. * Analysis/PreciseGC/WriteBarrierData.java: New file. 2001-08-28 kkz * Analysis/Tree/ConstantPropagation.java: Rewrote constant propagation for Tree form. Previous incarnation had broken somewhere along the way, using a reaching definitons pass for Tree form that no longer works, and traversing the Tree in some custom way that also fails. New incarnation uses the Analysis/Transformation/MethodMutator framework, and the CFGrapher for Trees to traverse the Tree. Pushed Spec through this pass, so it should work. The way in which we get to the parent Stm of an Exp may be fragile, so may need a better solution. * Analysis/ReachingDefsImpl.java: Changed to use CFGrapher so that we can use this analysis pass with Tree form. Also added case to handle unreachable code, for which BasicBlock factory does not generate BasicBlocks. Finally, removed debugging statements left over from ages and ages hence. 2001-08-22 wbeebee * Main/SAMain.java: Somehow, the code for SAMain was reverted... this caused all my results for my thesis to be wrong 2 days before the deadline... grrrr... The MULTITHREADED option needs to be accessable to both the precise malloc allocation strategy and the realtime malloc allocation strategy, since the realtime malloc sometimes calls the precise malloc - if the MULTITHREADED option is not available to RTJ, this causes hard-to-debug non-deterministic crashes to happen as random objects move during garbage collection. Please check for other random reversions... 2001-08-21 kkz * Runtime/PreciseGC/WriteBarrier.java: Dummy class and method used by Analysis.PreciseGC.WriteBarrierPrePass. * Runtime/PreciseGC/WriteBarrier.java: New file. 2001-08-20 kkz * Analysis/PreciseGC/WriteBarrierPostPass.java, Analysis/PreciseGC/WriteBarrierPrePass.java: New file. * Analysis/PreciseGC/WriteBarrierPostPass.java, Analysis/PreciseGC/WriteBarrierPrePass.java: New passes for adding write barriers. Analysis is done in LowQuad form and a dummy write-barrier is inserted. The post-pass removes the dummy write-barrier and substitutes a real one, which is currently just a C function call. 2001-08-17 C. Scott Ananian * IR/Tree/ToTree.java: Fix bug Karen found in derivation information: two cases in ToTree where we weren't renaming the temps embedded in the derivations of the previous IR so that they corresponded to the correct temps in the current IR. Pretty easy to fix; the hard part was knowing where to look. 2001-08-15 wbeebee * Support/realtime.jar, Analysis/Realtime/Realtime.java: Changed rootset -> new MemAreaStack constructor. 2001-08-14 kkz * Backend/Analysis/InsertWriteBarrier.java: A Tree pass that inserts a C function call write-barrier. Very in-efficient, but good for debugging for now. * Backend/Analysis/InsertWriteBarrier.java: New file. 2001-08-13 wbeebee * bin/build-precisec, Analysis/Realtime/CheckAdderWithTry.java, Analysis/Realtime/Realtime.java, Support/realtime.jar, Analysis/Realtime/CheckAdderNoSSA.java: Brand new version of benchmarks and Realtime Java. RTJ was completely redesigned and reimplemented -> no more failed attempts at thread-local state, everything uses atomic operations. Updated Realtime directory to include new Reference Count Memory Area. A roughly 15-page detailed account of all of the changes in this commit will be found in my thesis. It works on ToyArray, ToyTree, Barnes, Water with NoHeapRealtimeThread support. 2001-08-02 pnkfelix * Analysis/Instr/IgnoreSpillUseDefer.java: FSK: Added nice documentation (a year late!) to IgnoreSpillUseDefer, FSK: since it really *is* needed for precise-gc analyses. * Analysis/Instr/BasePointerPreservingUseDefer.java: FSK: Implementation of a BasePointerPreservingUseDefer is now in FSK: place. This, combined with the TempLocator stuff we wrote FSK: oh so long ago, forms the foundation of regalloc support for FSK: precise-gc. * Analysis/Instr/BasePointerPreservingUseDefer.java: New file. * Backend/Generic/RegFileInfo.java, Analysis/Instr/AppelRegAllocClasses.java, Analysis/Instr/AppelRegAllocFsk.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/AppelRegAlloc.java: FSK: Various changes to support indication of the illegal FSK: register set (something which I included in my thesis FSK: but was not needed for StrongARM, and so I, um, punted it FSK: until now) 2001-07-30 kkz * Backend/Runtime1/DataClaz.java: Cleanup of code for generating the auxiliary GC bitmap. 2001-07-25 kkz * Backend/Runtime1/DataClaz.java: The last change to the format of the GC data layout broke the semi-precise collector. Reverting those changes plus adding a minor optimization. The code in here is due for a cleanup, so checking in the working code now. If you take this checkin you will need to update runtime. 2001-07-25 pnkfelix * Util/Collections/BinaryTree.java, Util/Collections/IntervalTree.java: FSK: 1. BinaryTree: added more documentation, made some constraints FSK: clearer in the spec, and took out a useless helper method. FSK: 2. Added a useful extension of RBTree, IntervalTree. This FSK: also serves as a reasonable example of how extensions FSK: to trees (in terms of adding state to the nodes and FSK: maintaining invariants on that state) should work. * Util/Collections/IntervalTree.java: New file. * Util/Collections/BinaryTree.java, Util/Collections/RedBlackTree.java: FSK: Wrote a BinaryTree implementation and made it FSK: extensible to allow for RedBlackTree to inherit FSK: from it. Am taking my time trying to think of FSK: a nice general Tree interface. * Util/Collections/BinaryTree.java, Util/Collections/RedBlackTree.java: New file. 2001-07-24 pnkfelix * Analysis/Instr/AppelRegAllocClasses.java, Analysis/Instr/SpillHeuristics.java: FSK: Attempted to further fine tune the use of alternate bitstring FSK: and hashset reps for adjmatrix, but the overhead of the FSK: mechanism does not outweigh the gains. FSK: An email from Emmett reminded me that I need to update FSK: the MIPS CodeGen.spec, so I guess I'll do that before FSK: Derivation support. * Analysis/SizeOpt/BitWidthAnalysis.java: FSK: jikes was complaining about the need for explicit qualification, FSK: since "get(Temp)" is present both in the superclass (HashMap) of FSK: the inner class MyTempMap and in MyTempMap's containing class. FSK: However, Scott's casting get(Temp) to a (Temp) here, and the FSK: containing class's declaration of "get(Temp)" returns a FSK: LatticeVal (which cannot be an instanceof Temp), so I'm figuring FSK: he really wanted a call to "super.get(Object)" here. * Analysis/Instr/AppelRegAlloc.java, Analysis/Instr/AppelRegAllocClasses.java, Analysis/Instr/SpillHeuristics.java: FSK: 1. Switched code to use only Chaitin spill heuristic FSK: to do some speed comparisons (in order to determine FSK: how much slowdown is due to using multiple spill FSK: heuristics) FSK: 2. Added a BitSet rep for the Adj. Matrix, but FSK: conditionalized it based on number of nodes, FSK: because our interference graphs tend to become FSK: very sparse as the number of nodes grows, and FSK: the difference between the O(V^2) bitset and FSK: the O(E) hashset can be mind boggling. FSK: FSK: Am considering implementing Linear-Scan Allocation FSK: prepass in an attempt to kill off the time we're FSK: wasting on _222_mpegaudio.p. But support for FSK: Derivations is a higher priority, so I'm tabling FSK: LinearScan for now. 2001-07-20 wbeebee * Analysis/Realtime/Realtime.java, Analysis/Realtime/RealtimeRuntime.java: Can now run NoHeapRealtimeThreads without the slow heap checks. 2001-07-19 C. Scott Ananian * Analysis/Quads/SCC/SCCOptimize.java: Don't try to rewrite the METHOD quad if the parameters are constants. Add an assertion that *some* out-going edge of a SIGMA must be executable: no roach motels (check-in but can't check out). * Analysis/SizeOpt/BitWidthAnalysis.java: Fix inter-proocedural bug: returnMap wasn't dealing with void methods well. Also, fieldMap had some ordering issues, such that if the field was uninitialized (lattice value null) on the first GET, it would "forget" to add itself to the fieldMap so that the initialization of the field would cause the GET to be re-evaluated. * Analysis/SizeOpt/BitWidthAnalysis.java, Analysis/SizeOpt/FieldReducer.java: Added some accessor methods to BitWidthAnalysis so that we can see the results of the analysis. Also printed out more accounting data for our info, and added some initializations of "special" fields. We now *should* do the right thing with method parameter/return value/exception values; but we seem to be over-optimizing at the moment. Working on it. Also added new FieldReducer code factory which uses the results of the BitWidthAnalysis to actually reduce the size of the objects and allocations by removing unused or constant fields and reducing the size of fields when it can. * Analysis/SizeOpt/FieldReducer.java: New file. * Analysis/SizeOpt/BitWidthAnalysis.java, Analysis/Quads/SCC/SCCAnalysis.java: Parallel improvements to SCCAnalysis and BitWidthAnalysis: use 'narrowest' type in sigma for INSTANCEOF-CJMP and OPER-CJMP; take exact types into consideration when analyzing COMPONENTOF tests; use bitwidth of tested value when analyzing SWITCH cases. Added 'isLowerThan()' method to the lattice objects (this method always returns false when the two lattice values are the same type, even when further examination of the type may yield more means of comparison). Also added some quick-and-dirty accounting to BitWidthAnalysis so we can see how well we're doing. * Analysis/SizeOpt/BitWidthAnalysis.java: Update BitWidthAnalysis to the most current version of SCCAnalysis. * Analysis/Quads/SCC/SCCAnalysis.java: Lots of fixes to SCCAnalysis. Revamped the value lattice so that xOperBooleanResult and xInstanceofResult extend *both* xBitWidth *and* xIntConstant (depending on whether the result of the comparison is known). This (along with some changes in handleSigmas) ensures that the information propagated from the CJMP source makes its way into the sigma functions regardless of whether the destination of the jump is statically known or not. Refactored the "no information known" handleSigmas function into its own method, too, for more uniform handling of the branch condition. Unified the 'left is source' and 'right is source' legs of the handleSigmas(xOperBooleanResult) method, and fixed some bugs in the handling of ICMPGT/LCMPGT. Also added a whole bunch of assertions to visit() methods to ensure that the static properties of the quads (object references not null, etc) are in fact being properly analyzed. This assertions now hold for *almost* the entire SPEC suite: in _228_jack we throw an assertion failure because UnHandler is smarter than SCCAnalysis: in particular, UnHandler detects an aliasing relation between stk0 and lv1 which means that a null-check on lv1 protects stk0 as well. SCCAnalysis can't figure this out yet. After lunch I'll work on trying to make SCCAnalysis smart enough to figure this out: SSI form handles *most* of these aliasing questions by only having one temp per value; but here's obviously a case where that rough generalization breaks down. Oh -- and all of SPEC (with the exception of _228_jack, discussed above) executes correctly with SCC optimization turned on, so this code has a very good chance of being correct. * IR/Quads/UnHandler.java: Fix bug in UnHandler where creating an alias from x to y and then from y to x would screw up the data structures. This would cause needed null pointer checks (in a very few instances, like spec.benchmarks._202_jess.jess.Rete.standDown() ) to not be generated by the UnHandler. I caught this while debugging SCCAnalysis and trying to figure out why certain static properties of the quad form (in this case, that the object reference of a non-static GET quad be non-null) were not provable by the analysis. Turned out the property wasn't true in some cases (!) due to this bug. Go, go, analysis. 2001-07-18 C. Scott Ananian * Analysis/Quads/SCC/SCCAnalysis.java: Re-vamped the value lattice for SCCAnalysis, adding a 'merge()' method and consequently greatly simplifying the visit(PHI) method of the analysis. Also tweaked raiseV; this new version doesn't need the higherThan() method, and its associated complicated and error-prone contract. There's some new debugging support in the constructor, as well: that's just a freebie. 2001-07-18 wbeebee * Analysis/Realtime/Realtime.java: There's no reason for such a powerful debugging tool as DEBUG_REF to be reserved for only the NOHEAP_CHECKS elite. 2001-07-17 C. Scott Ananian * Analysis/SizeOpt/BitWidthAnalysis.java: Today's work on BitWidthAnalysis: fix a lattice structure bug in the higherThan() method; fix has been mirrored in SCCAnalysis, but I'm waiting for the SPEC build to complete so I can check that it didn't break anything before committing over there. BitWidthAnalysis now takes a root set, instead of just a main method, and takes class initializers into account so that we get correct analysis results in the presence of the runtime. We implemented correct CALL/THROW/RETURN handling for interprocedurality, but some of the fancy bits are turned off -- bug I need to fix: CALL should merge in all currently-known RETURN/THROW values when it is processed, as they won't be touched again by the algorithm unless the value they return has actually changed as a result of the new CALL. For code re-use, it might be best for RETURN/THROW just to put all calls in the callMap on the Wq worklist, so that all RETURN/THROW processing is in the visit(CALL) method. (At the moment, we assume the conservative "native method" return values for all methods.) Also, I need to implement a LatticeVal.merge() method and change raiseV and visit(PHI) to use it. At the moment, CALL/THROW/RETURN and field set/get aren't working correctly because values are being overwritten, not merged. 2001-07-17 wbeebee * Analysis/Realtime/RealtimeRuntime.java: Scott fixed a bug -> I was getting the wrong linker to lookup a class. Always use the linker from the frame. HClass.getLinker() shouldn't be used if you just want to lookup a class. 2001-07-17 C. Scott Ananian * Backend/Analysis/PackedClassFieldMap.java: Assert that the result of the fieldList() method is correctly ordered, and that no fields overlap. * Analysis/SizeOpt/BitWidthAnalysis.java: Modifications to BitWidthAnalysis (nee SCCAnalysis) to support an inter-procedural field size value lattice. Haven't finished making the changes to CALL/RETURN/THROW to support actual inter-procedurality, but there's a comment in the visit(CALL q) method which explains what still needs to be done. It compiles; committing this as a check-point. 2001-07-16 C. Scott Ananian * Backend/Runtime1/TreeBuilder.java: Use PackedClassFieldMap by default. This results in slightly less memory allocation during execution (about 1% on spec). * Analysis/SizeOpt/BitWidthAnalysis.java: Imported current state of SCCAnalysis into SizeOpt package for transmogrification into an *inter*procedural bitwidth analysis routine, which will determine bitwidths of *object fields* as well as local variables. @SPLIT: Analysis/Quads/SCC/SCCAnalysis Analysis/SizeOpt/BitWidthAnalysis@ * Analysis/SizeOpt/BitWidthAnalysis.java: New file. 2001-07-16 wbeebee * Analysis/Realtime/CheckAdderNoSSA.java, Analysis/Realtime/CheckAdderWithTry.java, Analysis/Realtime/HeapCheckAdder.java, Analysis/Realtime/Realtime.java, Analysis/Realtime/RealtimeAllocationStrategy.java, Support/realtime.jar: Fixed HeapChecks to "do the right thing" (the 5 places mentioned in my thesis, etc.) HeapChecks now produce the proper locking on the Stats class when updating statistics, and can respond to starting and stopping statistics gathering at any time (to fix a bug with collecting while reporting). heapCheckRef now has another argument - the type of access we're doing, so that can be added to the debug info as well (READ, WRITE, NATIVE, CALL, METHOD). Changed static references to come from ImmortalMemory's instead of the erroneous HeapMemory's - which caused problems with NoHeapRealtimeThreads. Realtime.java now accepts additional command-line options DEBUG_REF, HEAP_CHECK, and tries to handle FAKE_SCOPES as well - but FAKE_SCOPES is still a little buggy. 2001-07-12 wbeebee * Analysis/Realtime/RealtimeRuntime.java: Whoops! Had been running Brian's stuff by mistake - showed up as a Monitor error... ap.nosync() seems to default to true when Alex's analysis hasn't been run... This is the second time I've inverted the case of an if in the same method - one would think that after having done it once, I would have learned... 2001-07-11 C. Scott Ananian * Backend/Analysis/PackedClassFieldMap.java: Added new 'PackedClassFieldMap' which should do an even *better* job of assigning field offsets so as to minimize object size. Small fields can now be allocated over inheritance boundaries for denser packing. * Backend/Analysis/PackedClassFieldMap.java: New file. * Backend/Runtime1/TreeBuilder.java, Backend/Maps/FieldMap.java, Backend/Analysis/ClassFieldMap.java: Removed default implementation of FieldMap.fieldOffset(), since no one would want to use an implementation without decent caching. The (nearly identical) implementation in ClassFieldMap is more illustrative, and executes in reasonable time. We don't want to put caching in the abstract superclass FieldMap, because different implementations (like the one we're about to check in) may implement the caching in very different ways. So just leave the method abstract. Added fieldAlignment the abstract FieldMap superclass, since any correct implementation of FieldMap will have to know about proper field alignments. The default is now more reasonable, too: instead of defaulting to 'no alignment' we now default to 'align to field size' which is much more universally correct. Added an option to Runtime1/TreeBuilder (-Dharpoon.runtime1.single-word-align=true) to allow single-word alignment of double-word quantities, on architectures (x86, strongARM) where that is sufficient. 2001-07-11 wbeebee * Support/realtime.jar, Analysis/Realtime/HeapCheckAdder.java: Fixed HeapCheckAdder to now use the following rules to determine when to do a check: - Check a READ of a pointer (what's returned is a base pointer) - Check a NATIVECALL return value - Check a CALL return value (could be native - you can't be sure statically). If this turns out to slow too many things down, could do type inference to see if it COULD be native - and then only put the check in then. - Check the formals to a METHOD call (all but the first, which is mysteriously undeclared in some calling conventions??) - Check writes to pointers which were formerly pointing to the heap (Scott and I had some discussion about this - these checks may be slow, but I think they should be there - the RTJ spec. is ambiguous and unhelpful, as always - see top of pg. 27 for details) If they're too slow, then I'll remove them - but that may necessitate Karen doing atomic updates on forwarding pointers and check to see if forwarding pointers got clobbered, and our programs may not be compatible with other RTJ implementations if we don't do the checks, and there may be a whole slew of problems that I just can't think of right now. And, of course, you can always do escape analysis to determine which pointers can escape a run method boundary or can touch a .newInstance or .newArray, to put checks only around those. If the checks turn out to be relatively fast, though, then it may not make any sense to waste time on any of this... 2001-07-11 C. Scott Ananian * Backend/Generic/Runtime.java, Backend/Runtime1/TreeBuilder.java, IR/Tree/ToTree.java: Fix bug Karen found: our allocation strategy for multi-dimensional arrays was calling the alloc function while there were still incompletely-initialized arrays on the heap. This was causing great problems when/if the alloc function triggered a gc. So we now zero all arrays immediately and *then* create/set the subarrays. Initialization optimization may pass 'initialize=false' to the runtime treebuilder for the *lowest-dimension arrays only* if it would prefer to manually initialize the elements. Remember that initialization *must occur* before the first call to (a function which calls) alloc. * Analysis/Counters/CounterFactory.java: Allow code which inserts counters to determine if those counters are enabled or not by making CounterFactory.isEnabled() public. * Backend/Analysis/ClassFieldMap.java, Backend/Analysis/SortedClassFieldMap.java: Committed a SortedClassFieldMap which attempts to order fields so as to reduce class object size. Trivial changes to ClassFieldMap to enable clean subclassing. * Backend/Analysis/SortedClassFieldMap.java: New file. * Analysis/SizeOpt/SizeCounters.java: Renamed counters to support partial enabling/disabling. Refactored ANEW instrumentation to produce *zero* code insertion when the relevant counters are not enabled. * Analysis/SizeOpt/SizeCounters.java: Better counting for array allocations. * Analysis/SizeOpt/SizeCounters.java: Use objectsize and headersize from Runtime.TreeBuilder instead of rolling our own. This is now possible because the Frame can be constructed before the classHierarchy. 2001-07-10 C. Scott Ananian * Main/SAMain.java: JDK1.1 compatability fix. * Main/EDMain.java, Main/EDXMain.java, Main/SAMain.java, IR/Tree/ToTree.java, Interpret/Tree/DefaultFrame.java, Backend/StrongARM/CodeGen.spec.coarseInstrs, Backend/StrongARM/CodeGen.spec.instrGroups, Backend/StrongARM/Frame.java, Backend/StrongARM/CodeGen.spec, Backend/Sparc/CodeGen.spec, Backend/Sparc/Frame.java, Backend/Runtime1/DataReflection1.java, Backend/Runtime1/DataReflection2.java, Backend/Runtime1/DataReflectionMemberList.java, Backend/Runtime1/DataStaticFields.java, Backend/Runtime1/DataStrings.java, Backend/Runtime1/MallocAllocationStrategy.java, Backend/Runtime1/ObjectBuilder.java, Backend/Runtime1/Runtime.java, Backend/Runtime1/SPAllocationStrategy.java, Backend/Runtime1/StubCode.java, Backend/Runtime1/TreeBuilder.java, Backend/Runtime2/Runtime.java, Backend/Runtime2/TreeBuilder.java, Backend/Runtime1/AppelAllocationStrategy.java, Backend/Runtime1/DataClaz.java, Backend/Runtime1/DataGC.java, Backend/Runtime1/DataInitializers.java, Backend/Runtime1/DataInterfaceList.java, Backend/Runtime1/DataJavaMain.java, Backend/PreciseC/Frame.java, Backend/PreciseC/PGCNiftyAllocationStrategyWithStats.java, Backend/MIPS/CodeGen.spec, Backend/MIPS/Frame.java, Backend/Generic/Frame.java, Backend/Generic/Runtime.java, Backend/Analysis/BasicGCInfo.java, Backend/Analysis/GCTraceStore.java, Backend/Analysis/MakeGCThreadSafe.java, Analysis/Tree/CacheEquivalence.java, Analysis/Transactions/TreePostPass.java, Analysis/Realtime/HeapCheckAdder.java, Analysis/Realtime/QuantaChecker.java, Analysis/Realtime/RealtimeRuntime.java: Refactor Frame-Runtime interface to allow creation of Frame and Runtime *before* we know the class hierarchy or call graph. This gets around several chicken-and-egg problems in Main/SAMain. The public final fields Runtime.treeBuilder and Runtime.nameMap have been turned into accessor methods Runtime.getTreeBuilder() and Runtime.getNameMap(). In a sane language, transforming a field to an accessor method would be completely invisible outside the class; unfortunately Java is not so sane. Most of the changes in this commit are simply dealing with the field-to-method conversion. Sigh. Incidentally, this is one of the features which (if I recall correctly) the C# language actually gets right. Or maybe it's not. I can't remember... * Analysis/SizeOpt/SizeCounters.java, Analysis/SizeOpt/package.html: Add simple size counter code to get numbers on object sizes/allocation frequency/etc. Also added a description of the 'harpoon.Analysis.SizeOpt' package. * Analysis/SizeOpt/SizeCounters.java, Analysis/SizeOpt/package.html: New file. * Analysis/Counters/CounterFactory.java: Allow counters to be incremented by both long and integer values. 2001-07-10 wbeebee * Support/realtime.jar, Analysis/Realtime/Realtime.java, Analysis/Realtime/HeapCheckAdder.java: Handles derived pointers correctly, by checking all base pointers. Heap checks now work! They're not the most efficient in the world, but they're correct!!! 2001-07-09 C. Scott Ananian * Backend/Runtime1/StubCode.java, Backend/PreciseC/TreeToC.java: Fix Karen's bug more-or-less correctly. As the note in TreeToC indicates, we still require tree form to have only one type over the lifetime of a temp (this is not quite the same as SSx form). But now we correctly generate StubCode that adheres to this requirement. I also moved the monitorEnter/Exit call so that we don't have to push anything on the precise variable stack around the call. This commit also reverts my ugly ugly Friday workaround that I promised to remove today. * Analysis/Tree/AlgebraicSimplification.java, Analysis/Tree/Simplification.java: As Wes pointed out, masking 'null' causes AlgebraicSimplification to attempt to do constant propagation on the (NULL & ~3) expression, failing because BINOP.evalValue() doesn't like nulls. And well it shouldn't: there's no guarantee that 'null' will really be zero. With pointer masking especially, 'null' could be any sufficiently small integer. So disable constant folding of 'null' constants. 2001-07-09 wbeebee * Support/realtime.jar, Backend/Runtime2/TreeBuilder.java, Analysis/Realtime/HeapCheckAdder.java, Analysis/Realtime/RealtimeRuntime.java: Fixed a bugs in HeapCheckAdder in creating MEM's with boolean types... fixed a bug in RealtimeRuntime that was inverting the sense of NOHEAP_CHECKS, and eliminated minor unnecessary false|| in TreeBuilder. 2001-07-09 C. Scott Ananian * Backend/Runtime1/Runtime.java, Backend/Runtime1/TreeBuilder.java, Backend/Runtime2/Runtime.java, Backend/Runtime2/TreeBuilder.java, Analysis/Realtime/RealtimeRuntime.java: Revert Wes' changes to make TreeBuilder constructor protected again, to indicate that it should only be invoked by either another class in its package (Runtime) or a subclass. Also added harpoon.runtime1.pointer.alignment property to runtime1 to allow pointer masking to be enabled from the command-line. * IR/Tree/ToTree.java, Backend/Runtime1/TreeBuilder.java, Backend/Generic/Runtime.java: Add proper pointer masking to reference comparisons. Note difference between Qop.ACMPEQ (which works on (unmasked) reference values) and LQop.PCMPEQ (which works on (masked) pointer values) here. * Backend/Runtime1/TreeBuilder.java: Refactor TreeBuilder code to catch quite a number of pointer-masking cases which had slipped through the first time. Thanks to Wes for finding these. We now rely more heavily on the _claz_() and fieldBase() methods in componentOf/instanceOf/initialization/etc which take care of the proper pointer masking for us. 2001-07-08 pnkfelix * Analysis/Instr/AppelRegAlloc.java: FSK: took out obsolete todo: note * Analysis/Instr/AppelRegAlloc.java, Analysis/Instr/AppelRegAllocClasses.java, Analysis/Instr/AppelRegAllocFsk.java, Analysis/Instr/AppelRegAllocStd.java, Analysis/Instr/RegAllocOpts.java, Analysis/Instr/SpillHeuristics.java: FSK: 1. Refactored out the key changes I've made to the FSK: standard Appel algorithm (at least the ones that FSK: are relevant to my thesis) into two concrete FSK: subclasses. FSK: 2. Refactored out the SpillHeuristics stuff into its FSK: own class, because it was big, heinous, confusing, FSK: and potentially not worth the effort (measuring the FSK: actual benefit of alternate spill-heuristics in FSK: the presence of optimistic-coloring is probably FSK: a paper in itself, or at least an interesting set FSK: of statistics. C:P ) FSK: 3. Added a new option to the reg-alloc-options reader FSK: to use the ARAFsk subclass instead of the ARAStd FSK: subclass. Who in their right mind chooses Reflection FSK: over this! C:) FSK: 4. Made some small interface modifications and documentation FSK: updates to Generic.RegFileInfo (to go along with my FSK: extensions) FSK: 5. Made StrongARM.RegFileInfo properly implement the FSK: extensions to Generic.RegFileInfo. * Analysis/Instr/AppelRegAllocFsk.java, Analysis/Instr/AppelRegAllocStd.java, Analysis/Instr/SpillHeuristics.java: New file. * Backend/Generic/RegFileInfo.java, Backend/StrongARM/RegFileInfo.java: FSK: 1. Refactored out the key changes I've made to the FSK: standard Appel algorithm (at least the ones that FSK: are relevant to my thesis) into two concrete FSK: subclasses. FSK: 2. Refactored out the SpillHeuristics stuff into its FSK: own class, because it was big, heinous, confusing, FSK: and potentially not worth the effort (measuring the FSK: actual benefit of alternate spill-heuristics in FSK: the presence of optimistic-coloring is probably FSK: a paper in itself, or at least an interesting set FSK: of statistics. C:P ) FSK: 3. Added a new option to the reg-alloc-options reader FSK: to use the ARAFsk subclass instead of the ARAStd FSK: subclass. Who in their right mind chooses Reflection FSK: over this! C:) FSK: 4. Made some small interface modifications and documentation FSK: updates to Generic.RegFileInfo (to go along with my FSK: extensions) FSK: 5. Made StrongARM.RegFileInfo properly implement the FSK: extensions to Generic.RegFileInfo. * Backend/StrongARM/CodeGen.spec.instrGroups: FSK: Discovered this particular nastiness: was creating FSK: a NO_SPILL group that was too long. This, combined FSK: with some overly conservative conflict mechanisms FSK: and a bad weighting on the edges in the interference FSK: graph led to the register allocator coughing up FSK: blood. I've fixed the weighting, but this was bad FSK: anyway (over-constrains allocation) so I've broken FSK: up the NO_SPILL area into two sections. 2001-07-07 pnkfelix * IR/Assem/InstrGroup.java: FSK: [checkpointing state of system before revision] FSK: Fixed up some javadoc in InstrGroup. * Analysis/Instr/RegAlloc.java: FSK: Removing unused method [phasing out notion of component temps] * Analysis/Instr/AppelRegAlloc.java: FSK: [making a full snapshot of the state of my system] FSK: The main changes here are that it now uses the spillable FSK: cache in the Web objects instead of recomputing its value FSK: each time, and the cleaning rewrite happens earlier in FSK: the control flow. FSK: Also removed a lot of crufty assertions left over from FSK: when my buggy code was breaking invariants left and right, FSK: and put some notes about things to look into regarding FSK: move coalescing and pre-spilling. * Backend/StrongARM/RegFileInfo.java: FSK: Alas, this also needed to be checked in. FSK: [perhaps I should have done a "test-checkin" FSK: by manually copying the changed interface FSK: to CTF first. But when I have done that in FSK: the past I've ended up forgetting to actually FSK: do the end checkin and have gotten burned for FSK: it] * Analysis/Instr/LocalCffRegAlloc.java, Backend/MIPS/RegFileInfo.java: FSK: oops. Interface revision in last checkin broke FSK: these files, so I'm checking them in. * Backend/Generic/RegFileInfo.java: FSK: Taking cruft out of interface for Generic.RegFileInfo. 2001-07-06 C. Scott Ananian * Backend/Runtime1/StubCode.java: This is an extremely ugly and unsafe hack that should, however, get the precise garbage collector working for Karen while I'm away for the weekend. I'll revert this change on Monday. 2001-07-06 wbeebee * Backend/Runtime1/TreeBuilder.java, Backend/Runtime2/Runtime.java, Backend/Runtime2/TreeBuilder.java, Analysis/Realtime/HeapCheckAdder.java, Analysis/Realtime/RealtimeRuntime.java: Now supports Scott's pointerAlignment field on TreeBuilder. Various changes to HeapCheckAdder to correctly deal with derived pointers in light of Scott's new changes. Was also happy to remove the GROSS HACK from Runtime2/TreeBuilder to get around dynamic inheritance, as just constructing the TreeBuilder of the correct Runtime in initTreeBuilder in RealtimeRuntime works just fine. 2001-07-06 C. Scott Ananian * Backend/Runtime1/TreeBuilder.java: As Wes correctly pointed out, I was missing a PTRMASK operation in the hashcode initialization code. Have to make sure that the low bits are available for other uses in the hashcode field. * Backend/Runtime1/TreeBuilder.java, IR/Tree/DerivationGenerator.java: Add support for masked pointers to Runtime1. There's a hack in DerivationGenerator to make it give proper derivations after a pointer AND, but it's a little overbroad, and will give derivations even when the AND completely obliterates the original pointer. It is currently the responsibility of the implementor to DECLARE a proper type for such constructions, to override the DerivationGenerator's guess. At some future point I may make the DerivationGenerator smarter about which pointer ANDs it generates derivations for, but not at the present moment (I'm about to leave the state for the weekend---ah, summertime!). There's also a loose end with respect to pointer comparisons. The code currently assumes that any twiddled low bits of the pointer are integral to it; it will not compare as equal with a pointer with different low bits. Sometimes you may want to mask the low bits before doing the comparison. At the time I wrote Generic.Runtime.TreeBuilder I never thought that *pointer-comparison* would be potentially runtime-dependent. I will probably eventually add another method to the generic TreeBuilder to allow the Runtime to specify proper handling of the compare operation. The Runtime1.TreeBuilder constructor could use some prettify-ing, too, but I want to make sure it's (eventually) possible to specify masking both programmatically (enabling realtime java also automagically enables pointer masking, for example) and from the command-line (-Dharpoon.runtime1.pointer_masking=true, or some such). Not done yet, but will be done after the weekend. Now it's time for people to bang on this code with pointer masking enabled and allocators that (say) set the low bit, and see if I missed any masking cases. I don't think so, but I'm not infallible. * Backend/Runtime1/ObjectBuilder.java: Reverting last change to ObjectBuilder. Not sure why, but changing the object alignment from 4 to 8 causes a segfault using the precise-c backend on SPEC _200_check. Maybe gcc or gas on x86 has some problem with 8-byte alignments? I'll debug this further after the weekend. We didn't really need 8-byte object alignments on any of our current platforms anyway. 2001-07-06 pnkfelix * Analysis/Instr/AppelRegAllocClasses.java: FSK: Added code to cache the isSpillable() property in the FSK: Web objects themselves, rather than needed to reloop FSK: over the defs/uses each time one chooses a spill. * Analysis/Instr/DemandDrivenRegAlloc.java: FSK: Code cleanups. I'm preparing to take care of removing some FSK: old crufty aspects of the allocation interface, but to do FSK: so I need to make sure that this legacy code doesn't cause FSK: compile breakage. 2001-07-06 C. Scott Ananian * Backend/Runtime1/ObjectBuilder.java: We should align objects to double-word boundaries so that longs and doubles are correctly aligned on those machines which require them to be double-word aligned. On x86 and StrongARM, they are not required to be aligned and malloc only 4-byte aligns the objects it returns, so it's not a big deal here, but SPARC is (as I recall) more strict. 2001-07-05 C. Scott Ananian * Backend/PreciseC/TreeToC.java: precise-c backend should handle derived pointers correctly when pointer-twiddling now. * Backend/Runtime1/TreeBuilder.java: Tweak harpoon.runtime1.nosync options: document better at top, make a private static final variable so that JITs can optimize, return objectref instead of CONST(0) because objectref expression might have side-effects. * IR/Tree/ToTree.java: Tweak property name for dispatch-checking option in ToTree. Use Boolean.getBoolean() instead of a raw System.getProperty() call. * IR/Quads/UnHandler.java: Allow the user to turn off generation of all array-bounds checks, for benchmarking purposes *only*! This basically allows you to hand-wave around performance decreases hypothesized to be due to non-optimization of array bounds checks tests. The Titanium compiler does it, why can't we? * Backend/Runtime1/TreeBuilder.java: Fix bug where derived pointers to static objects (pointed to by a NAME tree) were confusing the DerivationGenerator. You usually only saw this when using optimizations in your build. Since the gc doesn't need to know about static objects, we leave them typed HClass.Void instead of giving them a more precise type. Then nobody gets worried when we can't find a temp to associate with a derived pointer to the static object, later. 2001-07-04 bdemsky * Analysis/RoleInference/RoleInference.java: fixed bug in AGET handling code. * Analysis/RoleInference/RoleInference.java: Updates to roleinference pass to support load annotating. * Util/TypeInference/TypeInference.java: Bug in alex's treatment of AGET quad...Fixed now. 2001-07-04 C. Scott Ananian * Backend/Runtime1/StubCode.java: Fix bug in StubCode found by Karen: synchronized native methods were declaring their wrapped temps as unwrapped variables, which caused the precisec backend to spill the wrapped object to the object pointer stack --- only unwrapped objects belong on the object pointer stack. also, the spilling caused stack corruption, which was also a Bad Thing. Anyway, giving the temp the correct type fixes all these things, although you'll only notice the improvement if you were actually using a precise garbage collector. 2001-07-04 pnkfelix * Backend/StrongARM/RegFileInfo.java: FSK: Discovered last night (or I guess the night before last.. FSK: umm, Monday night) that Scott's allocator was using a FSK: slightly larger register pool than I was, which led to FSK: a suprisingly large decrease in performance for my FSK: allocator. This fixes that. 2001-07-03 pnkfelix * Analysis/Loops/LoopFinder.java: FSK: Rewrote another recursive function to use an explicit stack object. * Analysis/Instr/AppelRegAlloc.java: FSK: Checkpointing state of AppelRegAlloc as it currently compiles FSK: all of spec correctly as far as I can tell. FSK: FSK: 1. Added flag for whether to print Depth->Spill information during FSK: compilation. FSK: 2. Added an extension to cleaning that refuses to spill temps that FSK: will not be used after the basic block is finished. FSK: 3. Added a "dontSpillTheseDefs" field for supporting the above feature. FSK: Note to self: look into spill filtering smarter, as its current FSK: implementation could be quite inefficient in certain bad cases FSK: (which we probably don't encounter due to SSA form...) FSK: 4. Added a trivial move coalescing pass as a simple way to FSK: filter out some *really* dumb spill code. FSK: (e.g. ld a [b]; mov a, a; st a [b];) FSK: 5. Added a lot of really ugly timing calls because profiling with FSK: -Xrunhprof takes too damn long and I don't need such fine grain FSK: results. FSK: 6. Added Scott's simple spill heuristic to the set of heuristics I use, FSK: which enables building the LoopDepth map lazily. Also added a break FSK: out of the loop when no spilling is required (results in mucho FSK: speedup, at least 2x) FSK: 7. Added various code for lazy construction of LoopDepth map. Can now FSK: appeciate C's interpretation of the "static" keyword... FSK: 8. Reenabled move coalescing <> FSK: 9. Fixed a brown paper bag bug in the move coalescer [ s/&&/||/ ] FSK: A. Fixed another brown paper bag bug which was causing FSK: mucho problemo: adjacency(n) != adjList[n]. In my defense, those are FSK: really close textually... Andrew Appel should revise his naming FSK: conventions before writing his next textbook. C:P FSK: B. Fixed a yucky bag bug that was all my own. Don't allow code FSK: controlled by PRINT_XXX_INFO flags to have side-effects... I'm FSK: sure that one could write a thesis combining software macros with a FSK: type/effect-analysis to ensure such invariants at compile time. * Analysis/DomTree.java: FSK: Rewrote two recursive functions to use explicit stack FSK: objects because we were getting stack overflows FSK: on running LoopFinder analysis on _222_mpegaudio.p * Analysis/Instr/AppelRegAllocClasses.java: FSK: Changed my system to snapshot nearly all of the state FSK: before applying each spill heuristic. Not sure how FSK: much that hurt me on compile-time performance. This FSK: works correctly though, so I'm checking it in before FSK: I experiment with optimizing it out later. * Backend/StrongARM/CodeGen.spec.instrGroups: FSK: Some fixes to the InstrGroup-ified specfile that I made FSK: not too long ago but didn't check in. I think nearly FSK: all of the NO_REORDER groups turned out also be FSK: AGGREGATE groups... perhaps there should have been a FSK: group type hierarchy? Maybe. But I don't want to even consider FSK: such things for the time being. Maybe the real answer is I should FSK: have abstracted this into a pair of helper procedures in this spec FSK: file... 2001-07-03 wbeebee * Backend/Runtime1/TreeBuilder.java, Backend/Analysis/GCTraceStore.java, Analysis/Realtime/HeapCheckAdder.java, Analysis/Realtime/Realtime.java, Analysis/Realtime/RealtimeAllocationStrategy.java: Fixed a nasty bug in TreeBuilder. We should probably assert that the arguments to a BINOP are of the specified optype for all ops that this makes sense. HeapCheckAdder now works - also updated Realtime and RealtimeAllocationStrategy to now emit DEBUG_REF information when HEAP_CHECKS is turned on. GCTraceStore was cleaned up a little bit. 2001-07-03 C. Scott Ananian * Main/SAMain.java: The MemoryOptimization pass needs a caching code factory in front of it. * Analysis/Transformation/MethodSplitter.java: MethodSplitter was clearing entries from its codefactory cache before it was really done with them. The fixed version is safe, but it retains some entries in its cache longer than it ought. Eventually we should add a 'clearAll' method to CodeFactories which one could use to remedy such a situation after it has been determined that all methods have been processed through a certain HCodeFactory. * Analysis/Quads/SmallMethodInliner.java: Update SmallMethodInliner to much more accurately bloat the executable with inlined methods. The system property harpoon.inliner.percent allows you to specify more-or-less exactly how much code-size bloat you want, due to inlined methods. * Analysis/Quads/InitializerTransform.java: Fixed buglet in InitializerTransform that caused it to clear methods from its CodeFactory cache before it was really done using them. No effect on generated code; this fix ought to simply make compile times a little bit quicker. 2001-07-02 C. Scott Ananian * Util/Collections/BinaryHeap.java: More efficient implementation of updateKey(). * Util/Collections/AbstractHeap.java, Util/Collections/BinaryHeap.java, Util/Collections/BinomialHeap.java, Util/Collections/FibonacciHeap.java: Fixed an interface buglet: the protected setKey() method of AbstractHeap should really return the old key of the Map.Entry. * Util/Collections/AbstractHeap.java, Util/Collections/BinaryHeap.java, Util/Collections/BinomialHeap.java, Util/Collections/FibonacciHeap.java, Util/Collections/Heap.java: Added 'updateKey()' method to Heap interface. This usually has poorer performance guarantees than 'decreaseKey()' and is almost (but not quite exactly) the same as a 'delete()' followed by an 'insert()' with the new key value (delete-than-insert would change the Map.Entry associated with the key-value pair, while 'updateKey()' maintains it). Refactored some code in AbstractHeap to make this easier to implement, without undue code duplication. Also added testcases for the updateKey() method to the various heap implementations. It is possible to slightly-more-efficiently implement 'updateKey()' by changing the BinomialHeap and FibonacciHeap data structures slightly. I believe the time-bounds change to requiring O(lg n) time for m calls to 'updateKey()' instead of O(m lg n). Implementation is deferred until it can be shown truely necessary. See the discussion at the end of section 3 of "A Data Structure for Manipulating Priority Queues" by Jean Vuillemin in Communications of the ACM 21(4) for the change to BinomialHeap; and the "good-tree/bad-tree" variant of FibonacciHeap discussed in section 3 of "Fibonacci Heaps and Their Uses in Improved Network Optimization Algorithms" by Fredman and Tarjan in Journal of the ACM 34(3). A trivial modification applies to BinaryHeap to make updateKey more efficient (calling downHeap rather than upHeap if the key is increasing); I will implement this in the next commit. 2001-07-02 wbeebee * Support/realtime.jar, Main/SAMain.java, Backend/Analysis/GCTraceStore.java: Added GCTraceStore, and support for it. GCTraceStore adds a C function call for every store to a memory location of type POINTER. Also, cleaned up HeapCheckAdder a little. * Backend/Analysis/GCTraceStore.java: New file. * Analysis/Realtime/HeapCheckAdder.java, Analysis/Realtime/Realtime.java: Added GCTraceStore, and support for it. GCTraceStore adds a C function call for every store to a memory location of type POINTER. Also, cleaned up HeapCheckAdder a little. * Analysis/Realtime/PrintFactory.java: New file. * Analysis/Realtime/HeapCheckAdder.java, Analysis/Realtime/PrintFactory.java, Analysis/Realtime/Realtime.java, Analysis/Realtime/RealtimeAllocationStrategy.java, Analysis/Realtime/RealtimeRuntime.java, Analysis/Realtime/package.html: Now supports RTJ_DEBUG_REF in the compiler - also made some improvements to try to support NoHeapRealtimeThread checks against the heap in HeapCheckAdder.java. Updated package.html to describe the new RTJ resources that I found, and added PrintFactory (which may be moved out to a more general location) that facilitates printing HCodes that pass through an HCodeFactory (of any form). 2001-06-30 C. Scott Ananian * Util/Collections/Heap.java: Add javadoc references to FibonacciHeap implementation. * Analysis/Tree/DerivationChecker.java: Better error message output from DerivationChecker if it finds something wrong. * Main/SAMain.java: Turn on tree-form derivation checkers. * Analysis/Tree/Canonicalize.java: Fix bug in Canonicalize where derivation information would get lost from a MOVE(MEM(...), ...) subtree. * Analysis/Quads/MemoryOptimization.java: Allow memory optimization of final fields across synchronizations, since writes to final fields cannot escape a thread. We also tweak the optimization across calls, but this is expected to have less (read, no) effect, since we'll never see writes to final fields. 2001-06-29 C. Scott Ananian * Analysis/Tree/DerivationChecker.java: Added a new derivation-checker for tree form, based on the lowquad-form checker. @SPLIT: Analysis/LowQuad/DerivationChecker Analysis/Tree/DerivationChecker@ * Analysis/Tree/DerivationChecker.java: New file. * Analysis/LowQuad/DerivationChecker.java: Whoops: actually checked in an (entirely unnecessary) import * statement. * Analysis/LowQuad/DerivationChecker.java: Moved low-quad derivation checker to more-appropriate Analysis package instead of IR. @RENAME: IR/LowQuad Analysis/LowQuad@ * Analysis/LowQuad/DerivationChecker.java: New file. * IR/LowQuad/DerivationChecker.java: Moved low-quad derivation checker to more-appropriate Analysis package instead of IR. @RENAME: IR/LowQuad Analysis/LowQuad@ * Backend/PreciseC/TreeToC.java: Fix bug which Wes found in the AND-with-pointer-argument-type construct. We should look at this closely if we ever port to a 64-bit architecture (actually, I think we've already got a sparc-64 port at least partially complete). In particular, the non-pointer portion of the mask MUST be an INTEGER for 32-bit archs and a LONG for 64-bit archs for this all to work correctly. Otherwise masks like "~3" will silently truncate the top 32-bits of the pointer on 64-bit archs. 2001-06-28 C. Scott Ananian * Backend/PreciseC/TreeToC.java: Allow AND operations on a pointer and an int (masking). 2001-06-27 C. Scott Ananian * GNUmakefile: Added Support/*-root-set to harpoon.tgz file 2001-06-26 kkz * Backend/Runtime1/DataClaz.java: Added support for handling arrays with fields in the GC. If you get this update you also need to make update the runtime. 2001-06-25 bdemsky * IR/Quads/Peephole.java: Brian needs to learn to spell. * IR/Quads/Peephole.java: Don't do optimization for METHOD quads. 2001-06-22 wbeebee * Support/realtime.jar: Started implementing compiler support for NoHeapRealtimeThreads. Cleaned up QuantaChecker. * Analysis/Realtime/HeapCheckAdder.java: New file. * Analysis/Realtime/HeapCheckAdder.java, Analysis/Realtime/QuantaChecker.java, Analysis/Realtime/Realtime.java, Main/SAMain.java: Started implementing compiler support for NoHeapRealtimeThreads. Cleaned up QuantaChecker. 2001-06-22 pnkfelix * IR/Assem/InstrGroup.java: FSK: heh heh. defs were getting skipped by InstrGroup. C:P FSK: (this is a backlash from when the semantics of InstrGroup FSK: were not well defined...) * Analysis/Instr/AppelRegAllocClasses.java: FSK: Added flag to disable snapshotting the NodePairSet, as a FSK: performance boost. * Backend/StrongARM/CodeGen.spec.instrGroups: FSK: 1. Noted that there's a untemplatized Label param. FSK: Doesn't break things now, but it would if we FSK: did jump retargetting. Added comment to fix it later FSK: (don't have time to test a fix of it right now) FSK: 2. Made InstrENTRY's defs for the method parameter registers. FSK: I think things should have been this way from the start. FSK: Not having it didn't break things, but it should have, which FSK: means that there's probably hacks distributed around the FSK: code base to get around it. C:P FSK: 3. Made a long-comparison operation an aggregate instr. FSK: Originally thought to be unnecessary, but if I manage to FSK: get rid of InstrDUMMYs using conservative group usedefing, FSK: then it will certainly break things to have this be FSK: non-aggregate. 2001-06-21 pnkfelix * Analysis/Instr/AppelRegAlloc.java: FSK: Darn; the last checkin I put in causes a compile FSK: error because I narrowed the permissions on FSK: two of the methods in AppelRegAllocClasses. C:P FSK: FSK: Anyway, this will fix that (since the new AppelRegAlloc FSK: doesn't call those methods at all) and also FSK: FSK: 1. Moves the decision to commit to a SpillHeuristic to FSK: AFTER optimistic coloring is performed. Thus, the FSK: SpillHeuristic selects a spill-set of variables to FSK: based on pessimistic spilling but the final cost is based on FSK: the actual spills performed. FSK: Actually, that makes me realize that the SpillHeuristics FSK: no longer need to maintain an expected cost during graph FSK: reduction. So I should take the accumExpCost and maxExpSpills FSK: fields out. FSK: FSK: 2. Optionally prints a SLEW of information about the costs FSK: gathered. This is useful because I have discovered that the FSK: alternate spill heuristics *DO* make a positive difference in FSK: the number of spills once the min heuristic function is chosen FSK: properly. Its just that they aren't useful very often. Might FSK: be interesting to actually chart how often they are used. FSK: FSK: 3. Also added a note to myself to investigate whether I was on FSK: crack when I disabled move coalescing. FSK: FSK: 4. Oh yeah, forgot to mention in my last message that the FSK: NodePairSet field has migrated up to AppelRegAllocClasses FSK: along with everybody else. I actually think I might be able FSK: to justify this seperation of concerns now. Should I still FSK: switch AppelRegAllocClasses to a non-superclass of FSK: AppelRegAlloc? A lot of rewriting without much justification, FSK: except that the snapshot code might be simplified FSK: significantly by making the ARAC a seperate entity. FSK: FSK: And a final comment that the code wrapped around the appel-loop FSK: has gotten really hairy. It was bad enough before, but now the FSK: control flow is really convoluted. Should look into cleaning FSK: that up. * Analysis/Instr/AppelRegAllocClasses.java: FSK: Added a bunch of code for taking snapshots of the register FSK: allocation state and for writing it to a string for sanity FSK: checking. However, on further investigation, it seems that the FSK: reasons that multiple spill-heuristics were giving poor output FSK: may have been due to something other than lack of sufficient FSK: state in the snapshots. FSK: FSK: Notably, the three spill-heuristics [given by Pinter] have a FSK: *much* larger average error in their cost estimate after FSK: optimistic coloring is applied than the spill-heuristic given by FSK: Chaitin. FSK: FSK: This means that if you commit to a spill-heuristic too soon (for FSK: example, basing your decision only on the expected maximum number FSK: of spills) then you will get POORER output than if you had just FSK: used Chaitin's alone. FSK: FSK: I find this quite amazing, given that Chaitin's heuristic is so FSK: simple. I wonder what demons he had to sacrifice a lamb for to FSK: find that particular cost function 2001-06-20 pnkfelix * Analysis/Instr/AppelRegAlloc.java, Analysis/Instr/AppelRegAllocClasses.java: FSK: Earlier refactoring was a little bit overzealous; moved FSK: a field back down to AppelRegAllloc. * Analysis/Instr/AppelRegAlloc.java, Analysis/Instr/AppelRegAllocClasses.java: FSK: moved the Move class up into AppelRegAllocClasses as FSK: a refactoring of the code in preperation for implementing FSK: graph-reset properly. * Analysis/Instr/RegAllocOpts.java: FSK: Clarified some of the documentation for the regalloc options file. * Analysis/Instr/RegAlloc.java: FSK: Added "reachableInstrs()" helper method to RegAlloc, which FSK: generates an iterator over the, you guessed it, reachable FSK: Instrs. FSK: Thanks to Scott for pointing out that the AppelRegAlloc I FSK: checked in last night fails to compile without this. 2001-06-19 pnkfelix * Analysis/Instr/AppelRegAlloc.java: FSK: 1. Finally fixed cleaning so that FSK: a.) extra defs are removed (opportunity rarely encountered FSK: though) FSK: b.) the first uses after a def in a BB isn't reloaded from FSK: memory (much more common) FSK: This was actually much harder to do than I expected it to be. FSK: Notably, turning off cleaning isn't just setting a bit; you FSK: also want to tell the spiller that its okay to respill temps FSK: that you had spilled earlier with cleaning on, because FSK: sometimes those are the ones that are forcing your hand. The FSK: paper that talked about cleaning didn't really make this point FSK: clear... FSK: (I hadn't encountered this before because the "long" ranges FSK: resulting from cleaning were never that long until (b) above FSK: was implemented. Then I got my shit tossed.) FSK: FSK: Anyway, the way I ended up doing this was to remove all FSK: previous spill code, and *then* set a bit. This sounds FSK: inefficient, but this situation is rarely encountered, and its FSK: done at most once per method, so its acceptable. FSK: FSK: Also, added some code to turn off cleaning earlier than just FSK: two cycles into allocation if necessary. Notably, if our FSK: spiller can't find a node to spill, that's a sign that FSK: cleaning is screwing us over. FSK: FSK: 2. Put in the warning about emitting unreachable code, just like FSK: we have in GraphColoringRegAlloc. This is a side-effect of FSK: the need to hack in allocation on unreachable code. FSK: Preferably we'd want to get rid of the original source of the FSK: unreachable code, but that's not a project I'd want to get FSK: myself into at this point. FSK: FSK: 3. Switched from only gather global (program-wide) spill FSK: statistics to gathering and printing both method-local and FSK: global stats. This was a side-effect of the removing all FSK: spill code thing; it was easier to reset a local dataset than FSK: to try to backtrack on a global one. Plus the numbers are FSK: much more readable this way (though the actual information FSK: content is pretty much unchanged). * Main/SAMain.java: FSK: No one else uses the -P option but us lowly assembly-targetting folk, FSK: but I'm still gonna maintain it. FSK: It was dying because of the peephole optimizations I put into print() FSK: for Emmett. So I fixed it to use something other than print(). * Analysis/BasicBlock.java: FSK: Made an expensive assertion message a little easier to turn FSK: on and off (haven't found the need for a debug flag for this FSK: one yet though) FSK: Added a toString() method to BasicBlock.Factory that FSK: prints its BasicBlocks [ for nice low-cost use with the FSK: Util.assert(String,Object) method ] * IR/Assem/Instr.java, IR/Assem/InstrDIRECTIVE.java, IR/Assem/InstrLABEL.java: FSK: Added a little more intelligence about handling groups FSK: when replacing and removing Instrs, including an assert FSK: for a case I'm not sure how to handle yet. FSK: Also added "isDirective()" and "isLabel()" predicate FSK: methods to Instr's specification, and corresponding implementations FSK: where known to me to be appropriate. * IR/Assem/InstrGroup.java: *** empty log message *** * IR/Assem/InstrGroup.java: FSK: A collection of fixes reflecting the change from the FSK: Group->!Instr representational mapping to the entry/exit pair of FSK: mappings. Am a bit unnerved by the fact that this "legacy code" FSK: bug (if you can call code that young legacy) didn't arise FSK: earlier, but it was definitely wrong, so I'm thankful for having FSK: caught it. 2001-06-18 witchel * Analysis/Tree/DominatingMemoryAccess.java: Rip out my old crufty code. This is in preparation for turning DominatingMemoryAccess into a lean, mean, multi-use analysis machine. * Backend/MIPS/CodeGen.spec: Replace broken long to float conversion with a working long to float conversion. 2001-06-18 C. Scott Ananian * Main/EventDriven.java, Backend/Runtime1/DataGC.java, Backend/Runtime1/SPAllocationStrategy.java, Backend/Generic/GCInfo.java, Backend/Analysis/BasicGCInfo.java, Backend/Analysis/MakeGCThreadSafe.java, Analysis/Quads/QuadLiveness.java, Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/ContCode.java, Analysis/EventDriven/ContCodeNoSSA.java, Analysis/EventDriven/ContCodeSSI.java, Analysis/EventDriven/EventDriven.java, Analysis/EventDriven/EventDrivenCode.java, Analysis/EventDriven/LockRemove.java, Analysis/EventDriven/ToAsync.java, Analysis/EnvBuilder/EnvBuilder.java, Analysis/EnvBuilder/EnvCode.java, Analysis/ContBuilder/ContBuilder.java, Analysis/Liveness.java, Analysis/ReachingDefsImpl.java, Analysis/AllCallers.java: Ran bin/copyright.perl to update Karen's email address as per her commit. * Main/SAMain.java: Turn on the small method inliner. * Analysis/Quads/MethodInliningCodeFactory.java: Final bug fix to MethodInliningCodeFactory. It works now. I switched the input type from SSI to SSA and this eliminated some weird type-not-known errors in sigma functions in the output. * Analysis/Quads/SmallMethodInliner.java: New file. * Analysis/Quads/SmallMethodInliner.java: This code factory extends MethodInliningCodeFactory to specify inlining for nonvirtual calls to small methods. It currently attempts to bloat the code by 10% with inlining. Its estimate is not exact. (See XXX in the code.) * Analysis/Quads/MethodInliningCodeFactory.java: Many, many bug-fixes. Updating this code to work properly with the current infrastructure. Inlining recursive methods and methods with more than one THROW or RETURN ought to work now. A lot of other bogosity was cleaned up, as well. 2001-06-18 kkz * bin/copyright.perl: Fixed email address. 2001-06-18 pnkfelix * Analysis/Instr/AppelRegAlloc.java: FSK: Named the value formerly known as '2' (NUM_CLEANINGS_TO_TRY) * Analysis/Instr/AppelRegAlloc.java, Analysis/Instr/AppelRegAllocClasses.java: FSK: 1. Turned a checkRep into a NOP (was an expensive check) FSK: 2. Refactored a common pattern to check for set intersection FSK: into its own routine. (Experimented with other implementations FSK: as well, but saw no significant improvement. Perhaps will FSK: look into more aggressive rewrite, like a switch to bitsets, FSK: which have faster intersection impls) 2001-06-18 C. Scott Ananian * Analysis/Quads/MemoryOptimization.java: Speed fix. Now fast *and* powerful. Should be correct, too, I think. * Analysis/Quads/MemoryOptimization.java: more intelligent memory optimization. now handles merges. unfortunately, the last change I made *really* slowed the analysis down. I'll see what I can do about that. * Analysis/Quads/FieldSyncOracle.java: A little bit of noise on standard out to show how effective our global field/sync analysis was. * Analysis/Quads/MemoryOptimization.java: Limited merge support added. Should coalesce more memory accesses. * Analysis/Quads/MemoryOptimization.java: Add a memory optimization pass. This is just the first draft, and it only works within basic blocks at the moment. This will change. * Analysis/Quads/MemoryOptimization.java: New file. * Main/SAMain.java: Add a memory optimization pass. This is just the first draft, and it only works within basic blocks at the moment. This will change. * IR/Quads/QuadNoSSA.java, IR/Quads/QuadRSSx.java, IR/Quads/QuadSSI.java, Analysis/Quads/CallGraphImpl.java: Add a little bit better support for QuadSSA to the canonical code factories. Also fixed a bug in the QuadRSSx code factory: it was not handling abstract methods correctly. Apparently nobody ever used this code factory. Also removed an over-strict restriction on the input code type for Quads.CallGraphImpl. 2001-06-17 C. Scott Ananian * Util/BitString.java, IR/Tree/PreciselyTyped.java, IR/Tree/RETURN.java, IR/Tree/THROW.java, IR/Tree/TreeKind.java, IR/RawClass/ConstantInterfaceMethodref.java, Analysis/Realtime/AllCheckRemoval.java, Analysis/Realtime/CheckAdder.java, Analysis/Realtime/CheckAdderNoSSA.java, Analysis/Realtime/CheckAdderWithTry.java, Analysis/Realtime/CheckRemoval.java, Analysis/Realtime/NoHeapCheckRemoval.java, Analysis/Realtime/Realtime.java, Analysis/Realtime/RealtimeAllocationStrategy.java, Analysis/Realtime/RealtimeRuntime.java, Analysis/Realtime/Stats.java, Analysis/Realtime/ThreadToRealtimeThread.java, Analysis/Quads/CollectSyncStats.java, Analysis/Quads/QuadCounter.java, Analysis/PointerAnalysis/InstrumentSyncOps.java, Analysis/DataFlow/BackwardDataFlowQuadVisitor.java, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/DataFlow/DataFlowQuadVisitor.java, Analysis/DataFlow/ForwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/ForwardDataFlowQuadVisitor.java, Analysis/DataFlow/QuadEnumerator.java, Analysis/DataFlow/ReversePostOrderEnumerator.java, Analysis/DataFlow/ReversePostOrderIterator.java: Add @version tags where missing. A few minor @author/copyright updates, too. All courtesy of the latest version of the bin/copyright.perl script. * bin/copyright.perl: bug fix: script would incorrectly truncate author strings which ended in ", based on..." as some do. new feature: adds @version tags to files missing them. * Util/TypeInference/TypeInference.java, Util/LightBasicBlocks/CachingLBBConverter.java, Util/LightBasicBlocks/CachingSCCLBBFactory.java, Util/LightBasicBlocks/LBBConverter.java, Util/LightBasicBlocks/LightBasicBlock.java, Util/LightBasicBlocks/SCCLBBFactory.java, Util/TypeInference/ArrayInfo.java, Util/TypeInference/CachingArrayInfo.java, Util/TypeInference/ExactTemp.java, Util/Collections/DisjointSetStructure.java, Util/Collections/GenericInvertibleMap.java, Util/Collections/GenericInvertibleMultiMap.java, Util/Collections/InvertibleMap.java, Util/Collections/InvertibleMultiMap.java, Util/Collections/LLDisjointSetStructure.java, Util/Collections/ListWrapper.java, Util/Collections/MapWrapper.java, Util/Collections/UnmodifiableMultiMap.java, Util/BasicBlocks/BBConverter.java, Util/BasicBlocks/CachingBBConverter.java, Util/BasicBlocks/CachingSCCBBFactory.java, Util/BasicBlocks/SCCBBFactory.java, Util/PredicateWrapper.java, Util/Timer.java, Util/BinHeapPriorityQueue.java, Util/BinaryRelation.java, Util/BitString.java, Util/CloneableIterator.java, Util/MaxPriorityQueue.java, Util/ParseUtil.java, Runtime/CounterSupport.java, Main/ODPAMain.java, Main/PAMain.java, Interpret/Tree/HClassInfo.java, Interpret/Tree/InterpreterCachingCodeFactory.java, Interpret/Tree/OffsetMap.java, IR/Tree/TreeCode.java, IR/Tree/TreeVerifyingVisitor.java, IR/Tree/TreeVisitor.java, IR/Quads/CleanHandlers.java, IR/Quads/Qop.java, IR/Quads/QuadRSSx.java, IR/Quads/RSSxToNoSSA.java, IR/Quads/TESTER.java, IR/Quads/ThreadInliner.java, IR/Properties/UseDefer.java, IR/Assem/Instr.java, IR/Assem/InstrCALL.java, IR/Assem/InstrFactory.java, IR/Assem/InstrGroup.java, IR/Assem/InstrMEM.java, IR/Assem/InstrVisitor.java, IR/Bytecode/InGen.java, IR/Bytecode/InMerge.java, ClassFile/HData.java, Backend/Sparc/CodeGen.spec, Backend/StrongARM/AccelRFInfo.java, Backend/StrongARM/Frame.java, Backend/Runtime1/SPAllocationStrategy.java, Backend/PreciseC/PGCNiftyAllocationStrategyWithStats.java, Backend/Runtime1/DataGC.java, Backend/MIPS/BypassLatchSchedule.java, Backend/MIPS/CodeGen.spec, Backend/MIPS/Frame.java, Backend/MIPS/RegFileInfo.java, Backend/MIPS/StackInfo.java, Backend/Maps/InlineMap.java, Backend/Generic/Frame.java, Backend/Generic/GCInfo.java, Backend/Generic/MaxMunchCG.java, Backend/Generic/RegUseDefer.java, Backend/Analysis/BasicGCInfo.java, Backend/Analysis/InterfaceMethodMap.java, Backend/Analysis/MakeGCThreadSafe.java, Analysis/Transactions/FieldOracle.java, Analysis/Transactions/GlobalFieldOracle.java, Analysis/Transactions/HoistingCheckOracle.java, Analysis/Transactions/SimpleFieldOracle.java, Analysis/Transactions/TreePostPass.java, Analysis/Tree/ConstantPropagation.java, Analysis/Tree/DominatingMemoryAccess.java, Analysis/RoleInference/LocalVariableNamer.java, Analysis/RoleInference/RoleInference.java, Analysis/Realtime/AllCheckRemoval.java, Analysis/Realtime/CheckAdder.java, Analysis/Realtime/CheckAdderNoSSA.java, Analysis/Realtime/CheckAdderWithTry.java, Analysis/Realtime/CheckRemoval.java, Analysis/Realtime/CheesyPACheckRemoval.java, Analysis/Realtime/ClassReplacer.java, Analysis/Realtime/NoHeapCheckRemoval.java, Analysis/Realtime/PACheckRemoval.java, Analysis/Realtime/QuantaChecker.java, Analysis/Realtime/Realtime.java, Analysis/Realtime/RealtimeAllocationStrategy.java, Analysis/Realtime/RealtimeRuntime.java, Analysis/Realtime/SimpleCheckRemoval.java, Analysis/Realtime/Stats.java, Analysis/Realtime/ThreadToRealtimeThread.java, Analysis/Quads/CallGraph.java, Analysis/Quads/CollectSyncStats.java, Analysis/Quads/FieldSyncOracle.java, Analysis/Quads/MethodInliningCodeFactory.java, Analysis/Quads/QuadCounter.java, Analysis/PointerAnalysis/Stats.java, Analysis/PointerAnalysis/ActionVisitor.java, Analysis/PointerAnalysis/ArtificialTempFactory.java, Analysis/PointerAnalysis/EdgeOrdering.java, Analysis/PointerAnalysis/EdgesNCallees.java, Analysis/PointerAnalysis/InstrumentAllocs.java, Analysis/PointerAnalysis/InstrumentSyncOps.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/LightPAEdgeSet.java, Analysis/PointerAnalysis/ListCell.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/Matching.java, Analysis/PointerAnalysis/MyAP.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/ODInformation.java, Analysis/PointerAnalysis/ODInterProcPA.java, Analysis/PointerAnalysis/ODMAInfo.java, Analysis/PointerAnalysis/ODNodeStatus.java, Analysis/PointerAnalysis/ODParIntGraph.java, Analysis/PointerAnalysis/ODParIntGraphPair.java, Analysis/PointerAnalysis/ODPointerAnalysis.java, Analysis/PointerAnalysis/PAEdge.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEdgeVisitor.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PALoad.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PANodeVisitor.java, Analysis/PointerAnalysis/PASync.java, Analysis/PointerAnalysis/PAWorkStack.java, Analysis/PointerAnalysis/ParActionVisitor.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/ParIntGraphPair.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/MetaMethods/FakeMetaCallGraph.java, Analysis/MetaMethods/GenType.java, Analysis/MetaMethods/MetaAllCallers.java, Analysis/MetaMethods/MetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphAbstr.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/MetaMethods/MetaMethod.java, Analysis/MetaMethods/SmartCallGraph.java, Analysis/PointerAnalysis/AbstrPAEdgeSet.java, Analysis/PointerAnalysis/ActionRepository.java, Analysis/Maps/ConstMapProxy.java, Analysis/Maps/ExactTypeMapProxy.java, Analysis/Maps/ExecMapProxy.java, Analysis/Maps/MapProxy.java, Analysis/Maps/TypeMapProxy.java, Analysis/LowQuad/Loop/Induction.java, Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopMap.java, Analysis/Instr/HTempMap.java, Analysis/Instr/IgnoreSpillUseDefer.java, Analysis/Instr/InstrMOVEproxy.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/RegAllocOpts.java, Analysis/Instr/TempInstrPair.java, Analysis/Instr/Verify.java, Analysis/Instr/WeightedSet.java, Analysis/Instr/AppelRegAlloc.java, Analysis/Instr/AppelRegAllocClasses.java, Analysis/Instr/Check.java, Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/EqTempSets.java, Analysis/Instr/GraphColoringRegAlloc.java, Analysis/GraphColoring/AbstractGraph.java, Analysis/GraphColoring/Color.java, Analysis/GraphColoring/ColorFactory.java, Analysis/GraphColoring/ColorableGraph.java, Analysis/GraphColoring/ColorableGraphImpl.java, Analysis/GraphColoring/ColorableNode.java, Analysis/GraphColoring/DirectedGraph.java, Analysis/GraphColoring/EdgeNotPresentException.java, Analysis/GraphColoring/Graph.java, Analysis/GraphColoring/GraphColorer.java, Analysis/GraphColoring/GraphImpl.java, Analysis/GraphColoring/GraphVisualizer.java, Analysis/GraphColoring/IllegalEdgeException.java, Analysis/GraphColoring/NoFactorySetException.java, Analysis/GraphColoring/Node.java, Analysis/GraphColoring/NodeAlreadyColoredException.java, Analysis/GraphColoring/NodeNotColoredException.java, Analysis/GraphColoring/NodeNotPresentInGraphException.java, Analysis/GraphColoring/NodeNotRemovedException.java, Analysis/GraphColoring/ObjectNotModifiableException.java, Analysis/GraphColoring/OptimisticGraphColorer.java, Analysis/GraphColoring/SimpleGraphColorer.java, Analysis/GraphColoring/SparseGraph.java, Analysis/GraphColoring/SparseNode.java, Analysis/GraphColoring/UnableToColorGraph.java, Analysis/GraphColoring/UnboundedGraphColorer.java, Analysis/GraphColoring/WrongNodeTypeException.java, Analysis/DataFlow/LiveVars.java, Analysis/DataFlow/QuadEnumerator.java, Analysis/DataFlow/ReachingDefs.java, Analysis/DataFlow/ReachingHCodeElements.java, Analysis/DataFlow/ReversePostOrderEnumerator.java, Analysis/DataFlow/ReversePostOrderIterator.java, Analysis/DataFlow/SpaceHeavyLiveTemps.java, Analysis/EventDriven/BMethod.java, Analysis/EventDriven/CloningVisitor.java, Analysis/DataFlow/BackwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/BackwardDataFlowQuadVisitor.java, Analysis/DataFlow/CachingLiveTemps.java, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/DataFlow/DataFlowQuadVisitor.java, Analysis/DataFlow/ForwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/ForwardDataFlowQuadVisitor.java, Analysis/DataFlow/InstrSolver.java, Analysis/AllCallers.java, Analysis/BasicBlock.java, Analysis/BasicBlockVisitor.java, Analysis/EdgesIterator.java, Analysis/InterferenceGraph.java, Analysis/ReachingDefsCachingImpl.java, Analysis/ReachingDefsImpl.java, Analysis/SSITOSSAMap.java, Analysis/ToSSA.java: Updated copyright and authorship information for entire FLEX package. Everyone now has a consistent @author string, and most files should have the proper copyright notice at top. * bin/copyright.perl: Added code to normalize the crazy variety of author strings in javadoc and copyright lines. Now everyone has one 'canonical' name and address. If you don't like the name/address this script is using, check in a change. Also updated copyright date to 2001 for new files. * Analysis/Quads/FieldSyncOracle.java: A FieldSyncOracle tells you which fields can be read (directly or indirectly) by which methods, and which methods may execute a lock operation, either directly or indirectly. * Analysis/Quads/FieldSyncOracle.java: New file. * Util/Collections/InvertibleMultiMap.java: behavior under mutation and identity of this and this.invert().invert() are now part of the documented InvertibleMultiMap contract. * Util/Collections/GenericInvertibleMultiMap.java, Util/Collections/InvertibleMultiMap.java: Added an InvertibleMultiMap to go along with Felix's InvertibleMap. In fact, you can always replace an InvertibleMap with an InvertibleMultiMap, as MultiMaps are a correct subclass of Map. A slight difference: Felix's InvertibleMap.invert() method returns a MultiMap; my InvertibleMultiMap.invert() method returns an InvertibleMultiMap! In fact, for an InvertibleMultiMap, this.invert().invert()==this. Which is kinda cool. (Note that this is object equality, not just content equality.) In addition, InvertibleMultiMaps are fully mutatable: you can add/remove elements from either the multimap or its inverse and the change is reflected in the both. * Util/Collections/GenericInvertibleMultiMap.java, Util/Collections/InvertibleMultiMap.java: New file. * Util/Collections/GenericInvertibleMap.java, Util/Collections/InvertibleMap.java: Added author/version tags. 2001-06-16 C. Scott Ananian * Analysis/Tree/CacheEquivalence.java, Analysis/Tree/DominatingMemoryAccess.java, Main/SAMain.java: fixed a big thinko: i was using the size of objects with a given type to enable more agressive small-object optimization, without realizing that *objects can be subtyped* and so can have a larger size than their type would at first seem to indicate. We now look at all of a types subclasses and test against the maximum before enabling the small-object optimization. Although this change is necessary for correctness, its impact on statistics should be small. Emmett only found one violation in SPEC (in Jack) which could be attributed to this bug, and there only because the small-object optimization was taking precedence over the more exact analysis which would have properly separated cache equivalence classes. Scott's claims: a) class hierarchies are generally broad, not deep. b) I suspect even deep subclasses are generally pretty small. c) I expect that most local variables (the only types we look at, at present) are typed rather closely. By tomorrow Emmett should be able to tell me if these assumptions are correct, or whether our cache-equivalence statistics are changed drastically by this bug-fix. * Analysis/Tree/CacheEquivalence.java: Slightly better debugging output for the CacheEquivalence analysis. * bin/build-spec: Silly one-character bug in the build-spec script. I always confuse shell syntax (no leading dollar in variable definitions) with perl syntax (leading dollar always included). Sigh. Current thinking is that the leading dollar will be more separable from the variable name in Perl 6, however, so maybe I'll be able to get this straightened out in my head. 2001-06-15 pnkfelix * IR/Assem/Code.java: FSK: 1. Added a wrapper myPrint(..) method for convenience in FSK: other pieces of code that I'm not checking in. FSK: 2. Made the BufferedReader that processes the assembly FSK: strings use a tailor-sized buffer since Scott and I FSK: discovered the huge number of intermediate char[]'s being FSK: generated during compilation. This will produce the same FSK: number of char[]'s, but they won't be 8k at least. 2001-06-15 C. Scott Ananian * bin/build-spec: Extreme hack to allow build-spec-* to have command-line arguments which get appended to SPECBUILDOPTS. bin/build-spec-precisec -Dfoo=bar -F 1 2 works like you'd expect now. * bin/build-arm-hack, bin/build-arm-pnk, bin/build-mipsda, bin/build-mipsvp, bin/build-precisec: You can now put "-Dproperty=value" flags on the bin/build-* command line (before the class name) and the script will correctly make them flags for java (instead of flags for harpoon.Main.SAMain). * IR/Quads/QuadNoSSA.java: Added a java property to disable exception coalescing on architectures (like MIPS) where this causes long branches not well supported by the instruction set. Add -Dharpoon.quads.nocoalesce=true to your flexc_options variable to compile for these architectures. * Backend/StrongARM/Frame.java: Selection of Runtime1 or Runtime2 is now done via harpoon.runtime property, just as for the precisec backend. * Support/servo.jar, Support/video.jar: Check in support packages for building java-car programs. * Support/servo.jar, Support/video.jar: New file. * Main/SAMain.java: Turned on array unrolling code for Emmett. * Analysis/Quads/ArrayUnroller.java: Bug fix to loop unroller: don't modify the quads on which we ran the LoopFinder analysis, as this may cause it to give bogus information. So now we run LoopFinder on the ancestorHCode and modify only the cloned hcode and everyone is much happier. Also add an important check so that we don't try to unroll the top-level pseudo-loop (which has a 'HEADER' quad as its loop header). This code works now for my simple test case. * Analysis/Quads/ArrayUnroller.java: bug fix: prune Unreachable entrance edges to the unrolled loop iterations. Also update to new version of Loops interface. * Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/BasicInductions.java, Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopMap.java, Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/Loops/LoopFinder.java, Analysis/Loops/Loops.java, Analysis/Instr/AppelRegAlloc.java: Updated loop interface to have consistent capitalization, and to provide loopEntranceEdges() and loopExitEdges() methods which provide the list of *edges* entering/leaving the loop. * Analysis/Loops/LoopFinder.java, Analysis/Loops/Loops.java: LoopFinder wasn't properly initializing 'grapher' in the private constructor, causing a null pointer error. Changed return type of loopBackedges() and loopExits() to Set of HCodeEdges, instead of Set of HCodeElements. The edge information is much more useful in this case. Changed javadoc in Analysis/Loops/Loops.java to reflect this, too. Oddly enough, no other analysis in the infrastructure currently uses these two functions. * Analysis/Quads/ArrayUnroller.java: First commit of new ArrayUnroller pass to support CacheEquivalence. Not yet tested. * Analysis/Quads/ArrayUnroller.java: New file. * Tools/Annotation/Java12.cup: Improvements to source code annotation tool: better implementation of inner class scoping; catch a possible null pointer exception in the javadoc url annotation code. * Tools/Annotation/Java12.cup: The optional extra semicolon at the end of class declarations has become official JLS. * Analysis/Quads/DispatchTreeTransformation.java: Bugfix to DispatchTreeTransformation (used to create more nonvirtual calls so that we can inline more stuff): call.method() doesn't necessarily point to the exact method we invoke just because the receiver is an exact type. We need to find the method corresponding to the exact type and start from *there*. _200_check now compiles and executes correctly with DispatchTreeTransformation turned on. * Tools/Annotation/Lex/Lexer.java, Tools/Annotation/Java12.cup: Add links from annotated source code back to javadoc. * GNUmakefile, bin/annotate.perl: Add links from javadoc to CVS log. 2001-06-14 C. Scott Ananian * bin/annotate.perl: Link the filename in the javadoc @version string to the URL for the annotated source file. * bin/build-precisec: REVERT Alex's check-in of 2001/06/07 "many small changes accumulated in the last weeks" which BROKE BUILDING SPEC WITH PRECISEC because NewThread.jar was added to the FLEX_SUPPORT_FILES list. Aaarrrgh. This is the second file from that check-in which I've had to revert; doit_no_rtj in Main/SAMain.java was another piece of hideous evilness which should never have been committed to the repository. * Analysis/Tree/CacheEquivalence.java: Better definition of k-groups mean that we find cache equivalence groups between first and second iteration now. Yay! This is a pretty kickin' analysis. I always love it when the analysis proves smarter than its author: CacheEquivalence correctly determined that there you can't eliminate the second array access tag check from Object[] oa = new Object[100]; for (int i=0; i+(0 mod N) and +(1 mod N), if gcd(N,32)>1. This detects cache-equivalence groups in manually unrolled loops. When we write a loop-unrolling pass, it will detect eq groups there, too. Currently, the k-group definition is a little funky, so that the first iteration of an unrolled loop is not correctly put in the same k-group as the other iterations. Fixing this is not difficult (basically, k-groups should represent phi functions, ie definition *groups*, instead of single definition *points*) but I'm going to commit what I have first, since it works. =) * Analysis/Tree/CacheEquivalence.java: More bug fixes in modular arithmetic dataflow: UNKNOWN*c=0 mod c only if |c|>1. Also -(a mod b)=(b-a mod b) but (b-a) has to be reduced mod b if a is zero. * Analysis/Tree/CacheEquivalence.java: field/class renaming to re-introduce some sanity to an over-extended analysis. no functional changes. * Analysis/Tree/CacheEquivalence.java: Whoops: fix broken "mymod" function: -4 mymod 4 should be 0, not 4. 2001-06-14 witchel * Main/SAMain.java: Support the mipsda makefile template. Sorry I forgot to check this in. * Support/mipsda-makefile.template: Specify ASFLAGS for our assembly. 2001-06-14 C. Scott Ananian * Analysis/Tree/CacheEquivalence.java: Bug-fix with lattice value unification. 2001-06-14 bdemsky * Analysis/RoleInference/LocalVariableNamer.java, Analysis/RoleInference/RoleInference.java: Changed some of the trace annotations. 2001-06-14 C. Scott Ananian * Analysis/Tree/CacheEquivalence.java: Add rules for multiplying unknowns: UNKNOWN*(a mod b) = 0 mod gcd(a, b). [let gcd(0, x)=gcd(x, 0)=x] (let b=0 for "non-modulo" values) 2001-06-14 witchel * Backend/MIPS/CodeGen.spec: Bug fix: always flush DA reg 0 since it is used in function prolog/epilog. Bug fix: I forgot a DA suffix for a lw. Add long to float and float to long conversion for javac. javac doesn't terminate, so this code is suspect. * Analysis/Tree/DominatingMemoryAccess.java: Just to be clean, copy the structures we pass to the frame, then null them out for easy reclamation. Add a useful debugging flag. 2001-06-14 C. Scott Ananian * Analysis/Tree/CacheEquivalence.java: Improved dataflow analysis for CacheEquivalence tracks values of the form "a mod b" in addition to constants. This is intended to track cache equivalence classes in arrays in unrolled loops and such, but at the moment is not fully hooked up due to safety issues: we can't be sure 0+32*k1 (0 mod 32) and 1+32*k2 (1 mod 32) are in the same cache line unless we can prove that k1==k2. The next CacheEquivalence commit (later today) will introduce "k-groups" into the dataflow analysis to enable us to do just that. Some moderate increase in precision is likely with this commit, as we do a better job of tracking non-trivial constants, but the important thing is to bang on this version of the analysis for a bit to make sure it doesn't introduce any new bugs. * Analysis/Tree/CacheEquivalence.java: Silly bug fix: I wrote 'offset=offset' instead of 'offset=ko.offset'. Result is that large objects were not being split correctly into different equivalence classes. Fixed now. 2001-06-13 C. Scott Ananian * Util/Util.java: Added gcd() functions to harpoon.Util.Util. These are used in Analysis/Tree/CacheEquivalence in the computation (a mod b) * (c mod d) = (ac) mod gcd(b,d) * Analysis/Tree/CacheEquivalence.java: bug fix: arrays can't get the "small object exception" since their length is not statically known. 2001-06-12 witchel * Support/mipsda-makefile.template: Use tabs, not spaces. 2001-06-12 C. Scott Ananian * Analysis/Tree/MemHoisting.java: Never try to commit when you're in a hurry to leave. Nothing will work. This is the final bug-fix to the bug-fixes that causes MemHoisting to properly treat the MOVE(MEM(x), MEM(y)) case. With this commit, the CacheEquivalence class finally plays nicely with DominatingMemoryAccess. * Analysis/Tree/MemHoisting.java: Oh, the perils of too-quickly committing. One character bug. (Adding a little bit of doc to pad out the commit.) * Analysis/Tree/MemHoisting.java: Ack! I put the wrong assertion in. This one is better. * Analysis/Tree/MemHoisting.java: Bugfix: MemHoisting was being too conservative with MOVEs, wrongly refusing to touch MOVE(MEM(x), MEM(y)) expressions. Fixed. 2001-06-12 witchel * Analysis/Tree/DominatingMemoryAccess.java: I probably went overboard in keeping my old implementation, but what the hey, at least it worked. The new code relies on Scott's MemHoisting. 2001-06-12 C. Scott Ananian * Analysis/Tree/CacheEquivalence.java: Hook up all the pieces. The fancy split-large-objects equivalence class algorithm is complete. Won't know if it works until Emmett fixes DominatingMemoryAccess. * Backend/Runtime1/TreeBuilder.java, Backend/Generic/Runtime.java: Add a headerSize() method to Runtime.TreeBuilder so that low-level optimizations can determine the *exact* size of an object (including header) if they so desire. * Backend/Runtime1/TreeBuilder.java: Bug-fix: arrayNew() wasn't initializing fields of java.lang.Object (in those builds where fields have been added to java.lang.Object). Fixed now: memset is called on the region between OBJ_ALENGTH_OFF and OBJ_FZERO_OFF. * Analysis/Tree/CacheEquivalence.java: Fancy new dataflow analysis to extract "base pointer + constant" types. Not fully hooked up, so the analysis results aren't better yet, but it's getting there. * Util/ArrayIterator.java: Add a helpful assertion. * IR/Properties/CFGrapher.java: Bugfix: CFGrapher.getLastElements() is actually allowed to return 'null'. * Analysis/ReachingDefsAltImpl.java: Bug-fix: can't mix HCode.getElements() and CFGrapher; must use CFGrapher.getElements() instead. * IR/Properties/CFGrapher.java: Added a getElements() method to CFGrapher. 2001-06-12 witchel * Support/mipsda-makefile.template: New file. * GNUmakefile, Support/mipsda-makefile.template: This makefile contains some perl code I need to massage the mipsda output until it is acceptable to a hacked gas. * bin/build-mipsda: This points to my version of the assembler. * bin/build-mipsvp: This now works. 2001-06-12 C. Scott Ananian * Analysis/Tree/DominatingMemoryAccess.java: Removed object size restriction, as DominatingMemoryAccess does not have enough information here to compute the size in all cases (e.g. derived types). This was causing assymmetries in the defUse and useDef maps and eventually an assertion failure. CacheEquivalence should handle object size issues. 2001-06-11 C. Scott Ananian * Backend/Runtime1/TreeBuilder.java: Give real (future) object types to objects-under-construction, since no one is allowed to look at these anyway, and it makes analysis easier (especially for the cache-equivalence analysis). * Analysis/Tree/CacheEquivalence.java: bug fix: forgot to add the cache equivalence set to the post-set, if it is new. 2001-06-11 kkz * Backend/Runtime1/DataClaz.java: Changed the format of the GC bitmaps slightly so that we use all the bits. You need to update the Runtime if you get this change. 2001-06-11 witchel * Analysis/Tree/DominatingMemoryAccess.java: Simplify my code & fit it to Scott's interface. 2001-06-11 C. Scott Ananian * IR/Tree/Print.java: Remove hashcode noise from Tree.Print. Use a PrintCallback if you really wanted this information. 2001-06-11 witchel * Analysis/Tree/DominatingMemoryAccess.java: Move the code around so everything that uses Scott's stuff is in one place. Simplify. 2001-06-11 C. Scott Ananian * Analysis/Tree/CacheEquivalence.java, Analysis/Tree/DominatingMemoryAccess.java: Export full Set of tag check uses. Rename methods as well, which required a one-line change to DominatingMemoryAccess. * bin/build-mipsda, bin/build-mipsvp: remove the harpoonpath noise. * Main/SAMain.java: Enable MemHoisting for emmett's backends. * bin/build-spec: New file. * bin/build-spec, bin/build-spec-arm-hack, bin/build-spec-arm-pnk, bin/build-spec-mipsda, bin/build-spec-mipsvp, bin/build-spec-precisec: Refactored the build-spec-* scripts. Now there is one top-level build-spec script and every other build-spec-foo script is a simple one-liner which invokes build-spec. Hopefully this aids maintainability. Functionality of the various scripts should remain exactly the same after this commit, except for the build-spec-mips* scripts, where this unification fixes some minor bugs. @SPLIT: build-spec-precisec build-spec@ * Analysis/Tree/MemHoisting.java: Improved MemHoisting: don't hoist the first MEM in a subtree, just the others. This keeps more depth in the tree for better instruction selection. * Analysis/Tree/Simplification.java: Bugfix in Analysis/Tree/Simplification: I apparently didn't realize that a labelled continue in a do-while block still re-evaluates the while expression, so in "do { ... } while(false);" a continue is exactly the same as a break. This may have caused us to under-simplify certain expressions, but I think we kept running Simplify until fixed point, so I doubt the bug had a visible effect other than slightly increasing running-time. Also documented the limitation that a rule may not return a result which includes the base of the rule. * Analysis/Tree/MemHoisting.java: Bug-fixes: first off, can't reuse the base of the pattern with the Simplification pass. Can't figure out if this is a bug or not. Second, our first counting pass was using getElements() instead of the CFGrapher; this has been fixed. Maybe I should add a call similar to getElements() to CFGrapher, so I don't have to manually do the recursion. Lastly, I needed to stop infinite application of the pattern and prevent it from applying to MOVE(MEM(x), ...) (where it changes the semantics of the MOVE completely). MemHoisting now works. 2001-06-10 C. Scott Ananian * Analysis/Quads/QuadClassHierarchy.java: A different fix for the errant-pending bug (reverting the previous fix). * Analysis/Quads/QuadClassHierarchy.java: When nonvirtual methods were 'rediscovered' as being virtual, they were being re-marked as pending, even if we were already done with them. This fixes the problem, which was visible was compiling spec benchmark 213_javac. * bin/build-precisec: No more harpoonpath noise. * Main/SAMain.java: Removed Alex's awful evil do_it_nortj function. yuck yuck gag gag this should never have been checked in, especially as it is NOT EVER USED IN CHECKED-IN CODE. Please please *please* review your commits with cvs diff beforehand. Added awful evil 'alexhack' parameter to do_it() so that the do_it_nortj behavior is preserved; hopefully Alex will tell me that I can remove this entirely. 2001-06-08 witchel * bin/build-mips: This file was unintended. 2001-06-08 wingman * Support/realtime.jar, Main/SAMain.java: This update adds a "QuantaThread" that runs in the background to set a flag that is checked by "QuantaChecker" to see if some thread processing needs to happen. QuantaChecker has a call at the start of every method. To make this work, set the flag REALTIME_THREADS in Analysis/Realtime/Realtime.java to true. * Analysis/Realtime/QuantaChecker.java: New file. * Analysis/Realtime/QuantaChecker.java, Analysis/Realtime/Realtime.java: This update adds a "QuantaThread" that runs in the background to set a flag that is checked by "QuantaChecker" to see if some thread processing needs to happen. QuantaChecker has a call at the start of every method. To make this work, set the flag REALTIME_THREADS in Analysis/Realtime/Realtime.java to true. 2001-06-07 witchel * Main/SAMain.java: Put in calls to Scott's MemHoisting class, put comment it out since it doesn't work. * Analysis/Tree/DominatingMemoryAccess.java: Separate interface & implementation. Integrate Scott's CacheEquivalence class even though it doesn't work for me yet. * Backend/MIPS/CodeGen.spec, Backend/MIPS/Frame.java: I saw some of Scott's code and was reminded of Interface vs. Implementation. Replace Hash(Map|Set) with Map|Set. * Analysis/Tree/DominatingMemoryAccess.java: Add some documentation. Boy it sure is embarassing to see your own naked entry in that javadoc framework. * bin/build-mips, bin/build-mipsda, bin/build-mipsvp, bin/build-spec-mipsda, bin/build-spec-mipsvp: New file. * bin/build-mips, bin/build-mipsda, bin/build-mipsvp, bin/build-spec-mipsda, bin/build-spec-mipsvp: This convention is atrocious, but anything to make Scott feel more homey. 2001-06-07 salcianu * bin/build-precisec, Support/realtime.jar, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/Matching.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Main/PAMain.java: Many small changes accumulated in the last weeks. 2001-06-07 bdemsky * Analysis/RoleInference/LocalVariableNamer.java, Analysis/RoleInference/RoleInference.java: Local variable name support added. RoleInference code updated to support this. * Analysis/RoleInference/LocalVariableNamer.java: New file. 2001-06-07 witchel * Main/SAMain.java: Architecture people love backends. Here is another one for the current direct address model. It is called MIPSDA. * Backend/MIPS/CodeGen.spec: *** empty log message *** 2001-06-06 C. Scott Ananian * Tools/Annotation/Java12.cup: Update to source code annotation tool: we now properly resolve inherited class types. These are called 'visible member types' in the java language specification, although I don't think we're very particular about the "visible" part. An example: class A defines an inner class A.B. Class C now extends A and references 'B' -- this reference should resolve to A.B. It didn't before, now it does. * Analysis/Tree/CacheEquivalence.java, Analysis/Tree/MemHoisting.java: Cache equivalence analysis for Emmett. * Analysis/Tree/CacheEquivalence.java, Analysis/Tree/MemHoisting.java: New file. * Analysis/Instr/AppelRegAlloc.java, Analysis/Instr/AppelRegAllocClasses.java: Fixed two import * statements due to Felix. 2001-06-06 bdemsky * Util/TypeInference/TypeInference.java, Analysis/RoleInference/RoleInference.java: RoleInference changes. 1 million bug fixes and extensions to RoleInference... TypeInference hacked to handle many more quads. 2001-06-05 C. Scott Ananian * bin/build-arm-pnk: Updated build-arm-pnk to be consistent with build-arm-hack and build-arm-precisec. Shouldn't cause anything to break; I'm trusting that Felix will tell me if it does. =) * bin/build-arm-hack: Update build-arm-hack to the same level of grooviness as build-precisec. * IR/Tree/ToTree.java, IR/Tree/ToTreeHelpers.java, IR/Quads/Code.java: Minor tweaks which change the order of code output to conform with the order of source file lines (where that is known). This makes quad form and tree form slightly easier for humans to read. * Support/datagram-root-set: New file. * Support/datagram-root-set: Roots needed for datagram support. 2001-06-05 witchel * Backend/MIPS/CodeGen.spec, Backend/MIPS/Frame.java: Stick the information about DA register usage in the Frame. Pull it out to invalidate all of the DA registers used in this function. * Analysis/Tree/DominatingMemoryAccess.java: Provide an interface to find out which DA numbers were allocated. This is used on function return to invalidate all the registers we used. Provide some statistics about def and use of memory, and how much is captured by the DA registers. 2001-06-05 pnkfelix * IR/Assem/Code.java, IR/Assem/Instr.java, IR/Assem/InstrFactory.java, IR/Assem/InstrGroup.java: FSK: [For reasons unbeknownst to me, my last few attempts to commit only FSK: *PARTIALLY* succeeded. I am ignoring the philosophical repercussions FSK: of such an event (my faith in CVS is tarnished forever!) and FSK: attempting to complete the commit with as much dignity as I can muster. FSK: No email was sent, but those files ARE in the repository, from what I FSK: can see, and so despite what you may think, you probably should do a FSK: "make update" from your respective Harpoon/Code directory. FSK: For items 1-9 and 14-19, see the logs for something like FSK: Analysis.DataFlow.LiveTemps, which was one of the ones that actually FSK: got all the way through...] FSK: FSK: 10. Migrating myPrint(PrintWriter,boolean,boolean,PrintCallback) to FSK: myPrint(PrintWriter,boolean,PrintCallback) (the second boolean can FSK: be subsumed by an appropriate PrintCallback, which the overloaded FSK: implementation demonstrates; I don't think its possible to FSK: eliminate the first boolean argument "assem" though. FSK: FSK: 11. Added InstrGroup support to Instr and InstrFactory. This amounts to FSK: * a new field "groupList" in Instr (which is null in most cases) FSK: * a couple of nice methods in Instr to abstract away group FSK: membership lookup. (some are probably unneeded and should be FSK: removed, like getGroups()) FSK: * Added an assertion so that we die when you try to insert FSK: spill code in a bad place... hmm. That's funny, I had FSK: assumed that assertion was always in there. It certainly is FSK: dangerous to leave it out, since completing spill code FSK: insertion is often (though not always ) needed to maintain FSK: correctness. Have to talk to Scott about that. FSK: * Some code that tries to be smart about inserting code around FSK: the edge of a group. Should probably be reviewed more FSK: carefully, since it was based on a simple heuristic at the FSK: outset. (but i think it has a sound theoretical basis now) FSK: * a new field "typeToInstrToGroup" in InstrFactory FSK: * a couple of nice methods in InstrFactory to abstract away FSK: extracting abstract views of the code based around various FSK: group types. I know these things SOUND like stuff that FSK: should be in Code, not in InstrFactory, but there is a FSK: one-to-one Code<->InstrFactory mapping so "me classsa est su FSK: classa" and this is just cleaner. FSK: FSK: 12. Added fixes to InstrGroup's implementation of UseDefer; notatably, FSK: useC() and defC() for a group are NON-SYMMETIC operations. I FSK: don't know why realizing this has delighted me so, it just gives FSK: me the same sort of giddiness that Alan Bawden probably gets from FSK: saying "First Class Macros Have Types!" FSK: FSK: 13. Added shortened names to the InstrGroup.Type objects to allow for FSK: nicer toString() output in InstrGroups without sacrificing FSK: feedback. FSK: * Tools/PatMat/CodeGeneratorGenerator.java, Support/NullCodeGen.template: FSK: Hmm. Despite my assertions to the contrary, apparently FSK: these were not commited in my last message? There's FSK: pipe weirdness going down. * Backend/StrongARM/CodeGen.spec.instrGroups, Backend/Generic/Code.java, Backend/Generic/CodeGen.java, Backend/Generic/MaxMunchCG.java, Analysis/Instr/AppelRegAlloc.java, Analysis/Instr/AppelRegAllocClasses.java, Analysis/Instr/Check.java, Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/RegAllocOpts.java: FSK: Well, here it is, folks. The big one. A hush falls over the crowd... FSK: FSK: 1. Added a solve() method to the LiveTemps class, thus removing the FSK: need for those stupid "LiveTemps.make(..)" static methods. [Design FSK: is a gentle stream for me, not a tidal wave.] FSK: FSK: 2. Migrated a number of useful methods and datatypes FSK: [ replace(Instr,Instr), {Spill,Restore}Proxy, fixupSpillCode() ] FSK: in GraphColoringRegAlloc up to its parent class, RegAlloc. Took FSK: the corresponding definitions out of GCRA. FSK: FSK: 3. Added a few more helper methods to RegAlloc (either to clean up FSK: InstrGroup interactions or just to cut down on the noise in the FSK: subclass code) FSK: FSK: 4. Made RegAlloc.computeBasicBlocks() use an Aggregate InstrGroup as FSK: the basis for its view of the code. The nice thing here is that FSK: this is backward compatible with CodeGen.spec files that don't use FSK: InstrGroups, so hopefully migration can be done incrementally FSK: (though admittedly I haven't actually ever carried out an FSK: incremental migration yet; that is what I have to look forward to FSK: over the next week and a half with the MIPS.CodeGen) FSK: FSK: 5. Added a new command to RegAllocOpts, "FORCE_APPEL", which turns on FSK: the use of AppelRegAlloc. This was done mainly to keep Emmett FSK: happy; he should be able to continue using GCRA while I bring FSK: AppelRegAlloc up to speed with MIPS compatibility. FSK: FSK: 6. Documented the prefix-match option for RegAllocOpts. FSK: FSK: 7. Fixed the prefix-match option implementation so that it would FSK: actually match prefixes. FSK: FSK: 8. Added a Backend.Generic.Code.printPreallocatedCode(..) variant that FSK: takes a PrintCallback as an argument to allow for more control over FSK: the print-outs during debugging. (Apparently I accidentally added FSK: an unnecessary import statement too, I'll take that out in a FSK: moment). FSK: FSK: 9. A number of fixes were needed in FSK: Backend.StrongARM.CodeGen.spec.instrGroups. I firmly believe that FSK: this version is safe. (I still am amazed that the hacked allocator FSK: never seems to put spills in "bad places". Perhaps Emmett's FSK: right and I, or at least my creations, really are demented. C:P FSK: FSK: 10. Migrating myPrint(PrintWriter,boolean,boolean,PrintCallback) to FSK: myPrint(PrintWriter,boolean,PrintCallback) (the second boolean can FSK: be subsumed by an appropriate PrintCallback, which the overloaded FSK: implementation demonstrates; I don't think its possible to FSK: eliminate the first boolean argument "assem" though. FSK: FSK: 11. Added InstrGroup support to Instr and InstrFactory. This amounts to FSK: * a new field "groupList" in Instr (which is null in most cases) FSK: * a couple of nice methods in Instr to abstract away group FSK: membership lookup. (some are probably unneeded and should be FSK: removed, like getGroups()) FSK: * Added an assertion so that we die when you try to insert FSK: spill code in a bad place... hmm. That's funny, I had FSK: assumed that assertion was always in there. It certainly is FSK: dangerous to leave it out, since completing spill code FSK: insertion is often (though not always ) needed to maintain FSK: correctness. Have to talk to Scott about that. FSK: * Some code that tries to be smart about inserting code around FSK: the edge of a group. Should probably be reviewed more FSK: carefully, since it was based on a simple heuristic at the FSK: outset. (but i think it has a sound theoretical basis now) FSK: * a new field "typeToInstrToGroup" in InstrFactory FSK: * a couple of nice methods in InstrFactory to abstract away FSK: extracting abstract views of the code based around various FSK: group types. I know these things SOUND like stuff that FSK: should be in Code, not in InstrFactory, but there is a FSK: one-to-one Code<->InstrFactory mapping so "me classsa est su FSK: classa" and this is just cleaner. FSK: FSK: 12. Added fixes to InstrGroup's implementation of UseDefer; notatably, FSK: useC() and defC() for a group are NON-SYMMETIC operations. I FSK: don't know why realizing this has delighted me so, it just gives FSK: me the same sort of giddiness that Alan Bawden probably gets from FSK: saying "First Class Macros Have Types!" FSK: FSK: 13. Added shortened names to the InstrGroup.Type objects to allow for FSK: nicer toString() output in InstrGroups without sacrificing FSK: feedback. FSK: FSK: 14. Changed the PatMat system to s/gen/cgg_gen/g in the output from the FSK: CodeGeneratorGenerators. This is a fairly fundamental change to a FSK: core interface in the system, but it was the cleanest way to add FSK: behavior required by (10.) below FSK: FSK: 15. In Backend.Generic.CodeGen: FSK: * s/genCode/cgg_genCode/ FSK: * s/genData/cgg_genData/ FSK: * s/abstract Instr emit/abstract Instr cgg_backendEmit/g FSK: * Added some transient state for use during code generation FSK: tracking the last emitted instruction, the unfinished groups, FSK: and the factory responsible for generating instances of the FSK: groups. FSK: * Implemented emit/genCode/genData to just make calls to FSK: cgg_versions, *ALONG WITH* establishing and maintaining FSK: additional state that allow for InstrGroup state to be FSK: maintained with the brunt of the effort localized to FSK: Generic.CodeGen. This is an attempt to minimize effort FSK: required from spec-file writers needed for InstrGroups FSK: support. FSK: FSK: 16. Backend.Generic.MaxMunchCG FSK: Trivial interface s/emit/cgg_backendEmit/ to go with (14) and FSK: (15) above. FSK: FSK: 17. Support/NullCodeGen.template FSK: Trivial interface s/gen/cgg_gen/ && s/emit/cgg_backendEmit/ FSK: to go with (14) and (15) above. FSK: FSK: 18. Analysis.Instr package: Added AppelRegAlloc and FSK: AppelRegAllocClasses which are implementations of the Register FSK: Allocation system given in Appel's book. (I had grossly FSK: underestimated the importance that move coalescing has in an FSK: SS{A,I} compiler in my design of GCRA, and so I have now FSK: officially given in and gone with this in the end. Still was/is FSK: non-trivial to adapt to handle architectures with "interesting" FSK: register files... FSK: FSK: 19. Added Analysis.Instr.Check class for externalizing verification FSK: code from the register allocators. Doesn't do much, but that's FSK: what verification is all about, right? "Yes or no," oh baby... FSK: FSK: And that's all folks (I hope!). If you got to the bottom of this message, FSK: Congratualations! You now have an inkling of what I've been going through. * Analysis/Instr/AppelRegAlloc.java, Analysis/Instr/AppelRegAllocClasses.java, Analysis/Instr/Check.java: New file. * Analysis/DataFlow/LiveTemps.java: FSK: Well, here it is, folks. The big one. A hush falls over the crowd... FSK: FSK: 1. Added a solve() method to the LiveTemps class, thus removing the FSK: need for those stupid "LiveTemps.make(..)" static methods. [Design FSK: is a gentle stream for me, not a tidal wave.] FSK: FSK: 2. Migrated a number of useful methods and datatypes FSK: [ replace(Instr,Instr), {Spill,Restore}Proxy, fixupSpillCode() ] FSK: in GraphColoringRegAlloc up to its parent class, RegAlloc. Took FSK: the corresponding definitions out of GCRA. FSK: FSK: 3. Added a few more helper methods to RegAlloc (either to clean up FSK: InstrGroup interactions or just to cut down on the noise in the FSK: subclass code) FSK: FSK: 4. Made RegAlloc.computeBasicBlocks() use an Aggregate InstrGroup as FSK: the basis for its view of the code. The nice thing here is that FSK: this is backward compatible with CodeGen.spec files that don't use FSK: InstrGroups, so hopefully migration can be done incrementally FSK: (though admittedly I haven't actually ever carried out an FSK: incremental migration yet; that is what I have to look forward to FSK: over the next week and a half with the MIPS.CodeGen) FSK: FSK: 5. Added a new command to RegAllocOpts, "FORCE_APPEL", which turns on FSK: the use of AppelRegAlloc. This was done mainly to keep Emmett FSK: happy; he should be able to continue using GCRA while I bring FSK: AppelRegAlloc up to speed with MIPS compatibility. FSK: FSK: 6. Documented the prefix-match option for RegAllocOpts. FSK: FSK: 7. Fixed the prefix-match option implementation so that it would FSK: actually match prefixes. FSK: FSK: 8. Added a Backend.Generic.Code.printPreallocatedCode(..) variant that FSK: takes a PrintCallback as an argument to allow for more control over FSK: the print-outs during debugging. (Apparently I accidentally added FSK: an unnecessary import statement too, I'll take that out in a FSK: moment). FSK: FSK: 9. A number of fixes were needed in FSK: Backend.StrongARM.CodeGen.spec.instrGroups. I firmly believe that FSK: this version is safe. (I still am amazed that the hacked allocator FSK: never seems to put spills in "bad places". Perhaps Emmett's FSK: right and I, or at least my creations, really are demented. C:P FSK: FSK: 10. Migrating myPrint(PrintWriter,boolean,boolean,PrintCallback) to FSK: myPrint(PrintWriter,boolean,PrintCallback) (the second boolean can FSK: be subsumed by an appropriate PrintCallback, which the overloaded FSK: implementation demonstrates; I don't think its possible to FSK: eliminate the first boolean argument "assem" though. FSK: FSK: 11. Added InstrGroup support to Instr and InstrFactory. This amounts to FSK: * a new field "groupList" in Instr (which is null in most cases) FSK: * a couple of nice methods in Instr to abstract away group FSK: membership lookup. (some are probably unneeded and should be FSK: removed, like getGroups()) FSK: * Added an assertion so that we die when you try to insert FSK: spill code in a bad place... hmm. That's funny, I had FSK: assumed that assertion was always in there. It certainly is FSK: dangerous to leave it out, since completing spill code FSK: insertion is often (though not always ) needed to maintain FSK: correctness. Have to talk to Scott about that. FSK: * Some code that tries to be smart about inserting code around FSK: the edge of a group. Should probably be reviewed more FSK: carefully, since it was based on a simple heuristic at the FSK: outset. (but i think it has a sound theoretical basis now) FSK: * a new field "typeToInstrToGroup" in InstrFactory FSK: * a couple of nice methods in InstrFactory to abstract away FSK: extracting abstract views of the code based around various FSK: group types. I know these things SOUND like stuff that FSK: should be in Code, not in InstrFactory, but there is a FSK: one-to-one Code<->InstrFactory mapping so "me classsa est su FSK: classa" and this is just cleaner. FSK: FSK: 12. Added fixes to InstrGroup's implementation of UseDefer; notatably, FSK: useC() and defC() for a group are NON-SYMMETIC operations. I FSK: don't know why realizing this has delighted me so, it just gives FSK: me the same sort of giddiness that Alan Bawden probably gets from FSK: saying "First Class Macros Have Types!" FSK: FSK: 13. Added shortened names to the InstrGroup.Type objects to allow for FSK: nicer toString() output in InstrGroups without sacrificing FSK: feedback. FSK: FSK: 14. Changed the PatMat system to s/gen/cgg_gen/g in the output from the FSK: CodeGeneratorGenerators. This is a fairly fundamental change to a FSK: core interface in the system, but it was the cleanest way to add FSK: behavior required by (10.) below FSK: FSK: 15. In Backend.Generic.CodeGen: FSK: * s/genCode/cgg_genCode/ FSK: * s/genData/cgg_genData/ FSK: * s/abstract Instr emit/abstract Instr cgg_backendEmit/g FSK: * Added some transient state for use during code generation FSK: tracking the last emitted instruction, the unfinished groups, FSK: and the factory responsible for generating instances of the FSK: groups. FSK: * Implemented emit/genCode/genData to just make calls to FSK: cgg_versions, *ALONG WITH* establishing and maintaining FSK: additional state that allow for InstrGroup state to be FSK: maintained with the brunt of the effort localized to FSK: Generic.CodeGen. This is an attempt to minimize effort FSK: required from spec-file writers needed for InstrGroups FSK: support. FSK: FSK: 16. Backend.Generic.MaxMunchCG FSK: Trivial interface s/emit/cgg_backendEmit/ to go with (14) and FSK: (15) above. FSK: FSK: 17. Support/NullCodeGen.template FSK: Trivial interface s/gen/cgg_gen/ && s/emit/cgg_backendEmit/ FSK: to go with (14) and (15) above. FSK: FSK: 18. Analysis.Instr package: Added AppelRegAlloc and FSK: AppelRegAllocClasses which are implementations of the Register FSK: Allocation system given in Appel's book. (I had grossly FSK: underestimated the importance that move coalescing has in an FSK: SS{A,I} compiler in my design of GCRA, and so I have now FSK: officially given in and gone with this in the end. Still was/is FSK: non-trivial to adapt to handle architectures with "interesting" FSK: register files... FSK: FSK: 19. Added Analysis.Instr.Check class for externalizing verification FSK: code from the register allocators. Doesn't do much, but that's FSK: what verification is all about, right? "Yes or no," oh baby... FSK: FSK: And that's all folks (I hope!). If you got to the bottom of this message, FSK: Congratualations! You now have an inkling of what I've been going through. 2001-06-04 witchel * Analysis/Tree/DominatingMemoryAccess.java: When I changed DA numbers from integers to a custom class, I forgot to change the search logic. Now we look at interfering DA registers, and actually allocate a non-conflicting number! Its a good thing I found this before Scott's wonder-analysis really stresses this code. * Backend/MIPS/CodeGen.spec: Instructions that manipulate DA registers are a single instruction. That way Felix and his demented creations can put spill code where they think its righteous. The single instruction model makes a lot of the code generation cleaner, but I didn't un-mess-ify it because I am afraid I might need to return to the multi-instruction approach. This puts the burden on the assembler (or a perl script that runs before the assembler :) 2001-06-03 witchel * Backend/MIPS/CodeGen.spec, Backend/MIPS/Frame.java: This is the spec file support for DA registers. It is disabled by default. The variable enable_daregs needs to be set to true to enable. It is likely that I will get rid of the phantom instructions and make the assembler deal with macros since a pesky tmp restore is currently cropping up between a ph and a sw, ruining my good time. * Analysis/Tree/DominatingMemoryAccess.java: This adds direct register support to the dominating memory access analysis. 2001-05-31 pnkfelix * Backend/StrongARM/CodeGen.spec.instrGroups: FSK: Adding instrgroups version of the spec-file. This is just a FSK: checkpoint version (notably, it carries the same bug from the FSK: old non-instr-grouped spec-file that plagued _202_jess for FSK: the past five days... C:P ) * Backend/StrongARM/CodeGen.spec.instrGroups: New file. * Backend/StrongARM/CodeGen.spec.coarseInstrs: FSK: Purely cosmetic changes to make the spec file match up FSK: better with the original spec file. 2001-05-31 wbeebee * Analysis/Realtime/package.html: There's a new description of the API now available at http://www.rtj.org/public/doc/. I need to go back to make sure that we're compliant - because there are a number of clarifications from the book. 2001-05-31 pnkfelix * Backend/StrongARM/CodeGen.spec.coarseInstrs: FSK: Checking in refinements to the coarseInstrs spec-file; a number FSK: of spots were not generating the right interference information, FSK: and a few places were allowing spill code to be inserted in FSK: the middle of an assignment. (This was all just to bring my FSK: old allocator up to date to allow meaningful comparison with the FSK: new system using InstrGroups) 2001-05-30 witchel * Backend/MIPS/CodeGen.spec: Spec file support for floating (not double) point remainder. This matches the runtime support I put in a while back. 2001-05-24 pnkfelix * Backend/MIPS/CodeGen.spec: FSK: added some dummy-uses to get rid of bad behavior in FSK: emmett's code. 2001-05-22 bdemsky * Analysis/RoleInference/RoleInference.java: More development on role inference instrumentation. 2001-05-22 pnkfelix * Backend/MIPS/CodeGen.spec, Analysis/Instr/GraphColoringRegAlloc.java: FSK: Emmett: this is the checkin you've been waiting for. runprintlong and FSK: runf*** work for me now, so let me know if this causes any issues for FSK: you. (You're gonna get a cvs conflict on the first part 'cause we both FSK: have this change) FSK: FSK: 1. Took dummy-defs out of MIPS.CodeGen, since they were FSK: breaking assembly sequences like: FSK: FSK: dummy-def(t0) FSK: move t0, t0 FSK: FSK: I will get rid of the actual calls and the method body later, but I FSK: didn't want to clutter up the diff in this checkin with that. FSK: FSK: 2. Fixed an interesting oversight in the typical algorithm for FSK: interference graph construction: the usual calculation of FSK: interferes(A,B) is "does a def of A reach a def of B" but that FSK: doesn't work if a single statement is defining both A and B (a FSK: statement need not reach itself). I'm guessing that the textbooks FSK: assume at most one def per instruction. FSK: FSK: 3. Fixed an error in my spill-code insertion routines (need FSK: to put spill-stores AFTER any immediately succeeding dummy FSK: uses, otherwise the dummy tag is useless... can't wait to FSK: integrate InstrGroups into the MIPS backend...) 2001-05-18 bdemsky * Analysis/RoleInference/RoleInference.java: buglets * Main/SAMain.java: Added Role Inference option. * Analysis/RoleInference/RoleInference.java: RoleInference transform * Analysis/RoleInference/RoleInference.java: New file. 2001-05-18 wbeebee * Analysis/Realtime/Realtime.java: Whoops - should have read remove tags, not keep tags! 2001-05-16 bdemsky * Backend/Runtime1/ObjectBuilder.java: Bug fix by CSA: "Extra fields" in Object are now initialized to their proper default (zero) value. Previously all extra fields were assumed to be of type Object, and they were all initialzed to 'null'. This actually seemed to work for fields which had the same length as pointers (ie, most of them), but utterly failed with brian's object unique identifier code, which added a field of type 'long' to Object. 2001-05-15 pnkfelix * IR/Properties/CFGrapher.java: FSK: added helper methods to CFGrapher that return collections of FSK: HCodeElements instead of HCodeEdges, since some algorithms really FSK: *are* node based and not edge based, and frobbing the nodes out FSK: of the edges makes the code ugly. So we localize the ugly code here. * Analysis/DataFlow/SpaceHeavyLiveTemps.java: FSK: generalized space-heavy live-temps analysis to use CFGrapher FSK: instead of relying on CFGraphable interface. * Analysis/DataFlow/LiveTemps.java: FSK: Added more info to debug output in LiveTemps. * Analysis/BasicBlock.java: FSK: Added "dumpCFG()" helper method to bbfactory. 2001-05-15 wbeebee * Support/realtime.jar, Backend/Runtime2/Runtime.java, Backend/Runtime2/TreeBuilder.java, Analysis/Realtime/RealtimeRuntime.java: Moving towards having a working version of RTJ and Runtime2 for sync removal - committing now for Alex's benefit. 2001-05-15 pnkfelix * IR/Assem/InstrGroup.java: FSK: I knew I would miss something. <> FSK: There weren't any *functional* dependences on Instr-prime in FSK: InstrGroup. However, there were two assertions that used FSK: a method that has been added to Instr-prime, and thus isn't FSK: in the repository yet. So I am temporarily commenting out FSK: those assertions in the interest of allowing a clean FSK: repository checkout to compile. * IR/Assem/InstrGroup.java: FSK: Adding InstrGroup class to the repository. This class alone is FSK: not sufficient to support InstrGroups fully; Instr itself FSK: needs to be modified, along with CodeGen.spec and so on. FSK: However, this class is safe to place in the repository, because FSK: it stands on its own; it has no dependences on the changes FSK: I've made to the Instr class or to the CodeGen.spec, so FSK: it is a good candidate for initial addition. * IR/Assem/InstrGroup.java: New file. * Backend/Generic/Code.java: FSK: Extended the Code interface with a method to print the FSK: pre-register-allocated code to System.out, to allow FSK: for debugging during certain internal failure modes. * Analysis/DataFlow/LiveVars.java: FSK: I added a DEBUG flag when I was tracking down a performance leak FSK: a few months ago. This just goes along with my other checkins FSK: the night. * Analysis/BasicBlock.java: FSK: 1. Made the toString() method for BasicBlock a touch more FSK: informative (now gives the first instruction in addition to FSK: the block-id; makes tracing blocks back to the original FSK: code *much* more effective, if you're into that sort of FSK: things FSK: 2. Added a hint to the javadoc on what pre-order and post-order FSK: traversal means. (I restrained myself from documenting FSK: the key-distinction between reverse-pre-order and post-order FSK: though...) * Analysis/Loops/LoopFinder.java: FSK: Extended bdemsky's loop-finder to work with externalized FSK: CFGrapher objects as well as the standard CFGraphable FSK: interface. 2001-05-08 pnkfelix * Analysis/ReachingDefsAltImpl.java: FSK: This is a fix that should have been found a long time ago and in FSK: galaxy far far away. It fixes a compiler-slowness problem that FSK: resulted in the creation of a hack for emmett (under deadline stress) FSK: Hopefully it will speed up the compiler for rhlee's work. 2001-05-02 C. Scott Ananian * Analysis/Transactions/BitFieldNumbering.java: New file. * Analysis/Transactions/BitFieldNumbering.java: Simple field-numbering utility class to help out Transactions implementation where we need to maintain one bit of 'dirty' info *per field*. 2001-04-28 rhlee * Backend/MIPS/CodeGen.spec: RHL: modified my annotation to just add a comment. 2001-04-26 salcianu * bin/build-precisec, Main/PAMain.java, Support/realtime.jar, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/NodeRepository.java: A new option has been added to PAMain: rtj_debug. Hopefully, it will help Wes debug RTJ applications by looking at particular methods and examining what non-exceptions, inside nodes escape them. 2001-04-26 wbeebee * Analysis/Realtime/Realtime.java: Fixed _STATS option - everything should work now with Runtime statistics... just use the -t SIMPLE_STATS, -t REALPA_STATS, -t CHEESY_STATS, options... Fake scopes is broken, though... and will probably remain broken for at least the near future... 2001-04-25 wbeebee * Main/SAMain.java, Support/realtime.jar, Analysis/Realtime/Realtime.java: Changed command-line option processing so that Realtime.java handles it. -t SIMPLE (checks) -t ALL (nochecks) -t CHEESY -t REALPA (real pointer analysis) -t ALL_KEEPTAGS (no checks, but keep tagging) -t STATS (collect Runtime statistics on Scope -> Scope, Scope -> Heap, etc. references) add _FAKESCOPES to any of the above (ie. SIMPLE_FAKESCOPES) if you want the scopes to use just Java (no native methods), and to punt the actual allocation within the scopes. Also, prints out one line when -t option is on to tell the user how it parsed the arguments... 2001-04-24 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/MAInfo.java: Improvements in the stack allocation stuff. The user can now specify in the command line arguments to PAMain which policy to use for sa: 1. stack allocate whenever possible (ie captured) 2. don't do stack allocation in loops (to avoid overflowing the stack). Just execute PAMain with no argument to get a summary of all the options. 2001-04-23 rhlee * Backend/MIPS/CodeGen.spec: RHL: added check to see if !yellow-pekoe. If not yellow-pekoe, annotate RHL: frame instructinos in pre and post fix with ".chkpt" for restore RHL: regions. 2001-04-19 salcianu * Util/LightBasicBlocks/LightBasicBlock.java, Main/PAMain.java, Backend/PreciseC/TreeToC.java, Analysis/Realtime/CheesyPACheckRemoval.java, Analysis/Realtime/PACheckRemoval.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/PointerAnalysis.java: Many small changes for debugging purposes. I've added a new option harpoon.precisec.emit_fake_line_directives If both this option and harpoon.precisec.emit_line_directives are on, the line info is emited as a comment (not as actual #line stuff). 2001-04-11 pnkfelix * Analysis/DataFlow/LiveTemps.java: FSK: checking in a bug fix that should have been put in a FSK: *long* time ago, along with a note on ideas on how FSK: to correctly implement the optimization that is FSK: being backed out. 2001-04-10 rhlee * Analysis/GraphColoring/GraphVisualizer.java: New file. * Analysis/GraphColoring/GraphVisualizer.java: RHL: added file to generate dot input file for the Graph RHL: abstraction 2001-04-10 salcianu * Support/realtime.jar, Main/PAMain.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/Realtime/Realtime.java, Analysis/MetaMethods/FakeMetaCallGraph.java: various changes 2001-04-09 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/MAInfo.java: Adding some option for using the old inlining strategy (1-level inlining). 2001-04-08 salcianu * Analysis/PointerAnalysis/ParIntGraph.java: Applying one of the bug fixes recommended by Frederic. * Analysis/PointerAnalysis/MAInfo.java: Bug fixes and improvd comments in the old inlining code. (Frederic might consider this useful). 2001-04-04 wbeebee * Analysis/Realtime/CheckAdder.java, Analysis/Realtime/CheckAdderNoSSA.java, Analysis/Realtime/CheckAdderWithTry.java, Analysis/Realtime/ClassReplacer.java, Analysis/Realtime/Realtime.java: RTJ now compatible with QuadNoSSA form and QuadWithTry form. 2001-03-30 C. Scott Ananian * Backend/Runtime1/TreeBuilder.java: Setting the property 'harpoon.runtime1.nosync' to 'true' will now cause FLEX to emit *no* synchronization operations. This will cause your program to fail if it requires synchronization. However, it may be useful for benchmarking, on occasion. 2001-03-28 witchel * ClassFile/Linker.java: Give a better error message. 2001-03-23 wbeebee * Backend/PreciseC/Frame.java: Removed random _ that was inserted somehow... * Analysis/Realtime/CheckAdderNoSSA.java, Analysis/Realtime/CheckAdderWithTry.java, Analysis/Realtime/ClassReplacer.java, Analysis/Realtime/RealtimeAllocationStrategy.java: CheckAdderNoSSA and CheckAdderWithTry are the versions of CheckAdder to work with QuadsNoSSA and QuadsWithTry respectively. RealtimeAllocationStrategy replaces malloc with RTJ_malloc and may optionally feed RTJ analysis results in the future. ClassReplacer, when completely finished, will be moved out as a general tool to replace references to one class with references to another (limited to not include certain specified classes and packages, so that the old, unwrapped class can be called by the wrapper...) * Analysis/Realtime/CheckAdderNoSSA.java, Analysis/Realtime/CheckAdderWithTry.java, Analysis/Realtime/ClassReplacer.java, Analysis/Realtime/RealtimeAllocationStrategy.java: New file. * Support/realtime.jar, Backend/PreciseC/Frame.java, Analysis/Realtime/CheckAdder.java, Analysis/Realtime/Config.java, Analysis/Realtime/Realtime.java, Analysis/Realtime/ThreadToRealtimeThread.java, Analysis/Quads/QuadCounter.java: QuadCounter now doesn't produce output. CheckAdder was modified to support QuadNoSSA as well as QuadsWithTry - so does ThreadToRealtimeThread. Realtime and Frame were modified to load in the RealtimeRuntime and RealtimeAllocationStrategy to spit out RTJ_malloc's that are picked up on the Runtime end when using real scopes. 2001-03-13 C. Scott Ananian * Analysis/Quads/QuadClassHierarchy.java: Tricky, tricky: Frederic found, Brian isolated, and I fixed, another subtle subtle bug in QuadClassHierarchy w/ regard to nonvirtual method invocations. Same bug as the last one in that it bit us if a virtual method was first 'discovered' as nonvirtual: the fixup when we discover that it can be invoked virtually was not being done correctly -- we were skipping whole subtrees when we found a method which had been 'done', but *that* method may *also* have been discovered non-virtually, which meant we *weren't* really done tracking down the callables. Fixed now. 2001-03-13 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/AbstrPAEdgeSet.java, Analysis/PointerAnalysis/ParIntGraph.java: Incorporating one of Frederic's bugs reports. AbstrPAEdgeSet.forAllNodes() should work better now. 2001-03-10 salcianu * Main/PAMain.java, Analysis/MetaMethods/MetaCallGraphImpl.java: Small changes 2001-03-08 salcianu * Util/Util.java, Support/realtime.jar, Main/PAMain.java, Main/SAMain.java, Analysis/Realtime/CheckAdder.java, Analysis/Realtime/CheesyPACheckRemoval.java, Analysis/Quads/QuadCounter.java, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java: 1. code cleaning 2. adding a few small methods to harpoon.Util.Util (set difference + collection pretty printer) 3. I'm chasing a nasty bug; this is responsible for most of the changes 2001-03-04 C. Scott Ananian * Analysis/Transactions/SyncTransformer.java: This is a variant of SyncTransformer that uses a TypeInfo to (more) precisely place type casts in the transformed output. It's not perfect, in that some type info is lost in the conversion from SSI to SSA form, and it seems to be slower that the non-precise version. I'll have some numbers shortly that ought to let me know whether the precise type cast placement actually beneficially impacts run time. * Analysis/Transactions/SyncTransformer.java: Added support for counting unique objects read/written. Also added synctrans.read_versions and synctrans.write_versions counters to determine how many calls to getReadableVersion and getReadWritableVersion can be removed by the CheckOracles. 2001-03-04 salcianu * Main/PAMain.java, Main/SAMain.java: Paper-related stuff. 2001-03-04 wbeebee * Analysis/Realtime/CheckAdder.java, Analysis/Realtime/Realtime.java: Added the ability to collect runtime statistics on checks and new's in MemoryScopes to RTJ support. 2001-03-04 salcianu * Support/realtime.jar, Main/PAMain.java, Analysis/Realtime/CheesyPACheckRemoval.java, Analysis/Realtime/PACheckRemoval.java, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PASync.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/Stats.java: Lost of small changes: debug messages, modified options, comments etc. 2001-03-03 C. Scott Ananian * Backend/Runtime1/TreeBuilder.java: Forked off a branch of TreeBuilder that gives you the option of automatically inflating every object as it is created. This is useful for quantitatively determining the inflation overhead, but not so useful (or clean!) as to merit inclusion on the main branch. The branch is named 'inflate-all'. Doing cvs update -r inflate-all Backend/Runtime1/TreeBuilder.java will fetch it. Be careful: the tagged update is sticky. * Analysis/Transactions/SyncTransformer.java: Oops: writable versions are readable, not the other way 'round. * Analysis/Transactions/GlobalFieldOracle.java: Bug fix: GlobalFieldOracle needs to treat static initializers as unsync roots, too. Added a single-line print-out to show us how many exclusively sync/unsync fields the GlobalFieldOracle managed to find. Doesn't appear to be terribly many on most benchmarks. * IR/Quads/UnHandler.java: Improvements to UnHandler: now handles aliases introduced by MOVEs intelligently (and efficiently!), which reduces the need for the Peephole.optimize() pre-pass. Basic idea is to store aliases for a temp as a circularly linked list with a shared boxed type. Updating the shared type is O(1) and adding/removing aliases from the list is also O(1). Also added some toString() implementations of UnHandler.Type for debugging. * Analysis/Transactions/SyncTransformer.java: Add option to exclude counters for harpoon.Runtime.Counters class. Add some more counters: synctrans.new_array, synctrans.new_object, synctrans.read_nt_array, synctrans.read_t_array, synctrans.write_nt_array, synctrans.write_t_array. Fixed typo in name of synctrans.fieldchecks_skipped counter. * Backend/PreciseC/TreeToC.java: Control 'EMIT_LINE_DIRECTIVES' (which when true makes the Tree-to-C emit #line directive to synchronize the output file with the input java source line numbers) with a system property, rather than with a private boolean. 2001-03-01 C. Scott Ananian * bin/build-precisec: Added ability to specify a particular runtime directory on the command-line of bin/build-precisec. This is useful when you've got several variously-configured runtimes in different places. The environment variable RUNTIME_DIR sets the runtime directory that the script will use, if it is set. * Backend/Runtime1/init-safe.properties, Backend/Runtime1/transact-safe.properties: Added Class.getFields0() to init-safe.properties. Added lots of methods from java.lang.reflect.Field, java.lang.reflect.Method, and java.lang.reflect.Constructor to transact-safe.properties. * Analysis/Counters/CounterFactory.java: Add check-and-bypass so that the counter code works properly even before its class has been statically initialized. (Better solution might be to call the static initializer? But this introduces a dependency between Counters and the InitializerTransform that makes the initializer idempotent.) * Backend/Runtime1/DataReflection2.java, Backend/Runtime1/DataReflectionMemberList.java, Backend/Runtime1/Runtime.java: 1) bugfix to DataReflectionMemberList: the Method and Constructor objects have to be kept together because the method2info data structure assumes that everything is sorted by object address. So rework how we handle buildMemberObjects() slightly so that the order is maintained. 2) dump the modifiers of each class out to the classinfo structure so that this information is available to reflection. *THIS WILL BREAK YOUR BUILD UNLESS YOU UPDATE THE RUNTIME*. Hopefully, this is the last change to the runtime data structures for a while. 3) Add Boolean, Byte, Character, Short, Integer, Long, Float, and Double to the runtime root set, as they can be created by a call to (native) java.lang.reflect.Field.get() and (native) java.lang.reflect.Method.invoke(). Eventually we'll have better conditional-dependency support in QuadClassHierarchy, but for now these are unconditional roots. 2001-02-28 C. Scott Ananian * Backend/Runtime1/init-safe.properties: Added additional init-safe methods needed for new java.lang.reflect.* class implementations. 2001-02-27 salcianu * Util/TypeInference/ArrayInfo.java, Util/TypeInference/CachingArrayInfo.java, Util/TypeInference/ExactTemp.java, Util/TypeInference/TypeInference.java, Util/LightBasicBlocks/CachingLBBConverter.java, Util/LightBasicBlocks/CachingSCCLBBFactory.java, Util/LightBasicBlocks/SCCLBBFactory.java, Main/PAMain.java, Main/SAMain.java, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/ArtificialTempFactory.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/EdgeOrdering.java, Analysis/PointerAnalysis/EdgesNCallees.java, Analysis/PointerAnalysis/InstrumentSyncOps.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/LightPAEdgeSet.java, Analysis/PointerAnalysis/ListCell.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/Matching.java, Analysis/PointerAnalysis/MethodHole.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PAEdge.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PALoad.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PASync.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/PAWorkList.java, Analysis/PointerAnalysis/PAWorkSet.java, Analysis/PointerAnalysis/PAWorkStack.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/ParIntGraphPair.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/Stats.java, Analysis/PointerAnalysis/SyncElimination.java: Various Changes 2001-02-27 C. Scott Ananian * bin/build-precisec: If you set the environment variable KEEP_ARCHIVE bin/build-precisec won't delete the .a file it uses to build the executable. This is useful if you're working on things and don't expect to get a perfect executable the first time. Also added Support/reflect-thunk.jar to the FLEX_SUPPORT_FILES list (again, you'll have to update your Runtime to support this; some new methods become callable) and removed Support/Lex.jar. You can add Lex.jar to the path yourself if you're building it, no reason to slow down everyone else by loading and searching through this archive. * Support/reflect-thunk.jar: Add support/reflect-thunk.jar, which is our independent implementation of java.lang.reflect.Field, java.lang.reflect.Method, and java.lang.reflect.Constructor which plays better with our runtime (avoids space bloat of duplicating method name strings). Slightly modified DataReflectionMemberList to behave nicely with the new object definitions. * Support/reflect-thunk.jar: New file. * Backend/Runtime1/DataReflectionMemberList.java: Add support/reflect-thunk.jar, which is our independent implementation of java.lang.reflect.Field, java.lang.reflect.Method, and java.lang.reflect.Constructor which plays better with our runtime (avoids space bloat of duplicating method name strings). Slightly modified DataReflectionMemberList to behave nicely with the new object definitions. * Backend/Runtime1/DataReflectionMemberList.java, Backend/Runtime1/Runtime.java: More improved reflection support: constructors are now represented by objects of type java.lang.reflect.Constructor (as they ought be) instead of java.lang.reflect.Method (as they were before). Also added java.lang.reflect.Constructor to the root set, and marked java.lang.Class and java.lang.reflect.* as *instantiated* (which means we add their constructors to the root set), since instances of these objects are created statically to support reflection. You'll need to update your runtime again after you fetch this commit, since the (newly-callable) toString() method of java.lang.reflect.Field, etc, use java.lang.reflect.Field.getModifiers() which is newly implemented in the runtime. 2001-02-26 C. Scott Ananian * Backend/Runtime1/DataReflection2.java, Backend/Runtime1/DataReflectionMemberList.java: Add more reflection data to tables we output. THIS WILL BREAK YOUR RUNTIME UNLESS YOU UPDATE IT, TOO! The runtime data structures are changed by this commit; you need to make sure both the Code and the Runtime are using the same data structures. * Main/SAMain.java: Quick two-line hack to enable counters when Transactions support is being compiled in. Once I've worked out the bugs with the Counter code, these two lines will be moved up the code factory chain and out of the Transactions block. * Analysis/Counters/EpilogMutator.java: New file. * Analysis/Counters/CounterFactory.java, Analysis/Counters/EpilogMutator.java, Analysis/Counters/package.html, Runtime/Counters.java: javadoc updates to Runtime/Counters.java, Analysis/Counters/package.html, and Analysis/Counters/CounterFactory.java. Added codeFactory() to CounterFactory (and EpilogMutator class in harpoon.Analysis.Counters which supports it) to add calls to harpoon.Runtime.Counters.report() before any call to Runtime.exit() or any RETURN or THROW in the main method. Fixed a bug in spliceIncrement() that was locking the *counter* instead of the *lock*. Oops. =) * Analysis/Transactions/SyncTransformer.java: Fixed CALL receiver type info loss workaround hack. Renamed addTypeCheck(), as its name was deceptive. 2001-02-25 C. Scott Ananian * Analysis/Transactions/SyncTransformer.java: Setting properties in our static initializer doesn't work reliably, don't do it. (The CounterFactory code factory checks the properties possibly before SyncTransformer is ever referenced/initialized, so the right properties won't be set.) Add an 'addTypeCheck' call to CALL transformation to workaround a type loss problem. Going to fix this better in a sec. 2001-02-25 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PointerAnalysis.java: The MAInfo module has been modified to support multi-level inlining to increase the effectiveness of the stack allocations. In short: suppose a method C allocates some objects (nodes in our abstraction) that escapes only into the caller of C (let's call it B) and from B into its caller (A). Inlining the call chain C, B, A into A will allow for those objects to be stack allocatable. In practice, there are complications due to the fact that different inlining chains might have common subparts and so, the order of inlining becomes VERY important. The current implementation uses the optimal ordering. For the time being, this is part of MAInfo. It will be interesting to implement it as a separate class, thus allowing other parts of the compiler to use it. 2001-02-23 C. Scott Ananian * Runtime/AltArray/.cvsignore: Added .cvsignore file for machine-generated files in Runtime/AltArray. * Runtime/AltArray/.cvsignore: New file. * Analysis/Counters/CounterFactory.java, Runtime/Counters.java: javadoc fixes. * GNUmakefile, Runtime/AltArray/ArrayImplJavaType.jt, Runtime/AltArray/ChunkArrayJavaType.jt, Runtime/AltArray/SimpleArrayJavaType.jt, Runtime/AltArray/package.html: Add preliminary support for alternate array implementations. This includes "generic java type" support, where we can generate 9 different "specialized" versions of a template, one for each primitive java type and Object. The generic file has a filename ending in JavaType.jt (and should be specified in MACHINE_SRC and MACHINE_GEN in GNUmakefile); from this the nine files are generated by substituting a captialized type name for every instance of the string "JavaType" (including in the filename) and the appropriate 'real' type name (lowercased except in the case of Object) for every instance of the string "javaType". How I wish Java had real parameterized types. This is a crude workaround. (Alternatively, Java could have fully first-class primitive types, which wouldn't require such evilness). * Runtime/AltArray/ArrayImplJavaType.jt, Runtime/AltArray/ChunkArrayJavaType.jt, Runtime/AltArray/SimpleArrayJavaType.jt, Runtime/AltArray/package.html: New file. * Analysis/Transactions/SyncTransformer.java: Added lotsa counters to SyncTransformer. We should get all sorts of stats out of a run. All counters are enabled at the moment, you can disable on the command line. It's expected that I'll eventually disable all the counters, allowing you to then *en*able them on the command line if you like. * Analysis/Counters/CounterFactory.java, Analysis/Counters/package.html: Add simple & straightforward counter package to FLEX to make it as easy as possible to instrument your code. Counters are declared on-the-fly, reported automatically, and can be enabled/disabled either individually or in groups via properties from the FLEX command line. * Analysis/Counters/CounterFactory.java, Analysis/Counters/package.html: New file. * Runtime/Counters.java: Add simple & straightforward counter package to FLEX to make it as easy as possible to instrument your code. Counters are declared on-the-fly, reported automatically, and can be enabled/disabled either individually or in groups via properties from the FLEX command line. * Runtime/Counters.java: New file. 2001-02-22 C. Scott Ananian * Analysis/Transactions/SimpleCheckOracle.java, Analysis/Transactions/SyncTransformer.java: Added 'harpoon.synctrans.noarraymods' property to turn off transactions on arrays *only* to try to isolate the time cost of array transactions versus non-array transactions. * ClassFile/HMember.java: Added javadoc for HMember.Comparator. 2001-02-21 C. Scott Ananian * Analysis/Quads/QuadClassHierarchy.java: Unified discoverMethod() and discoverSpecial(), and in the process fixed a bug that was incorrectly treating virtual invocations as non-virtual. Basically, if the first invocation of a method was non-virtual, QuadClassHierarchy was effectively treating *all* invocations of the method as non-virtual, so that methods with the same signature in subclasses were not correctly being marked callable. Surprisingly enough, SPEC showed no ill effects from this bug; the only application which did was JLex (!) where a virtual call to Object.clone() was not setting long[].clone() callable because the first call to Object.clone() was non-virtual. Fixed now. * Analysis/Quads/QuadClassHierarchy.java: More refactoring: use a QuadVisitor in the inner loop of the QuadClassHierarchy instead of all the ugly 'instanceof's. * Analysis/Quads/QuadClassHierarchy.java: Refactored QuadClassHierarchy code to put state variables used during execution of the algorithm into a separate State object: this avoids the necessity of passing them individually from function to function. 2001-02-21 salcianu * Analysis/Quads/QuadClassHierarchy.java: Applying bdemsky's hack to mask an error in the QuadClassHierarchy that was causing JLex to crash. Should be fixed in a real way. * bin/build-precisec, Analysis/PointerAnalysis/PointerAnalysis.java: Small comment adde 2001-02-16 kkz * Backend/Analysis/MakeGCThreadSafe.java: Added GC polling to back edges as well. Includes bonus hack: for some reason, we seem to have a bunch of unreachable code in tree form at this stage. When the polling calls are added to backedges that are actually unreachable, we have a problem later when TreeToC tries to run liveness on calls, because the basicblock generator ignores unreachable code. The hack is that the prepass finds the reachable nodes, and does not add the polling call to backedges that are unreachable. It would be nice to know where these unreachable nodes are coming from. 2001-02-15 salcianu * Util/LightBasicBlocks/LightBasicBlock.java, Util/LightBasicBlocks/SCCLBBFactory.java, Main/ODPAMain.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/ODMAInfo.java, Analysis/PointerAnalysis/ODPointerAnalysis.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/Stats.java, Analysis/MetaMethods/MetaCallGraphImpl.java: The number of load nodes created during the analysis has been reduced. 2001-02-14 salcianu * Util/TypeInference/CachingArrayInfo.java, Util/TypeInference/TypeInference.java, Analysis/PointerAnalysis/PointerAnalysis.java: Small changes. 2001-02-13 kkz * Backend/Analysis/MakeGCThreadSafe.java: Added pass to make GC thread-safe for the precise C backend. More modifications forthcoming, including adding polling calls to back edges. This is just to check in the code I'm sure of so that I have the benefit of version control while making the rest work. * Backend/Analysis/MakeGCThreadSafe.java: New file. * Main/SAMain.java, IR/Tree/DerivationGenerator.java, Backend/PreciseC/Frame.java: Added pass to make GC thread-safe for the precise C backend. More modifications forthcoming, including adding polling calls to back edges. This is just to check in the code I'm sure of so that I have the benefit of version control while making the rest work. 2001-02-09 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/MetaMethods/MetaCallGraphAbstr.java, Analysis/MetaMethods/MetaCallGraphImpl.java: 1. The MetaCallGraph code was improved and cleaned. 2. The bugs introduced in 1 were removed. :-) 3. A new flag (RECORD_ACTIONS) controls whether we record the actions done by the analyzed program or not (default is false). This info seems to be very expensive to collect and not that useful in practice. 4. PAMain: A new flag (check_nc) lists all the call sites with 0 callees. This happens in general for the calls on SecurityManager objects as we don't instantiate any of them (e.g SecurityManager.checkWrite etc). It doesn't necessarily correpond to error in our (meta)call graph construction, but to unreachable portions of code. It also prints some statistics on the number of virtual/non-virtual call sites. After initial tests, it seems that the overwhelming majority of the call sites can be devirtualized (I have no idea on how much does this affect the dynamic behavior of the program). 5. Various small changes/improvements. 2001-01-31 C. Scott Ananian * Analysis/Transactions/SyncTransformer.java: Removed an unnecessary argument to java.lang.Object.writeFieldFlag(). Added an assertion to catch the problem in _213_javac where a MONITOREXIT is apparently not dominated by the monitorenter. 2001-01-31 wbeebee * Support/realtime.jar, Backend/PreciseC/Frame.java, Backend/Runtime1/Data.java, Backend/Runtime1/Runtime.java: RTJ now handles tagging constants with ImmortalMemory with ImmortalMemory.constant = true correctly. This is the version that the benchmarks will be run on. * Analysis/Realtime/NoHeapCheckRemoval.java, Analysis/Realtime/RealtimeRuntime.java: New file. * Analysis/Realtime/AllCheckRemoval.java, Analysis/Realtime/CheckAdder.java, Analysis/Realtime/NoHeapCheckRemoval.java, Analysis/Realtime/Realtime.java, Analysis/Realtime/RealtimeRuntime.java, Analysis/Realtime/SimpleCheckRemoval.java: RTJ now handles tagging constants with ImmortalMemory with ImmortalMemory.constant = true correctly. This is the version that the benchmarks will be run on. 2001-01-30 C. Scott Ananian * Backend/Runtime1/init-safe.properties: Added java.io.File.exists0() to set of init-safe methods (for SPEC _999_check). 2001-01-26 salcianu * Analysis/Realtime/CheesyPACheckRemoval.java, Analysis/MetaMethods/MetaCallGraphImpl.java: MetaCallGraph should now recognize run methods (thread bodies) that are started by calling the start() method on a Thread object that points to a Runnable objects (before, we were deling only with run methods defined in the objects that extend Thread; this was enough for our PA benchmarks). Wes should be able now to remove 100% of the checks in SumIntegers.java. 2001-01-26 C. Scott Ananian * Analysis/Transactions/AnalysisCheckOracle.java, Analysis/Transactions/HoistingCheckOracle.java, Analysis/Transactions/SyncTransformer.java: Implemented check stealing. * Analysis/Transactions/AnalysisCheckOracle.java, Analysis/Transactions/HoistingCheckOracle.java: Refactor HoistingCheckOracle with the aid of a removeAll() method in CheckSet. * Analysis/Transactions/AnalysisCheckOracle.java, Analysis/Transactions/DominatingCheckOracle.java, Analysis/Transactions/HoistingCheckOracle.java: Refactor AnalysisCheckOracle to have *one* Map of CheckSets, instead of multiple multimaps. This should make the 'check-stealing' optimization I'm about to implement simpler. 2001-01-26 wbeebee * Support/realtime.jar, Main/SAMain.java, Analysis/Realtime/AllCheckRemoval.java, Analysis/Realtime/CheckAdder.java, Analysis/Realtime/Realtime.java, Analysis/Realtime/Stats.java: Fixed CheckAdder - it was adding checks when it should have removed them and vice/versa. Fixed Stats - it was reporting just the opposite, causing the masking of the above bug. Changed SAMain to include the ALL option, which causes AllCheckRemoval to be used (which removes ALL checks). realtime.jar - New Realtime library files * Analysis/Realtime/AllCheckRemoval.java: New file. 2001-01-25 C. Scott Ananian * Analysis/Quads/SCC/SCCAnalysis.java: Another over-optimization in SCCAnalysis: the variable tested by a CJMP is known to be 0 on the false outgoing edge, but it is *not* known to be 1 on the true edge: it is simply known to be non-zero. This bug caused us to miscompile java.util.Stack.peek() to always return the 0th element (instead of element # length-1). Tricky, tricky. (Briefly, the result of Stack.size() was sent to the CJMP so that an EmptyStackException could be thrown on the false branch; but that caused SCCAnalysis to conclude that size==1 on the true branch. The subsequent fetch of element size-1 evaluated to a fetch of constant element zero.) Fixed now. Luckily, our previous instanceof and boolean-oper enhancements mean that the 'test==1 on true edge' property of genuine boolean results is still properly inferred. * Analysis/Transactions/SyncTransformer.java: Optimization to the 'safeMethods' redirection described in the previous commit: reinstate the direct call to the safe method iff the CALL is non-virtual. * Analysis/Transactions/SyncTransformer.java: Our "safeMethods" map was doing the wrong thing for virtual methods: it was potentially treating all calls to a method as safe, even if only one of the implementation was. The most obvious example here was java.lang.Object.hashCode(), which was safe -- but virtually every overriding implementation of hashCode() is *not* safe. Moved to an implementation similar to that used for InitializerTransform: we now construct redirection methods for 'safe' methods, instead of skipping the CALL transform like we did previously. * Analysis/Transformation/MethodSplitter.java: Workaround method splitter bug: when we split constructors we run into trouble because we can't pick a new name for them: constructors are always named "". So we have been creating an "ordinary" method to serve as the split constructor. However, this ordinary method gets virtualized like any other method -- constructors are non-virtual -- which eventually leads to trouble in the back end when we try to number methods. See, a parent can have a public $$split method, and it's child can have a *private* method with the same name and descriptor. Since they were split from constructors this isn't a problem, however it *is* a problem in ordinary java code: a subclass can't override a method of a superclass with a private method, because private methods are non-virtual. All sorts of troubles ensue. Workaround at the moment is to make the split constructor always private --- note this only works we don't do any sort of real access checking --- but this ensures that the split constructors are properly non-virtual. A "real" solution is to figure out how to create unique constructors without renaming them (one can imagine using specially constructed signatures), or to allow constructors which aren't named "". Not sure which of these is the better solution, so punting for the moment and hacking in the workaround. * Backend/Runtime1/transact-safe.properties: Added more 'safe' native methods to transact-safe.properties. These are needed to build _205_raytrace in the SPEC suite. 2001-01-24 C. Scott Ananian * Analysis/Quads/SCC/SCCAnalysis.java: Fix a bug involving optimization of ACMPEQ comparisons between String constants. Basically, intern the strings so that the comparison works out the same in our evaluation as it does in the real program. * Analysis/Quads/SCC/SCCAnalysis.java: Bug fix: we were optimizing overaggressively again, due to a bug in the SCC lattice ordering. * bin/build-spec-arm-hack, bin/build-spec-arm-pnk, bin/build-spec-precisec: Add $SPECSUFFIX to directory name to make it easier to build multiple versions of the SPEC suite (using different compile options, etc). * Runtime/ArrayCopy.java: Tricky, tricky: the specification for System.arraycopy says it should still behave "correctly" even if the source and destination overlap. Fix our implementation. * Analysis/Quads/SCC/SCCAnalysis.java: SCCAnalysis now does intelligent things with bitwidths when looking at integer/long comparison operations. This allows us to remove two checks from the inner loop of our java System.arraycopy() implementation. * bin/build-precisec: Undeprecated FLEXPATH because not everything we want to include comes packaged in a jar or zip. (Specifially, FLEXPATH is needed to build SPEC.) Made build-precisec less noisy if you've set HARPOON_DIR. * Analysis/Quads/SCC/SCCAnalysis.java: Improved SCC analysis: we now propagate lattice values of the form "the result of an INSTANCEOF" and "the result of a boolean OPER" through the algorithm, which allows us to refine types at SIGMAs *much* more aggressively. In particular, we should optimize out more typechecks in the common idiom: if (x instanceof Foo) { Foo f = (Foo) x; } Before, the checks were being left in because the low-level arcana of quad translation was inserting a PHI in just the wrong place, and SCC analysis couldn't see past the PHI. Now we can always see past PHIs and SIGMAs to do the optimization. Yay, team. Also added an 'isPossiblyNull()' accessor method to SCCAnalysis which allows better interrogation of the results. This is mostly for debugging, but who knows, maybe it will be generally useful. * Analysis/Quads/SCC/SCCAnalysis.java: bug fix in SCC analysis: it's almost impossible to ever know for sure that a COMPONENTOF test will succeed because it depends on *runtime* types, and arrays make a big old hole in the java type system. COMPONENTOF optimization was being, let's say, "overly optimistic" about the checks it could optimize out. * IR/Quads/Code.java, IR/Quads/Print.java, IR/Tree/Code.java, IR/Tree/Data.java, IR/Tree/Print.java, Backend/StrongARM/RegFileInfo.java, ClassFile/HCode.java, ClassFile/HData.java, IR/Assem/Code.java, Backend/MIPS/RegFileInfo.java, Backend/Sparc/RegFileInfo.java: Extend HCode printing architecture to take an optional callback, which can be used to print more information about each HCodeElement as it is pretty-printed. The harpoon.IR.Tree.Print class only uses the 'printAfter' callback at this time; calling 'printBefore' properly would require a more extensive refactoring of the class. All the other HCode subclasses Do The Right Thing with the callback now. 2001-01-24 salcianu * bin/build-precisec: Modifications of the build-precisec script: 1. It can be now executed from any place (not only ~/Harpoon/Code) under the condition that you properly set HARPOON_DIR in your shell (it's /home/salcianu/Harpoon on my machine). If you run it only from ~/Harpoon/Code, you don't need to do anything. 2. The script checks that the standard .jar/.zip support files exist and complains if not. 3. You can add additional support files by setting OPT_FLEX_SUPPORT_FILES in your shell (e.g. export OPT_FLEX_SUPPORT_FILES="foo.jar bar.zip" note the space separator) I suggest you to use this feature instead of the existing FLEXPATH because files introduced through OPT_FLEX ... are checked for existence. 2001-01-24 C. Scott Ananian * Main/SAMain.java: Restoring Transactions support changes that Wes stomped all over in his last commit. Pay closer attention to conflict messages next time, please. 2001-01-24 wbeebee * Main/SAMain.java, Analysis/Realtime/Realtime.java, Analysis/Realtime/Stats.java: Command line options for PA analysis - now compiles test cases w/SIMPLE, w/CHEESY. 2001-01-23 salcianu * Support/realtime.jar: The last commit today. 2001-01-23 wbeebee * Analysis/Realtime/CheckAdder.java: Stupid bug. 2001-01-23 salcianu * Support/realtime.jar, Analysis/Realtime/CheesyPACheckRemoval.java, Analysis/Realtime/Realtime.java: Small modifications. 2001-01-23 C. Scott Ananian * Analysis/Tree/AlgebraicSimplification.java: Bug fixes to CHOOSE_MULTIPLIER. div2mul now works, and has been turned on. 2001-01-23 wbeebee * Analysis/Realtime/Realtime.java: Wired in updates to mesh with Alex's stuff.... 2001-01-23 salcianu * Analysis/Realtime/CheesyPACheckRemoval.java, Analysis/Realtime/PACheckRemoval.java, Main/PAMain.java: 1. Various (insignificant) changes in teh PA stuff 2. A new class for Wes: CheesyPACheckRemoval! What are laughing at? This is just the first step on a glorious path! * Analysis/Realtime/CheesyPACheckRemoval.java: New file. 2001-01-23 C. Scott Ananian * Analysis/Transactions/ArrayCopyImplementer.java: Removed 'import *' statements. 2001-01-23 salcianu * Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java: 1. Various (insignificant) changes in teh PA stuff 2. A new class for Wes: CheesyPACheckRemoval! What are laughing at? This is just the first step on a glorious path! 2001-01-23 C. Scott Ananian * Main/SAMain.java: Add more passes necessary for Transactions transformation (-T). * Analysis/Tree/AlgebraicSimplification.java: Fixed a bug in the divide-by-power-of-two optimization (duncan was doing a left shift -- i.e. *multiply by two* -- instead of a right shift). Also implemented the optimized CHOOSE_MULTIPLIER routine from the source paper, and the optimized code gen for output. (Probably fixed some overflow bugs in the original code by reimplementing CHOOSE_MULTIPLIER carefully). div2mul conversion is still turned off because there are still bugs left in it, according to my tests. * Analysis/Transactions/SimpleCheckOracle.java: SimpleCheckOracle now attempts to do more closely the right thing with ARRAYINITs than before. * Analysis/Transactions/SyncTransformer.java: SyncTransformer now knows that it doesn't know what to do with ARRAYINIT statements (fails if it finds one, so remove them first with the ArrayInitRemover). Also, enabling/disabling certain features (and in fact the entire transformation) is now possible via system properties from the command-line. This should make building multiple versions for benchmarking significantly easier. * Analysis/Transactions/ArrayCopyImplementer.java: Added code to provide pure java implementation of System.arraycopy(). With SCC optimization turned on, performance is close to that of the native arraycopy; with some sort of loop optimization it should be identical. The big benefit to a pure-java implementation, of course, is that the method is now subject to regular analysis and transformation. Also, arraycopy() could be inlined, which when subject to the standard optimizations, would result in the removal of even more checks. This was done to allow arraycopy() to work correctly with the transactions transformation. * Analysis/Transactions/ArrayCopyImplementer.java: New file. * Runtime/ArrayCopy.java: Added code to provide pure java implementation of System.arraycopy(). With SCC optimization turned on, performance is close to that of the native arraycopy; with some sort of loop optimization it should be identical. The big benefit to a pure-java implementation, of course, is that the method is now subject to regular analysis and transformation. Also, arraycopy() could be inlined, which when subject to the standard optimizations, would result in the removal of even more checks. This was done to allow arraycopy() to work correctly with the transactions transformation. * Runtime/ArrayCopy.java: New file. 2001-01-23 wbeebee * Support/realtime.jar, Analysis/Realtime/CheckAdder.java, Analysis/Realtime/PointerAnalysis.java, Analysis/Realtime/Realtime.java, Analysis/Realtime/ThreadToRealtimeThread.java: Changed realtime. to javax.realtime. to be more compliant with the RTJ spec. * Analysis/Realtime/CheckAdder.java, Analysis/Realtime/ThreadToRealtimeThread.java, Util/Timer.java: New file. * Analysis/Realtime/CheckAdder.java, Analysis/Realtime/CheckRemoval.java, Analysis/Realtime/PACheckRemoval.java, Analysis/Realtime/Realtime.java, Analysis/Realtime/Stats.java, Analysis/Realtime/ThreadToRealtimeThread.java, Main/SAMain.java, Util/Timer.java: Split Realtime (which was getting too big) into ThreadToRealtimeThread, CheckAdder, and Realtime. QuadCounter and Timer are two utility classes that you might find useful. QuadCounter is an HCodeFactory that simply counts the number of Quads that are converted. Timer is a class which can time blocks of code in the compiler. Use timer.start() and timer.stop() around blocks of code and timer.timeElapsed() to get the cumulative amount of time elapsed between starts and stops thus far. For example: Timer timer = new Timer(); for (int i=0; i<10; i++) { bar(); timer.start(); foo(i); timer.stop(); baz(); } timer.timeElapsed() returns the total amount of time spent in foo() (not bar() or baz()). * Analysis/Quads/QuadCounter.java: New file. * Analysis/Quads/QuadCounter.java: Split Realtime (which was getting too big) into ThreadToRealtimeThread, CheckAdder, and Realtime. QuadCounter and Timer are two utility classes that you might find useful. QuadCounter is an HCodeFactory that simply counts the number of Quads that are converted. Timer is a class which can time blocks of code in the compiler. Use timer.start() and timer.stop() around blocks of code and timer.timeElapsed() to get the cumulative amount of time elapsed between starts and stops thus far. For example: Timer timer = new Timer(); for (int i=0; i<10; i++) { bar(); timer.start(); foo(i); timer.stop(); baz(); } timer.timeElapsed() returns the total amount of time spent in foo() (not bar() or baz()). 2001-01-23 C. Scott Ananian * bin/source-markup.perl: Remove semicolon from valid URL pattern. Since < is rewritten to < this will prevent < from being treated as part of a URL. 2001-01-22 C. Scott Ananian * Analysis/Tree/AlgebraicSimplification.java: Turn off divToMul, as it is currently broken. Fixed bug when dividing by a negative constant: double negation was taking place, including something which the source paper explicitly cautioned *against*: negating n before the division [which breaks when n=-2^(N-1) ]. 2001-01-22 salcianu * Analysis/Realtime/KeepChecks.java, Analysis/Realtime/PACheckRemoval.java, Analysis/Realtime/Realtime.java, Analysis/Realtime/SimpleCheckRemoval.java: Two implementation of Wes's CheckRemoval interface. More to come ... * Analysis/Realtime/PACheckRemoval.java, Analysis/Realtime/SimpleCheckRemoval.java: New file. * Analysis/PointerAnalysis/ParIntGraph.java, Analysis/MetaMethods/FakeMetaCallGraph.java, Analysis/MetaMethods/MetaMethod.java: Two implementation of Wes's CheckRemoval interface. More to come ... 2001-01-22 wbeebee * Analysis/Realtime/CheckRemoval.java, Analysis/Realtime/KeepChecks.java: New file. * Analysis/Realtime/CheckRemoval.java, Analysis/Realtime/KeepChecks.java: Whoops - forgot to commit these two files. * Main/SAMain.java, Analysis/Realtime/Realtime.java, Analysis/Realtime/Stats.java: Split Realtime into pre-analysis and post-analysis parts. Realtime.java is about to be split into 3 classes. 2001-01-22 C. Scott Ananian * Analysis/Quads/ArrayInitRemover.java: Added ArrayInitRemover pass to rewrite ARRAYINITs as sequences of ASETs. This blows up our code size, but makes implementing certain transformations (in this particular case, the SyncTransformer for transactions) simpler. * Analysis/Quads/ArrayInitRemover.java: New file. 2001-01-21 pnkfelix * Analysis/DataFlow/LiveVars.java: FSK: Ooopsie. Checking in version of LiveVars that doesn't have FSK: DEBUG flag turned on. (Thanks for the heads up Scott) 2001-01-21 C. Scott Ananian * Backend/Runtime1/ObjectBuilder.java: Fixed a buglet in ObjectBuilder that may have output synthetic fields of java.lang.Object for array object in the wrong order, if there were more than one and a different FieldOrder object was used, other than the current one. Also, the previous code may have had a problem with static fields of java.lang.Object. Fixed. * Backend/Runtime1/ObjectBuilder.java: Provide the ability to extend ObjectBuilder with a RootOracle in order to provide values for new fields introduced by transformations. The default RootOracle provides null values for any fields of java.lang.Object. * Backend/Runtime1/ObjectBuilder.java: Reverting wbeebee's last change; next commit will replace it with something cleaner and non-realtime-java-specific. @REVERT: ObjectBuilder 1.1.4.7@ * Backend/Runtime1/DataStrings.java: Reverting wbeebee's last change; next commit will replace it with something cleaner and non-realtime-java-specific. @REVERT: DataStrings 1.1.4.2@ * Backend/Runtime1/DataReflection1.java: Reverting wbeebee's last change; next commit will replace it with something cleaner and non-realtime-java-specific. @REVERT: DataReflection1 1.1.2.6@ 2001-01-20 wbeebee * Support/realtime.jar, Backend/Runtime1/DataReflection1.java, Backend/Runtime1/DataStrings.java, Backend/Runtime1/ObjectBuilder.java, Main/SAMain.java, Analysis/Realtime/Config.java, Analysis/Realtime/PointerAnalysis.java, Analysis/Realtime/Realtime.java, Analysis/Realtime/Stats.java: Code to support RTJ extensions. The Backend/Runtime1/ modifications were to allow arrays to have a special memoryArea field, which will be emitted as a NULL in constant arrays (and further processed at runtime by the RTJ library...) * Analysis/Realtime/Config.java, Analysis/Realtime/PointerAnalysis.java, Analysis/Realtime/Stats.java: New file. 2001-01-20 C. Scott Ananian * Backend/Runtime1/TreeBuilder.java: Add support in java.lang.Runtime for fields in java.lang.Object. The current code assumes Object has no fields, which causes array access/creation/length code to break (length field in the wrong place) when fields are added to Object (which is the superclass of all arrays). 2001-01-20 pnkfelix * Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/LiveVars.java: FSK: 1. Added dumping code to LiveTemps (am debugging a problem of my FSK: own) FSK: 2. Added UseDefer-less constructor to LiveVars for Rob to use. 2001-01-19 C. Scott Ananian * Backend/Runtime1/init-safe.properties: All array clone operations are initializer-safe. 2001-01-18 C. Scott Ananian * Analysis/Quads/QuadClassHierarchy.java, Analysis/ClassHierarchy.java: Fixed ClassHierarchy.parent() to give the proper java.lang.Object superclass to primitive arrays. This allows us to remove a gross hack from QuadClassHierarchy that made all array.clone() methods callable (a terrible workaround). * Analysis/Transactions/CloneImplementer.java: Fixed clone() implementation behavior for objects which do not implement java.lang.Cloneable interface (throw CloneNotSupportedException). Fix bug in ObjectClone where we returned NULL rather than the cloned object. (Oops!) * Analysis/Transactions/CloneImplementer.java: Bug fixes: some bogus addEdge numbers, don't add $clone$ methods to primitives or interfaces, don't copy static fields during $clone$. * Main/SAMain.java: Aggressively add CachingCodeFactories to SAMain to improve performance. * ClassFile/HClassArraySyn.java: Allow modification of .clone() method -- this is needed for a transformation that makes this method non-native. * bin/build-arm-hack, bin/build-arm-pnk, bin/build-precisec: Improvements to build scripts: - preliminary support for allowing directory name to include path components. Copied/enhanced from existing build-arm-* scripts, but not sure it's sufficient. - the name of the 'java' binary now comes from an environment variable JAVA, so that JAVA=jdb bin/build- allows you to debug the build. - the maximum heap memory has been increased to 768m, and comes from the environment variable FLEXMEM, so you can redefine it. - The arm build scripts deal with java versions < 1.2 better now. * Analysis/Transactions/CloneImplementer.java: Added transformation which provides object-specialized versions of the clone() method, instead of relying on a "magical" native implementation. This helps some analyses make better sense of clone() and, importantly, greatly simplifies (actually, eliminates the necessity for) the implementation of clone$$withtrans(). * Analysis/Transactions/CloneImplementer.java: New file. 2001-01-16 C. Scott Ananian * Analysis/Quads/SCC/SCCAnalysis.java: Fix bug in SCCAnalysis where it wasn't properly marking a 'catch remaining' edge of a TYPESWITCH executable. * Analysis/Transactions/SyncTransformer.java: Turn on DominatingCheckOracle. * Analysis/Transactions/DominatingCheckOracle.java: Added implementation of downward-propagating check optimization: removes checks which have already been performed in a dominating node. * Analysis/Transactions/DominatingCheckOracle.java: New file. * Analysis/Transactions/AnalysisCheckOracle.java, Analysis/Transactions/CheckOracle.java: Added toString() methods to CheckOracle.RefAndField, CheckOracle.RefAndIndexAndType, and AnalysisCheckOracle.CheckSet to aid debugging. Removed 'import *' statements from AnalysisCheckOracle. Added clear() method to AnalysisCheckOracle.CheckSet. * Analysis/Transactions/AnalysisCheckOracle.java: New file. * Analysis/Transactions/AnalysisCheckOracle.java, Analysis/Transactions/HoistingCheckOracle.java: Refactored HoistingCheckOracle code to support other check oracle optimizations without code duplication. New class AnalysisCheckOracle handles the common stuff. @SPLIT: Transactions/HoistingCheckOracle Transactions/AnalysisCheckOracle@ 2001-01-15 C. Scott Ananian * Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreePostPass.java: Change FLAG_VALUE to CACA....CA to better support field-ignorant object cloning. (We'd like to byte-fill the cloned object with FLAG_VALUE, but previously we couldn't do this correctly without knowing the individual field types of the object because 4 byte fields in 4 bytes would have different flag values than 1 int field in the same 4 bytes.) * Backend/Runtime1/init-safe.properties, Backend/Runtime1/transact-safe.properties: Tweaks to init-safe and transact-safe properties: Class.forName() is *not* initializer-safe -- we just added an initializer-safe version to the runtime; java.lang.reflect.Field.getModifiers() is initializer-safe; two methods in java.net.InetAddressImpl are transaction-safe. * Main/SAMain.java: Make sure initial ClassHierarchy is built from a CachingCodeFactory (I was seeing duplicate WARNINGs generated by the classfile->bytecode translation, which let me to believe caching wasn't being done here.) 2001-01-14 C. Scott Ananian * Analysis/Transactions/HoistingCheckOracle.java, Analysis/Transactions/SyncTransformer.java: Debugged and turned on HoistingCheckOracle. * Main/SAMain.java, Analysis/Transactions/GlobalFieldOracle.java, Analysis/Transactions/SyncTransformer.java: Hookup HoistingCheckOracle and GlobalFieldOracle and debug and turn on GlobalFieldOracle. * Analysis/Transactions/SyncTransformer.java: Work around casting bug with multi-dimensional array dereferences. * Analysis/Transactions/CheckOracle.java, Analysis/Transactions/GlobalFieldOracle.java, Analysis/Transactions/HoistingCheckOracle.java: Completed implementation of intelligent FieldOracle and CheckOracle. The HoistingCheckOracle attempts to hoist and coalesce checks as far up the dominator tree as possible (the CheckOracle abstract class was patched to make CheckOracle.RefAndField and CheckOracle.RefAndIndexAndType collections-friendly as part of this). The GlobalFieldOracle does a whole-program analysis to determine which are the fields that can possibly be accessed in synchronized and unsynchronized contexts. More relevantly, you can also determine from this which fields *can't* be accessed in those contexts. This allows us to skip some checks occasionally in the generated transactional code. * Analysis/Transactions/GlobalFieldOracle.java, Analysis/Transactions/HoistingCheckOracle.java: New file. 2001-01-13 C. Scott Ananian * Backend/Runtime1/init-safe.properties, Backend/Runtime1/transact-safe.properties: More entries for init-safe.properties and transact-safe.properties. * IR/Quads/Quad.java, IR/Tree/ToTree.java: Renamed harpoon.IR.Properties.UseDef to harpoon.IR.Properties.UseDefable to conform with useage everywhere else in FLEX. @RENAME: IR/Properties/UseDef.java IR/Properties/UseDefable.java@ * IR/Properties/UseDefable.java: New file. * IR/Assem/Instr.java, IR/Properties/UseDef.java, IR/Properties/UseDefable.java, IR/Properties/UseDefer.java, Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/IgnoreSpillUseDefer.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/Web.java, Analysis/Maps/UseDefMap.java, Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/LiveVars.java, Analysis/DataFlow/ReachingDefs.java, Analysis/DataFlow/ReachingHCodeElements.java, Analysis/ReachingDefsAltImpl.java, Analysis/ReachingDefsImpl.java, Analysis/UseDef.java, Analysis/UseDefChecker.java, Analysis/Place.java: Renamed harpoon.IR.Properties.UseDef to harpoon.IR.Properties.UseDefable to conform with useage everywhere else in FLEX. @RENAME: IR/Properties/UseDef.java IR/Properties/UseDefable.java@ * IR/Properties/UseDefer.java, Analysis/UseDefChecker.java: Added javadoc. * Analysis/Quads/MethodInliningCodeFactory.java, IR/Tree/ToTree.java, Analysis/DefMap.java, Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/TempToHceArrayMap.java, Analysis/UseMap.java: Remove obsolete infrastructure. * bin/build-spec-arm-hack, bin/build-spec-arm-pnk, bin/build-spec-precisec: Add ability to specify additional SAMain arguments when building SPEC. 2001-01-11 C. Scott Ananian * Analysis/Quads/InitializerTransform.java: Add option to remove synchronization from static initializer methods. This speeds up initialization (which should take place in a single-threaded context) and also has the nice side-effect of improving our transaction support (by eliminating transactions during initialization). * Analysis/Transactions/SyncTransformer.java: Javadoc update. * bin/build-spec-arm-hack, bin/build-spec-arm-pnk, bin/build-spec-precisec: More flexible specification of which SPEC benchmarks to build. Added build-spec-arm-pnk script. * bin/build-spec-arm-pnk: New file. * Main/SAMain.java: Added '-T' option to SAMain to turn on Transactions transformation. * Analysis/Transactions/SimpleFieldOracle.java, Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/TreePostPass.java: Add Tree-form post-pass to optimize field check for Object type fields. * Analysis/Transactions/TreePostPass.java: New file. * IR/Tree/CanonicalTreeCode.java, IR/Tree/TreeCode.java: Added better javadoc for the 'codename' strings. * Analysis/Transactions/CheckOracle.java, Analysis/Transactions/FieldOracle.java, Analysis/Transactions/SimpleCheckOracle.java, Analysis/Transactions/SimpleFieldOracle.java, Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/package.html: Moved Transactions stuff from Analysis.LowQuad to Analysis, since it doesn't work on LowQuad form anymore: it works on QuadSSA and Tree forms. @RENAME: Analysis/LowQuad/Transactions Analysis/Transactions@ * Analysis/Transactions/CheckOracle.java, Analysis/Transactions/FieldOracle.java, Analysis/Transactions/SimpleCheckOracle.java, Analysis/Transactions/SimpleFieldOracle.java, Analysis/Transactions/SyncTransformer.java, Analysis/Transactions/package.html: New file. * Analysis/SSITOSSAMap.java, Backend/Runtime1/BDWAllocationStrategy.java, Backend/Runtime1/NiftyAllocationStrategy.java, Backend/Runtime1/SPAllocationStrategy.java, Interpret/Tree/DefaultFrame.java, Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/BasicInductions.java, Analysis/Quads/QuadLiveness.java, Analysis/Tree/ConstantPropagation.java, Analysis/EventDriven/ToAsync.java: Removed unnecessary import...CALL; statements from a bunch of files, to allow an easier grep to find out which files really depend on the various CALL classes. * Interpret/Quads/Method.java, Interpret/Quads/QuadStackFrame.java, IR/Tree/CALL.java, IR/Quads/CALL.java, IR/Quads/Prune.java, IR/Quads/UnHandler.java, IR/LowQuad/PCALL.java: As promised almost a month ago (2000/12/13) changed all CALLs to "define both" semantics, which fixes subtle bugs with liveness and reachability analysis through CALL quads. Reverted now-unnecessary quad pruning work-around, added fixes to UnHandler to prevent creation of code which breaks with "define both". Also updated the quad interpreter to eagerly catch violations of "define both". 2001-01-10 pnkfelix * Util/Collections/AggregateSetFactory.java: FSK: fixed a buglet in AggregateSetFactory. FSK: [ after referencing spec of java.util.Iterator.remove() to find FSK: when IllegalStateException is thrown ] 2001-01-09 pnkfelix * Main/SAMain.java: FSK: what an embarressing mistake; needed to add parens to call FSK: methods. (must-compile-before-checkin!) * Main/SAMain.java: FSK: Added code so that multiple -R arguments on command line FSK: are handled better. * bin/build-arm-hack: FSK: Changed expression determining target directory to allow FSK: for directories other than the current one to be targetted. 2001-01-05 pnkfelix * bin/build-arm-pnk: FSK: Changed definition of variable to handle alternate compilation FSK: context configurations a bit more cleanly, w/ assistance of Scott * Util/Collections/AggregateSetFactory.java: FSK: Some versions of javac (at least on the pdos machines) do weird FSK: orderings of the initialization statements that make the call to FSK: addAll(c) fail. Changed it to make the ordering of the FSK: statements explicit. * Analysis/Instr/GraphColoringRegAlloc.java, Analysis/ReachingDefsAltImpl.java: FSK: Added some monitoring code and some minor performance updates FSK: mainly commiting to get pdos machine source in sync with ctf. 2000-12-17 C. Scott Ananian * Backend/Runtime1/DataClaz.java: It appears I was wrong in the commit comment I made earlier today: there *is* a bug in the Runtime's implementation of interface array 'instanceof' --- namely an off by one error that caused Set[][] instanceof Object[] = true Set[][] instanceof Object = true but Set[][] instanceof Object[][] = false. Oops. This is fixed now. * Backend/Runtime1/DataClaz.java, ClassFile/HClass.java: Add inherited methods of java.lang.Object to results of getMethods() on an interface class. Had to touch up Backend/Runtime1/DataClaz because it at one point assumed that all the methods returned by getMethods() on an interface would be interface methods -- the methods of java.lang.Object are regular class methods. * Analysis/ClassHierarchy.java: Fix bug in Analysis/ClassHierarchy (thanks, Brian!) where the inheritance hierarchy of 'arrays of interfaces' was computed incorrectly. The proper inheritance should be: Set[][]->Collection[][]->Object[][]->Object[]->Object. (Instead it was giving Set[][]->Collection[][]->Collection[]...). Array/Interface inheritance is a particularly tricky issue, gah. Trust the ClassHierarchy instead of trying to do it yourself. Sigh. Surprisingly, we got this right in the Runtime implementation, though: it looks like Set[][] instanceof Collection[][] is properly true and Collection[][] instanceof Collection[] is properly false, as required. * IR/Bytecode/OpConstant.java, ClassFile/HClass.java: Fix linker-unsafe getWrapper() method which, however, was only used in IR/Bytecode/OpConstant, where it's use was actually safe. But I changed the interface anyway to ensure that no-one else accidentally shoots themself in the foot. * Analysis/Quads/QuadInterferenceGraph.java: QuadInterferenceGraph now implements a more general InterferenceGraph interface. * Analysis/InterferenceGraph.java: New file. * Analysis/InterferenceGraph.java: QuadInterferenceGraph now implements a more general InterferenceGraph interface. 2000-12-13 C. Scott Ananian * IR/Tree/CALL.java, IR/Quads/CALL.java, IR/Quads/Prune.java, IR/LowQuad/PCALL.java: Fix over-eager quad pruning problem (leading to use-before-def'ed temps) by regularizing all CALLs to adhere to the 'one temp defined, one temp *unaffected*' semantics. I don't actually think these semantics are preferable; when I get back today I'm going to change everything to the 'both temps always defined' semantics instead. But this change fixes the bug and provides a solid place to revert to if the (more far-ranging?) later changes aren't stable. 2000-12-12 vivien * Analysis/PointerAnalysis/InstrumentAllocs.java: Type error... FV for CSA 2000-12-11 vivien * Analysis/PointerAnalysis/PointsToGraph.java: Added methods necessary to on demand pointer analysis... FV * Analysis/PointerAnalysis/PAEscapeFunc.java: Ome method added for on demand analysis. * Analysis/PointerAnalysis/ActionRepository.java: Two methods added for on demand analysis. * Analysis/PointerAnalysis/AllocationNumbering.java: Two fields changed from private to public. I should have written methods returning these fields instead... FV * Analysis/PointerAnalysis/EdgesNCallees.java, Analysis/PointerAnalysis/MethodHole.java, Analysis/PointerAnalysis/ODInformation.java, Analysis/PointerAnalysis/ODInterProcPA.java, Analysis/PointerAnalysis/ODMAInfo.java, Analysis/PointerAnalysis/ODNodeStatus.java, Analysis/PointerAnalysis/ODParIntGraph.java, Analysis/PointerAnalysis/ODParIntGraphPair.java, Analysis/PointerAnalysis/ODPointerAnalysis.java: Everything (I hope) necessary to do the ON demand pointer analysis. Finally commited, but not really cleaned up... FV * Analysis/PointerAnalysis/EdgesNCallees.java, Analysis/PointerAnalysis/MethodHole.java, Analysis/PointerAnalysis/ODInformation.java, Analysis/PointerAnalysis/ODInterProcPA.java, Analysis/PointerAnalysis/ODMAInfo.java, Analysis/PointerAnalysis/ODNodeStatus.java, Analysis/PointerAnalysis/ODParIntGraph.java, Analysis/PointerAnalysis/ODParIntGraphPair.java, Analysis/PointerAnalysis/ODPointerAnalysis.java: New file. * Main/ODPAMain.java: Enhanced version of PAMain used to drive the On Demand Pointer Analysis. Definitively ugly. * Main/ODPAMain.java: New file. 2000-12-06 salcianu * Main/PAMain.java, Analysis/MetaMethods/MetaAllCallers.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java: Old modifications that I forgot to commit. 2000-12-06 witchel * Main/SAMain.java: Support for the MIPS "yellow pekoe" (our experimental simulated architecture) backend. 2000-12-06 bdemsky * Analysis/PointerAnalysis/InstrumentAllocs.java: Add support for catching System.exit() calls. * Main/SAMain.java: Let scott's stuff know about Scheduler class. 2000-12-06 pnkfelix * Analysis/Instr/GraphColoringRegAlloc.java: FSK: Scott encountered a compile-time assertion failure caused by FSK: a truly insidious bug in my web building routines. FSK: Code compiles now. Am going through a test run or two before FSK: trying out a few other changes (where the XP comment is now) 2000-12-05 C. Scott Ananian * Tools/PatMat/CommutativityExpander.java, Analysis/Tree/AlgebraicSimplification.java: From examination of the StrongARM assembly output for the _222_mpegaudio SPEC benchmark, it was discovered that patterns of the form CJUMP(BINOP(cmpgt, CONST(c), r)) were causing code similar to mov r0, #c cmp r0, rX to be emitted, instead of the desired: cmp rX, #c This turned out to have two causes: first, AlgebraicSimplification was not moving the constant to the right on <, <=, >=, and > tests as it does with commutative binops. Also, the CommutativityExpander was not expanding the existing CJUMP(BINOP(cmpop, r, CONST(c))) pattern in such a way as to match trees where the CONST was on the left. Both these oversights have been corrected: - Analysis/Tree/AlgebraicSimplification now moves the constant in a constant comparison to the right. The new rule is called 'commute2'. - CommutativityExpander properly expands cmpop CONST patterns even when the cmpop is not "completely" commutative -- ie, the cmpop is CMPLT, CMPLE, CMPGE, or CMPGT, which means that the cmpop needs to be flipped when the arguments are. This is done with a fancy extra predicate in the tricky cases, which must appear first in the predicate list. 2000-12-05 bdemsky * Main/SAMain.java: Bug fixes to Eventdriven code SAMain. * Main/SAMain.java: Added support for the EventDriven transformation. I plan on removing EDXMain in the very near future. 2000-12-03 C. Scott Ananian * Backend/PreciseC/TreeToC.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/CodeGen.spec.coarseInstrs, Backend/MIPS/CodeGen.spec: The SPEC _222_mpegaudio benchmark is obfuscated. The obfuscator crams garbage into the SourceFile attribute of the class files, which eventually fouls up our assembly language output. We now scrub the string to make it safe. 2000-12-01 C. Scott Ananian * Backend/Runtime1/init-safe.properties: SPEC javac requires some additional properties in init-safe when built using the SpecApplication framework. 2000-12-01 witchel * Backend/MIPS/CodeGen.spec: Generate tag unchecked memory ops if we are compiling for mipsyp (mips yellow pekoe). * Backend/MIPS/StackInfo.java: Implement a 32-byte aligned stack frame for our architecture with tag-unchecked memory accesses. It is probably not the best default for raw MIPS. Change stack layout slightly to group saved registers next to ra and fp. This maximizes the use of the first stack cache line. 2000-11-30 vivien * ClassFile/HInitializerSyn.java: Banning HMethodMutators of synthetic class initializer method objects is a bit too extreme; instead we now allow it to implement HMethodMutator but insist that the HMethodMutator not be allowed to make any changes to the object. This allows us to perform (for example) initializations where the modifiers (and etc) are reset to their saved values -- which by happy coincidence will always be identical to the default and immutable values. * ClassFile/HConstructorSyn.java: Assertion bug in HConstructorSyn: the return type is an HPointer, not an HClass, so you must invoke actual() before you can assert that the contents are equal to HClass.Void. * ClassFile/HClassSyn.java: HClassSyn serialization wasn't properly saving/restoring the initializer/constructor/regular method status of its declared methods. Also the 'modifiers' and 'isSynthetic' fields of declared methods weren't being restored correctly. Fixed. [CSA] * ClassFile/HClass.java: Make hashcodes for HClasses repeatable by adding an explicit HClass.hashCode() method. [CSA] 2000-11-29 C. Scott Ananian * bin/build-spec-arm-hack, bin/build-spec-precisec: Added two scripts to automagically build the SPEC benchmarks with the proper root sets, etc. * bin/build-spec-arm-hack, bin/build-spec-precisec: New file. * ClassFile/HClassSyn.java: Workaround for a bug in Jikes 1.06 (corrected in jikes CVS) where jikes is unable to determine that a reference in a *static* inner class can not possibly be ambigous with a *non-static* field in the enclosing class. 2000-11-28 C. Scott Ananian * Backend/CSAHack/RegAlloc/Liveness.java: Rewriting DFS() procedure in CSAHACK/RegAlloc/Liveness to use an external stack rather than recursion fixes stack-overflow limits compiling SPEC benchmarks. 2000-11-25 C. Scott Ananian * Analysis/Quads/CoalescingToNoSSA.java: CoalescingToNoSSA is a SSA/SSI/RSSx-to-no-ssa converter which *coalesces* variables named in phi/sigma functions where possible instead of inserting moves. This slightly constrains later register allocation, but not nearly as much as if we were doing a full graph-coloring maximal coalescing here. Plus, renaming *only* the variables mentioned in phi/sigma functions allows us to restore (something similar) the "original" variable names, if the SSx form was originally generated from a No-SSA form. Doesn't do AllocationInformation/Derivation propagation yet. Doesn't work on LowQuad form yet. * Analysis/Quads/CoalescingToNoSSA.java: New file. * Analysis/Quads/QuadInterferenceGraph.java: Construct a variable interference graph for a Code in quad form. This abstracts away much of the detail regarding which variables may be coalesced in any phi/sigma reduction scheme. If the variables interfere, they can't be safely coalesced. Otherwise, they can. * Analysis/Quads/QuadInterferenceGraph.java, Util/Grapher.java: New file. * Util/Grapher.java: Specification of abstract graph interface. This is meant to be completely indepdendent of the underlying graph representation, whether it is adjacency graphs or whatever. * Util/DisjointSet.java: Add 'asMap()' method to DisjointSet, to allow a standard (but unmodifiable) Collections-API view of the DisjointSet. * Util/DisjointSet.java: Added toString() method to DisjointSet, to make examining/debugging them easier. 2000-11-22 C. Scott Ananian * bin/build-precisec: Make build-precisec script work for java 1.1. * Backend/Runtime1/Runtime.java: Added OutOfMemoryError to the root set. This is a cosmetic, not a substantive, change: we still assume that JVM "runtime exceptions" (including OutOfMemoryError) are never thrown in a correct program. * Backend/Runtime1/init-safe.properties: Added a few more native methods to init-safe set: these are needed for SpecApplication. * bin/build-precisec: build-precisec often needs more memory. * Support/_200_check-root-set, Support/_202_jess-root-set: Amended root set works also if you are building a SpecApplication harness for this benchmark. 2000-11-21 witchel * Backend/MIPS/Frame.java: If we are not doing tag check analysis, don't deref null. * Backend/MIPS/BypassLatchSchedule.java: Only check the start of the assm string, since it might have additional cruft. Use cool cloneMutateAssem method to provide low level info, while still qualifying for the useless move optimization. 2000-11-21 C. Scott Ananian * Analysis/Quads/SCC/SCCAnalysis.java: Update SCCAnalysis to handle new Quad.CONST types. 2000-11-20 C. Scott Ananian * Backend/Runtime1/init-safe.properties: Added new initializer-safe methods. 2000-11-17 pnkfelix * IR/Assem/Instr.java, IR/Assem/InstrCALL.java, IR/Assem/InstrDIRECTIVE.java, IR/Assem/InstrJUMP.java, IR/Assem/InstrLABEL.java, IR/Assem/InstrMEM.java, IR/Assem/InstrMOVE.java: FSK: Added a "cloneMutateAssem" method to Instr FSK: All subclasses of Instr should override it. I've updated FSK: IR/Assem/Instr*.java accordingly, but the spec-files still FSK: need to be updated. FSK: Scott: we should come up with some static way of verifing FSK: that methods like these have been overriden. 2000-11-17 C. Scott Ananian * Runtime/Transactions/CommitRecord.java, Runtime/Transactions/VersionInfo.java: Updates to Transactions runtime support. VersionInfo removed entirely, as this information is kept inside the runtime now. CommitRecord.List also removed, for the same reason. The abort, commit, and state methods of CommitRecord have been made native, so that we can use low-level compare_and_swap operations. Also, the 'State' enumerated type has been made into an integer enumeration for efficiency. * Backend/Runtime1/transact-safe.properties: Improvements to SyncTransformer: added a noFieldModification flag to suppress field checks/transformations entirely. This allows us to benchmark the effect of the commit record creation a bit better. Also changed the actual raw values used as flags. Now all 4-byte flags are identical, and all 8-byte flags are identical. Flags are still based on the 1976.0927 magic number. * Backend/Runtime1/DataClaz.java: Class.isPrimitive() was broken in the runtime, because it made some assumptions about the interface list of java.lang.Object which simply weren't valid. A better mechanism has been put in place: primitive types don't have *any* entries in the display table in the clazz. Of course, interface classes don't, either, but interfaces will always list (at least) themselves in the interfaces list. The combination of these two tests provides a sure means for determining isPrimitive(). Changes to Backend/Runtime1/DataClaz to keep primitive types out of the display; changes to src/java.lang/java_lang_Class.c to provide the new implementation of Class.isPrimitive(). * Backend/Runtime1/Runtime.java: Add Throwable.toString() to the root set so that FNI_ExceptionDescribe always works optimally. 2000-11-16 bdemsky * Analysis/PointerAnalysis/InstrumentAllocs.java: Fix &->&& as it should be. 2000-11-16 C. Scott Ananian * IR/Quads/UnHandler.java: bdemsky found this really really really subtle bug. I'm glad it's stomped on. Basically, Quads.UnHandler wasn't being careful about updating type information for uses *before* defs. Thus, a quad like stk2 = AGET stk2[stk3] would propagate the type information for the stk2 use (ie, that it's non-null by the time we've traversed the checks leading to the AGET) to the stk2 *def* (ie, would conclude that the value read from the array is also always non-null). This causes us to inadvertently omit needed checks, and then sometimes to segfault when those checks were in fact needed. I audited UnHandler to ensure that all def typings were done after use typings, and that def typings were in fact always done (because otherwise the use type sticks around erroneously). There were only three quad cases that needed to be fixed: AGET, ALENGTH, and INSTANCEOF. And you would only get bad type information if src==dst, and the bad type information would be cleared away at the next PHI. So this bug was rare, but it happened to show up in Spec's _202_jess benchmark. And now it's fixed. Yay. 2000-11-16 witchel * IR/Tree/Print.java: Add a HashMap to allow printing arbitrary annotations with the tree form. Also print some hashCodes to allow easy disambiguation. 2000-11-16 C. Scott Ananian * Backend/Runtime1/transact-safe.properties: Initial safe set for runtime1 and the transaction transformation. * Backend/Runtime1/transact-safe.properties: New file. * Util/ParseUtil.java: Add option to omit the descriptor from the method string. parseMethod will resolve the correct method iff the method's name is unique in the class. This change applies to root sets, initializer-transform safe sets, and anything else using the ParseUtil.parseMethod() method. (Method+descriptor strings are still supported to distinguish overloaded methods, and for backwards-compatibility.) * Main/SAMain.java, GNUmakefile: All properties files now end in .properties. * Backend/Runtime1/init-safe.properties: New file. * Backend/Runtime1/init-safe-set, Backend/Runtime1/init-safe.properties: Properties files should have a .properties suffix to get included in the distributed JAR file properly. @RENAME: init-safe-set init-safe.properties@ * Support/volano-root-set: Path to locale-root-set missing a prefix. * Util/ParseUtil.java: Added general-purpose resource-file parsing routines to harpoon.Util.ParseUtil. Updated SAMain's root-set reader and InitializerTransform's safe-set reader to use them, which simplified them quite a bit. Hopefully the ParseUtil routines will be of general use. * Util/ParseUtil.java: New file. * Main/SAMain.java, Analysis/Quads/InitializerTransform.java: Added general-purpose resource-file parsing routines to harpoon.Util.ParseUtil. Updated SAMain's root-set reader and InitializerTransform's safe-set reader to use them, which simplified them quite a bit. Hopefully the ParseUtil routines will be of general use. * Util/DisjointSet.java: Reorder statements in DisjointSet.union() to make assertion failure more informative: before the order of the get/_make_set operations caused an assertion failure in _make_set if one tried to union two identical elements. Now the assertion in union(), which has the message "Sets assumed to be disjoint", is triggered instead. * Analysis/Tree/JumpOptimization.java: Bugfix: JumpOptimization would try to optimize away self-loops. This (correctly) caused an assertion failure in the DisjointSet implementation. JumpOptimization now knows that self-loops aren't useless. 2000-11-15 C. Scott Ananian * IR/Quads/TESTER.java: Added javadoc and made class non-public. * Analysis/Maps/ConstMapProxy.java, Analysis/Maps/ExactTypeMapProxy.java, Analysis/Maps/ExecMapProxy.java, Analysis/Maps/MapProxy.java, Analysis/Maps/TypeMapProxy.java: Check in a set of MapProxies which make it easier to use TypeMap, etc, in MethodMutator/MethodSplitter contexts. Simplified DispatchTreeTransformation by using these. * Analysis/Maps/ConstMapProxy.java, Analysis/Maps/ExactTypeMapProxy.java, Analysis/Maps/ExecMapProxy.java, Analysis/Maps/MapProxy.java, Analysis/Maps/TypeMapProxy.java: New file. * Analysis/Quads/DispatchTreeTransformation.java: Check in a set of MapProxies which make it easier to use TypeMap, etc, in MethodMutator/MethodSplitter contexts. Simplified DispatchTreeTransformation by using these. * Analysis/Quads/SCC/SCCOptimize.java: SCCOptimize should really implement ExecMap, since it invalidates the ExecMap it is passed at construction time, and since it already has all the methods: all it's missing is the declaraion 'implements ExecMap'. Oh, and the execMap() methods need to be made public. * Analysis/Maps/Derivation.java: javac in JDK1.2.2 is braindead enough to require a little more precision in specifying the TypeNotKnownException class. * IR/Quads/SSIToSSA.java: javadoc typo. * IR/Quads/CleanHandlers.java, IR/Quads/QuadWithTry.java: IR.Quads.Translate leaves old PHIs in the handler sets. This is left over from a time when Quads were mutable and changing a quad didn't require updating the handler set. Needless to say, Translate wasn't completely updated when this changed. In order to avoid disturbing this otherwise-very-stable code, we've added a very simple handler cleaner, CleanHandlers, after the Translation pass. Thanks to bdemsky for finding and diagnosing this. * IR/Quads/CleanHandlers.java: New file. 2000-11-15 bdemsky * IR/Quads/TESTER.java: TEST's QuadWithTry for HANDLER errors. * IR/Quads/TESTER.java: New file. 2000-11-15 salcianu * Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java: LOts of hacking ... * Analysis/PointerAnalysis/ParIntGraph.java: Lots of stuff ... 2000-11-15 C. Scott Ananian * Analysis/Quads/DispatchTreeTransformation.java: Updated & debugged DispatchTreeTransformation. It works now, at least for the examples I've tried. Changed the infrastructure to support input and analysis in SSI form, and mutation and output in RSSx form. We use a proxy map for the type info and etc that applies to the SSI form input. We now gauge suitability for CALL replacement based on the number of *non-abstract* children, since abstract children can never be instantiated and thus don't need to be tested against. The actual CALL replacement now uses ClassHierarchy.overrides() instead of its own implementation. This reduces code duplication and probably also fixes the subtle interface method inheritance issues which ClassHierarchy.overrides() takes pains to get right. We now filter the method list to remove uncallable, abstract, and interface methods, and sort from most-specific to least-specific externally. We're also careful to skip call sites which are unreachable (have no valid targets) so that we don't generate linker references to uncallable methods. * Interpret/Quads/Method.java, IR/Quads/Print.java, IR/Quads/RSSxToNoSSA.java, IR/Quads/SSIRename.java, IR/Quads/SSIToSSA.java, IR/Quads/TYPESWITCH.java, IR/Quads/ToNoSSA.java, IR/Quads/UnHandler.java, Analysis/Quads/SCC/SCCAnalysis.java, Analysis/Quads/SCC/SCCOptimize.java, Analysis/Quads/DispatchTreeTransformation.java, Analysis/Quads/TypeSwitchRemover.java, Analysis/ToSSA.java: Added 'no-default' option to TYPESWITCH. This acts as a type assertion stating that the given key will always be an instance of one of the given case types *and never null*. No-default TYPESWITCHes have extremely fast runtime equivalents, although the runtime doesn't yet generate them, because we can binary-search through the class descriptor space w/o worrying about unmentioned types. The DispatchTreeTransformation currently generates no-default TYPESWITCHes, as may SCCOptimize. Updated all the places the need to know about TYPESWITCHes to handle the new forms -- and most especially, TypeSwitchRemover knows how to translate no-default TYPESWITCHes back to instanceofs (although the no-default information gets lost in the process). 2000-11-15 salcianu * Main/PAMain.java: -d options is now functioning. * Analysis/PointerAnalysis/AbstrPAEdgeSet.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/ParIntGraphPair.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java: Stuff 2000-11-15 wbeebee * Support/realtime.jar: Updated .jar file to reflect recent changes to RTJ implementation. 2000-11-15 witchel * Backend/MIPS/Frame.java: Support DominatingMemoryAccesses by putting a HashMap from HCodeElement to boolean in the frame that tells us if we can elide the cache tag check for this access. 2000-11-15 C. Scott Ananian * Analysis/UseDefChecker.java: New file. * Analysis/UseDefChecker.java: The use-def checker class checks for use-before-definition errors and thus aids in debugging code transformations. 2000-11-15 wbeebee * Main/SAMain.java: Simple name change. * Analysis/Realtime/README, Analysis/Realtime/Realtime.java, Analysis/Realtime/package.html: Added documentation. * Analysis/Realtime/README, Analysis/Realtime/package.html: New file. 2000-11-15 C. Scott Ananian * Analysis/SSxReachingDefsImpl.java: Do the correct thing for undefined variables. * IR/Quads/Code.java: Slightly better assertion message information. * IR/Quads/QuadRSSx.java: The codename for QuadRSSx escaped the RSSI -> RSSx renaming. Fixed that. * IR/Quads/QuadSSA.java, IR/Quads/SSIToSSA.java: Finally wrote the constructor implementation for QuadSSA to create SSA form from SSI form. We use the SSIToSSA package, which unfortunately had a little typo which resulted in harpoon.IR.LowQuad.Code being imported instead of harpoon.IR.Quads.Code. So that was fixed, too. * ClassFile/Loader.java, bin/build-precisec, GNUmakefile: CygWin portability fixes for GNUmakefile, Loader and build-precisec: translate CLASSPATH to windows format if on CYGWIN via the cygpath utility and add the CLASSPATH to the java/jikes command line explicitly. Also, the Windows port of the JDK seems to have broken .zip file handling: paths in the ZIP file are only found if they use '/' to delimit paths, instead of the architecture-specific path-delimiter character. We hack around this brokenness in ClassFile.Loader. Finally, two unix portability fixes: openssh doesn't have the -A option which we were specifying in the makefile (we now use -q instead), and the Harpoon.jar target was breaking with 'too many arguments' on some platforms. We hacked around this last problem by using the -u option to jar [which is only present in JDK1.2 and above =( ] to build the jar file incrementally, package-by-package. 2000-11-14 witchel * Analysis/Tree/DominatingMemoryAccess.java: New file. * Analysis/Tree/DominatingMemoryAccess.java: This is a first cut at an analysis which allows data cache tag checks to be eliminated. It produces results (when hooked up to SAMain, and with spec file support), but I don't know how correct those results are. 2000-11-14 pnkfelix * Backend/StrongARM/InstrBuilder.java: FSK: An offset limit of 1023 is too close (because .fpoffset increases FSK: the offset by some amount as well.) So I downsized the value to FSK: 1000 pretty much arbitrarily. * Analysis/ReachingDefsAltImpl.java: FSK: Made a number of changes to Reaching-Defs so that it uses FSK: memory much more efficiently for sparse-sets drawn from FSK: large-universes. FSK: Also played with the order of basic block placement onto the Worklist, FSK: either changing method names to make intent clearer, or changing the FSK: actual order of placement to see if that improved time to convergence FSK: on certain bad behaving methods. This still needs work; its FSK: converging quickly in the common case, but there are a few methods FSK: in the spec benchmarks (especially heinously bad 's) that FSK: still cause very poor behavior. * Analysis/Instr/RegAllocOpts.java: FSK: Added changes to turn on the hacks that were added in the last FSK: two commits. * Analysis/Instr/LocalCffRegAlloc.java: FSK: A sick hack for Emmett; since ReachingDefs is taking too long FSK: to complete, we allow it to be disabled on a method by method FSK: basis (since its not strictly needed for FSK: local register allocation) * Analysis/Instr/GraphColoringRegAlloc.java: FSK: Added change to disable move-coalescing on a method-by-method FSK: basis. Will be factored out once I replace the FSK: move-coalescing algorithm 2000-11-14 C. Scott Ananian * IR/Tree/ToTree.java, IR/Quads/CONST.java, IR/Quads/Translate.java, Backend/Runtime1/TreeBuilder.java, Backend/Generic/Runtime.java: Added support for Class, Field, and Method constants in quad (and low-quad) forms. The runtime can either translate these into calls to Class.forName() or (as our current runtime does) direct pointers to the appropriate statically-allocated objects. Changed an assert and documented the new valid constructor arguments for harpoon.IR.Quads.CONST. Tweaked IR/Quads/Translate to use Class CONSTs in the translation of static synchronized methods. Added classConst(), fieldConst(), and methodConst() methods to Generic.Runtime.TreeBuilder to allow the Runtime to specify the translation of class, field, and method constants. Updated IR/Tree/ToTree to call these methods. Implemented these methods in Runtime1.TreeBuilder to generate direct references to statically allocated objects. * IR/Quads/QuadSSA.java: SSA form is now a full-fledged top-level representation. 2000-11-14 pnkfelix * Util/Collections/BitSetFactory.java: FSK: 1. For correctness, made slow Iterator (uncommon case) modifiable, FSK: since the rest of AbstractSet's implementation relies on that. FSK: 2. For efficiency (though in the uncommon case), added a check to FSK: BitSet.removeAll where it will now iterate over the argument FSK: collection rather than the target collection if the argument FSK: size is smaller. Should possibly consider comparing against FSK: some factor of the universe's size, since that is what bounds FSK: the iteration time of the slow iterator... 2000-11-14 C. Scott Ananian * Backend/Runtime1/DataReflection2.java, Backend/Runtime1/DataReflectionMemberList.java, Backend/Runtime1/Runtime.java: Add runtime support for static Field and Method objects, just like the static Class objects we currently have. DataReflectionMemberList creates lookup tables for the Field and Method objects, and we've added java.lang.Class (should have been there before!), java.lang.reflect.Field, and java.lang.reflect.Method to the Runtime1 roots set. * Backend/Runtime1/DataReflectionMemberList.java: New file. * Backend/Runtime1/ObjectBuilder.java: Runtime1.ObjectBuilder couldn't build reference-type fields with null values. Fixed. * IR/Quads/AGET.java, IR/Quads/ASET.java, IR/Quads/Translate.java, IR/Quads/UnHandler.java: Add a type() method to AGET/ASET to let analysis/transformation passes know whether the result/source is of a primitive type (and which one) or not. This is a more general version of the ASET.isSrcPrimitive() method which previously existed and has now been replaced. One should not assume the type returned is very accurate: all object types return as java.lang.Object; no subclass distinctions are made. However, it does allow us to figure out primitive types without a type analysis pass. * Analysis/Transformation/MethodMutator.java, Analysis/Transformation/MethodSplitter.java: Add protected cloneHCode() method to allow subclasses to use a means other than hc.clone(newmethod) to create a cloned HCode. In particular, this flexibility allows you to clone HCodeElements into a Code which is *not* an exactly copy of the original --- i.e. create a QuadRSSx Code from a QuadSSI Code. 2000-11-14 bdemsky * Analysis/PointerAnalysis/InstrumentAllocs.java: Give up hope of running on JVM and try simpler allocation instrumentation. 2000-11-14 C. Scott Ananian * Util/Collections/AggregateSetFactory.java: Extremely obvious bug fix. 2000-11-14 bdemsky * Runtime/CounterSupport.java: Changes: Added call stack depth and thread limit overflow counters. Now use java.lang.System.identityhashCode() for improved speed... * Runtime/CounterSupport.java: Fixed counter call chain support for multithreaded programs. * Runtime/CounterSupport.java: This should make Frederick happy. Fixed bug where instrumenting code was locking on objects before lock object was created. 2000-11-14 wbeebee * Analysis/Realtime/Realtime.java: Changed Realtime.java to correspond to not casting to Relinker in SAMain... * Main/SAMain.java: Eliminated the unnecessary (and erroneous) cast to Relinker. 2000-11-13 salcianu * Main/PAMain.java: Minor changes 2000-11-13 pnkfelix * Support/_202_jess-root-set: FSK: Put Emmett's root set into the repository for Frederick to use * Support/_202_jess-root-set: New file. 2000-11-13 bdemsky * Runtime/CounterSupport.java: foo.hashCode() might be synchronized or build objects...so turn off instrumentation while calling it. 2000-11-13 C. Scott Ananian * Analysis/EventDriven/AsyncCode.java: Whoops -- forgot to expand 'import *'. * IR/Quads/QuadNoSSA.java, IR/Quads/QuadSSI.java, IR/Quads/package.html, Analysis/Quads/DispatchTreeTransformation.java, Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/ContCode.java, Analysis/EventDriven/ContCodeNoSSA.java, Analysis/LowQuad/Loop/MyLowQuadNoSSA.java: Renaming RSSI to RSSx, as it is a relaxed version of both SSI and SSA forms. * IR/Quads/QuadRSSx.java, IR/Quads/RSSxToNoSSA.java: New file. * IR/Quads/QuadRSSI.java, IR/Quads/QuadRSSx.java, IR/Quads/RSSIToNoSSA.java, IR/Quads/RSSxToNoSSA.java: Renamed RSSI to RSSx, as it is a relaxed version of both SSI and SSI forms. @RENAME: RSSI RSSx@ 2000-11-13 salcianu * Main/PAMain.java, Backend/StrongARM/Frame.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/MyAP.java, Analysis/PointerAnalysis/PointerAnalysis.java: I've eliminated some bugs. 2000-11-13 bdemsky * Main/SAMain.java: WSB doesn't realize that we might not have a Relinker. * Main/PAMain.java: Set register allocator based on backend. * Main/PAMain.java: This needs to relay linker to SAMain. * Analysis/PointerAnalysis/AllocationNumbering.java, Analysis/PointerAnalysis/InstrumentAllocs.java, Runtime/CounterSupport.java, Main/SAMain.java: Added support for keeping track of callchain x allocation sites counts. Outputted data is sparse formatted, so see Runtime.CounterSupport for details. 2000-11-13 C. Scott Ananian * bin/munge: Ensure that non-binary files are not munged. 2000-11-12 wbeebee * Analysis/Realtime/Realtime.java: Removed code from SAMain.java and added it to Realtime.java * Main/SAMain.java: Removed most of the Runtime code from SAMain.java * Support/realtime.jar: New .jar file - without Object.class 2000-11-12 C. Scott Ananian * bin/build-precisec, Support/realtime.jar: Added realtime support .jar file to the Support directory and to the build-precisec script. * Support/realtime.jar: New file. 2000-11-12 salcianu * Analysis/PointerAnalysis/PANode.java: This fix should allow us to determine the type of an object whose depth is > 0 (a specialization). 2000-11-12 wbeebee * Main/SAMain.java: Modified SAMain to support Realtime Java extensions (which are currently only partially complete) with the -t option - just leave off the -t option for normal execution. * Analysis/Realtime/Realtime.java: Adding class that will eventually contain the top-level Realtime java analysis... * Analysis/Realtime/Realtime.java: New file. * bin/build-precisec: Updated build script - to point to realtime.jar 2000-11-12 C. Scott Ananian * Analysis/Transformation/MethodMutator.java, Analysis/Transformation/MethodSplitter.java: Allow the type of the HCodeFactory returned by MethodMutator/Splitter to differ from the input type. IE, input is QuadSSx, output is QuadRSSx... * Backend/Runtime1/TreeBuilder.java, Backend/Generic/Runtime.java: Export objectSize() method. 2000-11-11 C. Scott Ananian * Backend/PreciseC/PGCNiftyAllocationStrategyWithStats.java: New file. * Backend/PreciseC/Frame.java, Backend/PreciseC/PGCNiftyAllocationStrategyWithStats.java: Recommitted a (very slightly restructured) version of Brian's statistics-with-stack-alloc commit. * Backend/Runtime1/MallocAllocationStrategy.java: Recommit Brian's changes to MallocAllocationStrategy, which makes it properly subclassable outside this package. * ClassFile/Relinker.java: Relinker.relink() takes two HClassProxy's. Relinker.createMutableClass() didn't seem to know that. This has been corrected. Thanks to Wes for finding this bug. * ClassFile/Relinker.java: Fix serialization omission in Relinker: relinked classes were not being relinked properly on deserialization. * ClassFile/HConstructorProxy.java, ClassFile/HFieldImpl.java, ClassFile/HFieldProxy.java, ClassFile/HInitializerProxy.java, ClassFile/HMemberProxy.java, ClassFile/HMethodImpl.java, ClassFile/HMethodProxy.java: Fix hashCode()/equals()/toString() bugs in the presence of relinking. * ClassFile/HClassProxy.java: Once a proxy has been relinked, pointer-equality no longer suffices for equals(). * Main/SAMain.java, Analysis/Quads/Nonvirtualize.java: Certain virtual methods are non-callable because the ClassHierarchy has determined that the type of their target is never created in the program. Nonvirtualize was making some of these methods seemingly callable by creating a static reference to the method in question; this patch fixes this buglet. * IR/Quads/Code.java: "Correct" fix to the nulls-in-cloneWithMaps() bug. * Main/SAMain.java: Reverting this change until someone emails me a reason for it. * IR/Quads/Quad.java: Reverting bdemsky's change. Added a big comment to explain why the nulls are in this retval. * IR/Quads/Qop.java: javadoc typo. * Backend/PreciseC/Frame.java: PreciseC frame now lets you select whether you want to disable stack allocation (and enable stack allocation statistics) or enable stack allocation statistics (and disable stack allocation) via the harpoon.precisec.stackstats property. * Backend/Runtime1/MallocAllocationStrategy.java, Backend/PreciseC/PGCNiftyAllocationStrategy.java: Reverting bdemsky's changes. * ClassFile/Relinker.java: Bugfix, pointed out by wbeebee. 2000-11-11 bdemsky * Backend/Runtime1/MallocAllocationStrategy.java, Backend/PreciseC/Frame.java, Backend/PreciseC/PGCNiftyAllocationStrategy.java: Support for niftystats allocation strategy. * Main/SAMain.java: Need to regenerate classhierarchy if using old clinit approach... 2000-11-11 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/PointerAnalysis.java: Stuff. 2000-11-11 bdemsky * IR/Quads/Quad.java: Fix evil scott buglet. 2000-11-10 bdemsky * Backend/Runtime2/TreeBuilder.java: Fix 2000-11-10 C. Scott Ananian * Analysis/DomFrontier.java, Analysis/DomTree.java: Improved speed efficiency of DomTree and DomFrontier by using MultiMaps instead of the hacked-together solutions they were using. * Util/Collections/AggregateSetFactory.java: Add 'AggregateSetFactory' for the common case where you'd like a MultiMap with HashSets for the values, but don't want to pay the huge memory overhead of all those independent HashSets. AggregateSetFactory uses one big HashSet for all the little sets. At the moment, the remove() operation on the small set is slow, but most of the uses I've got in mind don't use remove() anyway. (A MultiMap is basically a MultiMap, with a single HashSet to implement the contains() operation on the value sets.) * Util/Collections/AggregateSetFactory.java: New file. * Util/Collections/MultiMap.java: Clarify the semantics of the remove() method inherited from java.util.Map by giving it some javadoc. * Backend/Runtime1/TreeBuilder.java: Go all the way: make all relevant package-scope fields 'protected' to enable extension-by-subclassing. 2000-11-10 bdemsky * Backend/Runtime1/TreeBuilder.java: Had to make some things more easily accessed [ie now protected]. 2000-11-10 C. Scott Ananian * Analysis/Loops/LoopFinder.java, Util/Graph.java, Analysis/DomFrontier.java, Analysis/DomTree.java: Reworked DomTree and DomFrontier interface so that they are specific to an HCode, instead of being all-singing, all-dancing caching objects that can be used on any HCode at all and dynamically performed the analysis the first time an HCodeElement belonging to a particular HCode was queried. The caching approach could lead to unchecked memory bloat and so no one was using the caching features anyway. Stripping them keeps this interface much nicer. Also reworked the way we handle post-dominators to use the edge-reversed CFG instead. This cleans up a lot of code, too. Fixed some buglets with post-dominators using a non-default CFGrapher, too. Updated existing code to use the new slightly-modified interface. 2000-11-10 bdemsky * Backend/Runtime2/Runtime.java, Backend/Runtime2/TreeBuilder.java: Subclasses of Runtime and TreeBuilder to support synchronization elimination. * Backend/Runtime2/Runtime.java, Backend/Runtime2/TreeBuilder.java: New file. 2000-11-10 C. Scott Ananian * IR/Tree/TreeGrapher.java, IR/Properties/CFGrapher.java: Extended CFGrapher to have a getLastElements() methods as well as a getFirstElements() method. This now allows us to implement a CFGrapher.edgeReversed() method which returns an edge-reversed version of the current grapher. This is handy in a lot of algorithms which work more naturally on the edge-reversed control-flow graph --- for example, post-dominance can now be computed by simply giving an edge-reversed grapher to DomTree. * Util/Collections/GenericMultiMap.java, Util/Collections/MultiMap.java, IR/Tree/TreeGrapher.java, Backend/StrongARM/CodeGen.spec, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/RegFile.java, Backend/MIPS/CodeGen.spec, Analysis/Place.java, Analysis/ReachingDefsAltImpl.java: Modified constructor for GenericMultiMap to make it more intuitive. Also updated some very confusing javadoc. Added additional constructor for the common case: usually we want to override the collection factory *only* and not the map factory. Updated existing code to match new constructor; in some cases I just removed bogus import statements that were importing MultiMap although it was never used. * Analysis/PointerAnalysis/AllocationNumbering.java: Remove 'import *' statements. 2000-11-10 bdemsky * Runtime/CounterSupport.java: Fixes * Analysis/PointerAnalysis/InstrumentAllocs.java, Main/SAMain.java, Runtime/CounterSupport.java: Bounded map solution to synchronization counting. Assumes good hashcodes! Appears to work... 2000-11-09 C. Scott Ananian * Analysis/Quads/InitializerTransform.java: Update to new MethodSplitter constructor. Order of mutate/split doesn't matter, so we save some memory by passing 'true' to MethodSplitter. * Analysis/Transformation/MethodSplitter.java: Added option to MethodSplitter to 'mutate original after split'. Before the semantics were 'mutate original before split'. The old behavior is still there, if you want it: it reduces the size of the HCodeFactory cache, so if you're not mutating unsplit methods you can save some memory. * ClassFile/ClassPointer.java, ClassFile/HClassArraySyn.java, ClassFile/HClassSyn.java, ClassFile/HFieldSyn.java, ClassFile/HMethodSyn.java: Fixed serialization of mutated classes, fields, and methods. Many objects are serialized in ClassPointer form to defer lookup; ClassPointer has thus been made Serializable. All members now emit stubs that lookup the apropriately named member in their parent on reconstruction. This puts the onus on the parent HClassSyn to save/restore member information, which it does via new FieldStub/MethodStub classes in HClassSyn. Several constructors were widened to accept HPointer instead of just HClasses, which allows us to complete the whole deserialization *before* any classes are looked up in the linker. I was worried about mutation of the linker object while it was being deserialized. 2000-11-09 bdemsky * Analysis/PointerAnalysis/InstrumentAllocs.java: Bugs. * Analysis/PointerAnalysis/InstrumentAllocs.java, Main/SAMain.java: Synchonization instrumenting code. * Analysis/PointerAnalysis/AllocationNumbering.java, Analysis/PointerAnalysis/InstrumentAllocs.java, Main/SAMain.java: Many small bugs quashed. 2000-11-08 bdemsky * Main/PAMain.java, Main/SAMain.java, Analysis/PointerAnalysis/InstrumentAllocs.java: Incorporated Scott's wisdom into instrumenting code. 2000-11-08 C. Scott Ananian * Main/SAMain.java: This is how the AllocationNumbering object is used. * Analysis/PointerAnalysis/AllocationNumbering.java: New file. * Analysis/PointerAnalysis/AllocationNumbering.java: This is what I expected the allocation-numbering bit to look like. We clear out caching code factories aggressively to avoid huge memory bloat, so you simply *can not* dump a code factory way after its been used and mutated and expect it to still contain representations for your code. I'm about to check in a hack to SAMain to show how this numbering object should be used. * ClassFile/HClassArraySyn.java, ClassFile/HClassSyn.java: Make synthetic classes serializable. * ClassFile/HClassArray.java: Remove 'caching' fields from HClassArray to save memory. 2000-11-08 salcianu * Main/PAMain.java: Improved options in PAMain (the old scripts should remain valid) + various hacking + bug fixing. 2000-11-08 C. Scott Ananian * GNUmakefile: Just cleaning up the properties target. 2000-11-08 salcianu * Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/NodeRepository.java: Improved options in PAMain (the old scripts should remain valid) + various hacking + bug fixing. 2000-11-08 C. Scott Ananian * Runtime/CounterSupport.java, Runtime/Instrumentate.java: Change "instrumentate" to "instrument". Scott on miris[~]% webster instrument [...] 2. in.stru.ment \-.ment\ vt 1: to address a legal instrument to 2: ORCHESTRATE 3: to equip with instruments Scott on miris[~]% webster instrumentate No definition for 'instrumentate'. Scott on miris[~]% @RENAME: Instrumentate CounterSupport@ * Runtime/CounterSupport.java: New file. * Analysis/PointerAnalysis/InstrumentAllocs.java, Analysis/PointerAnalysis/InstrumentateAllocs.java: Change "instrumentate" to "instrument". Scott on miris[~]% webster instrument [...] 2. in.stru.ment \-.ment\ vt 1: to address a legal instrument to 2: ORCHESTRATE 3: to equip with instruments Scott on miris[~]% webster instrumentate No definition for 'instrumentate'. Scott on miris[~]% @RENAME: Instrumentate Instrument@ * Analysis/PointerAnalysis/InstrumentAllocs.java: New file. * Main/SAMain.java: Change "instrumentate" to "instrument". Scott on miris[~]% webster instrument [...] 2. in.stru.ment \-.ment\ vt 1: to address a legal instrument to 2: ORCHESTRATE 3: to equip with instruments Scott on miris[~]% webster instrumentate No definition for 'instrumentate'. Scott on miris[~]% * Analysis/Transformation/MethodSplitter.java: Bugfix -- MethodSplitter was calling mutateHCode() (at least) twice on ORIGINAL methods that had mutated counterparts, because the convert() call to obtain the source for the mutation was bypassing the CachingCodeFactory that was intended to make sure convert was only called once. 2000-11-08 pnkfelix * Support/init-safe-set, Main/SAMain.java, Backend/Runtime1/init-safe-set: FSK: @RENAME: Support/init-safe-set Backend/Runtime1/init-safe-set @ FSK: 1. Made RegAllocOpts support a prefix-matching system, though FSK: it has not been tested because Emmett has now told me that FSK: he doesn't need it after all... FSK: 2. Reorganized init-safe-set loading so that it is not dependent FSK: on a hard-coded filename in SAMain, but rather loads the file FSK: from a spot rooted in the classpath... * Backend/Runtime1/init-safe-set: New file. * Analysis/Instr/RegAllocOpts.java, GNUmakefile: FSK: @RENAME: Support/init-safe-set Backend/Runtime1/init-safe-set @ FSK: 1. Made RegAllocOpts support a prefix-matching system, though FSK: it has not been tested because Emmett has now told me that FSK: he doesn't need it after all... FSK: 2. Reorganized init-safe-set loading so that it is not dependent FSK: on a hard-coded filename in SAMain, but rather loads the file FSK: from a spot rooted in the classpath... 2000-11-08 bdemsky * Main/PAMain.java: Fix reading in of linker stuff...doesn't fix the problem, but some bugs still left. 2000-11-08 C. Scott Ananian * ClassFile/HClassCls.java: Better message for NoSuchMethodError. Note that revision 1.1.2.9 was also for a "more descriptive exception message" but it missed one of the calls to getDeclaredMethod and, well, this commit is just *more* descriptive. =) * Analysis/Quads/InitializerTransform.java: Oops: one of the nested code factories was missing its serializability. 2000-11-08 bdemsky * Runtime/Instrumentate.java, Main/PAMain.java: Changed to text strings from object storage...Native support for serialization is problematic. 2000-11-08 C. Scott Ananian * Backend/Maps/CHFinalMap.java: Make CHFinalMap serializable. We clear the cache when it is serialized to save space. * Backend/Maps/DefaultFinalMap.java, Analysis/Transformation/MethodMutator.java: Make MethodMutator and DefaultFinalMap serializable. No tricks here. * Analysis/Transformation/MethodSplitter.java, Analysis/Quads/InitializerTransform.java: Make MethodSplitter serializable. The main trick here is keeping Tokens singleton objects when they are deserialized. See the javadoc for details on how this is done. 2000-11-08 bdemsky * Analysis/PointerAnalysis/InstrumentateAllocs.java: Oops...forgot this. 2000-11-08 C. Scott Ananian * Analysis/Maps/Derivation.java: Adding an assertion to the DList constructor to chase down a bdemsky bug. 2000-11-08 bdemsky * Main/SAMain.java: Add support for Instrumentation pass. -N option. Scott needs to make codefactories serializable to disk for this to work. * Analysis/PointerAnalysis/InstrumentateAllocs.java: Added public methods to retrieve maps. * Runtime/Instrumentate.java: Changes added to stop counter before we print results out. 2000-11-07 bdemsky * Analysis/PointerAnalysis/InstrumentateAllocs.java: It kind of works...Cool... * Analysis/PointerAnalysis/InstrumentateAllocs.java: Instrumentation code factory. * Analysis/PointerAnalysis/InstrumentateAllocs.java: New file. * Runtime/Instrumentate.java: Instrumentation class. * Runtime/Instrumentate.java: New file. 2000-11-07 C. Scott Ananian * Analysis/Transformation/MethodSplitter.java: Bugfix to MethodSplitter: we weren't fetching/storing the "ORIGINAL" method name associated with each split method properly, so you'd get DuplicateMemberExceptions if you tried to select() from a split method. * Runtime/Transactions/TransactionAbortException.java: New file. * Runtime/Transactions/CommitRecord.java, Runtime/Transactions/TransactionAbortException.java: Refine the definitions of CommitRecord and TransactionAbortException for the transaction runtime support library. * IR/Quads/Quad.java: Add a Quad.remove() method to remove a quad from the graph. 2000-11-07 bdemsky * IR/Quads/SSIRename.java: Added support for derivation for PHI and SIGMA function... 2000-11-06 salcianu * Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PointerAnalysis.java: Fixing some error in some of the most recently added stuff. * Analysis/PointerAnalysis/PANode.java: Ending a comment in the right place. 2000-11-06 C. Scott Ananian * Runtime/Transactions/CommitRecord.java, Runtime/Transactions/VersionInfo.java: Filling out pure-Java version of Transaction data structures. * Runtime/Transactions/VersionInfo.java: New file. 2000-11-06 salcianu * Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PANode.java: Some type information was added to PANode. Now, we should be able to find the possible type(s) of a node using the getPossibleClasses() method. Not quite tested. 2000-11-06 bdemsky * IR/Quads/SSIRename.java: Scott buglet. 2000-11-04 salcianu * Analysis/EventDriven/CloningVisitor.java, Analysis/Maps/AllocationInformation.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/MyAP.java, Analysis/PointerAnalysis/SyncElimination.java, Analysis/AllocationInformationMap.java, Analysis/DefaultAllocationInformation.java: The AllocationInformation has been extended with a new flag that indicates whether the synchronizations on objects allocated at that NEW/ANEW site are useless or not. The allocation native method is supposed to save this flag into the allocated objects so that the synchronization native method can avoid doing the work for the marked objects. Correspondingly, MAInfo was extended to generate this information. Currently, if the memory allocation info is generated, the synchronization info is generated too. In the future, it would make more sense to separate them and have different controlling flags in harpoon.Main.PAMain Finally, guess what?, none of the new features was tested in any way ... 2000-11-02 C. Scott Ananian * Main/SAMain.java: Turned on the new class initialization strategy in SAMain. You can turn it back off by including '-I' on the command-line. Removed the '-m' class-hierarchy-from-file option, since the new initialization strategy is incompatible with it. 2000-11-02 pnkfelix * Backend/Generic/Code.java: FSK: Implemented peephole optimizations to eliminate ridiculously redundant FSK: Moves and Jumps, (this is for Emmett), as well as a static boolean FSK: to turn the transformation on and off. This is not really consistent FSK: with our handling of other optimizations in FLEX (in terms of how they FSK: are incoprated into the compilation pipeline) but the very nature of a FSK: peephole optimization seems to imply that we don't need a full FSK: HCodeFactory for this. I'm could easily be convinced otherwise FSK: though. * Analysis/Instr/GraphColoringRegAlloc.java: FSK: GCRA: Fixed a bug in move coalescing that was making spec benchmark FSK: db fail to execute properly. * Analysis/Transformation/MethodSplitter.java: FSK: Made Token ctor public so that code would compile with javac 2000-11-01 witchel * Backend/MIPS/BypassLatchSchedule.java: If an instruction defs a register and uses it, that is its last use even if its live out. Tag branches with their use information. They are a very important class of instructions. Fix stupid indexOf bug. With these annotations we eliminate 50% of register writes and 25% of register reads for jvm compress. That is a signifigant (over 5%) energy reduction. 2000-10-31 pnkfelix * Analysis/Instr/GraphColoringRegAlloc.java: FSK: A fix to GraphColoringRegAlloc. (I was stupidly maintaining a FSK: transaction log without preserving the order of the transactions. FSK: such a silly silly oversight) * Backend/StrongARM/CodeGen.spec.coarseInstrs: FSK: commiting my offshoot of the spec-file for coarse grained FSK: instructions that now produces Dummys as well. Both of these FSK: concepts will go away with the shift to groups, on which I hope FSK: to make progress after I finish getting Emmett squared away on FSK: the MIPS backend. 2000-10-30 pnkfelix * Backend/MIPS/CodeGen.spec, Backend/MIPS/Frame.java: FSK: Changes to Emmett's MIPS spec file to support InstrDUMMY FSK: we now run Driver successfully! Woo woo! * Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/RegAllocOpts.java: FSK: GCRA: Added comments on groups of boolean flags (some are for FSK: code instrumentation and others are for trying various FSK: changes in reg-alloc-strategy to eliminate errors in output FSK: or during compilation) FSK: RegAllocOpts: Added INFO flag that prints out which options are FSK: being actually chosen. This isn't very useful now, since FSK: the options should always evaluate to a single method name FSK: (though it ignores overloading, so it can map to several FSK: method implemenations), but I'm considering switching to FSK: prefix matching system instead, just to allow easy enabling FSK: of an option for an entire class or set of methods with FSK: similar names. * IR/Assem/Instr.java: FSK: Added "isDummy()" method to differentiate dummy instructions FSK: which give hints to the register allocator from ones that FSK: actually do stuff. FSK: This is only a temporary hack (but one that solves a lot of FSK: problems, much to my chagrin) to be removed once I incorporate FSK: support for InstrGroups 2000-10-27 C. Scott Ananian * Runtime/Transactions/CommitRecord.java: New file. * Runtime/Transactions/CommitRecord.java: Very incomplete rough skeleton of atomic-transactions code. * Analysis/DomTree.java: Simple extension to allow DomTree to use CFGraphers. * IR/Properties/CFGraphable.java, IR/Properties/CFGrapher.java: Improved javadoc -- CFGrapher now refers you to CFGraphable and vice-versa. * Analysis/Transformation/package.html: Clarify the package description for harpoon.Analysis.Transformation. * Runtime/Transactions/package.html: Describe the harpoon.Runtime.Transactions package. * Runtime/Transactions/package.html: New file. * Runtime/package.html: Describe the harpoon.Runtime package. * Runtime/package.html: New file. * RunTime/Monitor.java, RunTime/Monitor.properties, GNUmakefile: Removed RunTime/Monitor.java and RunTime/Monitor.properties, because no current FLEX code made use of them. Cleaning the closets. Also, I like the package name 'harpoon.Runtime' (lowercase-t) better than 'harpoon.RunTime' (uppercase-T) anyway. =) 2000-10-25 C. Scott Ananian * Analysis/Maps/Derivation.java: More clarification on DLists. There always seems to be misunderstanding about this. 2000-10-24 pnkfelix * Main/SAMain.java, Analysis/Instr/RegAlloc.java: FSK: RegAlloc: Very stupid bug in calculation of used-reg-set has now FSK: been squashed. C:P FSK: SAMain: updated abstract-reg-alloc clause to use the FSK: parameterized register allocation strategy rather than FSK: the default. 2000-10-23 pnkfelix * Analysis/Instr/GraphColoringRegAlloc.java: FSK: That tricky Emmett managed to find a really bad bug in FSK: the GCRA. I was being far too aggressive in my move-coalescing. FSK: This fixes things, in terms of correctness, but I'm nervous FSK: about the time-complexity of the able-to-coalesce checks FSK: now. The class needs to be revamped severely, but lets get FSK: Emmett his benchmarks first. 2000-10-22 C. Scott Ananian * Support/init-safe-set: More native method information added to the init-safe-set properties file. * Backend/Maps/CHFinalMap.java: Methods of abstract classes which are never subclasses and instantiated can get tagged 'final', which leads to linker errors trying to resolve the non-existent abstract method implementation. Reorder the tests a bit so that abstract methods are never said to be 'final'. * Analysis/Quads/QuadClassHierarchy.java: Minor bug fix: QuadClassHierarchy wasn't associating Thread.start() with Thread.run() if the call to start() was non-virtual (ie, it was an instance of 'super.start()' or a previous optimization had noticed that Thread.start() was final and devirtualized it). This is now fixed. * Support/locale-root-set: Bug fix: one of the classes mentioned in the locale root set is not present in JDK1.1. * Analysis/Quads/InitializerTransform.java: Cleaner solution to the 'super.foo() invocation' problem which was kludged around by adding checks to constructor invocations. * ClassFile/HMemberProxy.java: Fix the 'disappearing method' problem: member proxies now have a single immutable hashcode which they hold for life (even if they are relinked!). * ClassFile/HClassProxy.java, ClassFile/Relinker.java: Arrays are now proxied by a relinker just like 'normal' classes. This regularizes the use of method proxies and such. * ClassFile/HClassArraySyn.java: Bug fix: HClassArraySyn didn't override HClassArray.getDeclaredMethods() so nobody saw its spiffy declaredMethods (mutable) set. * .cvsignore: Two more entries for the .cvsignore to keep the root a little cleaner. * ClassFile/HField.java, ClassFile/HFieldImpl.java, ClassFile/HMember.java, ClassFile/HMethod.java, ClassFile/HMethodImpl.java: Regularize the HMember.hashCode() methods. We diverge a bit from java.lang.reflect in doing this, but I think it Just Makes Sense. Both fields and methods now have hashcodes which are the xor of the parent, the name string, and the descriptor string. * Backend/Runtime1/Runtime.java: Indicate (via a comment) that InitializerOrdering is no longer required, so long as you apply the InitializerTransform codefactory. * Backend/Analysis/InitializerOrdering.java: Fix an assertion failure in InitializerOrdering. * Analysis/Quads/InitializerTransform.java: Bug fixes: I wasn't really making initializers idempotent because I'd forgotten a SET operation. Also, add checks to CALLs when superclass constructors are being invoked. 2000-10-21 C. Scott Ananian * IR/Quads/CloneSynthesizer.java: Bug fix: the primitive array clone methods and java.lang.Object[].clone() are implemented in native code in the Runtime. The clone() methods which need to be synthesized are *only* [].clone() where is an object type other than java.lang.Object. * Analysis/Quads/InitializerTransform.java: Unify the safeMethods set and the dependentMethods map. This allows us to create proxies for those native methods which are safe but still end up being split (because they are dispatched virtually and we don't know where the dispatch goes). Has the nice side-effect of cleaning up the parsing & etc code, too. * Analysis/Transformation/MethodSplitter.java, Backend/Maps/CHFinalMap.java, Analysis/ClassHierarchy.java: Found a subtle bug in determine method overriding (involving interface methods) which crept into several places because I was writing essentially the same code over and over again. Put the code -- with the subtle bug documented and corrected -- in one place (ClassHierarchy.overrides()) and changed CHFinalMap and MethodSplitter to use the new correct implementation. Also CHFinalMap now never claims abstract methods are final. This helps when you're compiling code that contains calls to unreachable methods (ie, calls on an unexecutable branch) --- otherwise these calls might be compiled to static references to methods which are never compiled, which Would Be Bad. * Analysis/Quads/InitializerTransform.java: Add code to support 'known' information about native methods: we can now do some automagic rewriting to support native methods with known static dependencies. This information can be supplied to the constructor either in raw Set/Map form, or as a (more easily loaded) Properties object. * Analysis/Quads/Nonvirtualize.java: New file. * Analysis/Quads/Nonvirtualize.java: Nonvirtualize is a simple optimization that changes virtual method invocations to non-virtual invocations where this is safe. It's a good example of a how simple it can be to write optimizations using the new MethodMutator infrastructure. * Analysis/Transformation/MethodSplitter.java: MethodSplitter now uses CHFinalMap instead of DefaultFinalMap. More accuracy! Also, codeFactory() is now non-final so MethodSplitter subclasses can override it to chain their own codefactory in front of the MethodSplitter. (They can already chain *behind* the MethodSplitter by invoking the super constructor with whatever codefactory they like.) See InitializerTransform to see how codefactory chaining is done. * Backend/Maps/CHFinalMap.java, Backend/Maps/FinalMap.java: Add a new 'CHFinalMap' which is a little more accurate that the 'DefaultFinalMap' as it uses a ClassHierarchy to determine when a method is final *in the context of* a particular application. Tweaked the javadoc for FinalMap to point people to the CHFinalMap when it's appropriate. * Backend/Maps/CHFinalMap.java: New file. * Support/init-safe-set: Bugs in the safe set: I forgot that the descriptor character for 'long' is *J*. Of course. 2000-10-20 witchel * Backend/MIPS/CodeGen.spec: Fix a bug in storing from a name to a name. Load from a name does not use any registers (the assembler takes care of it) Get rid of isTailCall restriction 2000-10-20 C. Scott Ananian * Support/init-safe-set: New file. * Support/init-safe-set: Property file with "safe for initialization" native runtime methods. * Backend/StrongARM/CodeGen.spec: Commented out the isTailCall check. The implementation in the SPEC file will work for the tail call case, it's just not optimized for it. Eventually we should write an optimized call spec, too. * Backend/Runtime1/Runtime.java, Backend/Runtime1/StubCode.java: Remove otherNames[] kludge from Runtime and StubCode, as it is no longer needed. harpoon.IR.Quads.CloneSynthesizer makes synthetic implementations of the .clone() methods in quad-with-try form for us now. * IR/Quads/CloneSynthesizer.java, IR/Quads/QuadWithTry.java: Add synthetic representations for .clone() methods. The created code turns around and calls Object.clone(). This allows us to sanely split clone() with a MethodSplitter. * IR/Quads/CloneSynthesizer.java: New file. * Analysis/Quads/InitializerTransform.java, Analysis/Transformation/MethodSplitter.java: Minor changes to InitializerTransform and MethodSplitter to make our handling of method virtuality a little more consistent. The FinalMap used in MethodSplitter can/should be replaced by a more intelligent one when a more intelligent one is written. * ClassFile/HClassArraySyn.java: Protect the array clone method from modification (I'm reconsidering my earlier decision to make it mutable). * ClassFile/HClassArraySyn.java: New file. * ClassFile/HClassArraySyn.java, ClassFile/HMethodSyn.java, ClassFile/Linker.java, ClassFile/Relinker.java: Relinkers now create semi-mutable array classes. Methods can be added (which is needed to properly deal with MethodSplitter-type transformations) but, to preserve our sanity, we don't at the moment allow fields to be added, class initializers to be added, etc. But I'm sure there's quite enough rope to hang oneself with as it is. * ClassFile/HClassArray.java, ClassFile/HClassPrimitive.java: Make HClass.getModifiers() return the same thing as Class.getModifiers() for primitive and array classes. * Analysis/Instr/EqTempSets.java: Javadoc update. * Analysis/Quads/InitializerTransform.java: The MethodSplitter superclass now takes an additional argument to its constructor, a class hierarchy. * Analysis/Transformation/MethodSplitter.java: MethodSplitter now Does The Right Thing with virtual methods: it splits not only the given method but also methods of the same name & descriptor in all known subclasses of the method's declaring class. This makes virtual methods dispatch correctly. * Analysis/Quads/QuadClassHierarchy.java: Fix for QuadClassHierarchy when working in quad-with-try form: HANDLER quads act like INSTANCEOF: you need to ensure that the class tested against is known. * Util/HClassUtil.java: Bug fix: commonParent would sometimes return an HClass from the wrong linker (this only happened when merging two array types, one of which was a primitive array). * Analysis/Quads/QuadClassHierarchy.java, Analysis/ClassHierarchy.java: Specification and implementation of the ClassHierarchy.parents() method was broken for interface types. Luckily, no one used this method anywhere in FLEX. So I took the liberty of correcting it, so that sensible results are returned no matter what type of class is passed in. As a nice by-product, this allowed us to simplify the QuadClassHierarchy implementation as well by using calls to the new parents() method. QuadClassHierarchy also had some minor javadoc fixes (to let the method descriptions in the underlying ClassHierarchy class show through) and was extended to support QuadWithTry form (only a minor tweak to the root set to account for the implicitly-thrown exceptions was needed). 2000-10-20 pnkfelix * Main/SAMain.java: FSK: With this checkin, Emmett should now be able to pass a FSK: reg-alloc-options file to the '-R' option (not '-r'... yes this FSK: is bad... one of these days we'll sanitize the SAMain command FSK: line...) * Backend/StrongARM/CodeGen.spec.coarseInstrs: FSK: After a nice little scare where my machine couldn't boot for a FSK: few hours, I decided to check in this puppy. Its a spec-file for FSK: StrongARM that has a large number of hacks added to support my FSK: global register allocator, mostly of the form of combining what FSK: are operationally several assembly instructions into one large FSK: Instr with lots of '\n's (thus the suffix, "coarseInstrs"). FSK: It is simply a good checkpoint to make before beginning work FSK: on the InstrGroup abstraction we're developing... * Backend/StrongARM/CodeGen.spec.coarseInstrs: New file. * Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/RegAllocOpts.java: FSK: 1. Officially switched default RegAlloc strategy from Local-alloc FSK: to Global-alloc. This is important; if you want to use the Local Register Allocator in SAMain for some unholy reason, you now need to use the '-L' option instead of the '-R' option. FSK: 2. Developed a RegAllocOpts (as in Options) class to allow FSK: finer grained control over register allocation strategies. FSK: 3. Parameterized of a bunch of System.out.println's in GCRA so FSK: that they stop scaring Emmett. FSK: 4. Added a parameter to give slightly more control over FSK: move-coalescing in GCRA * Analysis/Instr/RegAllocOpts.java: New file. 2000-10-19 witchel * Analysis/DataFlow/SpaceHeavyLiveTemps.java, Analysis/ReachingDefsAltImpl.java: FSK: Special casing on unreachable code; why does this come out of tree form? * Backend/MIPS/CodeGen.spec: Add fake uses to coerce the register allocator. I found one case where I had not compoundified my code. Remnants of trying to use GP. * Backend/MIPS/RegFileInfo.java: Do what Felix tells me to specify ok registers to use for his allocator. I tried to add GP as an available register. Bad idea, C likes its value and assumes it is correct. 2000-10-19 C. Scott Ananian * Analysis/Transformation/MethodSplitter.java: mutateHCode() is now demand-driven. * Analysis/Quads/InitializerTransform.java: Bug fix: handlers weren't being properly transferred to the new CALLs being created. * Analysis/Quads/InitializerTransform.java: Optimize by not rewriting 'safe' methods. * Analysis/Quads/InitializerTransform.java: Added rewrite of non-static calls and fixed bug in traversal. Still to do: a semi-intelligent implementation of 'isSafe()'. * Analysis/Transformation/MethodSplitter.java: Fixed bug where cloned method didn't inherit the properties (static, etc) of its parent. * IR/Quads/Peephole.java: Fixed bug in Peephole.optimize() that would leave deleted MOVEs in the protected sets of any HANDLERs that happened to mention them. This caused havoc when the quad graph was cloned. * IR/Quads/Quad.java: Add removeHandlers() method to parallel addHandlers() method; also reimplement transferHandlers() method to use these. * IR/Quads/Print.java: Flush buffer after we print code. 2000-10-19 pnkfelix * IR/Assem/Instr.java, IR/Assem/InstrJUMP.java, IR/Assem/InstrMOVE.java: FSK: incrementally moving away from the InstrMOVE/JUMP design and FSK: instead adding the properties directly into the Instr class. FSK: This change makes Martin happy b/c it gets rid of instanceof's FSK: This change makes Emmett happy b/c now he should be able to FSK: actually extend the Instr class with his own MIPSInstr and make FSK: his code way cleaner. 2000-10-19 C. Scott Ananian * Util/HashEnvironment.java: Argh! typo causes compile failure. always always always compile before check-in! bad scott. * Util/Environment.java, Util/HashEnvironment.java: Clarify that undoToMark ought to be repeatable. * Analysis/Quads/InitializerTransform.java: Reduce calls to by keeping track of which classes have already been initialized on all possible execution paths. (We fudge the 'all possible execution paths' a bit by clearing state when we encounter a PHI, but this conservative estimate is probably good enough.) * IR/Quads/Quad.java: Added Quad.addHandlers() method to make working with quad-with-try form easier. * Analysis/Quads/InitializerTransform.java: Added checks before static references. Missing transformation of dynamic method invocations. * Analysis/Quads/InitializerTransform.java: First, incomplete, implementation of an initializer-transformation pass to solve our -ordering problems. This pass will a) make idempotent (so it can be invoked multiple times without any problems), and b) rewrite initializer code to proactively invoke . whenever it is unsure that a given class has been initialized. The costs of these checks are *only* paid during start-up: once all classes have been initialized, the no-check versions of the methods are used. * Analysis/Quads/InitializerTransform.java: New file. * Analysis/Transformation/MethodSplitter.java: Methodsplitter can now mutate the original (not just the split) version of a method. * IR/Quads/FOOTER.java: Better javadoc. * ClassFile/HFieldMutator.java: Add javadoc. 2000-10-18 C. Scott Ananian * Interpret/Quads/INSystem.java: Fix implementation of System.arraycopy that neglected to throw NullPointerException if either of the array objects passed in as arguments were null. Now SPEC JVM98 _200_check works in the interpreter. * Interpret/Quads/INSystem.java: Fix for SPEC jvm98 benchmark _200_check in the quad interpreter. System.arraycopy was overwriting the destination sometimes. * bin/interpret: Added script to run Quad interpreter with standard FLEX class path. * bin/interpret: New file. * Interpret/Quads/INClass.java: Fix quad interpreter (we were throwing an illegalaccessexception when we shouldn't have been) so that _200_check from the SPEC jvm98 benchmark runs. * Backend/StrongARM/CodeGen.spec: Have I mentioned how much I hate the StrongARM's mixed 'guess where I've returned the floating-point result' calling convention? * Backend/StrongARM/CodeGen.spec: Added missing patterns for % and % . 2000-10-17 witchel * Backend/MIPS/BypassLatchSchedule.java: Put in the hack to not schedule compound instructions (bummer). * Backend/MIPS/CodeGen.spec: fix bug where a lack of newline was hiding a parameter load Add _2f and REM support for specjvm Start some instruction rearrangement to support the yellow pekoe architecture * Backend/MIPS/StackInfo.java: Add more tracing code. 2000-10-17 C. Scott Ananian * IR/Quads/HANDLER.java, IR/Quads/Pattern.java, IR/Quads/Quad.java, IR/Quads/ReHandler.java, IR/Quads/ReProtection.java, IR/Quads/Translate.java: Removed redundant ReProtection and Translate.TransProtection classes and replaced them with a single HANDLER.HashProtSet class. Updated Pattern, ReHandler, and Translate to match, and also replaced as many ReProtection/TransProtection types as I could with HANDLER.ProtectedSet, which is less implementation specific. Tweaked the interface on HANDLER.ProtectedSet a little, which allowed a simplification of the HANDLER-handling code in Quad.cloneone(), too. * IR/Quads/Quad.java: Fix cloning for HANDLER quads. * Analysis/Quads/TypeSwitchRemover.java: Removed import * statement. * Main/Options.java, Main/SAMain.java, IR/Quads/TypeSwitchRemover.java, Analysis/Quads/TypeSwitchRemover.java: Moved TypeSwitchRemover from harpoon.IR.Quads to harpoon.Analysis.Quads. @RENAME: IR/Quads/TypeSwitchRemover Analysis/Quads/TypeSwitchRemover@ * Analysis/Quads/TypeSwitchRemover.java: New file. * Backend/Runtime1/DataInterfaceList.java: Fix bug in array interfaces which I discovered about 1am last night as I was reviewing the code in my head. The array dimensions added to the base interface types need to be incremented each time through the loop. 2000-10-16 C. Scott Ananian * Analysis/Quads/DispatchTreeTransformation.java: First-pass implementation of a transformation from virtual function tables to binary switch method dispatch. This transformation only does the "to TYPESWITCH" part; the backend will have to be smart enough to implement the TYPESWITCH without memory accesses to complete optimization. See "Efficient dynamic dispatch without Virtual Function Tables: The SmallEiffel Compiler" by Zendra, Colnet, and Collin in OOPSLA '97 (pages 125--141). * Analysis/Quads/DispatchTreeTransformation.java: New file. * Support/_200_check-root-set: Added appropriate root set for the _200_check benchmark in SPEC. * Support/_200_check-root-set: New file. * Support/nativecode-makefile.template, Support/precisec-makefile.template: Tweak the makefile templates to speed up build time. (Previously, the object files were added to the archive one at a time, which was very slow (quadratic performance?) when there were many object files.) * IR/Quads/QuadRSSI.java: Add an codeFactory() method to QuadRSSI. * IR/Quads/QuadNoSSA.java, IR/Quads/QuadSSI.java, IR/Quads/QuadWithTry.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java, IR/LowQuad/LowQuadSSI.java: Add a check to the top of the Code.codeFactory() method to make it always safe to chain through if you want to ensure ending up with a Code of a specific type. (Before, if the given code factory exactly matched the desired code factory, the chaining rule would be erroneously invoked.) * Backend/Runtime1/DataInterfaceList.java, Backend/Runtime1/TreeBuilder.java: SPEC's _200_check test showed that we were not handling array inheritance properly for some types. If you have a class A that implements interface B, and a subclass C of A, then both (C instanceof B) *and* (C[] instanceof B[]) ought to be true. We were missing the latter case. A change to TreeBuilder ensures that instanceof checks the interface list in the latter case, and a patch to DataInterfaceList ensures that these interface-array types (like B[] in the example above) are added to the built interface list. * Analysis/Quads/QuadClassHierarchy.java: For proper linkage, we need to always include the component type of an array in the set of known classes. * IR/LowQuad/LowQuadNoSSA.java: Fix an old typecast bug dating back to the introduction of the code.getDerivation() method (and deprecation of Code extending Derivation). * Backend/PreciseC/TreeToC.java: Add pattern for % and % to the TreeToC class. * Analysis/Quads/Unreachable.java, IR/Quads/TypeSwitchRemover.java, Analysis/PointerAnalysis/MAInfo.java: Update harpoon.Analysis.Quads.Unreachable to work correctly for both a) quads in SSx form (where 1-arity phis can't simply be deleted) and b) low-quad form (where derivations need to be updated). Added a new method to Unreachable to enable the derivaton update; updated MAInfo and TypeSwitchRemover to use it. * Main/Options.java: Add 'type-switch-remover' to list of pass names. * Analysis/EventDriven/CloningVisitor.java, Analysis/EventDriven/ContCode.java, Analysis/EventDriven/ContCodeNoSSA.java, Analysis/EventDriven/ContCodeSSI.java, Analysis/EventDriven/AsyncCode.java: Remove unnecessary "import harpoon.Analysis.Quads.Unreachable;" statement. * IR/LowQuad/DerivationChecker.java: Better DerivationChecker doesn't clone the HCode before checking it, which lets us find problems a little bit earlier and easier. * IR/LowQuad/DerivationChecker.java: New file. * IR/LowQuad/DerivationChecker.java: first pass implementation of a simple derivation checker. * Backend/Runtime1/Runtime.java: java.lang.Class.forName() can throw ClassNotFoundException. This error is much harder to debug if the ClassNotFoundException is itself not found. * Support/locale-root-set, Support/volano-root-set: Added two more root set 'cheats' for a) programs which use locale handling, and b) volano. * Support/locale-root-set, Support/volano-root-set: New file. * Analysis/Quads/SCC/SCCAnalysis.java: Make SCCAnalysis an ExactTempMap (which improves precision for call-graph construction and such). 2000-10-13 witchel * Backend/MIPS/CodeGen.spec: Do compound instructions the new way -- single instrs with multi-line assembler code. 2000-10-13 C. Scott Ananian * Support/rmi-root-set, Main/SAMain.java: slight improvements to '-r' option: allow comments (lines starting with #) and blank lines in the root set file. also fix a bug where a local definition of rootSetFilename was hiding the class-scope definition. * Support/rmi-root-set: Added '-r [root set file]' option to Main/SAMain to allow adding additional classes/methods to the root set on the command line. Also checked in sample Support/rmi-root-set file to show how it's done. The file format is one line per class/method, with an 'include [filename]' directive also supported. Methods need to be suffixed with their descriptor in order to resolve overloading. A method which takes a string would be listed as: package.classname.method(Ljava/lang/String;)V * Support/rmi-root-set: New file. * Main/SAMain.java: Added '-r [root set file]' option to Main/SAMain to allow adding additional classes/methods to the root set on the command line. Also checked in sample Support/rmi-root-set file to show how it's done. The file format is one line per class/method, with an 'include [filename]' directive also supported. Methods need to be suffixed with their descriptor in order to resolve overloading. A method which takes a string would be listed as: package.classname.method(Ljava/lang/String;)V 2000-10-12 C. Scott Ananian * Main/SAMain.java: Turn on JumpOptimization. Brian turned it off by accident in a check in long ago. * Main/SAMain.java, IR/Quads/QuadNoSSA.java: Turn on TYPESWITCH, since most passes support it now. * IR/Quads/TypeSwitchRemover.java: Oops -- TypeSwitchRemover would die if you gave it a code *without* a derivation. Fixed now. * IR/Quads/TypeSwitchRemover.java: extended TypeSwitchRemover to properly handle/propagate derivations. * Analysis/Transformation/MethodMutator.java: Removed 'import *' statements. * IR/Quads/Code.java, IR/LowQuad/Code.java: Updated Quads.Code to clone AllocationInformation along with quads. Updated LowQuad.Code to clone Derivation along with quads. 2000-10-11 witchel * Backend/MIPS/CodeGen.spec: Per Felix's suggestion, but more smarts in emit to allow me to use a null when I output an instruction using a floating point register. This is the last version of CodeGen.spec before I rewrite the patterns for longs to fit Felix's register allocator's needs. * Backend/MIPS/BypassLatchSchedule.java: Yes indeed, it generates correct code for the yellow pekoe simulator! * Backend/MIPS/CodeGen.spec: Everyone close your eyes. * Backend/MIPS/RegFileInfo.java: Add the ability to easily exclude certain registers from allocation. I leave the ypekoe registers not allocated, which is sketchy. 2000-10-11 C. Scott Ananian * Analysis/Quads/Unreachable.java: Trivial changes to allow Unreachable to work with LowQuad form, too. * Analysis/Quads/QuadClassHierarchy.java: Extend QuadClassHierarchy to work with TYPESWITCH quads. 2000-10-11 pnkfelix * Backend/StrongARM/InstrBuilder.java: FSK: Made comments in StrongARM.InstrBuilder a little nicer (for FSK: easier text searching of generated code without needing regexps) * Analysis/Instr/GraphColoringRegAlloc.java, Analysis/DataFlow/SpaceHeavyLiveTemps.java: FSK: 1. Made SpaceHeavyLiveTemps actually *use* its cache. What an FSK: _amazing_ performance boost. C:P FSK: 2. Some debugging changes to RegAlloc classes. Tracked down last FSK: of bugs (as far as I can tell) to CodeGen.spec problems. FSK: Thus I christen GCRA as working! 2000-10-10 C. Scott Ananian * IR/Tree/ToTree.java, IR/Quads/QuadVisitor.java, IR/Quads/RSSIToNoSSA.java, IR/Quads/SSIRename.java, IR/Quads/SSIToSSA.java, IR/Quads/TYPESWITCH.java, IR/Quads/ToNoSSA.java, IR/Jasmin/Jasmin.java, Analysis/Quads/SCC/SCCOptimize.java, Analysis/TypeInference/IntraProc.java, Analysis/Quads/SCC/SCCAnalysis.java, Analysis/Quads/DeadCode.java, Analysis/Quads/TypeInfo.java, Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/ToSSA.java: updated extant analysis/optimizations to support TYPESWITCH quad. * IR/Quads/QuadNoSSA.java, IR/Quads/UnHandler.java: Modified UnHandler so that it generates TYPESWITCH quads instead of INSTANCEOF chains to select correct handler. Modified QuadNoSSA so that TypeSwitchRemover is invoked on the result of Unhandler.unhandler() before anything else is allowed to see the quad-no-ssa form. (This is for backwards compatibility.) * IR/Quads/TypeSwitchRemover.java: New file. * IR/Quads/TypeSwitchRemover.java: TypeSwitchRemover extends the MethodMutator abstract class to convert TYPESWITCH quads to (optimized) chains of INSTANCEOF/CJMP tests. This allows backwards compatibility for those analyses which don't know about TYPESWITCHes. * IR/Quads/Print.java: Extend harpoon.IR.Quads.Print to handle TYPESWITCH quads. * IR/Quads/TYPESWITCH.java: Javadoc improvements. 2000-10-06 C. Scott Ananian * Interpret/Quads/Method.java: Extended Quad interpreter to handle TYPESWITCH, as a means of precisely nailing down the intended semantics for the quad. * IR/Quads/TYPESWITCH.java: Clarified semantics of TYPESWITCH w/ respect to null pointers in the discriminant. * Tools/Annotation/Lex/package.html, Tools/Annotation/Main.java, Tools/Annotation/package.html: Added some missing package documentation. * Tools/Annotation/Lex/package.html, Tools/Annotation/package.html: New file. * Analysis/Quads/package.html, Analysis/Tree/package.html: Added some missing package documentation. * Analysis/Quads/package.html, Analysis/Tree/package.html: New file. * Analysis/LowQuad/package.html: Added some missing package documentation. * Analysis/LowQuad/package.html: New file. * IR/Quads/QuadKind.java, IR/Quads/TYPESWITCH.java: Add TYPESWITCH to the Quad IR. This makes it easier to decode exception-handling structures, as well as some other things (optimized method dispatch routines, for example). Currently TYPESWITCH quads are not generated by anything. I will implement a simple code factory to convert TYPESWITCHes back and forth from INSTANCEOF chains, and only then start generating them. * IR/Quads/TYPESWITCH.java: New file. * Analysis/Transformation/MethodMutator.java, Analysis/Transformation/MethodSplitter.java: Made MethodSplitter abstract. Added MethodMutator for use when you only want to mutate a method, not split/specialize it. * Analysis/Transformation/MethodMutator.java: New file. * Analysis/Transformation/MethodSplitter.java: Removed import * statements. * Analysis/Transformation/MethodSplitter.java: Made MethodSplitter demand driven. This has some nice features, and some bad features. The bad features made it unworkable at the moment: if you wait too long to do the HCode mutation, the original HCode could be clear()ed from the cache, which leaves us without anything to perform our mutations upon. Also, this forces the entire MethodSplitter to be Serializable, because we're always deferring all our work. For these reasons, these changes are going into a stub branch and not being incorporated into the mainline revision. But they're here checked in if anyone wants to revive them. * Analysis/Transformation/MethodSplitter.java: Fix a bug in naming split methods: if we allow arbitrary suffixes to the name, then potentially inheritance could break (badly). All methods must be renamed in the same way to prevent this from happening. * IR/Tree/Code.java, IR/Quads/ThreadInliner.java, IR/Bytecode/Code.java, IR/Quads/Code.java, IR/Quads/Quad.java, ClassFile/HCodeAndMaps.java, Analysis/LowQuad/Loop/MyLowQuadSSI.java: Clean up Quad.clone functions by replacing with new clone methods. Quad.cloneMap() (which had a hugely ugly interface) can now be package-private, as it is used in only one place (Quad.Code). Also cleaned up implementation of HCodeAndMaps by adding fields & implementation, avoiding the need to re-implement it a dozen messy times. * IR/Tree/CanonicalTreeCode.java, IR/Tree/Code.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/TreeCode.java, IR/Quads/Code.java, IR/Quads/Quad.java, IR/Quads/QuadNoSSA.java, IR/Quads/QuadRSSI.java, IR/Quads/QuadSSI.java, IR/Quads/QuadWithTry.java, IR/Quads/ReHandler.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java, IR/LowQuad/LowQuadSSI.java, IR/Assem/Code.java, IR/Bytecode/Code.java, ClassFile/HCode.java, ClassFile/HCodeAndMaps.java: Changed return type of HCode.clone() method to HCodeAndMaps, which allows us to export the old-element-to-new-element and old-temp-to-new-temp maps which most cloning-then-mutate operations require. * ClassFile/HCodeAndMaps.java: New file. * Backend/StrongARM/Code.java, Backend/MIPS/Code.java, Backend/Sparc/Code.java, Backend/CSAHack/RegAlloc/Code.java, Analysis/Tree/DeadCodeElimination.java, Analysis/Tree/JumpOptimization.java, Analysis/Tree/Simplification.java, Analysis/Transformation/MethodSplitter.java, Analysis/Quads/MethodInliningCodeFactory.java, Analysis/LowQuad/Loop/MyLowQuadSSI.java, Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/EventDrivenCode.java, Analysis/EnvBuilder/EnvCode.java, Analysis/ToSSA.java: Changed return type of HCode.clone() method to HCodeAndMaps, which allows us to export the old-element-to-new-element and old-temp-to-new-temp maps which most cloning-then-mutate operations require. * Backend/MIPS/.cvsignore: Ignore CodeGen.java (an automatically-generated file). * Backend/MIPS/.cvsignore: New file. * Temp/CloningTempMap.java: Provide a Map view of a (Cloning)TempMap. 2000-10-05 C. Scott Ananian * Analysis/Transformation/package.html: Improved the package documentation a little (very little). * Analysis/Transformation/MethodSplitter.java: MethodSplitter should be complete now. * Analysis/Transformation/MethodSplitter.java, Analysis/Transformation/package.html: New file. * Analysis/Transformation/MethodSplitter.java, Analysis/Transformation/package.html: Started the implementation of the MethodSplitter architecture which is used for method specialization transformations. Also wrote a package.html file for the harpoon.Analysis.Transformation package. 2000-10-04 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Fix a nasty & subtle bug with long integer comparisons. Basically, I copied some code from the StrongARM architecture reference manual without noticing that it was only valid for *unsigned* 64-bit values. For signed values, things are quite a bit more complicated. The current implementation uses 6 instructions (one of which is a branch) for all comparisons except for equality/inequality, which use only 4 instructions (none of which are branches). It may be possible to improve this number -- we'd especially like to remove the branch and its associated pipeline delay. Perhaps the brilliant insight on how to do this will come to one of us one day. In any case, we generate nicer code for these cases than gcc does at the moment. That should be enough to satisfy anyone, right? 2000-10-04 witchel * Backend/MIPS/RegFileInfo.java: Copy some code from StronARM/RegFileInfo because it is now needed. * Analysis/DataFlow/LiveTemps.java: use/def analysis only works on reachable code. If the input instruction is not reachable, assert earlier rather than crashing later. * Backend/MIPS/InstrBuilder.java: Some aesthetic clean up. * Backend/MIPS/BypassLatchSchedule.java: New file. * Backend/MIPS/BypassLatchSchedule.java: Preliminary code to emit code that contains last use information. This information is used by the yellow pekoe assembler and hardware to reuse results from the ALU bypass latches, eliminating register file writes, and using less power. * Backend/MIPS/CodeGen.spec: Correct some use/def information. 2000-10-04 pnkfelix * Analysis/Instr/InstrMOVEproxy.java, Backend/Generic/RegUseDefer.java: FSK: Added code to ignore Temps that are semantically present but FSK: not operationally present. FSK: Am realizing that code should have a method "usedRegs(Instr)" for FSK: this stuff. Will fix later. 2000-10-03 pnkfelix * Backend/MIPS/Code.java, Backend/StrongARM/Code.java, Backend/Generic/Code.java: FSK: Fix targetting Emmett (but good for everyone) FSK: FSK: old specification of getRegisters(i,t) was at the very least FSK: underspecified, and possibly inconsistent. FSK: FSK: expanded requires-clause slightly to reduce badness, and made FSK: MIPS and StrongARM implementations of method more sane as well. 2000-10-02 pnkfelix * Analysis/Instr/RegAlloc.java: FSK: Moved an inner class definition out of a method to make generated FSK: name clearer (for helping Emmett debug code) 2000-09-27 witchel * Backend/MIPS/CodeGen.spec: Add double to long and long to double conversion because jcup needs it. 2000-09-25 witchel * Backend/MIPS/StackInfo.java: This change makes sure the stack is always 8 byte aligned. Wow, that change was easy--yay StackInfo.java. * Backend/MIPS/CodeGen.spec: Runtime returns floats and doubles in fp registers, so we need to get them from there. DATUM needs to be laid out big endian. Always use mul, mult leaves results in hi/lo Change NEG to do what vpekoe-gcc does. This allows my float/double "stress" program to run. Also, my text database parser that uses strings and exceptions also runs correctly. 2000-09-22 pnkfelix * Analysis/DataFlow/LiveTemps.java, Backend/Generic/RegUseDefer.java: FSK: Some changes for Emmett: added a RegUseDefer that does the FSK: Temp -> Register mapping when doing dataflow analysis on Instrs, FSK: and expanded LiveTemps' static methods to allow one to pass in FSK: a UseDefer to the auto-equation-solving 'make' procedure. * Backend/Generic/RegUseDefer.java: New file. 2000-09-18 witchel * Backend/MIPS/CodeGen.spec: 1. Fix long compares. 2. Route long div and long rem to gcc builtins. 3. Revert float and double constants to inline values 4. SHR and USHR were backwards 5. Put in some emit helper functions for cleaner code 6. Add frame pointer (FP) to use set of calls 7. Started an attempt to get line number info into the executable. It is a little hokey and doesn't work With these changes, I am able to generate correct results for all of the arithmetic and printing functions for a very small set of tested long values. 2000-09-12 witchel * Backend/MIPS/CodeGen.spec: Properly implement integer to (byte|short|char) conversion. Make 64 bit arithmetic routines kill more registers because ll_div and ll_rem actually call into C routines. This could be optimized. 2000-09-11 C. Scott Ananian * IR/Tree/UNOP.java, IR/Tree/Uop.java, Tools/PatMat/Lexer.jlex, Tools/PatMat/Parser.cup, IR/Tree/ToTree.java, Backend/PreciseC/TreeToC.java, Backend/StrongARM/CodeGen.spec, Backend/Sparc/CodeGen.spec, Backend/MIPS/CodeGen.spec: Renamed the _2B, _2C, and _2S Tree form Uops (unary operations) to I2B, I2C, and I2S to make it clear that these are only valid when the operand is an integer. Other conversions are synthesized; for example, to convert an long to a byte, you first convert the long to an integer using _2I, and then you convert the integer to a byte using I2B. 2000-09-08 C. Scott Ananian * bin/build-precisec: Made the precisec build script a little more specific in attempting to build an executable. 2000-09-07 C. Scott Ananian * bin/build-arm-hack, bin/build-arm-pnk: Oops --- typo in shell script. * bin/build-arm-hack, bin/build-arm-pnk: Magic all-singing scripts to build ARM executables using both the hacked and PNK-magic register allocators. * bin/build-arm-hack, bin/build-arm-pnk: New file. * bin/build-precisec: Improvements to the build-precisec script. * bin/build-precisec: Tweaks to put status output on stderr instead of stdout and to clean up better after itself. * bin/build-precisec: All singing, all dancing PreciseC build script. * bin/build-precisec: New file. 2000-09-05 salcianu * Analysis/PointerAnalysis/PAEscapeFunc.java: Fixed a bug discovered by Frederic. 2000-08-31 witchel * Backend/MIPS/CodeGen.spec: 1. Change how float and double constants are dealt with. I actually emit a 1: .float x lw dst 1b This might be unnecessary, but I figured Float.floatToIntBits had its own algorithm for representing floats that would be machine indpendent and not necessarily match the mips representation. Is this right? 2. Some stack stores incorrectly list sp as a destination. 3. More damn fallout from the mipspro debacle. What happens when you change .balign to .align? Well, during startup when the runtime is building the hashtable of interned strings, it steps through the string_constant section with a stride of sizeof(string class). Well, we find lots of ZEROs because we aligned to 4 words instead of 4 bytes. Darn. * Backend/MIPS/StackInfo.java: Let a stack object have its layout be determined by a METHOD as well as an INVOCATION. This allows use of the stack object by the parameter loading code, which has access to a METHOD. I think it is kind of ugly the way METHODs and INVOCATIONs are different, and I had to duplicate code for dealing with METHODs because they do funny things like store the exceptional return address as the 0th parameter. I believe the best solution (which would allow us to have a virtual frame pointer (oh, except for exception handling)) to this problem would be to put in psuedo-insts that get fixed up in procFixup. At that point our regular stack object knows enough about the frame layout to be able to make parameter loads stack relative instead of FP relative, which is what they are now. * Backend/MIPS/RegFileInfo.java: Assign two word temporaries big endian, as is customary on MIPS. 2000-08-30 pnkfelix * Analysis/Instr/InstrMOVEproxy.java: FSK: took out @comment for emmett (sorry!) * Analysis/Instr/RegAlloc.java: FSK: reverting back to using LocalRegAlloc as allocation strategy. FSK: (global currently only works on single worded variables) 2000-08-28 pnkfelix * Analysis/Instr/GraphColoringRegAlloc.java: FSK: Still pushing to fix gcra. Have moved from using Temp-based FSK: equivalency classes to Web-based equivalency classes... this FSK: changed the behavior of the system but did not "fix" it. FSK: <> 2000-08-27 pnkfelix * Analysis/Instr/GraphColoringRegAlloc.java: FSK: Working to slowly reinsert the changes that I had made to GCRA FSK: that *don't* break it, to isolate the part that does. * Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/InstrMOVEproxy.java, Analysis/GraphColoring/ColorableGraph.java, Analysis/GraphColoring/OptimisticGraphColorer.java, Analysis/GraphColoring/SparseGraph.java: FSK: Still working to get GCRA working on double/long code, but FSK: changes i make aren't passing regression tests, so I regressed FSK: to the cvs version temporarily to update the code just enough FSK: to satisfy some interface changes and convince myself that FSK: the source of my current bugs are indeed within GCRA. FSK: FSK: 1. Undid previous expansion of spec of FSK: ColorableGraph.setColor(..), instead adding the FSK: "unsetColor(..)" method to the class, which makes the code FSK: needing to use the method cleaner, easier to read, and the FSK: Graph class itself easier to implement (in this case at least) FSK: 2. added implementations of Instr.rename(..) in one extension of FSK: Instr. Its too bad that there's no way to FORCE the FSK: subclasses to reimplement a method for those when there is no FSK: possible way for the given implementation alone to do the FSK: trick. Need to remember to do this for Spill/Restore Proxy FSK: classes FSK: 3. Changed node spill selection strategy in FSK: OptimisticGraphColorer to a method that leads to faster FSK: convergence on a sufficient number of spills (though FSK: it might result in suboptimal spill selection; this is FSK: a deeper topic than I had thought) 2000-08-26 pnkfelix * Analysis/Instr/RegAlloc.java: FSK: Ooops. The "checked" stuff is really pretty LRA specific; FSK: I'll back it out permanently over the weekend... * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/Verify.java, Analysis/BasicBlock.java: FSK: Some fixes made in various places so that I can successfully FSK: compile the VolanoMark code with my Local Register Allocator FSK: (mostly to support the existance of unreachable code in the FSK: Instr ir-form by expanding the spec of getBlock(..) and FSK: adding an extra fixup pass to local-reg-alloc) 2000-08-26 witchel * Backend/MIPS/CodeGen.spec: 1. Get rid of a ton of stack kludges by using stackInfo object. 2. Make CJUMP(test, iftrue, iffalse) actually branch to the iftrue statement if the test is NON-zero! This manifested as a runtime exception taken by the ThreadGroup code when it was trying to add the initial thread to the initial thread group. It tests if(destroyed){... throw ..}, and so destroyed was zero, but my code generator emitted code that then branched to the throw. 3. Emit .flex.static_primitives (note the plural) directive, and backout the .funcptrs section which must have come from working the mipspro assemblers. 4. I eliminated the assingment of emit statements that are not used (and not marked volatile). Is there some subtle principle I am violating by doing this? Hello world doesn't quite run yet, but I have gotten through thread and thread group creation, FileDescriptor and BufferedWriter creation, and am dying somewhere in/after java/lang/System::initializeSystemClass. * Support/NullCodeGen.template: The getStackInfo method is a public CodeGen method, therefore it needs to be listed here. We specify its MIPS nature. * Backend/MIPS/StackInfo.java: New file. * Backend/MIPS/Frame.java, Backend/MIPS/InstrBuilder.java, Backend/MIPS/StackInfo.java: This is the MIPS backend code for a stack frame abstraction. The InstrBuilter was modified to take a Frame object since the stackinfo oject needs it. 2000-08-25 pnkfelix * Analysis/GraphColoring/UnboundedGraphColorer.java: FSK: Oops. Off by one error in the color finding strategy. FSK: Volano compiles now Scott. C:P * Backend/Generic/RegFileInfo.java, Analysis/GraphColoring/AbstractGraph.java, Analysis/GraphColoring/OptimisticGraphColorer.java, Analysis/Instr/GraphColoringRegAlloc.java, Analysis/DataFlow/CachingLiveTemps.java, Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/SpaceHeavyLiveTemps.java: FSK: GCRA now runs to completion on a, umm, more thorough data-set (IE FSK: one that actually uses long/double vars, which had presented FSK: itself as a bug in my system a few days ago). However, my FSK: testcase runs into what seems to be an infinite loop when FSK: actually executed. C:P More debugging for me it seems. FSK: FSK: I've replaced my usage of CachingLiveTemps with FSK: SpaceHeavyLiveTemps, which, as the name implies, sacrifices FSK: space-efficiency to achieve reasonable time performance on large FSK: methods. A number of other changes have been made to the system FSK: as well, though most consist of debugging/monitor code I've FSK: inserted to try to get long/double support working... FSK: FSK: a few documentation updates were sprinkled in as well... * Analysis/DataFlow/SpaceHeavyLiveTemps.java: New file. * Analysis/BasicBlock.java: FSK: GCRA now runs to completion on a, umm, more thorough data-set (IE FSK: one that actually uses long/double vars, which had presented FSK: itself as a bug in my system a few days ago). However, my FSK: testcase runs into what seems to be an infinite loop when FSK: actually executed. C:P More debugging for me it seems. FSK: FSK: I've replaced my usage of CachingLiveTemps with FSK: SpaceHeavyLiveTemps, which, as the name implies, sacrifices FSK: space-efficiency to achieve reasonable time performance on large FSK: methods. A number of other changes have been made to the system FSK: as well, though most consist of debugging/monitor code I've FSK: inserted to try to get long/double support working... FSK: FSK: a few documentation updates were sprinkled in as well... 2000-08-24 C. Scott Ananian * Main/SAMain.java: Use new more precise call graph implementation. * Analysis/Quads/CallGraphImpl2.java: New file. * Analysis/Quads/CallGraphImpl2.java: New, more precise call graph implementation. Only works on SSx form. @SPLIT: CallGraphImpl.java CallGraphImpl2.java@ * Analysis/Maps/ExactTypeMap.java: An ExactTypeMap can tell you if a temp is *exactly* the reported type, or if instead it could be a subtype of the reported type. This makes (for example) call graphs more accurate. * Analysis/Maps/ExactTypeMap.java: New file. * Main/SAMain.java: Changed Analysis.Quads.CallGraph to Analysis.CallGraph in accordance with recent refactoring. Nulled out callGraph when it's no longer necessary for slightly better memory management. Changed System.exit(-1) to System.exit(1) to conform with standard Unix exit values (hint: the exit code is unsigned). * Backend/Runtime1/Runtime.java: Factored CallGraph interface into Analysis.CallGraph and Analysis.Quads.CallGraph to separate out the IR-dependent parts of the interface. (Also, parts of the Analysis.Quads.CallGraph interface are broken.) * Analysis/Quads/TypeInfo.java: Improvements to TypeInfo so that it implements ExactTypeMap. * Backend/PreciseC/Frame.java, Backend/Sparc/Frame.java, Backend/StrongARM/Frame.java, Analysis/Quads/CallGraph.java, Backend/Analysis/InitializerOrdering.java, Backend/MIPS/Frame.java, Analysis/CallGraph.java: Factored CallGraph interface into Analysis.CallGraph and Analysis.Quads.CallGraph to separate out the IR-dependent parts of the interface. (Also, parts of the Analysis.Quads.CallGraph interface are broken.) * Analysis/CallGraph.java: New file. 2000-08-23 C. Scott Ananian * Tools/Annotation/Lexer.java, Tools/Annotation/Main.java, Tools/Annotation/Lex/Lexer.java: Changes so that the Annotation tool exits with a non-zero exit status if parsing errors occur during the processing of a java source file. 2000-08-23 pnkfelix * Main/SAMain.java, Backend/Analysis/BasicGCInfo.java, Backend/StrongARM/RegFileInfo.java, Analysis/GraphColoring/OptimisticGraphColorer.java, Analysis/GraphColoring/UnableToColorGraph.java, Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/InstrMOVEproxy.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java: FSK: GCRA now works on Hello World and has derivation support, but FSK: dies on non-trivial programs involving longs/doubles. FSK: FSK: CachingLiveTemps: increased cache size so that GCRA would speed FSK: up. Am starting to wonder whether LiveTemps should simply FSK: keep all the data alive (instead of recomputing on the FSK: fly...) FSK: FSK: OptimisticGraphColorer: changing interface for NodeSelector (to FSK: allow for differentiation between Hiding and Spilling), FSK: and mucked with code significantly to debug GCRA FSK: FSK: UnableToColorGraph: Added a backup spill field; this may be FSK: removed though since it doesn't seem to solve the FSK: problem and really just complicates things. On the other FSK: hand, having multiple levels of spill-suggestions may FSK: not be a bad thing to have in the interface... FSK: FSK: GraphColoringRegAlloc: Significant changes, incorporating FSK: Derivation support and Reg-related Move Coalescing. FSK: Right now am using Chaitin's over-aggressive coalescing FSK: strategy, b/c it was dirt-simple to implement. Will FSK: replace later if needed. GCRA still needs a lot of FSK: rework (for both speed and correctness)... C:P FSK: FSK: LocalCffRegAlloc: Moved InstrMOVEproxy to its own class, and FSK: accidentally checked in some stupid code that was a FSK: result of multiple reworkings of InstrMOVEproxy while FSK: it was in its own class. FSK: FSK: RegAlloc: cleaned up names a bit to make it clearer what the FSK: default is... FSK: FSK: BasicGCInfo: Oops. whitespace and assertion-split changes that FSK: didn't need to be checked in; but they don't hurt anything FSK: and the new stacktrace makes my life slightly easier... FSK: FSK: RegFileInfo: Made the set of suggestions for two word temps FSK: larger (by suggesting (Odd,Even) pairs as well as FSK: (Even,Odd) pairs) in an attempt to make GCRA go through FSK: for complex examples. Sadly, this hack did not work. FSK: May be better to take it out (Briggs' paper says that FSK: introducing flexibility in suggestions can cause FSK: degradation in assignments, suprisingly enough) FSK: FSK: SAMain: Changed '-L' option from doing a live-variable-analysis FSK: test to making it force a Local-RegAlloc, to ease FSK: the coming transition to Global-RegAlloc as the default. FSK: (This change was made in the early evening when I thought FSK: I was finished. Hah.) FSK: * Analysis/Instr/InstrMOVEproxy.java: New file. * Analysis/DataFlow/CachingLiveTemps.java: FSK: GCRA now works on Hello World and has derivation support, but FSK: dies on non-trivial programs involving longs/doubles. FSK: FSK: CachingLiveTemps: increased cache size so that GCRA would speed FSK: up. Am starting to wonder whether LiveTemps should simply FSK: keep all the data alive (instead of recomputing on the FSK: fly...) FSK: FSK: OptimisticGraphColorer: changing interface for NodeSelector (to FSK: allow for differentiation between Hiding and Spilling), FSK: and mucked with code significantly to debug GCRA FSK: FSK: UnableToColorGraph: Added a backup spill field; this may be FSK: removed though since it doesn't seem to solve the FSK: problem and really just complicates things. On the other FSK: hand, having multiple levels of spill-suggestions may FSK: not be a bad thing to have in the interface... FSK: FSK: GraphColoringRegAlloc: Significant changes, incorporating FSK: Derivation support and Reg-related Move Coalescing. FSK: Right now am using Chaitin's over-aggressive coalescing FSK: strategy, b/c it was dirt-simple to implement. Will FSK: replace later if needed. GCRA still needs a lot of FSK: rework (for both speed and correctness)... C:P FSK: FSK: LocalCffRegAlloc: Moved InstrMOVEproxy to its own class, and FSK: accidentally checked in some stupid code that was a FSK: result of multiple reworkings of InstrMOVEproxy while FSK: it was in its own class. FSK: FSK: RegAlloc: cleaned up names a bit to make it clearer what the FSK: default is... FSK: FSK: BasicGCInfo: Oops. whitespace and assertion-split changes that FSK: didn't need to be checked in; but they don't hurt anything FSK: and the new stacktrace makes my life slightly easier... FSK: FSK: RegFileInfo: Made the set of suggestions for two word temps FSK: larger (by suggesting (Odd,Even) pairs as well as FSK: (Even,Odd) pairs) in an attempt to make GCRA go through FSK: for complex examples. Sadly, this hack did not work. FSK: May be better to take it out (Briggs' paper says that FSK: introducing flexibility in suggestions can cause FSK: degradation in assignments, suprisingly enough) FSK: FSK: SAMain: Changed '-L' option from doing a live-variable-analysis FSK: test to making it force a Local-RegAlloc, to ease FSK: the coming transition to Global-RegAlloc as the default. FSK: (This change was made in the early evening when I thought FSK: I was finished. Hah.) FSK: 2000-08-22 pnkfelix * Analysis/Instr/GraphColoringRegAlloc.java, Analysis/BasicBlock.java: FSK: 1. Added an assert to BasicBlock (and a requires clause to FSK: accompany the assert) FSK: 2. Move coalescing works with GCRA. The analysis for Reg-related FSK: Moves even works, but the accompanying transformation manages FSK: to eat its own tail currently (quite literally). I have come FSK: up with a workaround and documented it in the comments; I will FSK: implement it tomorrow. 2000-08-21 pnkfelix * Analysis/Instr/EqTempSets.java, Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/HTempMap.java, Analysis/Instr/LocalCffRegAlloc.java: FSK: 1. EqTempSets now implements Temp.TempMap, making it incredibly FSK: easy to apply (where applicable C:P ) FSK: 2. Moved HTempMap out of LocalCffRegAlloc and into its own FSK: class (though it is only package-visible, not public) b/c FSK: it was useful for GCRA. FSK: 3. Implemented Chaitin's aggressive move-coalescing strategy. FSK: Seems to result in minimal extra temp spillage for our FSK: system. However, (To/From)Register-Moves are not coalesced yet, FSK: and precise-gc support is not incorporated yet, so GCRA still FSK: isn't the default allocator. * Analysis/Instr/HTempMap.java: New file. * Analysis/Instr/GraphColoringRegAlloc.java: FSK: fixed simple bug with strange consequences: infinite recursion FSK: was making java die without any error messages. * Analysis/Instr/GraphColoringRegAlloc.java: FSK: Throwing away idea of individual register ranges because it is FSK: creating bugs that i can't track down and i've come to the FSK: conclusion that it isn't actually necessary for move coalescing FSK: to split a register up into its seperate ranges. 2000-08-15 witchel * Backend/MIPS/CodeGen.spec: An improved MIPS backend that is still not ready for hello world. Improvements include: 1. Spiffier way of laying out instructions in procFixup. It makes changing prolog/eplilog code much easier. 2. We were pushing args on the stack in the wrong order (+=4 on strong arm is -=4 on mips stack layout), correct that. 3. Restore as well as save callee-saved registers :) 4. Correct calling convention for exception dispatch. 5. MEM(NAME(id)) = i loads a value, not a pointer. 6. Enable .stabs, but disable .stabd. 2000-08-15 bdemsky * Main/SAMain.java: Interfaces can have methods with code... Namely the class initializer. 2000-08-15 pnkfelix * Analysis/Instr/GraphColoringRegAlloc.java, Analysis/GraphColoring/OptimisticGraphColorer.java, Analysis/ReachingDefsAltImpl.java: FSK: ReachingDefsAltImpl: At Karen's suggestion, had rdefs return an FSK: empty set rather than { root } when no reaching defs can be found FSK: FSK: OptimisticGraphColorer, GraphColoringRegAlloc: Still trying FSK: to track down why system seems to infinite-spill on FSK: sun.io.CharToByteISO8859_1 if reg-live-ranges are given FSK: individual nodes. I suspect there's something wrong with my FSK: method of building the interference graph in this case, but FSK: unfortunately have only seen the bug on classes that FSK: are impossible to analyze by hand. C:P 2000-08-14 pnkfelix * Analysis/GraphColoring/OptimisticGraphColorer.java, Analysis/ReachingDefsAltImpl.java, Backend/Generic/RegFileInfo.java, Analysis/Instr/GraphColoringRegAlloc.java: FSK: GraphColoringRegAlloc: FSK: 1. Began work on Move Coalescing alterations FSK: 2. Experimenting with making Nodes in Graph corresponding to FSK: live ranges for physical registers (needed for coalescing FSK: of temps to registers)... there's a subtle bug somewhere FSK: though so I'm making it conditional (defaulting to off) FSK: FSK: RegFileInfo: FSK: Added requires clause to specification. FSK: FSK: OptimisticGraphColorer: FSK: Decreased the size of set of suggested nodes to remove FSK; with two independent changes (unsuggesting colorable FSK: nodes, and continuing coloring attempts after FSK: encountering an uncolorable node) FSK: FSK: ReachingDefsAltImpl: FSK: The spec for ReachingDefs really doesn't say what happens FSK: for queries on temps that are used with no corresponding FSK: definition. Technically, I think the old assertion failure FSK: was better, but that would subsequently force us to either FSK: (1) not perform rdefs-queries on physical registers, or (2) FSK: to modify the CodeGenerator to ensure that there is a def FSK: for the uses of physical registers. FSK: FSK: Choice 1 is no longer acceptable (due to need to find live FSK: ranges for physical registers) and Choice 2 is too much work FSK: for me to justify right now (i thought a quick CodeGen hack FSK: would do, but there are declare(t) issues). FSK: FSK: So instead I changed the behavior of ReachingDefsAltImpl to FSK: return the set { root(hcode) }, (since a use without a def FSK: implies that this temp is defined by code outside of the FSK: method, such as a passed parameter). FSK: FSK: This is guaranteed not to break any existing programs, since FSK: the former behavior for such a query would result in an FSK: assertion failure. However, this behavior is *NOT* part of FSK: the spec for ReachingDefs in general (ie, "Here Be Tygers" ) FSK: FSK: Also, note that root(hcode) probably does not have FSK: Derivation information for the temp in question. This is FSK: likely to bite us later. Look into changing CodeGen in FSK: future. 2000-08-14 C. Scott Ananian * Analysis/Tree/JumpOptimization.java: Better (more accurate) assertion. Old assertion would fail in cases where there were infinite loops. 2000-08-14 pnkfelix * Analysis/Instr/GraphColoringRegAlloc.java, Backend/StrongARM/RegFileInfo.java: FSK: RegFileInfo: changed code setting up callee/caller saved regsets FSK: to be slightly more consistent with respect to FSK: notation of system registers FSK: FSK: GraphColoringRegAlloc: Switched from an AdjMtx backed by a FSK: BitString to one backed by a FSK: HashSet (inspired by Lal George + FSK: Andrew Appel reg-alloc paper) 2000-08-11 witchel * Backend/MIPS/CodeGen.spec: The generated code doesn't quite work, but I am overdue for a commit. 2000-08-09 pnkfelix * Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java: FSK: Implemented Derivation support in GCRA. FSK: precisebuild can compile "Hi, world", but gcc dies when trying to FSK: assemble the produced code. Oh, wait- (quick check) ... this FSK: actually happens with LRA too, so I'm guessing this is Karen's FSK: problem. FSK: FSK: Still haven't switched RegAlloc to use GCRA by default, FSK: because move-coalescing isn't implemented yet. Am looking into FSK: that next. FSK: FSK: Also, migrated "BackedInstrs" functionality from LocalCffRegAlloc FSK: to RegAlloc, allowing for reuse in GCRA. Need to document what FSK: "BackedInstrs" functionality is better though. C:P * Analysis/Instr/GraphColoringRegAlloc.java, Analysis/ReachingDefsAltImpl.java: FSK: Global Register Allocation now runs to completion on Hello FSK: World and produces a working executable! C:) C:) C:) FSK: FSK: And I *think* that the workaround I incorporated to deal with FSK: merging reachingDefs and liveness analyses actually sped FSK: execution up (or at least, the corrected analysis produces FSK: data that takes less time for the rest of the allocator to FSK: process). Spillage seems to be relatively minor, apart from FSK: one of the sun character conversion classes (I think Scott's FSK: has problems with this class as well though, so it could just FSK: be part of its intrinsic nature) FSK: FSK: Next up: develop a smarter spilling system (the hooks are in FSK: there, its just a matter of reading the papers to figure out FSK: how to do it. FSK: FSK: ReachingDefsAltImpl: FSK: Added check-for-null assert to ReachingDefsAltImpl FSK: GraphColoringRegAlloc: FSK: Added a bit more feedback during allocation, and fixed FSK: web conflict routine. * Backend/StrongARM/Code.java, Backend/MIPS/Code.java, Backend/Sparc/Code.java, Backend/Generic/Code.java, Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/RegAlloc.java: FSK: Further work on Graph Coloring Reg Alloc. Discovered serious FSK: arithmetic error in the Adjacency Matrix impl. that was causing FSK: somewhat non-deterministic buginess in the allocation; that'll FSK: teach me to optimize too early! FSK: FSK: Implemented spilling code. Seems to work in most cases, except FSK: on one of the sun.io.* classes where the interference graph FSK: just keeps getting bigger and bigger as I spill. I suspect FSK: this may be a result of overly-coarse information from FSK: Live Variable Analysis routine; am debating whether to FSK: begin work on a replacement for current LVA implementation... FSK: Will most likely hold off on such a project until after I've FSK: collected profiling info with OptimizeIT or whatever. FSK: FSK: Also changed interface for Generic.Code (decided that FSK: getRegisters(..) should always return a List rather than FSK: a Collection, in order to preserve type safety of various FSK: reg-alloc components. 2000-08-02 pnkfelix * Analysis/GraphColoring/OptimisticGraphColorer.java, Analysis/Instr/GraphColoringRegAlloc.java: FSK: Added some additional assertions in an attempt to track down FSK: the source of the segfault. In the process, I uncovered a FSK: serious oversight in my handling of precolored nodes in the FSK: GraphColorer classes: precolored nodes should never be hidden FSK: (or at least not before their neighbors are hidden) because FSK: if they're hidden then they won't be present to force their FSK: neighbors to choose a different color. OptimisticGraphColorer FSK: has been fixed in this regard; SimpleGraphColorer will be FSK: fixed after I get GCRA working. * Analysis/GraphColoring/OptimisticGraphColorer.java, Analysis/Instr/GraphColoringRegAlloc.java: FSK: Finished revamping of GCRA for mulit-reg support. Flex currently FSK: produces non-working executables with GCRA. Will first fix that, FSK: then incorporate move coalescing, and then revisit multi-reg FSK: support (current impl. is somewhat hackish and poorly defined). * Analysis/Instr/GraphColoringRegAlloc.java: FSK: Finished applying first round of changes to GCRA. Currently FSK: can run test cases that I was able to run earlier. Will next FSK: incorporate support for implied colorings. 2000-08-01 pnkfelix * Analysis/Instr/GraphColoringRegAlloc.java: FSK: More updates for multi-word support. * Analysis/Instr/GraphColoringRegAlloc.java, Backend/StrongARM/RegFileInfo.java, Analysis/GraphColoring/ColorableGraph.java, Analysis/GraphColoring/OptimisticGraphColorer.java, Analysis/GraphColoring/SimpleGraphColorer.java: FSK: 1. Changed semantics of ColorableGraph slightly, adding the FSK: possibilty of failure to the setColor method (this is FSK: in preparation for my idea for how to handle multi-worded FSK: temps in generic fashion). FSK: 2. Rewrote GraphColoringRegAlloc to reflect changing approach FSK: 3. Rewrote *GraphColorer to support changes ColorableGraph FSK: 4. Moved around some code in StrongARM.RegFileInfo, deleted FSK: useless comment by self. 2000-07-29 pnkfelix * Backend/StrongARM/Code.java, Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/GraphColoring/OptimisticGraphColorer.java, Analysis/DataFlow/CachingLiveTemps.java, Analysis/DataFlow/LiveTemps.java: FSK: LiveTemps: Removed direct Caching support from implementation, and FSK: instead made certain fields protected to allow for the FSK: caching extension CachingLiveTemps. FSK: FSK: CachingLiveTemps: LiveTemps with a much more sophisticated cache FSK: than what was in LiveTemps (instead of only FSK: caching the last BB referenced, this one FSK: caches the last twenty. Also monitors its own FSK: caching performance for the time-being. Cache FSK: size is built-in for the time being; still FSK: experimenting with what the right size is... FSK: FSK: OptimisticGraphColorer: Parameterized 2nd node removal strategy. FSK: FSK: GraphColoringRegAlloc: Further work on improving performance FSK: and supporting doubles. Realized that FSK: there was a bug in the design for my FSK: planned approach; came up with a different FSK: less clean one that should work but its FSK: only on paper, not in the code yet. FSK: FSK: RegAlloc: Added some debugging assertion messages and made the FSK: code to choose between {Local, GraphColoring}RegAlloc FSK: a little cleaner. FSK: FSK: Code: Added a debugging assertion. FSK: * Analysis/DataFlow/CachingLiveTemps.java: New file. 2000-07-28 pnkfelix * Analysis/GraphColoring/GraphColorer.java, Analysis/GraphColoring/OptimisticGraphColorer.java, Analysis/GraphColoring/SimpleGraphColorer.java, Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/RegAlloc.java: FSK: Added a new class, OptimisticGraphColorer, which expands FSK: upon the strategy used by the SimpleGraphColorer but also FSK: applies a non-conservative node-removal strategy if the FSK: Simple strategy isn't enough. FSK: Also continued work on GraphColoringRegAlloc. We still don't FSK: spill. But i did revise the Adj. Matrix representation to FSK: be a BitString instead of a HashSet of IntPairs. (the hard FSK: part was working out the correct mathematics of calculating the FSK: correct offset). * Analysis/GraphColoring/OptimisticGraphColorer.java: New file. * Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/GraphColoring/SimpleGraphColorer.java: FSK: Graph Coloring Register Allocation is now at a state where FSK: I can perform spill-free allocation on strongarm code! C:) FSK: FSK: SimpleGraphColorer: Took out System.out.println warning when FSK: a node is precolored FSK: FSK: RegAlloc: Added code to use GraphColoring (but left it commented FSK: out for now since we can't use it on all code yet) FSK: FSK: GraphColoringRegAlloc: FSK: 1. Fixed interference graph building again (was FSK: overconservative before; still needs some review). To FSK: do this, I needed to incorporate a live variable FSK: analysis, which may slow things down too much... need FSK: to review. Also the current live variable analysis FSK: is too coarse; it needs to track liveness of a FSK: particular *definition* of a Temp, not just a Temp FSK: itself. The change isn't too hard to make (its FSK: similar to what I did in ReachingDefsAltImpl) but its FSK: not a top priority since this only becomes a major FSK: issue (I think) for allocating non-SSI'd code. FSK: 2. Took out code which was overcounting the number of FSK: colors available... the range of colors is not all FSK: registers referenced by Instrs; only the union of FSK: registers suggested by RFI. (GraphColorer was FSK: assigning a crapload of Temps to `fp') * Analysis/Instr/GraphBuilder.java: FSK: Removed *way* obsolete class that was getting in the way of FSK: my tab-completion of GraphColoringRegAlloc. C;) 2000-07-27 pnkfelix * Backend/Generic/Code.java: FSK: Code.java: Added note to self to fix interface for register assignment FSK: to allow more flexibility to the register allocator, along with FSK: current ideas on how to go about doing it cleanly. * Analysis/BasicBlock.java, Analysis/DataFlow/LiveTemps.java, Analysis/ReachingDefsAltImpl.java: FSK: BasicBlock: added an additional BasicBlock.Factory ctor for the FSK: common case of CFGrapher.DEFAULT FSK: FSK: ReachingDefsAltImpl: Took out an obsolete comment FSK: FSK: LiveTemps: added an additional construction routine (not ctor) that FSK: makes a LiveTemps and finds the fixed point solution automagically. FSK: Note that using this method can lead to less efficiency since often FSK: when one needs a LiveTemps, one already has a BasicBlock.Factory FSK: that can be passed in and therefore save the routine the trouble of FSK: constructing a new temporary one. FSK: * Analysis/Instr/GraphColoringRegAlloc.java: FSK: GraphColoringRegAlloc: Getting even closer to having this working... FSK: 1. Figured out the right way to build the interference graph (i think) FSK: While doing this, I uncovered a very real deficiency (i think) FSK: in the design for reg assignment framework. see comments in FSK: Generic.Code... FSK: 2. Readded support for precolored nodes (I had it in and working last FSK: night but then I went through that horror with Runtime.java and, FSK: in the process of debugging, erased the necessary change FSK: * Analysis/GraphColoring/SimpleGraphColorer.java, Analysis/GraphColoring/SparseGraph.java, Analysis/GraphColoring/UnboundedGraphColorer.java: FSK: SimpleGraphColorer: Readded a precolored node check. May cause FSK: problems (I don't know if this heuristic is guaranteed to work FSK: with precolored nodes, though it seems that it should...) FSK: FSK: UnboundedGraphColorer: Fixed color search algorithm to properly reset FSK: graph between searchs. FSK: FSK: SparseGraph: Fixed SparseGraph to properly implement spec of FSK: ColorableGraph (and not kill everything when the check for FSK: precolored nodes runs) FSK: * Analysis/Instr/GraphColoringRegAlloc.java: FSK: silly me, doing subtraction where i meant to do intersection. FSK: this cleans up the interference graph remarkably... * Analysis/Instr/GraphColoringRegAlloc.java: FSK: Fixed a bug where if a Temp was def'd but never used, a FSK: web wouldn't be created for it and it wouldn't be assigned FSK: a register. * IR/Assem/Code.java: FSK: Revised handling of Instr -> Assembly conversion slightly; FSK: Got rid of a printNoAssem() method and replaced it by FSK: exposing the protected method myPrint(..) and documenting FSK: how subclasses can override the default print(PrintWriter) FSK: method to get the behavior needed to extract debugging FSK: information. * Analysis/GraphColoring/AbstractGraph.java, Analysis/GraphColoring/ColorableGraphImpl.java, Analysis/GraphColoring/GraphColorer.java, Analysis/GraphColoring/GraphImpl.java, Analysis/GraphColoring/SimpleGraphColorer.java, Analysis/GraphColoring/SparseGraph.java, Analysis/GraphColoring/UnboundedGraphColorer.java: FSK: 1. Removed a *lot* of dead code from various classes, either FSK: as a result of retracting support for *Impl classes or FSK: because of a code shift up to the AbstractGraph class. FSK: 2. Made AbstractGraph.edges() repeat nodes when returning edges, FSK: allowing for a more accurate Collection rep for MultiGraphs FSK: and Graphs with self-loops. 2000-07-26 pnkfelix * Analysis/Instr/GraphColoringRegAlloc.java, Analysis/GraphColoring/ColorableGraph.java, Analysis/GraphColoring/SimpleGraphColorer.java, Analysis/GraphColoring/UnableToColorGraph.java: FSK: GraphColoringRegAlloc: Hacked enough to do simple spill-less, FSK: precolor-less allocation! Allocation isn't correct yet (since a FSK: register can actually be colored with a different register's color) FSK: but it terminates! FSK: FSK: ColorableGraph: FSK: 1. Deleted resetGraph() method, which was just spec'd as a wrapper FSK: around two other iterface methods and was therefore a waste. FSK: 2. Revised specification of resetColors() to incorporate knowledge FSK: of precolored regi^H^H^H^Hnodes. FSK: FSK: UnableToColorGraph: Added 'spillSuggs' field and getRemovalSuggestions() FSK: method to allow for GraphColorer to pass a "hint" back to the client FSK: to assist in making the graph colorable. (Deja vu from RegFileInfo, FSK: except SpillException will soon be going away since it doesn't work FSK: outside of Local Allocation). By default this hint is no hint at all FSK: (tough luck for the client). FSK: FSK: SimpleGraphColorer: code cleanup. FSK: 2000-07-25 pnkfelix * Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/GraphColoring/UncolorableGraphException.java: FSK: FSK: GraphColoringRegAlloc: revisions to algorithm... FSK: further adapted to Register Assignment, FSK: more traces of ICAN ugliness removed (yay OO). FSK: FSK: RegAlloc: FSK: 1. added new method of producing codeFactorys from RegAlloc... now FSK: the allocation strategy is paramterized! C:) FSK: 2. commented out debugging assert and added a useful one. FSK: FSK: LocalCffRegAlloc: updated to accomodate RegAlloc Factory method FSK: of producing code factories. FSK: * Analysis/GraphColoring/AbstractGraph.java, Analysis/GraphColoring/ColorableGraph.java, Analysis/GraphColoring/Graph.java, Analysis/GraphColoring/GraphColorer.java, Analysis/GraphColoring/SimpleGraphColorer.java, Analysis/GraphColoring/UnableToColorGraph.java, Analysis/GraphColoring/UnboundedGraphColorer.java, Analysis/GraphColoring/UncolorableGraphException.java: @RENAME: UncolorableGraphException UnableToColorGraph @ FSK: ColorableGraph: Fix to class overview so that javadoc is linked FSK: correctly FSK: FSK: Graph: Specification update FSK: FSK: UnableToColorGraph: changed to extend Throwable instead of Exception FSK: since its more a way of expressing an alternate control flow than FSK: an actual Exception in the program execution. FSK: FSK: AbstractGraph: Skeletal implementation of Graph interface * Analysis/GraphColoring/AbstractGraph.java, Analysis/GraphColoring/UnableToColorGraph.java: New file. 2000-07-24 pnkfelix * GNUmakefile: FSK: Whoops, i promised Scott that i wouldn't check in that FSK: change to the Makefile, and look what I did. C:P FSK: Sorry scott. But at least I took it out before you FSK: caught me (i hope)... * IR/Tree/Code.java, Backend/Generic/RegFileInfo.java: FSK: You know, its always the last few changes you make while FSK: reading over the output of "cvs diff" that bite you FSK: in the ass. FSK: And is it just me, or shouldn't inner classes declared FSK: as "protected" be accessible to subclasses of the outer FSK: class? Whatever... * Interpret/Tree/DefaultFrame.java, IR/Tree/Code.java, IR/Tree/TEMP.java, Backend/StrongARM/RegFileInfo.java, IR/Assem/Instr.java, Backend/Sparc/RegFileInfo.java, Backend/MIPS/RegFileInfo.java, Backend/PreciseC/Frame.java, Backend/Generic/Code.java, Backend/Generic/CodeGen.java, Backend/Generic/MaxMunchCG.java, Backend/Generic/RegFileInfo.java, Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, GNUmakefile: FSK: Generic.Code: FSK: 1. Abstracted getRegisters() method (a long overdue shift) FSK: FSK: Generic.CodeGen: FSK: 1. Removed getDerivation() method, which really didn't make any FSK: sense as part of the top-level interface. Luckily, existing FSK: dependencies on this method are pointing directly to MaxMunchCG, FSK: so this was a safe thing to remove. FSK: FSK: Generic.RegFileInfo: FSK: 1. Commented out callerSave(), calleeSave(), and regTempFactory(). FSK: These don't belong in this interface (at least I don't think FSK: they do) and they weren't being used. They will be removed FSK: when I revise RegFileInfo later this week. FSK: 2. Made isRegister(Temp) abstract - it was previously using FSK: regTempFactory() for its implementation, but that's not the FSK: the right way to do it, because it forces subclasses to expose FSK: regTempFactory() at at least a protected level when the focus FSK: belongs on the isRegister(..) method itself. FSK: 3. Made allocator() a private method... it too will be removed (or FSK: migrated to a subclass of RegFileInfo, perhaps... but at this FSK: point its functionality hasn't been thought through nearly FSK: enough to justify its inclusion. FSK: FSK: InterfaceMethodMap: FSK: 1. Switched from GraphColorer to UnboundedGraphColorer, in FSK: accordance with interface change in Analysis.GraphColoring. FSK: 2. Reindented some Javadoc. FSK: FSK: Instr: FSK: 1. Clarification of confusing specification FSK: FSK: LocalCffRegAlloc: FSK: 1. Made a lot of crazy, *ugly* changes to support an alternative, FSK: simpler implementation of RegFileInfo that doesn't require the FSK: RegToTemp map argument. Will soon completely shift away FSK: from the Iterator based suggestRegAssignment(..), and then FSK: take needless methods out of RegFileInfo. Plus the shift should make FSK: the code here *significantly* cleaner. FSK: 2. Added a few falsed-out debugging messages for new strategy. * Backend/Analysis/InterfaceMethodMap.java, Analysis/GraphColoring/ColorableGraph.java, Analysis/GraphColoring/GraphColorer.java, Analysis/GraphColoring/SimpleGraphColorer.java, Analysis/GraphColoring/SparseGraph.java, Analysis/GraphColoring/UnboundedGraphColorer.java: FSK: ColorableGraph: FSK: 1. cleaned up overly wordy Javadoc FSK: 2. added a subexception, AlreadyColoredException FSK: 3. adding extra case to spec of setColor(..) FSK: FSK: GraphColorer: FSK: 1. Added Class overview FSK: 2. Moved Unbounded coloring methods to an extension, UnboundedGraphColorer FSK: (simplifies the interface tremendously) FSK: 3. Reformatted indentation of Javadoc FSK: FSK: SimpleGraphColorer: FSK: 1. changed coloring method to support ColorableGraph interface FSK: (ColorableGraphImpl will eventually be made private to the Graph) FSK: FSK: SparseGraph: FSK: 1. Made SparseGraph implement ColorableGraph FSK: (involved adding some new methods and changing the behavior of some FSK: olds ones slightly) FSK: FSK: GraphColoringRegAlloc: FSK: 1. Removed more traces of Muchnick FSK: 2. Made simplistic rep for Lower Adj Matrix class - should readapt to FSK: use a BitString directly (threw out the idea of using a FSK: BitStringSet - the need for a backing universe makes it useless here) * Analysis/GraphColoring/UnboundedGraphColorer.java: New file. * Backend/StrongARM/RegFileInfo.java: FSK: made fix to javadoc and implementation of maxRegIndex() for FSK: Karen. Current impl. is overconservative... need to review FSK: later to see if we should bring maxIndex down to 11 instead of FSK: 16. 2000-07-24 C. Scott Ananian * Backend/Runtime1/Runtime.java: Fall-back to JDK1.1 method of java.util.Properties instead of the spiffy JDK1.2-and-up method that we were using. 2000-07-21 pnkfelix * Backend/Analysis/InterfaceMethodMap.java, Analysis/ReachingDefsAltImpl.java: FSK: 1. Took out a println statement in ReachingDefsAltImpl (oops) FSK: 2. Added a toString for the Colors in InterfaceMethodMap * Analysis/GraphColoring/SparseGraph.java, Analysis/GraphColoring/SparseNode.java: FSK: Implemented remainder of ColorableGraph interface FSK: in SparseGraph. Had to expose a field of SparseNode FSK: to the package to make it reasonably efficient (D'oh). FSK: Even made sure that it didn't break the compiler this time! C:P * Analysis/GraphColoring/GraphColorer.java, Analysis/GraphColoring/SparseGraph.java: FSK: I'm an idiot. FSK: I checked in code that broke the compiler, all because I overrode FSK: methods (unnecessarily) and replaced them with empty FSK: implementations. D'oh! FSK: Here's the fix, along with a touch of javadoc. 2000-07-21 C. Scott Ananian * Support/EventDriven.jar, Support/EventDriven1.jar, Support/EventDriven1T.jar, Support/NewThread.jar, Support/collections.jar, Support/ref.jar, Support/sunthunk.jar, Support/thunk2.jar, GNUmakefile: Remove non-public bits from CVS archive. You can: cd ~/Harpoon/Code cvs -d :ext:lm.lcs.mit.edu:/home/cananian/Harpoon/CVSROOT checkout SupportNP to get them back. 2000-07-21 pnkfelix * Backend/Generic/RegFileInfo.java: FSK: Interface documentation update to RegFileInfo FSK: (efficient execution of certain modules may require the FSK: assignment-sets to be mutable) * Analysis/ReachingDefsAltImpl.java, Analysis/ReachingDefsCachingImpl.java: FSK: 1. Reversed order of lookup in ReachingDefs[Alt|Caching]Impl, FSK: since we always have to do the traversal through the FSK: Block, but *don't* always have to do the lookup, so the FSK: Block traversal should come first and the lookup is FSK: conditional on the traversal results. FSK: 2. Made ReachingDefsCachingImpl an extension of FSK: ReachingDefsAltImpl instead of ReachingDefsImpl... perhaps FSK: we should throw out ReachingDefsImpl soon... FSK: 3. Made the cache in the ReachingDefsCachingImpl actually FSK: use the cache when applicable (oops). FSK: FSK: Karen, you may want to giving the caching impl another chance. I FSK: did some cache performance monitoring during local regalloc and FSK: found that the caching impl wasn't useful for me (due to how FSK: local regalloc is executed, reachingDefs(..) tends to only be FSK: called when its going to have a cache-miss anyway). But it may FSK: still speed up your analysis, at least on large BBs. * Analysis/DataFlow/LiveTemps.java: FSK: Added smallish efficiency/readability update to LiveTemps, FSK: as well as some caching-behavior System.out.println's * Analysis/Instr/GraphColoringRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/Verify.java: FSK: 1. Properly implemented makeWebs() in GraphColoringRegAlloc. FSK: 2. Made timing code updates in LocalCffRegAlloc FSK: 3. Made a code readability update in Verify (backing out a FSK: StringBuffer enhancement made earlier; who cares if Verify is FSK: slow, its off anyway) * Analysis/GraphColoring/ColorableGraphImpl.java, Analysis/GraphColoring/GraphImpl.java, Analysis/GraphColoring/SparseGraph.java: FSK: 1. Made some documentation updates to Graph, ColorableGraphImpl, FSK: and GraphImpl, plus some slight interface updates. FSK: 2. Made SparseGraph implement ColorableGraph, at least enough FSK: to compile; not all the methods are implemented yet though. 2000-07-21 C. Scott Ananian * Main/Sizer.java: Whoops. In the heat of the POPL deadline, C-Scott checked in code with import * statements. Bad C-Scott. No biscuit. * GNUmakefile: Protect access to Sun's source code. 2000-07-20 pnkfelix * Main/SAMain.java, IR/Tree/ToTree.java, IR/LowQuad/LowQuadSSI.java, IR/Quads/ToNoSSA.java, Backend/CSAHack/RegAlloc/DerivationGenerator.java, Backend/Generic/MaxMunchCG.java, Analysis/AllocationInformationMap.java, Analysis/DefaultAllocationInformation.java, Analysis/MetaMethods/MetaCallGraphImpl.java: FSK: 1. Made one of the messages in SAMain a little less cryptic FSK: (during a series of these builds sometimes the stub classes FSK: get left in; at least now SAMain will try to TELL you what FSK: to do). FSK: 2. Various changes to make Flex compile with the javac in FSK: jdk1.3 FSK: A.) Copied an import declaration in various places. Scott FSK: knows the rules for this better than I and argues that FSK: jikes has got it right and javac has it wrong in these FSK: places, but I see it this way: with these import statements, FSK: it's easier for the *programmer* to track down where the FSK: inner class in question was originally defined, which I FSK: see as a feature that's totally independent of jikes/javac FSK: B.) Switched a static field to non-static (its in a FSK: non-static-inner-class). This shouldn't break things, though FSK: it might make it a touch more inefficient... * Analysis/PointerAnalysis/SyncElimination.java: FSK: javac doesn't like people using variables without initializing FSK: them first... * Analysis/GraphColoring/ColorableGraph.java, Analysis/GraphColoring/DirectedGraph.java, Analysis/GraphColoring/Graph.java, Analysis/GraphColoring/GraphColorer.java, Analysis/GraphColoring/GraphImpl.java, Analysis/GraphColoring/SimpleGraphColorer.java, Analysis/GraphColoring/SparseGraph.java: FSK: 1. Moved some methods out of Graph and into DirectedGraph FSK: interface. Hopefully this will resolve some issues I FSK: was having in the design of these classes. FSK: 2. Moved ColorableGraph to ColorableGraphImpl in last commit, FSK: which forced renaming on things that were using FSK: ColorableGraph. They will be rewritten to use the Colorable FSK: graph interface, but for now a direct renaming gets things FSK: off the ground. * Analysis/GraphColoring/DirectedGraph.java: New file. * Analysis/GraphColoring/ColorableGraphImpl.java: @RENAME: ColorableGraph ColorableGraphImpl @ FSK: More reworking; my thoughts on Register Allocation have led FSK: me to conclude that a simple linked list rep for the graph FSK: will work but probably won't be efficient enough due to FSK: an excessively large number of edges in the interference FSK: graph. Have thought of alternative rep but need more flexibility FSK: in Graph Coloring system. * Analysis/GraphColoring/ColorableGraphImpl.java: New file. * Analysis/GraphColoring/Graph.java: FSK: Further modifications to the Graph interface... FSK: wondering if its right to force Edges to be Lists, when clearly FSK: in the case of an undirected graph the Edge [n1,n2] should FSK: be regarded as the same as [n2,n1]... FSK: at this point, i'm suffering from analysis FSK: paralysis and so I will put this pet project aside and FSK: resume working on register allocation. * Analysis/GraphColoring/ColorableGraph.java, Analysis/GraphColoring/Graph.java: FSK: 1. Switched ColorableGraph's parent to by GraphImpl instead of FSK: Graph. ColorableGraph seems to be the only subclass of FSK: the Graph class hierarchy at this point, amazingly... FSK: 2. Made generic Graph interface. In some ways this belongs in FSK: harpoon.Util.Collections, but I want to get the kinks out FSK: out it first... make sure that its acutally useful. * Analysis/GraphColoring/GraphImpl.java: @RENAME: Graph.java GraphImpl.java@ FSK: Begun musing about the Graph abstraction and adding more FSK: flexibility to my GraphColoring system (in preperation for FSK: using it with my Register Allocator)... in the process discovered FSK: that the current implementation has not been updated for our FSK: move to Collections support. FSK: I am trying to migrate it over slowly. renamed root of Graph FSK: class hierarchy to GraphImpl; will next check in changes to FSK: subclasses and my new Graph interface which will be fully FSK: generic (no more constructing Node objects; I've decided that FSK: that is a waste and there are cleaner ways to get the same FSK: effect). FSK: Amazing how much my approach has changed since I wrote this FSK: code (and yet how much has stayed the same, unfortunately). * Analysis/GraphColoring/GraphImpl.java: New file. * Analysis/Instr/GraphColoringRegAlloc.java: FSK: Copied remainder of relevant algorithms from Muchnick, and FSK: Java-ized the types and notation used. Hasn't been completely FSK: Flex-ized yet though... 2000-07-19 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java: FSK: Whoops, my last commit put in the doRD (do-reaching-defs) flag, FSK: which was just a temporary thing to isolate reaching defs from FSK: the timing for the rest of reg-alloc. Took it out. * Analysis/Instr/EqTempSets.java, Analysis/Instr/LocalCffRegAlloc.java, Backend/StrongARM/Code.java, Analysis/BasicBlock.java: FSK: 1. Documention clarification to BasicBlock overview FSK: 2. More string manipulation speedups. I swear, I'm stopping now, FSK: I don't know what came over me. 2000-07-18 pnkfelix * Backend/StrongARM/Code.java, Backend/StrongARM/CodeGen.spec, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/RegFile.java, Analysis/BasicBlock.java, Analysis/ReachingDefsAltImpl.java: FSK: 1. Revised much code to be more efficient with regard to FSK; assertion messages. FSK: 2. Turned off display of Timing information in RegAlloc * Analysis/Instr/GraphColoringRegAlloc.java: FSK: Added the beginning of a GraphColoring Register Allocator that FSK: I plan to use with my framework. Right now its just copied FSK: straight out of Muchnick as ICAN notation... will hopefully FSK: be usuable in next few days. * Analysis/Instr/GraphColoringRegAlloc.java: New file. * Util/Collections/BitSetFactory.java, Util/Collections/Factories.java, Util/Collections/LinearSet.java: FSK: 1. After rereading the specificatin for java.util.Set, FSK: I realized that an assertion failure on attempting to FSK: add elements not in the universe for a given set was FSK: NOT the correct behavior. Nor is the correct behavior FSK: to throw UnsupportedOperationException (which would have FSK: been my next guess). I'm starting to think that the FSK: Collections API was designed better than I have been FSK: giving it credit for... FSK: 2. Changed the Factories.linearSetFactory to be slightly FSK: smarter about its manner of constructing a LinearSet from a FSK: generic Collection FSK: 3. Changed LinearSet.addAll(Collection) method to use FSK: an auxilliary HashSet for the intermediate computation FSK: in order to make its worse case behavior O(n) rather than FSK: O(n^2). No, people shouldn't be calling addAll(..) on a FSK: LinearSet anyway, but just in case... 2000-07-18 bdemsky * Test/PA/servers.jar: removing this 2000-07-18 pnkfelix * IR/Assem/Code.java, IR/Assem/Instr.java: FSK: More StringBuffer construction updates FSK: Note to self that new StringBuffer("") is rarely a better FSK: construction than new StringBuffer()... the former starts with 0 FSK: initial capacity while the later starts with an initial capacity FSK: of 16 characters. FSK: Yes, this *is* a silly thing for me to be concerning myself FSK: (and you) with. Sorry. * Analysis/BasicBlock.java, Analysis/Instr/EqTempSets.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java: FSK: 1. Some simple StrinBuffer construction improvements (pass the FSK: estimated size along, so that we don't waste time expanding FSK: it, which according to one of Karen's profiles was taking up FSK: 13% of compilation time! No, I don't know which StringBuffer FSK: constructions were taking up the bulk of that, but why not FSK: properly implement Buffer construction everywhere?) FSK: 2. Some code reorganization in LocalCffRegAlloc to assist my FSK: Timing output, and removal of redundant parameter passing. FSK: 3. Documentation updates to RegAlloc. Have become uncertain of FSK: whether TIME should be a global flag (rather that localized FSK: to each RegAlloc extension)... but whatever, its an easy FSK: enough thing to switch around... 2000-07-18 C. Scott Ananian * IR/Quads/Quad.java: Reverted martin's commit, which was just useless (and efficiency-draining) debugging code. 'cvs diff' is your friend... 2000-07-18 kkz * Backend/Runtime1/DataGC.java, Backend/Analysis/BasicGCInfo.java: Continuing work on precise GC for the StrongARM backend. Checking this in so Felix can get my changes before he runs some benchmarks. 2000-07-17 rinard * Main/PAMain.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/SyncElimination.java, IR/Quads/Quad.java: Bug fixes and updates to pointer analysis 2000-07-16 C. Scott Ananian * Main/Sizer.java: New file. * Main/Sizer.java: Quick utility to count the number of bytecode and quad instructions in the set of actually-used methods of a given benchmark. For paper statistics. * Backend/PreciseC/TreeToC.java: Suppress preprocessor #line directives within emitted macros. * IR/Tree/TreeGrapher.java: Reorganize the new TreeGrapher a bit to consolidate the Labeler and Edger classes. Slight efficiency improvement. Hopefully more readable? * IR/Tree/TreeGrapher.java: Rewrote TreeGrapher, because the old version had a bug I didn't feel like tracking down. New version is a lot cleaner and simpler. Probably more efficient, too, as it uses just two depth-first passes through the tree. * IR/Tree/Code.java: Document that getElementsI() of IR/Tree/Code.java returns the items in the Tree in depth-first pre-order. Also improve efficiency by getting rid of the 'visited' Set -- trees are acyclic. Also, move 'aux' stack to class scope from the next() method to reduce the number of objects created. * IR/Properties/CFGrapher.java: Add default implementation of CFGrapher.edgeC() (using predC() and succC() ) so that we don't have to keep re-implementing it. * Main/PAMain.java: Checked in a fix to PAMain which sets HACKED_REG_ALLOC to true before invoking SAMain.do_it(). This accomplishes the same thing as Martin's commit which we just reverted, without breaking Felix's regalloc and the precise C backend. * Main/SAMain.java: Reverted martin's change which set the default value of HACKED_REG_ALLOC to true. This breaks both Felix's regalloc and my precise-c backend. * Backend/Runtime1/NiftyAllocationStrategy.java: Bad c-scott: I checked in code that doesn't compile (missing import statement). =( Fixed now... * Backend/Runtime1/NiftyAllocationStrategy.java: Add an assertion that a thread object can't be thread allocated with heap on *another* heap. Actually, this is technically quite possible, but the interface doesn't (shouldn't) allow it right now. 2000-07-15 bdemsky * Analysis/PointerAnalysis/MAInfo.java: Fixed Martins newest bug... * Analysis/PointerAnalysis/MAInfo.java: Oops...Isn't there some quote about many bugs being due to cut & paste... * Analysis/PointerAnalysis/MAInfo.java: Bugs Fixed: 1) Incorrect handling of methods to be inlined with >1 return or >1 throw quad. New behavior adds appropriate PHI functions. 2) Incorrect handling of methods with <1 return or throw quad. New behavior prunes unreachable parts of HCodes. 2000-07-15 C. Scott Ananian * IR/Quads/SSIRename.java: Add an assertion to check for unreachable code, which causes us to create a PHI with a null incoming edge. Note that the DEBUG flag prevents costly toString() and StringBuffer() operations from occuring when we're not debugging, keeping the cost of this assertion low. * Util/Collections/Factories.java: Made static *Factories serializable. * IR/Quads/Code.java: Added extra assertions to more quickly detect and flag bogus quad graphs. The quad iterator just looked at nextEdge, which meant that prevEdge==null could escape detection. No longer! * IR/Quads/Quad.java: Went through and did a code review of IR.Quads.Quad. Added some javadoc to places missing it, removed two deprecated methods which weren't being used anywhere in FLEX anymore, and replaced the /*final*/ tags with real 'final's. Which will probably break some javac builds, but I don't have a big problem with that right now. =) 2000-07-15 pnkfelix * Util/Collections/CollectionFactory.java, Util/Collections/Factories.java, Util/Collections/ListFactory.java, Util/Collections/SetFactory.java: FSK: 1. Added overrides for makeX(int initCapacity) where appropriate FSK: for the given Collection type X (ie, ArrayLists have FSK: capacities, LinkedLists do not) FSK: 2. Took out some stupid "final" modifiers that were keeping above FSK: overrides from taking effect. 2000-07-15 jwhaley * Analysis/PointerAnalysis/InstrumentSyncOps.java: Add support for sync instrumentation based on intrathread analysis. 2000-07-15 pnkfelix * Util/Collections/CollectionFactory.java, Util/Collections/Factories.java, Util/Collections/LinearSet.java, Util/Collections/ListFactory.java, Util/Collections/SetFactory.java: FSK: 1. Fixed clone() method in LinearSet so that LinearSets that FSK: are backed by Lists other than instances of ArrayList can FSK: still be cloned FSK: clone() may now be slightly slower than before, but not enough FSK: for us to notice. If anyone sees a noticeable difference, I'll FSK: change the implementation to set lf to null when ArrayList is FSK: used, and thus revert to a variation of the old clone() FSK: FSK: 2. Added implementations of makeCollection(initialCapacity) FSK: family of methods... will soon update Factories with FSK: overriding implementations that do "the right thing" FSK: 3. Added treeSetFactory and linearSetFactory to Factories 2000-07-15 jwhaley * Main/PAMain.java: Fix a bug in Martin's code, and add support for sync elimination based on intrathread analysis. * Analysis/PointerAnalysis/SyncElimination.java: Add support for sync elimination based on intrathread analysis. 2000-07-15 rinard * Main/PAMain.java, Main/SAMain.java: Hacked PAMain.java so that sync elimination pass would include ma_maps info in final generated code. I'm not sure why SAMain.java is getting checked in, but it looks like it is... 2000-07-14 pnkfelix * Util/Collections/ListWrapper.java: FSK: Forgot to add this in last checkin. * Util/Collections/ListWrapper.java: New file. * Backend/StrongARM/RegFileInfo.java, Util/Collections/BitSetFactory.java, Util/Collections/CollectionWrapper.java, Analysis/Instr/LocalCffRegAlloc.java, Backend/Generic/RegFileInfo.java, Analysis/ReachingDefs.java, Analysis/ReachingDefsAltImpl.java, Analysis/ReachingDefsImpl.java: FSK: 1. Made fixes to ReachingDefsAltImpl, which (according to my FSK: runs) HALVES the compile time for Hello World! Considering FSK: how slow I know my code is, I think that's quite an impressive FSK: speedup (which means I'm really just waiting for someone else FSK: to show me that my measurements are severely off) FSK: 2. Begun revising RegFileInfo slightly in light of a revelation FSK: I had that passing the "current state of register file" to FSK: suggestRegAssignment doesn't make any sense outside of FSK: Local Allocation, and is unnecessary even there. Which means FSK: that it was a rather silly design. But, that's what redesign FSK: is all about, right? FSK: 3. Moved TIME field up to ReachingDefs.java (was this right? do FSK: I care? It made my life easier for 30 seconds...) FSK: 4. Made BitSetFactory be a bit more informative when signally an FSK: error on produced Sets' add(Object). FSK: 5. Made CollectionWrapper's backing collection protected instead FSK: of private to ease implementation of ListWrapper (which I FSK: guess I should put in, eh?) * Util/Collections/SetWrapper.java: FSK: 1. ReachingDefsAltImpl is an experimental reimplementation of FSK: Karen's reaching definintions analysis that uses Really Long FSK: Bit Vectors instead of mapping each Temp to a seperate Bit FSK: Vector. Am hoping that this will yield better execution times FSK: due to better usage of BitStrings objects. FSK: 2. SetWrapper is analogous to CollectionWrapper, except its for FSK: Set objects. (Was going to be used for ReachingDefsAltImpl, FSK: but realized that producing a Projection of a Set wasn't FSK: as simple as just overriding the iterator(), and besides, we FSK: didn't really want a full Projection of the Really Long Bit FSK: Vector anyway. * Util/Collections/SetWrapper.java: New file. * Analysis/ReachingDefsAltImpl.java: FSK: 1. ReachingDefsAltImpl is an experimental reimplementation of FSK: Karen's reaching definintions analysis that uses Really Long FSK: Bit Vectors instead of mapping each Temp to a seperate Bit FSK: Vector. Am hoping that this will yield better execution times FSK: due to better usage of BitStrings objects. FSK: 2. SetWrapper is analogous to CollectionWrapper, except its for FSK: Set objects. (Was going to be used for ReachingDefsAltImpl, FSK: but realized that producing a Projection of a Set wasn't FSK: as simple as just overriding the iterator(), and besides, we FSK: didn't really want a full Projection of the Really Long Bit FSK: Vector anyway. * Analysis/ReachingDefsAltImpl.java: New file. 2000-07-14 C. Scott Ananian * Backend/Runtime1/TreeBuilder.java: TreeBuilder._call_FNI_Monitor is now consistent with StubCode in its use of FNI_DeleteLocalRefsUpTo (instead of FNI_DeleteLocalRef, which it used before). Be careful if you ever change FNI_NewLocalRef to return anything other than the former top-of-stack pointer, though, because _call_FNI_Monitor still does things slightly differently than StubCode. * Backend/PreciseC/TreeToC.java: Hack to get PreciseC to co-operate nicely with JNI: when we're setting up the LocalRefs stack in the StubCode (getting ready to call into the JNI), we "know" that the calls to FNI_NewLocalRef/etc are *not* gc-points, so we can omit the object push/pop sequence. As a handy by-product, this means that FNI_NewLocalRef won't screw up our object stack behind our back. 2000-07-14 jwhaley * Analysis/Quads/CollectSyncStats.java: Changed SecurityManager to be more liberal. 2000-07-14 pnkfelix * Analysis/DataFlow/Solver.java, Analysis/Instr/EqTempSets.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/BasicBlock.java, Analysis/ReachingDefsImpl.java: FSK: 1. Implemented preorder and postorder traversals of BasicBlocks, FSK: and tested their usage out with ReachingDefs and LiveTemps. FSK: ReachingDefs iterations seems to have been cutdown FSK: significantly. LiveTemps not as much, but still there's some FSK: speedup. FSK: 2. Changed the way timing information for ReachingDefs and FSK: DataFlow.Solver was being displayed... now instead of printing FSK: out the number of repeated visits, we just count up the visits FSK: and print it out along with the total number of blocks. It FSK: makes the measurement deltas slightly less exciting but is FSK: worth the reduction in code strangeness. FSK: 3. Disabled verification in Local Reg Alloc to see how it FSK: affected the timing results. It seems to me that the majority FSK: of the time for Verification is spent in rebuilding the FSK: BasicBlocks and in doing Live Variable Analysis again; perhaps FSK: these are hotspots to optimize further? FSK: 4. Switched underlying rep for disjoint sets (EqTempSets) in FSK: local reg alloc; had thought some time ago that there was no FSK: appreciable difference between the two reps (which should have FSK: told me that something was wrong right there), but the numbers FSK: I'm getting now imply that there is a difference, but it was FSK: being (and to some degree is probably still being) FSK: over-shadowed by the excess overhead elsewhere in the code. FSK: FSK: I am not confident that preorder traversal code is entirely FSK: correct; I was using John Whaley's original implementation of FSK: reverse postorder traversal as a template but am now thinking FSK: that trying to maintain code written in a style so radically FSK: different from my own is a recipe for disaster... need to at FSK: least construct a simple test procedure with non-trivial FSK: control-flow and verify that the Iterators returned do the FSK: traversals that they're supposed to.) FSK: FSK: I am unhappy with my now-ancient mutations of Whaley's original FSK: Solver class. The DataFlow package is unpalatable to anyone FSK: outside of the DataFlow package itself, which is exactly what we FSK: DON'T want... what's the point of developing a generic dataflow FSK: analysis library if no one can/will use it? Would like to FSK: rethink the interfaces there (why exists BasicBlockVisitor?), but FSK: now's not the time for that... 2000-07-13 pnkfelix * Analysis/BasicBlock.java, Analysis/ReachingDefsImpl.java: FSK: 1. Implemented some rough benchmarking code in ReachingDefsImpl FSK: to truly see how inefficient our BB traversals are. FSK: 2. Added a postorderBlocksIter() to BasicBlock.Factory. A FSK; preorderBlocksIter will follow soon. Check the papers on your FSK: respective dataflow analysis to see which you should be FSK: using (potentially reversed) FSK: 3. Changed ReachingDefsImpl to use a reverse post-order traversal FSK: (instead of its prior random traversal) when solving FSK: fixed point equations. 2000-07-13 C. Scott Ananian * bin/cvsblame.pl: Implement support for @REVERT@ tags in cvsblame.pl script, to avoid losing line history information on a bad check-in. 2000-07-13 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/ReachingDefsCachingImpl.java, Analysis/ReachingDefsImpl.java: FSK: 1. Added a ReachingDefs extension that caches results for FSK: the current basic block. Unfortunately, use of the cache FSK: resulted in only a .5% speedup as far as I could tell. FSK: (the main overhead in ReachingDefs might be in the analysis FSK: done during construction time, not in individual queries...) FSK: 2. Added additional timing println's to the RegAlloc classes FSK: 3. Toyed a little with making DataFlow.ReachingDefs more FSK: palatable for popular usage, but decided that it probably FSK: wouldn't be worth it. * Analysis/ReachingDefsCachingImpl.java: New file. 2000-07-13 C. Scott Ananian * Backend/PreciseC/IdentifyNoHandler.java: New file. * Backend/PreciseC/IdentifyNoHandler.java, Backend/PreciseC/TreeToC.java: Optimize GLOBAL_SETJMP method-call implementation by identifying cases where an exception handlers does not need to be registered. Also, workaround missing feature in older versions of gcc which keeps us from adding segment attributes to static local variables. * Test/PA/Test6/EscapeTest.java, Test/PA/Str2StrMap.java: Expand import * statements. * Util/Collections/CollectionFactory.java, Util/Collections/ListFactory.java, Util/Collections/MapFactory.java: Made methods final which can have no other reasonable implementation. This helps enforce the contract of the abstract class. * Util/Collections/AbstractHeap.java, Util/Default.java: collections hacks to support JDK1.1: Integer and String don't implement Comparable in JDK1.1, so we use Default.comparator instead of casting to Comparable directly. * IR/Tree/Stm.java: Use improved divide-and-conquer algorithm for Stm.toStm. The new code uses the same number of SEQ objects as before (n-1 SEQs for an n-Stm List) but the depth of the generated tree is now (lg n) instead of (n). This translates to drastically reduced stack space when recursively traversing the Tree. * Backend/PreciseC/TreeToC.java: bugfix to precisec backend: last object pushed should be first object popped. * Util/ReverseIterator.java: javadoc fixes to Util.ReverseIterator. * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Place.java, Util/Collections/Factories.java, Util/Collections/GenericInvertibleMap.java, Util/Collections/GenericMultiMap.java: Make most factories in harpoon.Util.Collections.Factories anonymous singleton objects accessed via public static final fields instead of methods-returning-a-new-object. This cuts down on needless factory object creation -- one factory object suffices. Updates to scattered other classes to transform method calls to the simple new field accesses. 2000-07-13 jwhaley * Main/PAMain.java, Main/SAMain.java: Add support to call SAMain from PAMain. This involved removing the protected keywords from the static fields in SAMain. This Main stuff is all pretty hacky and should be changed. Sorry, no ^M's this time... 2000-07-13 C. Scott Ananian * Main/PAMain.java: Reapplied jwhaley's changes, minus the extraneous ^M characters. From original log message: : Changes to PAMain to support dumping instrumenting sync ops : and outputting Java bytecode. * Main/PAMain.java: Reverted jwhaley's changes, which scribbled ^M end-of-line markers all over the file. @REVERT: PAMain.java 1.1.2.68@ * Analysis/PointerAnalysis/InstrumentSyncOps.java: fix bug in Quad.addEdge() usage. Multiple edges from a given quad can lead to the same edge, and in fact they often do, especially for CALLs. * Analysis/PointerAnalysis/InstrumentSyncOps.java: Fix end-of-line characters. No more ^Ms. * IR/Quads/Quad.java: Reverted jwhaley's changes, which scribbed ^M end-of-line markers all over the file. @REVERT: Quad.java 1.1.2.32@ 2000-07-13 pnkfelix * Util/Collections/BitSetFactory.java: FSK: in the interest of going along with "don't pay for what FSK: you don't use", I reorganized BitSetFactory so that the FSK: potentially expensive universe construction is done FSK: lazily. * Backend/StrongARM/AccelRFInfo.java, Util/Collections/BitSetFactory.java: FSK: 1. Fixed bug in BitSetFactory (a full BitStringSet doesn't FSK: necessarily have a BitString with all of its bits set, b/c FSK: the BitString's capacity usually is larger than the size of FSK: the universe) FSK: 2. Finished implementing AccelRFInfo, and initial runs FSK: show... nothing good. Oh well; just goes to show that FSK: when they made that maxim about programmers not knowing where FSK: to optimize, they were talking to me. I'll probably take FSK: AccelRFInfo out of the repository by the end of the week. * Analysis/Instr/LocalCffRegAlloc.java, Analysis/BasicBlock.java, Analysis/ReachingDefsImpl.java: FSK: Amazingly, there were still bugs in my code. <> FSK: (Mostly related to problems with doing queries on a modified FSK: Instr code... maybe the decision to make Instr form a mutable FSK: IR (unlike all the other IRs...) was not worth the resulting FSK: bugs I've been dealing with; c'est la vie) FSK: With these new changes, I can now run Karen's precisegc analysis FSK: on every class up until java.util.Hashtable$EntrySet, where FSK: we get an OutOfMemoryException. I haven't verified that FSK: we can still complete compilation WITHOUT her analysis FSK: (I'm hoping the memory leak is a problem in her code, but there's FSK: no guarantee of that yet...) 2000-07-13 jwhaley * Support/ref.jar, Test/PA/Test6/EscapeTest.java: Changes to PAMain to support dumping instrumenting sync ops and outputting Java bytecode. Added java.lang.ref.* classes from Java 1.2 in a .jar file. * Support/ref.jar, Test/PA/Test6/EscapeTest.java: New file. * IR/Quads/Quad.java, Main/PAMain.java, Analysis/PointerAnalysis/InstrumentSyncOps.java, Analysis/Quads/CollectSyncStats.java: Changes to PAMain to support dumping instrumenting sync ops and outputting Java bytecode. Added java.lang.ref.* classes from Java 1.2 in a .jar file. * Analysis/PointerAnalysis/InstrumentSyncOps.java, Analysis/Quads/CollectSyncStats.java: New file. * GNUmakefile: Changes to PAMain to support dumping instrumenting sync ops and outputting Java bytecode. Added java.lang.ref.* classes from Java 1.2 in a .jar file. 2000-07-12 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java: FSK: Ugh. My bug fix wasn't complete enough. This hopefully will FSK; be the last one for this nasty * Analysis/Instr/LocalCffRegAlloc.java: FSK: Commented out debugging messages * Analysis/Instr/LocalCffRegAlloc.java: FSK: ah, hubris. the bug that i mentioned in my last commit message FSK: was in fact my own. but its gone now. * Analysis/Instr/LocalCffRegAlloc.java: FSK: added enough hacks to register allocation class that we seem FSK: to be able to propagate derivation information with move FSK: coalescing enabled. I say "seems" because the compiler is FSK: still dying, but now I don't think its my fault (getting FSK: TypeNotKnownException for an instruction that clearly defines the FSK: temp that the query is being made for). * Analysis/Instr/LocalCffRegAlloc.java: FSK: Continued hacking efforts to properly support Derivation FSK: information for move-coalesced instrs, and made the FSK: COALESCE_MOVES flag actually make a difference when FSK: turned off so that Karen can continue her work on FSK: precise-gc independently of me. 2000-07-12 kkz * Backend/Runtime1/DataGC.java: Fixed two silly typecast bugs. 2000-07-12 C. Scott Ananian * Backend/PreciseC/PGCNiftyAllocationStrategy.java, Backend/PreciseC/package.html: Improved javadoc for PGCNiftyAllocationStrategy; added package.html file for Backend.PreciseC. * Backend/PreciseC/package.html: New file. * IR/LowQuad/PCALL.java: Forgot tag in javadoc. * Backend/StrongARM/TwoWordTemp.java: Make second constructor of TwoWordTemp public so that it can be used from within Backend.MIPS package (instead of forcing us to copy the implementation as Backend.MIPS.TwoWordTemp). * Backend/MIPS/package.html: New file. * Backend/MIPS/Code.java, Backend/MIPS/CodeGen.spec, Backend/MIPS/Frame.java, Backend/MIPS/InstrBuilder.java, Backend/MIPS/RegFileInfo.java, Backend/MIPS/TempBuilder.java, Backend/MIPS/TempVisitor.java, Backend/MIPS/TwoWordTemp.java, Backend/MIPS/package.html: Reduced code duplication by changing TempBuilder and TempVisitor to trivial subclasses of the same code in harpoon.Backend.StrongARM, and by using harpoon.Backend.StrongARM.TwoWordTemp instead of creating our own harpoon.Backend.MIPS.TwoWordTemp. Removed MIPS.TwoWordTemp. Added package.html file describing the Backend.MIPS package. Updated documentation in a few places to refer to MIPS instead of StrongARM. 2000-07-11 C. Scott Ananian * Backend/PreciseC/PGCNiftyAllocationStrategy.java: New file. * Backend/PreciseC/Frame.java, Backend/PreciseC/PGCNiftyAllocationStrategy.java: The frame for the precisec backend now takes care of altering the nifty allocation strategy slightly to call alloca directly instead of NSTK_alloc when doing a stack allocation. We do this via the magic of subclassing: PGCNiftyAllocationStrategy is a very simply subclass of harpoon.Backend.Runtime1.NiftyAllocationStrategy. * Backend/PreciseC/TreeToC.java: Add support for emitting symbol aliases, removing the last barrier to compiling all the precise-c output with -O9. (Previously gcc would get grumpy about data symbols in the code segment; the last commit fixed this but caused method aliases --- which are only used for the various varieties of clone() method --- to point at the wrong places. This all works now.) Add better support for "exactly prototyped" symbols: again, gcc gets grumpy if certain internally-inlined functions (such as memset, alloca) aren't declared exactly the way gcc expects them to be. Further, it won't inline them unless they're referenced directly; i.e. not through a function pointer dereference. We now do better with this when it matters. * Temp/LabelList.java: Remove silly implementation of LabelList.toList which took O(n^2) time for even a simple iteration through the returned List's elements. The new 5-line implementation takes O(n ln n) time; this can be brought down to O(n) time, but I don't think it's worth it. * Backend/PreciseC/TreeToC.java: GCC is picky about data in code segment, so emit inline data tables in the .flex.code.rw segment. * Backend/PreciseC/TreeToC.java: Add support for PUSH/POPing live objects at invocation sites to support precise garbage collection. * IR/LowQuad/PCALL.java, IR/Tree/CALL.java: Previous CALL semantics clarification was incorrect: usedef does the "wrong thing" unless CALLs *always* defined *both* of their defs -- either defining the retval and undefing the retex, or vice-versa. Otherwise we have to know which outward edge is taken to know which of the two variables is defined and killed, which complicates analysis unnecessarily. We always generated "safe" code that conforms with this expectation; just update the javadoc to reflect and codify it. 2000-07-11 pnkfelix * Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/RegFile.java, Analysis/Instr/Verify.java: FSK: Karen: we now propagate enough Derivation information so that FSK: your analysis is breaking somewhere else entirely (a class cast FSK: exception of some sort, once again a chance for me to sing FSK: the virtues of generic type parameterization...) In any case, FSK: let me know when you run into another problem with it. FSK: FSK: 1. Reorganized Derivation propagation code in register allocation FSK: classes; instead of supporting classes providing a TempMap FSK: and modifying a replacedInstrs Map dynamically and doing the FSK: Derivation construction in the RegAlloc class, each extension FSK: of RegAlloc must now provide a Derivation on its own. This FSK: allows more flexibility in how Derivation information is FSK: propogated, but leads to more complexity in the RegAlloc FSK: subclasses... FSK: 2. Did some code pruning in the RegAlloc class FSK: 3. Made the RegFile class associated each Temp with both a FSK: Register List *and* a source instruction, from which FSK: Derivation information can be later gleaned (so that FSK: Derivation queries can be made on spill instructions). Note FSK: that there is much trickery in how Derivation information for FSK: Move-coalesced Temps is propogated. C:P FSK: In the process, I changed the interface for RegFile.assign(..) FSK: and had to update using code accordingly... * Backend/Generic/Code.java, Backend/Analysis/BasicGCInfo.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java: FSK: 1. BasicGCInfo: fixed an infinite-loop (cdr'ing down the list in FSK: the wrong spot) and replaced occurances of toArray() with FSK: toArray(T[]) FSK: 2. added a getTempMap() method to LocalCffRegAlloc and RegAlloc FSK: to allow for coalesced Temps to be mapped over to their new FSK: representatives. May be replaced with a full-fledged FSK: getDerivation() method if I can't find a clean way to deal FSK: with getting Derivation information for newly-inserted spill FSK: instructions. FSK: 3. Added an additional assertion to Code... may be FSK: overconservative to check for null so much, but I don't think FSK: it's inappropriate here. * Backend/Generic/MaxMunchCG.java: FSK: accidentally committed debugging println statements. they're out FSK: now. * IR/Assem/Code.java, Backend/Generic/MaxMunchCG.java: FSK: 1. Made MaxMunchCG.java produce Derivations that know about FSK: Instr-Temps instead of Tree-Temps FSK: 2. Put in an alternate print method that doesn't show FSK: registers in Code.java 2000-07-10 pnkfelix * Analysis/Instr/IgnoreSpillUseDefer.java: FSK: <> due to how Moves are handled, sometimes Karen's analysis FSK: *should* treat Spill instructions as uses/defs. This should do FSK: the trick... * Analysis/Instr/IgnoreSpillUseDefer.java: FSK: Making IgnoreSpillUseDefer *really* ignore spill instructions FSK: (in response to a clarification of what Karen's analysis pass FSK: defines as uses and definitions of temps) * Analysis/Instr/RegAlloc.java: FSK: minor code cleanups: commenting style change and the removal FSK: of an outdated boolean field. * Util/Collections/BitSetFactory.java: FSK: Added helper method to BitSetFactory to produce a Set representing FSK: the universe of values easily (for constructing sets by removing FSK: elements iteratively rather than adding them) * Backend/StrongARM/AccelRFInfo.java: FSK: Experimental extension to RegFileInfo that may perform better; FSK: constructs register suggestions ahead of time to save runtime FSK: repeated object allocation costs. Still needs revision (doesn't FSK: spill yet) * Backend/StrongARM/AccelRFInfo.java: New file. 2000-07-07 C. Scott Ananian * IR/Quads/CALL.java, IR/Tree/CALL.java, IR/LowQuad/PCALL.java: Javadoc updates: make exception semantics clearer for calls. 2000-07-07 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java: FSK: Updated register allocation routines to propagate Derivation FSK: information when Instrs are replaced. I'm pretty sure that FSK: this will fix the empty instruction problem Karen told us FSK: about, but there are other cases of instr replacement that FSK: this may not fix; Karen, keep me posted. I'm going to review FSK: those other cases on my own in the meantime. 2000-07-07 kkz * Backend/Analysis/BasicGCInfo.java: 1. Added various debugging information. 2. Now filters out "special" registers like fp, sp from the analysis. 3. Fixed heinous bug where I was passing the current HCodeElement instead of the definition point to typeMap. 2000-07-06 kkz * Backend/Analysis/BasicGCInfo.java: Various changes put in during debugging. Incorporates ability to use special UseDefer for liveness and reaching defs analyses. 2000-07-06 pnkfelix * Analysis/Instr/RegAlloc.java: FSK: Spelling fix * Analysis/Instr/RegAlloc.java: FSK: Backing out small documentation changes from last commit FSK: (I had played with the idea of removing the FSK: IntermediateCodeFactory interface entirely but decided that FSK: despite the lack of covariant return types, it was still FSK: worthwhile to force people to use this interface just on the FSK: off chance that they'll read the spec for it and realize that FSK: they need to return instances of IntermediateCode * Backend/Analysis/BasicGCInfo.java, Analysis/Instr/IgnoreSpillUseDefer.java, Analysis/Instr/RegAlloc.java: FSK: First pass at revising the order of passes on Instr form to FSK: assist Karen's analysis. Before, it was done like this: FSK: FSK: (1) Add abstract spills FSK: (2) Add procedure prologue/epilogue FSK: (3) Pass off to Karen FSK: (4) Turn abstract spills into concrete spills FSK: FSK: Now, we're going to try to do it like this: FSK: (1) Add abstract spills FSK: (2) Pass off to Karen FSK: (3) Add procedure prologue/epilogue FSK: (4) Turn abstract spills into concrete spills FSK: FSK: In the process of implementing this (mainly in the form of FSK: defining how the prologue/epilogue information is propagated FSK: across Karen's analysis pass), I uncovered a design bug: we FSK: were associated TempLocators with HCodeFactorys, not with FSK: HCodes themselves. This was a... weird thing to do. And FSK: it wasn't compatible with the changes I was making. So I FSK: switched the associations to be tied to the HCodes themselves, FSK: with the IntermediateCode interface. FSK: Finally, I had to update Karen's code to conform to the new FSK: interface, at least in terms of the Java language. I doubt that FSK: the current implementation of BasicGCInfo satifies the FSK: specification of IntermediateCodeFactory, but we'll get to that FSK: next. FSK: FSK: Also, I added a static IgnoreSpillUseDefer. CVS is claiming that FSK: I modified ReachingDefsImpl but I don't think it could have FSK: been anything but a white space change since 'cvs diff' didn't FSK: mention it to me. * Analysis/Instr/RegAlloc.java: FSK: Small fix; I forgot to update the concrete-spill-code production FSK: routines yesterday. 2000-07-05 C. Scott Ananian * IR/Tree/ToTree.java: Implemented array initialization from constant tables, which (in some cases drastically) reduces initialization code size (and thus regalloc time). Also added some missing ALIGN statements to other data tables inline with the code (switch jump tables & etc). 2000-07-05 pnkfelix * Main/SAMain.java, IR/Assem/Instr.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/Verify.java, Analysis/ReachingDefsImpl.java: FSK: After much ado, finally tracked down a source of misleading FSK: output in our abstract-spill-code (i was replacing Instrs FSK: without even realizing it, and in the process trashing some FSK: definition info). FSK: Karen, your analyses may still not completely work, but they FSK: should operate significantly better after this fix. I will FSK: follow through and verify the output for ReachingDefs and FSK: Liveness analyses by hand, adding fixes where necessary. FSK: 1. Finished backing out erroneous changes to RegAlloc and Verify FSK: that were made on Friday, and added snippets of my own FSK: debugging change in an effort to track down above noted FSK: problem. FSK: 2. Made Analysis.ReachingDefsImpl use UseDefer, along with FSK: incorporating some of Karen's debug output FSK: 3. Made several static methods and variables in SAMain have FSK: protected access to ease development of quick extensions FSK: (still need to view source for SAMain to develop said FSK: extensions; merely saved cut-and-paste time) FSK: 4. Made some of the Instr.rename(..) methods final since they FSK: are implemented in terms of another rename(..) method and FSK: therefore subclasses wishing to change the behavior of FSK: renaming should only need to override the ultra-parameterized FSK: core Instr.rename(..) method 2000-07-04 bdemsky * Main/EDXMain.java: Checking in bug fix...Oops...Gotta catch the fireworks now. 2000-07-03 bdemsky * Main/EDXMain.java: Patched in changes from SAMain into EDXMain. * Support/EventDriven.jar, Support/EventDriven1.jar, Support/EventDriven1T.jar, Support/NewThread.jar, Support/collections.jar, Support/jasmin.jar, Support/sunthunk.jar, Support/thunk2.jar: Fix John Whaley's evil update. 2000-07-02 jwhaley * Support/EventDriven.jar, Support/EventDriven1.jar, Support/EventDriven1T.jar, Support/NewThread.jar, Support/collections.jar, Support/jasmin.jar, Support/sunthunk.jar, Support/thunk2.jar, Test/EventDriven/WebServer.jar, Test/PA/servers.jar, Main/PAMain.java, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/SyncElimination.java: Add support for synchronization elimination based on pointer analysis. This version does not do call-path specialization, yet. To test it, execute PAMain with the --syncelim option. * Analysis/PointerAnalysis/SyncElimination.java: New file. 2000-07-02 bdemsky * Analysis/EventDriven/CloningVisitor.java: Found a buglet...Squashed it. 2000-07-02 pnkfelix * Analysis/Instr/IgnoreSpillUseDefer.java: FSK: Realized that the prior implementation of this class would FSK: return nonsensical analysis results (for example, it would say a FSK: load of t10 uses t10, but it doesn't use t10 (the temporary FSK: variable); it uses the memory location where t10 is stored (but FSK: that's a different question)). Plus I realized after reading the FSK: implementation that it would return bogus results on any query of FSK: a SpillLoad/Store, due to a stupid bug on my part. FSK: The current implementation should now work with Karen's FSK: analyses... 2000-07-02 salcianu * Analysis/PointerAnalysis/PAEdgeSetImpl.java, Analysis/PointerAnalysis/PredicateWrapper.java, Analysis/PointerAnalysis/Relation.java, Analysis/PointerAnalysis/RelationEntryVisitor.java: Removing a few unused files. (their up to date versions are in other package). * Util/TypeInference/TypeInference.java, Analysis/MetaMethods/MetaAllCallers.java, Analysis/MetaMethods/MetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphAbstr.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/MetaMethods/SmartCallGraph.java, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/EdgeOrdering.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/Matching.java, Analysis/PointerAnalysis/PAEdge.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PASync.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointsToGraph.java, Main/PAMain.java, Analysis/EventDriven/ToAsync.java: Many, many changes. 2000-07-02 C. Scott Ananian * Backend/PreciseC/TreeToC.java: A bunch of fixes/improvements to TreeToC: a) data tables inline to the code segment (ie, switch jump tables, array initialization data blocks) now work. b) some clean-up of the local_label-related code. New LabelVisitor to classify label types. c) added the ability to emit calls to memset w/o a function dereference, so that gcc can inline them. d) we needed to emit the correct decl for FNI_GetJNIEnv(). e) turned off EMIT_LINE_DIRECTIVES for debugging. f) taking the address of code-local labels now works. * Backend/Runtime1/Runtime.java: Printing exceptions "the right way" with java.lang.Throwable.printStackTrace0(Object o) requires java.io.PrintStream.println(char[]) to be callable. * IR/Tree/ToTree.java: We now emit "intelligent" code for java switch statements. Actually, our generated code is pretty damn bright. We emit jump tables for "dense" switch statements, explicit case equality checks for "small" switch statements, and open-coded binary searches for "large, sparse" switches. All the quoted adjectives are subject to tuning, but we're using values which seem reasonable to me. Our open-coded bsearch also is smart enough to use the pigeonhole principle to eliminate unnecessary checks, as well as falling back to more-efficient explicit equality checks when the divide-and-conquer division has gotten the problem down to a "small enough" size. Pretty sweet. =) 2000-07-01 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Fix pattern for computed-branch, which wasn't declaring PC properly. Nobody noticed this because we weren't emitting computed branches --- but I'm working on "properly" implementing switch statements, so I noticed. =) 2000-07-01 witchel * Backend/MIPS/CodeGen.spec: Refine calling convention. Use correct argument registers. Standardize support routine names. Get rid of mipsPRO section flags as I am trying to use gas. Fix syntactic error in shifts by a constant. Fix long constants. Fix loading null pointer. 2000-07-01 salcianu * Analysis/PointerAnalysis/LightPAEdgeSet.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java: Found a bug in the caching of the hashCode. It seems to work now. * Util/Collections/LinearSet.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/EdgeOrdering.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/Matching.java, Analysis/PointerAnalysis/PAEdgeVisitor.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/Relation.java: LOTS of changes in the Pointer Analysis code. Due to an evil bug I'm still searching for, it doesn't work yet. I hope to fix it very soon. * Analysis/PointerAnalysis/PAEdgeSetImpl.java: Heavyweight implementation of the PAEdgeSet interface. Takes up a lot of memory but is fast for very very big edge sets. I hope this is not the case in our analysis and we will be able to dump this class over the board at one moment. OBS: this is the old PAEdgeSet.java before it was transformed into an interface. * Analysis/PointerAnalysis/PAEdgeSetImpl.java: New file. * Analysis/PointerAnalysis/LightPAEdgeSet.java: Lightweight (ie small memory consumption) implementation of PAEdgeSet. It seems that in our analysis, most of the points-to sets are very small (ie 1-2 elements); the number of fields from a node is also quite small. * Analysis/PointerAnalysis/LightPAEdgeSet.java: New file. * Analysis/PointerAnalysis/AbstrPAEdgeSet.java: Abstract implementation of PAEdgeSet to ease the development. * Analysis/PointerAnalysis/AbstrPAEdgeSet.java: New file. * Analysis/PointerAnalysis/PAEdgeSet.java: Making some order in the PAEdgeSet: it is now just an interface that is implemented in different ways. * Util/PredicateWrapper.java: A wrapper to allow us to pass predicates as method parameters. * Util/PredicateWrapper.java: New file. 2000-07-01 C. Scott Ananian * Backend/PreciseC/TreeToC.java: The C backend now outputs the proper #line directives to allow debugging the compiled program using gdb. Note that the package/directory structure of the source program is currently stripped from the debugging info; this shouldn't be terribly hard to add back in, but I couldn't decide if I wanted to do it at the IR/Bytecode level or in the PreciseC backend. 2000-06-30 C. Scott Ananian * Analysis/Place.java: Speed up place, now that phi-placement and sigma-placement are pretty much the same thing. * IR/Quads/Prune.java, IR/Quads/QuadNoSSA.java: Added a pruning pass to quad-no-ssa to (in linear time) get rid of most of the definitions of dead variables. This reduces the total number of variables and quads in the program, speeding up everything else that uses the representation. Plus, it Just Looks Nicer That Way (tm). * IR/Quads/Prune.java: New file. * Util/Collections/SetFactory.java: Make makeCollection(Collection) and makeSet() final, since it would violate the contract of CollectionFactory to have them behave in any other way than the SetFactory implementation. * Util/Graph.java: Compress the vertical spacing of the graph generated by harpoon.Main.Graph, so that CFGs are a little more readable. * IR/Quads/Quad.java: Add a line of javadoc to harpoon.IR.Quads.Quad.handlers(). * Util/Collections/BitSetFactory.java: One-character EVIL EVIL bug fix to BitSetFactory: the remove() method was never actually removing elements from the Set. Felix, I can't see how LocalCffRegAlloc was working with this bug present, although it looks like everything else that used BitSetFactory escaped unharmed because they were using removeAll() instead of remove(). 2000-06-30 pnkfelix * Analysis/Instr/IgnoreSpillUseDefer.java: FSK: BAD FELIX! Committing a Class that didn't have a prayer of FSK: compiling... C:P * Analysis/Instr/IgnoreSpillUseDefer.java: FSK: Added a IgnoreSpillUseDefer for Karen to use with the Liveness FSK: analysis. I'm actually not entirely certain that this hack FSK: will actually solve all her problems, but at least this keeps FSK: it independent from the rest of the code base which seemed to FSK: rely on the built-in semantics of useC() and defC() for FSK: Instrs... * Analysis/Instr/IgnoreSpillUseDefer.java: New file. 2000-06-30 C. Scott Ananian * Main/Graph.java: Fixup harpoon.Main.Graph to use the same command-line options as harpoon.Main.Main (ie, -pass, not -code). * Analysis/Place.java: bdemsky found a genuine, real-life bug in the SSI placement algorithm: because sigmas count as defs for the phi computation (and likewise phis count as uses for the sigma placement) we need to place phi/sigmas for *both* uses and defs w/in the SESE. 2000-06-30 pnkfelix * Analysis/Instr/RegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java: FSK: My previous hack of overriding useC() and defC() for the spill FSK: instructions broke stuff. I'm not sure why quite yet; it FSK: shouldn't have. In the meantime, this will make sure that FSK: things build again; Karen, you're back to square one now with FSK: regards to Liveness analysis. i will code up a special UseDefer FSK: that will keep the Spill code from messing up the analyses... * Analysis/Instr/RegAlloc.java, Analysis/Instr/Verify.java, Backend/StrongARM/CodeGen.spec, IR/Assem/Instr.java, Analysis/Instr/LocalCffRegAlloc.java: FSK: 1. Changed harpoon.Temp.Label creation in CodeGen.spec FSK: (we were relying on the incorrect behavior that Scott FSK: fixed the other day; Emmett, you may need to update FSK: your Label construction (if you're doing a similar thing FSK: with 1f, 2f, 1:, 2:, etc) FSK: 2. Made a change to what useC() and defC() return for FSK: the SpillLoad and SpillStore instructions so that Karen's FSK: Analysis passes will get reasonable results from FSK: IntermediateCode produced by the register allocator... 2000-06-30 salcianu * Util/Collections/LinearSet.java: I have added clone() 2000-06-30 C. Scott Ananian * Backend/PreciseC/TreeToC.java: Handle floating-point NaNs and Infinities correctly. I'd prefer to output IEEE-format bit patterns, but these string representations ought to come close enough. * Backend/PreciseC/TreeToC.java: Differentiate INT and LONG right-shift operations. 2000-06-29 C. Scott Ananian * Backend/Runtime1/SPAllocationStrategy.java: Simplify simplify simplify: reduce needless code duplication by making SPAllocationStrategy inherit from MallocAllocationStrategy. * Temp/Label.java: Make hashCode() consistent with equals() for Label so that HashSets and HashMaps work correctly. * Backend/Runtime1/TreeBuilder.java: Argument to allocation is an INT length, not a POINTER. This (also) makes the function declarations in the C backend correct. * Backend/PreciseC/TreeToC.java: Bug fixes in TreeToC: gcc is picky about declaration of 'memset'; integer constants were being emitted incorrectly due to evil evil C semantics for -2147483648 (which is a unary negation operator applied to the too-long integer constant 2147483648) -- correct is 0x80000000; and non-exported labels were sometimes not being declared correctly at the top of the file. * Main/SAMain.java: Add support to SAMain for PreciseC backend. * Support/precisec-makefile.template: Add makefile template for PreciseC backend. * Support/precisec-makefile.template: New file. * GNUmakefile: Add makefile template for PreciseC backend. * Backend/PreciseC/Frame.java: The PreciseC Frame implementation requires "working" RegFileInfo and LocationFactory components. Implemented a simple "everything is a global variable" LocationFactory. * Backend/PreciseC/TreeToC.java: Rephrase TreeToC as a PrintWriter. * Main/SAMain.java: Clean up SAMain a bit by reducing code duplication. Also added slightly better support for the PRECISEC backend. * IR/Properties/CFGrapher.java: Redid Alex's serialization of CFGrapher so that it is the specific CFGrapher.DEFAULT which is tagged as Serializable, not the CFGrapher base class (as there may well be implementations of CFGrapher which are not Serializable). 2000-06-29 kkz * Backend/Runtime1/DataClaz.java: I flubbed the last check-in because I did it on maserati and it brought up something other than emacs with a very different key mapping. The check-in was a fix to emit correct sizes for primitive classes. We were calculating sizes using the object header and the field offset. Since primitive classes don't have fields, primitive classes were getting the size of the object header. The current check-in is to remove a debugging println. Here's the changelog from the last check-in: Index: DataClaz.java * homeBackend/Runtime1/DataClaz.java: *** empty log message *** 2000-06-28 C. Scott Ananian * Backend/PreciseC/Frame.java: Added a proper frame for the PreciseC backend. * Backend/PreciseC/Frame.java: New file. * Main/EDMain.java, Main/EDXMain.java: Patch Brian's EDMain and EDXMain to deal with the new non-visibility of Backend//Code. Also add a bit of code to deal with different backends. This should really be re-merged with SAMain to get all the new SAMain features. * Main/SparcMain.java: SparcMain removed, because its functionality was folded into SAMain. * Main/SAMain.java: Improve the genericity of SAMain -- it can now do StrongARM, Sparc, MIPS, and (soon) PreciseC backends via the '-b' command-line flag. 2000-06-28 salcianu * Analysis/PointerAnalysis/InterProcPA.java: Removed some unused code. 2000-06-28 C. Scott Ananian * Backend/Sparc/Code.java, Backend/StrongARM/Code.java, Backend/MIPS/Code.java: Changed the accessibility of the Backend//Code class, since you can now get at the codeFactory (which is all you need) via the Frame. This should simplify the user-visible interface to the backend some. * Backend/Sparc/Frame.java, Backend/StrongARM/Frame.java, Interpret/Tree/DefaultFrame.java, Backend/MIPS/Frame.java, Backend/Generic/Frame.java: Added Generic.Frame.getCodeFactory() method, so that we only need to specify the backend in one place -- where we specify the frame. The code factory to generate instrs should be accessible via the frame object. 2000-06-28 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java: FSK: set PREASSIGN_INFO flag to false to keep from driving FSK: people working with the -R option from going crazy * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/RegFile.java, Analysis/Instr/Verify.java, IR/Assem/Code.java: FSK: Continued work on fixing LocalCffRegAlloc to work with MIPS FSK: Backend. Right now we are generating WTF errors and I believe FSK: that it is stemming from incorrect construction of register/temp FSK: conflict tables... also some of the register assignments we FSK: produce in MIPS look fundamentally flawed to me FSK: 1. a small hack (added for debug output readability purposes) FSK: should improve the performance of the conflict table building FSK: stage. FSK: 2. expanded interface of Code to allow easy output of instrs to FSK: System.out FSK: 3. made RegFile object actually aware of the Collection of FSK: register temps that it is being used with (though this FSK: information isn't used yet, and may only be used purely for FSK: debugging) * Util/Collections/GenericInvertibleMap.java, Util/Collections/GenericMultiMap.java, Util/Collections/InvertibleMap.java, Util/Collections/MapWrapper.java, Util/Collections/MultiMap.java, Util/Collections/UnmodifiableMultiMap.java: FSK: Updated documentation, both filling in blanks, adding small FSK: clarifications, and reorganizing Specification versus FSK: Implementation documentation for MultiMap and GenericMultiMap 2000-06-28 salcianu * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/PointsToGraph.java: More serious treatment of the calls to the native methods. 2000-06-28 C. Scott Ananian * Backend/PreciseC/TreeToC.java: Fix the data table output to work around the 'structs larger than 32 bytes are unavoidably aligned to a 32-byte boundary' issue in gcc. We now magically split the structs generated at appropriate places. Magic! 2000-06-28 witchel * Backend/MIPS/CodeGen.spec: Fix a use before defined bug. Thanks Felix. 2000-06-28 C. Scott Ananian * Analysis/CycleEq.java: Ovy found this bug in my 'pseudo-goto in java'. continue inside a while(false) does *not* go back to the top; it jumps to the bottom. 2000-06-28 salcianu * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/PointerAnalysis.java: Small changes 2000-06-27 C. Scott Ananian * Backend/PreciseC/TreeToC.java: Fixup declaration of methods defined within the compilation unit. Also added back the __attribute__((packed)) on structures, but gcc seems to silently ignore it. =( * Backend/PreciseC/TreeToC.java: The precise-c backend now outputs the data tables from Tree form, although not tables inline with code, yet. Also, gcc doesn't want to align our labels properly at times -- it's using its perogative of specifying a larger alignment than we request. Have to think hard about working around this. Also, our extern declarations are as anonymous structs now, which the compiler complains about when we redefine them in the current compilation unit. This is an easy thing to fix, though. * Backend/PreciseC/TreeToC.java: Add SEGMENT support for methods. Use the C preprocessor to support lots of different exception-handling tactics. Currently we use a 'pair-return' scheme, but this is now defined entirely in an #included header file; it's no longer hard-coded into the generated C code. Also made some helper methods static. 2000-06-27 witchel * Backend/MIPS/CodeGen.spec: I for got a newline. Thank you Felix. * Backend/MIPS/Code.java, Backend/MIPS/CodeGen.spec: 1. Correct internal control flow for long comparisons 2. Get rid of StrongARM specific multiplication logic. 2000-06-27 C. Scott Ananian * IR/Tree/ToTreeHelpers.java: BUG FIX for Brian: we were being too aggressive with our tree folding and sometimes creating untypeable code: derived types in our system must have a base pointer *in a register* -- we were creating trees (after folding) which had base pointers *in memory*. You can set RESTRICT_DERIVED_TYPES = false to re-enable this aggressiveness if (for example) you are using a conservative collector and don't care about typeability. 2000-06-27 salcianu * Util/LightBasicBlocks/LBBConverter.java, Util/LightBasicBlocks/LightBasicBlock.java, Analysis/MetaMethods/MetaAllCallers.java, Analysis/MetaMethods/MetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphAbstr.java, Analysis/MetaMethods/MetaCallGraphImpl.java, IR/Properties/CFGrapher.java, Main/PAMain.java, Util/BasicBlocks/BBConverter.java, Util/BasicBlocks/SCCBBFactory.java, Util/Collections/LinearSet.java, Analysis/BasicBlock.java: I've added support for serialization of the pre-analysis results (watch for the --savepre and --loadpre flags in harpoon.Main.PAMain). This will avoid waiting for the slow MetaCallGraph during the debug sessions). A few classes have been modified to implement java.io.Serializable. 2000-06-27 witchel * Backend/MIPS/Code.java, Backend/MIPS/CodeGen.spec: A bal can not use an emitJUMP since it has side effects (i.e., setting the link register). MIPS assembler uses mult for integer multiplication. 2000-06-27 C. Scott Ananian * IR/Assem/Code.java: BUG FIX: IR.Assem.Code.print() (which is used to print out the assembly language output of every backend) *always* omitted the *first* instruction in the Code, due to a misplacement of the loop-increment statement. I've rewritten it to use the standard stereotyped linked-list traversal loop: if everyone uses stereotyped loops instead of making up their own, bugs like this would never happen (and the resulting code is easier to understand, to boot). Actually, Felix and I looked at the change history for this bug: it was introduced in version 1.1.2.35 of Backend/Generic/Code.java, for those interested in codebase archeology. 2000-06-27 pnkfelix * Backend/MIPS/CodeGen.spec, Analysis/BasicBlock.java: FSK: 1. Changed a pattern in MIPS.CodeGen from an Instr to an FSK: InstrJUMP. I'm *NOT* sure at all if this is correct; it FSK: just looked right, and more important for my purposes, FSK: helped me filter out irrelevant data for debugging FSK: BasicBlock construction for MIPS assembly. Emmett, if FSK: this is wrong, *please* tell me so I can change it back (or FSK: change it back yourself after we finish debugging). FSK: 2. Added some System.out.printlns under CHECK_INSTRS in FSK: Analysis.BasicBlock. In addition to checking that all FSK: "important" instructions are in some basic block, we FSK: now also do a reverse traversal of the preceding instrucitons FSK; to find either (1) a predecessor that *is* in a BasicBlock, FSK: or (2) a predeccessor that has no predecessors itself but FSK: should. Early checks seem to indicate that the problem lies FSK: in some bug related to (2). 2000-06-27 salcianu * Main/PAMain.java: Removing some dead code * Main/PAMain.java: Small changes * Analysis/MetaMethods/FakeMetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/PointerAnalysis/PointerAnalysis.java, Main/PAMain.java: Code cleaning 2000-06-26 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/BasicBlock.java: FSK: 1. Added some helper routines to RegAlloc to prepare for FSK: multi-reg move coalescing support FSK: 2. Added debugging structures (the `checked' set) to RegAlloc FSK: and LocalCffRegAlloc) to work on fixing MIPS/RegAlloc problems FSK: 3. Added a CHECK_INSTRS static flag to BasicBlock to FSK: make the BasicBlock.Factory verify that the majority of FSK: HCodeElements in a method have indeed been associated with FSK: a BasicBlock (if a method has unreachable code (which is not FSK: always symptomatic of a problem), this assertion might fire FSK: post-BB-construction; use with care) FSK: 4. Some code was inserted in the Backend/*/Code classes to debug FSK: the MIPS/RegAlloc bugs... 2000-06-26 C. Scott Ananian * Backend/PreciseC/TreeToC.java: Added support for 'two return values' exception-handling method. Very non-optimal, but it's portable. Changes to CALL, THROW, RETURN, and METHOD translations. 2000-06-26 witchel * Backend/MIPS/CodeGen.spec, Backend/MIPS/Flex_MIPS.pl, Backend/MIPS/floatem.c, Backend/MIPS/floatem.h: Move runtime files to Runtime. Fix bug in long subtraction. 2000-06-26 pnkfelix * Backend/MIPS/CodeGen.spec: FSK: Added some assertion statements to detect when the wrong types FSK: of Temps are passed into a pattern. 2000-06-26 witchel * Main/SAMain.java, Support/NullCodeGen.template, Backend/MIPS/Code.java, Backend/MIPS/CodeGen.spec, Backend/MIPS/Flex_MIPS.pl, Backend/MIPS/Frame.java, Backend/MIPS/InstrBuilder.java, Backend/MIPS/RegFileInfo.java, Backend/MIPS/TempBuilder.java, Backend/MIPS/TempVisitor.java, Backend/MIPS/TwoWordTemp.java, Backend/MIPS/floatem.c, Backend/MIPS/floatem.h: Initial implementation of the MIPS backend, accessible via command line option. * Backend/MIPS/Code.java, Backend/MIPS/CodeGen.spec, Backend/MIPS/Flex_MIPS.pl, Backend/MIPS/Frame.java, Backend/MIPS/InstrBuilder.java, Backend/MIPS/RegFileInfo.java, Backend/MIPS/TempBuilder.java, Backend/MIPS/TempVisitor.java, Backend/MIPS/TwoWordTemp.java, Backend/MIPS/floatem.c, Backend/MIPS/floatem.h: New file. 2000-06-26 pnkfelix * Backend/StrongARM/RegFileInfo.java, Backend/Generic/RegFileInfo.java: FSK: added the experimental "expand(Temp)" operation to RegFileInfo, FSK: in order to explore how to approach Move coalescing with Temps FSK: composed of multiple registers... 2000-06-26 C. Scott Ananian * Tools/PatMat/Parser.cup, IR/Tree/SEGMENT.java: The CodeGeneratorGenerator parser was not keeping up-to-date with the IR/Tree/SEGMENT segment types. Reorganized the code some to try to keep this from happening again: just remember to update the Segment.decode() and Segment.encode() functions when you add a new SEGMENT type. 2000-06-26 pnkfelix * Backend/StrongARM/CodeGen.spec, Backend/StrongARM/RegFileInfo.java, Backend/Generic/RegFileInfo.java: FSK: 1. Took PreassignTemps out of Generic.RegFileInfo's specification FSK: and StrongARM.RegFileInfo's implementation FSK: 2. Modified a potentially costly assertion message for faster FSK: execution. 2000-06-24 C. Scott Ananian * Backend/PreciseC/TreeToC.java: More work on TreeToC: we now output compilable C code. Fixed bugs in pointer addition and function pointer dereferencing. We now emit declarations for local variables and referenced global symbols. * Backend/PreciseC/TreeToC.java: More work on TreeToC: removed import * statements, fixed labels with '.' prepended, fixed void method & return translation. * Analysis/Instr/Verify.java: Removed import * statements. 2000-06-24 kkz * IR/Tree/SEGMENT.java, Main/SAMain.java, Analysis/Instr/RegAlloc.java, Backend/Analysis/BasicGCInfo.java, Backend/Generic/GCInfo.java, Backend/Runtime1/DataGC.java, Backend/Runtime1/Runtime.java, Backend/StrongARM/Frame.java, Analysis/ReachingDefsImpl.java: Various changes and bug fixes to support precise GC. Currently very slow, and not entirely bug-free, but should not affect build unless you select precise GC. 2000-06-23 C. Scott Ananian * Backend/PreciseC/TreeToC.java: First draft of the Tree-to-C backend. Data tables are still incomplete, variables aren't declared yet, call and throw are unimplemented, etc. * Backend/PreciseC/TreeToC.java: New file. * ClassFile/HMethod.java: Improved javadoc for getReturnType() to make it more obvious what type was returned for a void method (HClass.Void). * IR/Tree/METHOD.java, IR/Tree/ToCanonicalTree.java, IR/Tree/ToTree.java, Backend/Runtime1/StubCode.java: Added new method label and return-type enumeration fields to Tree.METHOD to make code-generation a little easier (ie, we don't have to lookup the HMethod in the HCode and reparse the class info to figure this stuff out). * IR/Tree/Translation.java: Added better javadoc for Translation.Exp subclasses. 2000-06-23 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java: FSK: harumph. experimental results indicate that my "slow and stupid" FSK: version of my EqTempSets ADT is actually somewhat *faster* than FSK: the one backed by a Util.DisjointSet object. Not sure how this FSK: could be the case; am thinking that its possible that the FSK: difference is within the noise of the system. FSK: in any csae, I'm off to bed. * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/Verify.java: FSK: Some minor clean-ups and small changes, mostly getting rid FSK: of inefficiencies that were put in the system for FSK: debugging purposes * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/Verify.java: FSK: . forgot to turn on Move Coalescing as default. (Emmett FSK: noticed that many unnecessary moves were being generated) Sorry FSK: guys. 2000-06-22 C. Scott Ananian * Interpret/Tree/HClassInfo.java, Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/OffsetMap32.java, Interpret/Tree/TestRun.java: Getting rid of the harpoon.Backend.Analysis.DisplayInfo package to make the organization of our backend clearer. (There was only one class in DisplayInfo and only Interpret/Tree used it.) @RENAME: Backend/Analysis/DisplayInfo/HClassInfo Interpret/Tree/HClassInfo@ * Interpret/Tree/HClassInfo.java, Backend/Maps/package.html: New file. * Backend/Maps/package.html: Trying to improve our 'excellent documentation'. =) 2000-06-21 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java: FSK: Emmett told me that "@" isn't a comment specifier FSK: in MIPS syntax, so I took out the comment line FSK: in my Move Proxy Instr * Analysis/DataFlow/LiveTemps.java, Analysis/Instr/LocalCffRegAlloc.java: FSK: 1. Made some more fixes for LocalCffRegAlloc, and took out FSK: a bunch of System.out's that weren't needed anymore FSK: 2. Found a nasty little bug in LiveTemps where it wasn't FSK: doing the right thing for Instrs like "t4 = t4 + 1;" FSK: FSK: At this point, we now register allocate complete WITHOUT FSK: setting off any of my assertions (INCLUDING the over-conservative FSK: ones!) I still haven't tried assembling and executing the code FSK: on a netwinder... will try that next * IR/Assem/Instr.java, Util/Collections/GenericInvertibleMap.java, Util/Collections/GenericMultiMap.java, Util/Collections/InvertibleMap.java, Util/Collections/MapWrapper.java, Util/Collections/MultiMap.java, Util/Collections/UnmodifiableMultiMap.java: FSK: Finally commiting the changes I've accumulated over the last FSK: week while I was away from the lab. And boy its a doozy... FSK: FSK: At this point I can once again register allocate for all of the FSK: methods for my test suite. But some of the code produced seems FSK: flawed (for example, Spilled registers are being re-stored to FSK: memory when they were only loaded, not written to, etc). FSK: I have some overly-conservative assertions being fired that FSK: I may have to take out in the near future... FSK: FSK: I haven't had a chance yet to try to assemble or execute the FSK: currently generated code; I wanted to get it into the Repository FSK: (and off this laptop) before something bad happened. FSK: FSK: Changes: FSK: 1. Karen uncovered a large bug in my approach to move-coalescing FSK: so I had to redo that transformation to preserve properties that FSK: I had thought it was safe to ignore (this involved a fairly major FSK: overhaul). However, preserving those properties makes my FSK: Verification pass much easier to do and understand so this actually FSK: was an unexpected boon to the system. FSK: 2. I expanded the interface for MultiMap to allow removal of FSK: individual key-value mappings. FSK: 3. I gave several large inner classes in LocalCffRegAlloc their FSK: own files because it was becoming unweildy to wade through the FSK: single file. FSK: 4. I finally put InvertibleMap (and a few other helper classes) into FSK: the Util.Collections package. Note that the name "InvertibleMap" FSK: may be misleading: the inverse of an Map is not necessarily a Map FSK: itself, but is always a MultiMap. * Util/Collections/GenericInvertibleMap.java, Util/Collections/InvertibleMap.java, Util/Collections/MapWrapper.java, Util/Collections/UnmodifiableMultiMap.java: New file. * Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/EqTempSets.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/Verify.java, Analysis/Instr/WeightedSet.java: FSK: Finally commiting the changes I've accumulated over the last FSK: week while I was away from the lab. And boy its a doozy... FSK: FSK: At this point I can once again register allocate for all of the FSK: methods for my test suite. But some of the code produced seems FSK: flawed (for example, Spilled registers are being re-stored to FSK: memory when they were only loaded, not written to, etc). FSK: I have some overly-conservative assertions being fired that FSK: I may have to take out in the near future... FSK: FSK: I haven't had a chance yet to try to assemble or execute the FSK: currently generated code; I wanted to get it into the Repository FSK: (and off this laptop) before something bad happened. FSK: FSK: Changes: FSK: 1. Karen uncovered a large bug in my approach to move-coalescing FSK: so I had to redo that transformation to preserve properties that FSK: I had thought it was safe to ignore (this involved a fairly major FSK: overhaul). However, preserving those properties makes my FSK: Verification pass much easier to do and understand so this actually FSK: was an unexpected boon to the system. FSK: 2. I expanded the interface for MultiMap to allow removal of FSK: individual key-value mappings. FSK: 3. I gave several large inner classes in LocalCffRegAlloc their FSK: own files because it was becoming unweildy to wade through the FSK: single file. FSK: 4. I finally put InvertibleMap (and a few other helper classes) into FSK: the Util.Collections package. Note that the name "InvertibleMap" FSK: may be misleading: the inverse of an Map is not necessarily a Map FSK: itself, but is always a MultiMap. * Analysis/Instr/Verify.java, Analysis/Instr/WeightedSet.java: New file. 2000-06-19 salcianu * Analysis/PointerAnalysis/InterThreadPA.java, Main/PAMain.java: Small changes 2000-06-14 salcianu * Main/PAMain.java, Main/SAMain.java: Small changes 2000-06-13 bdemsky * Support/NewThread.jar: Commented out rest of initializer. * IR/Quads/ThreadInliner.java: Preserves Allocation Information. Many bugs removed. 2000-06-13 salcianu * Analysis/PointerAnalysis/MAInfo.java, Main/PAMain.java: 1. Some old code has been eliminated 2. I made an ugly modification to cope with the inexistence of a NSTK_malloc_with_heap method. 2000-06-12 bdemsky * Main/EDXMain.java, Main/SAMain.java: Finished patches for linking... * Support/NewThread.jar: Added join dummy call. * IR/Quads/ThreadInliner.java: New file. * IR/Quads/ThreadInliner.java: i ThreadInliner pass. 2000-06-12 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/MyAP.java: ALL the threads are now stack allocated (if the apropriate "--notg" option is passed to PAMain. 2000-06-12 bdemsky * Support/NewThread.jar: Thread class without ThreadGroup support. * Support/NewThread.jar: New file. 2000-06-12 salcianu * Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/MyAP.java, Main/PAMain.java: Dummy stuff. 2000-06-11 salcianu * Main/PAMain.java: Martin and Brian need to know which are the CALLs to java.lang.Thread.start and java.lang.Thread.join that need to be modified. Here is some ridiculously dummy version that will help Brian work on his stuff: all the CALLs to start and join fall into this category! This turns out to be true for the two benchmarks we currently have (water + barnes). The bad part is that I don't know how this info can be generated in a correct fashion ... 2000-06-09 pnkfelix * Main/SAMain.java, Backend/Generic/InstrBuilder.java, Backend/StrongARM/InstrBuilder.java, IR/Assem/Instr.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java: FSK: Commiting most recent version of local register allocator to FSK: try to fix weirdness Karen is experiencing. 2000-06-09 salcianu * Analysis/PointerAnalysis/NodeRepository.java: Small changes. 2000-06-09 pnkfelix * Backend/StrongARM/RegFileInfo.java: FSK: Implemented maxRegIndex() at Karen's request. Hope this helps! 2000-06-09 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/MyAP.java, Analysis/PointerAnalysis/NodeRepository.java: The method inlining transformation for improving the effectiveness of the stack allocation is pretty much done. (I tested it on barnes.par.java and the results are VERY good). Features: 1. The method inliner is not dummy. In particular, we don't inline all the methods before the analysis and wait to see what happens; only call sites that can increase the stack allocation are actually inlined. 2. The order into which the different CALLs are inlined is important: if m2 should be inlined into m1 and m3 should be inlined into m2, it is clearly better to do "m3 into m2" first and "m2 into m1" next (it is not incorrect to do it the other way but the resulting code is less efficient since m1 will include the original, non-optimized version of m2). The inliner embedded in MAInfo.java achieves this by doing a topological sort of a component graph and processing the inlining requests in reverse topological order. 3. The inliner supports circular inlining hints, eg "inline m1 into m2", "inline m2 into m3" and "inline m3 into m1". However, the results are not optimal in this case; this case is treated just to eliminate the need for testing against it in the "inlining hints generator". 4. For the time being, we do only 1 level inlining, ie the analysis gives hints like "inline this CALL". However, it is possible to modify it to treat more difficult cases such as "inline the call chain CALL1, CALL2, ... CALLk" 2000-06-08 kkz * Backend/Runtime1/SPAllocationStrategy.java, homeBackend/Runtime1/DataClaz.java: Scott pointed out that the two pointers in the object header are not relevant to garbage collection because they don't point to data that would need to be GC'd. The collorary is that arrays with primitive components have no interior pointers. Changes are: 1. Cleared bits in the GC bitmap that correspond to the pointers in the object header. 2. Arrays with primitive components are allocated as atomic. 3. Bitmaps for arrays have been switched back to the original form: 0 indicates an array with primitive components, 1 indicates an array with components which are objects. 2000-06-08 salcianu * Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/MAInfo.java: A part of the code for the method inlining as a way of improving the effectiveness of the stack allocation. So far, I wrote only the part that detects which calls whould be inlined and which NEW/ANEW can be replaced by stack allocation after the inlining. More to come ... 2000-06-08 pnkfelix * Backend/StrongARM/Code.java, IR/Assem/Code.java, Util/Collections/BitSetFactory.java, Util/Collections/LinearSet.java, Analysis/Instr/EqTempSets.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Backend/Generic/RegFileInfo.java: FSK: Lotta changes here, all for the most part in my ongoing effort to FSK: get my register allocator working... FSK: FSK: 1. Made the Equivalent Temp Classes generated by InstrMOVE FSK: information a Method-wide analysis rather than localizing FSK: it to BasicBlocks; not certain yet that this has been thought FSK: through sufficiently, but am certain that the previous FSK: approach was fundamentally flawed. FSK: 2. Added a few simple minded assertions to my Verification pass FSK: to partially cover symptoms of the above error. FSK: 3. Added a "WTF" output for a case which shouldn't be happening FSK: but is... we should still be able to recover from this case FSK: (its where we have a hard-coded write to a register that was FSK: assumed to be allocated to a temp used in the future) but the FSK: other analyses should be discovering this and elminating it FSK: before the WTF point. For now, am leaving it with the FSK: recovery routine... FSK: 4. Added SPILL_INFO boolean flag to LocalCffRegAlloc to control FSK: the System.out.println's FSK: 5. Added 'V' character to end of fields in Verify class to ease FSK: searches for *real* allocation-relevant calls to things like FSK: regfile.insert(..), etc. FSK: 6. Added except(T|R) args to updateMapping; this may have FSK: actually caused one of the bugs above in hindsight; must FSK: investigate... FSK: 7. Added comments to RegFileInfo and RegAlloc regarding the FSK: potentially deprecatable getGeneralRegisters* methods 2000-06-07 salcianu * Analysis/Quads/MethodInliningCodeFactory.java: 1. Small bug fixed: the "THROW l" instructions from the inlined method should be replaced with MOVE site.retex=l that have as successor the 1-successor of the CALL instr. being inlined (not the 0-successor which corresponds to a normal exit) 2. Some commented lines were removed * Util/LightBasicBlocks/LightBasicBlock.java, Main/PAMain.java: Minor changes * Main/PAMain.java: Very small changes 2000-06-07 kkz * Backend/StrongARM/Frame.java, Analysis/AllocationInformationMap.java, Analysis/DefaultAllocationInformation.java, Analysis/EventDriven/CloningVisitor.java, Analysis/Maps/AllocationInformation.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/MyAP.java: We can now do "semi-precise" garbage collection using the BDW garbage collector. This involved: 1. Adding class information to AllocationProperties. 2. Adding SPAllocationStrategy, which is used when -Dharpoon.alloc.strategy=sp is specified on the flex command line. 3. Changing the format of the GC bitmap for objects to the format used by BDW. Instead of having the most significant bit correspond to the first word of the object, it is now the *least* significant bit, with everything else reversed accordingly. Arrays are also handled differently. Instead of having the least significant bit (bit 0) indicate whether the array component is an object, it is bit 3 that indicates this. Bits 0, 1, and 2 correspond to the object header for the array. Bits 0 and 1 should always be set, and bit 2 should always be clear. (Actually, there may be some nebulous-ness about bit 1 when we start doing precise garbage collection since the second field in the header could be a hashcode or a pointer.) * Backend/Runtime1/SPAllocationStrategy.java: New file. * Backend/Runtime1/SPAllocationStrategy.java, homeBackend/Runtime1/DataClaz.java: We can now do "semi-precise" garbage collection using the BDW garbage collector. This involved: 1. Adding class information to AllocationProperties. 2. Adding SPAllocationStrategy, which is used when -Dharpoon.alloc.strategy=sp is specified on the flex command line. 3. Changing the format of the GC bitmap for objects to the format used by BDW. Instead of having the most significant bit correspond to the first word of the object, it is now the *least* significant bit, with everything else reversed accordingly. Arrays are also handled differently. Instead of having the least significant bit (bit 0) indicate whether the array component is an object, it is bit 3 that indicates this. Bits 0, 1, and 2 correspond to the object header for the array. Bits 0 and 1 should always be set, and bit 2 should always be clear. (Actually, there may be some nebulous-ness about bit 1 when we start doing precise garbage collection since the second field in the header could be a hashcode or a pointer.) 2000-06-07 C. Scott Ananian * .cvsignore: Reverting last change to .cvsignore. * Backend/StrongARM/CodeGen.spec: The StrongARM systems we use contain a screwy mix of calling conventions. Fixed bug with __floatdisf (long-to-float conversion) and __floatdidf (long-to-double conversion) using the wrong return-value calling convention. 2000-06-07 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/MAInfo.java, .cvsignore: Stuff 2000-06-06 salcianu * Main/SAMain.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java: Some changes done in the last days. The hack for the unstarted Thread objects vs. stack allocation has not been implemented so don't rush into testing yet. 2000-06-06 C. Scott Ananian * Analysis/SSxReachingDefsImpl.java: Moved implementation of ReachingDefs for SSA/SSI form from ToTreeHelpers into a public class in the harpoon.Analysis package. Added a little bit (not too much) javadoc for it in the process. The new public class is harpoon.Analysis.SSxReachingDefsImpl. * Analysis/SSxReachingDefsImpl.java: New file. * IR/Tree/ToTree.java, IR/Tree/ToTreeHelpers.java: Moved implementation of ReachingDefs for SSA/SSI form from ToTreeHelpers into a public class in the harpoon.Analysis package. Added a little bit (not too much) javadoc for it in the process. The new public class is harpoon.Analysis.SSxReachingDefsImpl. * Backend/Runtime1/TreeBuilder.java: Karen pointed out that OBJECT_HEADER_SIZE hadn't been properly updated when we changed the hashcode field to POINTER_SIZE (from WORD_SIZE). Of course, on the StrongARM POINTER_SIZE==WORD_SIZE, so no one could tell that it was broken... * Backend/Runtime1/StubCode.java: emit monitorlock/unlock calls for synchronized native methods. 2000-06-05 C. Scott Ananian * Support/nativecode-makefile.template: Documentation update (missing hyphen in sample command-line). 2000-06-01 C. Scott Ananian * Util/DisjointSet.java: Slightly different assertion for disjointedness of arguments to union: this way we check that the *representatives* of the arguments are disjoint, as well as handling the argument==null case without throwing an exception. 2000-05-31 C. Scott Ananian * Main/SAMain.java: Convert to Tree form via low-quad-ssa. * Main/Options.java: add extra low-quad-ssa option to command-line code factory specification. * IR/Tree/ToTree.java, IR/Tree/ToTreeHelpers.java, IR/Tree/TreeCode.java: Allow conversion to Tree form directly from SSA form (in addition to the SSI and NoSSA conversions already permitted). * IR/LowQuad/LowQuadSSA.java, IR/Quads/SSIToSSA.java: Add LowQuadSSA as a full-fledged LowQuad representation. * IR/Quads/SSIToSSA.java: New file. * IR/Quads/ToSSI.java: Remove a bit of incomplete, unused code. * IR/LowQuad/LowQuadSSI.java: Documentation fixes. * Analysis/Quads/DeadCode.java, IR/LowQuad/LowQuadVisitor.java, IR/Quads/RSSIToNoSSA.java, IR/Quads/ToNoSSA.java, Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/BasicInductions.java, Analysis/SSITOSSAMap.java, Analysis/ToSSA.java: Added switch in LowQuadVisitor constructor to toggle 'strictness' in rejecting non-LowQuad constructs. This makes it *so* much easier to create a visitor that works for both Quad and LowQuad forms. Went back and cleaned up a lot of old LowQuadVisitor-using code, using this new constructor flag. 2000-05-31 salcianu * Analysis/PointerAnalysis/PointerAnalysis.java: Small changes 2000-05-31 pnkfelix * Backend/Generic/RegFileInfo.java, Util/Collections/MultiMap.java, Analysis/Instr/LocalCffRegAlloc.java: FSK: 1. LocalCffRegAlloc produces output that assembles again! FSK: Unfortunately, its segfaulting on execution, but hey, its FSK: progress. FSK: 2. Documentation updates to MultiMap FSK: 3. Notes in RegFileInfo; I will soon yank PreassignTemp out of FSK: RegFileInfo because it is totally unneeded additional FSK: complexity for the backend implementor (bad). Instead the FSK: functionality will be isolated completely to the RegAlloc FSK: modules, with relatively little added complexity (or at least FSK: little added complexity that wasn't going to be FSK: necessary anyway) 2000-05-26 salcianu * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/PointerAnalysis.java: Small changes 2000-05-25 pnkfelix * Analysis/Instr/EqTempSets.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegFile.java: FSK: 1. Move the EqTempSets class out of LocalCffRegAlloc into its FSK: own file (mostly to try to cut down on the size of LCRA, FSK: though the class may find use in other kinds of allocation, FSK: especially if I find a way to generalize it a touch more... FSK: (its register-typing is an ugly hack right now...) FSK: 2. Continuing work on getting LocalCffRegAlloc working... have FSK: continued to be befuddled by various issues with Move FSK: Coalescing... am coming close to making the RegFile a FSK: MultiMap in suggestRegAssignment, but I'd like to avoid that FSK: if possible (MultiMaps have their place, but there should FSK: be a better way to handle the problems I'm getting...) * Analysis/Instr/EqTempSets.java: New file. * Analysis/BasicBlock.java: FSK: 1. Move the EqTempSets class out of LocalCffRegAlloc into its FSK: own file (mostly to try to cut down on the size of LCRA, FSK: though the class may find use in other kinds of allocation, FSK: especially if I find a way to generalize it a touch more... FSK: (its register-typing is an ugly hack right now...) FSK: 2. Continuing work on getting LocalCffRegAlloc working... have FSK: continued to be befuddled by various issues with Move FSK: Coalescing... am coming close to making the RegFile a FSK: MultiMap in suggestRegAssignment, but I'd like to avoid that FSK: if possible (MultiMaps have their place, but there should FSK: be a better way to handle the problems I'm getting...) 2000-05-25 salcianu * Analysis/MetaMethods/MetaCallGraphImpl.java: Fix in the MetaCallGraph stuff. Because each method can implicitly throw an exception that is subclass of java.lang.Error and java.lang.RuntimeException, these exception need to be considered even if they are not returned by HMethod.getExceptionTypes(). * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/PointerAnalysis.java: Code cleaning. * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PointerAnalysis.java, Main/PAMain.java: Bug fix, code cleaning and improved Javadoc. Before doing the code cleaning I checked the PhoneServer and it was working. 2000-05-24 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegFile.java, Analysis/BasicBlock.java: FSK: 1. Made changes to BasicBlock conditional on DEBUG flag (to check FSK: if they're the cause of speed issues Alex is having) FSK: 2. Reorganized the code in LocalCffRegAlloc to be more easily FSK: understood and modular (in preperation for sharing code FSK: between visit methods FSK: 3. Added documentation to RegFile 2000-05-23 pnkfelix * Main/SAMain.java, Util/Collections/CollectionFactory.java, Util/Collections/LinearSet.java, Util/Collections/ListFactory.java, Analysis/BasicBlock.java, Analysis/Instr/LocalCffRegAlloc.java: FSK: 1. Documentation updates (both to javadoc and to internal FSK: comments) FSK: 2. Made the BasicBlock.updateBasicBlocks method private FSK: to reflect the fact that it is unneeded and probably will FSK: be deleted (easier than commenting it out, but less FSK: risky than deleting it outright) * Util/Collections/BitSetFactory.java, Util/Collections/GenericMultiMap.java, Util/Collections/MultiMap.java, Util/DisjointSet.java, Util/Indexer.java, Util/LinearMap.java, Analysis/BasicBlock.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/RegFile.java, Backend/Generic/Code.java, Backend/Generic/InstrBuilder.java, Backend/Generic/RegFileInfo.java, Backend/Sparc/RegFileInfo.java, Backend/StrongARM/Code.java, Backend/StrongARM/RegFileInfo.java, IR/Assem/Code.java, IR/Assem/Instr.java: FSK: Yuck. FSK: I've changed lots and lots of classes over the past few FSK: weeks/months to support my Register Allocation Code. FSK: FSK: Also, a lot of this is documentation updates that have just FSK: accumulated over time. * Analysis/Instr/LocalCffRegAlloc.java: FSK: Many changes to this file, mostly in an attempt to make FSK: move coalescing work properly. FSK: it still doesn't, but its really really close now. FSK: in the process of developing this, I discovered that I FSK: was modifying the internal structure of a BasicBlock FSK: at the same time that i was doing a traversal of it. FSK: needless to say, this caused bugs that were difficult FSK: to identify. Luckily, most IRs aren't mutable FSK: (just Instr form as far as I know) and so no one else FSK: should really encounter this problem. FSK: Anyway, to fix that bug, I finally changed the program FSK: to only perform its modifications to the IR *in between* FSK: traversals. This was actually a much simpler change than FSK: I had thought it would be. Yay. * Util/Collections/ListFactory.java, Util/LinearSet.java, Util/ListFactory.java: @RENAME Util/ListFactory Util/Collections/ListFactory@ @RENAME Util/LinearSet Util/Collections/LinearSet@ FSK: Also discovered that I had stupidly named two classes FSK: the same thing. Well, its not THAT stupid, since FSK: Util.ListFactory was around long before I came FSK: up with the Util.Collections package FSK: in any case, this change goes hand in hand with the FSK: moving of LinearSet to Util.Collections * Util/Collections/LinearSet.java: @RENAME: Util/LinearSet.java Util/Collections/LinearSet.java@ FSK: Decided that forcing LinearSet to always be an ArraySet might FSK: not be the best choice; for example Sets with lots of element FSK: removal might be better of with a LinkedList (maybe?) In any FSK: rather than introduce a dependency from Util to Util.Collections, FSK: I moved the class from Util to Util.Collections, which doesn't FSK: really affect anyone's code but mine (and some of andyb's) since FSK: no one else has used LinearSet as far as I can tell. * Util/Collections/LinearSet.java: New file. 2000-05-20 C. Scott Ananian * Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/Stats.java, Main/PAMain.java: Semicolons after the closing brace of an inner class is not legal Java syntax, even though javac and jikes accept it without complaining. 2000-05-20 salcianu * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/Stats.java, Main/PAMain.java, Analysis/MetaMethods/MetaCallGraphImpl.java, .cvsignore: Improving the Thread allocation 2000-05-20 C. Scott Ananian * homeBackend/Runtime1/DataClaz.java: Slightly less evil way to include EVIL EVIL HACK to work around broken Relinker when doing compiling after an EventDriven transformation. 2000-05-20 bdemsky * homeBackend/Runtime1/DataClaz.java: HACK TO FIX BROKEN LINKER FOR DATACLAZ. 2000-05-19 bdemsky * Support/EventDriven1.jar: Fixes. 2000-05-18 salcianu * Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/Relation.java: Removing some debug messages 2000-05-18 bdemsky * Support/EventDriven1.jar: Fixed ED.jar 2000-05-18 salcianu * Analysis/PointerAnalysis/InterThreadPA.java: Commit the last changes * Analysis/PointerAnalysis/MAInfo.java: One more bug was fixed. I totally agree with Brian that we shouldn't write code at 3am! 2000-05-18 bdemsky * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/CloningVisitor.java: Incredibly evil heinous bug... * Support/EventDriven1.jar: Fixed jar. 2000-05-17 salcianu * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/PASync.java: More debug messages are off * Analysis/PointerAnalysis/MAInfo.java: Some debug messages were removed * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PASync.java, Analysis/PointerAnalysis/ParIntGraph.java: This is a more serious bug fix for the last problem we found (that was temporarily fixed in the previous message). The problem was the following: to cope with the recursivity, I put a threshold on the length of a specialization chain; the rules for stopping specializing nodes where good, but the ones for specializing actions are more delicate than I thought: we should specialize action that depassed the threshold but contain at least one node that can be further specialized. As the number of nodes in an action is finite and each each internal node can be specialized only a finite number of time, we don't enter an infinite loop. I recognize this message is anything but clear; you can always ask me directly. * Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointsToGraph.java: Temporary Bug Fix * Analysis/PointerAnalysis/InterProcPA.java: Nothing important * Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/MyAP.java: Fixed a minor thing to compply with Scott's requirements: if "l = NEW T()" creates an thread object (i.e. makeHeap() == true) and that object is allocated on the newly created heap, not only canBeThreadAllocated is true but also allocationHeap == null (it was l before). * Main/PAMain.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/MyAP.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/PredicateWrapper.java, Analysis/PointerAnalysis/Relation.java: Every day, in every way, I'm getting better and better! \'Emile Cou\'e (I have no clue who the guy is/was. I found this in a book on Network Flows) The TestMe.java example that Scott gave me (and I modified a bit) works now. 2000-05-17 C. Scott Ananian * Backend/Runtime1/NiftyAllocationStrategy.java, Analysis/Maps/AllocationInformation.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/MyAP.java, Analysis/EventDriven/CloningVisitor.java, Analysis/AllocationInformationMap.java, Analysis/DefaultAllocationInformation.java: Rename AllocationInformation.useOwnHeap() to makeHeap() and clarify its use. makeHeap() can be true even when canBeThreadAllocated() is false; see the javadoc for AllocationInformation for more information. * Backend/Runtime1/NiftyAllocationStrategy.java: Differentiate cases where thread object is allocated on its own thread heap from case where thread object must be allocated globally. * IR/Quads/SSIRename.java: Updated SSIRename to better propagate Derivation information during renaming. PHI/SIGMA functions still get their Derivation info stripped. * IR/LowQuad/DerivationMap.java: Added generic map class to implement most-commonly needed functionality of Derivation objects. * IR/LowQuad/DerivationMap.java: New file. 2000-05-17 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PointerAnalysis.java: Small modification 2000-05-16 C. Scott Ananian * IR/Quads/Code.java: Bits of code which are intended to work with both Quad and LowQuad form work much better if Quad.Code implements getDerivation() and simply returns null. This saves lots of nasty instanceof tests for the presence of valid Derivation information. * Analysis/LowQuad/Loop/MyLowQuadNoSSA.java, Analysis/LowQuad/Loop/MyLowQuadSSI.java, IR/Tree/ToTree.java, IR/LowQuad/Code.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSI.java: Fix IR.LowQuad.Code so that it doesn't implement Derivation directly (which is ugly) -- instead it implements a getDerivation() method which returns the proper Derivation object for the Code. 2000-05-16 salcianu * Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/Stats.java: More statistics. 2000-05-15 salcianu * Analysis/PointerAnalysis/Stats.java: Minor change. * Analysis/PointerAnalysis/Stats.java: Some bytecode size statistics were added * Main/PAMain.java, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointsToGraph.java: This was a very nasty bug ... Anyway, GameServer should be OK now. * Main/PAMain.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/MAInfo.java: Small changes 2000-05-14 bdemsky * Analysis/EventDriven/CloningVisitor.java: More bugs... 2000-05-14 salcianu * Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Main/PAMain.java: Being BIG, brilliant and creative. 2000-05-14 bdemsky * Analysis/EventDriven/AsyncCode.java: Flip Native Modifier off.... 2000-05-14 salcianu * Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/PANode.java, Main/PAMain.java: It should work know. I tested it on PhoneServer and it appeared to be OK. Don't forget to deactivate jit before running this. * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PointerAnalysis.java: Progressing toward a bug-free version of PA. 2000-05-13 C. Scott Ananian * IR/Quads/SSIRename.java: AllocationInformation is now preserved during SSIRename. Derivation information is still being discarded. * IR/Quads/QuadSSI.java, IR/Quads/SSIRename.java, IR/LowQuad/LowQuadSSI.java: Changed interface to SSIRename to eliminate inner ReturnTuple class and centralize Derivation and AllocationInformation processing. 2000-05-12 salcianu * Analysis/PointerAnalysis/InterProcPA.java: Bug fix in InterProcPA 2000-05-11 bdemsky * Analysis/Maps/AllocationInformation.java, Backend/Runtime1/NiftyAllocationStrategy.java: Fix defective comment and problems it caused... We really shouldn't code stuff at 3am... 2000-05-11 salcianu * Main/PAMain.java: Small changes * Analysis/PointerAnalysis/InterProcPA.java: Searching for a bug 2000-05-10 salcianu * Main/PAMain.java: some pretty-printer facility added in the PAMain * Main/PAMain.java, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/Matching.java: *** empty log message *** 2000-05-09 C. Scott Ananian * Support/Lex.jar: Updated Lex.jar binary to JLex version 1.2.5b6, built from seperate sources for better line number information. This is just so that the native JLex binaries I'm currently building have line number information which correspond to some version we actually have sources for. The previously-checked in JLex binary was for some intermediate revision between 1.2.4 and 1.2.5 which was "current" on my development branch at the time I build the class files in Mar 1999. 2000-04-16 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/MAInfo.java: A new flag was added to PAMain: --noit (this stands for No Inter Thread analysis). It is supposed to help us generate some numbers for tomorrow's presentation. 2000-04-14 bdemsky * IR/Quads/RSSIToNoSSA.java, Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/LowQuad/Loop/MyLowQuadNoSSA.java, Analysis/LowQuad/Loop/MyLowQuadSSI.java: Fixes to get the Loop Optimizations to work...All I need now is Scott's derivation fixes... * Analysis/Quads/DeadCode.java: I don't use this file for a few months, and someone goes and sneaks bugs into it....Can you believe this...AHHHH.... I fixed the bug. * IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSI.java, IR/Quads/RSSIToNoSSA.java, IR/Quads/ReHandler.java, Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/LowQuad/Loop/MyLowQuadNoSSA.java: Loop fixes. If anyone has any complaints about some Private->Protected or Protected->Public changes, let me know...I figured it was preferable to do this instead of writing entire other classes just for this feature... * Analysis/LowQuad/Loop/MyLowQuadNoSSA.java: New file. 2000-04-13 C. Scott Ananian * IR/Quads/SSIRename.java, IR/LowQuad/LowQuadSSI.java: Preliminary support for LowQuadNoSSA -> LowQuadSSI conversion using Quads.SSIRename. 2000-04-07 bdemsky * Main/SAMain.java: Added the -l option for loop optimizations. Added documentation of the -i and -l options. Now to test -l... * Analysis/LowQuad/Loop/LoopOptimize.java: Changed flags for breaking SSI...:) 2000-04-06 pnkfelix * Util/LinearSet.java: FSK: 1. Oops. used set() instead of add(). Stupid me. Bad felix. * Analysis/BasicBlock.java, Util/CombineIterator.java, Util/LinearSet.java: FSK: 1. Added a new ctor to CombineIterator to make its use in FSK: the common case of a pair of iters more readable FSK: 2. In response to a beef of Alex's w.r.t. BasicBlock, FSK: I made a change to which set representation is FSK: used in the BasicBlock.Factory. I should do the same FSK: for other parts of BasicBlock, I just got distracted FSK: by the fact that its meeting time. In any case, FSK: I don't see a reason to choose Arrays over LinearSet FSK: for stuff like this... FSK: 3. Added a LinearSet(Set) ctor to LinearSet to make it FSK: more easily usable for cases like that of (2)... note FSK: that it relies on the Set property being satisfied FSK: by the argument (I felt that this was not a bad thing FSK: to do, since it is mandated by the Set interface... FSK: comments?) 2000-04-06 bdemsky * Main/EDXMain.java: Forgot to check in the serialization stuff. * Analysis/EventDriven/CloningVisitor.java: Fix for non Static methods. * Support/EventDriven.jar, Support/EventDriven1.jar, Support/EventDriven1T.jar: Updated EventDriven jar files....Latest builds from the EventDriven CVS. * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/CloningVisitor.java: Build wrappers around Native Methods. * Analysis/EventDriven/CloningVisitor.java: Only activate fix if optimistic. * Analysis/EventDriven/CloningVisitor.java: Fixes for compiling the GameServer optimistically...Turns out that I had forgotten to handle null's correctly for the optimistic case. Continuations have to generate their own nulls, so that typing works okay...But for the optimistic case, you have to leave in the sigma functions...This should fix this...And the case where there are two sigma functions with the same source...Scott, is this possible? 2000-04-04 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: The skiff/netwinder boxes use gcc's -mhard-float option to build the C libraries, runtime system, & etc --- this means that floating point return values are passed in (floating point register) f0 instead of (integer registers) r0/r1. Calling C code from java programs becomes somewhat, er, *interesting* --- because the two sides don't agree on where to find the return address. But that's *exactly* why NATIVECALL is present in the Tree IR! So now when generating StrongARM code for NATIVECALLs to functions-which-return-floats, use the odd C calling convention (retval in f0) instead of our 'normal' calling convention. This only fixes half the Java-calling-C part of the problem. We also need to fix the runtime system so that C-calls-to-Java also work; a patch for Harpoon/Runtime is shortly forthcoming. 2000-04-04 bdemsky * Analysis/PointerAnalysis/MAInfo.java: FIX for Alex's stuff. * Support/EventDriven1.jar: Newest jar 2000-04-04 C. Scott Ananian * ClassFile/Loader.java: Evil evil hack to allow classes saved with the systemLinker to be reloaded using a relinker. 2000-04-04 salcianu * Analysis/PointerAnalysis/MAInfo.java: Improvements in the strategy for the thread head allocation. A node is allocated on the thread even if it escapes into its caller (but not into another thread). * Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/PointsToGraph.java: Some small adjustements. * Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/MyAP.java, Main/PAMain.java: Added serialization. 2000-04-04 bdemsky * Main/EDXMain.java, Main/SAMain.java: Serialization solutions...Waiting on scott's relinker solution. * Main/EDXMain.java: New file. * Main/SAMain.java: Serialization option. * Test/PA/servers.jar: Servers for Whaley...Use GameServer2 not GameServer. * Test/PA/servers.jar: New file. 2000-04-04 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/ArtificialTempFactory.java, Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/MyAP.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointsToGraph.java: The long awaited memory allocation info map has been implemented. (Although it still needs some debugging). I hope that at least the interface will remain the same. 1. MAInfo.java is the map allocation site (quad) -> allocation policy 2. MyAP.java is my implementation of Scott's interface AllocationProperties (take care: Scott has its own implementation with the same name). Unless you want to hack my implementation you shouldn't be concerned with that class. PAMain.java has been modified with some new command line option "--mamaps" (memory allocation maps). I'm calling Code.setAllocationInformation in the right places; there is still no serialization so, if you want to use it, go to PAMain - the ma_maps method - and do your stuff with the MAInfo object produced there. * Analysis/PointerAnalysis/MAInfo.java, Analysis/PointerAnalysis/MyAP.java: New file. 2000-04-04 C. Scott Ananian * IR/Quads/RSSIToNoSSA.java: simple bugfix. * IR/Quads/QuadNoSSA.java, IR/Quads/QuadSSI.java, IR/Quads/SSIRename.java, IR/Quads/ToNoSSA.java, IR/LowQuad/Translate.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSI.java, Analysis/Quads/SCC/SCCOptimize.java, Analysis/Quads/DeadCode.java, Analysis/LowQuad/Loop/LoopOptimize.java: Propagate AllocationInformation all over the place. 2000-04-03 bdemsky * Analysis/EventDriven/CloningVisitor.java: need the parenthesis * Analysis/EventDriven/CloningVisitor.java: Extraneous condition. * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/CloningVisitor.java, Analysis/EventDriven/ContCodeNoSSA.java, Analysis/EventDriven/ContCodeSSI.java, Analysis/EventDriven/EventDriven.java, Analysis/EventDriven/ToAsync.java, IR/Quads/RSSIToNoSSA.java: This is the, wow, it compiles release... 2000-04-03 C. Scott Ananian * IR/Tree/ToTree.java: ToTree will now use the AllocationProperties of the given LowQuad Code, or DefaultAllocationInformation if the Code does not have AllocationInformation. * Backend/Runtime1/NiftyAllocationStrategy.java, IR/Tree/ToTree.java, Analysis/AllocationInformationMap.java, Analysis/DefaultAllocationInformation.java: Fixup existing code with new useOwnHeap() method of AllocationProperties. Make AllocationInformation and AllocationProperties methods serializable. * Main/Lint.java: Commit this tiny improvement to the Lint tool to get it out of my source tree. * Analysis/Maps/AllocationInformation.java: New allocation property! oh, boy! This flag indicates that the object should be created on *it's own* heap. Thread creation will use this property. * IR/Quads/Code.java: quick-and-oh-so-dirty fix to the problem of associating allocation information to hcodes. * Backend/StrongARM/Frame.java: Allow command-line selection of allocation strategy. NOTE NOTE NOTE: the -Dharpoon.alloc.func=GC_malloc command line option needs to be changed to -Dharpoon.alloc.strategy=bdw after you make update! * Analysis/AllocationInformationMap.java, IR/Tree/ToTree.java: Whoops! In my rush to set up a standard set of AllocationProperties classes, I checked in broken code. Bad Scott. * Analysis/AllocationInformationMap.java: A simple implementation of AllocationProperties as inner class AllocationPropertiesImpl of AllocationInformationMap. Maybe not the best place to hide this, but it'll do for now. * Backend/Runtime1/AllocationStrategy.java, Backend/Runtime1/AppelAllocationStrategy.java, Backend/Runtime1/BDWAllocationStrategy.java, Backend/Runtime1/MallocAllocationStrategy.java, Backend/Runtime1/NiftyAllocationStrategy.java, Backend/Runtime1/NullAllocationStrategy.java, Backend/Runtime1/TreeBuilder.java, IR/Tree/ToTree.java: Modify the Tree form back end to pass around AllocationProperties. * Backend/Runtime1/BDWAllocationStrategy.java, Backend/Runtime1/NiftyAllocationStrategy.java: New file. * Backend/Generic/Runtime.java: Modify the Tree form back end to pass around AllocationProperties. * Analysis/DefaultAllocationInformation.java: Make the hasInteriorPointers() method public and static for Alex to use. * Analysis/AllocationInformationMap.java: oops. added javadoc to describe new class. * Analysis/AllocationInformationMap.java: Convenience method to make transfering allocation information from one form to another easier. * Analysis/AllocationInformationMap.java: New file. * Analysis/DefaultAllocationInformation.java: A simple implementation of AllocationInformation, for testing purposes. * Analysis/DefaultAllocationInformation.java: New file. 2000-04-03 salcianu * Main/PAMain.java: Modifications in my main test program; the maps for Scott will be produced there. * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java: After I fixed the bug found by John Whaley, we run back into huge execution time (due to entering a nest of mutually recursive methods related to java.util.Collections - Set, Map, Hashtable etc. The fix consisted of skipping the call sites with too many callees (the limit value is in InterProcPA.MAX_CALLEES - currently 5). The running time for the server examples is about 400s user time (on my machine P2 400Mhz 128Mb RAM). Without a better call graph, that's all I can do! * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/ParIntGraph.java, Main/PAMain.java, Analysis/MetaMethods/MetaCallGraphImpl.java: 1. John Whaley signaled a bug. I found the problem and I hope it's fixed. 2. I changed th indentation style in Paul's PhoneServer. * Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PANode.java: Aesthetic changes (I hope I found the right spelling). * Analysis/PointerAnalysis/PointerAnalysis.java: Commenting some debug stuff. * Util/LightBasicBlocks/LBBConverter.java, Util/LightBasicBlocks/SCCLBBFactory.java, Util/TypeInference/ArrayInfo.java, Util/TypeInference/TypeInference.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PointerAnalysis.java, Main/PAMain.java, Analysis/MetaMethods/FakeMetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphAbstr.java, Analysis/MetaMethods/MetaCallGraphImpl.java: Guys, we are saved! I found a bug in the meta call graph which combined with th imprecisions of the initial set of roots, producing a nightmare ... The test whcih swallowed 800M on maserati (in 30 hours!), executed on my machine in less that 7 minutes! La vita e bella! * Test/PA/Str2StrMap.java: New file. * Test/PA/Str2StrMap.java: added Str2StrMap.java * Util/TypeInference/ArrayInfo.java, Util/TypeInference/ExactTemp.java, Util/TypeInference/TypeInference.java, Util/LightBasicBlocks/LBBConverter.java, Util/LightBasicBlocks/SCCLBBFactory.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PointerAnalysis.java: Here is some new version of the pointer analysis stuff. Some modifications were made: 1. the edge ordering relation turned out to be really expensive to maintain and not very useful (for recursive methods or methods with loops, it seems to become OxI). It has been dumped over the bord! (everything is controlled by the PointerAnalysis.IGNORE_EO flag) 2. When a node reached the upper limit of the specialization chain, it doesn't contain precise information about the call chain that created it. For example, if that limit is 2, nodes on level 0 represent objs allocated in the current method, nodes on level 1 represent obj allocated in the immediate callees and nodes on level 2 represent objects allocated on call path of 2 or more CALLs. Since the call path info is not precise, instead of generating one specialized node for each call site, I just generate a single one (for all the call sites) called "bottom". This happens *only* for nodes at the edge of the specialization limit (who were anyway impossible to use into optimizations), the other nodes are not affected This is siupposed to reduce the number of unuseful specializations. 3. Some aggressive shrinking strategy has been adopted for graphs: at the end of a method, after retaining only that part of the graph which is reachable from the outside, the LOAD nodes which don't have any sync action or inside edge in teh tree rooted in them are eliminated. This is not good for some PA uses (for example, if we just try to determine how far into the memory is one application reading) but is OK for us. Controlled by the ParIntGraph.AGGRESSIVE_SHRINKING flag. Supposed to reduce the quantity of outside edges and outside nodes that we carry from one method to another (especially in nests of mutually recursive methods). 4. A simpel type inference package was added to detect the AGET operations on arrays of primitive types (eg int[], char[]) These arrays are not relevant for the PA; this way we eliminate some potential load nodes. 2000-04-02 salcianu * Analysis/PointerAnalysis/InterProcPA.java: A small bug fix. * Util/LightBasicBlocks/SCCLBBFactory.java, Util/TypeInference/ArrayInfo.java, Util/TypeInference/CachingArrayInfo.java, Util/TypeInference/ExactTemp.java, Util/TypeInference/TypeInference.java: More modifications ... * Util/TypeInference/ArrayInfo.java, Util/TypeInference/CachingArrayInfo.java, Util/TypeInference/ExactTemp.java, Util/TypeInference/TypeInference.java: New file. * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PointerAnalysis.java, Main/PAMain.java, Analysis/MetaMethods/MetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphAbstr.java, Analysis/MetaMethods/MetaCallGraphImpl.java: More modifications ... * Test/PA/t: some playing with cvs * Test/PA/t: New file. * Test/PA/t: polymorphic hacks * Test/PA/Hashtable.template, Test/PA/s: New file. * Test/PA/Hashtable.template, Test/PA/s: hacks for destroying polymorphism * Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/Matching.java, Analysis/PointerAnalysis/PAEdgeSet.java: Some spped-up tricks. Desperately trying to make the entire thing go faster ... 2000-04-02 C. Scott Ananian * IR/Tree/ToTree.java: Add debugging option to check that all invoked methods are non-null. This helps track down segfaults due to ClassHierarchy problems. Use -Dharpoon.check.dispatch=yes on the command-line to enable. 2000-04-02 salcianu * Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointsToGraph.java: Useful stuff ... 2000-04-02 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Keep our stack pointer safely above the area of the stack we're using, so that handling asynchronous signals doesn't stomp all over our data. 2000-04-02 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java: I'm using the cvs repository only as a buffer between my station and some other machines I'm using for testing. Sorry for the e-mails you receive ... 2000-04-01 C. Scott Ananian * ClassFile/HClassProxy.java: Better unserialization for HClassProxys... supports unserializing synthetic classes. 2000-04-01 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java: Stuff ... 2000-04-01 C. Scott Ananian * ClassFile/Relinker.java: bug fix for bdemsky: methods were being passed HClassSyns for parameter comparisons, instead of the non-proxied HClasses they were expecting. * ClassFile/HClassCls.java: javadoc fix. * prj.el: JDE->New will work better with non-Harpoon/Code paths now. 2000-04-01 bdemsky * Analysis/EventDriven/CloningVisitor.java, Analysis/EventDriven/ToAsync.java: Umm...Scott, if you are looking for your bug, you might need this fix to get it... This enables all of the ED substitutions... 2000-03-31 C. Scott Ananian * Backend/CSAHack/RegAlloc/Set.java: Improve memory efficiency a little bit. Add toString() method to make debugging a bit easier. * Backend/CSAHack/RegAlloc/Color.java: Bugfix for regalloc problem brian found. * Backend/StrongARM/CodeGen.spec, Backend/CSAHack/RegAlloc/Code.java: Index hacked-regalloc spills by FP instead of by SP, so that we can do stack-allocation w/o screwing w/ our spilled regs. 2000-03-30 C. Scott Ananian * Util/HClassUtil.java, Main/EventDriven.java, Tools/Annotation/Java12.cup, Interpret/Tree/StaticState.java, IR/Tree/ToTree.java, homeBackend/Runtime1/DataClaz.java, Analysis/Quads/QuadClassHierarchy.java, Analysis/TypeInference/ClassCone.java, Analysis/EventDriven/ToAsync.java: Util/HClassUtil.arrayClass() was not relinker-safe. We added a new 'linker' argument to make it so --- which necessitated lots of isolated changes to existing code in order to pass in the correct linker. [The problem, basically, was that arrayClass(HClass.Byte, 3), for example, would always return an HClassArray from the systemLinker linker, instead of an HClassArray from the appropriate relinker.] * Backend/CSAHack/RegAlloc/RegAlloc.java: Show register allocation progress. 2000-03-30 salcianu * Analysis/PointerAnalysis/InterProcPA.java: Some missing pieces. 2000-03-30 C. Scott Ananian * Analysis/Maps/AllocationInformation.java: First draft of a map to enumerate possible allocation types, given an allocation site. * Analysis/Maps/AllocationInformation.java: New file. 2000-03-30 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PointsToGraph.java: Lots, lots of changes: 1. rewrite of the PAEscapeFunc class. It turns out that we are not concerned about the specific call site (to a native method) where a node escapes - all we need is to know if it escapes through a method or not. This is because once a node escapes into a native method, it is escaped forever. This new version should reduce somehow the memory consumption. 2. Some native methods are treated specially instead of just being considered holes: java.lang.Systsem.arraycopy, java.lang.Throwable.fillInStackTrace and java.lang.Thread.setPriority0(). Others to come ... 2000-03-30 C. Scott Ananian * ClassFile/HClass.java, ClassFile/HClassImpl.java, ClassFile/HClassProxy.java, ClassFile/HFieldImpl.java, ClassFile/HFieldProxy.java, ClassFile/HMemberProxy.java, ClassFile/HMethodImpl.java, ClassFile/HMethodProxy.java, ClassFile/Relinker.java: Important Relinker fixes: 1) Serialization updates to make sure HClassProxys stay in sync with the Relinker's descCache after reconstruction. 2) Serialization updates to make sure HMembers stay in sync with the Relinker's memberMap after reconstruction. 3) More assertions to wrap/unwrap/relink to ensure that we don't have bogus proxied-proxied-proxy chains going on. 4) moved getMethod/getMethods and getField/getFields methods to HClass from HClassImpl, and removed implementation from HClassProxy. Before, the proxy was being handed arrays of HMethods half of which (from the local HClassSyn) needed to be wrapped, and half of which (from the HClassSyn's HClassProxy superclass) did not. We were wrapping all of them anyway, which resulted in HMethodProxys pointing to HMethodProxys, causing a lot of trouble. Now getMethods() operates "outside the box" so it sees only HClassProxys in the relinker case, and all is well. * ClassFile/Loader.java: Add toString() methods to ClassFile.Loader, to make it easier to determine where a class is being loaded from if things appear to be funky. * ClassFile/ImplMagic.java: Store bytecode in top-level repository indexed by method class/name/descriptor string, instead of by HMethod, to allow us to fetch it from a CodeFactory using a non-systemLinker linker. * ClassFile/HClassCls.java: More descriptive exception message if method not found. * IR/Quads/CALL.java: Better argument checking. * Main/EDMain.java: Split stage 3 into two pieces, as we typically fail during the second. 2000-03-30 salcianu * prj.el: Once upon a time ... I did a change to prj.el, without thinking it is shared by everybody. In consequence, my e-mail address appeared almost everywhere. Sorry, I removed the wrong line, I hope that after the deadline we will fix everything. * Main/PAMain.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/MetaMethods/MetaCallGraphAbstr.java: One of the previous modifications was put in the wrong place. Fixed. 2000-03-29 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/InterProcPA.java: 1. Modifications in the test program to show info only about the methods reacahable (i.e. callable) from "main", ignoring those that are called only by the JVM (before starting main). This eliminates some unuseful messages. 2. In the inter-procedural analysis, if a call site has no callee, it means it never appears in practice (some classes are not instatiated: a good example is SecurityManager - if the programmer doesn't set up any (and none is set up by the JVM (or browser), no method from that class can be called). So, to conclude, the call should be simply ignored, instead of considering it a hole as before. Of course, this rely on the supposition that ClassHierarchy and (Meta)CallGraph are not buggy. * Analysis/PointerAnalysis/PASync.java: Added a new class to model the sync actions. * Analysis/PointerAnalysis/PASync.java: New file. * Analysis/PointerAnalysis/ListCell.java: A small class to implement a simple linked list. * Analysis/PointerAnalysis/ListCell.java: New file. * Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/ActionVisitor.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/ParActionVisitor.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Main/PAMain.java, Test/PA/Test3/multiset.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/MetaMethods/MetaMethod.java: Added call path and thread specialization for the sync actions. This should allow John Whaley to find the exact Quad which did a sync on a specific node even if this is not in the current method (of course, that Quad is recorded in the sync action - more memory!) 2000-03-29 C. Scott Ananian * Main/EDMain.java: Fixes for EDMain -- the 'HMethod mo' didn't match the linker when we reloaded a saved stage. * ClassFile/ImplMagic.java: Regularize the hashCode() methods. They all use a transient cache, now. * Main/EDMain.java: Rework EDMain so that it operates in stages, serializing state and writing it out after each. This lets us (me) trace down bugs more easily, since I don't have to re-run all the preceding analyses to get to the one that's broken. * Analysis/MetaMethods/GenType.java, Analysis/MetaMethods/MetaCallGraphAbstr.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/MetaMethods/MetaMethod.java: Make MetaCallGraphs serializable. (GenType and MetaMethod are now serializable, too). * ClassFile/HClassProxy.java, ClassFile/HMemberProxy.java, ClassFile/Relinker.java: Make classes/members loaded via Relinker Serializable. 2000-03-29 bdemsky * Support/EventDriven1T.jar: Thread Farm EventDriven jar. * Support/EventDriven1T.jar: New file. 2000-03-29 C. Scott Ananian * Main/EDMain.java: Revert last commit, since HMembers are now uniformly comparable again. * ClassFile/HFieldImpl.java, ClassFile/HMember.java, ClassFile/HMemberProxy.java, ClassFile/HMethodImpl.java: Make all HMembers Comparable. 2000-03-29 bdemsky * Main/EDMain.java: No TreeSets!!!!! The items aren't comparable! 2000-03-29 salcianu * Analysis/PointerAnalysis/PointerAnalysis.java: The caching strategy was too ambitious and I manage to get out of the 1G RAM of meserati!! Returned to some less ambitious attitude. 2000-03-29 bdemsky * Main/EDMain.java: Untested EventDriven/NativeCompilation main file. Basically SAMain+EventDriven...So we can do Martin's MM stuff. * Main/EDMain.java: New file. 2000-03-29 salcianu * Analysis/MetaMethods/SmartCallGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java: Bug fix. 2000-03-29 C. Scott Ananian * IR/LowQuad/Code.java: Make HCodes in LowQuad form serializable. * IR/Quads/Code.java, IR/Quads/Edge.java, IR/Quads/Quad.java: Make HCodes in Quad form serializable. * Temp/Temp.java: Make Temps and the 'TempFactory's returned by Temp.tempFactory(scope) serializable. * Util/Default.java: Make Default.comparator, Default.EMPTY_MAP, and the Lists returned by Default.pair() serializable. * Util/Tuple.java: Make Tuples serializable. * IR/LowQuad/LowQuadNoSSA.java, IR/Quads/QuadNoSSA.java, IR/Quads/ToNoSSA.java: Make derivations created by ToNoSSA serializable. Also, add getDerivation() method, instead of ToNoSSA implementing Derivation itself. This also trims memory usage, since everything but the Derivation can be garbage-collected. * IR/Bytecode/Code.java: Removed unused legacy method. * ClassFile/CachingCodeFactory.java: Add the ability to save the cached contents of a CachingCodeFactory. 2000-03-29 salcianu * Analysis/PointerAnalysis/PointerAnalysis.java: Playing with caches. 2000-03-28 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/PointerAnalysis.java: Two bugs were fixed in the PA. It should work fine now. * Analysis/PointerAnalysis/ParIntGraphPair.java: Small, convenient and unimportant class. * Analysis/PointerAnalysis/ParIntGraphPair.java: New file. * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Main/EventDriven.java, Main/PAMain.java, Util/LightBasicBlocks/LightBasicBlock.java, Analysis/MetaMethods/MetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphAbstr.java, Analysis/MetaMethods/MetaCallGraphImpl.java: Many modifications: 1. many options added to my test program (harpoon.Main.PAMain) 2. the MetaCallGraph was modified to provide accurate info about all the methods, even those which are not reachable from "main" (the methods called by JVM before main) 3. slight modification in Main/EventDriven to cope with the modification in MetaCallGraph 4. some modifications in the pointer analysis itself, to cope with the fact that CALL is an implicit if (depending on the exception returned from the callee). 2000-03-28 C. Scott Ananian * Backend/Runtime1/DataReflection2.java: Reflection tables were missing private members of superclasses. Fixed now. * Analysis/Quads/QuadClassHierarchy.java: Array clone methods are problematic: FLEX keeps them separate from java.lang.Object.clone() because Object.clone() can throw exceptions while .clone() is guaranteed *not* to throw an exception... the actual implementation of the two is rather different, too. But java bytecode conflates the two, which means that our input routines can not reliably distinguish between a call to Object.clone() and a call to .clone() w/o at least a type analysis. We hack around this for the time being by adding all .clone() methods to the callable methods set. Another solution might be to eliminate the separate .clone() method -- just use Object.clone() for both -- which means that the runtime's implementation of Object.clone() has to be fixed to dispatch the proper array clone method when appropriate. For primitive arrays this gets quite ugly. 2000-03-28 bdemsky * Analysis/EventDriven/CloningVisitor.java: Handle pesimistic recyclers....[Strange combination]. Also allow makeAsync's that are inherited. 2000-03-28 C. Scott Ananian * Backend/Runtime1/Runtime.java: More additions to the root set. 2000-03-27 salcianu * Analysis/PointerAnalysis/PointsToGraph.java, Main/PAMain.java, Analysis/MetaMethods/MetaCallGraphAbstr.java, Analysis/MetaMethods/MetaCallGraphImpl.java: Make the distinction between hasEscaped and willEscape. 2000-03-27 C. Scott Ananian * Backend/Runtime1/Runtime.java, Backend/Runtime1/StubCode.java: Kludge in implementations of all array clone methods. Another way we could have done it is to leave the nativeTreeCodeFactory alone and just add a line in StubCode to hard-redirect the destination JNI method to Java__3Ljava_lang_Object_2_clone() whenever a different array clone stub was being generated. But the way we're doing it lets us alias other functions too, if we later need more of this sort of thing. * Backend/Runtime1/ObjectBuilder.java: Attempt to make ObjectBuilder's hashcodes a little more repeatable. 2000-03-27 bdemsky * Support/sunthunk.jar: Split dtoa into different methods [ported from thunk2.jar]. I don't like waiting 20+ minutes for this method to compile...I suspect no one else does either. 2000-03-27 salcianu * Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PointsToGraph.java, Main/PAMain.java, Analysis/MetaMethods/MetaCallGraphImpl.java: unimportant changes. * Main/PAMain.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PointerAnalysis.java: Variate changes. 2000-03-27 C. Scott Ananian * homeBackend/Runtime1/DataClaz.java: Abstract methods shouldn't show up in the claz table, as there isn't really any code to go w/ them. 2000-03-26 C. Scott Ananian * Backend/Runtime1/ObjectBuilder.java: Fix ObjectBuilder to build proper hashcodes: pointer-sized, and with LSB equal to 1. * Backend/Runtime1/TreeBuilder.java: The hashcode is now pointer-sized, not int-sized. * Backend/Runtime1/StubCode.java: Add a comment to StubCode noting that the EXC_OFFSET and REF_OFFSET values must be kept in sync with the runtime and with the TreeBuilder class. Also improved efficiency a bit by commenting out the explicit clearing of the exception field in the JNIEnv structure. Any thrown exception is cleared by the epilogue of the native method call -- it is not necessary to clear it in the prologue as well. * Backend/Runtime1/TreeBuilder.java: Implement MONITORENTER and MONITOREXIT in the translation to Tree form -- Runtime1 converts these quads to appropriate calls to the FNI runtime library. Also changed the object allocation routine to properly set the low bit of the hashcode when it is initialized, since the runtime uses this bit to determine whether the object has been inflated or not. 2000-03-26 jwhaley * IR/Tree/EXP.java, IR/Tree/EXPR.java: Renamed IR/Tree/EXP to IR/Tree/EXPR (to avoid name conflict with IR/Tree/Exp) * IR/Tree/EXPR.java: New file. * Tools/PatMat/Lexer.jlex, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java, Tools/PatMat/doc-files/instr-selection-tool.html, IR/Tree/Stm.java, IR/Tree/ToCanonicalTree.java, IR/Tree/Translation.java, IR/Tree/TreeKind.java, IR/Tree/TreeVisitor.java, Interpret/Tree/Method.java, NOTES/codegen-out.java, Backend/Sparc/CodeGen.spec, Backend/StrongARM/CodeGen.spec, IR/Tree/Print.java, Backend/Jouette/CodeGen.spec, Backend/Runtime1/TreeBuilder.java, Analysis/Tree/AlgebraicSimplification.java, Analysis/Tree/Canonicalize.java, Analysis/Tree/DeadCodeElimination.java, Analysis/Tree/Simplification.java: Renamed IR/Tree/EXP to IR/Tree/EXPR (to avoid name conflict with IR/Tree/Exp) 2000-03-25 bdemsky * Analysis/EventDriven/AsyncCode.java, Analysis/EnvBuilder/EnvBuilder.java, Analysis/EnvBuilder/EnvCode.java: Changes needed to build verifying echo server.. The whole thing passes the bytecode verifier...Yippy...Time to sleep. * IR/Quads/Pattern.java: Remove sneaky bug that bytecode verifier didn't like... Goes like this: Prior analysis determines where TYPECAST are needed and inserts them. This analysis looks for patterns to replace with exception handling of bytecode... But the TYPECAST placed before the original quads broke the patterns, so the pattern visitors were written to ignore TYPECAST... But in some cases the TYPECAST are not generated because of the original quad, but because of the ALENGTH quad in the bounds check. The problem here is that the TYPECAST is ignored by a null check in front of the bounds check. The sandwiched TYPECAST then get spliced out with the surrounding patterns. This can only happen in ASET/AGET's. [only quad in the patterns that can generate a typecast is ALENGTH]. Therefore we have to check for this sneakiness... This is no good, because the AGET/ASET needs this typecast. 2000-03-25 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PointerAnalysis.java: Minor changes * Main/PAMain.java, Test/PA/Test4/Sum.java, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java: Some small (but painful) bugs were fixed. 2000-03-24 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Fix a bug: InstrEXIT wasn't using FP, so the register allocator thought it was dead and tried to allocate some variables to the FP register. Not a happy thing. * Backend/Runtime1/Runtime.java: More methods callable from the runtime (part of adding Thread support). * Backend/Runtime1/StubCode.java: Update FLEX to use the new runtime1 method of getting the JNIEnv * for calling JNI code. Because the JNIEnv is thread-specific, call off to a FNI_GetJNIEnv function, which will Do The Right Thing, depending on what threading model the runtime is using. 2000-03-24 salcianu * Main/PAMain.java, Util/LightBasicBlocks/CachingSCCLBBFactory.java, Util/LightBasicBlocks/LightBasicBlock.java, Util/LightBasicBlocks/SCCLBBFactory.java, Analysis/PointerAnalysis/PAWorkList.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/Stats.java: Lots of changes to incorporate the LightBasicBlocks ... 2000-03-24 C. Scott Ananian * Support/NullCodeGen.template, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/Frame.java: Add is_elf parameter to StrongARM.CodeGen constructor and use this flag to select the proper .section directives. * Backend/Runtime1/Runtime.java: Add java.lang.Thread and java.lang.ThreadGroup to the runtime's list of 'magically' created classes, as we need to create these to implement Thread.currentThread() on the default thread -- even in the single-threaded case. 2000-03-24 bdemsky * Analysis/EventDriven/CloningVisitor.java: Bug fixes. * Analysis/EventDriven/CloningVisitor.java: Changed my mind of where I wanted to add classes to the list. * Analysis/EventDriven/AsyncCode.java: Oops...didn't get it right the first time...should work this time though...:) * Main/EventDriven.java, Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/CloningVisitor.java, Analysis/EventDriven/EventDriven.java, Analysis/EventDriven/ToAsync.java: ca Two fixes: 1) Gotta use the same naming convention used in the java/*/* stuff. Otherwise you could get oddness in subclasses java.io.InputStream...fixed this. Haven't seen it happen, but realized it could. 2) Actually output all classes we create/modify, even if not callable, so the bytecode verifier will be happy....[gotta add methods to superclasses even if not callable to give nice properties, etc]...gotta output classes directly mentioned in call even if never instantiated.... 2000-03-23 salcianu * Util/BasicBlocks/SCCBBFactory.java: Improved Javadoc. * Util/BasicBlocks/SCCBBFactory.java: Avoiding reallocating the same objects multiple times. * Util/BasicBlocks/CachingSCCBBFactory.java, Util/BasicBlocks/SCCBBFactory.java, Util/LightBasicBlocks/CachingLBBConverter.java, Util/LightBasicBlocks/CachingSCCLBBFactory.java, Util/LightBasicBlocks/LBBConverter.java, Util/LightBasicBlocks/LightBasicBlock.java, Util/LightBasicBlocks/SCCLBBFactory.java: I added a more compact version of the basic blocks. We use too many Sets, Maps etc. They are all very heavyweight structures: not only they take lots of memory but their traversal is extremely expensive: to traverse the instructions from a bsic block, one need to obtain a List, next an Iterator (a very complex dynamically allocated object) over that List and next do a for loop where the condition is it.hasNext(). This is a few orders of magnitude more expensive than storing everything in an array and doing an int-indexed loop. Moreover, the average size of a basic block is somehing between 2 and 3 instructions: having a Set for one element and an Iterator to grab is catastrofic ... The LightBasicBlocks are array based. They are just a more compact way of storing the BasicBlock view of the code. In particluar, there is direct pass from HCode to LighBasicBlocks. You need first to convert the HCode to classic BasicBlocks and these are next converted into LightBasicBlocks. As a general advice to everybody, consider the Java Collections as convenient data structures useful while generating some info, but too expensive for storing that info. * Util/LightBasicBlocks/CachingLBBConverter.java, Util/LightBasicBlocks/CachingSCCLBBFactory.java, Util/LightBasicBlocks/LBBConverter.java, Util/LightBasicBlocks/LightBasicBlock.java, Util/LightBasicBlocks/SCCLBBFactory.java: New file. 2000-03-23 kkz * Backend/StrongARM/InstrBuilder.java: Added a makeLabel method that allows you to specify the Label that you want to use. 2000-03-23 salcianu * Analysis/PointerAnalysis/PointerAnalysis.java: Small opt. * Tools/UComp.java: Remove old file. * Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/Stats.java, Main/EventDriven.java, Main/PAMain.java, Util/BasicBlocks/BBConverter.java, Util/BasicBlocks/CachingBBConverter.java, Util/BasicBlocks/CachingSCCBBFactory.java, Util/BasicBlocks/SCCBBFactory.java, Util/UComp.java: Following the overwhelming demand, some packages have been moves from harpoon.Tools to harpoon.Util. I created new subpackages; LightMap.java was put in its own subpackage and *NOT* in harpoon.Util.Collections because (as far as I understand) Util.Collections is more or less something that will be gradually replaced with classes from java.util. * Util/BasicBlocks/BBConverter.java, Util/BasicBlocks/CachingBBConverter.java, Util/BasicBlocks/CachingSCCBBFactory.java, Util/BasicBlocks/SCCBBFactory.java, Util/UComp.java: New file. * Analysis/EventDriven/ToAsync.java: Following the overwhelming demand, some packages have been moves from harpoon.Tools to harpoon.Util. I created new subpackages; LightMap.java was put in its own subpackage and *NOT* in harpoon.Util.Collections because (as far as I understand) Util.Collections is more or less something that will be gradually replaced with classes from java.util. * Main/PAMain.java: Last commit before going to sleep. * Analysis/PointerAnalysis/PointerAnalysis.java: Adding a new functionality suggested by John Whaley: - a method to obtain the parallel interaction graph valid at an arbitrary point of the program and strngly connected to it: - a method to obtain the set of the nodes pointed by a certain Temp (variable) right before executing a certain Quad in the body of of a (meta)method. Of course, all this info was computed even in the previous version (since our analysis is flow sensitive), what was needed was a convenient interface and some hacks to select the important things. Thsi will be useful in finding exactly what nodes are pointed by the variable appearing in a sync operation. * Main/PAMain.java: Adding options to PAMain. * Main/PAMain.java, Analysis/PointerAnalysis/PointerAnalysis.java: Additions to PAMain.java 2000-03-22 salcianu * Analysis/MetaMethods/MetaCallGraphImpl.java: This should reduce the memory consumption of the MetaCallGraph. * Analysis/MetaMethods/MetaCallGraphImpl.java, Main/PAMain.java: Minor changes. * Main/EventDriven.java: This will help Brian a bit. 2000-03-22 bdemsky * Test/EventDriven/AsyncReader.java, Test/EventDriven/HTTPHeader.java, Test/EventDriven/HTTPResponse.java, Test/EventDriven/HTTPServices.java, Test/EventDriven/JhttpServer.java, Test/EventDriven/JhttpWorker.java, Test/EventDriven/LogFile.java, Test/EventDriven/Response.java, Test/EventDriven/SpedServer.java, Test/EventDriven/WebServer.jar: hide files inside of jar. * Test/EventDriven/WebServer.jar: New file. * Test/EventDriven/test.java: oops * Test/EventDriven/AsyncReader.java, Test/EventDriven/EventDriven3, Test/EventDriven/HTTPHeader.java, Test/EventDriven/HTTPResponse.java, Test/EventDriven/HTTPServices.java, Test/EventDriven/JhttpServer.java, Test/EventDriven/JhttpWorker.java, Test/EventDriven/LogFile.java, Test/EventDriven/Response.java, Test/EventDriven/SpedServer.java, Test/EventDriven/test.java: Test case * Test/EventDriven/AsyncReader.java, Test/EventDriven/EventDriven3, Test/EventDriven/HTTPHeader.java, Test/EventDriven/HTTPResponse.java, Test/EventDriven/HTTPServices.java, Test/EventDriven/JhttpServer.java, Test/EventDriven/JhttpWorker.java, Test/EventDriven/LogFile.java, Test/EventDriven/Response.java, Test/EventDriven/SpedServer.java, Test/EventDriven/test.java: New file. * Support/EventDriven.jar: Updated ED.jar * Analysis/EventDriven/CloningVisitor.java: Various fixes to recycling program. * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/CloningVisitor.java, Analysis/EventDriven/EventDriven.java, Analysis/EventDriven/ToAsync.java, Analysis/EnvBuilder/EnvBuilder.java, Main/EventDriven.java: Options to build environment [Continuation/Environment recycling] friendly, optimistic, tree hugging, ...MetaMethod based EventDriven pass added. Save our heap, recycle your continuations and environments! 2000-03-22 salcianu * Analysis/PointerAnalysis/PointsToGraph.java: Oops! Just found a stupid bug in both my code and the paper: a node escapes from a method if it escapes into some unanalyzed hole, it's accessible from outside the method (through parameters, static fields = globals), is returned (normally or as an exception) from the method *OR* is reachable from such a returned node. 2000-03-22 bdemsky * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/CloningVisitor.java, Analysis/EventDriven/ToAsync.java: Bug fix...Constructors need to be more specific. 2000-03-22 salcianu * Analysis/PointerAnalysis/PANode.java: Improvements. * Main/PAMain.java, Analysis/MetaMethods/SmartCallGraph.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/Stats.java, Analysis/Quads/CallGraph.java, Analysis/Quads/CallGraphImpl.java: Addition to the CallGraphj interface and to the implementing classes + Pretty printer for doubles (the old %digits.decimals[l]f from printf. 2000-03-22 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Rename _lookup function, and pass it through the c-function-name normalizer. * Backend/StrongARM/Frame.java: Allow command-line override of ELF/a.out and malloc-function choice. 2000-03-21 salcianu * Analysis/PointerAnalysis/Relation.java, Main/PAMain.java, Analysis/MetaMethods/SmartCallGraph.java: SmartCallGraph seems to work! For the biggest example I have, it reduced the size of the biggest strongly connected component of mutually recursive methods form 74 to 40 (well, the real meta method stuff reduces it to 9!). * Analysis/MetaMethods/SmartCallGraph.java: A hopefuly smarter oimplementation of CallGraph. * Analysis/MetaMethods/SmartCallGraph.java: New file. * Analysis/Quads/CallGraph.java: Painful (but necessary) change in the infrastructure: harpoon.Analysis.Quads.CallGraph was changed to be an interface, so that we can have alternative implementation of it. The old class was renamed CallGraphImpl, in the same package. Of course, "new CallGraph(...)" should be replaced by "new CallGraphImpl(...)". I did this for the code that I found in the Harpoon CVS repository. Sorry for your unchecked code ... * Analysis/Quads/CallGraphImpl.java: Here is the old file, now renamed CallGraphImpl.java @SPLIT: CallGraph.java CallGraphImpl.java@ * Analysis/Quads/CallGraphImpl.java: New file. * Main/CallGraph.java, Main/PAMain.java, Main/SAMain.java, Main/SparcMain.java, Main/TypesMain.java, Analysis/AllCallers.java: Painful (but necessary) change in the infrastructure: harpoon.Analysis.Quads.CallGraph was changed to be an interface, so that we can have alternative implementation of it. The old class was renamed CallGraphImpl, in the same package. Of course, "new CallGraph(...)" should be replaced by "new CallGraphImpl(...)". I did this for the code that I found in the Harpoon CVS repository. Sorry for your unchecked code ... 2000-03-21 bdemsky * Analysis/EventDriven/ToAsync.java: oops...need to mark the call itself as blocking. * Analysis/EventDriven/BMethod.java, Analysis/EventDriven/EventDriven.java, Analysis/EventDriven/ToAsync.java, Main/EventDriven.java: Metamethod support added... Switched on if you pass in a MetaCallGraph to ed.convert. Switched off if you pass in null. 2000-03-21 salcianu * Analysis/MetaMethods/MetaAllCallers.java, Main/PAMain.java: I added a method to MetaAllCallers to obtain all the metamethods which call a cetaian method, directly or indirectly. It is simply the transitive closure of the pre-existent method getCallers (which returns the direct callers). * Analysis/MetaMethods/FakeMetaCallGraph.java: Non-important changes 2000-03-21 bdemsky * Analysis/EventDriven/CloningVisitor.java: All of this for want of a TYPECAST.... 2000-03-21 salcianu * Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/PointerAnalysis/PointerAnalysis.java, Main/PAMain.java, Analysis/ReachingDefsImpl.java: Improvements and bug fixes in the MetaCallGraph stuff. 2000-03-20 salcianu * Analysis/PointerAnalysis/Debug.java, Main/PAMain.java, Analysis/MetaMethods/MetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphAbstr.java, Analysis/MetaMethods/MetaMethod.java: I added a new method -- MetaCallGraph.getSplitRelation -- which produces a Relation HMethod -> Set of MetaMethods obtained through specialization from that method. 2000-03-20 bdemsky * Analysis/EventDriven/CloningVisitor.java: AHHHH...Big evil bug. 2000-03-19 salcianu * Analysis/PointerAnalysis/NodeRepository.java: A minuscule change I forgot to do last time. * Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java: Thread sensitivity (in two flavors: full and weak) has been added (untested yet). This is supposed to increase the precision but also the execution time of the analysis. Everything is controled by specifc flags in PointerAnalysis. * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java: PANode has been modified to cope with call site and thread specializations. Some other classes were modified too. * Analysis/PointerAnalysis/PANodeCS.java: PANodeCS.java no longer exists. All its functionality (and soem new ones as thread specialization) has been inserted into PANode.java 2000-03-19 bdemsky * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/BMethod.java, Analysis/EventDriven/CloningVisitor.java, Analysis/EventDriven/EventDriven.java, Analysis/EventDriven/EventDrivenCode.java, Analysis/EventDriven/ToAsync.java: Added the option of optimism.... * Analysis/EventDriven/BMethod.java: New file. * Main/EventDriven.java: Added the option of optimism.... 2000-03-18 salcianu * Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/EdgeOrdering.java, Analysis/PointerAnalysis/PAEdge.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PALoad.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointsToGraph.java: Cleaning the code for graph specialization. the way it was done before (for the call site specialization) was a kind of messy ... Not yet tested. * Tools/UComp.java: Modifications + major restructuring of the code: harpoon.Tools.Graphs contains some classes to help you transform any graph into its component graph - the graph of its strongly connected components - that can be later topologically sorted since it's acyclic harpoon.Tools.BasicBlocks contains some convenient classes to pass from HCode to a BasicBlocks view, to construct the strongly connected components of BasicBlocks etc. Let me know if you have compilation problems. Maybe I forgot to check something. * Tools/UComp.java: New file. * Main/PAMain.java, Analysis/Quads/CallGraph.java, Analysis/PointerAnalysis/CachingSCCBBFactory.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PANodeCS.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/SCCBBFactory.java, Analysis/PointerAnalysis/SCCTopSortedGraph.java, Analysis/PointerAnalysis/SCComponent.java, Analysis/PointerAnalysis/Stats.java, Analysis/PointerAnalysis/UComp.java, Analysis/MetaMethods/MetaCallGraphImpl.java, prj.el: Modifications + major restructuring of the code: harpoon.Tools.Graphs contains some classes to help you transform any graph into its component graph - the graph of its strongly connected components - that can be later topologically sorted since it's acyclic harpoon.Tools.BasicBlocks contains some convenient classes to pass from HCode to a BasicBlocks view, to construct the strongly connected components of BasicBlocks etc. Let me know if you have compilation problems. Maybe I forgot to check something. 2000-03-17 salcianu * Analysis/MetaMethods/FakeMetaCallGraph.java, Analysis/MetaMethods/GenType.java, Analysis/MetaMethods/MetaAllCallers.java, Analysis/MetaMethods/MetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphAbstr.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/MetaMethods/MetaMethod.java: A new abstraction (meta-methods) has been added to FLEX (along with the corresponding package - harpoon.Analysis.MetaMethods - and code). * Analysis/MetaMethods/FakeMetaCallGraph.java, Analysis/MetaMethods/GenType.java, Analysis/MetaMethods/MetaAllCallers.java, Analysis/MetaMethods/MetaCallGraph.java, Analysis/MetaMethods/MetaCallGraphAbstr.java, Analysis/MetaMethods/MetaCallGraphImpl.java, Analysis/MetaMethods/MetaMethod.java: New file. 2000-03-15 bdemsky * Analysis/EventDriven/ToAsync.java: Oops...error in skip. * Analysis/EventDriven/CloningVisitor.java, Analysis/EventDriven/ToAsync.java: Add in support for all of the Async methods we've implemented so far. 2000-03-13 andyb * Backend/Sparc/CodeGen.spec: Well here's a completed Sparc CodeGen. Now to put together the Runtime bits and see if it actually works. 2000-03-13 bdemsky * Support/EventDriven1.jar: Fixed off by one error on file descriptors for JDK2->JDK1.1 port. 2000-03-09 salcianu * Analysis/PointerAnalysis/SCCTopSortedGraph.java, Analysis/PointerAnalysis/SCComponent.java: Added support for analyzing graphs defined through a set of roots (instead of just a single root as previously) + code cleaning: some methods grew too big - I split them into smaller parts. I've tested only the backward compatibility, nothing about the newly added functionalities. 2000-03-08 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Add calls to nameMap.c_function_name() to properly mangle the C helper functions which the StrongARM spec file uses to implement some difficult ops (div, floating-point, etc). * Backend/Runtime1/AppelAllocationStrategy.java, Backend/Runtime1/DataInitializers.java, Backend/Runtime1/DataJavaMain.java, Backend/Runtime1/DataReflection1.java, Backend/Runtime1/DataReflection2.java, Backend/Runtime1/MallocAllocationStrategy.java, Backend/Runtime1/StubCode.java, Backend/Runtime1/TreeBuilder.java: Updated the Runtime1 codebase to use the c_function_name() mangling function when creating labels for C-visible symbols. * Temp/Label.java: ELF platforms hide local labels by prepending periods; global labels are not modified at all. This is different than on a.out platforms, which prepend underscores to global labels and do nothing to local labels. However, it should always be safe to prepend the period to local labels -- even on a.out, I tried it! -- so this commit to Temp/Label.java changes the default local label format from L to .L. * Backend/Sparc/Frame.java, Backend/StrongARM/Frame.java, Interpret/Tree/DefaultFrame.java, Interpret/Tree/InterpreterOffsetMap.java, Backend/Runtime1/Runtime.java: Random updates to existing code to support the extra 'prependUnderscore' parameter to DefaultNameMap. * Backend/Maps/DefaultNameMap.java, Backend/Maps/NameMap.java: Added a c_function_name method to NameMap to abstractly specify the mangling that c-visible symbols must undergo before they become assembly output. For example, on a.out platforms C symbols have underscores prepended. On ELF platforms, they do not. 2000-03-08 salcianu * Analysis/BasicBlock.java: I added to BasicBlock.Factory a field and a method that allows the programmer to obtain the HCode that behind the basic blocks produced by this factory. This is exactly the HCode that was passed to the constructor of BasicBlock.Factory. This allows the programmer to switch freely between the HCode representation and the Basic Block one. 2000-03-07 kkz * Backend/Runtime1/DataGC.java: Various changes. This code will no doubt change again soon, but I'm checking it in so other people can compile. * Backend/Analysis/BasicGCInfo.java: Miscellaneous changes. This code is still in flux, but I forgot that I made some changes in GCInfo that breaks the compiler if I don't check this code in. 2000-03-07 salcianu * Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/Stats.java: Improvements in statistics, code cleaning and bug-fixes. 2000-03-07 bdemsky * Support/EventDriven1.jar: Backport of EventDriven.jar to java 1.1. * Support/EventDriven1.jar: New file. 2000-03-06 kkz * Backend/Generic/GCInfo.java: Implemented wrapper classes for MachineRegLoc and StackOffsetLoc objects. This should allow me to do the kind of comparisons I need on Sets of these things so that I can figure out when one GC point has the same live pointers as a different one. Even if we don't end up doing such complicated bit-saving, I think having the wrapper classes make the interface cleaner. Bonus: this is actually *tested* code. It took me more time and code to write the test functions than the actual implementation, but I caught what would have been a puzzling bug. The 6.170 Gods should be pleased. =) 2000-03-05 salcianu * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java: A caching mechanism has been added to the context specialization method. The speed improved dramatically! 2000-03-04 salcianu * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java: Minor changes. * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PANodeCS.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java: Various modifications. Among other things, I fixed some "potentially uninintialized variables" that are mentioned in the e-mail from Brown. 2000-03-03 salcianu * Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/EdgeOrdering.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PAEdge.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java: Support for the context sensitivity was added (the flag PointerAnalysis.CONTEXT_SENSITIVE switches it on/off). This increases the precision of the analysis but also the time and memory consumption. Due to some unfound bugs, it's not yet functional. * Analysis/PointerAnalysis/PANodeCS.java: Subclass of PANode that offers support for specialization function of the call site. This new class is used if the analysis is context sensitive. * Analysis/PointerAnalysis/PANodeCS.java: New file. 2000-03-02 salcianu * Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/Stats.java, Main/PAMain.java: Some node statistics were added. * Analysis/PointerAnalysis/InterThreadPA.java: Fixing some problems in the parallel action between actions and threads. 2000-03-02 kkz * Backend/Analysis/BasicGCInfo.java, Backend/Generic/GCInfo.java, Backend/Runtime1/DataGC.java: Added the BackendDerivation information to DataGC. Includes: + changing the 6-bit descriptor into an 8-bit descriptor + writing the callee-saved register information as a bitfield plus non-null entries as ints The callee-saved register data is packed, but it should be clean enough that decoding won't present much of a problem. 2000-03-01 salcianu * Analysis/PointerAnalysis/EdgeOrdering.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/Matching.java: Some new inference rules have been added to use the newly added edge ordering relation. (outside edges can match inside edges from the same scope). * Analysis/PointerAnalysis/ActionRepository.java: Fixing a tricky bug that prevented some "sync" actions from being added. 2000-03-01 kkz * Backend/Analysis/BasicGCInfo.java, Backend/Generic/GCInfo.java, Analysis/ReachingDefsImpl.java: 1. A minor tweak to ReachingDefsImpl that removes an unnecessary clone of a BitSet. 2. Added BackendDerivation information to GCInfo. I'm making a whole bunch of rash assumptions here (and asserting them, too--gulp!) The code expects callee-saved registers to be dumped out to a Temp that lives in exactly one location, which is on the stack. I have an icky feeling that this is not really true, but I can't think of why we would want it not to be. Presumably I will find out soon enough. 2000-03-01 C. Scott Ananian * Main/SAMain.java, Main/SparcMain.java: Load Support/nativecode-makefile.template from the CLASSPATH and copy it to the output directory as Makefile, when compilation is finished. * GNUmakefile: Added Support/native-makefile.template to the PROPERTIES list of the FLEX makefile, and had it automatically move the template to harpoon/Support so it can be loaded from the CLASSPATH (and so it is included in the JAR file). 2000-02-29 salcianu * Analysis/PointerAnalysis/PointsToGraph.java: Add a convenient function for detecting captured nodes. * Test/PA/Test3/multiset.java: Minor modifications. * Main/PAMain.java, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/EdgeOrdering.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PAEdge.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/Relation.java, Analysis/PointerAnalysis/SCCBBFactory.java: Cleaner code + changes to grab the statistic data. * Analysis/PointerAnalysis/Stats.java: New class for grabbing some statistics (hence the name) of the pointer-analysis part.: nb. of analyzed methods, nb. of analyzed instructions, nb. of basic blocks and strongly connected components of basic blocks in a method etc. However, the various timing measurement are already implemented in the code (controlled by the PointerAnalysis.TIMING flag) and I avoided re-inventing the wheel. * Analysis/PointerAnalysis/Stats.java: New file. 2000-02-29 C. Scott Ananian * Support/nativecode-makefile.template: New file. * Support/native-code-makefile-template, Support/nativecode-makefile.template: Renaming the native code makefile template. @RENAME: native-code-makefile-template nativecode-makefile.template@ * Support/native-code-makefile-template: Assuming that your target architecture has a non-a.out executable format, copy this template into the directory the FLEX native code backend generates, rename it 'Makefile' and type 'make' -- voila! a nice-and-tidy object archive all ready to be linked with the native-code runtime libraries to produce a full-grown executable. Oh -- if you're cross-compiling, be sure to include a proper HOST_PREFIX definition on the make command-line. For StrongARM on lesser-magoo, this works: make HOST_PREFIX=arm-unknown-linuxelf- Share & enjoy... * Support/native-code-makefile-template: New file. * Backend/Generic/RegFileInfo.java, Backend/Maps/BackendDerivation.java: Committed an extension of the Derivation map for Felix and Karen to play with. This one (BackendDerivation) supports callee-save register identification. * Backend/Maps/BackendDerivation.java: New file. 2000-02-29 andyb * Backend/Sparc/CodeGen.spec: Well I got all the derivation info in there I think. 1 hour down, 1 to go :) 2000-02-29 C. Scott Ananian * Backend/CSAHack/RegAlloc/Code.java, Backend/CSAHack/RegAlloc/DerivationGenerator.java, Backend/CSAHack/RegAlloc/RegAlloc.java, Backend/CSAHack/RegAlloc/Spiller.java: Infrastructure to properly type spilled temps (but we don't actually properly type them yet). * Backend/CSAHack/RegAlloc/DerivationGenerator.java: New file. 2000-02-28 salcianu * Analysis/PointerAnalysis/ActionRepository.java: Cleaner code. 2000-02-28 C. Scott Ananian * IR/Assem/Instr.java: Efficiency hack for IR.Assem.Instr -- remove an unnecessary array copy. Made methods final to ensure that this optimization remains valid. * Tools/PatMat/MaximalMunchCGG.java, Backend/StrongARM/CodeGen.spec, Backend/Generic/MaxMunchCG.java: Stomp on the last vestiges of user-visible makeTemp() code. All temp creation/management is now done by the CG(G), using the architecture TempBuilder object. Also patched a memory leak in the origTempToNewTemp map. * Backend/StrongARM/CodeGen.spec: Doh! Inadvertently set the InstrENTRY instruction at the top of the StrongARM IR/Assem instruction list to a 'no fall through' instruction -- which effectively made the rest of the instructions unreachable and did rather interesting things to the register allocation code. Whoops. Fixed now. 2000-02-28 andyb * Backend/Sparc/CodeGen.spec: Added a whole chunk of stuff to almost complete sparc codegen. For the curious, here's the list of important things to do in the sparc backend: - SUPPORT FOR DERIVATIONS - nativecall - more than 6 args to calls - write _lookup * Backend/Sparc/CodeGen.spec: Oops, checked in code which didn't compile. * Backend/Sparc/CodeGen.spec: Handle two word exceptional values in THROW 2000-02-28 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Supppress 'no reaching def for sp/fp/pc' warnings when using hacked-regalloc + derived-is-use-of-base extension. * Main/SAMain.java, Main/SparcMain.java: update SAMain and SparcMain to use the new constructor for hacked-regalloc. * Backend/CSAHack/RegAlloc/RegAlloc.java: Add a UseDefer that handles uses-of-derived-temps-as-uses-of-base-pointer to hacked-regalloc. * Backend/CSAHack/RegAlloc/Color.java: When base pointers are counted as being used with every use of a derived pointer, the 'use list is of length exactly one' safety check for a candidate MOVE is no longer valid. * Backend/CSAHack/RegAlloc/Code.java: Fixup RegAlloc.Code to properly implement getDerivation() method inherited from superclass. * Backend/CSAHack/FlowGraph/AssemFlowGraph.java: extend AssemFlowGraph class to take a UseDefer argument, instead of relying on the IR.Assem.Instr implementing UseDef. This allows us to use an extended UseDefer object (when needed) that adds in the base pointers of derived temps to the use set. * Backend/Generic/MaxMunchCG.java: Fix a bug in MaxMunchCG where type/derivation information was being *added* to a map keyed by pair, and then attempts were made to extract the info using a opposite-ordered pair. Both put and get now standardize on the later ordering. Also, fixed derivation() and typeMap() methods to properly throw TypeNotKnownException when no information is found, as per the spec. * Util/Collections/GenericMultiMap.java, Util/Collections/MultiMap.java: javadoc updates: a) make the first sentence more descriptive so that users can tell the difference between MultiMap.put() and MultiMap.add() from the summary description. b) better describe the default no-argument constructor for GenericMultiMap. 2000-02-27 C. Scott Ananian * Interpret/Quads/INFile.java: added File.isDirectory() implementation to Quad interpreter in order to get harpoon.Main.SAMain working with it. 2000-02-25 C. Scott Ananian * IR/LowQuad/LowQuadSSI.java, IR/Quads/QuadRSSI.java, IR/Quads/QuadSSI.java, IR/Quads/package.html: documentation updates to quad/lowquad codeviews. 2000-02-24 pnkfelix * Analysis/Instr/RegAlloc.java: FSK: Sigh. In my media lab urop, there was a nice FSK: little response we had to any report of error. FSK: "What? Well, *MY* code has no bugs." FSK: So here's the first bug-fix checkin for the GC-support FSK: in the register allocator... * Analysis/Instr/RegAlloc.java, Backend/StrongARM/RegFileInfo.java: FSK: YAY. I finally made the changes to support FSK: GC in the register allocator. FSK: backend implementors please note that FSK: your RegFileInfo should only return register FSK: temps that properly implement the MachineRegLoc FSK: interface; otherwise the register allocator FSK: will break. 2000-02-24 salcianu * Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/EdgeOrdering.java, Analysis/PointerAnalysis/PAEdge.java, Analysis/PointerAnalysis/PALoad.java: gmake jiks should work OK now. 2000-02-24 C. Scott Ananian * Main/Options.java, Interpret/Tree/TestRun.java, IR/Quads/ToNoSSA.java, IR/Tree/ToTree.java, IR/Tree/TreeCode.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/Translate.java, IR/Registration.java, Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/LowQuad/Loop/MyLowQuadSSI.java: Renaming LowQuadSSA to LowQuadSSI. 2000-02-24 salcianu * Analysis/PointerAnalysis/PAEdge.java, Analysis/PointerAnalysis/PALoad.java: Added a new method to each of these class that tests whether all the nodes that are refered to are among the the remaining nodes. This is supposed to be used when we extract the external version of the parallel interaction graph of a method (the graph that contains only the nods that are reachable from the outside). 2000-02-24 C. Scott Ananian * IR/LowQuad/LowQuadSSA.java, IR/LowQuad/LowQuadSSI.java: Finally renaming LowQuadSSA to LowQuadSSI. You'll find out why RSN. @RENAME: LowQuadSSA LowQuadSSI@ * IR/LowQuad/LowQuadSSI.java: New file. * Analysis/BasicBlock.java, Analysis/ReachingDefsImpl.java: Add a pair of assertions useful for catching bugs. 2000-02-24 salcianu * Test/PA/Test1/complex.java, Test/PA/Test2/Server.java, Test/PA/Test3/multiset.java, Test/PA/Test4/Sum.java, Test/PA/Test5/A.java: A new directory was added: Test. I think it's a good idea to put here some tests for the code we are producing. This way, if something was modified, we can immediately check if something went wrong. For the moment, I put 5 tests for the pointer analysis stuff in the subdirectory Test/PA. Please create your own subdirectory if you plan to add some testcases. * Test/PA/Test1/complex.java, Test/PA/Test2/Server.java, Test/PA/Test3/multiset.java, Test/PA/Test4/Sum.java, Test/PA/Test5/A.java: New file. * Analysis/PointerAnalysis/InterThreadPA.java: An old, unused part has been removed. * Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/EdgeOrdering.java: removeNodes and removeEdges have been implemented in each of these two classes. They are used by the node removal operations. * Analysis/PointerAnalysis/PAEdge.java, Analysis/PointerAnalysis/PALoad.java: A "isBad" method has been add in each of these two classes to help the detection of edges and load actions that must be deleted when some nodes are removed. The argument of these method is the set of nodes to be removed. * Analysis/PointerAnalysis/Relation.java: Three more functions -- removeKeys, removeValues and removeObjects -- have been added to the Relation class. They remove the associations involving bad keys, bad values or a mixture of the two. (removeObjects is wimply a wrapper that simply calls renoveKeys and removeValues). each of these three functions receives a boolean predicate that helps select the bad keys/values/ objects. * Analysis/PointerAnalysis/PredicateWrapper.java: New class: a wrapper for the boolean predicates. * Analysis/PointerAnalysis/PredicateWrapper.java: New file. 2000-02-23 C. Scott Ananian * Main/SAMain.java: Turn on jump optimization by default. * Backend/StrongARM/CodeGen.spec: Fix thinko in the long-shift patterns for StrongARM: the shift amount is masked by *63*, not *31*, for long values. This is (hopefully) the last bug keeping double-to-string conversion from working. * Analysis/Tree/JumpOptimization.java: Goofed up default branch direction: we want to optimize so that the *false* label of a CJUMP typically follows it. * Analysis/Tree/JumpOptimization.java: Invert test of CJUMP if it is followed by its false label, instead of its true label. * Tools/PatMat/CommutativityExpander.java: Remove unneeded import statement. * IR/Tree/BINOP.java, IR/Tree/Bop.java, Tools/PatMat/Lexer.jlex, Tools/PatMat/Parser.cup, Backend/StrongARM/CodeGen.spec, Analysis/Tree/AlgebraicSimplification.java, Analysis/Tree/Simplification.java: Add Tree.Bop.CMPNE to go along with Tree.Bop.CMPEQ. Not quite sure why I didn't originally include this op. Note that CMPNE isn't strictly necessary -- you can always use the false branch of a CMPEQ -- but it's useful for laying out code such that in the common case branches *aren't* taken. Various tweaks to existing code to support this new Bop. * Analysis/Tree/JumpOptimization.java: Check in first working version of jump optimizer for tree form. This tries to elide branches-to-branches. * Analysis/Tree/JumpOptimization.java: New file. * Util/DisjointSet.java: Added new DisjointSet implementation using path compression and union-by-rank for darn near O(1) run-time, amortized per operation. * Util/DisjointSet.java: New file. * Analysis/Tree/Simplification.java: Fix bug in Simplification code that would cause a Long constant with the low-word equal to zero to be Simplified as if it were a constant zero. Also, protect against bogus floating-point constant optimizations, although I haven't seen these happen yet. This should fix the 'hang-on-print-double' bug Felix and I have been seeing recently. 2000-02-20 salcianu * Analysis/PointerAnalysis/Relation.java, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/EdgeOrdering.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/Matching.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java: Lots of changes to fix the two bugs I have found into Martin's algorithm last week: 1. we need to be *more* conservative in the inter-procedural analysis. In particular, at the analyzed CALL sites, more nodes from the callee's graph should be introduced into the graph of the caller. The rules given in the paper are insuficient. Fix: all the callee's nodes are initially inserted; after the recomputation of the escape info, some epty loads and "fake" outside edges are removed. This way, the generation of the new graph is separated from its simplification. Status: DONE 2. the outside edges must be mapped not only against the inside edges from the other scope but also against the inside edges from their own scope. Fix: add an edge ordering structure to record the inside edges created before a specific load node is read. Only these inside edges are used (using all the inside edges will disrupt the performances). Status: the data structures are done, the edge ordering is generated. I still have to use it in the inter-thread part of the analysis. 2000-02-19 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Missed a few type declarations in the BINOP patterns section of Backend/StrongARM/CodeGen.spec. * Backend/StrongARM/CodeGen.spec: Use the newly-implemented %extra directive to fix the implementation of the shift operations to conform to the JLS. (shift amount is *lower 5 bits only* of left-hand operand to the shift.) * Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java: Implement %extra directive in MaximalMunchCGG, Parser, and parse tree objects. Syntax is '%extra { id1, id2 }' to create (for example) two extra temps named id1 and id2 of type INT. * Tools/PatMat/MaximalMunchCGG.java: Some minor changes to MaximalMunchCGG: a) Added a TEMP_TempList field for the class string "harpoon.Temp.TempList". b) created a method mergeStms() to try and eliminate some code duplication. c) Cleaned up the 'insert a type declare' section, using the newish declare(Temp, TreeDerivation, Exp) method. d) Added two more clearDecl() statements to ensure that our type info is fresh. * Backend/StrongARM/CodeGen.spec: Verified the proper behavior of the java % operator. Removed a related XXX comment from StrongARM/CodeGen.spec. * Backend/StrongARM/CodeGen.spec: Lotsa fixes to Backend/StrongARM/CodeGen.spec: a) There were lots of calls to built-in routines which clobbered r0-r3, IP, LR, PC without specifying the type of the values in the clobbered registers (HClass.Void, obviously), or the type of the return value (varies w/ call). b) Fixed clumsy parameter passing to emitCallPrologue, and as a pleasant side-effect, got rid of some 'foo instanceof TwoWordTemp' expressions. Also purged the SP-clobber parameter when setting up the call parameters, as this is left over from a time when we updated SP after each parameter push, and is no longer needed. c) Replaced some 'declare(.., code.getTreeDerivation().typeMap(...))' calls to the newer helper 'declare(..., code.getTreeDerivation(), ...)' which has the benefit of working even when getTreeDerivation() returns null or when the type of the exp is derived. d) In the 'byte store' pattern, we were neglecting to assign a temporary register a type. e) In the THROW pattern, we were reglecting to type register r0. * Backend/Generic/CodeGen.java: Add a very useful helper method to Backend.Generic.CodeGen, and ensure it works even if we're not generating derivation information for Tree form (check that TreeDerivation is non-null). * Backend/Generic/MaxMunchCG.java, Tools/PatMat/CodeGeneratorGenerator.java: Fixed a bug: when I moved the common method prologue code to Generic.MaxMunchCG, I forgot to invoke it in genData (it was only being invoked in genCode). This caused some, er, interesting code to be generated. * Backend/StrongARM/CodeGen.spec, Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/MaximalMunchCGG.java, Backend/Generic/MaxMunchCG.java: Fix some bad memory leaks in the maximal-munch-with-derivations code. First: the tempToType mapping wasn't being cleared at the start of each call to munchExp, with the result that Temps for the entire program were slowly accumulating in the map (and some temps w/o properly declared types were getting through w/o flagging errors). Second: the Derivation mapping that was being created was *global*, not per-HCode, so that a lot of old HCodes were being kept alive long after they should rightfully have been dead. (The map contained HCodeElements, which kept them alive; the HCodeElements contained a pointer to the HCode, which kept it alive; the HCode contained pointers to every other HCodeElement which wasn't already in the map, keeping *them* alive.) Finally, moved (most of) the %start with clause from Backend/StrongARM/CodeGen.spec to Backend/Generic/MaxMunchCG.java, since it is common to all CGs generated by MaximalMunchCGG now. This code now lives in a protected _methodPrologue_() method, and calls at the appropriate times are performed by MaximalMunchCGG. 2000-02-18 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Remove about 200 lines of redundant code from StrongARM/CodeGen.spec by consolidating all the specific BINOP(CMP, ...) patterns into a few more general patterns of the form BINOP(cmpop, ...) %pred %{isCmpOp(cmpop)}% * Backend/CSAHack/RegAlloc/Spiller.java: Hack hacked-regalloc to treat '@ dummy' instrs as atomic w/ the ones preceding them, so that the insertion of spill code doesn't inadvertently disassociate the dummy use/def with the instruction it is protecting. * Tools/PatMat/MaximalMunchCGG.java: Fix bug in MaximalMunchCGG where subtrees would be munched *before* the %pred clause was evaluated and tested. This would cause certain subtrees to be munched multiple times if %pred clauses were evaluating to 'false'. * Tools/PatMat/Main.java: Turn CommutativityExpander back on, now that the changes have been tested. * Tools/PatMat/CommutativityExpander.java: Extend CommutativityExpander to handle BINOP(op, ...) case, where the operand is specified as a LeafId instead of a LeafOp. Fix buglet in addPred. 2000-02-18 pnkfelix * Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Backend/Generic/CodeGen.java: FSK: 1. Changed the planned interface for how i am going to FSK: support the TempLocator (I realized that it was FSK: premature of me to think that I was going to have to FSK: modify all the extensions of RegAlloc; this should FSK: in fact be something that's independent of whatever FSK: Register Allocation Strategy you choose) FSK: 2. Moved some debugging code that was no longer FSK: correct for the position it was in to the place where FSK: it should belong now, though admittedly I have not yet FSK: turned on debugging to see if it works now) 2000-02-18 C. Scott Ananian * Tools/PatMat/CommutativityExpander.java, Tools/PatMat/Main.java: Updated commutativity expander class to allow for adding add'l predicates to expanded rules (if, for example, we aren't certain what the opcode for the BINOP is). Turned commutativity expander off in harpoon.Tools.PatMat.Main until I get a chance to properly test the new code. 2000-02-18 kkz * Backend/Analysis/BasicGCInfo.java, Backend/Generic/GCInfo.java, Backend/Runtime1/DataGC.java: Modified GCInfo so that we can differentiate between derived pointers that live in registers and those that live in the stack. This is to make it easier for us to lay out the GC tables without needing a bit to tell us where the derived pointer lives. Modified DataGC so that the GC tables simply lay out a list of derivations, instead of before where each derivation was associated with a number of possible locations for the derived pointer. 2000-02-18 pnkfelix * Analysis/Instr/RegAlloc.java, Backend/Analysis/BasicGCInfo.java: FSK: Moved getDerivation() out of IntermediateCodeFactory, FSK: and updated Karen's code accordingly. The funny thing FSK: is that the biggest change in this commit is the FSK: "this should go away soon..." comment. C:) * Backend/StrongARM/CodeGen.spec: FSK: Made the (hopefully) last of the necessary changes to the FSK: spec file to support typing code generation. Now I need FSK: to make the register allocator properly create CommonLocs FSK: for the different parts... no sweat 2000-02-17 pnkfelix * Backend/StrongARM/CodeGen.spec: FSK: adding more type declarations for hard coded register references. FSK: joy. * Tools/PatMat/MaximalMunchCGG.java, Support/NullCodeGen.template, Backend/StrongARM/CodeGen.spec, Backend/Generic/CodeGen.java, Backend/Generic/MaxMunchCG.java: FSK: Switched from crufty TYPE_STATE interface to much FSK: cleaner declare(..) method in Generic.Code. Yay. * Backend/Generic/Code.java, Analysis/Instr/RegAlloc.java: FSK: Added a way to get at the Derivation associated with a FSK: given Generic.Code * Tools/PatMat/CodeGeneratorGenerator.java, Support/NullCodeGen.template, Backend/StrongARM/CodeGen.spec, Backend/Sparc/CodeGen.spec, Backend/Generic/Code.java, Backend/Generic/CodeGen.java, Backend/Generic/MaxMunchCG.java: FSK: Modified the CodeGen interface to allow for the Derivation FSK: information to be transferred to the Code object... 2000-02-17 C. Scott Ananian * Tools/PatMat/Main.java, Tools/PatMat/CommutativityExpander.java: Added 'CommutativityExpander' to automagically generate more applicable patterns from spec files. No humans need be wasted in the production of commutative variants of instruction patterns. * Tools/PatMat/CommutativityExpander.java: New file. * Tools/PatMat/Spec.java: Added build() and kids() methods to Spec.Exp and Spec.Stm to make rule transformations easier. Added clone() method and new constructor to Spec.TypeSet. Added Spec.ExpList class, as if we needed another one-off linked list implementation. But these are strongly typed... Fixed a confusion in the toString() methods of Leaf and LeafOp which would cause LeafId args to BINOP/UNOPs to come out wrongly capitalized. * Backend/StrongARM/CodeGen.spec: Add a '@move' tag to the InstrMOVEs so we can pick them out more easily in the assembly output. 2000-02-17 salcianu * Main/PAMain.java: small changes 2000-02-16 C. Scott Ananian * Main/SAMain.java, Main/SparcMain.java: Turn off DeadCodeElimination, as it seems to be generating bogus code --- removing too many moves? * Analysis/Tree/DeadCodeElimination.java: Added an explanatory comment for the "deadMoves" rule in Tree.DeadCodeElimination. * Analysis/Tree/Canonicalize.java: Fixed bug in Canonicalize: MOVE(..., ESEQ(...)) was never being rewritten. Also broadened the definition of "nop" slightly. * Analysis/Tree/AlgebraicSimplification.java: Fixed bug in AlgebraicSimplification: UNOP(op, CONST(0)) was being rewritten as CONST(0), regardless of what the unary 'op' was. * IR/Tree/Print.java: Clean up indentation levels in Tree.Print. 2000-02-16 pnkfelix * Backend/Generic/MaxMunchCG.java: FSK: Further changes to MaxMunchCG to prepare for supporting FSK: derivation support. 2000-02-16 C. Scott Ananian * Analysis/Tree/DeadCodeElimination.java: Fix same 'return-original-instead-of-modified-HCode' in DeadCodeElimination that I just fixed in Tree.Simplification. This is why reducing duplicated code is a good idea. * Analysis/Tree/Simplification.java: Fix a stupid bug in Simplification, which was causing us to return the *original* Tree.Code, instead of the one which we had simplified. * IR/Tree/Print.java: Improve Tree pretty-printer by linearizing SEQs on top-level, but indenting any nested SEQs. 2000-02-16 salcianu * Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java: Modifications needed for the edge ordering relation. * Analysis/PointerAnalysis/EdgeOrdering.java, Analysis/PointerAnalysis/PAEdge.java: As I managed to convince Martin, there is a subtle bug in the pointer analysis algorithm. These two new classes are a part of the stuff that is necessary to fix it: an edge ordering relation that will help us match outside edges from an analyzed scope against inside edges from the same scope. To gain some precision, we match an outside edge only against the inside edges created before that outside edge was read, hence the necessuty of the edge ordering relation. * Analysis/PointerAnalysis/EdgeOrdering.java, Analysis/PointerAnalysis/PAEdge.java: New file. 2000-02-16 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Tag a few more 'mov's as InstrMOVEs. * Analysis/Tree/DeadCodeElimination.java: Bad Scott. Checked in code with 'import *' statements _again_. * Main/SAMain.java, Main/SparcMain.java: Turning on DeadCodeElimination pass for StrongARM and Sparc. * Analysis/Tree/DeadCodeElimination.java: A dead-code elimination pass that tries to get rid of moves to dead temps. * Analysis/Tree/DeadCodeElimination.java: New file. * IR/Tree/TreeCode.java: Non-canonical trees don't have valid CFGraphers or UseDefers. * IR/Tree/Code.java, IR/Tree/TreeUseDefer.java: Add the UseDefer implementation for tree form. * IR/Tree/TreeUseDefer.java: New file. * Analysis/DataFlow/LiveVars.java, Analysis/Instr/RegAlloc.java, Analysis/PointerAnalysis/SCCBBFactory.java, Analysis/Tree/ConstantPropagation.java, Analysis/Tree/TreeFolding.java, Backend/Analysis/BasicGCInfo.java, Main/SAMain.java, Main/SparcMain.java, Analysis/BasicBlock.java, Analysis/ReachingDefsImpl.java: Changed the BasicBlock.Factory constructor to take an HCode and a CFGrapher, instead of an HCodeElement 'head' and the CFGrapher. The 'head' HCodeElement is now obtained by calling CFGrapher.getFirstElement(HCode), which works better with weird IRs (read, Tree form). Lots of minor updates to existing code to reflect the change. * IR/Tree/TreeGrapher.java, IR/Properties/CFGrapher.java: Add getFirstElement() method to CFGrapher, since some forms (in particular Tree form) have different ideas about what a 'root' element means. (In tree form, the "root" of the tree is very different from the "root" of the control flow graph.) For the default CFGrapher, getFirstElement() just returns HCode.getRootElement(). * Analysis/Tree/ConstantPropagation.java, Analysis/Tree/TreeFolding.java: Updates to Tree analysis routines to deal with the replacement of IR.Properties.UseDef with a UseDefer. * IR/Tree/Code.java: Add IR.Tree.Code accessor method for (new) UseDefer. * IR/Tree/ALIGN.java, IR/Tree/CALL.java, IR/Tree/ESEQ.java, IR/Tree/Exp.java, IR/Tree/ExpList.java, IR/Tree/INVOCATION.java, IR/Tree/METHOD.java, IR/Tree/MOVE.java, IR/Tree/SEGMENT.java, IR/Tree/SEQ.java, IR/Tree/Stm.java, IR/Tree/TEMP.java, IR/Tree/Tree.java: IR.Tree.Tree no longer implements IR.Properties.UseDef. This was done because: a) the implementation of UseDef for trees is non-trivial, and it's hard to understand when it's spread all over the Tree subclasses. b) only very few tree objects can really be said to "have" a UseDef property in the first place, really -- only MOVEs, METHODs, and INVOCATIONs define things, only TEMPs count as uses (except when they're on the immediate left of a MOVE), etc. c) Non-canonical trees don't have UseDef, and it's misleading to pretend that they do. A new Tree.UseDefer class will provide UseDef information in those cases where it makes sense. * Analysis/DataFlow/LiveVars.java: Make LiveVars non-abstract, so that we can actually *use* it. At least I *hope* that's all I have to do in order to use it. * IR/Tree/Bop.java: Added isCommutative() and isAssociative() methods to Tree.Bop for use in an automatic CGG commutative-ruler-expander tool. Other uses, too. Also removed some crufty code from Bop that no one was using. * Main/SAMain.java, Main/SparcMain.java: Turn on AlgebraicSimplification pass. * IR/Tree/CanonicalTreeCode.java: Turn on new canonicalizer. 2000-02-16 andyb * Backend/Sparc/CodeGen.spec, Backend/Sparc/RegFileInfo.java: Add four arrays to CodeGen - one for the %g registers, one for the %i, one for the %l, and one for the %o. Modify register references to use these. Fix procFixup to account for massive amounts of uses/defs in the save and restore instructions (is this necessary?) Fix small bug in liveOnExitRegs in RegFileInfo: on exit, the restore will have occurred, so the return value will be in %o0, not %i0, and the link register will be in %o7, not %i7. 2000-02-16 C. Scott Ananian * IR/Tree/ToTree.java: Pass DerivationGenerator to the Runtime.TreeBuilder code. * Backend/Runtime1/AllocationStrategy.java, Backend/Runtime1/AppelAllocationStrategy.java, Backend/Runtime1/MallocAllocationStrategy.java, Backend/Runtime1/NullAllocationStrategy.java, Backend/Runtime1/Runtime.java, Backend/Runtime1/TreeBuilder.java: Add type/derivation information to the Trees generated by the runtime-specific TreeBuilder code. * Backend/Generic/Runtime.java: Updated the Backend.Generic.TreeBuilder interface to take a (possibly-null) DerivationGenerator so that the runtime-specific code can be properly typed/derived. * Analysis/Tree/AlgebraicSimplification.java: Audit AlgebraicSimplification for derivation propagation (it turned out not to need any) and fix up makeZero, mulToShift and divToMul rules to add extra Temps and the appropriate ESEQs and MOVEs rather than blindly cloning (potentially complicated) subtrees. Added the list of Canonicalization rules to the list of AlgebraicSimplification rules, so that the ESEQs added by the divToMul/mulToShift stuff get automagically removed by the canonicalization patterns. Also dealt with a POINTER/INT typing issue in the K1 + K2 --> K3 rule (combineConstants). Basically, all pointer offsets are INTs, even if they're being combined with POINTER base values. * Analysis/Tree/Simplification.java: Efficiency hack: make simplification go lots lots faster by using an array of rules rather than a list + new-iterator-at-each-tree-node. 2000-02-16 andyb * Backend/Sparc/CodeGen.spec: Eliminated all those annoying newline's that were being emitted with instructions. I don't remember why they were there, but they're gone now. Also snuck in a quick pass at procFixup. 2000-02-15 andyb * Backend/Sparc/CodeGen.spec: Made sure that uses and defs were all emitted correctly. Split up Instrs which contained multiple instructions into multiple InstrCC's to indicate dependency on condition codes. 2000-02-15 pnkfelix * Support/NullCodeGen.template, Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/Main.java, Tools/PatMat/MaximalMunchCGG.java, Backend/Generic/MaxMunchCG.java, Backend/Generic/CodeGen.java: FSK: Moved some MMCG specific stuff into MaxMunchCG, FSK: and updated the infrastructure to make the FSK: superclass of the produced CG a property of FSK: the CGG you're using (thus the producedClassType() method FSK: in CGG. FSK: Updated the NullCodeGen.template to reflect changes to FSK: Generic.CodeGen. 2000-02-15 C. Scott Ananian * Main/SAMain.java, Main/SparcMain.java: Turn the algebraic simplifier off, since it now notices some bogosity in the way that the old ToCanonicalTree code works --- it's complaining that some temps are coming from the wrong temp factory, and it's probably right. The new Canonicalize doesn't have this problem, but it's temporarily turned off. So turn the AlegbraicSimplifier off for a while, too. * IR/Tree/CanonicalTreeCode.java: Add code to generate canonical tree code using the new pattern-driven Canonicalize stuff. Currently turned off, since ToTree isn't generating complete type information yet, which the new derivation-propagating Canonicalize notices. * Analysis/Tree/AlgebraicSimplification.java: Fixup the AlgebraicSimplification class to use new derivation-aware Simplification infrastructure. Doesn't actually propagate type information yet, though. =( * Analysis/Tree/Canonicalize.java: Updates to the pattern-driven Canonicalize class to support type/derivation updates during canonicalization. Fixed up some javadoc, too. * Analysis/Tree/Simplification.java: Extend the Simplification infrastructure to support derivation-propagation. * IR/Tree/Tree.java: Take advantage of the new(ish) unified Tree child code to add some global assertions on tree children: they must never be null, and they must always belong to the same TreeFactory as the parent. * IR/Tree/DerivationGenerator.java: Add (yet another) DerivationGenerator method to help propagate type information during tree manipulation. Also fixed a nasty infinite-recursion bug in TADadd(). * IR/Tree/CALL.java: Fix a null pointer exception in CALL.rename() when getRetval()==null. * IR/Tree/Tree.java: Whoops -- the CloningTempMap that Tree.clone() was creating for the clone operaton was not properly handling register temps in trees. The anonymous temp map Does The Right Thing now. Also removed a "convenience" map function that no one was using anymore. * Analysis/Tree/Simplification.java: Analysis.Tree.Simplification now clones the tree (as it ought) before modifying it in-place, so that it properly fulfils the code factory contract. * IR/Tree/CanonicalTreeCode.java, IR/Tree/Code.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/TreeCode.java: Properly implement clone(HMethod, Frame) in TreeCode/CanonicalTreeCode/ OptimizedTreeCode in a manner that preserves derivation information in the new clone. This uses the new groovy functionality of DerivationGenerator. Reworked Tree.Code to better mesh with its inheritance from HCode. The HCode-specified clone(HMethod) method now turns around and calls the tree-specific clone(HMethod, Frame) method with the current frame by default. I also changed the default return type of the tree-specific clone method to Tree.Code to make everyone's life a little easier. Yay. * IR/Tree/TEMP.java: Simplify and streamline Tree.TEMP.rename(). Hopefully this makes the code more readable, too. * IR/Tree/DerivationGenerator.java: Write a callback factory for DerivationGenerator which allows us to clone Trees while keeping the derivation informatio up-to-date. * ClassFile/HCode.java: Provide a default implementation of clone() for HCode which turns around and calls clone(getMethod()). * Analysis/Maps/Derivation.java: Cleaned up the documentation and number of clone/rename methods in Derivation.DList. * IR/Tree/ToTree.java: Found an old FIXME comment from when I was adding folding into ToTree. Not needed any more; deleted. * IR/Tree/ALIGN.java, IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/DATUM.java, IR/Tree/ESEQ.java, IR/Tree/EXP.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/METHOD.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/NATIVECALL.java, IR/Tree/RETURN.java, IR/Tree/SEGMENT.java, IR/Tree/SEQ.java, IR/Tree/TEMP.java, IR/Tree/THROW.java, IR/Tree/ToCanonicalTree.java, IR/Tree/Tree.java, IR/Tree/UNOP.java: Whoops. Needed to add a TempMap parameter to the Tree.CloneCallback callback() method. * IR/Tree/CanonicalTreeCode.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/ToCanonicalTree.java, IR/Tree/TreeCode.java, Analysis/Tree/ConstantPropagation.java: Updates to existing code to use the new clone()/rename() interface. * IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/DATUM.java, IR/Tree/ESEQ.java, IR/Tree/EXP.java, IR/Tree/ExpList.java, IR/Tree/INVOCATION.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/METHOD.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/NATIVECALL.java, IR/Tree/OPER.java, IR/Tree/RETURN.java, IR/Tree/SEGMENT.java, IR/Tree/SEQ.java, IR/Tree/StmList.java, IR/Tree/TEMP.java, IR/Tree/THROW.java, IR/Tree/Tree.java, IR/Tree/UNOP.java, IR/Tree/ALIGN.java: Revamped the tree cloning code to include a user-defined callback function. This allows us to update auxiliary information (types, derivations, etc) as the cloning occurs, or to produce an old-tree to new-tree Map or an old-temp to new-temp Map or whatever else one feels like. Added better documentation to all of the Tree.clone()/Tree.rename() methods, too & changed the interface from taking a CloningTempMap to allowing a simple TempMap. - The old interface was: rename(TreeFactory tf, CloningTempMap ctm) - The new interface is: rename(TreeFactory tf, TempMap tm, CloneCallback cb) * IR/Tree/Exp.java, IR/Tree/INVOCATION.java, IR/Tree/Stm.java: Remove bogus abstract rename() method declarations which hide the real interface declaration in Tree. (alternatively, these extra methods could be thought of as 'reminding the implementor of the abstract declarations in Tree' but they got in my way when I was changing the root declaration, so I'm punting them.) * Analysis/Tree/Canonicalize.java: Simplify Tree.Canonicalize by combining the two 'move ESEQ to the left' rules. Also add a bit more documentation. * IR/Tree/DerivationGenerator.java: Added a 'remove' method to DerivationGenerator to allow 'remove and replace' operations on the derivation information. This helps with memory management: unused tree can be thrown away instead of dangling live within the derivation generator's internal tables. * IR/Tree/Code.java: Removed all sorts of evil evil Tree.Code cruft. This cruft-cleaning made possible by the letters X, G, and the recent Tree revamp. In particular: - Removed the implementation of Tree.Code.getLeafElements(). What is a leaf element for tree form, anyway? Everyone seems to have different ideas, and no one's using this method anyway. Now returns 'new Tree[0]', which pretty much sums up what we know about leaf elements and tree form. - Simplified Tree.Code.getElementsI() using the new parent/sibling tree iteration method. This method uses Quads.Code.getElementsI() as inspiration, and tries hard to keep a strict pre-order iteration going. (I guess I don't *really* need a 'visited' set if the input is a true tree; but it can't hurt...) - Removed code.replace() method and the Replacer class that went with it. Not needed not that there's Tree.replace(), which is slicker and cleaner to boot. * Analysis/Tree/ConstantPropagation.java, Analysis/Tree/TreeFolding.java: Removed old calls to deprecated Tree.Code methods, in preparation for finally removing them (the deprecated methods) completely. * IR/Quads/Code.java: clean up some old commented-out code in Quads.Code.getElementsI(), closing a sad chapter in the war between different parts of my brain (the code I was complaining so vigorously about in the comments was written by *me*, once upon a time...). 2000-02-14 salcianu * Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/ArtificialTempFactory.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/Relation.java: Code clean-up, optimization and javadoc improvements. 2000-02-14 C. Scott Ananian * Analysis/Tree/Canonicalize.java: New file. * Analysis/Tree/Canonicalize.java: Very simple (216-line) tree canonicalization class, using the Tree.Simplification framework. Simplicity is a virtue. This is pattern-driven, so it should be straight-forward to propagate derivation information through it. I'll do that after dinner. * IR/Tree/Tree.java: Add an assert to keep people from calling Tree.getSibling() on the root. Now, one could argue that the root has "no siblings" and thus null should be returned, but it seems to me that, since the typical child iteration loop looks like: for (Tree tp = tree.getFirstChild(); tp != null; tp=tp.getSibling()) /* do something useful */; that calling getSibling() on root is more likely a serious error that should be caught and flagged (one might also see this happen if one unlinks a subtree and then tries to call getSibling() on the just-deleted tree -- this is also an error that should be caught). In short, I think the limited usefulness of root.getSibling() is more than outweighed by the strong probability that any such call is a bug which should be caught. * IR/Tree/MOVE.java: Protect setDst() a bit -- try to make sure that the left side of a MOVE is either a MEM or a TEMP. Removed bogus assert from build() -- the kids() list is no longer always two entries long -- and add an assert (to make up for it). * Analysis/Tree/AlgebraicSimplification.java: Moved all the generic simplification code to Tree.Simplification for reuse. * Analysis/Tree/Simplification.java: Factor out the generic simplification code from AlgebraicSimplification for reuse. @SPLIT: AlgebraicSimplification Simplification@ * Analysis/Tree/Simplification.java: New file. * Analysis/Tree/AlgebraicSimplification.java: Switch to a post-order traversal of the tree (using the groovy new generic tree traversal methods) when simplifying, in order to more efficiently match multiple patterns. * IR/Tree/Code.java, IR/Tree/Print.java, Interpret/Tree/Method.java, Tools/PatMat/MaximalMunchCGG.java: Random fixes to existing code to work with the new Tree revamp. Duncan actually did all the hard work here, when he made the Tree subclass' fields private and forced everyone to use the accessor methods. Only a METHOD.getParams() seems to have gotten by. (Oh, and Tree.Code tried to manually set the parent and sibling fields -- a no-no!) * IR/Tree/ToCanonicalTree.java: Fix up ToCanonicalTree to work with the slightly different kids()/build() behavior after the Tree revamp. * IR/Tree/ALIGN.java, IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/DATUM.java, IR/Tree/ESEQ.java, IR/Tree/EXP.java, IR/Tree/Exp.java, IR/Tree/INVOCATION.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/METHOD.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/NATIVECALL.java, IR/Tree/OPER.java, IR/Tree/RETURN.java, IR/Tree/SEGMENT.java, IR/Tree/SEQ.java, IR/Tree/Stm.java, IR/Tree/TEMP.java, IR/Tree/THROW.java, IR/Tree/Tree.java, IR/Tree/UNOP.java: Reworked Tree infrastructure. Now, instead of having individual fields in each Tree subclass, which (with a lot of work & code duplication) attempt to be tied together into a uniform parent/sibling chain, there is *only* the child list and parent pointer for each tree; all the individual field accessors access numbered elements of the child list. This helps immensely in keeping the structures in sync w/ the minimum of work. It will also allow us to write tree traversal algorithms without worrying about the details of the individual quads (a good thing). kids() and build() have been built on top of the child list structure; they filter out destination expressions as per Appel's book (i.e. kids() does not always return all children of a node). I'm actually very happy with the way this cleans up the code base. Replacing subtrees should be *much* easier now. 2000-02-14 andyb * Backend/Sparc/CodeGen.spec, Backend/Sparc/RegFileInfo.java: Fix two little bugs - was missing a CALL pattern, and things were breaking when generating instructions with pre-allocated integer registers (floating point worked fine though :). 2000-02-14 C. Scott Ananian * IR/Tree/ExpList.java: Add an ExpList.size() method to tell you how long an ExpList is. 2000-02-14 andyb * Backend/Sparc/Code.java, Backend/Sparc/RegFileInfo.java: Implemented getRegisters, registerAssigned, and removeAssignment in Sparc.Code. * Backend/Sparc/CodeGen.spec: Added GC_INDEX segment to Sparc CodeGen.spec, and renamed uses of the class variable "root" to "first", which has now been moved up to Generic.CodeGen. * Main/SparcMain.java: Added AlgebraicSimplification pass to Sparc Main too. 2000-02-14 salcianu * Analysis/PointerAnalysis/ActionRepository.java: Function "parallelLoads" added. It returns all the outside edges that are read (through a ld action) in parallel with an nt thread. 2000-02-14 C. Scott Ananian * Main/SAMain.java: Turn on algebraic simplification by default. * Backend/StrongARM/CodeGen.spec: Overhauled StrongARM.CodeGen: - removed redundant patterns added because of operator commutativity. These will be automatically generated by a CGG-tool front-end (not yet written, of course) - Expanded spec patterns to match full range of StrongARM addressing modes 1 and 2, including magic shifts. - Added patterns for subtract operation, which in Tree form is encoded as BINOP(ADD, x, UNOP(NEG, y)) - While I was at it, wrote patterns for the StrongARMs funky 'reverse-subtract' operator. Bless its CISCy heart. - Added full complement of CJUMP(BINOP(CMP, ...), ...) patterns, which should eliminate forever the dreaded 'test twice, jump once' in generated code. - I fixed some shifting bugs which I stumbled across while revising the file (asr and lsr mixed up) and added a FIXME, since the register-shift-register operation is incorrect (by the Java Language Standard definition of a shift) until we add an explicit 5-bit mask on the shift amount. This requires an %extra temp, however, and I don't think that works yet in the CGG. - Added an XXX to the BINOP(REM, ...) patterns, as I think Java's 'remainder' operation is *not* equivalent to 'modulus'. They differ when working with negative numbers. Not sure about this, though. * Analysis/Tree/AlgebraicSimplification.java: Improvements to Tree.AlgebraicSimplification: - _CONST, _CONST0, _CONSTNULL are no longer mutually exclusive, which makes it easier to test for 'any const' type. - Added _CONST1 and _CONSTm1 (for constant -1) for some of the new rules. - Added contains() method to make the (value & (mask1|mask2)) != 0 expressions less clumsy. Now it's simply: contains(value, mask1|mask2) - Added 'makeZero' rule for: exp & 0, exp * 0, exp % 1 --> 0 - Added 'exp | 0, exp ^ 0, exp * 1, exp / 1 --> exp' cases to 'removeZero' rule. - Added a rule to recreate ~x from x ^ -1 (which is how quad form represents it) - Added ~(~i) --> i case to 'doubleNegative' rule. - Added a note about non-canonical unsafety to 'makeZero', 'mulToShift', and 'divToMul' (although divToMul might in fact be safe) 2000-02-14 bdemsky * IR/Quads/Pattern.java: Keep inserted TYPECAST's from messing up the pattern visitor. * Analysis/EventDriven/CloningVisitor.java: Documented a few more methods... * Analysis/EventDriven/CloningVisitor.java: Made sure that I don't do an instanceof check for java.lang.Object... 2000-02-14 C. Scott Ananian * Analysis/Tree/AlgebraicSimplification.java: fixed a spelling error in a comment. divToMul rule match()ed 64-bit divisions, but apply() couldn't handle them. fixed. * IR/Tree/TreeGrapher.java: TreeGrapher was broken: edgeC and friends were returning Sets of *Tree*s, instead of Sets of *HCodeEdge*s. Fixed now. If we had proper generic types, this would never have happened. * Analysis/Tree/ConstantPropagation.java: Constructor for ReachingHCodeElements has changed. * Analysis/DataFlow/ReachingHCodeElements.java: Fixed up ReachingHCodeElements to use the BasicBlock.Factory.getBlock() method instead of the hceToBB map ... which was set to null. I guess the BasicBlock re-org broke this analysis. Near as I can tell, it works now. 2000-02-14 bdemsky * Analysis/EventDriven/CloningVisitor.java: Remove TYPECAST.... Unfortunately they don't exist. Really wish that they did though [so I don't have to generate 10 Quads just to help out the TypeInfo pass...] 2000-02-13 C. Scott Ananian * Analysis/Tree/ConstantPropagation.java, Analysis/Tree/TreeFolding.java, Analysis/BasicBlock.java: Move blocksIterator() method from BasicBlock to BasicBlock.Factory. * Backend/StrongARM/CodeGen.spec: StrongARM/CodeGen.spec updates: Add more CJUMP patterns to make conditional branching efficient & fun! Refine the RETURN patterns (removing an instanceof in the process!) * Tools/PatMat/MaximalMunchCGG.java: Fix MaximalMunchCGG buglet: was checking the type of RETURN.getRetval() (which may be precise) instead of the type of RETURN (which may not). * Analysis/Tree/AlgebraicSimplification.java: Added an 'associativity' rule to the simplification code to handle the (common) case of (x + K1) + K2 ---> x + (K1 + K2). Also added a loop around the simplification code, so that it keeps simplifying the tree until no more rules apply. Informally, it seems that only a handful of methods obtain any benefit from the second pass... but I still think it's a good idea. =) * IR/Tree/ToTreeHelpers.java: In a fit of stupidity, I completely reversed the sense of the isBarrier() test in SSISimpleFoldNanny. Fixed it. * Backend/StrongARM/CodeGen.spec: Add a (x + (y << K)) rule which is very useful for array addressing. Extend some of the rules matching constants so that they match 'null' (as a zero constant) as well. * ClassFile/Linker.java: Be anal about Util.assert() messages, on the assumption that Linker.getDescriptor() is called extremely often by the compiler. This may be bogus reasoning, but unless you're screwing with descriptor strings in some way, neither of these assert() are likely to trigger anyway. Felix, you really ought to tell me how you managed to get them to go off. * IR/Tree/ToTree.java: Toot my own horn a bit by adding my name to the authors list of ToTree. * IR/Tree/ToTree.java, IR/Tree/Translation.java: Translate all constants as Translation.Exps instead of Tree.Exps, which lets us optimize the 'branch conditional on constant' case. * Backend/StrongARM/CodeGen.spec: Add some more patterns to the StrongARM spec file to cover common cases. * Analysis/Tree/AlgebraicSimplification.java: Add toString() method to aid debugging. * Analysis/Tree/AlgebraicSimplification.java: Fixed bugs in Tree.AlgebraicSimplification. First off, in Java (and in C, too, for that matter) the bitwise-and operator '&' has higher precedence than the bitwise-or '|' operator. This means that expressions like (somevalue & mask1|mask2|mask3) != 0 will *always* evaluate to TRUE. AlgebraicSimplification had three instances of this Along the same lines, there was an expression of the form (value & ~(mask1|mask2|mask3)) != 0 Now, while the *intent* of this expression was obvious from the context (to ensure that 'value' does *not* have any of the bits set in mask1, mask2, or mask3) the way it was written was incorrect. Bitfields are tricky. There was one instance of BINOP.operandType() being used where BINOP.type() should have been used. Felix and I have talked before about how confusing these two methods are, but the way we have things makes sense if you think hard about it. type() always returns the *result* type of the expression, which for certain operations (comparisons, for example) is unrelated to the *operand* type. Lastly, there was a weird instance of 'UNOP.optype' being used where 'UNOP.op' should have been used. Very odd. AlgebraicSimplification now works on the canonical 'Hello, world' example (it executes without errors in StrongARM native code) and I'm pretty confident it will work for larger cases as well. * Analysis/Tree/AlgebraicSimplification.java: Added proper codeFactory method to Tree.AlgebraicSimplification. * IR/Tree/ToTree.java: ToTree now uses the SSISimpleFoldNanny by default when converting from LowQuadSSA/I. Fixed a bug in the tree folding of METHOD defintions. Added a pair of assertions to help verify that we're folding what we ought to be (and only what we ought to be). * IR/Tree/ToTreeHelpers.java: Fixed the SSISimpleFoldNanny to do the right thing with SIGMAs, PHIs, and PCALLs. * IR/Tree/ToCanonicalTree.java: Huge hack, but it's non-obvious to me at this point how to make ToCanonicalTree "properly" support derivation information; this kludge-and-a-half will at least allow us to continue working on the compiler through-line. 2000-02-12 bdemsky * Main/EventDriven.java: ED Main file...Added it just in case it is required to compile w/o errors. * Analysis/Quads/QuadLiveness.java: Many bug fixes.... * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/CloningVisitor.java, Analysis/EventDriven/ContCode.java, Analysis/EventDriven/ContCodeNoSSA.java, Analysis/EventDriven/ContCodeSSI.java, Analysis/EventDriven/EventDrivenCode.java, Analysis/EventDriven/ToAsync.java: Major rewrite...Now I try my best to build SSI code, and if when I fail, I fix it... * Analysis/EventDriven/ContCodeNoSSA.java, Analysis/EventDriven/ContCodeSSI.java: New file. * IR/Quads/QuadNoSSA.java, IR/Quads/QuadRSSI.java, IR/Quads/QuadSSI.java, IR/Quads/RSSIToNoSSA.java: Adding support for "Relaxed" SSI for lack of a better name. It allows PHI/SIGMA functions, but they don't guarantee Single Assignment/other analysis properties. * IR/Quads/QuadRSSI.java, IR/Quads/RSSIToNoSSA.java: New file. 2000-02-12 pnkfelix * Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Spec.java: FSK: Begun the long awaited incorporation of support for FSK: auto-generating TEMP pattern-matchers so that the FSK: spec-file doesn't require it (and so that we can FSK: update the Derivation info automagically) FSK: Still not sure how to handle the fact that ToTree FSK: can't seem to give me derivation info for the TEMP FSK: trees, but whatever... * Support/NullCodeGen.template: FSK: oops. without the neccessary interface updates to FSK: NullCodeGen.template, FLEX wouldn't compile. * Main/SAMain.java, Main/SparcMain.java, Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/Main.java, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Spec.java, Backend/Generic/Code.java, Backend/Generic/CodeGen.java: FSK: Made a number of interface changes, either to add Type FSK: declaration support to CodeGen or to make my life easier FSK: (like making CodeGen.gen(...) non-overloaded) 2000-02-12 C. Scott Ananian * IR/Tree/ToTreeHelpers.java: First pass at a FoldNanny for SSI form. * Util/Collections/FibonacciHeap.java: Bad Scott: checked in more code with import *. I fixed it now. 2000-02-12 pnkfelix * Tools/PatMat/CodeGeneratorGenerator.java: FSK: Updated javadoc in an attempt to have it correspond FSK: a little more closely with the actual code. 2000-02-12 C. Scott Ananian * Util/Collections/FibonacciHeap.java: Implemented the missing delete() and decreaseKey() functions for FibonacciHeap. 2000-02-12 pnkfelix * Backend/StrongARM/CodeGen.spec, Backend/Sparc/CodeGen.spec, Backend/Generic/CodeGen.java: FSK: Moved emit(Instr) and first, last fields to Generic.CodeGen, and FSK: updated spec-files accordingly. 2000-02-12 C. Scott Ananian * Util/Collections/FibonacciHeap.java: First-pass at a FibonacciHeap implementation. decreaseKey() and delete() are still unimplemented, but what's there has been self-tested and verified correct. * Util/Collections/FibonacciHeap.java: New file. 2000-02-12 salcianu * Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointsToGraph.java: Changes to support the new additions to the inter-thread phase + improved javadoc. * Analysis/PointerAnalysis/InterThreadPA.java: The Inter-thread phase was imporved and works now pretty well! Some functions to translate the actions from the starter and the startee graphs into the new one were added. Some other minor modification, javadoc improvements etc. * Analysis/PointerAnalysis/Relation.java: Added a forAllEntries function that allows teh programmer to execute a function for each of the entries of a Relation. * Analysis/PointerAnalysis/PAEdgeVisitor.java, Analysis/PointerAnalysis/PANodeVisitor.java: Javadoc added. * Analysis/PointerAnalysis/RelationEntryVisitor.java: New class added: wrapper (ML funs would call it closure) for a function that access a entry in a Relation. * Analysis/PointerAnalysis/RelationEntryVisitor.java: New file. 2000-02-12 C. Scott Ananian * Util/Collections/BinomialHeap.java: Whoops; accidentally checked in code with import * statements. Bad Scott. Also made a javadoc tweak to BinomialHeap. * Util/Collections/BinomialHeap.java: Fixup BinomialMap to accurately conform to Heap interface. Constructors look nice and decreaseKey() actually works now. Split Map.Entry from implementation of Node. Wrote an O(n) implementation of the 'bad' case of union to replace the O(n lg n) one. Added more self-test code. Moved the isHeapOrdered() checks to explicit 'if (debug)...' tests to try to enable dead-code elimination in compilers that support it. * Util/Collections/Heap.java: Tweaked the javadoc for Heap. * Util/Collections/BinaryHeap.java: Use PairMapEntry instead of AbstractMapEntry in BinaryHeap. This zaps some duplicate code. * Util/PairMapEntry.java: Add a protected setKey() method to PairMapEntry to let subclasses modify the 'key' value. * Util/Collections/BinomialHeap.java: New file. * Util/Collections/BinomialHeap.java, Util/BinomialMap.java: Renamed harpoon.Util.BinomialMap to harpoon.Util.Collections.BinomialHeap. Made new BinomialHeap extend harpoon.Util.Collections.Heap interface. @RENAME: Util/BinomialMap Util/Collections/BinomialHeap@ * Support/collections.jar: Whoops. Using the JDK1.2 String.class in collections.jar made JDK1.1 very very sad. So, start with the JDK1.1 String.java, add the compareTo() method which JDK1.1 is missing, and stick *that* in collections.jar. That seems to make everyone much happier. * Util/Collections/BinaryHeap.java: Committed my implementation of BinaryHeap (following CLR) conforming to the new Heap interface. Felix, I know you've got a BinaryHeap implementation already in your PriorityQueue stuff, but the interface has to be way different to support the decreaseKey(), delete(), and union() operations efficiently, since Heaps aren't really searchable. This BinaryHeap has a self-test method, and I've verified that the implementation is correct. * Util/Collections/BinaryHeap.java: New file. * Util/Collections/AbstractHeap.java, Util/Collections/Heap.java: Added a comparator() method to the Heap interface, to parallel the comparator() method of SortedSet. Implemented comparator() in AbstractHeap. Also added an EntryComparator inner class, to make it easier to implement Heaps. * IR/Tree/ToTreeHelpers.java: Tweak ToTreeHelpers to remove debugging code (oops! didn't mean to check that in!) and to use the new Heap interface (and BinaryHeap implementation) instead of (broken) BinomialMap, which we were using before. * IR/Tree/ToTree.java: Tweak ToTree to use the helpers in ToTreeHelpers. * Util/Collections/AbstractHeap.java, Util/Collections/Heap.java: Add a new Heap interface to harpoon.Util.Collections. I realized that java.util.Map just doesn't cut it for heaps. I will be migrating my BinomialMap implementation over as BinomialHeap. * Util/Collections/AbstractHeap.java, Util/Collections/Heap.java: New file. * IR/Tree/ToTreeHelpers.java: Added helper classes for ToTree into a separate ToTreeHelpers wrapper class. These include EdgeOracle and FoldNanny implementations, as well as a simple ReachingDefs implementation for SSI form (which used to live inside ToTree). * IR/Tree/ToTreeHelpers.java: New file. * Util/BinomialMap.java: Whoops. Fixed an interface bug: you need to know the Map.Entry associated with an insertion so that you can later call decreaseKey with it. So I split the put() method into put() (which conforms to AbstractMap) and insert() (which returns the Map.Entry). I think I'm going to ditch Map-compatibility RSN. Also added a comment noting an interface bug with decreaseKey (it invalidates Map.Entrys the client may have stored away) -- fixing this is non-trivial, so it will probably happen only as part of the general interface re-work. 2000-02-11 kkz * Backend/Runtime1/DataGC.java: Had to change the format of the gc data so that we can tell when a particular derived pointer exists in more than one location. 2000-02-11 salcianu * Main/PAMain.java, Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/Matching.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/UComp.java: Improvements + bug fixes: the inter-thread analysis works! * Analysis/PointerAnalysis/PAThreadMap.java: Bug fix in PAThreadMap: in control flow join points, the right operation is max (componentwise), not sum. 2000-02-11 C. Scott Ananian * Support/collections.jar: Added java.lang.Integer and java.lang.String to the JDK1.1-compatibility collections.jar archive, since in JDK1.2 and above these two classes implement java.lang.Comparable, which doesn't exist in JDK1.1. * IR/Tree/ToTree.java: Added folding support to ToTree. We don't have any 'FoldNanny's yet, so this code isn't being exercised, but the functionality is there. Next task is to write a semi-intelligent FoldNanny and EdgeOracle. * IR/Tree/Translation.java: Added assertions and a flag to ensure that Translation.Exps are evaluated exactly once. * Util/Default.java: Added a pair constructor to Util.Default. It's about time. (I estimate 90% of the uses of 'Util.Tuple' could be converted to pairs. I recommend doing so for new code.) 2000-02-11 pnkfelix * Analysis/BasicBlock.java, Analysis/Instr/LocalCffRegAlloc.java, Backend/Generic/MaxMunchCG.java: FSK: 1. Some changes to get compilation to work again FSK: 2. An extra layer for the CodeGen system is added. * Backend/Generic/MaxMunchCG.java: New file. 2000-02-11 C. Scott Ananian * IR/Tree/ToTree.java: Added FoldNanny interface to ToTree, in preparation for addition of tree folding code in earnest. Also added some javadoc for EdgeOracle and TypeBundle. ToTree uses Karen's ReachingDefsImpl now to translate low-quad-no-ssa form. 2000-02-11 salcianu * Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/UComp.java: Two classes I'm using for debugging. * Analysis/PointerAnalysis/Debug.java, Analysis/PointerAnalysis/UComp.java: New file. * Analysis/AllCallers.java, Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/Relation.java, Analysis/PointerAnalysis/SCCBBFactory.java, Analysis/PointerAnalysis/SCComponent.java, Main/PAMain.java: Lots of changes ... I've been tracking for some bugs all the day long and hardly I could find a part that hasn't been filled with debug messages, asserts etc. 2000-02-10 kkz * Analysis/Quads/QuadLiveness.java: Didn't know Brian was working on this file at the same time. Merged my code clean-ups, hopefully without destroying his fixes. 2000-02-10 bdemsky * Analysis/Quads/QuadLiveness.java: Some bug fixes: 1) Conditions for update predecessors were wrong. 2) Added edges to set that only quads were suppose to be in. 3) Took out some additional overhead that wasn't necessary [doesn't build workset as often anymore]. 2000-02-10 pnkfelix * Analysis/BasicBlock.java, Analysis/Instr/LocalCffRegAlloc.java: FSK: Found a bug; tracked it down to BasicBlock construction. FSK: Strange; I really thought I got this right. In any FSK: case, assertions have been added. * Backend/Runtime1/Runtime.java, ClassFile/Linker.java: FSK: 1. Added some assertion messages to Linker to track down FSK: a problem that was causing a crash FSK: 2. Commented out a line in Runtime (hopefully temporarily) * Backend/Analysis/BasicGCInfo.java, Analysis/Instr/RegAlloc.java: FSK: Added a way for Karen to extract the TempLocator from FSK: the IntermediateCodeFactory. FSK: Not sure that this will be the final resting place for FSK: this method, but it seemed like the best place FSK: in the thirty seconds I spent thinking about it. 2000-02-10 kkz * Backend/Analysis/BasicGCInfo.java, Backend/Generic/GCInfo.java, Backend/Runtime1/DataGC.java, Backend/Runtime1/Runtime.java, IR/Assem/Code.java, homeBackend/Runtime1/DataClaz.java: Various changes to interfaces and formats. Still in development. 2000-02-10 C. Scott Ananian * IR/Tree/TreeCode.java: Fixup the javadoc and implementation of the default code factory for tree form to use a LowQuadSSA source representation. * Util/Collections/BitSetFactory.java: Used the new reverse-mapping function functionality of Indexer to implement a fast iterator for BitStringSet. Also snipped some redundant code and replaced it with calls to the superclass implementations in AbstractSet. I actually don't see any actual run-time speed improvement due to the new iterator. But in theory complexity goes down for large sparse BitStrings. * Util/Indexer.java: Extend the Indexer interface to support an optional reverse mapping function. * IR/Assem/Instr.java: Remove INDEXER field, as it is redundant now. Use HCode.elementIndexer() instead. (Nothing was using Instr.INDEXER anyhow.) * ClassFile/HCode.java: Add an elementIndexer() method to HCode to parallel the elementArrayFactory() method. This method might have gone into HCodeElement except for the fact that HCodeElement is an interface (doh!). * Util/BitString.java: Fixed javadoc -- harpoon.Util.BitString does *not* "automatically grow as needed" like java.util.BitSet does. Removed dangerous constructor, too -- since the string doesn't grow, you should *always* specified the desired string size. Added firstSet() and lastSet() methods to enable efficient iteration; added self-test method to BitString to verify the implementation. Updated length() method to use lastSet(). * Tools/PatMat/Spec.java: harpoon.Util.BitString doesn't "automatically grow as needed" like java.util.BitSet does, so it is always necessary to explicitly specify the size of the desired string/set. 2000-02-10 bdemsky * IR/Quads/ToNoSSA.java: Scott seemed to have introduced this bug in the last week or so. The derivation map has to be guarded by a null check...for those of us in QuadSSI. 2000-02-10 kkz * Analysis/ReachingDefsImpl.java: Turned off debugging. * Analysis/ReachingDefsImpl.java: Cleaned up code and fixed some bugs. 2000-02-10 C. Scott Ananian * Util/BitString.java: Added better javadoc for BitString; making it clear that it is a variant of java.util.BitSet as well as the fact that the bit indices are zero- based. Added implementation of length() from JDK1.2. Fix a buglet in equals() that would cause two different BitStrings to compare as different if the amount of space allocated in them differed, even if the set bits in each were identical. 2000-02-09 kkz * Analysis/ReachingDefsImpl.java: First pass at implementing Scott's ReachingDefs interface (actually, abstract class). * Analysis/ReachingDefsImpl.java: New file. 2000-02-09 salcianu * Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/InterThreadPA.java, Analysis/PointerAnalysis/PAThreadMap.java: Bug-fixes and other modifications. * Analysis/PointerAnalysis/ActionVisitor.java, Analysis/PointerAnalysis/ParActionVisitor.java: One interface for visiting actions and one interface for visiting "parallel action" pieces of information have been added. (You know, there is no other way of passing functions in Java). They are supposed to be used in the queries toward an ActionRepository. * Analysis/PointerAnalysis/ActionVisitor.java, Analysis/PointerAnalysis/ParActionVisitor.java: New file. 2000-02-09 C. Scott Ananian * IR/Tree/ToTree.java: MEM nodes are now properly typed. * Backend/Runtime1/StubCode.java: Updates to Backend.Runtime1.StubCode to annotate generated code with the proper type/derivation information. * IR/Tree/TreeCode.java: Tweak TreeCode constructor to allow us to generate derivation information from outside the IR.Tree package (like, in Backend.Runtime1.StubCode). 2000-02-09 salcianu * Analysis/PointerAnalysis/ActionRepository.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/PointerAnalysis.java: Various improvements. 2000-02-09 C. Scott Ananian * IR/Tree/DerivationGenerator.java: Made DerivationGenerator and its useful methods public. I would really prefer to leave this package-scope, but harpoon.Backend.Runtime1.StubCode needs it. Added javadoc, since I'm making the methods public. 2000-02-08 C. Scott Ananian * IR/LowQuad/Translate.java, IR/Tree/ToTree.java: Bug fixes for ToTree + derivations. * IR/Tree/TreeCode.java: By default, make the Tree codeFactory go through LowQuadSSA, not LowQuadNoSSA as before. * IR/Tree/ToTree.java: Allow ToTree to work with LowQuadSSA as well as LowQuadNoSSA inputs. You can also supply any LowQuad.Code and your own EdgeOracle and ReachingDef objects, if you feel like it. 2000-02-08 pnkfelix * Backend/Generic/RegFileInfo.java: FSK: Changed interface to make it clear that we use FSK: Temp x DefinitionPoint * Backend/Generic/RegFileInfo.java: FSK: Added LocationFinder for Karen 2000-02-08 C. Scott Ananian * Backend/Runtime1/StubCode.java: The StubCode tree form which the Backend generated for JNI native method stubs has been updated to use TreeDerivation. Proper derivation information was never being created, though, and it still isn't. This will change... * IR/Tree/CanonicalTreeCode.java, IR/Tree/Code.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/ToCanonicalTree.java, IR/Tree/TreeCode.java: Updated harpoon.IR.Tree.Code and subclasses to return TreeDerivation objects instead of implementing Derivation. Cloning does not yet preserve TreeDerivation information, as the Tree.clone() interface is broken. ToCanonicalTree has also been updated to use TreeDerivation and the associated DerivationGenerator class, but as I was updating I noticed that derivation information for the canonical form was never actually being generated (even though all the hooks were there). So the updated ToCanonicalTree has the same lack of functionality as its predecessor. This too will change... * IR/Tree/ToTree.java: New all-singing, all-dancing ToTree routines. Reworked ToTree to allow: 1) accurate TreeDerivation information to be generated 2) integrated tree folding during creation. Not yet implemented: 1) proper derivation information for MEM nodes. 2) complete tree folding implementation 3) proper interfaces for EdgeOracle and ReachingDefs * IR/Quads/ToNoSSA.java: Fix a bug in ToNoSSA, where we were removing derivation information from our map before we were really done with it. * Analysis/Maps/Derivation.java: Add toString() method for Derivation.DList. * Util/Tuple.java: Add toString() method for harpoon.Util.Tuple. * Util/WorkSet.java: Hmm. An odd oversight in a toString() method. I don't think anyone uses this method anyway. * Util/Tuple.java: Removed an unused pre-Collections Enumeration; fixed up the javadoc a bit. * IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java: javadoc and comment fixes. 2000-02-08 bdemsky * Support/EventDriven.jar: Updates to EventDriven.jar. * Analysis/EventDriven/EventDrivenCode.java: Forgot to clone temps...doing it now... * Analysis/EventDriven/CloningVisitor.java: Fixed another bug. * Analysis/EventDriven/CloningVisitor.java: Fixed some bugs... * Analysis/EventDriven/CloningVisitor.java, Analysis/EventDriven/ContCode.java, Analysis/EventDriven/EventDriven.java, Analysis/EventDriven/EventDrivenCode.java, Analysis/EventDriven/ToAsync.java, Analysis/EnvBuilder/EnvBuilder.java, Analysis/EnvBuilder/EnvCode.java, Analysis/EventDriven/AsyncCode.java: SSI form...Making scott and martin happy. * Analysis/ContBuilder/ContBuilder.java: SSI form...making scott & martin happy. * IR/Quads/SIGMA.java: Added methods to get arrays for src and dst of sigma functions... * IR/Quads/QuadSSI.java: Added protected constructor, so QuadSSI's can be built by the EventDriven pass. 2000-02-08 salcianu * Analysis/PointerAnalysis/Relation.java, Analysis/PointerAnalysis/SCComponent.java: Apparently, some minor changes. * Analysis/PointerAnalysis/InterThreadPA.java: Advancements in the inter-thread analysis. * Analysis/PointerAnalysis/PointerAnalysis.java: A few modifications have been made to keep track of the executed actions and of the ordering relationship between them and the started threads (with the help of the newly introduced ActionRepository). * Analysis/PointerAnalysis/ParIntGraph.java: The action repository component has been added to the Parallel Interaction Graph. \alpha and \phi (Latex notation) from the original paper have been merged into this single component (for efficiency and encapsulation reasons). * Analysis/PointerAnalysis/InterProcPA.java: A few things were modified to take into account the newly added action repository in the inter-procedural analysis. * Analysis/PointerAnalysis/ActionRepository.java: Repository for the set of actions performed by the analysis scope and the ordering relation between these actions and the started threads. * Analysis/PointerAnalysis/ActionRepository.java: New file. * Analysis/PointerAnalysis/PALoad.java: Added a class for modeling the "ld" (load) actions. * Analysis/PointerAnalysis/PALoad.java: New file. 2000-02-07 kkz * Backend/StrongARM/CodeGen.spec, IR/Tree/SEGMENT.java: Added a segment for an index to the garbage collection data. 2000-02-07 pnkfelix * Temp/Temp.java, Temp/TempFactory.java, IR/Assem/Instr.java: FSK: added static INDEXER fields to the Instr and Temp FSK: classes for use with the BitSetFactory. Use at FSK: your own peril. * Backend/Generic/RegFileInfo.java, Util/BitString.java: FSK: REally putting in my reversion this time. FSK: Plus added a method to BitString that Scott FSK: will now implement to allow for more efficient FSK: iteration over BitSets... * Backend/StrongARM/RegFileInfo.java, Backend/StrongARM/TwoWordTemp.java, Backend/Runtime1/DataGC.java, Analysis/Instr/RegAlloc.java, Backend/Generic/GCInfo.java: FSK: reverted out the Union type changes, since Scott prefers FSK: the Set[CommonLoc] solution (which is actually more FSK: adaptible if some register/stackslot allocator decided FSK: to put the same pointer in multiple registers/stack slots 2000-02-07 bdemsky * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/CloningVisitor.java: Removed an inner class...it was 800+ lines long... * Analysis/EventDriven/CloningVisitor.java: New file. * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/ToAsync.java: Cleaning up code, documenting it, and merging similar code sections. 2000-02-07 pnkfelix * Backend/StrongARM/RegFileInfo.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Backend/Generic/GCInfo.java, Backend/Generic/RegFileInfo.java, Backend/Runtime1/DataGC.java: FSK: 1. Begun implementation of backend support for virtual register FSK: Temps, which are necessary for Global Register Allocation FSK: support (at least when you're doing it on top of Local Alloc) FSK: 2. Changes CommonLoc interface to allow the union type FSK: StackOffsetLoc | MachineRegLoc... simply put, instead of FSK: CommonLoc having a function that returns its kind, it FSK: has a function PotentialKind -> Boolean, so that you can FSK: query any Loc for what Kind of CommonLoc it might be. Still FSK: don't quite see how this beats out "instanceof", but FSK: whatever... FSK: 3. Changed Karen's code to support the new interface... it FSK: should still function as it did before on any input that FSK: doesn't use the union type, but it will die on union input FSK: (and I'm not sure from my perusal of the code how hard its FSK: going to be for you to add support for the union type, FSK: Karen...) so I peppered a few asserts in there to ensure FSK: that it only deals with Objects it really knows how to FSK: deal with... 2000-02-07 bdemsky * Analysis/EventDriven/AsyncCode.java: Fixed bug. Beginning to clean up EventDriven Implementation.... 2000-02-06 salcianu * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/Relation.java: Many improvements, bug fixes + modifications to offer support for the inter-thread part of the analysis. * Analysis/PointerAnalysis/InterThreadPA.java: Very preliminary version of the inter-thread analysis. * Analysis/PointerAnalysis/InterThreadPA.java: New file. * Analysis/PointerAnalysis/Matching.java: Wrapper for some functions that implement the inference rules for matching ouside edges against inside edges. These rules try to "concretize" load nodes from one scope (e.g. the startee) with nodes from the other scope (e.g. the starter). * Analysis/PointerAnalysis/Matching.java: New file. * Analysis/PointerAnalysis/PAEdgeVisitor.java: Interface for visiting an edge (something in the style of QuadVisitor). * Analysis/PointerAnalysis/PAEdgeVisitor.java: New file. 2000-02-05 C. Scott Ananian * IR/Tree/DerivationGenerator.java: Simplified DerivationGenerator's handling of DLists quite a bit by using the new canonicalize() method of DList. * Analysis/Maps/Derivation.java: Added canonicalize() and equals() methods to Derivation.DList, which make it easier to simplify and to compare DLists. * Analysis/ReachingDefs.java: Reverting last commit to make ReachingDefs an abstract class (as opposed to an interface) again. Many thanks to Felix for letting me do this. =) 2000-02-05 pnkfelix * Util/BinaryRelation.java, Util/Collections/GenericMultiMap.java, Util/Collections/MultiMap.java: FSK: 1. Added a BinaryRelation interface, and made MultiMap extend FSK: it. FSK: 2. Added a contains(a,b) method to GenericMultiMap to satisfy FSK: the new interface mandated by MultiMap's extension of FSK: BinaryRelation * Util/BinaryRelation.java: New file. 2000-02-05 C. Scott Ananian * Util/HClassUtil.java: javadoc updates. 2000-02-03 kkz * Backend/Runtime1/DataGC.java: Theoretically encodes all relevant gc data including derivations. I guess the next step is actually testing to make sure it does! 2000-02-03 pnkfelix * Analysis/DataFlow/ReachingDefs.java, Analysis/DataFlow/ReachingHCodeElements.java: FSK: Cleaning up the reaching definitions code. Switched around FSK: the BasicBlockVisitor hierarchy so that Scott can make FSK: ReachingDefs an abstract class again if he likes. C:) FSK: The code won't do much in its current status, but FSK: I want to get a better feel for how I can use the FSK: existing code to satisfy the Analysis.ReachingDefs FSK: interface properly. 2000-02-02 C. Scott Ananian * Analysis/ReachingDefs.java: Converted ReachingDefs from an abstract class to an interface, as I noticed that there were subclasses of Analysis.DataFlow.DataFlowBasicBlockVisitor which might want to implement ReachingDefs. * Analysis/ReachingDefs.java: Added a simple and intelligible abstract interface specification for reaching definition analysis. (It's really an abstract class, not an interface, but you know what I mean.) Now, if only the existing reaching definition code would provide constructors as simple and accessor methods as clear... * Analysis/ReachingDefs.java: New file. * Analysis/Liveness.java: Added a snipped of javadoc to Karen's Liveness abstract class, since protected fields show up in the javadoc and it's not nice to leave poor browsers in the dark. =) 2000-02-01 pnkfelix * Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/LiveVars.java: FSK: Bad felix! Didn't check that my last commit FSK: actually compiled. Had to make an "extra special" FSK: ctor to distinquish when to do initialization FSK: explicitly. Hopefully this will all go away and be FSK: a bad dream tomorrow when I revamp Live{Vars|Temps} to FSK: have a more sensible setup. FSK: This compiles and works on my LiveTemps test code. * Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/LiveVars.java: FSK: Fixed an initialization bug in LiveVars/LiveTemps. Should prolly FSK: make bbFact final to ensure initialization. * Main/SparcMain.java, Util/Collections/BitSetFactory.java, Util/Indexer.java, Backend/Analysis/BasicGCInfo.java, Main/SAMain.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/LiveVars.java, Analysis/DataFlow/ReachingDefs.java, Analysis/DataFlow/ReachingHCodeElements.java, Analysis/BasicBlock.java: FSK: Don't shoot me, I'm just following Scott's advice! FSK: Actually, these (hopefully final) changes to the BasicBlock FSK: interface made a signifcant amount of sense, and more FSK: importantly, the code that uses BasicBlock-based analyses FSK: looks a hell of a lot cleaner for them! FSK: FSK: 1. Got rid of Indexer.hasIndex(Object), since Scott pointed FSK: out that it was redundant in BitSetFactory and probably FSK: wouldn't be necessary elsewhere. FSK: 2. Revised BasicBlock's interface for the second time in as many FSK: days. Now BasicBlock.Factory is the central structure holding FSK: together all of the BasicBlocks. Code that wants to do FSK: things like getRoot(), getLeaves(), basicBlockIterator(), and FSK: the like should either construct its own BasicBlock.Factory FSK: or get some other class to pass it to them. 2000-02-01 C. Scott Ananian * Analysis/SESE.java: Added academic papers references to the SESE javadoc. 2000-02-01 pnkfelix * Util/Collections/BitSetFactory.java: FSK: updated BitSetFactory to use Indexer's new interface FSK: (previous version would have broken on, for example, FSK: BitStringSet.contains(object) ) * Util/Indexer.java: FSK: Switched Indexer from an interface to an abstract class. FSK: I'm usually very pro-interfaces (compared to scott at least) FSK: but I'm starting to realize some objects are naturally FSK: implemented as a view of a data-set retrieved with a single FSK: accessor method, and need not be directly extended/implemented. * Util/Collections/BitSetFactory.java, Util/Indexer.java: FSK: Modified Indexer interface; made getID(Object) require that FSK: the object belong to the universe (before, defined "-1" as FSK: a return value in those cases, which Scott didn't like as FSK: much as a big nasty assertion) FSK: To accomodate specifications like Set.contains(Object) in FSK: BitSetFactory, added a hasIndex(Object) so that questionable FSK: arguments can be verified. 2000-02-01 kkz * Backend/Runtime1/DataGC.java: Now dumps stack data. Quite ugly, really. The question is whether using delta tables is really saving us any space. The other question is how hard the decoding hit will be. Using delta tables is good if the same stack offsets tend to be live over multiple gc points. Otherwise, we end up using more space since we need to add pointers back to the base table. Similarly, each gc point is associated with a one-byte long descriptor that, among other things, encode whether the live registers/stack locations/derivations are the same as those from the previous gc point. Which costs us an additional pointer back to the previous gc point. I could probably reduce this to an offset, but I'm not sure how big we can anticipate these gc tables being... 2000-02-01 pnkfelix * Backend/Analysis/BasicGCInfo.java, Main/SAMain.java, Main/SparcMain.java, Analysis/BasicBlock.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Tree/ConstantPropagation.java, Analysis/Tree/TreeFolding.java: FSK: Got rid of one of the redundant basic block iteration methods. FSK: Am considering moving it into the BasicBlock.Factory as FSK: well, since most, if not all, of the code I saw did this: FSK: 1. Make BB factory FSK: 2. Get root from BB factory FSK: 3. Get Iterator from root FSK: 4. Iterate over blocks performing some analysis FSK: 5. Return results of analysis FSK: So it seems silly that steps 2 & 3 can't be combined, but I FSK: want to hold off on that until after I get an official FSK: "okay" on the design as it stands (esp. the name "Factory", which FSK: I'm not sure about...) and add a getFactory() accessor method FSK: to BasicBlock... * Analysis/BasicBlock.java, Analysis/DataFlow/LiveVars.java, Analysis/Instr/RegAlloc.java, Analysis/PointerAnalysis/SCCBBFactory.java, Analysis/Tree/ConstantPropagation.java, Analysis/Tree/TreeFolding.java, Backend/Analysis/BasicGCInfo.java, Main/SAMain.java, Main/SparcMain.java: FSK: Changed BasicBlock interface to use a Factory class for FSK: construction. This actually cleans things up quite FSK: a bit, and removes a fair number of redundant fields from FSK: BasicBlock. Yay! (Plus I actually did a sanity test before FSK: checking my changes in today) 2000-02-01 C. Scott Ananian * IR/Tree/DerivationGenerator.java: New file. * IR/Tree/DerivationGenerator.java: The DerivationGenerator class takes a partial map of Tree.Exps to types and dynamically computes the full Exp-to-type mapping. Used to implement TreeDerivation. * Analysis/Maps/Derivation.java: touch up the javadoc for Derivation.DList. * Analysis/Maps/Derivation.java: Added better javadoc (and a little example) for the Derivation.DList class. * IR/Tree/MEM.java: For some reason the type field of MEM was public but not final. Fixed it. 2000-02-01 bdemsky * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/ToAsync.java: Added support for Asynchronous File I/O. 2000-02-01 C. Scott Ananian * IR/Tree/TreeDerivation.java: New file. * IR/Tree/TreeDerivation.java: TreeDerivation defines the interface for exporting type and derivation information from Tree form. * Util/Collections/Factories.java: Add a WorkSetFactory to Util.Collections.Factories. 2000-01-31 pnkfelix * Analysis/Liveness.java: FSK: Revised spec for Liveness slightly; returning 'null' as FSK: a special value is unnecessary and confusing FSK: (Collections.EMPTY_SET baby) FSK: and unweildy for users of the class. * Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/LiveVars.java, Analysis/Instr/LiveWebs.java, Util/Collections/BitSetFactory.java, Util/Indexer.java: FSK: 1. Making ridiculous attempts to get the code to compile FSK: while in a state of flux as I merge LiveTemps back into FSK: LiveVars. Should even run properly too! FSK: 2. Removed LiveWebs, which never worked QUITE right anyway (and FSK: hopefully my soon-to-emerge new design will allow me to FSK: implement it much more elegantly) FSK: 3. Switched BitSetFactory to use Util.Indexer by default instead FSK: of forcing a HashMap on the user (despite Scott's assurances FSK: earlier today that HashMaps aren't THAT much overhead). FSK: Existing code should still work fine (Yay abstraction!) FSK: Question -- which is better from a design standpoint: FSK: instr.getIndexer() , FSK: instrFactory.getIndexer() , FSK: or code.getIndexer() ??? FSK: where the Indexer returned basically acts to call getID(obj) on FSK: each HCodeElement as well as ensure that the HCodeElement FSK: it was called on comes from the same original pool that the FSK: rest of its domain came from. FSK: Or should I say "screw that" and just make FSK: HCodeElement.DEFAULT_INDEXER which casts the obj to an FSK: HCodeElement and calls hce.getID(); ??? * Analysis/DataFlow/LiveTemps.java, Util/Collections/BitSetFactory.java, Analysis/BasicBlock.java: FSK: 1. Backwards iteration in BasicBlock was broken; fixed that FSK: 2. Fixed initialization bug in BitSetFactory FSK: 3. Debugging current implementation of LiveTemps; works on FSK: linear blocks of code... * Analysis/BasicBlock.java: FSK: BasicBlock fixes. Now actually implements the new FSK: interface (at least as far as the simple test FSK: cases I tried on it...) 2000-01-31 kkz * Backend/Runtime1/DataGC.java: First pass of DataGC. So far dumps only register information. * Backend/Runtime1/DataGC.java: New file. * Backend/Generic/GCInfo.java: Minor modification to specification and behavior of Backend.Generic.GCInfo.gcPoints() to allow meaningful asserts. 2000-01-31 C. Scott Ananian * IR/LowQuad/Code.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java, IR/LowQuad/Translate.java, IR/LowQuad/package.html, IR/Quads/ToNoSSA.java, IR/Tree/CanonicalTreeCode.java, IR/Tree/Code.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/ToCanonicalTree.java, IR/Tree/ToTree.java, IR/Tree/TreeCode.java, Interpret/Tree/Method.java, Analysis/Instr/RegAlloc.java, Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/LowQuad/Loop/MyLowQuadSSI.java, Backend/Analysis/BasicGCInfo.java, Backend/Runtime1/StubCode.java: Moving harpoon.IR.Properties.Derivation to harpoon.Analysis.Maps.Derivation. * IR/Properties/Derivation.java, Analysis/Maps/Derivation.java: Moving harpoon.IR.Properties.Derivation to harpoon.Analysis.Maps.Derivation, so that it can be with harpoon.Analysis.Maps.TypeMap. @RENAME: IR/Properties/Derivation Analysis/Maps/Derivation@ * Analysis/Maps/Derivation.java: New file. 2000-01-31 pnkfelix * Analysis/Tree/TreeFolding.java: FSK: BasicBlock interface change fix 2000-01-31 C. Scott Ananian * IR/Assem/Code.java, Util/Collections/MultiMap.java, Analysis/Instr/GraphBuilder.java, Analysis/Instr/LiveWebs.java, Analysis/Instr/RegAlloc.java, Backend/StrongARM/CodeGen.spec, Analysis/Place.java: Renamed DefaultMultiMap to GenericMultiMap. * Util/Collections/GenericMultiMap.java: New file. * Util/Collections/DefaultMultiMap.java, Util/Collections/GenericMultiMap.java: Renamed DefaultMultiMap to GenericMultiMap, on a perverse C-Scott whim. @RENAME: DefaultMultiMap GenericMultiMap@ 2000-01-31 pnkfelix * Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/LiveWebs.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/DataFlow/InstrSolver.java, Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/ReachingHCodeElements.java, Analysis/DataFlow/Solver.java, Analysis/DataFlow/TreeSolver.java, Analysis/BasicBlock.java: FSK: Changed interface of BasicBlock to incorporate some FSK: suggestions of Scott's... * Analysis/Quads/BasicBlock.java, Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/QuadSolver.java: FSK: 1. Was in act of revising LiveTemps; those changes will FSK: probably be merged into a new Liveness analysis by FSK: the end of the day. FSK: 2. In preperation for revising BasicBlock.java, got FSK: rid of crufty old Whaley code that was the only FSK: thing forcing me to make severe interface mistakes FSK: in BasicBlock * IR/Properties/CFGrapher.java: FSK: Added default implementations for the edges, pred, and succ methods. 2000-01-31 C. Scott Ananian * IR/Quads/SSIRename.java, Analysis/Place.java: Finally got around to implementing the SSI-placement algorithm described in my thesis. Was about 20% faster (and hopefully more linear), and then I crufted it up to make it non-quad specific. The extra interface method dispatch added back 5% of the gain; I think I can make this go away again. In any case, the algorithm is now thesis-correct (which means we can prove properties about it and other good stuff) and (at least slightly) faster. * IR/Quads/FixupFunc.java, IR/Quads/QuadSSI.java: The new renaming algorithm is here to stay. * Analysis/SESE.java: Better documentation for SESE.Region. * Analysis/Quads/QuadLiveness.java: Commented out System.out.println() messages, since I'm about to use this for main-line code. 2000-01-30 C. Scott Ananian * Analysis/Instr/RegAlloc.java, Analysis/Maps/TypeMap.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java, IR/LowQuad/Translate.java, IR/Properties/Derivation.java, IR/Quads/QuadNoSSA.java, IR/Quads/ToNoSSA.java, IR/Tree/CanonicalTreeCode.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/ToCanonicalTree.java, IR/Tree/ToTree.java, IR/Tree/TreeCode.java: Implement new Derivation-extends-TypeMap interface. Fixed some ambiguities in LowQuad derivations, while I was at it. Broke TreeCode (because it was sloppy about cloning Quads and assumed the 'typemap-ignores-hcodeelement' behavior was a law of nature instead of an implementation quirk). Since Derivation now extends TypeMap, the typemap field has become redundant in a lot of places and was eliminated. The derivation code is pretty much impossible to test right now, but precise GC will eventually bring all bugs to light. =) * Analysis/Maps/TypeMap.java, IR/Properties/Derivation.java: New contract for Derivation and TypeMap interfaces. Derivation will eventually extend TypeMap, but I'm checking this in for folks to look at before I've finished doing the updates needed for the change. Please examine & comment ASAP, because I'm already knee-deep in changing existing code to match this new contract. * IR/Quads/Print.java, IR/Quads/Qop.java, Temp/Temp.java, ClassFile/ImplMagic.java: Replace five occurrances of old Hashtable/Vector stuff with new Collections API (HashMap/ArrayList) stuff. 2000-01-30 pnkfelix * Util/Collections/DefaultMultiMap.java: FSK: Javadoc fix * IR/Tree/TreeVerifyingVisitor.java: FSK: Removed a line that I didn't intend to check in in the FSK: first place. 2000-01-30 C. Scott Ananian * IR/Quads/UnHandler.java: Bug fix and 4% speedup: UnHandler was reusing type information from the first leg of a sigma on subsequent sigmas. Depth-first search is tricky. 2000-01-29 C. Scott Ananian * Interpret/Quads/INMath.java: More improvements to native method support in the quad interpreter. * Interpret/Quads/INMath.java: New file. * Interpret/Quads/HCLibrary.java, Interpret/Quads/INClassLoader.java, Interpret/Quads/INFileInputStream.java, Interpret/Quads/Support.java: More improvements to native method support in the quad interpreter. * Temp/Temp.java: Efficiency hack. About a 2% speed-up. Probably not worth it, but pretty harmless. * Backend/Generic/RuntimeInformation.java, Backend/Runtime1/RuntimeInformation.java: Commit the fledgling RuntimeInformation classes. Eventually this will be the Better Way to represent native method/runtime information to analysis tools. It's not there yet. * Backend/Runtime1/RuntimeInformation.java: New file. * Backend/Analysis/JLSRuntimeInformation.java, Backend/Analysis/SunJDKRuntimeInformation.java: Commit the fledgling RuntimeInformation classes. Eventually this will be the Better Way to represent native method/runtime information to analysis tools. It's not there yet. * Backend/Analysis/JLSRuntimeInformation.java, Backend/Analysis/SunJDKRuntimeInformation.java: New file. * ClassFile/HInitializer.java, ClassFile/HInitializerImpl.java, ClassFile/HInitializerSyn.java, ClassFile/HMethod.java, ClassFile/HMethodImpl.java, homeBackend/Runtime1/DataClaz.java, Backend/Analysis/InitializerOrdering.java: Straightened out some of the mess surrounding interface class initializer methods: clarified that HMethod.isInterfaceMethod() returns *false* for class initializers of interfaces (but true for all over methods of interfaces); updated the implementation so that this assertion was actually true. Filtered out interface class initializers from Backend.Runtime.ClazData, and added an XXX to InitializerOrdering to indicate that it's not presently Doing The Right Thing for field accesses which may trigger initializers. 2000-01-28 pnkfelix * Backend/Generic/Code.java, Backend/Generic/CodeGen.java, Backend/StrongARM/CodeGen.spec, IR/Assem/Code.java, IR/Tree/ALIGN.java, IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/EXP.java, IR/Tree/MOVE.java, IR/Tree/SEQ.java, IR/Tree/TreeVerifyingVisitor.java, Analysis/Instr/RegAlloc.java: FSK: 1. Got rid of that procFixup hack and its related instrs field FSK: exposure in Generic.Code (along with Scott's angry FSK: comments) FSK: 2. Fixed an off-by-one error in my register allocator (is it FSK: really an error if its just overly-conservative?) FSK: 3. Removed the norepeats code from various Tree form ctors. * Util/Collections/DisjointSetStructure.java, Util/Collections/LLDisjointSetStructure.java, Backend/Sparc/Code.java, Backend/StrongARM/Code.java, Backend/StrongARM/CodeGen.spec, IR/Assem/Code.java, Backend/CSAHack/RegAlloc/Code.java, Backend/Generic/Code.java, Analysis/Instr/RegAlloc.java: FSK: 1. Corrected doc for DisjointSetStructure FSK: 2. Made LLDisjointSetStructure more fail-fast FSK: 3. Attempted to fix my stuff to remove the hack to FSK: procFixup which directly changes the Code.instrs FSK: field. However I encountered significant difficulty FSK: and so have kept the old code with the new code FSK: effectively if(false)'d out. FSK: 4. Realized I was very stupid with my implementation FSK: of the alternate procFixup method and have removed FSK: the duplicate code. 2000-01-28 kkz * Interpret/Tree/DefaultFrame.java: Removed GCInfo support. 2000-01-28 C. Scott Ananian * Interpret/Quads/INClassLoader.java: ClassLaoder.NativeLibrary doesn't exist on JDK 1.1. * IR/Quads/UnHandler.java: Reduce the number of THROWs generated in Quad form by coalescing all the random THROW statements generated by quads with no handler set. * Interpret/Quads/INClass.java, Interpret/Quads/INClassLoader.java, Interpret/Quads/INFileInputStream.java, Interpret/Quads/INFileOutputStream.java, Interpret/Quads/INRandomAccessFile.java, Interpret/Quads/INRuntime.java, Interpret/Quads/StaticState.java, Interpret/Quads/Support.java: More JDK 1.2 tweaks to Quad interpreter. Also added assertions to Interpret/Quads/StaticState to ensure that we were only adding native code implementations for methods that were actually flagged as native. JDK 1.2 implemented some of the native methods in JDK 1.1 as pure java. * Interpret/Quads/INClassLoader.java: New file. 2000-01-27 pnkfelix * Backend/StrongARM/CodeGen.spec, IR/Assem/InstrCALL.java, IR/Assem/InstrVisitor.java: FSK: 1. Made InstrCALL part of the InstrVistor framework FSK: 2. Added emit methods for CALLs to the spec file. FSK: That's it for me tonight; I'll work on implementing FSK: Derivation support for GC tommorrow. 2000-01-27 C. Scott Ananian * Interpret/Quads/INFileSystem.java, Interpret/Quads/INSystem.java: More quad interpreter updates to better support JDK 1.2. 2000-01-27 kkz * Backend/StrongARM/Frame.java, Backend/Sparc/Frame.java: Forgot that garbage collection data may not exist. Removed bad assert. * Backend/Generic/Frame.java: javadoc update: forgot that garbage collection data may not exist * Interpret/Tree/DefaultFrame.java: Basic implementation of getGCInfo() so that Flex compiles. * Backend/Analysis/BasicGCInfo.java: First pass of actual garbage-collection-information-storage Object. Mostly untested, but doesn't bite. * Backend/Analysis/BasicGCInfo.java: New file. * Backend/Generic/GCInfo.java: First pass of abstract class for generic garbage-collection-information-storing Object. * Backend/Generic/GCInfo.java: New file. * Backend/Sparc/Frame.java: Basic implementation of getGCInfo() so Flex will compile. * Backend/StrongARM/Frame.java: Basic implementation of getGCInfo() so that Flex will compile. * Backend/Generic/Frame.java: Added abstract method for getting GCInfo out of Frame. * Analysis/Instr/RegAlloc.java: Making the IntermediateCodeFactory interface public so that the garbage collection code can get to it from a different package. 2000-01-27 pnkfelix * Backend/Generic/RegFileInfo.java, Analysis/Instr/RegAlloc.java: FSK: Made the changes to RegAlloc to support FSK: {abstract|concrete}SpillFactory()... so Karen should be FSK: able to safely play with that. I still haven't implemented FSK: InstrCALL, I'll work on that next, I just wanted to ensure FSK: that my Test case still ran properly. * IR/Properties/UseDefer.java, Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java: FSK: 1. Added documentation and a default implementation to UseDefer FSK: 2. Did some fixup to interface of RegAlloc classes (if it's not FSK: going to be a purely functional system, then why pretend that FSK: it is?) and more work on code for the 2-stage codeFactory... * IR/Properties/UseDefer.java: FSK: Added a new Propertier class, "UseDefer" FSK: One of its first implementations will be a special FSK: UseDefer that keeps the base pointers alive for as FSK: long as the derived pointers are alive * IR/Properties/UseDefer.java: New file. * Backend/Generic/InstrBuilder.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java: FSK: 1. Made a makeLabel(Label, Instr) method in InstrBuilder FSK: 2. Changed names of Fsk{Store|Load} to Spill{Store|Load}, since FSK: they may now get exposed to the GC people. FSK: 3. Worked some on implmenting {abstract|concrete}SpillFactory() * Analysis/BasicBlock.java: FSK: Changed the next and prev BasicBlock[] accessors to FSK: not use Reflection * Analysis/Instr/LocalCffRegAlloc.java: FSK: turned Verification off, and turned my Move Coalescer back FSK: on (I had an intuition as to which case was failing, so FSK: I just disabled that one). FSK: Plus I've tested Doubles and my register allocator FSK: handles them fine too. Woo hoo! * Util/Collections/BitSetFactory.java, Analysis/Instr/LocalCffRegAlloc.java, Backend/StrongARM/InstrBuilder.java, Analysis/DataFlow/LiveTemps.java: FSK: 1. InstrBuilder had a *major* bug in it which was causing FSK: the output assembly to fail miserably when large stack FSK: offsets were required (thus we only saw this happen on FSK: dtoa, simply because that's the first truly heinous FSK: method called in my test case). Its fixed now, and was FSK: one of the last bugs left in the register allocator. FSK: 2. Some updates to the LiveTemps code (mostly in an attempt FSK: to debug what I had screwed up) FSK: 3. Local Register Allocation without Move Coalescing is now FSK: working for Floats. Will try Doubles soon; I have reasonable FSK: high hopes that it will work there too. However, my FSK: simplistic Move Coalescer has been broken, so I will do the FSK: right thing at this point and implement Move Coalescing the FSK: correct way. 2000-01-27 C. Scott Ananian * Interpret/Quads/INFileSystem.java: Oops; accidentally used a JDK 1.2-only method when writing the implementation of java.io.FileSystem. Even though I strongly dislike java language reflection, it's use seems warranted in this case to determine whether the currently executed runtime system has an implementation of File.isHidden which we can use. So that's what I do. I also removed some import *'s that I accidentally checked in. bin/remove-stars is your friend --- but only if you remember to use it! * Interpret/Quads/INClass.java, Interpret/Quads/INFile.java, Interpret/Quads/INFileSystem.java, Interpret/Quads/INSystem.java, Interpret/Quads/StaticState.java, Interpret/Quads/Support.java: Improvements to Interpet/Quads to better support the JDK 1.2 runtime system. * Interpret/Quads/INFileSystem.java: New file. * Analysis/CycleEq.java: A pair of assertions to constrain time/space bounds of cycle equiv algorithm. * ClassFile/HClassSyn.java, ClassFile/HMethodSyn.java: A few more assertions for ClassFile, in an attempt to find bdemsky's bug. 2000-01-27 bdemsky * Support/EventDriven.jar: latest scheduler with small bug fixes. * Analysis/EventDriven/ToAsync.java: oops. 2000-01-27 salcianu * Analysis/PointerAnalysis/CachingSCCBBFactory.java, Analysis/PointerAnalysis/SCCBBFactory.java: SCCBBFactory splits the control flow graph of basic blocks into its strongly connected components. CachingSCCBbFactory does the same thing plus some caching. * Analysis/PointerAnalysis/CachingSCCBBFactory.java, Analysis/PointerAnalysis/SCCBBFactory.java: New file. * Analysis/PointerAnalysis/SCCTopSortedGraph.java: Topological sort of a component graph (an acyclic graph consisting of the strongly connected components of the initial graph). * Analysis/PointerAnalysis/SCCTopSortedGraph.java: New file. * Main/PAMain.java, Analysis/AllCallers.java, Analysis/BasicBlock.java, Analysis/PointerAnalysis/CachingBBFactory.java, Analysis/PointerAnalysis/PAWorkList.java, Analysis/PointerAnalysis/PAWorkSet.java, Analysis/PointerAnalysis/PAWorkStack.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/SCComponent.java: CachingBBFactory no longer exists. It has been replaced with CachingSCCBBfactory. 2000-01-26 C. Scott Ananian * bin/copyright.perl: Tweaks to the perl copyright script. 2000-01-26 pnkfelix * Analysis/DataFlow/LiveTemps.java: FSK: BitSetFactory needs to know the universe of values FSK: ahead of time... I need to fix BitSetFactory so FSK: that it doesn't have that constraint (and so that FSK: it uses Util.Indexer, and all sorts of other things) FSK: but for the time being, this rehappifies the assertion * Analysis/Instr/LocalCffRegAlloc.java: FSK: ARGH. Once again, the majority of my changes are just FSK: reindentation. It's for a greater good though: there FSK: was a missing brace somewhere in there that was fouling FSK: things up royally FSK: Also added a Verifier of reasonable accuracy, but it breaks FSK: when move coalescings enabled (its conservative, what FSK: can you expect). FSK: still am not allocating dtoa properly... but I've figured FSK: out enough of how to use gdb to be *much* smarter FSK: about how I track the bugs down * Analysis/DataFlow/LiveTemps.java: FSK: Made changes to finally support liveOnProcExit, at Karen's FSK: bequest. Don't know if it will work, but now it at least FSK: makes an attempt to work. FSK: Personal Note: this file is ugly (my fault) and LiveVars FSK: may be merged back into it for clarity's sake * Analysis/Instr/RegAlloc.java: FSK: Silly little change for efficiency (I'll change it FSK: back if Martin forces us to) * Backend/StrongARM/RegFileInfo.java: FSK: ran into an allocation problem where the 2-wordTemps were laid FSK: in a very particular manner leading to an allocation failure. FSK: this fixes it, though it may constrain allocation more than FSK: we'd like; look into it later. 2000-01-26 bdemsky * Analysis/EventDriven/LockRemove.java: Removes MONITORENTER/MONITOREXITs. * Analysis/EventDriven/LockRemove.java: New file. 2000-01-26 pnkfelix * IR/Assem/InstrCALL.java: FSK: Added a simple InstrCALL class... will refine after I FSK: see how it fits with the CodeGen.spec file * IR/Assem/InstrCALL.java: New file. 2000-01-26 bdemsky * Analysis/EventDriven/AsyncCode.java: Don't want to add makeAsync after all initializers, just some. * Support/thunk2.jar: another oops... * Support/thunk2.jar: stuck wrong file in...oops 2000-01-26 C. Scott Ananian * ClassFile/HMethodSyn.java, ClassFile/HClassSyn.java, ClassFile/HFieldSyn.java: Doh! Forgot that primitive classes can legitimately have different linkers. Reworked assertions. 2000-01-26 bdemsky * Support/thunk2.jar: Killed evil TimeZoneData class initializer. 2000-01-26 C. Scott Ananian * ClassFile/HClassSyn.java: again, superclass is not always non-null. * ClassFile/HClassSyn.java: brian just sent me mail pointing out that the superclass is not always non-null. * ClassFile/HFieldSyn.java, ClassFile/HMethodSyn.java, ClassFile/HClassSyn.java: Revert changes to ClassFile, as the context in which H*Syns are created should itself sufficiently guarantee that all template objects belong to to the same linker as the Syn object being created. Instead, add a slew of assertions meant to verify that this constraint is being maintained. * ClassFile/HClassSyn.java: Forgot to relink superclass and interfaces of an HClassSyn. Hopefully this should fix brian's new relinker bugs. 2000-01-26 salcianu * Analysis/PointerAnalysis/SCComponent.java: Class for splitting a graph into its strongly connected components. Liner complexity: O(|V| + |E|) (see algorithm in Cormen & co). * Analysis/PointerAnalysis/SCComponent.java: New file. 2000-01-26 C. Scott Ananian * bin/remove-stars.perl: jikes changed the compiler flag +M to +DR in version 1.10. Update remove-stars script appropriately. * Backend/Generic/CodeGen.java, Backend/StrongARM/Code.java, Backend/CSAHack/RegAlloc/Code.java: updates to new IR.Assem.Code->Generic.Code inheritance structure. * Analysis/Instr/LocalCffRegAlloc.java: Updated to fit new Generic.Code toAssem prototype; also make an assertion use a lazy evaluation. For added efficiency, I hope. * Backend/Generic/Code.java: The new, leaner, register-allocation-specific Generic.Code abstract superclass. * IR/Assem/Code.java: Oops! Forgot to run 'remove-stars' before checking this in! 2000-01-26 bdemsky * Support/EventDriven.jar: Bug fix: Fixed throwing of exceptions to user...[ie now allows user to see OutOfMemory error]. Functionality change: Now supports join. 2000-01-26 C. Scott Ananian * IR/Assem/Code.java: Moving all non-register-allocation details of Generic.Code to IR.Assem.Code. This allows us to move more common code into Backend/Generic/Code without overly constrainting folks who want to do Instr->Instr transformations. @SPLIT: Backend/Generic/Code.java IR/Assem/Code.java@ * IR/Assem/Code.java: New file. * Backend/Generic/RegFileInfo.java: Felix is gonna kill me --- i renamed his method! I also added a place-holder implementation for maxRegIndex to get the code to compile. 2000-01-25 pnkfelix * Backend/Generic/RegFileInfo.java: FSK: minor clarification to previous javadoc change. * Backend/Generic/RegFileInfo.java: FSK: Javadoc updates clarifying aspects of the new interface... 2000-01-25 C. Scott Ananian * Backend/Sparc/Code.java, Backend/StrongARM/Code.java, Backend/Generic/Code.java: Move the call to CodeGen.gen() to the Generic.Code superclass, in Yet Another effort to prevent code duplication. 2000-01-25 pnkfelix * Backend/Generic/RegFileInfo.java: FSK: Added interfaces for CommonLoc types in anticipation FSK: of GC support in the RegAlloc code... * Analysis/Instr/RegAlloc.java: FSK: beginings of expanding the Register Allocator's FSK: interface to allow for GC tables to be built... FSK: Scott, is this somewhat like what you were FSK: thinking of? 2000-01-25 bdemsky * Analysis/EventDriven/AsyncCode.java: Subtle bug. 2000-01-25 C. Scott Ananian * ClassFile/HFieldSyn.java, ClassFile/HMethodSyn.java: Make sure HMemberSyn's fields have consistent linker information. 2000-01-25 bdemsky * Analysis/EventDriven/AsyncCode.java: Bug fix for calling next.resume(Object). Gratuitious workaround for CallGraph problems added [forcing to be non-blocking.] 2000-01-25 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Fixed spec bug in long integer multiply. StringBuffer.append(double) really works now. 2000-01-24 C. Scott Ananian * Backend/Runtime1/TreeBuilder.java: The 'gcentry' field is of POINTER_SIZE length, not WORD_SIZE length. * homeBackend/Runtime1/DataClaz.java: We don't really want any extra padding in the claz structure. We no longer emit an ALIGN after switching back to SEGMENT.CLASS from our SEGMENT.GC detour. 2000-01-24 kkz * Backend/Runtime1/TreeBuilder.java: Updated offsets to account for the addition of the field bitmap to the claz structure. * homeBackend/Runtime1/DataClaz.java: Added the field bitmap for garbage collection to the claz data structure. 2000-01-24 bdemsky * Analysis/EventDriven/ToAsync.java, Analysis/EventDriven/AsyncCode.java: Only build run methods when really necessary. * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/ToAsync.java: Rewrite all run methods, even if they are not actually blocking. * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/ToAsync.java: Forgot some important stuff in the transformation. It should work now... [I wasn't exploring methods that weren't blocking]. * Support/thunk2.jar: Splits method dtoa of java.lang.FloatingDecimal in half again. Maybe it will be small enough to compile quickly. This is one evil method... 2000-01-23 salcianu * Analysis/PointerAnalysis/CachingBBFactory.java, Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PAWorkList.java, Analysis/PointerAnalysis/PAWorkStack.java, Analysis/PointerAnalysis/PointerAnalysis.java, Main/PAMain.java: Some bugs related to the inter-procedural analysis have been removed. There is also a test main file (Main/PAMain.java) that I forgot to registed so far. * Main/PAMain.java: New file. 2000-01-23 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/LocalCffRegAlloc3.java, Analysis/Instr/RegFile.java: @RENAME LocalCffRegAlloc3.java LocalCffRegAlloc.java@ FSK: Finally doing step two of the renaming process... 2000-01-23 C. Scott Ananian * Interpret/Quads/ObjectRef.java: Oops. Object size as output was counting static fields as part of the object's size. Corrected now. Only virtual fields count now. * Interpret/Quads/ArrayRef.java, Interpret/Quads/ObjectRef.java, Interpret/Quads/Ref.java, Interpret/Quads/StaticState.java: Generate better profiling information by dumping approximate object sizes along with allocation site details. This is especially important for array objects. 2000-01-22 salcianu * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/Relation.java: Ad-hoc solution for a supposed bug in CallGraph (at least from my point of view): the CALL sites with no callee are treated as skipped invocation sites (as the native methods). Some other minor modifications (pretty-print, bugs, comments etc.) * Analysis/PointerAnalysis/InterProcPA.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/Relation.java: Interprocedural analysis added (preliminary version): class InterProcPA A few bugs have been fixed in the other files. * Analysis/PointerAnalysis/InterProcPA.java: New file. 2000-01-22 bdemsky * Support/EventDriven.jar: Ovy's latest and greatest stuff. * Analysis/EventDriven/AsyncCode.java: Changes to AsyncCode to support Ovy's new stuff. Namely we generate a makeAsync call on the initialization of ServerSocket objects. 2000-01-21 bdemsky * IR/Quads/Pattern.java: My bad...I guess running out of memory was my bug. The new WorkSet made the iterator go in reverse. And if you added stuff to the set while you iterated, it caused problems. I now copy the set first. 2000-01-21 C. Scott Ananian * Util/WorkSet.java: Little tweak to improve constructor efficiency. * Interpret/Quads/Method.java: Get better memory utilization statistics by forcing a garbage collection when the interpreted program ends. * Interpret/Quads/HCLibrary.java, Interpret/Quads/StaticState.java: Fixes for Quad Interpreter state serializability. You can now save/restore program state at an intermediate point in the program --- just like you could before I added Linker support and broke it. 2000-01-18 C. Scott Ananian * Util/WorkSet.java: Fix an evil evil bug that (once again) Brian has managed to find. I was being overly clever implementing clear() by setting the 'next' pointer of the list header to the list footer node... and I forgot to set the 'prev' pointer of the footer to point to the header. This being a doubly-linked list and all. End result: lots of garbage kept alive by the dangling pointer in the footer and lots of extra memory usage. Not to mention the fact that the getLast() and removeLast() *ought* to have broken themselves... Fixed now. 2000-01-18 bdemsky * Analysis/AllCallers.java: Added constructor allowing one to pass in a CallGraph to AllCallers. * Main/EventDriven.java: Remove SYNCHRONIZED modifier from methods. Its already covered by MONITORENTER and MONITOREXIT quads. 2000-01-18 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java: FSK: One final commit to get everything to actually compile; * Analysis/Instr/LocalCffRegAlloc.java: @RENAME: LocalCffRegAlloc3.java LocalCffRegAlloc.java@ FSK: Completing the move from LocalCffRegAlloc3 to LocalCffRegAlloc * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/LocalCffRegAlloc2.java: @RENAME: LocalCffRegAlloc3.java LocalCffRegAlloc.java@ FSK: Preparing to make LocalCffRegAlloc3 the only Local Allocator FSK: before I hack it to support the new interface. * IR/Assem/Instr.java, IR/Tree/TreeGrapher.java, Util/Util.java, Analysis/Instr/LocalCffRegAlloc.java, Backend/Generic/Code.java, Backend/Generic/RegFileInfo.java, Analysis/BasicBlock.java: FSK: 1. Forgot to make one of the returned classes in RegFileInfo public FSK: 2. Changed Util.assert(boolean, LazyString) to FSK: Util.assert(boolean, Object), and updated code dependant on FSK: the old interface. * Backend/Generic/Code.java, Backend/Generic/RegFileInfo.java, Backend/StrongARM/Code.java, IR/Assem/Instr.java, Analysis/Instr/LocalCffRegAlloc3.java: FSK: Made updates to the interface for RegFileInfo. Next comes an FSK: implementation in the StrongARM backend and then adapting the FSK: local register allocator to use the nifty new VRegAllocator. 2000-01-18 C. Scott Ananian * Analysis/Quads/QuadClassHierarchy.java: Add a few 'final' modifiers for a bit of extra efficiency. * Backend/Generic/RuntimeInformation.java, Backend/Generic/package.html: javadoc fixes. 2000-01-17 salcianu * Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/Relation.java: Exception support added. Some bug fixes too. 2000-01-17 C. Scott Ananian * Analysis/PointerAnalysis/ArtificialTempFactory.java, Analysis/PointerAnalysis/CachingBBFactory.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PANodeVisitor.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/PAWorkList.java, Analysis/PointerAnalysis/PAWorkSet.java, Analysis/PointerAnalysis/PAWorkStack.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/Relation.java, Backend/Generic/RuntimeInformation.java, ClassFile/DuplicateClassException.java, ClassFile/DuplicateMemberException.java, ClassFile/Factories.java, ClassFile/HClassMutator.java, ClassFile/HClassProxy.java, ClassFile/HConstructorProxy.java, ClassFile/HFieldMutator.java, ClassFile/HFieldProxy.java, ClassFile/HInitializerProxy.java, ClassFile/HInitializerSyn.java, ClassFile/HMemberProxy.java, ClassFile/HMethodMutator.java, ClassFile/HMethodProxy.java, ClassFile/NoSuchClassException.java, ClassFile/NoSuchMemberException.java, ClassFile/UniqueName.java, IR/Tree/TreeVerifyingVisitor.java, Interpret/Tree/Debug.java, Util/Collections/DisjointSetStructure.java, Util/Collections/LLDisjointSetStructure.java: Files created this month had the wrong copyright year. Fixed it with grep-and-sed magic. * IR/Tree/ExpList.java, IR/Tree/METHOD.java, IR/Tree/PreciselyTyped.java, IR/Tree/Tree.java, IR/Tree/TreeGrapher.java, Main/SparcMain.java, Analysis/DataFlow/ReachingHCodeElements.java, Analysis/Tree/AlgebraicSimplification.java, Analysis/Tree/ConstantPropagation.java, Backend/Sparc/Code.java, Backend/Sparc/Frame.java, Backend/Sparc/InstrBuilder.java, Backend/Sparc/RegFileInfo.java, Backend/Sparc/TempBuilder.java, IR/Properties/CFGEdge.java: Added copyright information to those files missing it, using the magic bin/copyright.perl script. * prj.el: Change default copyright string to reflect the fact that it is now 2000 and no longer 1999. * Backend/Generic/RuntimeInformation.java, Backend/Generic/package.html: Interface specification for the generalized "what does a native method do" information class. Intended to allow more powerful/accurate high level analysis without having to hard-code a million tiny native method tweaks in every analyzer. The RuntimeInformation class will tell you (for example) that Thread.start() implicitly calls Thread.run(); that System.initializeSystemClass() is always implicitly called before main(); that io routines may create instances of java.io.IOException, and etc. Various subclasses of RuntimeInformation use inheritance to share common behaviours among different runtime-specific information classes. * Backend/Generic/RuntimeInformation.java: New file. * IR/Tree/ToTree.java, Interpret/Tree/DefaultFrame.java, Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/Method.java, Interpret/Tree/StaticState.java, Interpret/Tree/TestRun.java, Backend/StrongARM/Code.java: Updated to reflect movement of OffsetMap and OffsetMap32 from public in Backend/Maps to package-scope in Interpret/Tree. * Backend/Maps/OffsetMap.java, Backend/Maps/OffsetMap32.java: Removed OffsetMap and OffsetMap32 classes from package harpoon.Backend.Maps. They have been superceded by a new runtime interface. In order not to break Interpret/Tree any more than it already is, I've moved the OffsetMap and OffsetMap32 classes to harpoon.Interpret.Tree. They have been made package scope. No new code should use them. @RENAME: Backend/Maps/Offset Interpret/Tree/Offset@ * Interpret/Tree/OffsetMap.java, Interpret/Tree/OffsetMap32.java: New file. * Interpret/Tree/OffsetMap.java, Interpret/Tree/OffsetMap32.java: Removed OffsetMap and OffsetMap32 classes from package harpoon.Backend.Maps. They have been superceded by a new runtime interface. In order not to break Interpret/Tree any more than it already is, I've moved the OffsetMap and OffsetMap32 classes to harpoon.Interpret.Tree. They have been made package scope. No new code should use them. @RENAME: Backend/Maps/Offset Interpret/Tree/Offset@ * Interpret/Tree/Method.java, Backend/Generic/Frame.java: Remove the obsolete-and-deprecated getOffsetMap() field from Backend.Generic.Frame. In order not to break Interpret.Tree any more than it already it, we've left getOffsetMap() in Interpret.Tree.DefaultFrame, even though it has been removed from all other Generic.Frame subclasses. * Main/SAMain.java, Main/SparcMain.java: Remove completely unnecessary calls to Frame.getOffsetMap() from Main/SAMain and Main/SparcMain. * Backend/Maps/DefaultClassDepthMap.java: Teak a field to private, as it shouldn't be showing up in the javadoc. * Main/SAMain.java, Main/SparcMain.java, Backend/StrongARM/Frame.java, Interpret/Tree/DefaultFrame.java, Backend/Runtime1/TreeBuilder.java, Backend/Generic/Frame.java: Remove some extraneous import statements that had been slowly accumulating in the codebase. * Main/TypesMain.java, Util/FIFO.java, Util/HashSet.java, Util/Set.java, Util/TreeSet.java, Util/UniqueFIFO.java, Analysis/DataFlow/QuadEnumerator.java, Analysis/DataFlow/QuadSolver.java, Analysis/DataFlow/ReversePostOrderEnumerator.java, Analysis/DataFlow/TreeSolver.java, Analysis/Quads/BasicBlock.java, Analysis/Quads/SCC/SCCAnalysis.java, Analysis/Quads/SCC/SCCOptimize.java, Analysis/Quads/TypeInfo.java, Analysis/TypeInference/AuxUniqueFIFO.java, Analysis/TypeInference/ClassCone.java, Analysis/TypeInference/FieldType.java, Analysis/TypeInference/InterProc.java, Analysis/TypeInference/IntraProc.java, Analysis/TypeInference/SetHClass.java, IR/Quads/Peephole.java, Analysis/DefMap.java, Analysis/TempToHceArrayMap.java, Analysis/UseMap.java: Collections-ized the entire FLEX project, although many uses of Hashtable and Vector probably still remain. Finally completely removed the obsolete and deprecated harpoon.Util.{Set,HashSet,TreeSet,FIFO,UniqueFIFO} classes, which were similar but not identical to their java.util.* counterparts and were written for harpoon use way back before the JDK 1.2 Collections API was born. harpoon.Util.FIFO has been replaced by instances of java.util.LinkedList (using the add() and removeFirst() methods), and UniqueFIFO has been replaced by a slightly expanded harpoon.Util.WorkSet (which extends java.util.Set). While I was at it, I replaced many java.util.Hashtable instances with the generally-more-efficient java.util.HashMap. * Util/WorkSet.java: Update WorkSet javadoc to better match method descriptions for java.util.Stack. * Util/WorkSet.java: Improved the Util.WorkSet, so that it can act as both a LIFO (what it was before) and a FIFO list/set/stack of unique objects. * Util/WorkSet.java: Added explicit fields for both the header and the footer of the internal linked list within a WorkSet, to pave the way for eventual addFirst(), addLast(), removeFirst(), removeLast() implementations. * IR/Tree/EXP.java: Remove unused antiquated import statements. * Backend/Generic/LocationFactory.java, Backend/Generic/RegFileInfo.java: javadoc fixes. 2000-01-16 bdemsky * IR/Jasmin/Jasmin.java: oops...need supGoto's side effects all the time. * IR/Jasmin/Jasmin.java: Add in fewer return's / gotos... 2000-01-15 bdemsky * Main/EventDriven.java: Added stuff to ClassHierarchy. * Analysis/EventDriven/AsyncCode.java: handle OutputStreams also 2000-01-15 salcianu * Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/Relation.java: New code, bug fixes & improved comments. 2000-01-15 duncan * Analysis/Tree/TreeFolding.java: oops. Forgot to update treefolding. It no longer uses TreeStructure either. * Analysis/Tree/AlgebraicSimplification.java, Analysis/Tree/ConstantPropagation.java, Analysis/Tree/TreeStructure.java: The TreeStructure class has officially outlived its usefulness. Updated the 2 analysis passes to use the remove/replace methods in IR.Tree.Code. * IR/Tree/Code.java, IR/Tree/ExpList.java: Added remove/replace methods to tree codeviews. Fixed formatting in ExpList.toString() 2000-01-15 C. Scott Ananian * ClassFile/HClass.java: My assertion was too tight. I keep forgetting that primitive types have their own linkers. This should fix bdemsky's latest bug report. 2000-01-15 bdemsky * Analysis/EventDriven/AsyncCode.java: Various small bugs. 2000-01-14 salcianu * Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java, Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/Relation.java: Some bugs have been fixed. 2000-01-14 C. Scott Ananian * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/EventDriven.java, Analysis/EventDriven/ToAsync.java, ClassFile/CachingCodeFactory.java, ClassFile/UpdateCodeFactory.java, Main/EventDriven.java, Analysis/EnvBuilder/EnvBuilder.java, Analysis/ContBuilder/ContBuilder.java: Goodbye, UpdateCodeFactory. We use CachingCodeFactory consistently now. * ClassFile/HClass.java, ClassFile/HClassArray.java, ClassFile/HClassCls.java, ClassFile/HClassImpl.java, ClassFile/HClassPrimitive.java, ClassFile/HClassProxy.java: Fixed another Relinker oddity that Brian found by moving implementation of several HClass methods from HClassImpl to the abstract HClass. I made them final while I was at it, as their behavior does not change given that the abstract methods of HClass operate correctly. This means I could remove the proxy implementations of these methods from HClassProxy. I also made the toString() method final in HClass, for much the same reasons. This meant I could replace the many scattered partial implementations of toString() in HClassArray, HClassImpl, HClassPrimitive, etc with a single all-in-one method. Less code duplication. Yay. The isAssignableFrom(), isSuperclassOf(), isSuperinterfaceOf(), and isInstanceOf() methods should no longer get confused by proxied relinker classes. 2000-01-14 bdemsky * Analysis/EventDriven/AsyncCode.java: Switched from ___->$$$ * Analysis/EventDriven/AsyncCode.java: another oversight. * Analysis/EventDriven/AsyncCode.java: oops. 2000-01-14 pnkfelix * Analysis/Instr/LocalCffRegAlloc3.java: FSK: 1. Small potential bug eliminated from Local RegAlloc FSK: 2. Ignorable changes to spec file (Scott and I were trying to FSK: solve the same probelm at the same time) 2000-01-14 bdemsky * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/ToAsync.java: When transforming a method call, we transform all method calls below it in the class hierarchy now like we should. * Analysis/EventDriven/AsyncCode.java: Schedule run() methods for transformation. 2000-01-14 salcianu * Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/Relation.java: Very preliminary version of the pointer analysis stuff. I added it to the CVS repository just for safety (against fires and fake fire alarms!). Don't try to use it now; it will be masively modified in the next days. * Analysis/PointerAnalysis/PointsToGraph.java, Analysis/PointerAnalysis/Relation.java: New file. * Analysis/PointerAnalysis/ArtificialTempFactory.java, Analysis/PointerAnalysis/CachingBBFactory.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PANodeVisitor.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/PAWorkList.java, Analysis/PointerAnalysis/PAWorkSet.java, Analysis/PointerAnalysis/PAWorkStack.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java: Very preliminary version of the pointer analysis stuff. I added it to the CVS repository just for safety (against fires and fake fire alarms!). Don't try to use it now; it will be masively modified in the next days. * Analysis/PointerAnalysis/ArtificialTempFactory.java, Analysis/PointerAnalysis/CachingBBFactory.java, Analysis/PointerAnalysis/NodeRepository.java, Analysis/PointerAnalysis/PAEdgeSet.java, Analysis/PointerAnalysis/PAEscapeFunc.java, Analysis/PointerAnalysis/PANode.java, Analysis/PointerAnalysis/PANodeVisitor.java, Analysis/PointerAnalysis/PAThreadMap.java, Analysis/PointerAnalysis/PAWorkList.java, Analysis/PointerAnalysis/PAWorkSet.java, Analysis/PointerAnalysis/PAWorkStack.java, Analysis/PointerAnalysis/ParIntGraph.java, Analysis/PointerAnalysis/PointerAnalysis.java: New file. 2000-01-14 bdemsky * Analysis/EventDriven/AsyncCode.java: Fixed methods that are blocking. 2000-01-14 C. Scott Ananian * GNUmakefile: Oops. Avoid unsightly error messages when there are no 'import *' statements to find. * Analysis/DataFlow/DataFlowBasicBlockVisitor.java: An 'import *' that got away... * GNUmakefile: Add a makefile target to find any newly-introduced import * statements. * ClassFile/HClassImpl.java: Fixed a bug Brian found: calls to isInstanceOf, isSuperinterfaceOf, and isAssignable from were doing pointer comparisons against 'this', which doesn't work when classes belonging to the same linker are proxied. We now canonicalize the 'this' before comparison. * Backend/StrongARM/CodeGen.spec: Felix found a typo. 2000-01-14 bdemsky * Analysis/EventDriven/AsyncCode.java: oops. * Analysis/EventDriven/AsyncCode.java: Fixed possibility of passing null to tempMap. * Analysis/EventDriven/AsyncCode.java: Bug...If an object isn't a primitive, we want the method resume(java.lang.Object). 2000-01-14 pnkfelix * Analysis/Instr/LocalCffRegAlloc3.java: FSK: 1. Improved my simple move coaslescer to be able to FSK: handle moves-from-hardcoded-registers. FSK: 2. Fixed some bugs in how I was setting up the RegFile FSK: abstraction when coalescing moves FSK: 3. Added some extra checks to handle particular cases FSK: when inserting Spill Code (with all these moves FSK: being removed, need to take care when checking FSK: safeness of inserting code) FSK: FSK: Inexplicably, assembly code generated with my register FSK: allocator now seems to run more correctly than before. FSK: Not sure why this is so; perhaps what I was getting before FSK: was a symptom of some sort of stack overflow? In any case, FSK: code generated with either scott's regalloc or mine fail at the FSK: same point (a floating point operation) in the hardest Test-case FSK: I've made so far. 2000-01-14 C. Scott Ananian * Util/Collections/DisjointSetStructure.java, Util/Collections/LLDisjointSetStructure.java, Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/BasicInductions.java, Analysis/LowQuad/Loop/LoopInvariance.java, Analysis/LowQuad/Loop/LoopMap.java, Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/LowQuad/Loop/MyLowQuadSSI.java, Analysis/Partition/PartitionGraphViewer.java, Analysis/Quads/BasicBlock.java, Analysis/Quads/BasicCSE.java, Analysis/Quads/QuadClassHierarchy.java, Analysis/Quads/SCC/SCCAnalysis.java, Analysis/Quads/SCC/SCCOptimize.java, Analysis/TypeInference/AuxUniqueFIFO.java, Analysis/TypeInference/ClassCone.java, Analysis/TypeInference/FieldType.java, Analysis/TypeInference/InterProc.java, Analysis/TypeInference/SetHClass.java, IR/Jasmin/Jasmin.java, Tools/PatMat/Parser.cup, Analysis/DataFlow/BackwardDataFlowQuadVisitor.java, Analysis/DataFlow/DataFlowQuadVisitor.java, Analysis/DataFlow/ForwardDataFlowQuadVisitor.java, Analysis/DataFlow/QuadEnumerator.java, Analysis/DataFlow/QuadSolver.java, Analysis/DataFlow/ReversePostOrderEnumerator.java, Analysis/SSITOSSAMap.java, Analysis/ToSSA.java: The magical remove-stars.perl script does its work: this commit replaces all instances of import * with the proper fully-specified import statements. 'make jikes' builds the project from scratch now. This makes me very very happy. * bin/remove-stars.perl: New file. * bin/remove-stars.perl: Scott's magical perl script. This little beauty zips through the FLEX source files and automatically replaces import * statements with the proper list of classes. [Actually, it generates a diff which you then pipe to the 'patch' program to make the changes.] This means... (wait for it...) I'm not going to yell at anybody for using import * anymore! Use them all you like! I'll just run my magic script once in a while to clean everything up. This script uses the mysterious '+M' option of jikes to aid in its wizardry. Just thought you might be curious about that. 2000-01-14 bdemsky * Analysis/EnvBuilder/EnvBuilder.java: Don't pack up HClass.Void temps. * Analysis/EventDriven/AsyncCode.java: We don't pack Temps of type HClass.Void in environments anymore. We regenerate instead. * Analysis/EventDriven/AsyncCode.java: Forgot to set the interface. 2000-01-14 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Fixed long-standing backend bug where call sites did not properly specify the set of (parameter) registers they used, potentially confusing the register allocator to no end. Also, there was a possibility that spill code could be added within the parameter setup code, which would fail because the stack pointer was not at the proper place. The stack pointer update is now atomic (from the register allocator's viewpoint) with the actual call instruction, making it impossible that spill code be added after the SP update but before the CALL. 2000-01-14 bdemsky * Support/thunk2.jar: Beginnings of a sunthunk for jdk 1.2. CharacterEncoding is taken care of [static initializer split over 20 different methods in this version]. * Support/thunk2.jar: New file. * Analysis/EventDriven/AsyncCode.java: 1 Added visitor to transform GET/SET quads from one HClass to another. 2000-01-14 C. Scott Ananian * IR/LowQuad/PCALL.java, IR/LowQuad/Translate.java, IR/Quads/ToNoSSA.java, Analysis/ToSSA.java: Revert change of 00/01/13 04:31:20 which added 'paramTypes' field to LowQuad PCALL. I've realized this is completely unnecessary, as the type information we need is fully present in the (typed) ExpList Tree.CALL.args. So I'm backing out this "feature". 2000-01-13 C. Scott Ananian * Analysis/Tree/TreeFolding.java: updated to use Tree.getGrapher() and the accessor methods for (newly-private) Tree fields. * Analysis/EdgesIterator.java: update EdgesIterator to use CFGrapher. * IR/Tree/TreeGrapher.java: This class should not be public. It is only accessed via Tree.Code.getGrapher(), exactly implements a public interface (CFGrapher) and has a non-public constructor. 2000-01-13 bdemsky * Analysis/ContBuilder/ContBuilder.java: updates. * Analysis/EnvBuilder/EnvBuilder.java, Analysis/EnvBuilder/EnvCode.java: updates * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/EventDriven.java, Analysis/EventDriven/EventDrivenCode.java, Analysis/EventDriven/ToAsync.java: Update for relinker. * Main/EventDriven.java: Relinker support added. 2000-01-13 C. Scott Ananian * Support/EventDriven.jar, Tools/Annotation/Java12.cup, Util/HClassUtil.java, Interpret/Quads/HCLibrary.java, Interpret/Quads/INClass.java, Interpret/Quads/INFile.java, Interpret/Quads/INFileInputStream.java, Interpret/Quads/INFileOutputStream.java, Interpret/Quads/INFloatDouble.java, Interpret/Quads/INObject.java, Interpret/Quads/INRandomAccessFile.java, Interpret/Quads/INRuntime.java, Interpret/Quads/INString.java, Interpret/Quads/INSystem.java, Interpret/Quads/InterpretedThrowable.java, Interpret/Quads/Method.java, Interpret/Quads/StaticState.java, Interpret/Quads/Support.java, Interpret/Tree/Debug.java, Interpret/Tree/DefaultFrame.java, Interpret/Tree/FieldPointer.java, Interpret/Tree/HCLibrary.java, Interpret/Tree/INClass.java, Interpret/Tree/INFile.java, Interpret/Tree/INFileInputStream.java, Interpret/Tree/INFileOutputStream.java, Interpret/Tree/INFloatDouble.java, Interpret/Tree/INObject.java, Interpret/Tree/INRandomAccessFile.java, Interpret/Tree/INRuntime.java, Interpret/Tree/INString.java, Interpret/Tree/INSystem.java, Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/Method.java, Interpret/Tree/NullNativeMethod.java, Interpret/Tree/Ref.java, Interpret/Tree/StackFrame.java, Interpret/Tree/StaticState.java, Interpret/Tree/Support.java, Interpret/Tree/TestRun.java, Interpret/Tree/UndefinedRef.java, Main/CHStats.java, Main/CallGraph.java, Main/EventDriven.java, Main/Graph.java, Main/JMain.java, Main/Lint.java, Main/Main.java, Main/Run.java, Main/SAMain.java, Main/SparcMain.java, Main/TypesMain.java, IR/Quads/CONST.java, IR/Quads/HANDLER.java, IR/Quads/Pattern.java, IR/Quads/QuadFactory.java, IR/Quads/QuadNoSSA.java, IR/Quads/QuadSSI.java, IR/Quads/QuadWithTry.java, IR/Quads/ReHandler.java, IR/Quads/Translate.java, IR/Quads/UnHandler.java, IR/Tree/CanonicalTreeCode.java, IR/Tree/ObjectBuilder.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/ToTree.java, IR/Tree/TreeCode.java, IR/Bytecode/Code.java, IR/Bytecode/OpClass.java, IR/Bytecode/OpConstant.java, IR/Bytecode/OpField.java, IR/Bytecode/OpMethod.java, IR/Jasmin/Jasmin.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java, IR/LowQuad/Translate.java, IR/Quads/ARRAYINIT.java, Backend/Runtime1/Data.java, Backend/Runtime1/DataInitializers.java, Backend/Runtime1/DataJavaMain.java, Backend/Runtime1/DataReflection1.java, Backend/Runtime1/DataStrings.java, Backend/Runtime1/Runtime.java, Backend/Sparc/Frame.java, Backend/StrongARM/Frame.java, ClassFile/ClassPointer.java, ClassFile/DuplicateClassException.java, ClassFile/DuplicateMemberException.java, ClassFile/Factories.java, ClassFile/HArrayField.java, ClassFile/HArrayMethod.java, ClassFile/HClass.java, ClassFile/HClassArray.java, ClassFile/HClassCls.java, ClassFile/HClassImpl.java, ClassFile/HClassMutator.java, ClassFile/HClassPrimitive.java, ClassFile/HClassProxy.java, ClassFile/HClassSyn.java, ClassFile/HConstructor.java, ClassFile/HConstructorImpl.java, ClassFile/HConstructorProxy.java, ClassFile/HConstructorSyn.java, ClassFile/HField.java, ClassFile/HFieldImpl.java, ClassFile/HFieldMutator.java, ClassFile/HFieldProxy.java, ClassFile/HFieldSyn.java, ClassFile/HInitializer.java, ClassFile/HInitializerImpl.java, ClassFile/HInitializerProxy.java, ClassFile/HInitializerSyn.java, ClassFile/HMember.java, ClassFile/HMemberProxy.java, ClassFile/HMethod.java, ClassFile/HMethodImpl.java, ClassFile/HMethodMutator.java, ClassFile/HMethodProxy.java, ClassFile/HMethodSyn.java, ClassFile/HPointer.java, ClassFile/ImplMagic.java, ClassFile/Linker.java, ClassFile/Loader.java, ClassFile/NoSuchClassException.java, ClassFile/NoSuchMemberException.java, ClassFile/Relinker.java, ClassFile/UniqueName.java, IR/Registration.java, homeBackend/Runtime1/DataClaz.java, Analysis/Quads/MethodInlining.java, Analysis/Quads/QuadClassHierarchy.java, Analysis/Quads/QuadLiveness.java, Analysis/Quads/SCC/SCCAnalysis.java, Analysis/Quads/TypeInfo.java, Analysis/TypeInference/InterProc.java, Analysis/TypeInference/IntraProc.java, Backend/Analysis/InterfaceMethodMap.java, Backend/Generic/Frame.java, Analysis/CycleEq.java: The new relinker branch has landed. HClassSyn, HMethodSyn, and HFieldSyn are no more. HClass.forName(), HClass.forDescriptor(), and HClass.forClass() are no more. HMethod.putCode(), HMethod.getCode() are no more. Have fun. @MERGE: magic-2-0-new-relinker@ * Analysis/CycleEq.java: even more assertions for briand. * Analysis/CycleEq.java: Some extra assertions for briand. 2000-01-13 pnkfelix * Analysis/Instr/LocalCffRegAlloc3.java, Util/Collections/DisjointSetStructure.java, Util/Collections/LLDisjointSetStructure.java: FSK: 1. LocalRegAlloc: if(false)'d out some sketchy code (again) FSK: 2. Finished implementing a simple DisjoinSetStructure, which FSK: doesn't acheive the best performance but will serve well FSK: enough for now. * Util/Collections/DisjointSetStructure.java, Util/Collections/LLDisjointSetStructure.java, Util/FilterIterator.java: FSK: 1. Further revisions to Local Reg Alloc; FSK: still trying to identify discrepancies between its FSK: output and Scott's. FSK: 2. Begun work on Register Move Coalescing FSK: 3. Added framework for supporting DisjointSets... FSK: not sure how well it will merge with the rest FSK: of the Util.Collections package. * Util/Collections/DisjointSetStructure.java, Util/Collections/LLDisjointSetStructure.java: New file. * Backend/StrongARM/CodeGen.spec, Analysis/Instr/LocalCffRegAlloc3.java, Analysis/Instr/RegFile.java: FSK: 1. Further revisions to Local Reg Alloc; FSK: still trying to identify discrepancies between its FSK: output and Scott's. FSK: 2. Begun work on Register Move Coalescing FSK: 3. Added framework for supporting DisjointSets... FSK: not sure how well it will merge with the rest FSK: of the Util.Collections package. 2000-01-13 C. Scott Ananian * IR/LowQuad/PCALL.java, IR/LowQuad/Translate.java, IR/Quads/ToNoSSA.java, Analysis/ToSSA.java: Added 'paramTypes' field to LowQuad PCALL. This will allow us to properly translate Tree.CALLs to Assem.Instrs --- previously we didn't know how many registers the Assem.Instr corresponding to the CALL "used" because we didn't know the number and types of the parameters being passed to the called method. * ClassFile/Relinker.java: Tweak the relinker so that all HClassSyns are part of the Relinker namespace. Before, it would punt any that did not conflict with known class names to the proxied linker's namespace. * ClassFile/HClassSyn.java: Another added assertion intented to enforce linker consistency. * ClassFile/HClass.java: Classes in the root package or no package now pretty-print better. * ClassFile/Linker.java: Tag linker as ReferenceUnique, which indicates to our Lint tool that it is okay to use == instead of equals() for comparisons. 2000-01-13 bdemsky * Analysis/Quads/QuadLiveness.java: oops again * Analysis/Quads/QuadLiveness.java: oops. * Analysis/Quads/QuadLiveness.java: I'd really like Temps that are live in and out of a given quad. * ClassFile/HClassSyn.java: Setting the superclass has to flush the caches in HClassCls. 2000-01-12 duncan * IR/Tree/ToTree.java: I'm not really working on this, but the ugly wastefulness of the LabelingVisitor in ToTree was peeving me, so I trimmed it down a bit. 2000-01-12 C. Scott Ananian * ClassFile/HClassProxy.java: This is the bug fix Brian's been waiting for. * ClassFile/Linker.java, ClassFile/Relinker.java: Two more assertions, to prevent HClassSyn's from being screwed up. * ClassFile/HMemberProxy.java: New file. * ClassFile/HFieldProxy.java, ClassFile/HMemberProxy.java, ClassFile/HMethodProxy.java: Reduce code duplication by creating a common superclass (HMemberProxy) for HFieldProxy and HMethodProxy. We could be even snazzier if we could create another common superclass for HClassProxy and HMemberProxy, but (alas!) HClass is an abstract superclass, not an interface, so we can't. * ClassFile/HClassProxy.java, ClassFile/HFieldProxy.java, ClassFile/HMethodProxy.java: Ack. Forgot that proxy'ed HClassSyn's see their own self unproxied. Ugh. 2000-01-12 bdemsky * ClassFile/HFieldProxy.java, ClassFile/HMethodProxy.java: Scott forgot that proxy could be null. 2000-01-12 C. Scott Ananian * ClassFile/HClassProxy.java, ClassFile/HFieldProxy.java, ClassFile/HMethodProxy.java: This should make proxy'ed HClassSyn's sane again. I hope. * ClassFile/HClassProxy.java: This is a (partial, at least) fix for Brian. I'm not sure I'm handling all the cases. * IR/Quads/Translate.java: Fix obscure bug that Duncan found where we didn't allocate enough stack space to create a handler if the original method was empty and synchronized. * ClassFile/Relinker.java: I put buggy assertions in. Oops. Bad Scott. Make it right. 2000-01-12 bdemsky * IR/Jasmin/Jasmin.java: Hack functionality added to Jasmin backend. Not sure what I want to eventually do about this problem, but for this week this is the solution. There is now a constructor that allows to give Jasmin AND and OR masks for modifiers. This is needed because all fields must be public for the EventDriven transformation to be valid. 2000-01-12 C. Scott Ananian * ClassFile/Relinker.java: Add two assertions to verify that we're Doing The Right Thing, even in the odd array class cases. 2000-01-12 duncan * IR/Tree/CALL.java, IR/Tree/NATIVECALL.java: Scott properly suggested I should be less lazy with setting up my loops. So, I removed the special cases from CALL & NATIVECALL 2000-01-12 bdemsky * IR/Jasmin/Jasmin.java: Some interfaces don't think they have a superclass, when java/lang/Object needs to be printed. * Main/EventDriven.java: Statements reordered, etc, to minimize memory usage [ie, nulling out QuadClassHierarchy when done, removing HCode's from UpdateCodeFactory when we no longer need them, etc]. * IR/Quads/ReHandler.java: Another small bug. * IR/Jasmin/Jasmin.java: Bug fix. java/lang/Object is not its own superclass. * Support/jasmin.jar: New Jasmin feature. Seems that it wasn't possible to create classes with no superclasses. Now it is... This is only necessary for creating java.lang.Object. 2000-01-11 bdemsky * Support/EventDriven.jar: Changes that got lost from before. 2000-01-11 duncan * IR/Tree/CALL.java, IR/Tree/NATIVECALL.java: Check to see if arglist is null. 2000-01-11 salcianu * Analysis/AllCallers.java: Function getDirectCallers added. I need it for my pointer analysis stuff. 2000-01-11 C. Scott Ananian * Interpret/Tree/UndefinedRef.java: CVS missed some files somehow. Serves me right for editing while doing 'make update'. * ClassFile/HClass.java: Remove the hacked compatibility HClass.forName() and HClass.forDescriptor() methods. I've updated everything (except for the EventDriven code) to jive with the new Linker-oriented interface. Kiss those static methods good-bye! * Interpret/Tree/Debug.java, Interpret/Tree/DefaultFrame.java, Interpret/Tree/FieldPointer.java, Interpret/Tree/HCLibrary.java, Interpret/Tree/INClass.java, Interpret/Tree/INFile.java, Interpret/Tree/INFileInputStream.java, Interpret/Tree/INFileOutputStream.java, Interpret/Tree/INFloatDouble.java, Interpret/Tree/INObject.java, Interpret/Tree/INRandomAccessFile.java, Interpret/Tree/INRuntime.java, Interpret/Tree/INString.java, Interpret/Tree/INSystem.java, Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/Method.java, Interpret/Tree/NullNativeMethod.java, Interpret/Tree/Ref.java, Interpret/Tree/StackFrame.java, Interpret/Tree/StaticState.java, Interpret/Tree/Support.java, Interpret/Tree/TestRun.java: Linker-ized the harpoon.Interpret.Tree package. While I was at it, I updated the interpreter runtime classes (the IN* files) to the latest versions from the harpoon.Interpret.Quads package. * Interpret/Tree/Debug.java, Interpret/Tree/INFile.java, Interpret/Tree/NullNativeMethod.java: New file. * Main/Run.java: Updated Main.Run to sync with the changes to Interpret.Quads. * Interpret/Quads/HCLibrary.java, Interpret/Quads/INClass.java, Interpret/Quads/INFile.java, Interpret/Quads/INFileInputStream.java, Interpret/Quads/INFileOutputStream.java, Interpret/Quads/INFloatDouble.java, Interpret/Quads/INObject.java, Interpret/Quads/INRandomAccessFile.java, Interpret/Quads/INRuntime.java, Interpret/Quads/INString.java, Interpret/Quads/INSystem.java, Interpret/Quads/InterpretedThrowable.java, Interpret/Quads/Method.java, Interpret/Quads/StaticState.java, Interpret/Quads/Support.java: Linker-ize (and boy was this one evil) the harpoon.Interpret.Quads package. * ClassFile/Factories.java, ClassFile/HClass.java, ClassFile/HConstructor.java, ClassFile/HField.java, ClassFile/HInitializer.java, ClassFile/HMember.java, ClassFile/HMethod.java: Move the ArrayFactory declarations around, to work around a javac pecularity (documented in ClassFile/Factories.java). * ClassFile/Factories.java: New file. 2000-01-11 bdemsky * ClassFile/HConstructor.java, ClassFile/HField.java, ClassFile/HInitializer.java, ClassFile/HMethod.java: javac doesn't like anonymous classes in static fields of interfaces. 2000-01-11 C. Scott Ananian * ClassFile/HFieldProxy.java, ClassFile/HMethodProxy.java: Unwrap the argument to equals() before passing it to the proxy. Not strictly needed, but it allows us to use the pointer-equality short-cut more often. * ClassFile/HFieldImpl.java, ClassFile/HMethodImpl.java: Made the 'equals()' method of HMethod and HField more inclusive: types and declaring classes are compared based on descriptor strings, not pointer equality, which means that members from different linker objects will test as equals. * ClassFile/Relinker.java: Whoops, another bugfix. I forgot that 'null' is a valid return value in some cases; null should obviously never be wrapped or unwrapped. Also wrapping a primitive type should be a no-op. * ClassFile/Relinker.java: Bug-fix: we weren't wrapping array classes and members correctly. * ClassFile/HClassProxy.java, ClassFile/HFieldProxy.java, ClassFile/HMethodProxy.java: Bug fixes. 2000-01-11 bdemsky * Support/EventDriven.jar: Updated EventDriven.jar. 2000-01-11 C. Scott Ananian * Main/CHStats.java, Main/CallGraph.java, Main/EventDriven.java, Main/Graph.java, Main/JMain.java, Main/Lint.java, Main/Main.java, Main/Run.java, Main/SAMain.java, Main/SparcMain.java, Main/TypesMain.java: Linker-ized harpoon.Main package. * Analysis/Quads/QuadClassHierarchy.java, Analysis/Quads/SCC/SCCAnalysis.java, Analysis/Quads/TypeInfo.java, Analysis/TypeInference/InterProc.java, Analysis/TypeInference/IntraProc.java: Linker-ized harpoon.Analysis.* packages. Also removed deprecated constructor from QuadClassHierarchy. * Backend/Runtime1/TreeBuilder.java: reverted last change. 2000-01-11 pnkfelix * Backend/Runtime1/TreeBuilder.java, IR/Tree/ALIGN.java, IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/EXP.java, IR/Tree/ExpList.java, IR/Tree/MOVE.java, IR/Tree/Print.java, IR/Tree/SEQ.java, IR/Tree/Tree.java, IR/Tree/TreeVerifyingVisitor.java: FSK: Okay so I didn't manage to add these before, despite FSK: the fact that i thought I did...<> * IR/Tree/TreeVerifyingVisitor.java: New file. 2000-01-11 C. Scott Ananian * Tools/Annotation/Java12.cup: Linker-ize harpoon.Tools.* packages. * ClassFile/HClassCls.java, ClassFile/HClassSyn.java, ClassFile/HConstructor.java, ClassFile/HField.java, ClassFile/HInitializer.java, ClassFile/HMethod.java: Remove funky 'DEFAULT' inner class, which I had added because I didn't think you could have initialized static fields in interfaces. But you can. So I got rid of the inner classes and restored things to The Right Way. * IR/Jasmin/Jasmin.java, IR/LowQuad/Translate.java, IR/Tree/ToTree.java: Linker-ized harpoon.IR.Jasmin, harpoon.IR.LowQuad, and harpoon.IR.Tree. * Analysis/Quads/MethodInlining.java, IR/Tree/ObjectBuilder.java: Obsolete; removed. * Backend/Generic/Frame.java, Backend/Runtime1/Data.java, Backend/Runtime1/DataInitializers.java, Backend/Runtime1/DataJavaMain.java, Backend/Runtime1/DataReflection1.java, Backend/Runtime1/DataStrings.java, Backend/Runtime1/Runtime.java, Backend/Sparc/Frame.java, Backend/StrongARM/Frame.java, homeBackend/Runtime1/DataClaz.java, Backend/Analysis/InterfaceMethodMap.java: linker-ize harpoon.Backend.* packages. * IR/Quads/Translate.java: We don't catch the NoClassDefFoundError that Class.forName() may throw when translating a static synchronized method. The definition of exC made it look like we were gonna do it, but we don't. If we need to, then this code should be uncommented again. * ClassFile/HClassProxy.java, ClassFile/HConstructorProxy.java, ClassFile/HFieldProxy.java, ClassFile/HInitializerProxy.java, ClassFile/HMethodProxy.java, ClassFile/Relinker.java: Implemented proxy classes and relinker functionality. * ClassFile/HClassProxy.java, ClassFile/HConstructorProxy.java, ClassFile/HFieldProxy.java, ClassFile/HInitializerProxy.java, ClassFile/HMethodProxy.java: New file. * ClassFile/HClass.java: clarify the code a bit, now that HInitializer exists. * Interpret/Quads/INClass.java, Interpret/Quads/Support.java, Interpret/Tree/INClass.java: Replace NoClassDefFoundError with NoSuchClassException. * ClassFile/DuplicateClassException.java, ClassFile/HClassMutator.java, ClassFile/HClassSyn.java, ClassFile/Loader.java, ClassFile/NoSuchClassException.java, ClassFile/UniqueName.java: Global change of NoClassDefFoundError to NoSuchClassException. Added NoSuchClassException and DuplicateClassException to CVS. * ClassFile/DuplicateClassException.java, ClassFile/NoSuchClassException.java: New file. * ClassFile/Linker.java, ClassFile/Relinker.java: Add createMutableClass() method to Linker and Relinker. Documentation updates to Relinker.relink(). Changed exception thrown by Linker.forName(), etc, from NoClassDefFoundError to new NoSuchClassException, as the condition ought really be a RuntimeException, not an Error. * ClassFile/HClass.java, ClassFile/HClassImpl.java, ClassFile/HClassSyn.java, ClassFile/HFieldSyn.java, ClassFile/HMethodSyn.java: Use hasBeenModified flag to keep track of modification status for classes. This allows us to selectively write out only classes which have changed from their loaded state. * ClassFile/HClass.java: Temporary stubs for HClass.forDescriptor/forName/forClass added to allow Brian to start working on updating Analysis/EnvBuilder, Analysis/ContBuilder, and Analysis/EventDriven to use the new HClassMutator interface. * IR/Quads/ARRAYINIT.java, IR/Quads/CONST.java, IR/Quads/HANDLER.java, IR/Quads/Pattern.java, IR/Quads/QuadFactory.java, IR/Quads/ReHandler.java, IR/Quads/Translate.java, IR/Quads/UnHandler.java: Linker-ize harpoon.IR.Quads package. * IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java, IR/Quads/QuadNoSSA.java, IR/Quads/QuadSSI.java, IR/Quads/QuadWithTry.java, IR/Registration.java, IR/Tree/CanonicalTreeCode.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/TreeCode.java: Removed final traces of obsolete-for-a-long-time HMethod.register() method (it went with HMethod.putCode() and HMethod.getCode(), which finally went away for good when HMethod became an interface.) * Util/HClassUtil.java: Linker-ized harpoon.Util package. * IR/Bytecode/Code.java, IR/Bytecode/OpClass.java, IR/Bytecode/OpConstant.java, IR/Bytecode/OpField.java, IR/Bytecode/OpMethod.java: Linker-enable harpoon.IR.Bytecode package. * ClassFile/HClass.java: Added getMutator() method to base HClass. Also moved package-scope getTypeName() utility methods here, since HField and HMethod are now interfaces. * ClassFile/HPointer.java: Add an array factory. * ClassFile/Linker.java: All uniqueName methods have moved to harpoon.ClassFile.UniqueName class. * ClassFile/HArrayField.java, ClassFile/HArrayMethod.java, ClassFile/HClassCls.java, ClassFile/ImplMagic.java: Trivial changes to 1) extend *Impl classes instead of HField/HMethod, which are now interfaces, and 2) use H*.DEFAULT.arrayFactory, since interfaces can't have static fields. Also added 'transient' flags to ImplMagic; which don't really do anything right now because the fields aren't serialized anyway. * ClassFile/HInitializerSyn.java: New file. * ClassFile/HClassSyn.java, ClassFile/HConstructorSyn.java, ClassFile/HFieldSyn.java, ClassFile/HInitializerSyn.java, ClassFile/HMethodSyn.java: Updates to H*Syn classes to implement proper mutator classes. Because HConstructor/HInitializer are interfaces now, HConstructorSyn/HInitializerSyn can extend HMethodSyn directly (instead of subclassing HConstructor/HInitializer) which makes the code much simpler. * ClassFile/HClassMutator.java: Added missing 'make constructor from template' method. * ClassFile/HConstructor.java, ClassFile/HField.java, ClassFile/HInitializer.java, ClassFile/HMethod.java: Made HField/HMethod/HConstructor/HInitializer into interfaces. * ClassFile/HInitializerImpl.java: Made HInitializer into an interface. Split the implementation into HInitializerImpl. @SPLIT: HInitializer.java HInitializerImpl.java@ * ClassFile/HInitializerImpl.java: New file. * ClassFile/HConstructorImpl.java: Made HConstructor into an interface. Split the implementation out into HConstructorImpl. @SPLIT: HConstructor.java HConstructorImpl.java@ * ClassFile/HConstructorImpl.java: New file. * ClassFile/HMethodImpl.java: Made HMethod into an interface. Split the implementation out into HMethodImpl. @SPLIT: HMethod.java HMethodImpl.java@ * ClassFile/HMethodImpl.java: New file. * ClassFile/HFieldImpl.java: Made HField into an interface. Split the implementation out into HFieldImpl. @SPLIT: HField.java HFieldImpl.java@ * ClassFile/HFieldImpl.java, ClassFile/UniqueName.java: New file. * ClassFile/UniqueName.java: The UniqueName class creates unique names for classes, fields, and methods for those times when you want to clone a class or member but don't care what its name ends up being. 2000-01-11 duncan * IR/Tree/ToCanonicalTree.java: Left in some debug code here. oops :) Should be more friendly now. * IR/Tree/ToTree.java: Fixed a bug in which a TEMP was being reused in multiple places. 2000-01-11 bdemsky * Support/EventDriven.jar: VoidDoneContinuation modified to check to see if next!=null. Just in case it is for a main or run method. * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/ToAsync.java: Covered case that continuations in run/main methods can't just call next.resume() or next.exception() blindly. They need to check if the value isn't null. 2000-01-10 C. Scott Ananian * ClassFile/HClassMutator.java, ClassFile/HClassSyn.java: Tweaks to the HClassMutator interface. Adjusted HClassSyn so that it now implements HClassMutator. * ClassFile/DuplicateMemberException.java, ClassFile/NoSuchMemberException.java: Added two special RuntimeException subclasses to indicate errors due to duplicate or missing fields/methods in HClassMutator actions. These error conditions could quite legitimately be simple assertions, but I feel that adding them as genuine objects declared by 'throws' clauses makes the behavior of HClassMutator more obvious to the user. * ClassFile/DuplicateMemberException.java, ClassFile/NoSuchMemberException.java: New file. * IR/Bytecode/Code.java, ClassFile/ImplMagic.java, ClassFile/Loader.java: Add systemCodeFactory static final field to ClassFile.Loader so that we can make ImplMagic non-public. * ClassFile/HClassMutator.java, ClassFile/HFieldMutator.java, ClassFile/HMethodMutator.java: javadoc fixes. * ClassFile/HFieldMutator.java: Added mutator interfaces for fields. * ClassFile/HFieldMutator.java: New file. * ClassFile/HMethodMutator.java: Added mutator interfaces for fields and methods. Added 'addModifiers' and 'removeModifiers' methods to HClassMutator. * ClassFile/HMethodMutator.java: New file. * ClassFile/HClassMutator.java: Added mutator interfaces for fields and methods. Added 'addModifiers' and 'removeModifiers' methods to HClassMutator. 2000-01-10 pnkfelix * Backend/Runtime1/TreeBuilder.java, GNUmakefile, IR/Tree/Translation.java: FSK: 1. Made 'make doc' only remove the old doc when FSK: the new doc is "almost" ready... May make it FSK: delay removing the old doc even further later. FSK: 2. Added a clarification to the spec of TreeBuilder FSK: and changed the interface/implementation slightly FSK: to enforce the new constraint that's been added to FSK: the spec, and updated classes that used it to use FSK: the new interface. 2000-01-10 bdemsky * Analysis/EventDriven/AsyncCode.java: Changed to generalize replacement of methods. 2000-01-10 C. Scott Ananian * ClassFile/ClassPointer.java, ClassFile/HClass.java, ClassFile/HClassCls.java, ClassFile/HConstructorSyn.java, ClassFile/ImplMagic.java: Add a private linker field to HClass, and a getLinker() method to go with it. This necessitates some minor changes to other classes as well. (Note that this commit also finalizes the split of HClass into HClassArray, HClassPrimitive, HClassImpl, Linker, etc.) * ClassFile/Loader.java: The Loader class now implements a 'systemLinker' object, which is in charge of finding a class within the classpath and doing the file i/o to initialize an HClass object with the .class file data. Some of this code was previously found in HClass.forDescriptor() -- the Loader is a much better place for it. * ClassFile/HClassPrimitive.java: New file. * ClassFile/HClassPrimitive.java: The package-scope HClassArray and HClassPrimitive classes are now referred to outside HClass.java, and therefore must be split into their own files. @SPLIT: ClassFile/HClass.java ClassFile/HClassPrimitive.java@ * ClassFile/HClassArray.java: New file. * ClassFile/HClassArray.java: The package-scope HClassArray and HClassPrimitive classes are now referred to outside HClass.java, and therefore must be split into their own files. @SPLIT: ClassFile/HClass.java ClassFile/HClassArray.java@ * ClassFile/HClassImpl.java: HClass has been split into an (almost) purely abstract superclass and a new abstract HClassImpl subclass, which contains the common implementation code for the various concrete types of HClasses (HClassArray, HClassPrimitive, HClassCls). @SPLIT: ClassFile/HClass.java ClassFile/HClassImpl.java@ * ClassFile/HClassImpl.java: New file. * ClassFile/HClassMutator.java: HClassMutator objects take the place of the old HClassSyn objects. * ClassFile/HClassMutator.java: New file. * bin/cvsblame.pl: Add a new SPLIT directive like the RENAME directive for embedding inside cvs log messages. SPLIT indicates that a new file is based on (parts of) a different previous file. SPLIT may appear in several places referring to different pieces of the previous file, as opposed to RENAME, which has different connotations. In current practice the two directives are treated identically because the CVS tools work unidirectionally backwards in time. If one were to make an analog of cvsblame that allowed stepping *forwards* through a document's history, SPLIT and RENAME would be treated differently. * ClassFile/Relinker.java: Introduction of the new relinker paradigm. The Linker and Relinker classes are the core of the new stuff. * ClassFile/Linker.java: Introduction of the new relinker paradigm. The Linker and Relinker classes are the core of the new stuff. @SPLIT: ClassFile/HClass.java ClassFile/Linker.java@ * ClassFile/Linker.java, ClassFile/Relinker.java: New file. 2000-01-10 bdemsky * Analysis/EventDriven/AsyncCode.java: Changed so that any run methods of objects implementing java.lang.Runnable always get renamed to run_Async. If there is a name conflict, compiler will throw an RuntimeException. 2000-01-10 pnkfelix * Main/SAMain.java: FSK: Made an additional option, "-C", which is just like Scott's FSK: hack to "-1" that makes Flex compile one class, but its FSK: argument is *required* (instead of optional) which means FSK: that people like me can put a space between the option and FSK: its argument, the way that the good lord intended. FSK: Also, something in Duncan's code is currently breaking FSK: the compiler, so I'm going to try hacking on an alternate FSK: interface tool to the compiler so that SAMain can eventually FSK: be put in the garbage where it belongs. 2000-01-10 C. Scott Ananian * IR/Tree/DATUM.java: New file. * IR/Tree/ALIGN.java, IR/Tree/DATA.java, IR/Tree/DATUM.java, IR/Tree/ObjectBuilder.java, IR/Tree/Print.java, IR/Tree/ToCanonicalTree.java, IR/Tree/TreeKind.java, IR/Tree/TreeVisitor.java, Interpret/Tree/Method.java, Tools/PatMat/Lexer.jlex, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java, Backend/Runtime1/Data.java, Backend/Runtime1/DataInitializers.java, Backend/Runtime1/DataInterfaceList.java, Backend/Runtime1/DataJavaMain.java, Backend/Runtime1/DataReflection1.java, Backend/Runtime1/DataReflection2.java, Backend/Runtime1/DataStaticFields.java, Backend/Runtime1/ObjectBuilder.java, Backend/Runtime1/TreeBuilder.java, Backend/Sparc/CodeGen.spec, Backend/StrongARM/CodeGen.spec, homeBackend/Runtime1/DataClaz.java, Analysis/Tree/AlgebraicSimplification.java, Analysis/Tree/TreeStructure.java: Renaming Tree.DATA to Tree.DATUM to remove a conflict with Tree.Data on case-insensitive filesystems. @RENAME: IR/Tree/DATA.java IR/Tree/DATUM.java@ 2000-01-09 pnkfelix * Analysis/BasicBlock.java: FSK: Documentation update FSK: (perhaps CFGEdge is silly to have now, since it can FSK: only be safely returned by CFGraphables, but any code FSK: that's using the CFGraphable interface should instead FSK: be using CFGrapher, which CAN'T return CFGEdges) * Backend/Runtime1/Runtime.java, IR/Assem/Instr.java, IR/Assem/InstrMOVE.java, Main/SAMain.java, Main/SparcMain.java, Analysis/DataFlow/LiveTemps.java, Analysis/Instr/LocalCffRegAlloc3.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/RegFile.java, Analysis/Quads/BasicBlock.java, Analysis/Tree/ConstantPropagation.java, Analysis/BasicBlock.java: FSK: Updated BasicBlock code to use CFGrapher instead of CFGraphable, FSK: and updated code that used BasicBlock to fit the new interface. FSK: Note that in ALL cases, I just made calls to computeBasicBlocks() FSK: pass in CFGrapher.DEFAULT, which is NOT the right thing to FSK: do for Tree form anymore. So I'll leave it to duncan to make FSK: the appropriate changes there. 2000-01-09 duncan * IR/Tree/NATIVECALL.java: Another small bugfix. * IR/Tree/CALL.java, IR/Tree/Tree.java: Dredged out a few more bugs. Canonical trees appear to work again. 2000-01-08 duncan * IR/Tree/ExpList.java, IR/Tree/METHOD.java, IR/Tree/MOVE.java, IR/Tree/Tree.java: More bug fixes. * IR/Tree/CALL.java, IR/Tree/ExpList.java: A couple more bugfixes. * IR/Tree/ALIGN.java, IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/DATA.java, IR/Tree/EXP.java, IR/Tree/ExpList.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/METHOD.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/NATIVECALL.java, IR/Tree/RETURN.java, IR/Tree/SEGMENT.java, IR/Tree/TEMP.java, IR/Tree/THROW.java, IR/Tree/Tree.java, IR/Tree/UNOP.java: 1) A few bugfixes 2) Implementation of kids() using sibling pointers * Interpret/Tree/Method.java: Still more tree-updating. * Tools/PatMat/MaximalMunchCGG.java: More tree-updating. * Backend/StrongARM/CodeGen.spec, Backend/Sparc/CodeGen.spec: Fixed the spec file to use the new tree interface. * Analysis/Tree/AlgebraicSimplification.java, Analysis/Tree/ConstantPropagation.java, Analysis/Tree/TreeStructure.java: Fixed the analysis package to use the new tree interface. * IR/Tree/ALIGN.java, IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/Code.java, IR/Tree/DATA.java, IR/Tree/ESEQ.java, IR/Tree/EXP.java, IR/Tree/Edge.java, IR/Tree/Exp.java, IR/Tree/ExpList.java, IR/Tree/INVOCATION.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/METHOD.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/NATIVECALL.java, IR/Tree/OPER.java, IR/Tree/ObjectBuilder.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/Print.java, IR/Tree/RETURN.java, IR/Tree/SEGMENT.java, IR/Tree/SEQ.java, IR/Tree/Stm.java, IR/Tree/TEMP.java, IR/Tree/THROW.java, IR/Tree/ToCanonicalTree.java, IR/Tree/Tree.java, IR/Tree/TreeGrapher.java, IR/Tree/UNOP.java: Added parent and sibling pointers to the tree form. Unfortunately, this required the rather sweeping change of protecting tree's member variables through accessor methods -- lots of code to change. If anything's broken, let me know ASAP! Also, removed the CFGraphable code from IR.Tree.Tree. Still to be done: 1) Documentation of changes 2) Modification of tree iterator to use DOM algorithm 2000-01-07 bdemsky * Analysis/EventDriven/AsyncCode.java: Typo * Analysis/EventDriven/AsyncCode.new: Old file, not relevant anymore. * Analysis/EventDriven/AsyncCode.java: Another bug fix. Appears to be enough bug fixes to generate code. * Analysis/EventDriven/AsyncCode.java: Bug fixes of the day. 2000-01-06 bdemsky * Analysis/EventDriven/AsyncCode.java: Bunch of small bug fixes. * Analysis/EventDriven/AsyncCode.java: More bugs * Analysis/EventDriven/AsyncCode.java: Forgot to insert code to actually build environment. This should fix that problem. * Analysis/EventDriven/AsyncCode.java: Various bug fixes. Code added to shrink phi functions as necessary. * Analysis/EventDriven/AsyncCode.java: More small random bug fixes. * Analysis/EventDriven/AsyncCode.java: Changes: 1. Debug code added. 2. Lots of silly little bugs fixed. 2000-01-05 pnkfelix * IR/Assem/Instr.java: FSK: minor doc updates FSK: as for the current status, Hello World runs, FSK: but another more complex test case fails. FSK: (although it also fails with Scott's backend; FSK: his just gets farther before the JNI exception) FSK: and of course, normal jvms run it fine. FSK: So ill look into that soon. * Analysis/BasicBlock.java, Analysis/Instr/RegAlloc.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/InstrBuilder.java, IR/Assem/InstrDIRECTIVE.java, IR/Assem/InstrLABEL.java: FSK: !!! FSK: I finally got Hello World running with my register FSK: allocator! Woo woo! FSK: FSK: 1. Made InstrBuilder link multiple InstrMEMs together when FSK: necessary (not a fun bug to track down) FSK: 2. Changed the CodeGen pattern for NAMEs to mark the FSK: data portion as not being a possible control flow FSK: point. This was causing problems with the Spill FSK: code not being inserted. However, I don't think that FSK: problem should have happened even with this bug. Therefore, FSK: the Spill code insertion routines could probably stand FSK: some review for correctness. I'll do that, after I finish FSK: celebratings. FSK: 3. Added some static InstrLABEL and InstrDIRECTIVE construction FSK: routines (made them static methods instead of direct FSK: constructors to make it clear what their nonintuitive FSK: purpose is in the code that uses them) FSK: 4. Deleted some uselss code in RegAlloc FSK: 5. Sprinkled Assertions throughout the code base in an FSK: effort to debug various problems I was encountering. 2000-01-05 bdemsky * Analysis/EventDriven/AsyncCode.java: This update includes the code to swap calls statements out. This should finish the EventDriven stuff...all that remains is to debug and to incorporate the as yet released infrastructural changes for HClass/HMethod. It "should" work then. * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/ToAsync.java: Code changes to pass the BlockingMethods object & handling bottom level blocking calls. * Analysis/EventDriven/AsyncCode.java: Code to schedule dummy continuations when necessary added. * Support/EventDriven.jar: Done continuations added for all types. So we can schedule dummy continuations if necessary. 2000-01-04 duncan * Backend/CSAHack/RegAlloc/Spiller.java: Spiller now uses CFGEdges instead of HCodeEdges. * Analysis/Tree/TreeFolding.java: Removed edge recomputation. * IR/Assem/Instr.java, IR/Assem/InstrEdge.java: Assem/Instr now implements the new CFGraphable interface. * IR/Bytecode/Instr.java: Instr form now implements the revised CFGraphable interface. * IR/Quads/Edge.java, IR/Quads/Quad.java: Quad now implements the revised CFGraphable interface. * IR/Properties/CFGraphable.java: Modified the CFGraphable interface so that CFGraphables are connected by CFGEdges. This guarantees that CFGraphables cannot be connected to non-CFGraphables. * IR/Tree/CanonicalTreeCode.java, IR/Tree/Code.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/Stm.java, IR/Tree/Tree.java, IR/Tree/TreeGrapher.java: Removed implementation of CFGraphable from Tree form, added a getGrapher() method to Tree.Code. * IR/Properties/CFGEdge.java: An edge connecting two CFGraphable objects. * IR/Properties/CFGEdge.java: New file. 2000-01-02 bdemsky * Analysis/EventDriven/AsyncCode.java: Added code to handle THROW & RETURN's in Continuations. * Support/EventDriven.jar: Jar file with new classes added to it. * Analysis/EnvBuilder/EnvTemplate.java, Analysis/EnvBuilder/Environment.java: Moving to jar file. * Analysis/ContBuilder/ContBuilder.java, Analysis/ContBuilder/ContTemplate.java: Moving ContTemplate to jar file, committing out old code of ContBuilder. * Main/EventDriven.java: Additions to EventDriven stuff...to call Jasmin backend. * Analysis/Quads/QuadLiveness.java: Changes to QuadLiveness to provide Temp[] of in/out set functionality. These are cached so that a given QuadLiveness always returns the Temp array in the same order. * Analysis/EnvBuilder/EnvBuilder.java: Changes to accomidate new EventDriven code. * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/ContCode.java, Analysis/EventDriven/EventDriven.java, Analysis/EventDriven/ToAsync.java: New EventDriven stuff. Not complete yet. Non-recursive, demand-driven analysis. * Analysis/EventDriven/ContCode.java: New file. * Analysis/ContBuilder/BooleanContinuation.java, Analysis/ContBuilder/BooleanResultContinuation.java, Analysis/ContBuilder/ByteContinuation.java, Analysis/ContBuilder/ByteResultContinuation.java, Analysis/ContBuilder/CharContinuation.java, Analysis/ContBuilder/CharResultContinuation.java, Analysis/ContBuilder/ContCode.java, Analysis/ContBuilder/Continuation.java, Analysis/ContBuilder/DoubleContinuation.java, Analysis/ContBuilder/DoubleResultContinuation.java, Analysis/ContBuilder/FloatContinuation.java, Analysis/ContBuilder/FloatResultContinuation.java, Analysis/ContBuilder/IOContinuation.java, Analysis/ContBuilder/IntContinuation.java, Analysis/ContBuilder/IntDoneContinuation.java, Analysis/ContBuilder/IntResultContinuation.java, Analysis/ContBuilder/LongContinuation.java, Analysis/ContBuilder/LongDoneContinuation.java, Analysis/ContBuilder/LongResultContinuation.java, Analysis/ContBuilder/ObjectContinuation.java, Analysis/ContBuilder/ObjectResultContinuation.java, Analysis/ContBuilder/Scheduler.java, Analysis/ContBuilder/ShortContinuation.java, Analysis/ContBuilder/ShortResultContinuation.java, Analysis/ContBuilder/VoidContinuation.java, Analysis/ContBuilder/VoidResultContinuation.java: Removal of files moved to jar. * Support/EventDriven.jar: Jar of class files needed for EventDriven pass. * Support/EventDriven.jar: New file. 2000-01-02 andyb * Backend/Sparc/CodeGen.spec: Syncing up some old changes I found lying around but hadn't checked in yet - looks like I did something with the code generation of RETURN, THROW, and METHOD. 1999-12-20 pnkfelix * Backend/StrongARM/CodeGen.spec: FSK: Well, I tried to do a test run, and i ran out of FSK: memory. C:P FSK: *BUT* it got farther than any previous time with FSK: the CORRECT InstrBuilder code... FSK: So I see that as progress. FSK: I'm backing out one of my debug-hacks now...more FSK: will be backed out later. Dunno if I'm going to FSK: have time to really test the compiler before I FSK: leave though... I *think* its working much better FSK: (ie, I think the Label problem I was having is FSK: now gone, b/c my fail-fast didn't come up at FSK: the point where it normally has in the past) * Analysis/Instr/RegAlloc.java, Backend/Generic/InstrBuilder.java, Backend/StrongARM/InstrBuilder.java, IR/Assem/Instr.java: FSK: Okay, still working on tracking down all the bugs FSK: here... the thing that's been tripping me up for half FSK: the night is *NOT* a normal bug...this is some sort of FSK: very strange behavior where functions get half-completed FSK: (and I'm not seeing any exceptions being thrown or caught...) FSK: I don't know if its jikes or if I'm hallucinating, but FSK: now that I've commented out one particularly nasty FSK: subroutine call (the one with the comment referring to FSK: "CRAZY shit"), the compiler now appears to run sanely. FSK: FSK: So, back to the original problem of getting executable FSK: code, now that I've fixed the main problem (InstrBuilder wasn't FSK: laying out Instrs properly in every case, so large portions of FSK: methods were just being...left behind.) * IR/Assem/Instr.java, Analysis/Instr/RegAlloc.java, Backend/Generic/Code.java, Backend/Generic/CodeGen.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/InstrBuilder.java: FSK: Tracking down missing InstrLABELs bug, and managed FSK: to find something very likely to be related, and maybe FSK: the cause...somehow, somewhere, the List of Instrs FSK: returned by InstrBuilder is losing the layout information FSK: its supposed to have. It *has* the info before leaving FSK: InstrBuilder, but has lost the info immediately upon checking FSK: after InstrBuilder.makeStore() returns... FSK: I'm pretty sure this is related because after looking into FSK: the matter, it seems that not just labels, but large FSK: chunks of assembly go AWOL once TwoWordTemps start being FSK: spilled... 1999-12-20 duncan * Analysis/Tree/AlgebraicSimplification.java, Analysis/Tree/ConstantPropagation.java, Analysis/Tree/TreeStructure.java: Fixed a rule in the algebraic simplifier. Small touch-ups to constant propagation and tree structure classes. * Analysis/DataFlow/ReachingHCodeElements.java, Analysis/DataFlow/Solver.java: Added a forward RPO solve method to the Solver class (cut-n-paste from QuadSolver). Added caching to ReachingHCodeElements. * IR/Tree/Tree.java: Made Tree's clone() method public, as I needed it elsewhere. I can't really remember why it was set to package-level access, and the logs don't mention it. * IR/Tree/TreeGrapher.java: An CFGrapher for the tree form. A bit faster and more compact than the current grapher. Not currently integrated with the tree form, so it's untested. * IR/Tree/TreeGrapher.java: New file. 1999-12-20 pnkfelix * Analysis/BasicBlock.java, Backend/Generic/Code.java, Backend/StrongARM/Code.java: FSK: Incorporated some code to try to debug why some referenced FSK: labels are never output in the assembly. An inefficient FSK: BasicBlock construction check is in there, but I'm not FSK: convinced that that's the cause of the problem, because FSK: BasicBlocks are just a *view* of the current instruction FSK: listing; their construction shouldn't affect the actual FSK: internal data *model* (to use MVC terminology...) FSK: Plus it wasn't really helping me track down the problem. FSK: so I've also inserted some stuff in Generic.Code to track FSK: the Labels that are output and the Instructions that FSK: have Targets, and then run over the targets and make sure FSK: a label is output for them. SUCCESS; I now have found that FSK: our first culprit is something happening in FSK: java.lang.FDBigInt.mult(...) FSK: So I'm going to work on tracking down the specific FSK: bug in the compiler itself as well. I still think that this FSK: could be caused by our inability to do procFixup properly, FSK: so at some point I'm going to add in the interface extension FSK: I proposed. So the old procFixup method might be deprecated FSK: eventually, we'll see... 1999-12-20 duncan * Analysis/DataFlow/ReachingHCodeElements.java: One of the sets was not created using the supplied set factory, which caused a _big_ performance hit. This fix improves the performance of constant propagation greatly. 1999-12-19 duncan * Analysis/Tree/AlgebraicSimplification.java: 1) Modified the algorithm found in the Sparc Architecture book for converting muls to shifts b/c it was a bit overzealous in applying booth recoding. Now, only strings of 3 1's or more are recoded. 2) Added a rule to apply the commutative property to appropriate BINOPs. 3) Fixed a parenthesis bug. 1999-12-19 pnkfelix * IR/Assem/Instr.java, Backend/Generic/Code.java, Backend/Generic/CodeGen.java, Backend/StrongARM/Code.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/InstrBuilder.java, Analysis/Instr/LocalCffRegAlloc3.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/RegFile.java: FSK: okay, i've gotten EVEN closer to having a working backend FSK: with my register allocator. C:P FSK: FSK: Specific changes: FSK: 1. Even better register allocation in Cff3 (should probably FSK: just get rid of Cff1 and Cff2 and make Cff the only local FSK: allocator...also implemented method-entry/exit fixup, FSK: though I don't think it works correctly (due to interface FSK: issues) FSK: 2. Added some constraint checks to backend code generation FSK: for the StrongARM so that we "fail-fast" (which has been FSK: a real boon to me...) FSK: 3. Backed out one or two minor interface changes I had made FSK: to Instr that I've realized are unnecessary FSK: FSK: Right now, I can get the system all the way to doing the "make" FSK: in ~/Harpoon/Runtime/ but it fails towards the end, during FSK: gcc -g -O2 -o startup startup.o ...etc FSK: With a bunch of complaints about undefined symbols (that look FSK: like labels to me...) being referenced from the text segment. FSK: Awesome. Not too sure how I'm going to go about tracking down FSK: this error, but i figured I'd check in my additions before my FSK: codebase diverged too much... I should have executable code by FSK: tomorrow, with a bit of luck. FSK: (ps to Scott, I need for you to get back to me about that FSK: interface change i proposed to procFixup; if i don't hear back FSK: from you soon, I'm just going to add my version in addition to FSK: what's already there (yay method overloading...) ) 1999-12-18 duncan * Analysis/Tree/AlgebraicSimplification.java, Analysis/Tree/ConstantPropagation.java, Analysis/Tree/TreeStructure.java: 1) Minor bugfixes in TreeStructure and ConstantPropagation. 2) Addition of an algebraic simplification pass. Currently converts mul to shifts, div to muls, and various trivial simplifications. However, it's a bit naive in that doesn't perform reassociation. * Analysis/Tree/AlgebraicSimplification.java: New file. * IR/Tree/NATIVECALL.java: Making a new CONST every time kids() was called was confusing the TreeStructure. 1999-12-16 kkz * Analysis/EventDriven/AsyncCode.new: AsyncCode.new will be replacing AsyncCode.java when the code is finalized. Right now, it's named AsyncCode.new so that it won't stop other people from being able to compile. AsyncCode is changing because we are trying to do the event-driven transformation in a way that does not use recursion. * Analysis/EventDriven/AsyncCode.new: New file. 1999-12-15 bdemsky * Analysis/Quads/QuadLiveness.java: Added methods to return Temp[] arrays instead of sets. In general, we really want Temp arrays to use, so I added methods to simplify code elsewhere. 1999-12-11 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/LocalCffRegAlloc2.java, Analysis/Instr/LocalCffRegAlloc3.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/RegFile.java, Backend/Generic/Code.java, Backend/Generic/CodeGen.java, Backend/Generic/RegFileInfo.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/RegFileInfo.java, IR/Assem/Instr.java, IR/Tree/Code.java, Main/SAMain.java: FSK: Finally got Register Allocation bareably fast FSK: (the problem was that I was using an O(n^2) algorithm to FSK: build a table, but the allocator didn't require as much FSK: data in the table as I had interpreted it needing, so FSK: I was able to build the right table in O(n) time.) FSK: ( n in the above description is the size of the basic block... FSK: for most basic blocks, the difference between O(n^2) and O(n) FSK: was slim, but there is a *1000* line block in FSK: java.lang.Integer amazingly enough, so that was FSK: killing us ) FSK: The produced code is correct, but I need to FSK: 1. Incorporate Dirty/Clean information FSK: 2. Introduce Move Coalescing, perhaps the Iterative Procedure FSK: given by Appel...we'll see * Analysis/Instr/LocalCffRegAlloc2.java, Analysis/Instr/LocalCffRegAlloc3.java, Analysis/Instr/RegFile.java: New file. * Analysis/DataFlow/LiveVars.java: FSK: Finally got Register Allocation bareably fast FSK: (the problem was that I was using an O(n^2) algorithm to FSK: build a table, but the allocator didn't require as much FSK: data in the table as I had interpreted it needing, so FSK: I was able to build the right table in O(n) time.) FSK: ( n in the above description is the size of the basic block... FSK: for most basic blocks, the difference between O(n^2) and O(n) FSK: was slim, but there is a *1000* line block in FSK: java.lang.Integer amazingly enough, so that was FSK: killing us ) FSK: The produced code is correct, but I need to FSK: 1. Incorporate Dirty/Clean information FSK: 2. Introduce Move Coalescing, perhaps the Iterative Procedure FSK: given by Appel...we'll see 1999-12-06 pnkfelix * Analysis/BasicBlock.java, Analysis/Instr/LocalCffRegAlloc.java, IR/Tree/Code.java, Util/Util.java: FSK: 1. Added a lazily evaluated String object to the Util package, FSK: intended for use with Util.assert, so that explanation FSK: Strings are noticeably slow to build (ie O(n) ) will only be FSK: evaluated when needed. Now, Code using this "feature" looks FSK: heinous, and each LazyString basically needs its own inner FSK: class, so we add a fair amount of overhead to the class FSK: loading if this feature is used too much. But, it was FSK: a useful addition for my code. FSK: FSK: 2. Made further changes to LocalCffRegAlloc in an effort to get FSK: it working. Right now it seems to work, except compiling FSK: hello world seems to infinite loop around FSK: java.lang.Integer. FSK: I'm curious now that it might just be taking a really really FSK: long time to compile...in any case, I've been using 'jdb' to FSK: try to get a stack trace while its compiling that method, but FSK: so far I either FSK: 1. Haven't gotten jdb to reach that point in the compilation FSK: or 2. When jdb does reach that point, it has some FSK: InternalError with the local variable table or something FSK: and can't give me a stack trace. FSK: Still trying though... FSK: FSK: 3. Added some uses of LazyString...Perhaps I shouldn't have to FSK: duncans code...I can take that out later...but during my jdb FSK: sessions, I found that many Tree objects are being Printed FSK: (with full recursive traversal of the Printer) to FSK: the assertion message every time they are visited, which I FSK: would think would automatically turn an order O( p(n) ) algorithm into FSK: a O( p(n)^2 ) or perhaps O( p(n) * n ) or something (not FSK: really sure since I was never good at order of growth FSK: analysis on such dynamic traversals...) In any case, I only FSK: added it to one case in the Visitor...perhaps I'll add more FSK: later, or perhaps I'll take it out... 1999-12-05 duncan * Analysis/Tree/ConstantPropagation.java: Constant propagation for tree form. Works well on simple cases at least ... has yet to be rigorously tested. * Analysis/Tree/ConstantPropagation.java: New file. * IR/Tree/ExpList.java, IR/Tree/MEM.java: A couple of very small updates to the tree form. Gave ExpList a "replace" method similar to its "rename" method. Made the fields of "MEM" non-final. * IR/Tree/ToTree.java: This bug was somewhat tricky. Every Tree object in a tree form is supposed to be unique. However ... the pointer to exception handling code was being reused at will, to the confusion of my constant propagation code! * Analysis/Tree/TreeStructure.java: While I'm at it, I might as well document the few remaining public methods in the TreeStructure class... * Analysis/Tree/TreeStructure.java: A much-needed overhaul for the TreeStructure class. Seems like it actually works now :) 1999-12-04 pnkfelix * Backend/StrongARM/RegFileInfo.java, Backend/Generic/Code.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java: FSK: Fixed the last bug I noted in the register allocator. FSK: It seems to work, though there are some tweaks I need FSK: to implement (for example, don't need to store values FSK: that haven't been altered since they were loaded...) FSK: However, the compiler itself seems to have an infinite FSK: loop (probably in my code somewhere) because it gets FSK: all the way to java.lang.Integer: and then FSK: doesn't seem to get anywhere. So I need to look into FSK: that... * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Backend/Generic/Code.java, Backend/StrongARM/Code.java: FSK: Fixed the bug (I think) that was plaguing me on Thursday, FSK: but now I'm finding out that, somehow, some of the Instrs FSK: are slipping through the cracks and are not being run FSK: through the register allocator. The mind bristles... 1999-12-03 pnkfelix * Util/LinearMap.java, Util/Util.java, Backend/Generic/Code.java, Backend/Generic/RegFileInfo.java, Backend/StrongARM/Code.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/RegFileInfo.java, Analysis/Instr/LocalCffRegAlloc.java: FSK: 1. Some basic utility changes to conform to standard interfaces FSK: 2. Lots of hacks to LocalCffRegAlloc to make it produce FSK: proper output. Now I need to go back and take out the FSK: ones that aren't necessary, and change the code so FSK: that it has a better time bound (maybe I'll do FSK: move coalescing first though...) FSK: 3. Added a removeAssignment method to RegFileInfo so that FSK: I can take back changes that were made in error (I FSK: probably shouldn't need this sort of power; I'll go over FSK: it later...) FSK: I haven't finished a full compile yet, but it seems to be FSK: running fine in nohup... I'm worried that I'm not outputing FSK: methods correctly in terms of their labels (as in, I don't FSK: see any labelling of the methods). We'll see... 1999-12-03 duncan * Analysis/DataFlow/ReachingHCodeElements.java: New file. * Analysis/DataFlow/ReachingDefInfo.java, Analysis/DataFlow/ReachingDefs.java, Analysis/DataFlow/ReachingHCodeElements.java: New implementation of reaching definitions analysis. Style is very similar (intentionally) to Felix's live variable analysis. 1999-12-02 pnkfelix * Backend/StrongARM/Code.java, Backend/StrongARM/CodeGen.spec: FSK: Continuing work to try to get compiliable output; FSK: 1. Made the --method-- comments real comments with '@' FSK: 2. In the interest of making the system Fail-Fast, FSK: added an assertion in StrongARM.Code.assignRegister() FSK: that checks for the mul/mla case. Am surprised that FSK: I didn't think of this earlier! * Backend/StrongARM/InstrBuilder.java: FSK: Finished the changes to InstrBuilder to handle arbitrary FSK: SP offsets. Can now completely compile code (!!!) FSK: However, the produced code is unassemblable due to dumb FSK: things something I can't find is doing (like having lines FSK: that say "--method entry point--" strewn throughout the FSK: assembly code...) I'm gonna work on make the code assemblable FSK: first, then do a quick correctness check, and then work on FSK: Move Coalescing C:) 1999-12-01 pnkfelix * Backend/StrongARM/InstrBuilder.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Backend/Generic/InstrBuilder.java: FSK: Implemented proper unlimited offset setting in InstrBuilder's FSK: MakeLoad Instruction. Next, MakeStore (which should be FSK: about the same) and then I should be sitting pretty! C:) C:) C:) 1999-12-01 andyb * Backend/Sparc/InstrBuilder.java: consolidated makeLoad and makeStore to use sparc double-word loads and stores for two word temps. * Backend/Sparc/RegFileInfo.java: Add in support for floating point registers. * Backend/Sparc/CodeGen.spec: Add back more exotic types of loads. Added in target lists for most of the jumps (still need to deal with the CMP?? rules) 1999-11-30 andyb * Backend/Sparc/CodeGen.spec: Finished rewriting load and store rules. Got rid of opcodes which didn't actually exist. Fixed the fact that while SPARC has ldf and stf for floating point, the assembler just wants them to be ld and st (and infers the f from whether or not you use floating point registers). 1999-11-30 C. Scott Ananian * Util/Graph.java, IR/Bytecode/Instr.java, IR/Bytecode/package.html, IR/Properties/HasEdges.java, IR/Quads/Quad.java, IR/Quads/SSIRename.java, IR/Tree/CanonicalTreeCode.java, IR/Tree/Code.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/Tree.java, Main/SAMain.java, Main/SparcMain.java, Analysis/Quads/SCC/SCCOptimize.java, Analysis/Tree/TreeFolding.java, IR/Assem/Instr.java, IR/Assem/InstrFactory.java, Analysis/BasicBlock.java, Analysis/CycleEq.java, Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/QuadSolver.java, Analysis/DataFlow/ReachingDefs.java, Analysis/DataFlow/TreeSolver.java, Analysis/DomFrontier.java, Analysis/DomTree.java, Analysis/EdgesIterator.java, Analysis/Instr/RegAlloc.java, Analysis/Loops/LoopFinder.java, Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/BasicInductions.java, Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/SESE.java, GNUmakefile: Global search-and-replace IR.Properties.HasEdges with IR.Properties.CFGraphable, which (along with its companion IR.Properties.CFGrapher) is the new and more-logical name for this interface. Removed HasEdges to make way. * IR/Properties/CFGraphable.java, IR/Properties/CFGrapher.java: CFGrapher and CFGraphable classes that pnkfelix, duncan, and I discussed last week. CFGraphable is the new name for IR.Properties.HasEdges. I'll be doing a global search-and-replace after this commit. @RENAME: /HasEdges.java /CFGraphable.java@ * IR/Properties/CFGraphable.java, IR/Properties/CFGrapher.java: New file. 1999-11-29 andyb * Backend/Sparc/CodeGen.spec: Turned some emit()'s into emitCC()'s where appropriate. Added SHL, SHR, and USHR patterns for LONG operands. * Backend/Sparc/CodeGen.spec: Support mul, div, and rem for longs. Make sure we're writing to the right register with ldd and std (the lowered number register of the pair gets the high word). Fix makeTemp so that two Instrs with the same temps really do use the same temps. 1999-11-29 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java, IR/Assem/InstrEdge.java: FSK: Made fixes to local reg alloc; notably, I don't update the FSK: register file until I'm FINISHED spilling a variable (we FSK: need sometimes to add several spill instructions when FSK: control flow splits, and I was trying to remove the reg->temp FSK: mapping after adding each spill, instead of waiting 'til FSK: all were in. FSK: Also made InstrEdge's toString method more readable for my own FSK: sanity 1999-11-29 andyb * Backend/Sparc/Code.java, Backend/Sparc/CodeGen.spec, Main/SparcMain.java: More updates to the Sparc CGG spec file. Does beautifully on simple tests, working on flushing it out for things like java.math.BigInteger. Modified SparcMain so it would work with classes that did not have a main method (quick hack to use in testing, but that's all that SparcMain is anyway). 1999-11-28 andyb * Backend/Sparc/Code.java, Backend/Sparc/CodeGen.spec: Now that I get to the point of needing to compile java.util.Hashtable, here's some basic float patterns. Also, print out the instruction in question when we're missing the high/low suffix in getRegisterName. 1999-11-28 duncan * IR/Tree/CALL.java: Modified CALL to include retex in its use/def sets. * Analysis/DataFlow/LiveVars.java: Oops, left a useless field lying around. * IR/Tree/INVOCATION.java: Added a missing null check. The return value of an INVOCATION is null for methods of return type "void". * Analysis/DataFlow/TreeSolver.java: Added another solver to the TreeSolver. * Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/LiveVars.java: Added local live-variable analysis according to Felix's spec. 1999-11-23 pnkfelix * Analysis/DataFlow/LiveTemps.java: FSK: Added an expansion of the spec for LiveTemps analysis, FSK: allowing for finer grain extraction of Liveness information FSK: without it feeling like you're pulling teeth (at least FSK: for the user of the dataflow package...the implementor...well FSK: that's another story) * Analysis/BasicBlock.java: FSK: Made a reverse Mapping from Instrs to BasicBlocks so that FSK: other classes can efficiently perform reverse lookups 1999-11-23 andyb * Backend/Sparc/CodeGen.spec, Backend/Sparc/RegFileInfo.java: The SPARC code generation spec file now has at least a stub definition for all the patterns it needs to compile 'Hello World' (or at least to compile everything until it runs out of memory currently). * Main/SparcMain.java: A main class useful for testing Sparc Code Generator. initial version - duplicated SAMain.java and turned all StrongARM references into Sparc ones. * Main/SparcMain.java: New file. 1999-11-22 bdemsky * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/ToAsync.java: Typos/old comments * Analysis/EnvBuilder/EnvCode.java: Inherits from QuadNoSSA * Analysis/ContBuilder/ContCode.java: I'd like these to be able to go through other passes. * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/EventDriven.java, Analysis/EventDriven/EventDrivenCode.java: Minor changes. * Analysis/ContBuilder/Scheduler.java: Should allow compilation now... * Analysis/Quads/TypeInfo.java: Scott, please check this... I think this is the correct way to fix this bug. * Analysis/ContBuilder/Scheduler.java: This diff breaks the scheduler code. Its purpose is to allow people with java.io.NativeIO to build the compiler. 1999-11-20 bdemsky * IR/Quads/QuadNoSSA.java: I'd like to make classes that extend QuadNoSSA and can call super. So the constructor was changed from private->protected. The event driven stuff needs this so that its output can be recognized by other CodeFactories. * Analysis/EventDriven/EventDrivenCode.java: Oops...I was linking in the wrong quad. It is fixed now. * Analysis/EventDriven/EventDrivenCode.java: 0-edge of CALL statement wasn't being linked. * Analysis/ContBuilder/ContCode.java: Oops...PHI nodes aren't allowed to see FOOTER nodes. My bad. * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/EventDrivenCode.java: Bug fixes on Karen's code. * Analysis/ContBuilder/ContBuilder.java, Analysis/ContBuilder/ContCode.java, Analysis/ContBuilder/IntContinuation.java, Analysis/ContBuilder/LongContinuation.java: Ovy's stuff and bug fixes on Karen's code. [CALL's missing edge-1, etc] * Analysis/ContBuilder/IOContinuation.java, Analysis/ContBuilder/IntDoneContinuation.java, Analysis/ContBuilder/LongDoneContinuation.java, Analysis/ContBuilder/Scheduler.java: Ovy's stuff. * Analysis/ContBuilder/IOContinuation.java, Analysis/ContBuilder/IntDoneContinuation.java, Analysis/ContBuilder/LongDoneContinuation.java, Analysis/ContBuilder/Scheduler.java: New file. 1999-11-19 bdemsky * Analysis/EventDriven/AsyncCode.java: More changes.. * Analysis/EventDriven/AsyncCode.java: Using getMethod for setNext method doesn't work, because the HClass[] array must contain HClass's of the exact type of the parameters, and not just HClass's implementing this interface. Changed to not require this. I'm not sure that this was the way to go...ie. If some joker adds a setNext(Object) method to the continuation, I'm screwed. 1999-11-18 bdemsky * Analysis/EventDriven/EventDriven.java: Improved code for finding METHOD quads. 1999-11-18 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java: FSK: Okay, my code for Local Alloc wasn't quite as perfect FSK: as I had hoped the day before yesterday. FSK: Anyway, I now store variables in the register file FSK: that are still live. So that's good. FSK: I'm getting a strange Instr-output error, so I FSK: suspect some InstrMEM isn't getting built FSK: properly. I'll look in that that. 1999-11-17 C. Scott Ananian * IR/Quads/CALL.java: another javadoc typo. 1999-11-17 kkz * Analysis/EventDriven/EventDriven.java, Analysis/EventDriven/EventDrivenCode.java: EventDriven transforms the main method of a given class to the async and replaces blocking calls. * Analysis/EventDriven/EventDriven.java, Analysis/EventDriven/EventDrivenCode.java: New file. 1999-11-17 C. Scott Ananian * IR/Quads/CALL.java: javadoc bugfixes; pointed out by kkz. 1999-11-17 bdemsky * Main/JMain.java: Cleaning up file to run Jasmin. Made compiling only callable methods an option [defaults to compile all]. * IR/Quads/Pattern.java, IR/Quads/ReHandler.java: Commented out debug print statements. * Main/JMain.java: Still needs some work...but this version produces a correctly executing volano. The hack in this version is as follows: If a class is included, all of its methods are included. Just using callable methods isn't working for some reason. 1999-11-16 kkz * Analysis/ContBuilder/ContBuilder.java, Analysis/ContBuilder/ContCode.java, Analysis/ContBuilder/ContTemplate.java, Analysis/ContBuilder/Continuation.java, Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/ToAsync.java, Main/EventDriven.java: Changed Continuation interfaces to include some things that Ovy needed. Fixed various bugs in AsyncCode, ContCode... etc. 1999-11-16 pnkfelix * Backend/StrongARM/Code.java, Analysis/Instr/LocalCffRegAlloc.java, Backend/CSAHack/RegAlloc/Code.java, Backend/Generic/Code.java, Backend/Sparc/Code.java: FSK: <> FSK: First I tried to solve the problem without changing the spec to FSK: Generic.Code FSK: I unwittingly made a hack that DID solve the problem (though it FSK: may have created others) but it was hard to read and depended FSK: on other parts of the algorithm doing certain things... FSK: So I decided that the *right* thing to do would be to expand FSK: the spec for Code to allow the register allocator to check if FSK: a reference has been assigned a register yet. FSK: This definitely fixes the problem, and I think it is a much FSK: cleaner way to do it... FSK: So, now the register allocator is closer to being correct. FSK: I'm still getting OutOfMemoryErrors though... C:P Time FSK: to throw on some -Xmx switches... * Analysis/Instr/LocalCffRegAlloc.java: FSK: Removed debugging cruft from Local Register Allocator FSK: Also, noticed that some of the moves are not getting FSK: their destinations assigned to a register, or at least FSK: the replacement is not happening at some level. So FSK: I spoke too soon earlier; there is still some problem FSK: here. * Analysis/Instr/LocalCffRegAlloc.java, Backend/Generic/RegFileInfo.java, Backend/StrongARM/RegFileInfo.java: FSK: Got Local Register Allocation to run and TERMINATE! FSK: C:) FSK: Turns out the bug was due to my mishandling of an FSK: adjustment of StrongARM.RegFileInfo FSK: FSK: Also, Scott and Andy, please note the specification FSK: updates (the need for supporting RegFileInfo.PREASSIGN). FSK: Let me know if you feel that the current solution is FSK: too hackish for your tastes, and if we perhaps, for FSK: consistency with PREASSIGN, should move to model where FSK: "All Keys have a Value, even if that Value is FSK: RegFileInfo.NOVALUE" (as opposed to the current setup FSK: registers without a value simply are left out of the FSK: RegFile map) FSK: FSK: As far as I've looked so far, the code works (though FSK: it ran out of memory so I haven't actually had a complete FSK: compile yet...) FSK: Next step: get Webs Working Wright! C:) 1999-11-15 bdemsky * Main/JMain.java: Removed hacks...now that QuadClassHierarchy is learning stuff. 1999-11-15 C. Scott Ananian * Analysis/Quads/QuadClassHierarchy.java: Tell the QuadClassHierarchy about the link between Thread.start() and Thread.run(). Fixes kkz/bdemsky bug. * IR/Quads/NEW.java: Improve javadoc for NEW. kkz pointed out that this was unclear. 1999-11-15 pnkfelix * Backend/Generic/Code.java, Backend/Generic/RegFileInfo.java: FSK: Some documentation updates, mostly of a design analysis nature. FSK: Sad thing is that these are probably the most significant things FSK: I've done (in relation to the project as a whole, at least) since FSK: they are related to the design inherent in Flex. * Backend/Generic/Code.java, Analysis/Instr/LocalCffRegAlloc.java: FSK: Wow, my code is significantly less broken than it was before. FSK: It now does a pretty good impersonation of a working local FSK: register allocator. FSK: However, it seems to be infinite looping somehwhere when trying FSK: to compile one of OutputStreamWriter's methods. C:P FSK: (which is odd, b/c I was relatively certain FSK: that all of my looping code had reasonable FSK: termination conditions) FSK: Also, its starting to look like my TwoWayMap inner class is FSK: soon going to be hairy enough to warrant its promotion to FSK: its own file in the Util.Collections package. Whoopie! (Who FSK: would have thunk that a simple thing like a bidirectional FSK: many-to-one map would be so bug-ridden?) * Util/Collections/CollectionWrapper.java: FSK: Some of my work in the Factories class required that I be able FSK: to create wrappers around collections with minimal fuss. FSK: This is class really doesn't have any purpose other than to FSK: make YOUR inner class definitions even cleaner than they already FSK: are. FSK: (although I suspect for most of you it won't have a purpose other FSK: than making MY code compilable. C:P ) * Util/Collections/CollectionWrapper.java: New file. * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/Web.java, Backend/Generic/RegFileInfo.java, Backend/StrongARM/Code.java, Backend/StrongARM/RegFileInfo.java, IR/Assem/Instr.java, IR/Assem/InstrFactory.java, Util/Collections/Factories.java: FSK: Amazing what taking time off from a problem can do for your FSK: ability to handle it. I still don't have Stack Slot Assignment FSK: for the Webs done yet, but I took a break and looked at the FSK: Local Register Allocation code again and found a bunch of those FSK: bugs where I just stare and say "what the hell was I thinking FSK: when I wrote _that_?" FSK: So, the code still doesn't work quite right (current problem: FSK: certain Temps are being noted as being stored in multiple FSK: registers when the test code doesn't HAVE any multi-register FSK: temps), but I was excited just to be able to see my problems FSK: so *clearly*! FSK: Also added some doc, and added a few methods that I didn't think FSK: I could live without. 1999-11-13 C. Scott Ananian * Util/Default.java: Add a toString() method to the EMPTY_MAP field of Util.Default so that it looks like other Maps when you print it out. * Main/SAMain.java: Add new -F option to SAMain to apply SCC optimization when generating code. Think 'F-for-fast'... '-O' and such were already taken... * Backend/StrongARM/CodeGen.spec: workaround bug in stabs debugging information if method is clone() from an array class. * Backend/Runtime1/StubCode.java: Clear JNI exception in stub code before invoking any JNI functions. * Interpret/Quads/HCLibrary.java, Interpret/Quads/INFile.java, Interpret/Quads/Support.java: Add interpreter implementation of native method java.io.File.isFile0, needed for javac. * Interpret/Quads/INFile.java: New file. 1999-11-13 bdemsky * IR/Jasmin/Jasmin.java: Change in policy on floats/doubles. After a little thought, I decided that it is always better to use bit patterns. It just allows us to avoid all sorts of nasty problems in the future. I know readability will suffer, but hopefully our compiler won't need debugging for much longer. 1999-11-12 bdemsky * Main/JMain.java: Random workarounds.. 1999-11-12 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Workaround bug with spill code during call prologue. * Backend/StrongARM/CodeGen.spec: Keep program counter register live so that the register allocator doesn't try to use it for temporary storage. 1999-11-12 bdemsky * Main/JMain.java: Typo * Main/JMain.java: Bug fixes for Primitives/Arrays. * Support/jasmin.jar: Support for my escape sequences. * IR/Jasmin/Jasmin.java: Jasmin backend fixes for Floats/Doubles that are things like NaN/Infinity. * Main/JMain.java: Jasmin Main file...checking it in because I lost its previous incarnation due to an fsck. * Main/JMain.java: New file. 1999-11-12 C. Scott Ananian * IR/Bytecode/InGen.java: Correct a long-standing bug with negative constants in the rare WIDE IINC bytecode instruction. The JVM sez the constant increment is a *signed* 16-bit int, and we were parsing it as *unsigned*. Oops. * Backend/StrongARM/CodeGen.spec: Doubles on the StrongARM are stored in quasi-big-endian order (45670123) while everything else is stored in little-endian order. This patch makes us consistent with the screwy C conventions. * ClassFile/HMethodSyn.java: Allow creating methods with the same exact name as some template method. This is a bit dangerous, but very useful at times. Added for kkz. * ClassFile/HClassSyn.java: javadoc typo. 1999-11-12 bdemsky * IR/Jasmin/Jasmin.java: No printing native methods allowed. 1999-11-12 C. Scott Ananian * Analysis/EnvBuilder/EnvBuilder.java: Fix EnvBuilder to use the type map built into QuadNoSSA instead of sending the HCode out to SCCAnalysis. * IR/Quads/QuadNoSSA.java: Add a new constructor and a new code factory creation method to allow preservation of type information from SSI form into NoSSA form. * IR/Quads/ToNoSSA.java: Rework the constructors for ToNoSSA a little to allow passing null to indicate 'no derivation' or 'no typemap'. * Analysis/Quads/SCC/SCCAnalysis.java: Make sure SCCAnalysis is getting SSI form input. 1999-11-12 kkz * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/ToAsync.java, Analysis/Quads/QuadLiveness.java, Main/EventDriven.java: Changes Continuation to an interface and modified all the *Continuation files accordingly. First pass of EventDriven code. * Analysis/EventDriven/AsyncCode.java, Analysis/EventDriven/ToAsync.java, Main/EventDriven.java: New file. * Analysis/ContBuilder/BooleanContinuation.java, Analysis/ContBuilder/BooleanResultContinuation.java, Analysis/ContBuilder/ByteContinuation.java, Analysis/ContBuilder/ByteResultContinuation.java, Analysis/ContBuilder/CharContinuation.java, Analysis/ContBuilder/CharResultContinuation.java, Analysis/ContBuilder/ContBuilder.java, Analysis/ContBuilder/ContCode.java, Analysis/ContBuilder/Continuation.java, Analysis/ContBuilder/DoubleContinuation.java, Analysis/ContBuilder/DoubleResultContinuation.java, Analysis/ContBuilder/FloatContinuation.java, Analysis/ContBuilder/FloatResultContinuation.java, Analysis/ContBuilder/IntContinuation.java, Analysis/ContBuilder/IntResultContinuation.java, Analysis/ContBuilder/LongContinuation.java, Analysis/ContBuilder/LongResultContinuation.java, Analysis/ContBuilder/ObjectContinuation.java, Analysis/ContBuilder/ObjectResultContinuation.java, Analysis/ContBuilder/ShortContinuation.java, Analysis/ContBuilder/ShortResultContinuation.java, Analysis/ContBuilder/VoidContinuation.java, Analysis/ContBuilder/VoidResultContinuation.java, Analysis/EnvBuilder/EnvBuilder.java, Analysis/EnvBuilder/EnvCode.java, Analysis/AllCallers.java: Changes Continuation to an interface and modified all the *Continuation files accordingly. First pass of EventDriven code. 1999-11-11 bdemsky * IR/Quads/ReHandler.java: Catches some more cases. I'm going to have to rewrite the TYPECASTing code I believe. 1999-11-11 C. Scott Ananian * ClassFile/HClassSyn.java: Add new (but dangerous) functionality to HClassSyn to help out kkz. * Backend/StrongARM/CodeGen.spec: I'm a dork. Fix a silly assembly-string error in the StrongARM spec file. * Analysis/Quads/SCC/SCCAnalysis.java: Implement bitwidth on OR operators. No particular reason for doing it now, except a vain hope that it will make my SCC results more impressive somehow. 1999-11-11 bdemsky * IR/Quads/Peephole.java: Fixed 1 type information leak. 1999-11-11 C. Scott Ananian * ClassFile/HClass.java: This implements 'isAssignableFrom' "correctly", that is, without cheating by using java.lang.Class.isAssignableFrom, which calls the class initializer which --- in the it-actually-happened-to-Brian worst case --- could do something crazy like launch a thread. Hasn't been tested as much as I would like, but it follows the JLS spec fairly closely, and so "should" be correct. 1999-11-11 bdemsky * Support/Jasminpatch2: Updating second Jasmin patch file * Support/Jasminpatch: Updating our patches * IR/Quads/ReHandler.java: Fix to the last fix...Gotta avoid HClass.Void's. * IR/Quads/ReHandler.java: Bug fix to get pass bytecode verify. Problem: Typecast weren't being inserted for RETURN quads as needed. Fix: They are now. * Support/jasmin.jar: Oops...bug in my jasmin patch. 1999-11-10 bdemsky * IR/Quads/ReHandler.java: Faster, more efficient cleaner. Now the Jasmin backend is reasonably fast...[IE...not much slower than the rest of the compiler] 1999-11-09 pnkfelix * Analysis/Instr/LiveWebs.java: FSK: Eliminating more bugs that I'm catching through FSK: code review...<> GJ, where are you when FSK: I need _real_ static type checking? * Analysis/DataFlow/LiveVars.java, Analysis/Instr/LiveWebs.java: FSK: <> Once again, java's insistence on the call to FSK: super() being the first line comes back and bites us. FSK: FSK: LiveVars's ctor calls an abstract method. FSK: This method IS implemented in LiveWebs, but it relies FSK: on data that is set AFTER the call to the super ctor FSK: in the LiveWebs ctor. FSK: So there was no way the code as written could work. FSK: After attempting a number of hacks to try to fool FSK: java into setting the field before calling the super's FSK: ctor, I finally relented and changed the interface FSK: to LiveVars so that subclasses can, at their own peril, FSK: call a special LiveVars ctor that does nothing so that FSK: they can properly intialize their own data before doing FSK: anything else. However, such subclasses are responsible FSK: for calling initializeBBtoLVI() or else all is doomed. FSK: FSK: Scott, do you know of any more elegant ways around this FSK: problem? Is my design fundamentally flawed? I had never FSK: thought there could be a problem with calling abstract FSK: methods from a ctor but this clearly illustrates FSK: a problem with that practice. * Analysis/DataFlow/LiveVars.java, Analysis/Instr/LiveWebs.java: FSK: Alright...working my way closer to a solution here to FSK: more of the issues I was having... FSK: This version of LiveVariableAnalysis adapted for FSK: Webs should work. (In hindsight, I'm not even sure FSK: what this is going to buy us in terms of this working FSK: with SSI form, but whatever) FSK: I haven't tested it yet, but it makes enough sense in my FSK: head that I'm happy with it. FSK: So *NOW* I can finally make those last edges in FSK: my interference graph * Util/Indexer.java: FSK: Took out overly stringent requirement on use of getID in Indexer FSK: specification, so that one can now check that an Object can FSK: be indexed by a given Indexer (otherwise, it would be very FSK: difficult to implement BitSetFactory in terms of Indexer) FSK: (note: implementing BitSetFactory in terms of Indexer without FSK: carrying around an internal Set or Map may still be impossible, FSK: due to the need to have an inverse mapping of indexes to Objects FSK: for methods like iterator()...so I may be able to be convinced FSK: that getID() should return to its old specification for FSK: efficiency's sake...whaddya think Scott? * Analysis/DataFlow/LiveTemps.java, Analysis/DataFlow/LiveVars.java, Analysis/DataFlow/Solver.java, Analysis/GraphColoring/Graph.java, Analysis/Instr/GraphBuilder.java, Analysis/Instr/LiveWebs.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/Web.java, Main/SAMain.java, Util/Collections/DefaultMultiMap.java, Util/Collections/MultiMap.java, Util/Indexer.java: FSK: Woo boy...should have done this in pieces FSK: 1. Did some reworking of the LiveVars code...tried FSK: to generalize and abstract it a bit so that I could FSK: easily work with Liveness w/ regard to Webs instead FSK: of Temps...not sure it was worth the thought or time. FSK: We'll see. In any case, the class formerly known as LiveVars FSK: has now been split into the abstract LiveVars class and the FSK: concrete LiveTemps class FSK: 2. Worked some more on Register Allocation. Realized that FSK: my GraphBuilder didn't have enough information to properly FSK: generate the interference edges, so I worked on upgrading FSK: the interface to support it (this is what sparked my FSK: reworking of the LiveVars code) FSK: 3. After all this time, finally made a generalized FSK: DataFlow.Solver class. This may be too little, too late, but FSK: I'm trying to simplify simplify simplify. Hopefully I will be FSK: able to go through and replace references to InstrSolver and FSK: QuadSolver with just the generic Solver class FSK: 4. Added the Indexer interface to the Util package. What FSK; a fine specification it is...haven't made the various FSK: factories implement Indexer yet. I suspect that I'll handle FSK: this by implementing some generalized analyses (like LiveVars) FSK: in terms of Indexers and then leave it up to the person FSK: wanting to use that analysis to do the changes. FSK: (or Scott could just write a Perl script to do the changes FSK: automagically C;) ) FSK: 5. Made MultiMap an interface and moved its implementation to FSK: the DefaultMultiMap class...I don't want to put any of FSK: those funny rename tags in here though b/c MultiMap is FSK: still around; it just changed significantly. At some point FSK: I'll make BinomialMap implement MultiMap, and all will be FSK: right with the world again. * Analysis/DataFlow/LiveTemps.java, Analysis/Instr/LiveWebs.java, Util/Collections/DefaultMultiMap.java, Util/Indexer.java: New file. 1999-11-08 bdemsky * IR/Jasmin/Jasmin.java: Debug code removal... * IR/Jasmin/Jasmin.java: Bug in visitor class. * IR/Jasmin/Jasmin.java: Last of stack depth patches. It should work now... For the Event Driven people, I kept a copy of the old Jasmin.java... In case I've included any new bugs. * IR/Jasmin/Jasmin.java: 1st part of calculating stack depth. Jasmin DepthVisitor class. 1999-11-08 pnkfelix * Util/BinomialMap.java: FSK: Realized that BinomialMap breaks the Map interface in FSK: exactly the same way that MultiMap does, so we should FSK: probably make one extend the other. Unfortunately, FSK: the internal rep for BinomialMap is disjoint from FSK: MultiMap's internap rep, so its sort of silly FSK: (perhaps THIS is why all of the Collections API is FSK: defined in terms of interfaces...perhaps I will FSK: change MultiMap into an interface...) 1999-11-07 bdemsky * Util/Util.java: Added method isJasminKeyWord(). It escapes the first character of any strings containing a Jasmin keyword. With this patch, all classes [w/ exception of NT specific class for the reason that I'm not using NT] in volano can be built and executed correctly. There still remains the "mysterious" thread bug. The work around for this bug is to kill java when the compiler is finished. * Support/jasmin.jar: Jasmin patches to support methods, etc named with keyword by escaping them. This patch declares any escaped sequence as not being a keyword. * IR/Jasmin/Jasmin.java: Jasmin needs integer values...not characters. 1999-11-06 bdemsky * Support/jasmin.jar: Jasmin changed to support longer lines...2048 characters instead of 512 characters. Seems that there are 2 PublicKey's in volano of long length...Now all of COM.volano.* compiles...and runs. 1999-11-06 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Fix a bug where register allocator tended to stomp on stack pointer SP. Realized that the same bug could have led to the register allocator 'reusing' the program counter register (r15) for storage of temporary data, which would have had, er, interesting results. Headed that little dogie off at the pass. * Backend/Runtime1/ObjectBuilder.java, Backend/Runtime1/TreeBuilder.java: I'm come to the conclusion that using a negative offset for the hashcode in the object representation (putting the hashcode *before* the object, conceptually) was simply a bad idea, with no reasonable justification. As it makes everything much more complicated to manipulate in C, I've ditched the idea. The hashcode now immediately follows the class pointer. Perhaps it's a tribute to the new Runtime organization that only two files needed to be changed to implement this in FLEX. [The changes in the C runtime are a little more extensive, but still reasonable] * Backend/StrongARM/CodeGen.spec: The .align directive has machine-dependent behavior: on some architectures .align 2 means align to a 2-byte boundary, on others it means "align until the lower two bits are zero" -- ie, on a 4-byte boundary. We mean the former definition; gas is giving us the latter. So use the .balign directive instead which is guaranteed to work the way we want --- across architectures, even. 1999-11-06 kkz * ClassFile/UpdateCodeFactory.java: CodeFactory for adding new code to make Continuations and Environments. * ClassFile/UpdateCodeFactory.java: New file. 1999-11-06 bdemsky * IR/Quads/ReHandler.java: Next set of bugs in ReHandler. HANDLER quads must always be in ArrayList...Have to keep them in order. 1999-11-06 kkz * Analysis/ContBuilder/BooleanContinuation.java, Analysis/ContBuilder/BooleanResultContinuation.java, Analysis/ContBuilder/ByteContinuation.java, Analysis/ContBuilder/ByteResultContinuation.java, Analysis/ContBuilder/CharContinuation.java, Analysis/ContBuilder/CharResultContinuation.java, Analysis/ContBuilder/ContBuilder.java, Analysis/ContBuilder/ContCode.java, Analysis/ContBuilder/ContTemplate.java, Analysis/ContBuilder/Continuation.java, Analysis/ContBuilder/DoubleContinuation.java, Analysis/ContBuilder/DoubleResultContinuation.java, Analysis/ContBuilder/FloatContinuation.java, Analysis/ContBuilder/FloatResultContinuation.java, Analysis/ContBuilder/IntContinuation.java, Analysis/ContBuilder/IntResultContinuation.java, Analysis/ContBuilder/LongContinuation.java, Analysis/ContBuilder/LongResultContinuation.java, Analysis/ContBuilder/ObjectContinuation.java, Analysis/ContBuilder/ObjectResultContinuation.java, Analysis/ContBuilder/ShortContinuation.java, Analysis/ContBuilder/ShortResultContinuation.java, Analysis/ContBuilder/VoidContinuation.java, Analysis/ContBuilder/VoidResultContinuation.java, Analysis/EnvBuilder/EnvBuilder.java, Analysis/EnvBuilder/EnvCode.java, Analysis/EnvBuilder/EnvTemplate.java, Analysis/EnvBuilder/Environment.java: Code for building continuations and environments. First pass. * Analysis/ContBuilder/BooleanContinuation.java, Analysis/ContBuilder/BooleanResultContinuation.java, Analysis/ContBuilder/ByteContinuation.java, Analysis/ContBuilder/ByteResultContinuation.java, Analysis/ContBuilder/CharContinuation.java, Analysis/ContBuilder/CharResultContinuation.java, Analysis/ContBuilder/ContBuilder.java, Analysis/ContBuilder/ContCode.java, Analysis/ContBuilder/ContTemplate.java, Analysis/ContBuilder/Continuation.java, Analysis/ContBuilder/DoubleContinuation.java, Analysis/ContBuilder/DoubleResultContinuation.java, Analysis/ContBuilder/FloatContinuation.java, Analysis/ContBuilder/FloatResultContinuation.java, Analysis/ContBuilder/IntContinuation.java, Analysis/ContBuilder/IntResultContinuation.java, Analysis/ContBuilder/LongContinuation.java, Analysis/ContBuilder/LongResultContinuation.java, Analysis/ContBuilder/ObjectContinuation.java, Analysis/ContBuilder/ObjectResultContinuation.java, Analysis/ContBuilder/ShortContinuation.java, Analysis/ContBuilder/ShortResultContinuation.java, Analysis/ContBuilder/VoidContinuation.java, Analysis/ContBuilder/VoidResultContinuation.java, Analysis/EnvBuilder/EnvBuilder.java, Analysis/EnvBuilder/EnvCode.java, Analysis/EnvBuilder/EnvTemplate.java, Analysis/EnvBuilder/Environment.java: New file. 1999-11-05 bdemsky * IR/Jasmin/Jasmin.java: Fixed bug that, under some circumstances could allow quads protected by HANDLERS to be messed up in Jasmin output. 1999-11-05 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Backquotes and double quotes cause problems in assembly comments even if the datum being output is a short... * Backend/StrongARM/CodeGen.spec: Find and squash some instruction-generation bugs: - 'asr #xx' modifier needs a comma preceding the asr - rsbs and rsc always take three args. - unmatched backquotes cause problems in assembly-language comments. 1999-11-05 pnkfelix * Analysis/Instr/GraphBuilder.java: FSK: Getting rid of an access modifier that caused Jikes FSK: ( versions ~< 0.51 ) to break on this file. 1999-11-05 C. Scott Ananian * GNUmakefile: Have 'make doc' check for .*.java and #*.java files before invoking javadoc. Javadoc dies mysteriously if these files are present, which it is not smart enough to realize are not legit java source files. So now we make things a bit clearer to the user. Also add #* to the ALLSOURCE file filter, in addition to the .*.java that was already present. * Backend/CSAHack/RegAlloc/Code.java: Make debugging weird suffix errors easier. 1999-11-05 pnkfelix * Util/UnmodifiableIterator.java, Util/UnmodifiableListIterator.java: FSK: Fixes to various classes in an effort to get javadoc FSK: happy again * IR/Properties/HasEdges.java, IR/Properties/UseDef.java, Util/Collections/MultiMap.java, Analysis/Instr/GraphBuilder.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/Web.java: FSK: 1. Begun implementation of GraphBuilder, and revised FSK: some of the classes it uses in the GraphColoring package FSK: 2. Reorganized some of the RegAlloc class...am considering FSK: making a RegAlloc package. FSK: 3. Added doc to Collections.MultiMap to make some issues FSK: clearer FSK: 4. With Scott's blessing, made UseDef and HasEdges extend FSK: HCodeElement * Analysis/Instr/GraphBuilder.java, Analysis/Instr/Web.java: New file. * Analysis/GraphColoring/DefaultSparseNode.java, Analysis/GraphColoring/GraphColorer.java, Analysis/GraphColoring/SimpleGraphColorer.java: FSK: 1. Begun implementation of GraphBuilder, and revised FSK: some of the classes it uses in the GraphColoring package FSK: 2. Reorganized some of the RegAlloc class...am considering FSK: making a RegAlloc package. FSK: 3. Added doc to Collections.MultiMap to make some issues FSK: clearer FSK: 4. With Scott's blessing, made UseDef and HasEdges extend FSK: HCodeElement * Analysis/GraphColoring/DefaultSparseNode.java: New file. * Analysis/DataFlow/LiveVars.java: FSK: 1. Begun implementation of GraphBuilder, and revised FSK: some of the classes it uses in the GraphColoring package FSK: 2. Reorganized some of the RegAlloc class...am considering FSK: making a RegAlloc package. FSK: 3. Added doc to Collections.MultiMap to make some issues FSK: clearer FSK: 4. With Scott's blessing, made UseDef and HasEdges extend FSK: HCodeElement 1999-11-05 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Stupid bug that I'd have sworn I'd already fixed at some point in the past. But I probably re-introduced it at some point via cut-and-paste when I reorganized the calling-convention code. 1999-11-05 bdemsky * IR/Quads/ReHandler.java: Fixes for primitive arrays. 1999-11-05 C. Scott Ananian * Analysis/Quads/TypeInfo.java: Document Brian's TypeInfo changes. * Backend/CSAHack/RegAlloc/Spiller.java: New, improved spiller: - deals with spilling two-word temps correctly. - creates new temps to minimize the live ranges in the spill code. * Backend/CSAHack/FlowGraph/AssemFlowGraph.java: Make the hacked flowgraph a little smarter about reporting uses and defs for two-word temps. * Backend/StrongARM/CodeGen.spec: Remind the register allocator that, in instruction sequences like mov `d0l, `s0l mov `d0h, `s0h that `d0l and `s0h can't be the same register. Also, tweak the DATA pattern so that the comment it generates will never have a backquote in it (which the toAssem() method of Instr wants to specially-process). * IR/Assem/Instr.java: Hack around a bug where a trailing backquote will cause a StringIndexOutOfBoundsException in Instr.toString. 1999-11-05 bdemsky * IR/Quads/ReHandler.java: Now passes SSI to the typeInfo...with the low IQ flag set. Builds SSA types uses the lowest common denominator. Takes care of array casts as necessary to pass bytecode verifier. I think that this is everything. * Analysis/Quads/TypeInfo.java: Added new constructor that takes in a boolean. If you set this boolean to true, the typeInfo pass's IQ drops to the same level as a typical bytecode verifier. [IE...It gathers no information from INSTANCEOF's and such. It also avoids errors in AGET's that result when it can't determine that the AGET is on an array.] This is needed for the Jasmin fixes. 1999-11-05 C. Scott Ananian * IR/Assem/Instr.java: Instr.rename() died when targets==null. Fixed. 1999-11-04 C. Scott Ananian * IR/Assem/InstrDIRECTIVE.java, IR/Assem/InstrJUMP.java, IR/Assem/InstrLABEL.java, IR/Assem/InstrMEM.java, IR/Assem/InstrMOVE.java, IR/Assem/Instr.java: Added new methods to IR.Assem.Instr: - Moved the target-label-to-instrs mapping code into layout() and remove(). - Added 'replace()' method which replaces one Instr with another. - Added 'rename()' method which clones a temp with a mapping applied to the use() and def() Temp sets. This is useful, for example, when generating spill code, where you may want to rename the original temp to reduce its live range. IF YOU SUBCLASS INSTR, YOU SHOULD IMPLEMENT RENAME() --- otherwise your subclasses are liable to be turned back into plain instrs if the spill code feels like it. Felix's register allocation code will probably use different spilling code, so it's not certain whether he'll want to/have to rename Instrs or not. But it's handy functionality to have for optimizations on Instrs. * IR/Tree/METHOD.java, IR/Quads/HEADER.java, IR/Quads/METHOD.java, IR/Quads/Quad.java: Javadoc disambiguation. * Backend/Runtime1/AllocationStrategy.java, Backend/Runtime1/DataJavaMain.java, Backend/Runtime1/package.html: javadoc updates. 1999-11-04 bdemsky * IR/Jasmin/Jasmin.java: Get rid of unneccessary goto's in Jasmin output. * IR/Jasmin/Jasmin.java: 1) Handle interfaces w/o superclasses...IE: Don't do a getName on them. 2) Jasmin wants superclass declared for all files. So if an interface doesn't have a superclass, we give it java.lang.Object. 1999-11-04 andyb * Backend/Sparc/CodeGen.spec: Tidied up some bits of CodeGen. Added some interesting versions of emit(), to make the uses of emit in the pattern matching a bit cleaner. 1999-11-04 C. Scott Ananian * Backend/Runtime1/Runtime.java: The Runtime1 startup code needs to create a string array to pass to main(). 1999-11-04 andyb * Backend/Sparc/InstrBuilder.java: Remove outdated, pointless comments now so that they don't come back to haunt us later. * Backend/Sparc/InstrBuilder.java, Backend/Sparc/RegFileInfo.java: Created makeStore and makeLoad in InstrBuilder. Also defined the sets of live-on-exit and caller-saved registers in RegFileInfo (no need to worry about callee-saved registers - it all gets taken care of by the save/restore opcodes on the sparc). This should finish up all the random bits of Sparc-specific infrastructure information. Now for that Code Generator thing. Coming up next time, same CVS time, same CVS channel... 1999-11-04 C. Scott Ananian * IR/Quads/UnHandler.java, IR/Quads/Unreachable.java, Analysis/Quads/Unreachable.java: Moved harpoon.IR.Quads.Unreachable to Analysis.Quads and made it public, as the routine is useful apart from the Unhandler instance where it was originally used --- namely, it is useful in the event-driven compilation stuff, which Karen is working on, and should therefore be visible outside of harpoon.IR.Quads. @RENAME: IR/Quads/Unreachable Analysis/Quads/Unreachable@ * Analysis/Quads/Unreachable.java: New file. * Backend/Runtime1/DataInitializers.java, Backend/Runtime1/DataJavaMain.java: Runtime1 now outputs the static initializer list and the 'main' method as UTF-8 encoded strings, rather than raw function pointers, to be nicer to JNI. This also means that the FLEX start-up routine can now be written in (portable) C instead of (away, beast!) assembler. 1999-11-03 bdemsky * Support/Jasminpatch2: More changes on our fork of the Jasmin source code. Hopefully Jon will be back from his Yoga trip to India in the near future. * Support/Jasminpatch2: New file. * Support/jasmin.jar: Jasmin.jar Adds support for unicode characters. For any fools who might want to use them in method names or something strange like that. Real hackers use methods called \u011e and \u011f Don't you? * Util/Util.java: Added routine to print escape sequences for unprintables...Different from existing routine in that " is unprintable. * IR/Jasmin/Jasmin.java: Jasmin...Not just with ASCII support anymore. Now it supports unicode characters. For when 256 characters is just not enough to name your methods/ strings.... And next, we have jasmin.jar... 1999-11-03 C. Scott Ananian * Backend/Runtime1/Data.java, Backend/Runtime1/DataReflection1.java, Backend/Runtime1/DataReflection2.java: Reorganize to collect common UTF-8 string manipulation code. 1999-11-03 andyb * Backend/Sparc/Code.java, Backend/Sparc/Frame.java, Backend/Sparc/InstrBuilder.java, Backend/Sparc/RegFileInfo.java, Backend/Sparc/TempBuilder.java: Worked some more on the Sparc backend, adding in basic implementations for most of the methods in Code and RegFileInfo. 1999-11-03 C. Scott Ananian * Backend/CSAHack/RegAlloc/Color.java: I don't know how this got switched, but the order is important to keep the assertion in Degree() happy (although it won't affect the result at all). * Analysis/Quads/QuadClassHierarchy.java, Backend/Runtime1/Runtime.java: Finally clean up and commit a patch which has been in my source tree for a while to allow the Runtime to specify specific classes which must be included in the class hierarchy --- usually because they are referenced by name using java reflection (evil, evil). For example, every primitive type wrapper (java.lang.Integer, java.lang.Character, etc) has a static field containing the java.lang.Class object corresponding to that primitive type, which is referenced by name in the static initializer for the wrapper class. Fun, fun, fun. The roots collection you pass into QuadClassHierarchy can now contain HClass objects as well as HMethods to handle these situations. * Backend/CSAHack/RegAlloc/Color.java: Bad Scott. Checked in code that didn't compile. This fixes it. * Backend/CSAHack/RegAlloc/Color.java: Fix a reg-alloc bug originally springing from an 'optimization' in Appel's book that discards adjacency-list information for precolored registers in the interference graph to save space. However, that means that the calculated degree of those precolored nodes is in error; which shouldn't matter, but does, the way the algorithm is as published. The committed changes fix the algorithm so that it never queries for the degree of a precolored node. An alternative fix would be to use some arbitrary large integer for the degree of precolored nodes, but that seems a bit too hackish for my tastes. * Backend/StrongARM/RegFileInfo.java: Make the StrongARM RegFileInfo correct according to the standard calling convention for callee-save and caller-save registers. * Backend/CSAHack/RegAlloc/RegAlloc.java: A little efficiency hack: move the creation of the machine register TempList outside the allocate-spill-allocate loop. * Backend/CSAHack/RegAlloc/Liveness.java: Continuing quest to make register allocation deterministic. 1999-11-03 bdemsky * IR/Quads/Pattern.java, IR/Quads/ReHandler.java: Next round of patchs. Pattern.java patches: Handles the cases where 1) patterns match around other patterns, invaliditing HANDLER's created 2) HANDLER's removed leaving invalid PHI nodes ReHandler.java: Handles case where 1) Cast needed for interfaces 2) Case propagates to PHI node 1999-11-02 andyb * Backend/Sparc/Code.java, Backend/Sparc/Frame.java, Backend/Sparc/InstrBuilder.java, Backend/Sparc/RegFileInfo.java, Backend/Sparc/TempBuilder.java, Backend/Sparc/package.html: Mainly cleaned up some documentation, left more complete notes for myself where things need to be done, and added in all those fun SPARC registers to RegFileInfo. 1999-11-02 pnkfelix * Util/CloneableIterator.java: FSK: Efficiency hack for CloneableIterator: FSK: if we construct a CloneableIterator from another FSK: CloneableIterator, share their internal lists (that's the whole FSK: POINT of this complex CloneIterator, after all) * Analysis/DataFlow/LiveVars.java, Util/Collections/Factories.java, Util/Collections/ListFactory.java, Util/Collections/MultiMap.java, Util/Collections/SetFactory.java, Util/Collections/package.html: FSK: Wow! I'm really happy! Migrating LiveVars over to FSK: the new BitSet rep was so easy with the new BitSetFactory class! FSK: And it actually seems to still work. Hopefully this will FSK: speed up my register allocator since FSK: 1. Creating the LiveVarInfo classes will be much faster (don't FSK: have to construct space-heavy HashSets, just BitSets) FSK: 2. Doing the dataflow analysis should run much faster since FSK: addAll, retainAll, and the other set-operation look-alikes FSK: should be much faster on BitSets. FSK: FSK: Also added a bunch of Javadoc. * Util/Collections/package.html: New file. 1999-11-02 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Ack. I hate screwy architectures. Both of my previous commits were partially wrong, because the sense of the comparison test is *inverted* for half of the comparison operations. So I only got half the tests backwards last time. Of course, none of this is documented anywhere, so I had to mess around with little assembly programs to figure it out. Here's the deal: ___ne*, ___gt*, and ___lt* return the result you'd expect: non-zero for true, zero for false. However, ___eq*, ___ge*, and ___lt* return an *inverted* result: non-zero for false, zero for true. The new, improved spec file should do the right thing, now. One hopes. * Backend/StrongARM/CodeGen.spec: Document a tricky bit. * Backend/StrongARM/CodeGen.spec: Got all these comparisons backwards. Oops. * Backend/StrongARM/CodeGen.spec: The calls to internal functions to implement floating-point arithmetic, etc, are true calls in the sense that they clobber the full set of non-callee-save registers. Update the spec file to reflect this. Also, break up some of the patterns a bit to allow move coalescing to do its thing. * Backend/StrongARM/README: Clarify set of registered clobbered in a call. * Backend/Runtime1/TreeBuilder.java: Fix over-allocation for arrays of small primitive type. * Backend/StrongARM/CodeGen.spec: Misleading example in StrongARM documentation. * Backend/CSAHack/RegAlloc/Color.java: Error in Appel's published invariants for the graph-coloring register-allocation algorithm. I've mailed him the errata. [All the nodes on the "simplify worklist" will not be of degree less than K because the SelectSpill procedure takes a node off the "spill worklist" --- all of which are of degree >= K --- and adds it directly to the "simplify worklist".] 1999-11-02 andyb * Backend/Sparc/CodeGen.spec, Tools/PatMat/MaximalMunchCGG.java: Fixed a small bug in the CGG when outputting code to generate code for a fixed constant value. * Backend/Sparc/CodeGen.spec: Well, the bigger spec file should compile fine now, so there's no reason to .ignore the Backend/Sparc anymore! Since I doubt anyone else was up to see all this, just feel good knowing that everything works (since you never even knew it was broken). * Backend/Sparc/CodeGen.spec: For those of you to lazy to use .ignore - here's a skeleton CodeGen.spec file which will compile, as a placeholder until I get to real one fixed up. (This probably won't actually matter for anyone, but just in case...) 1999-11-02 C. Scott Ananian * GNUmakefile: Two makefile tweaks: 1) remind the makefile that srcdoc/ is not a java package... 2) apply the .ignore patterns to MACHINE_GEN * GNUmakefile: Makefile mods to get Sparc stuff building, to oblige andyb. The rest of you probably don't want to 'make update' until andyb's gotten the SPARC stuff compiling --- this commit breaks the build until that happens. You should be able to add the line Backend/Sparc to Harpoon/Code/.ignore to ignore the broken Sparc stuff, but I'm not sure that will manage to ignore the broken .spec file. So just stick with the old GNUmakefile for a while, eh? 1999-11-02 andyb * Backend/Sparc/.cvsignore, Backend/Sparc/Code.java, Backend/Sparc/CodeGen.spec, Backend/Sparc/Frame.java, Backend/Sparc/InstrBuilder.java, Backend/Sparc/RegFileInfo.java, Backend/Sparc/TempBuilder.java, Backend/Sparc/package.html: ADB: So I'm checking in the skeleton of a Sparc ADB: backend. This doesn't actually implement anything ADB: Sparc-specific - I've got that too, but I'm caught ADB: up on some makefile stuff - I'm hoping that by ADB: checking in a simpler version, the makefile stuff ADB: will be easy for Scott to figure out :). Then I'll ADB: actually be able to make sure the rest of my code ADB: compiles first before checking it in blindly. * Backend/Sparc/.cvsignore, Backend/Sparc/Code.java, Backend/Sparc/Frame.java, Backend/Sparc/InstrBuilder.java, Backend/Sparc/RegFileInfo.java, Backend/Sparc/TempBuilder.java, Backend/Sparc/package.html: New file. 1999-11-02 pnkfelix * Util/Collections/BitSetFactory.java: FSK: Fixed a silly bug in how I was finding the size of the FSK: internal BitString representation. I love these FSK: beautifully identifiable bugs. 1999-11-02 C. Scott Ananian * Main/SAMain.java: extend Felix's "-1" SAMain option hack to allow compiling an arbitrary single class, for testing & debugging purposes. 1999-11-02 pnkfelix * Util/BitString.java, Util/Collections/BitSetFactory.java: FSK: Finally got around to implementing something that I've been FSK: talking about (perhaps since before the summer): an FSK: implementation of java.util.Set that uses Whaley's BitStrings FSK: internally while only exposing the Standard Java Collections API FSK: Set interface to the user. I'm going to test this, and assuming FSK: it works, integrate it with my DataFlow analysis classes so that FSK: they can simulataneously be efficient AND understandable. (Right FSK: now they are merely understandable, (and even that is debatable)) * Util/Collections/BitSetFactory.java: New file. 1999-11-02 C. Scott Ananian * Backend/CSAHack/RegAlloc/Color.java: Update register allocator to match current edition of Appel's bug, hopefully fixing a bug I probably introduced when I tried to make an earlier published version of the algorithm work. The register allocator seems to satisfy all its invariant assertions now (several more of which I've added with this commit), so that's promising. 1999-11-01 bdemsky * IR/Quads/Pattern.java, IR/Quads/ReHandler.java: First set of patches to get the volano benchmark evilness to work. Obfuscation is evil business... [These diffs are to deal with legal but messy bytecode]. First change: Handle case that PHI appears immediately after CALL in pattern match for CALLs... This bug is one that slipped through when we changed the call syntax... Second change: Get rid of extra HANDLER quads in patternmatch. They exist because a handler is generated for a pattern, then a pattern matches around that pattern removing the original quad, but leaving the HANDLER. Fix: Grab code to determine whether quads are reachable... Quads that are never executed can't throw exceptions...or at least no one will handle them. 1999-11-01 C. Scott Ananian * Analysis/Quads/QuadClassHierarchy.java: Static methods are not the only non-virtual methds. * Backend/Runtime1/TreeBuilder.java, homeBackend/Runtime1/DataClaz.java: Off-by-one error when constructing class display table. If the maximum depth is 0, we need *1* entry in the table (not zero!). Maximum depth 1 means we have an entry at depth 0 and another at depth 1 and thus need a table of size *2*. Subtle bug that only showed up when attempting to execute virtual methods of the deepest classes in the hierarchy. * Backend/Runtime1/StubCode.java: Forgot to add in the 'this' parameter for the JNI stubs for non-static methods. Oops. * ClassFile/HClass.java: Added a catch block to make ClassFormatErrors caused by nasty obfuscated code a little easier to diagnose. * Backend/CSAHack/FlowGraph/AssemFlowGraph.java: Make register allocation (graph coloring) repeatable. * Backend/Analysis/ClassFieldMap.java, Backend/Generic/Runtime.java, Backend/Runtime1/TreeBuilder.java, IR/Tree/ToTree.java: Add support for aligning object fields. StrongARM requires this: word-wide fields must be aligned on a word boundary. Added fieldAlignment method to Backend/Analysis/ClassFieldMap to make alignment support flexible. Added code to initialize fields of a newly created object to zero. It's turned on by a boolean in TreeBuilder.objectNew, so when we eventually optimize away unnecessary initializations we can set the boolean to 'false' in ToTree. 1999-10-31 C. Scott Ananian * IR/Tree/ToCanonicalTree.java: Fix a bug in the canonicalization of MOVEs. (was turning stores into loads!) * Backend/Runtime1/TreeBuilder.java: Scott can't count. Fix the TreeBuilder implementation of arrayNew to include space in the array allocation for the length field. * Backend/StrongARM/CodeGen.spec: Update CodeGen.spec to generate stabs debugging information for each method during procFixup. This makes gdb'ing the FLEX output much nicer. * IR/Tree/ToTree.java: Reimplement Tree translation of Quad ANEW operator, to squash some bugs. This new implementation could use a bit of tweaking; in particular, the induction variables should use addition rather than multiplication to advance (standard loop induction variable strength reduction optimization). * IR/Tree/ToCanonicalTree.java: Fix Tree-typing error in ToCanonicalTree. * IR/Tree/ESEQ.java: Fix javadoc typo -- gotta escape those greater-than and less-than signs. * IR/Assem/Instr.java: Somebody forgot to initialize the source source_line field in the constructor for IR.Assem.Instr, with the result that line number information was being lost. One-line addition fixes the problem. 1999-10-30 C. Scott Ananian * ClassFile/HClassSyn.java: Fix a bug that Karen found where HClassSyns were not properly tagging their constructors as HConstructorSyns. All better now. * ClassFile/HConstructorSyn.java: Update HConstructorSyn to have a full set of constructor methods (parallel to those in HMethodSyn). Also changed the superclass of HConstructorSyn to HConstructor (instead of HMethodSyn). I'd really like multiple inheritance here, but using HConstructor as a parent seems less painful than making HMethodSyn the constructor (which means that other code would mistake HConstructorSyns for non-constructor HMethods). If this proves too painful in practice, then I might investigate making HConstructor an interface... thinking hard about the implications of that. * ClassFile/HMethodSyn.java: Make makeDescriptor() method non-private so that other stuff in this package can use it. 1999-10-28 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Fix two bugs with strongARM calling convention: 1) off-by-one error in METHOD pattern, where we were using 'i' instead of 'loc'. ('i' is offset by one to accomodate the phantom exceptional return address parameter). 2) emitCallPrologue was pushing arguments onto the stack in the wrong order, resulting in hopeless confusion --- for those methods with more than 5 arguments. We now output the argument list in reverse order, which pushes things onto the stack correctly. 1999-10-28 kkz * Analysis/Quads/QuadLiveness.java: Implemented live analysis of variables for quad-no-ssa form. Added interface for general live variable analysis. * Analysis/Quads/QuadLiveness.java: New file. * Analysis/Liveness.java: Implemented live analysis of variables for quad-no-ssa form. Added interface for general live variable analysis. * Analysis/Liveness.java: New file. 1999-10-28 C. Scott Ananian * Analysis/Quads/QuadClassHierarchy.java: "Methods pending instantiation" doesn't mean anything for interface methods (since interfaces can never be directly instantiated). So always add called interface methods to the callableMethods set. * homeBackend/Runtime1/DataClaz.java: Interface methods may not be callable in all objects --- usually because a certain object type is never instantiated. Fixup interface dispatch table to omit uncallable methods. * Backend/Runtime1/DataReflection2.java: Output correct offsets for instance fields/methods in JNI reflection tables. 1999-10-27 C. Scott Ananian * Main/SAMain.java: Use extensible list of class hierarchy roots. The interface is decidedly non-ideal at the moment, but maybe I'll figure out a better way to fit the pieces together later. * Backend/Runtime1/Runtime.java: Add a method to return a list of all the methods callable by the runtime, to ensure that they are included in the class hierarchy. * Analysis/Quads/QuadClassHierarchy.java: Allow roots of the class hierarchy to be non-static, and do the expected thing (if non-static & a root, then the object must exist). 1999-10-26 pnkfelix * Util/Collections/MultiMap.java, Analysis/Instr/RegAlloc.java: FSK: 1. Working more on debugging RegAlloc. Found a SUBTLE FSK: bug in my merge method (you *MUST* get the order FSK: of 'from' and 'to' correct, or everything will go bust.) FSK: 2. Also added a MultiMap.Factory inner class, demonstrating FSK: our sensible convention of making the Factory for FSK: a given Collection class a static inner class of that FSK: class. Leads to modular code *AND* readable syntax, FSK: amazingly enough 1999-10-26 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Make it a little easier to debug FLEX's output... * Backend/Runtime1/StubCode.java: Fix missing parameter to runtime FNI_DeleteLocalRefsUpTo function. This was the bug causing 'Hello World' to segfault. There was much rejoicing... 1999-10-26 pnkfelix * Util/Collections/MultiMap.java, Analysis/Instr/RegAlloc.java, Util/FilterIterator.java: FSK: 1. Further working on debugging Register Allocation FSK: 2. Updated doc for FilterIterator (noted what default Filter FSK: implementation was, perfect for subclassing) FSK: 3. Made MultiMap.keySet() not return keys that map to FSK: nullset. However, it does not propery implement FSK: the map interface, since the Sets returned will FSK: not be automatically updated as changes in the FSK: map occur. Perhaps I should do that... 1999-10-26 andyb * Backend/StrongARM/ExpValue.java: (Look ma, I'm checking into Flex's CVS. Happy now Martin? :) ExpValue is now obsolete, it was my original method for doing what TwoWordTemp/TempBuilder/TempVisitor's now do. Just trying to clean up some clutter. If anyone misses it, you can always re-add it. 1999-10-26 C. Scott Ananian * Backend/Runtime1/StubCode.java: I'm a dork. Symbols need a leading underscore to be C-visible. * Analysis/Quads/QuadClassHierarchy.java: We have to be moew conservative with native methods in QuadClassHierarchy. * Backend/Runtime1/StubCode.java: Finish implementation of StubCode by mangling JNI method names in the JNI-specified manner (including abbreviating non-overloaded method names). 1999-10-26 pnkfelix * Analysis/BasicBlock.java, Analysis/Instr/RegAlloc.java, Main/SAMain.java, Util/Collections/MultiMap.java: FSK: 1. Added a default ctor to MultiMap (but be better than that; FSK: customize your instances with Factories that work for *you* FSK: C;) ) FSK: 2. Made BasicBlock Iterator return basicBlocks in a saner order FSK: (This is not a guarantee of the spec for basicBlockIterator, FSK: (ie, don't rely on this holding in future) it just makes FSK: reading over debugging output much easier for me) FSK: 3. Made miniscule changes to SAMain. FSK: 4. Started shifting RegAlloc over to use MultiMap 1999-10-25 pnkfelix * Backend/Generic/CodeGen.java, Backend/StrongARM/CodeGen.spec, Support/NullCodeGen.template, Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/MaximalMunchCGG.java: FSK: crazy crazy changes (TEMP BUILDER) FSK: FSK: I finally sat down and implemented the thing I've been FSK: promising for a ridiculous amount of time (sorry to FSK: andy, scott, and martin for taking so long. IHTFP) FSK: FSK: At this point, the CGG inserts calls to TempBuilder.makeTemp() FSK: for each EXP. Unfortunately, it doesn't "do the right thing" FSK: for all EXPs, (like TEMPs) so instead of removing those FSK: calls to makeTemp() in the Spec-file, I've modified them FSK: to not declare the Temp a second time. And yes, the word FSK: "Temp" appeared *way* too many times in that last sentence. FSK: FSK: Anyway, as with any change to the CodeGeneratorGenerator, FSK: your mileage may vary. If you can't get the system to FSK: build the first time, try a second time. If it fails FSK: the second, tell me and Scott so we can work on updating FSK: the Makefile to be smarter about dependencies between the FSK: files. FSK: FSK: that said, I think it should work alright. 1999-10-25 C. Scott Ananian * Main/SAMain.java, Backend/Generic/Runtime.java, Backend/Runtime1/Runtime.java, Backend/Runtime1/StubCode.java: Add a callback to Generic.Runtime to allow the runtime system to install stubs for native methods. Updated Main.SAMain to use this callback. Added code to Backend.Runtime1 to generate proper callbacks (via the StubCode class) for JNI-compatibility in the current runtime system. * Backend/Runtime1/StubCode.java: New file. * IR/Tree/TreeCode.java: We want to extend TreeCode from outside the harpoon.IR.Tree package, so change the powerful constructor's access flags from private to protected. * IR/Tree/NATIVECALL.java, IR/Tree/Print.java: Some lingering bugs from the great CALL reform fixed: - NATIVECALL's 'retval' param should be zero for void return types. Fix Tree.Print to handle this properly, and fix NATIVECALL.build so that the tree gets rebuild correctly during canonicalization. * Backend/StrongARM/CodeGen.spec: Some bugfixes for the StrongARM spec file: 1) emitMOVE doesn't work properly when the temps are long. Most emitMOVEs already conform to this constraint; a couple I added when I redid the calling convention code did not. Fixed this. 2) There was an emit that needed to be an emit2 in NATIVECALL. Fixed. * Backend/CSAHack/RegAlloc/Color.java: Debugging aid. 1999-10-23 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Fix exception-handling in the StrongARM spec file (exceptions are now moved properly from r0 to retex before the handler starts). More jumps than I would like to see, but hopefully a later jump-removal step will make this (and other bits of the output) look nice again. * IR/Tree/CALL.java, IR/Tree/INVOCATION.java, IR/Tree/NATIVECALL.java: Documentation update for Tree-form CALLs. * Backend/StrongARM/CodeGen.spec, IR/LowQuad/PCALL.java, IR/LowQuad/Translate.java, IR/Quads/CALL.java, IR/Quads/ReHandler.java, IR/Quads/SSIRename.java, IR/Quads/ToNoSSA.java, IR/Quads/Translate.java, IR/Quads/UnHandler.java, IR/Tree/CALL.java, IR/Tree/Code.java, IR/Tree/INVOCATION.java, IR/Tree/NATIVECALL.java, IR/Tree/Print.java, IR/Tree/ToTree.java, Interpret/Tree/Method.java, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java, Analysis/ToSSA.java: Lots of CALL changes: 1) added isTailCall boolean to Quad/LowQuad/Tree form to allow (eventual) support for efficient tail calling. 2) added isVirtual boolean to LowQuad.PCALL to account for the fact that virtual invocations need an extra indirection. 3) Normalized Tree.CALL to match Quad/LowQuad; i.e. separate Temps given for return value and return exception. Also enforced constraint that retval and retex are TEMPs and handler is NAME. 4) Changed semantics of Tree.CALL retval field: instead of specifying a bogus Temp when the CALL is to a method with void return type, we specify that retval should equal 'null' in this case. [changes to retval apply to Tree.INVOCATION --- and thus Tree.NATIVECALL as well] 5) Modified CGG tool to deal with #3 and #4: retval, retex, and handler are now crunched by the CG into Temp/Temp/Label, so that you no longer need to write CALL(TEMP(retval), TEMP(retex), ..., NAME(handler)) -- CALL(retval, retex, ... , handler) will do. Virtual method invocations now work in the compiler output. Tail call support is not yet implemented in the StrongARM instruction- specification file (but it would not be hard to do). Exception handling is still broken, as the instruction-selection phase for StrongARM does not yet put the exception in the proper temp when it is thrown. 1999-10-22 C. Scott Ananian * Backend/Runtime1/TreeBuilder.java, homeBackend/Runtime1/DataClaz.java: Add object size to claz structure information. * Backend/StrongARM/package.html: Give credit where credit is due. * Temp/package.html: steal credit where credit is due. ;-) 1999-10-22 pnkfelix * Backend/StrongARM/TempBuilder.java, Backend/StrongARM/package.html, Temp/package.html: FSK: Adding files that were accidentally left out * Backend/StrongARM/TempBuilder.java, Backend/StrongARM/package.html, Temp/package.html: New file. 1999-10-21 pnkfelix * Analysis/DataFlow/BackwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/ForwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/InstrSolver.java, Analysis/Instr/RegAlloc.java, Backend/Generic/Frame.java, Backend/Generic/TempBuilder.java, Backend/StrongARM/Frame.java, IR/Assem/InstrJUMP.java, Interpret/Tree/DefaultFrame.java, Main/SAMain.java: FSK: Putting in my changes involving issues of register alloction and FSK: code generation, which while not finished, shouldn't affect FSK: Scott's work. * Backend/Generic/TempBuilder.java: New file. * Analysis/BasicBlock.java: FSK: Putting in my changes involving issues of register alloction and FSK: code generation, which while not finished, shouldn't affect FSK: Scott's work. 1999-10-21 C. Scott Ananian * Backend/Runtime1/DataReflection2.java: Added method argument size information to runtime reflection/lookup tables. * Backend/Runtime1/TreeBuilder.java: fix one-character bug in Runtime1/TreeBuilder. Object creation and static field access/method invocation now work. *Virtual* field access/method invocation are broken, because of a Scott-thinko in LowQuad form: basically virtual methods require an extra indirection that LowQuad can't currently express. Actually, virtual fields might just work as is. Anyhow, I'll go away and think about this some (also, think about how I want to handle exceptional return values in Tree form, another thinko) and eventually fix it. * Backend/StrongARM/CodeGen.spec: Make note about current bug in CALL instructions, probably likely to manifest itself only under high register pressure. Optimize away stack size re-adjustment in callEpilogue in the case that no adjustment is needed. Add patterns for add of register and 8-bit immediate. Lots of these patterns are needed, for every instruction which takes an operand2, but I think this is a job for a code generator generator generator. [or is it a code generator specification generator?] * Temp/TempList.java: debugging aid. 1999-10-20 C. Scott Ananian * Backend/CSAHack/RegAlloc/Code.java, Backend/CSAHack/RegAlloc/Color.java, Backend/CSAHack/RegAlloc/RegWork.java: Last of the tweaks needed to make the evil register allocator compile cleanly. * Backend/CSAHack/RegAlloc/Code.java: New file. * Main/SAMain.java: Tweaks to the hack-known-as-SAMain to make it even hackier. Now supports the evil evil register allocator. Which, however, works quite well on StrongARM. * Backend/CSAHack/Graph/Graph.java, Backend/CSAHack/Graph/Node.java, Backend/CSAHack/Graph/NodeList.java, Backend/CSAHack/RegAlloc/Color.java, Backend/CSAHack/RegAlloc/InterferenceGraph.java, Backend/CSAHack/RegAlloc/Liveness.java, Backend/CSAHack/RegAlloc/MoveList.java, Backend/CSAHack/RegAlloc/RegAlloc.java, Backend/CSAHack/RegAlloc/RegWork.java, Backend/CSAHack/RegAlloc/Set.java, Backend/CSAHack/RegAlloc/Spiller.java, Backend/CSAHack/FlowGraph/AssemFlowGraph.java, Backend/CSAHack/FlowGraph/FlowGraph.java: Evil evil register allocation hack. This commit will make this code compile & work with FLEX. * Backend/CSAHack/FlowGraph/AssemFlowGraph.java, Backend/CSAHack/FlowGraph/FlowGraph.java, Backend/CSAHack/Graph/Graph.java, Backend/CSAHack/Graph/Node.java, Backend/CSAHack/Graph/NodeList.java, Backend/CSAHack/RegAlloc/Color.java, Backend/CSAHack/RegAlloc/InterferenceGraph.java, Backend/CSAHack/RegAlloc/Liveness.java, Backend/CSAHack/RegAlloc/MoveList.java, Backend/CSAHack/RegAlloc/RegAlloc.java, Backend/CSAHack/RegAlloc/RegWork.java, Backend/CSAHack/RegAlloc/Set.java, Backend/CSAHack/RegAlloc/Spiller.java: Committing my evil evil register allocation hacks to the repository so folks can look at them / use them until we get rid of them. This check-in is the original source I wrote for Appel's class. It follows the APIs in his book, and so it might be more useful reference if you're trying to figure out how his book structures register allocation. It won't compile. The next commit will be the nasty evil changes which make this existing code work with FLEX. So hold off on the 'make update' for a couple secs, ok? * Backend/CSAHack/FlowGraph/AssemFlowGraph.java, Backend/CSAHack/FlowGraph/FlowGraph.java, Backend/CSAHack/Graph/Graph.java, Backend/CSAHack/Graph/Node.java, Backend/CSAHack/Graph/NodeList.java, Backend/CSAHack/RegAlloc/Color.java, Backend/CSAHack/RegAlloc/InterferenceGraph.java, Backend/CSAHack/RegAlloc/Liveness.java, Backend/CSAHack/RegAlloc/MoveList.java, Backend/CSAHack/RegAlloc/RegAlloc.java, Backend/CSAHack/RegAlloc/RegWork.java, Backend/CSAHack/RegAlloc/Set.java, Backend/CSAHack/RegAlloc/Spiller.java: New file. * Backend/StrongARM/CodeGen.spec: Fixin' typos. * Backend/StrongARM/CodeGen.spec: A better way to enforce the 'mul' instruction register constraint. No register allocator magic required. * Backend/StrongARM/CodeGen.spec: Instruction constraints: 1) ldm/stm need to have their parameters in sorted ascending order, or the assembler complains mightily. 2) the 'mul' instruction cannot use the same register for its source and destination. Felix, can you think about the Right Way to tell the register allocator these kinds of constraints? * Backend/StrongARM/Code.java, Backend/StrongARM/Frame.java, Support/NullCodeGen.template, Backend/Generic/CodeGen.java, Backend/Generic/Frame.java: Add a hook to CodeGen to fixup the procedure entry/exit points after the register allocation is done (and thus the proper set of registers the callee must save is known). Removed a lot of cruft in StrongARM.Frame that was intended to do these tasks, piecemeal and poorly. The procedure in StrongARM/CodeGen.spec to implement this stuff was checked in a few minutes ago. My hacked register allocator now supports this interface; I'll look at the Proper Register Allocation interface and see if I can insert the proper call there, too. Felix, you might have to give me a hand with this --- I just need to know how to find out which (colored) registers are used in the method. * Tools/PatMat/MaximalMunchCGG.java: METHOD should give the spec file action an array of Temps for the parameter list, not an array of TEMPs. * IR/Assem/Instr.java: Enforce unmodifiability of collections returned by useC() and defC(). * Backend/StrongARM/RegFileInfo.java: documentation bug. * Backend/Generic/Code.java: bug was causing trailing ']'s in `s0 type register template patterns to get swallowed up as a suffix. New rule is that only an alphanumeric string after the backquote is considered part of the register pattern. * Backend/StrongARM/CodeGen.spec: Silly bug was making all the MOVEs turn bogus. Felix, when you design the auto-magic TempBuilder hooks, make sure that TEMPs in patterns get properly munged, too? * Backend/StrongARM/CodeGen.spec: Fixup the StrongARM .spec file so that METHOD, RETURN, and THROW do the right thing. METHOD properly moves the method arguments into registers. METHOD, RETURN, and THROW all put stub InstrENTRY/InstrEXIT instructions in the stream, so that CodeGen.procFixup can find these and fix them up with the proper set of registers saved/restored after register allocation. * Backend/StrongARM/README: fix some more typos in the strongarm calling convention documentation. 1999-10-20 pnkfelix * Util/Collections/MultiMap.java: FSK: Javadoc fix. 1999-10-20 C. Scott Ananian * Support/sunthunk.jar: New sunthunk.jar with hacked versions of java/util/Hashtable, java/lang/Object, and java/util/Collections to remove dependencies on java.lang.FloatingDecimal (et al), java.lang.Integer, and java.util.Random, respectively. Result is a much more minimal 'Hello world'. * Backend/Runtime1/DataInitializers.java, Backend/Runtime1/DataInterfaceList.java, Backend/Runtime1/DataJavaMain.java, Backend/Runtime1/DataReflection1.java, Backend/Runtime1/DataReflection2.java, Backend/Runtime1/DataStaticFields.java, Backend/Runtime1/ObjectBuilder.java, homeBackend/Runtime1/DataClaz.java: Add ALIGN tree statements to proper places in Runtime1 data tables. The C code in the runtime is much happier now, thanks for asking... 1999-10-20 pnkfelix * Util/Collections/MultiMap.java: FSK: Added methods to MultiMap to make it more useful FSK: than a standard Map...woo woo! 1999-10-20 C. Scott Ananian * Tools/PatMat/MaximalMunchCGG.java: Silly bug. 1999-10-20 pnkfelix * Util/Collections/CollectionFactory.java, Util/Collections/Factories.java, Util/Collections/ListFactory.java, Util/Collections/MapFactory.java, Util/Collections/MultiMap.java, Util/Collections/SetFactory.java: FSK: Brand new package, Harpoon.Util.Collections, which adds the FSK: things that we think make the Collections API *that* much more FSK: interesting. And if you ask me what "*that*" is, I'll just have FSK: to direct you to the nearest edition of a Redmeat book. FSK: The only significant piece of this for most of us is the MultiMap FSK: class, which is (as readers of the STL will remember) a Map that FSK: maps Keys to multiple Values. Making this work while trying to FSK: maintain some semblance of the Map interface wasn't simple, FSK: and I still am uneasy about whether Babarbarella Liskov would FSK: approve of this extension of the Map Type, but either way its a FSK: pretty cool hack; and more importantly, this code *was* being FSK: implemented at least three times (in different places) so that FSK: justifies having a common implementation. FSK: For the long term, though, these Factories could really steal the FSK: show; clever use of these leads to some very interesting FSK: results... * Util/Collections/CollectionFactory.java, Util/Collections/Factories.java, Util/Collections/ListFactory.java, Util/Collections/MapFactory.java, Util/Collections/MultiMap.java, Util/Collections/SetFactory.java: New file. 1999-10-20 C. Scott Ananian * Backend/StrongARM/README: Document what I've discovered about the wonders of non-word-aligned addressing on the ARM architecture. 1999-10-19 kkz * Analysis/AllCallers.java: Added more meaningful comments. * Analysis/AllCallers.java: New file. * Analysis/AllCallers.java: Working code for event-driven project: calculates transitive closure of the dual of the call graph. 1999-10-19 C. Scott Ananian * Tools/PatMat/MaximalMunchCGG.java: Missed in the merge... * IR/Tree/ALIGN.java: Moving from magic-2-new-runtime, which was the wrong branch... @MERGE: magic-2-new-runtime@ * IR/Tree/ALIGN.java: Ack! Added this guy on wrong branch. Removing and trying again... * Backend/StrongARM/CodeGen.spec, IR/Tree/ALIGN.java, IR/Tree/Print.java, IR/Tree/TreeKind.java, IR/Tree/TreeVisitor.java, Tools/PatMat/Lexer.jlex, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java: Added ALIGN tree statement. Updated the CodeGenerator & etc to Do The Right Thing. Nothing makes these, yet, but everything should handle them correctly when they are made (by a Runtime). I know we hadn't formally agreed that this was The Way to add this functionality, but it seemed cleanest to me. Talk to me at group meeting if you've got good reasons why it should be done some other way. * IR/Tree/ALIGN.java: New file. * IR/Tree/ESEQ.java, IR/Tree/EXP.java, IR/Tree/Exp.java, IR/Tree/INVOCATION.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/METHOD.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/NATIVECALL.java, IR/Tree/OPER.java, IR/Tree/Print.java, IR/Tree/RETURN.java, IR/Tree/SEGMENT.java, IR/Tree/SEQ.java, IR/Tree/Stm.java, IR/Tree/TEMP.java, IR/Tree/THROW.java, IR/Tree/ToCanonicalTree.java, IR/Tree/Tree.java, IR/Tree/UNOP.java, Interpret/Tree/Method.java, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Spec.java, IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/Code.java, IR/Tree/DATA.java, Analysis/Tree/TreeStructure.java: Doh! Committed changed on wrong branch --- my laptop still had the sources checked out from magic-2-new-runtime. Fixing with this commit. Also discovered that I'd skipped Interpret/Tree/Method.java in doing the global Tree.visit() -> Tree.accept() renaming. @MERGE: magic-2-new-runtime@ * Analysis/Tree/TreeStructure.java, IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/Code.java, IR/Tree/DATA.java, IR/Tree/ESEQ.java, IR/Tree/EXP.java, IR/Tree/INVOCATION.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/METHOD.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/NATIVECALL.java, IR/Tree/OPER.java, IR/Tree/Print.java, IR/Tree/RETURN.java, IR/Tree/SEGMENT.java, IR/Tree/SEQ.java, IR/Tree/TEMP.java, IR/Tree/THROW.java, IR/Tree/ToCanonicalTree.java, IR/Tree/Tree.java, IR/Tree/UNOP.java, Tools/PatMat/MaximalMunchCGG.java: Globally rename Tree.visit(v) to Tree.accept(v), which is the proper name for that part of a Visitor pattern. * Tools/PatMat/Spec.java: Fix some unsafe coding-style by forcing subclasses to override & implement the generic base class' accept method. * IR/Tree/Exp.java, IR/Tree/METHOD.java, IR/Tree/SEGMENT.java, IR/Tree/SEQ.java, IR/Tree/Stm.java: Use Collections.EMPTY_SET instead of creating lots of new empty HashSets. * IR/Tree/Tree.java: Imrpove efficiency of UseDef interface on IR/Tree by: 1) not converting through an array to get to defC and useC 2) not forcing toArray to use java reflection to make an array of the proper size. 1999-10-17 C. Scott Ananian * Backend/Maps/DefaultNameMap.java: Rename our method labels in the runtime so that they don't conflict with the JNI native methods, which use a different calling convention. * Analysis/Quads/QuadClassHierarchy.java: Two bug fixes for QuadClassHierarchy: 1) make sure we have the class of an instanceof test included in the hierarchy. [fixed] 2) methods we're being transferred from the pending list properly when an instantiation of a class was discovered, so some methods were being improperly skipped. [fixed] 1999-10-16 C. Scott Ananian * Backend/Runtime1/DataReflection2.java, Backend/Runtime1/Runtime.java: Implemented the class information structure generation code. This should be the last of the runtime data tables needed. 1999-10-16 pnkfelix * Analysis/Instr/RegAlloc.java, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/DataFlow/ReachingDefInfo.java, Analysis/DataFlow/ReachingDefs.java: FSK: Worked on the stack alloc stuff in RegAlloc, and in FSK: the process had a lot of problems working with FSK: whaley's version of ReachingDefs, at least for my purposes. FSK: so I'm building a specialized web builder within the FSK: RegAlloc class...hopefully it will be done soon and FSK: I'll be able to quickly adapt it into the Graph Coloring FSK: system (you'll note that my webs are colorable nodes, so FSK: I *am* thinking about this stuff ahead of time...) 1999-10-16 C. Scott Ananian * Backend/Maps/NameMap.java: Add two more convenience methods to the NameMap superclass. * ClassFile/HMember.java: Add getDescriptor() to the HMember interface, as it is valid for both HMethods and HFields. * Backend/Runtime1/DataReflection1.java, Backend/Runtime1/DataReflection2.java, Backend/Runtime1/Runtime.java, homeBackend/Runtime1/DataClaz.java: Add reflection tables needed for the Java Native Interface (JNI). Also support java language reflection. * Backend/Runtime1/DataReflection1.java, Backend/Runtime1/DataReflection2.java: New file. * Backend/StrongARM/CodeGen.spec: Make strings more readable in assembly output. * IR/Tree/SEGMENT.java, Tools/PatMat/Parser.cup, Backend/StrongARM/CodeGen.spec: Rename the REFLECTION_PTRS section to REFLECTION_OBJECTS. Add support to Backend/StrongARM/CodeGen.spec for both reflection segments. * Backend/StrongARM/CodeGen.spec: Munged CALL and NATIVECALL patterns a bit, to more efficiently call functions whose name is known. This required splitting up the work of creating a set of call instrs into some helper methods, to keep from adding lots of redundant code. Also tweaked the THROW pattern to correspond to the way the runtime _lookup function is now implemented, and what registers it clobbers. Removed the crufty old unused param0 stuff. Added 'LR' to the destination temp set for all instructions which use 'bl' to call runtime subroutines, reflecting the fact that the link register will be clobbered by the call. * Backend/StrongARM/README: Whoops. Sign error --- stack grows *down*, Scott. * Backend/StrongARM/README: Added lots of nit-picking detail on how gcc's calling convention actually works. Most of this is callee-save procedures, which we're not in any way obligated to match; but some of the details make sense --- or at least raise issues that are worth thinking about, as we craft our register allocator / stack allocator. Basically, there is an additional level to register allocation that we hadn't thought about: using registers r4 and higher entails a load/store penalty on procedure entry/exit. So, if at all possible we want to use only r0-r3. If we can't register allocate in just r0-r3 we allocate in the smallest number of registers possible to minimize procedure call overhead. If we can't allocate in the full register set, *then* we start inserting spill code. [this differs from standard register allocation, where it is assumed that we may use the entire register set with no cost] 1999-10-15 C. Scott Ananian * Analysis/Quads/QuadClassHierarchy.java: Fix two buglets in the class hierarchy: 1) field accesses should add the declaring class of the field to the classes() set (but not instantiated, so not in the instatiatedClasses() set and thus not relevant for computing possible virtual method targets). 2) Array inheritance is odd; let the class hierarchy know about this. Still one lurking bug: the class hierarchy for 'hello world' doesn't include the PrintStream.newLine() method, although it is definitely invoked. Still tracking this one down... * homeBackend/Runtime1/DataClaz.java: The claz structure should work for primitive types, too. * Util/Util.java: The repeatString() method breaks if the repeatCount is less than zero, so add an assertion protecting that case. * Backend/StrongARM/CodeGen.spec: Implement some missing CodeGen patterns, discovered once the CGG was modified to actually tell the user about missing Stm patterns. Basically, some SEGMENT types were missing, as well as stores of longs and doubles --- MOVE(MEM, e) --- and double constants in tables, DATA(CONST(e)). * Tools/PatMat/MaximalMunchCGG.java: Make CodeGen die when it fails to match a Tree.Stm, instead of silently omitting it from the output. * Main/SAMain.java, Backend/Runtime1/DataJavaMain.java, Backend/Runtime1/Runtime.java, Backend/StrongARM/Frame.java, Interpret/Tree/DefaultFrame.java, Interpret/Tree/TestRun.java: Added main method argument to Runtime (and thus, Frame) constructor, so that Backend.Runtime1 can communicate this information (where to begin execution) to the native runtime system. * Backend/Runtime1/DataJavaMain.java: New file. 1999-10-14 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Call instr should *not* be an InstrMOVE! Also, added a 'target' label to the java call, so that the exception handler doesn't get dropped as unreachable. * Analysis/Quads/QuadClassHierarchy.java: Make sure String.intern() is included in the class hierarchy whenever there's a string constant in the code. 1999-10-14 pnkfelix * Analysis/Instr/RegAlloc.java: FSK: Switched the allocator back to brain dead in the repository FSK: version. I need to decide between either getting LocalCff FSK: working, or making the resolveOutstandingTemps() be smarter (ie FSK: make it use Graph Coloring to allocate stack slots). I think FSK: the second option would be better since it is generalizable to FSK: ALL local allocation strategies, and I think it actually will cut FSK: down on the problem of the limited stack offset space. but I FSK: can't do either now; gotta go home and clean in preparation for FSK: my parents' visit. 1999-10-14 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Single-character bug-fix. 1999-10-14 pnkfelix * Backend/StrongARM/Frame.java, Backend/StrongARM/RegFileInfo.java, Tools/PatMat/Spec.java, Analysis/Instr/RegAlloc.java: FSK: made fixes so that the compiler runs again. basically FSK: there were some dependencies that I wasn't aware of FSK: so some operations needed reordering. 1999-10-14 C. Scott Ananian * Main/SAMain.java: Optimize run-time of SAMain a bit by: 1) adding buffers to input and output streams. 2) only flushing when it does some good. 3) liberally sprinking CachingCodeFactories around. 1999-10-14 pnkfelix * Backend/StrongARM/CodeGen.spec, Backend/StrongARM/Frame.java, Backend/StrongARM/RegFileInfo.java, Backend/Generic/RegFileInfo.java: FSK: Switched to a non-static rep. in StrongArm.RegFileInfo, FSK: and made fixes to the rest of the codebase to get things FSK: compiliable again. 1999-10-14 C. Scott Ananian * Backend/Runtime1/DataInitializers.java: Null-terminate the list so we know how long it is. * Backend/StrongARM/Frame.java, Interpret/Tree/DefaultFrame.java, Main/SAMain.java, Backend/Runtime1/DataInitializers.java, Backend/Runtime1/Runtime.java: Added DataInitializers class to Runtime to output a table containing all the static initializers needed for a program, in order. Added CallGraph to the parameter list of the Runtime1.Runtime constructor (so that it can eventually pass it along to DataInitializers). Changed the places that create Runtime1.Runtime to agree. * Backend/Runtime1/DataInitializers.java: New file. * GNUmakefile: Speed up srcdoc-generation by skipping java-highlighting of machine-generated source code. * IR/Tree/SEGMENT.java: One-character bugfix. * Main/SAMain.java: Sort the list of classes we output. * Support/sunthunk.jar: A little JAR file to replace the default dynamic character-encoder class loader with a static, hard-wired character-class. You're stuck with ISO8859_1 whether you like it or not. =) It is suggested you put this before the standard classes.jar file in your harpoon.class.path when you compile to native code. * Support/sunthunk.jar: New file. * Analysis/Quads/QuadClassHierarchy.java: Don't use sorted sets. Use faster hash sets. * Analysis/Quads/QuadClassHierarchy.java: Rework class hierarchy algorithm to differentiate between 'seen' classes and 'instantiated' classes. Class methods aren't callable unless some object of the proper type has actually been created. Doing this incrementally (as QuadClassHierarchy does) requires that we keep a 'pending' list of methods which have been invoked, but which (at the moment) lack any instantiated object to which they could apply. [For example, B.foo() may not be callable because B is never instantiated, but if at some point some subclass C of B is instantiated which doesn't override foo(), then B.foo() will be taken off the pending list and made callable.] * Backend/Analysis/InitializerOrdering.java: Attempts to compute a safe order in which to execute the class initializer methods at startup. Unfortunately, dependency cycles sometimes mean that it is not possible to safely order the initializers. Hopefully, bad things won't often happen. [bad things are detected and a warning is printed to System.err, so at least bad things won't happen silently.] * Backend/Analysis/InitializerOrdering.java: New file. * Backend/Runtime1/DataStaticFields.java: Constant-values fields of sub-integer type store their values in Integer objects, not sub-int wrappers. * Analysis/Quads/QuadClassHierarchy.java: Improve QuadClassHierarchy's handling of 1) static class initializers. 2) static methods in general. Static methods used to be omitted from the methods() set. This is fixed now, and the classes() set now also includes classes which have callable static methods. I think ClassHierarchy is a little too eager about marking methods of non-instantiated classes callable; I'm taking a closer look at that. * Analysis/Quads/CallGraph.java: Fix CallGraph to properly distinguish between classes in the hierarchy (which just means some method in them is called) and *instantiated* classes, which are classes actually created at some point. A virtual dispatch will only go to some method (possibly inherited) in an instantiated class. If I use a static method of class Foo, putting it in the hierarchy, that still doesn't mean that Foo.toString() is ever callable from some method which invokes Object.toString(). Foo.toString() is only callable if an object of type Foo, or a subclass of Foo which does not override toString, is at some point created. * Analysis/ClassHierarchy.java: Make instantiatedClasses a full-fledged member of the abstract ClassHierarchy object, as it is needed to correctly determine possible dispatch sites in a call graph. * Analysis/Quads/CallGraph.java: Migrate code to the JDK Collections API. 1999-10-14 pnkfelix * Backend/StrongARM/Code.java, Backend/StrongARM/CodeGen.spec: FSK: Merged scott's and my changes, and am commiting before FSK: he changes something else! FSK: (I feel like I'm playing with a gas stove or something!) 1999-10-14 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: I'm a dork. Change the quotes to backquotes as they ought to be. * Backend/StrongARM/CodeGen.spec: Fix two problems with constant generation: 1) the strongarm 'load constant with shift' format requires the shift to be even, which the constant generation code wasn't taking into account. this lead to some 'bad constant' assembly errors. 2) nasty implicit type conversion was causing l&0xFFFFFFFF to be a no-op. Java was first casting the int constant 0xFFFFFFFF (-1) to a long, making it 0xFFFFFFFFFFFFFFFF, *then* doing the binary-and. Not quite what I had in mind. Tagging the 0xFFFFFFFF as a long constant fixes things. * Backend/StrongARM/CodeGen.spec: Fix missing commas in shift instrs. * Backend/StrongARM/CodeGen.spec: Work around brain-dead assembler which is missing some of the ARMv4 instrs. * Backend/StrongARM/CodeGen.spec: Turns out that signed byte loads are addressing mode 3 instructions, not addressing mode 2 (like unsigned byte loads are). Fixed. Also added an instruction to do 16-bit (halfword) stores. For some reason, the strongARM assembler seems to be rejecting all addressing mode 3 instructions. This may be a tools bug. I'll look into it after class. * Backend/StrongARM/CodeGen.spec: Remove bogus MOVE(TEMP(t), CONST(c)) rules. I'd like to leave them out, as move collation should Do The Right Thing with just the CONST(c) rule, but CONSTs are used a lot, so for efficiency's sake I've copied the new, improved & correct CONST(c) rules and put a MOVE at the root. * Backend/StrongARM/CodeGen.spec: Improve code emitted to load constants. We now load longs, floats, and doubles correctly (not just ints) and output a pretty decent approximation to the minimum number of instructions required in every case. Nifty feature is that the code is smart enough to load the complement of the number, if the number of ones in the constant is larger than the number of zeros. This means, for example, that loading "-4" takes one cycle instead of four now. Groovy. * Backend/StrongARM/CodeGen.spec: Add use and def information to runtime library calls (___foo methods used to perform float/long/double operations) so that the register allocator knows that the contents of r0/r1/etc are used/overwritten by the call. I don't think this makes a difference at the present time, but eventually this info is necessary so that we know when/where we can rearrange instructions and optimize moves. * Backend/StrongARM/CodeGen.spec: fix a buglet in the CALL pattern: the two sources were swapped for the instr emitted for a doubleword argument which goes on the stack. Also, the stack is implicitly modified, and the instr didn't reflect this. Fixed. * Backend/StrongARM/CodeGen.spec: Add patterns for NEG and NOT for non-integer types. * Backend/StrongARM/Code.java: Make the assertion message a little less misleading for the common case. * Backend/StrongARM/CodeGen.spec: Fix a number of places in the spec file where Exp.type() was being tested where Exp.operandType() should have been used. Basically, the comparison BINOPs and the conversion UNOPs are what was being matched incorrectly. The UNOP _2D, for example, always has type()==Type.DOUBLE; you need to look at operandType() to see what type is being converted to double. Likewise, the BINOP CMPEQ returns a boolean and thus always has type()==Type.INT; you need to look at the operandType() to see what types are being compared. [On a related note, TwoWordTemps were also being created to store the results of the BINOP comparison instructions, which was incorrect. The boolean result only needs a Temp. This has been fixed.] For most BINOPs type()==operandType() (for example, ADD, AND, OR, etc); these have been left along, as the type() comparison is much cleaner syntactically in the spec file than the equivalent operandType() comparison. Also used some assembly magic to make the _2B, _2C, and _2S operations much faster & more straightforward than previously. [CSA] * Backend/StrongARM/CodeGen.spec: Fix a couple off-by-one errors in the patterns matching shift operations. * Tools/PatMat/Spec.java: As per Felix's request, output a semi-comprehensible error message when you try to PreciselyType something which is not PreciselyTyped. It would be nice if the error message came from the parser, as then you'd get a line number and other niceties, but the assertions are necessary as well and they do the job for now. * Tools/PatMat/MaximalMunchCGG.java: Re-order statements in output slightly so that ROOT can be used inside a predicate clause. * Backend/StrongARM/CodeGen.spec: Updated StrongARM spec file to remove now-unnecessary typecasts of ROOT. Added patterns for left- and right- shifts of longs. Extended Felix's MEM and MOVE patterns to capture a greater subset of ARM 'addr_2' addressing modes: loads and stores can be done using register sums and 12 bit constant offsets. They can also use a funky scaled index mode and some other cool stuff that I haven't attempted to write patterns for. Combined his 8-bit PreciseTyped patterns into the main word access pattern because they share the same addressing mode. 16-bit types have a *different* addressing mode ('addr_3') and so I didn't combine those. (seems like addr_3 basically just has a shorter constant offset field and less crazy funky options). Finally, added TEMP qualifiers to the beginning of most of the MOVE patterns to eliminate spurious matches. The pattern matcher was thinking that it could match MOVE(MEM(a), b) using the MOVE(a, b) pattern by first loading from a into some temporary, and then storing b into the temporary. Contents of memory remained unchanged. Rewriting the generic MOVE pattern as MOVE(TEMP(a), b) makes sure that this doesn't happen. * Tools/PatMat/MaximalMunchCGG.java: Added code to automatically type ROOT correctly in pattern-matching rules. That is, in the rule: BINOP(ADD, a, b) = c %{ // the variable ROOT here is defined to have type harpoon.IR.Tree.BINOP }% Previously, the ROOT variable was typed as harpoon.IR.Tree.Tree, which resulted in a lot of unnecessary type casting in the spec file. 1999-10-13 pnkfelix * Backend/StrongARM/CodeGen.spec: FSK: Fixed a bug in my implementation; I put the precise type FSK: information in the wrong place. FSK: Scott, this was heinous to fix just b/c the error message I got FSK: (a combo-ClassCastExc. and IndexOutOfBoundsExc...) didn't really FSK: tell me what the problem was...can we have something in the CUP FSK: file that checks that a user sanely typed their Trees? * Backend/StrongARM/CodeGen.spec: FSK: Added Patterns to handle Precise Types. I'm not entirely certain FSK: that I got all the subtleties right, but I am fairly sure that FSK: I at least picked out the correct assembly opcodes. C:) 1999-10-13 C. Scott Ananian * Tools/PatMat/MaximalMunchCGG.java, Backend/StrongARM/CodeGen.spec: Tweaked MaximalMunchCGG to recursively munch ExpList args of NATIVECALL and CALL, instead of passing it through to the Spec file untouched. Likewise, updated StrongARM/CodeGen.spec to use the munched TempList which is now returned, instead of assuming and hoping that all the Exps in the argument ExpList are TEMPs (which they are not, as CanonicalTreeForm doesn't normalize CALLs this way like Appel's 'canonical' form does). Felix, you should update the documentation for MaximalMunchCGG to reflect this, or point me to the document so I can update it. Basically, just the type of the 'args' parameter in the pattern has changed from ExpList to TempList. * Main/SAMain.java: OptimizedTreeCode is currently broken, but add the hooks to Main.SAMain to invoke it eventually. 1999-10-13 bdemsky * IR/Jasmin/Jasmin.java: Prints out an error message if a COMPONENTOF reaches the Jasmin backend. Lets the user know that the code may be bogus...[IE.. Component of gets translated into true.] Should be okay, since these quads should never exist here. * IR/Quads/Pattern.java: Evil changes... Wasn't as easy as I had thought. Turns out that the INSTANCEOF doesn't fit the general type of pattern that the pattern matcher was designed for.... It should work now... INSTANCEOF's are just special. COMPONENTOF's are evil too, but they always appear before an ASET so they don't actually break the pattern matcher... If someone thinks of an optimization that gets rid of the ASET's w/o the COMPONENTOF's bad things will happen. [Namely, the jasmin backend will transform the COMPONENTOF to true.] 1999-10-13 C. Scott Ananian * Analysis/Quads/QuadClassHierarchy.java: Improved QuadClassHierarchy to: 1) take a collection of roots instead of a single method root. (this is needed because a typical java program executed not only SomeClass.main() explicitly, but java.lang.System.initializeSystemClass() implicitly). 2) accounts for the fact that string constants are instances of the java.lang.String class. 3) now includes all array types created as well. * Backend/Maps/DefaultNameMap.java: Improved mangling of primitive types. The primitive type 'int' was being mangled the same way a class named 'int' in the base package would be; now primitive types are distinguished by '_Primitive_' in the prefix instead of '_Class_'. Probably doesn't matter, since you can't name a class 'int' anyway (it's a reserved word) but I feel the change makes things clearer. * Main/SAMain.java: Improve SAMain by: 1) making sure java.lang.System.initializeSystemClass() is included among the roots of the class hierarchy. 2) Using the mangled form of the class to generate the output file name so that (for example) array classes are written properly. * Interpret/Tree/DefaultFrame.java, Backend/Runtime1/AppelAllocationStrategy.java, Backend/Runtime1/MallocAllocationStrategy.java, Backend/Runtime1/NullAllocationStrategy.java, Backend/Runtime1/Runtime.java, Backend/StrongARM/Frame.java: Add two new allocation strategies: MallocAllocationStrategy (which calls a C malloc-like function) and NullAllocationStrategy (which just returns a null pointer whenever asked for memory). Moved the decision of which allocation strategy to use out of Runtime1 and into the Frame, so you can have multiple Frame instances which use the same Runtime with different allocation strategies. * Backend/Runtime1/MallocAllocationStrategy.java, Backend/Runtime1/NullAllocationStrategy.java, Backend/Runtime1/AppelAllocationStrategy.java: New file. * Backend/Runtime1/AppelAllocationStrategy.java, Backend/Runtime1/DefaultAllocationStrategy.java: Rename DefaultAllocationStrategy to AppelAllocationStrategy. @RENAME: /DefaultAlloc /AppelAlloc@ * Backend/Runtime1/AllocationStrategy.java, Backend/Runtime1/DefaultAllocationStrategy.java, Backend/Runtime1/Runtime.java, Backend/Runtime1/TreeBuilder.java: Update TreeBuilder to take an AllocationStrategy as a parameter. Tweak AllocationStrategy interface to play nicely with TreeBuilder. * Interpret/Tree/AllocationInfo.java, Interpret/Tree/AllocationStrategy.java, Interpret/Tree/DefaultAllocationStrategy.java: Don't export these classes as 'public', now that they're not used outside of Interpret.Tree. * Backend/Runtime1/DefaultAllocationStrategy.java: Fixup DefaultAllocationStrategy to use LocationFactory interface. * Interpret/Tree/DefaultFrame.java, Interpret/Tree/InterpreterAllocationStrategy.java: Touch up Interpret.Tree classes to deal with Allocation classes locally, not imported from harpoon.Backend.Allocation. * Interpret/Tree/AllocationInfo.java, Interpret/Tree/AllocationStrategy.java, Interpret/Tree/DefaultAllocationStrategy.java: Moving copies of harpoon.Backend.Allocation classes to Interpret.Tree in a vain attempt to keep it working. @RENAME: Backend/Allocation/ Interpret/Tree/@ * Interpret/Tree/AllocationInfo.java, Interpret/Tree/AllocationStrategy.java, Interpret/Tree/DefaultAllocationStrategy.java: New file. * Backend/Runtime1/AllocationStrategy.java, Backend/Runtime1/DefaultAllocationStrategy.java: Moving memory allocation interface around, as it is now runtime-specific. @RENAME: Backend/Allocation/ Backend/Runtime1/@ * Backend/Runtime1/AllocationStrategy.java, Backend/Runtime1/DefaultAllocationStrategy.java: New file. * Backend/StrongARM/Frame.java, Backend/StrongARM/RegFileInfo.java, ClassFile/HData.java, Interpret/Tree/DefaultFrame.java, Main/SAMain.java, Backend/Generic/Frame.java, Backend/Generic/LocationFactory.java: Fill out documentation for LocationFactory and implement it in StrongARM.RegFileInfo --- although it doesn't play nicely with the rest of RegFileInfo yet; I'm going to leave that for Felix to clean up. Felix: you probably want to take the big static block at the top of StrongARM.RegFileInfo and make it non-static and put it in the constructor like nice code. Then callerSave, calleeSave, and liveOnExit will just be non-static fields of type Set that allocateLocation() can frob as it likes. Of course, the accessor methods will return unmodifiable instances of the Sets. I don't fully understand how these sets should interact with suggestRegAssignment, but I'm guessing you do. =) The HData for the LocationFactory is output along with the code for java.lang.Object. This seemed to me preferable to creating a whole special file for 'globals', since java.lang.Object (as the root of the class hierarchy) is guaranteed to be included in every program. * IR/Quads/ASET.java, IR/Quads/COMPONENTOF.java, IR/Quads/INSTANCEOF.java, IR/Quads/Translate.java, IR/Quads/UnHandler.java, Interpret/Quads/Method.java, Backend/Runtime1/TreeBuilder.java: Big semantic change: INSTANCEOF and COMPONENTOF no longer are valid when applied to null pointers, except in quad-with-try form. Also, a field has been added to ASET so that we can avoid generating COMPONENTOF tests when the array components are of primitive type (program typesafety guarantees COMPONENTOF would return true in this case). Finally, some optimization was done to the translation of bytecode test and branch instructions: the test instructions were changed to return type 'int' (instead of type boolean) and the bytecode instructions 'ifeq' and 'ifne' no longer need to do an explicit comparison against zero; the CJMP actually performs this function. The translation of the bytecode INSTANCEOF operatior is much improved. Changes were made to Quads.Translate, Quads.UnHandler, and the Quad interpreter to support the semantic changes. Ran some tests on the system and verified that everything still seems to work correctly. * Backend/Generic/LocationFactory.java: LocationFactory interface Felix and I discussed to handle communication between the backend and the register allocator/code generator. Not commented or implemented yet, but the rough outline is there. * Backend/Generic/LocationFactory.java: New file. * Analysis/Quads/SCC/SCCAnalysis.java: bug fix: compile-time evaluation of instanceof was returning the wrong result if the object was null. won't matter after we change the semantics of instanceof to never take null objects, but figured I'd check in the bugfix anyhow. 1999-10-12 pnkfelix * Backend/Generic/RegFileInfo.java, Backend/StrongARM/RegFileInfo.java, Interpret/Tree/DefaultFrame.java: FSK: Made interface additions to RegFileInfo. FSK: Added subsequent stub implementations (assert(false) baby) to FSK: extensions of RegFileInfo * Backend/StrongARM/CodeGen.spec: FSK: Made a bunch of trivial fixes to deadly bugs. Amazing that we FSK: hadn't seen these pop up before... 1999-10-12 C. Scott Ananian * Util/UnmodifiableIterator.java, Util/UnmodifiableListIterator.java, Backend/Runtime1/ClassData.java, Backend/Runtime1/Data.java, Backend/Runtime1/DataInterfaceList.java, Backend/Runtime1/DataStaticFields.java, Backend/Runtime1/DataStrings.java, Backend/Runtime1/ObjectBuilder.java, Backend/Runtime1/Runtime.java, Backend/Runtime1/TreeBuilder.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/Frame.java, ClassFile/HClass.java, IR/Tree/ToTree.java, IR/Tree/Translation.java, Interpret/Tree/DefaultFrame.java, Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/TestRun.java, Main/SAMain.java, homeBackend/Runtime1/DataClaz.java, Analysis/InterfaceMethodMap.java, Backend/Analysis/ClassFieldMap.java, Backend/Analysis/ClassMethodMap.java, Backend/Analysis/InterfaceMethodMap.java, Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java, Backend/Generic/Runtime.java, Backend/Jouette/CodeGen.spec, Backend/Maps/DefaultClassDepthMap.java, Backend/Maps/DefaultOffsetMap.java, Backend/Maps/FieldMap.java, Backend/Maps/NameMap.java, Backend/Maps/OffsetMap32.java, GNUmakefile: @MERGE: magic-2-new-runtime@ * Backend/StrongARM/Frame.java: De-cruft StrongARM.Frame. (get rid of offsetmap and old allocation_info structure to make way for new allocation interface) 1999-10-12 pnkfelix * Backend/StrongARM/CodeGen.spec, Tools/PatMat/Spec.java: FSK: made some minor fixes to the StrongARM SPEC file, though the FSK: heart of it was really a note to myself that I need to revise FSK: some of the floating point patterns pretty severely later. 1999-10-12 C. Scott Ananian * Backend/Generic/Frame.java: De-cruft StrongARM.Frame. (get rid of offsetmap and old allocation_info structure to make way for new allocation interface) * Interpret/Tree/DefaultFrame.java: import javadoc from Generic.Frame. (this method's about to be removed from Generic.Frame, so I wanted to stash away the doc for this method somewhere) * Backend/Runtime1/Runtime.java, Backend/Runtime1/TreeBuilder.java: Hook up the reorganized String object builder with the TreeBuilder so that the right strings get made at the right times. The interaction between the components is a little too 'magic' for my tastes --- it depends on the hidden assumption that ToTree for all methods in a class will be called before the Runtime.classData method is called, and that each separate compilation has unique Runtime and TreeBuilder objects --- but I thought hard about this for two days and couldn't come up with a cleaner way to do it. Maybe I'll receive inspiration at some later date. Also, the memory allocation hook now just sends back a null pointer instead of throwing a 'scott is lazy' exception to make testing other parts of the code easier. * Main/SAMain.java: CodeGen doesn't like empty Data object. This is a workaround; maybe we'll eventually fix this some other way. * Backend/Runtime1/DataStaticFields.java, Backend/Runtime1/Runtime.java: Lay out class static fields. * Backend/Runtime1/DataStaticFields.java: New file. * Backend/Runtime1/ObjectBuilder.java: Booleans are unsigned. It doesn't make a difference, really. 1999-10-11 C. Scott Ananian * IR/Tree/ToTree.java: Remove the last shreds of OffsetMap from ToTree... and fix a bug in ARRAYINIT while I'm at it. (The tree translation was ignoring the ARRAYINIT.offset() field, causing the wrong bits of the array to be initialized.) * homeBackend/Runtime1/DataClaz.java: I was trying to be smarter than I needed to be... ...this bug is now fixed. * Backend/Runtime1/TreeBuilder.java: Fix a bug in the offsets used to address arrays of sub-integer type and the offsets used to access fields on sub-integer type. * Backend/StrongARM/CodeGen.spec: Improve readability of StrongARM assembly output by adding a comment with the character values of short/char fields. * Backend/Runtime1/DataStrings.java: Fix missing javadoc. * IR/Tree/Translation.java: Fix documentation bug. * Backend/StrongARM/CodeGen.spec: Fix the DATA(CONST(...)) rules in the StrongARM code generator specification so that it matches what gcc outputs for the various data types. Also add rules for precise types. End result: string constant object data is now being generated correctly. yay, team. * Tools/PatMat/Spec.java: bugfix: TypeSet.setAll() was ignoring the precise types, and so multiple precise types in a rule were being mishandled. fixed now. * Backend/Runtime1/DataStrings.java, Backend/Runtime1/Runtime.java: New DataStrings class to create static data structures for string constant objects using the ObjectBuilder interface. Currently unused, as I haven't figured out exactly how I want the interface between ToTree and the Runtime to work (they need to communicate which string constants need to be generated, but I'm not sure how best to structure that communication). * Backend/Runtime1/DataStrings.java: New file. * Backend/Generic/Runtime.java, Backend/Runtime1/ObjectBuilder.java: Remove the 'segment type' parameter from the ObjectBuilder interface. That was just a bad idea. Most objects will be created in clumps, and putting a new SEGMENT header on each one is just pointless. * Backend/Maps/NameMap.java: Another convenience method for creating data structures corresponding to parts of a String object. * Backend/Generic/Runtime.java: Reimplement the 'ObjectBuilder' class with an simple interface that allows using interpreter objects as templates for the static data. * Backend/Runtime1/ObjectBuilder.java: New file. * Backend/Runtime1/ObjectBuilder.java, Backend/Runtime1/Runtime.java: Reimplement the 'ObjectBuilder' class with an simple interface that allows using interpreter objects as templates for the static data. * homeBackend/Runtime1/DataClaz.java: bug fix: claz data structure now 1) omits interface methods with identical signatures when it sorts (deals with interface method inheritance) 2) outputs labels corresponding to the appropriate *class* methods in the interface table, not the *interface* method label (which has no implementation) * Backend/Runtime1/TreeBuilder.java: Bug fix: arrayOffset must return integer type (not pointer) or the tree form checker complains about type mismatches. * Backend/Runtime1/DataClaz.java, Backend/Runtime1/DataInterfaceList.java: New file. * Backend/Runtime1/ClassData.java, Backend/Runtime1/Data.java, Backend/Runtime1/DataInterfaceList.java, Backend/Runtime1/Runtime.java, homeBackend/Runtime1/DataClaz.java: New runtime data structure generation code. * Backend/Maps/NameMap.java: Added an extra convenience method to NameMap to make it easier to generate labels for the various component pieces of a claz structure. * Backend/Runtime1/Runtime.java, Backend/Runtime1/TreeBuilder.java, Backend/StrongARM/Frame.java, Interpret/Tree/DefaultFrame.java, Main/SAMain.java, Backend/Generic/Runtime.java: Tweaked runtime interfaces some more: 1) Runtime1.TreeBuilder now takes a 'pointersAreLong' argument in the constructor so it works for both 32- and 64-bit architectures. 2) Took out frame parameter to Runtime.classData methods, as that information is available by other means. 3) Made getOffsetMap() in StrongARM.Frame return null, to make it more obvious where the pre-new-runtime code still lurks. 4) Moved the creation of the Frame's RegFileInfo before the creation of the Runtime, so that the Runtime can (eventually) interact with the RegFileInfo to (for example) reserve registers it needs for runtime-internal functions. 1999-10-10 C. Scott Ananian * Backend/Analysis/ClassFieldMap.java: Bug fix: initializing the List returned by fieldList() from the end wasn't working properly. Fixed now. * Backend/Runtime1/TreeBuilder.java: Use new ClassFieldMap in Runtime.TreeBuilder * Backend/Analysis/ClassFieldMap.java: An implementation of FieldMap for non-static fields. It turned out that 90% of this method is cruft to implement the java.util.List API. Oh, well. I should have just returned an Iterator or somesuch. * Backend/Analysis/ClassFieldMap.java: New file. * Util/UnmodifiableListIterator.java: An unmodifiable ListIterator to go with the UnmodifiableIterator. * Util/UnmodifiableListIterator.java: New file. * Util/UnmodifiableIterator.java: oops -- the javadoc comments for this method were single starred instead of double starred, so they weren't actually showing up in the javadoc. fixed now. * Interpret/Tree/InterpreterOffsetMap.java, Backend/Maps/FieldMap.java, Backend/Maps/OffsetMap32.java: Reworked the FieldMap interface to make it actually, er, useful. * Backend/Analysis/ClassMethodMap.java: Added javadoc. * Backend/Maps/DefaultOffsetMap.java: get rid of crufty unused code. * IR/Quads/Translate.java: One more bit to that Quads.Translate bugfix: a handler was including itself as a handler and then throwing an exception, resulting in an infinite loop. Fixed now. * Util/Default.java: Add a default EMPTY_MAP to match the EMPTY_SET and EMPTY_LIST in java.util.Collections. * IR/Quads/Translate.java: Fix a bug in the translation of synchronized methods that was introduced with the conversion to new-call form. The null handler context was causing the TreeSet comparator to be very unhappy. This new code keeps the TreeSet happy and also correctly adds the new handler after any pre-existing handlers. * Backend/Analysis/ClassMethodMap.java: Fix a whole slew o' bugs in Backend.Analysis.ClassMethodMap; basically, non-virtual methods should not get numbers! I've tested this code now, and am satisfied it is (at least mostly) correct. * Backend/Runtime1/TreeBuilder.java: Fix a bug where interface methods were being offset incorrectly. Add a pair of assertions, because offsets have no meaning for static methods or fields. * Backend/Analysis/InterfaceMethodMap.java: Fix the requires and modifies clauses in the javadoc for the constructor I added, as per Felix's request. Add some extra assertions to help find bugs. 1999-10-09 C. Scott Ananian * Backend/Runtime1/Runtime.java, Backend/Runtime1/TreeBuilder.java: Implement Runtime.TreeBuilder.methodOffset in Runtime1. * Backend/Analysis/ClassMethodMap.java: Write a simple implementation of ClassMethodMap. * Backend/Analysis/InterfaceMethodMap.java: Add a constructor for InterfaceMethodMap that takes a ClassHierarchy, instead of an enumeration of classes. 1999-10-08 C. Scott Ananian * ClassFile/HClass.java: Better docs for HClass.getSuperclass() method. * Backend/Generic/Runtime.java, Backend/Runtime1/Runtime.java, Backend/Runtime1/TreeBuilder.java, Backend/StrongARM/Frame.java, Interpret/Tree/DefaultFrame.java, Interpret/Tree/TestRun.java: Made the Generic.Runtime class constructor take a closure argument so that the specific Runtime implementation can pass data (like a ClassHierarchy) down to the TreeBuilder class. Perhaps I should just access the data items I need through an extra level of indirection and put them in the Runtime class? [particularly because the HData builders will probably need these maps, too] * Analysis/InterfaceMethodMap.java: Moving Felix's InterfaceMethodMap from harpoon.Analysis to harpoon.Backend.Analysis as part of the Runtime re-org. @RENAME: Analysis Backend/Analysis@ * Backend/Analysis/ClassMethodMap.java: New file. * Backend/Analysis/ClassMethodMap.java: Stub for ClassMethodMap, complementary to InterfaceMethodMap. The implementation will be taken from Duncan's HClassInfo class. * Backend/Maps/OffsetMap32.java, Interpret/Tree/InterpreterOffsetMap.java, Main/SAMain.java, Backend/Analysis/InterfaceMethodMap.java: misc fixups to deal with InterfaceMethodMap moving from harpoon.Analysis to harpoon.Backend.Analysis. * Backend/Maps/DefaultClassDepthMap.java: Make the DefaultClassDepthMap work in a sane and efficient manner. Watch out for arrays: the HClass.getSuperclass() method always returns Object (because that's how the JLS works, and because that's that java.lang.Class.getSuperclass() gives you), but in actual fact Integer[] is a subclass of Number[] is a subclass of Object[] is a subclass of Object. Duncan's code put me straight as to this niggle. * Backend/Analysis/InterfaceMethodMap.java: Moving Felix's InterfaceMethodMap from harpoon.Analysis to harpoon.Backend.Analysis as part of the Runtime re-org. @RENAME: Analysis Backend/Analysis@ * Backend/Analysis/InterfaceMethodMap.java: New file. 1999-10-07 C. Scott Ananian * Interpret/Tree/DefaultFrame.java: New file. * Backend/Jouette/CodeGen.spec, Backend/StrongARM/CodeGen.spec, Interpret/Tree/DefaultFrame.java, Backend/Generic/DefaultFrame.java: Remove 'DefaultFrame' class from harpoon.Backend.Generic, as it doesn't belong there. Moved to harpoon.Interpret.Tree package, which is the only (legitimate) place where it is used. @RENAME: Backend/Generic/DefaultFrame.java Interpret/Tree/DefaultFrame.java@ * IR/Tree/ToTree.java: ok, trivial change: just noted who am i. * Backend/Runtime1/TreeBuilder.java, IR/Tree/ToTree.java, Backend/Generic/Runtime.java: Move low-quad translations into new Runtime. * GNUmakefile: Tweaked srcdoc build/install rules. 1999-10-02 C. Scott Ananian * Backend/Runtime1/TreeBuilder.java: oops. oversight: forgot to scale the class depth by POINTER_SIZE in the display structure. I'm trying to figure out if I want ClassDepth explicitly accessed, or whether to get this info via an intermediary (prob'ly some variant of OffsetMap). * Backend/Maps/DefaultClassDepthMap.java: Doh! I never mentioned that DefaultClassDepthMap extended ClassDepthMap... * Backend/Generic/Runtime.java, Backend/Runtime1/Runtime.java, Backend/Runtime1/TreeBuilder.java, IR/Tree/ToTree.java: Clean up interface between Runtime and TreeBuilder/NameMap. * Backend/Runtime1/TreeBuilder.java, IR/Tree/ToTree.java, Backend/Generic/Runtime.java: Move string allocation responsibility to Runtime.TreeBuilder. 1999-09-29 C. Scott Ananian * Backend/Generic/Runtime.java, Backend/Runtime1/TreeBuilder.java, IR/Tree/ToTree.java: More work on refining the Backend.Runtime.TreeBuilder interface. Moved everything but low quad stuff out of ToTree and into TreeBuilder. Now need to make clean interfaces for the low quad translations. * Backend/Generic/Runtime.java, Backend/Runtime1/TreeBuilder.java, IR/Tree/ToTree.java, IR/Tree/Translation.java: Introduced IR.Tree.Translation.* to clean up the ToTree->Runtime.TreeBuilder interface. * IR/Tree/Translation.java: New file. * Backend/Runtime1/TreeBuilder.java: Screwed up the addition of TreeBuilder and committed it on the wrong branch. Oops. * Backend/Runtime1/Runtime.java, Backend/Runtime1/TreeBuilder.java, IR/Tree/ToTree.java: Check in work to date on new runtime infrastructure on new magic-2-new-runtime branch. I'll be plugging away on this branch for quite a while, it looks like. * Backend/Runtime1/TreeBuilder.java: New file. * Backend/Generic/Runtime.java: Check in work to date on new runtime infrastructure on new magic-2-new-runtime branch. I'll be plugging away on this branch for quite a while, it looks like. 1999-09-27 C. Scott Ananian * Tools/Annotation/Java12.cup: Make package-link URLs correct in hyperlink annotated source markup. * IR/Quads/COMPONENTOF.java: fixed a javadoc spelling error. * bin/source-markup.perl: trivial de-linting of source hypertext markup script. 1999-09-24 bdemsky * Analysis/LowQuad/Loop/LoopAnalysis.java: Provided some documentation on for loop interface. Question: Should LoopAnalysis & friends remain in LowQuad/Loop... It can deal with Quads now. LoopOptimize still only likes LowQuads though. * Analysis/LowQuad/Loop/BasicInductions.java: Fixed casting. * Analysis/LowQuad/Loop/LoopAnalysis.java: Finished forloop stuff...Seems to work... Lots of nasty case conditions to see if the postincremented induction variable gets used in the loop... Seems to work.... * Analysis/ToSSA.java: Forgot about PCALL in the CALL changeover here... 1999-09-24 C. Scott Ananian * bin/source-markup.perl: Make $Id$ tag a hyperlink to the CVS log in the annotated sources. 1999-09-24 bdemsky * Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopOptimize.java: Finished the for loop stuff... Wonder if it works... 1999-09-23 bdemsky * Analysis/LowQuad/Loop/LoopAnalysis.java: Got rid of import *'s... * Analysis/LowQuad/Loop/LoopAnalysis.java: It can find for loops in theory now... Need to make it intelligent about the test condition possible still... * Analysis/LowQuad/Loop/LoopAnalysis.java: Some more code towards forloop recognition...Almost done... Random thoughts: Flex homepage needs util that takes in fortune and makes graphic of scott saying it. 1999-09-22 bdemsky * Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopOptimize.java: Moving test condition finder from LoopOptimize to LoopAnalysis. Also retrofitted it to accept Quads. Now all I need is a for loop finder! * Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/LoopInvariance.java, Analysis/LowQuad/Loop/MyLowQuadSSI.java: More fixes...it compiles this time. * Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/BasicInductions.java: oops * Analysis/LowQuad/Loop/BasicInductions.java: Umm...should work now with quads. * Analysis/LowQuad/Loop/AllInductions.java: Umm...should work on Quads now... * Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopOptimize.java: Martin wanted the for loop analysis stuff. Since LoopAnalysis already was doing most of what Martin wants, I just moved some induction variable stuff over there.. Now it finds initial values and increments for basic induction variables... I still need to see what I can generalize to work on Quads... 1999-09-21 C. Scott Ananian * bin/cvsblame.pl: OK, implemented RENAME functionality in cvsblame. Whew. * bin/cvsblame.pl: Clean up cvsblame script, reducing its dependence on global variables. Perl programmers should be shot. Hopefully, now that all file data isn't global, I can extend the script to open multiple CVS files at once, which is what is needed to properly annotate moved files. * bin/cvsblame.pl: Implement log MERGE tag in cvsblame script. 1999-09-20 C. Scott Ananian * IR/Quads/Peephole.java, IR/Quads/Quad.java, IR/Quads/ToNoSSA.java: Fix infinite bug-a-boo in ToNoSSA. I think this fixes the problem we were seeing in IR.Tree, too. Quad.replace no longer "magically" updates the HandlerSets, since we can't always do this reliably. Now there's a separate 'transferHandlers' method of IR.Quads.Quad which does this. The only transformation which required this functionality was Quads.Peephole; I've updated it appropriately. ToNoSSA now uses the general Quad.replace method instead of reimplementing it (incorrectly) itself --- Quad.replace is a little trickier than you might assume because of the possibility that an edge both comes from and goes to a single quad. This is something you are only likely to see in certain very-simple-and-usually-infinite looping constructs. Please check your code, if you've reimplemented Quad.replace at some point, and replace your version with a call to the canonical version. Thank you. We now return to our regularly scheduled Monday night. * IR/Tree/ToTree.java: Fix bug in CALL translation in ToTree. 1999-09-20 pnkfelix * IR/Tree/Code.java: FSK: Added some explanation strings to Duncan's assertion FSK: (some of which could be bogus...scary...) 1999-09-20 C. Scott Ananian * bin/cvsblame.pl: Fix bug with relative CVS/Repository paths. Felix found this one. 1999-09-20 bdemsky * Analysis/LowQuad/Loop/LoopAnalysis.java: Clarified comment that I didn't understand...and I wrote the code. * IR/Jasmin/Jasmin.java: Now Jasmin doesn't place any arbitrary requirements on QuadWithTry... Other than that it returns a non-null typeMap(). The problem was that Jasmin had to know the type of a temp globally to allocate it to a local variable [Double/Longs take 2 consecutive lv's]. Now it merely checks if a temp has a Double or Long definition, and if so it allocates 2 lvs. * IR/Jasmin/Jasmin.java, IR/Jasmin/TypeInfo.java: Changes: 1) TypeInfo deleted. Not needed anymore 2) Jasmin now uses Type information from the QuadWithTry hcode. Bad news: It requires that a temp be uniquely typed still... Good news: That will be fixed in a few minutes... * IR/Quads/Pattern.java, IR/Quads/QuadWithTry.java: Announcing, new and improved QuadWithTry. Now with TypeMaps... Dunno if it works, but it compiles! * IR/Quads/Peephole.java, IR/Quads/QuadWithTry.java: One more step in my plan to make the QuadSSI->QuadWithTry [or whatever we call it] transformation preserve typemaps from the SSI form. Peephole can now take a Map from QuadxTemp -> HClass, and update that Map as it adds Temps. It doesn't produce a new Map, but it doesn't produce a new HCode either... 1999-09-20 pnkfelix * Analysis/DataFlow/DataFlowBasicBlockVisitor.java: FSK: Fix for a javadoc boo-boo * Analysis/DataFlow/BackwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/BasicBlock.java, Analysis/DataFlow/BasicBlockVisitor.java, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/DataFlow/ForwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/InstrSolver.java, Analysis/DataFlow/LiveVars.java, Analysis/DataFlow/QuadBasicBlock.java, Analysis/DataFlow/QuadSolver.java, Analysis/DataFlow/ReachingDefInfo.java, Analysis/DataFlow/ReachingDefs.java, Analysis/DataFlow/ReversePostOrderEnumerator.java, Analysis/DataFlow/ReversePostOrderIterator.java, Analysis/DataFlow/TreeSolver.java, Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Tree/TreeFolding.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/Frame.java, Backend/StrongARM/TwoWordTemp.java, Main/SADataMain.java, Main/SAMain.java, Support/NullCodeGen.template: FSK: 1. Got rid of the crufty SADataMain FSK: 2. Made a number of changes, some to get compilation working FSK: again without SAprefixes on a bunch of the files, others FSK: to accomodate the move of BasicBlock and related classes FSK: out of harpoon.Analysis.DataFlow. There are still a number FSK: of classes in the DataFlow package that need to be cleaned FSK: up. * Analysis/BasicBlock.java: FSK: 1. Got rid of the crufty SADataMain FSK: 2. Made a number of changes, some to get compilation working FSK: again without SAprefixes on a bunch of the files, others FSK: to accomodate the move of BasicBlock and related classes FSK: out of harpoon.Analysis.DataFlow. There are still a number FSK: of classes in the DataFlow package that need to be cleaned FSK: up. @RENAME: DataFlow/BasicBlock BasicBlock@ * Analysis/BasicBlockVisitor.java: FSK: 1. Got rid of the crufty SADataMain FSK: 2. Made a number of changes, some to get compilation working FSK: again without SAprefixes on a bunch of the files, others FSK: to accomodate the move of BasicBlock and related classes FSK: out of harpoon.Analysis.DataFlow. There are still a number FSK: of classes in the DataFlow package that need to be cleaned FSK: up. @RENAME: DataFlow/BasicBlockVisitor BasicBlockVisitor@ * Analysis/Quads/BasicBlock.java: FSK: 1. Got rid of the crufty SADataMain FSK: 2. Made a number of changes, some to get compilation working FSK: again without SAprefixes on a bunch of the files, others FSK: to accomodate the move of BasicBlock and related classes FSK: out of harpoon.Analysis.DataFlow. There are still a number FSK: of classes in the DataFlow package that need to be cleaned FSK: up. @RENAME: DataFlow/QuadBasicBlock Quads/BasicBlock@ * Analysis/BasicBlock.java, Analysis/BasicBlockVisitor.java, Analysis/Quads/BasicBlock.java: New file. * Backend/StrongARM/CodeGen.spec, Backend/StrongARM/SAInstrBuilder.java, Backend/StrongARM/SARegFileInfo.java, Backend/StrongARM/SATempVisitor.java: FSK: Removed SA prefix from files in the repository. <> * Backend/StrongARM/SACode.java: FSK: Removed SA prefix from files in the repository. <> @RENAME: /SACode /Code@ * Backend/StrongARM/SAFrame.java: FSK: Removed SA prefix from files in the repository. <> @RENAME: /SAFrame /Frame@ * Backend/StrongARM/Frame.java, Backend/StrongARM/InstrBuilder.java, Backend/StrongARM/RegFileInfo.java, Backend/StrongARM/TempVisitor.java: FSK: Removed SA prefix from files in the repository. <> @RENAME: StrongARM/SA StrongARM/@ * Backend/StrongARM/InstrBuilder.java, Backend/StrongARM/RegFileInfo.java, Backend/StrongARM/TempVisitor.java: New file. * Backend/StrongARM/Code.java: FSK: Removed SA prefix from files in the repository. <> @RENAME: StrongARM/SA StrongARM/@ 1999-09-19 C. Scott Ananian * Interpret/Quads/Method.java, IR/LowQuad/LowQuadVisitor.java, IR/LowQuad/PAOFFSET.java, IR/LowQuad/PCALL.java, IR/LowQuad/Translate.java, IR/Quads/CALL.java, IR/Quads/Code.java, IR/Quads/Edge.java, IR/Quads/HandInfo.java, IR/Quads/Pattern.java, IR/Quads/Peephole.java, IR/Quads/Print.java, IR/Quads/QuadVisitor.java, IR/Quads/ReHandler.java, IR/Quads/ReProtection.java, IR/Quads/SSIRename.java, IR/Quads/ToNoSSA.java, IR/Quads/Translate.java, IR/Quads/UnHandler.java, IR/Tree/ToTree.java, Analysis/Quads/DeadCode.java, Analysis/Quads/SCC/SCCAnalysis.java, Analysis/Quads/TypeInfo.java, IR/Jasmin/TypeInfo.java, Analysis/SSITOSSAMap.java, Analysis/ToSSA.java: @MERGE: new-call@ * IR/Quads/Peephole.java: Cleaned up Peephole, adding lucid comments. Also improved correctness. Yippee. * IR/Quads/Peephole.java: Fix a bug in Peephole related to the introduction of new CALLs. Basically, Peephole was trying to shift MOVEs past SIGMAs, which was fine when SIGMAs couldn't throw exceptions, but incorrect when they can -- the handler expects to find a variable in (say) lv2 that's not actually MOVEd there until later... * IR/Tree/ToTree.java: Updated ToTree to handle to new CALL format. This involved stripping PCALL_WITH_LABEL and the whole CallConversionVisitor from the source, as they're not needed any more. I also pushed serveral classes inside ToTree where they belong. * Interpret/Quads/Method.java: Update Quad interpreter to handle the new CALL format. * Analysis/Quads/SCC/SCCAnalysis.java: SCCAnalysis/SCCOptimize now like new CALLs. 1999-09-17 C. Scott Ananian * IR/Quads/Peephole.java: Fix Peephole MOVE optimization to work correctly with CALLs-which-are-SIGMAs. * IR/Quads/UnHandler.java: trim some dead code. 1999-09-17 bdemsky * IR/Quads/ReHandler.java: Another bug...when handling exception cases, need to be careful regarding CALL statements that change arity. 1999-09-17 C. Scott Ananian * IR/LowQuad/Translate.java, IR/Quads/ToNoSSA.java, Analysis/Quads/DeadCode.java, Analysis/Quads/TypeInfo.java: Updated analysis algorithms to deal with new LowQuad PCALLs correctly. Analysis.Quads.DeadCode, Analysis.Quads.TypeInfo, IR.LowQuad.Translate, and IR.Quads.ToNoSSA were updated. This means we can successfully translate quad-ssi->low-quad-ssX and also low-quad-ssX -> low-quad (ssn). Still to be done: all loop analyses using Quads and LowQuads, and Quads.SCC.SCCAnalysis. Also IR.Tree.ToTree remains dead. * IR/Quads/Print.java: Updated Quad pretty-printing class (Print) to handle the new LowQuad PCALL. * IR/Quads/CALL.java: slightly better doc for second CALL constructor. * IR/LowQuad/PAOFFSET.java: make assertion more self-explanatory. * IR/LowQuad/LowQuadVisitor.java, IR/LowQuad/PCALL.java: Update LowQuad.PCALL to match Quads.CALL. This breaks lots of stuff, of course... just ignore the compilation errors in the LowQuad package. They'll go away eventually... * IR/Quads/ToNoSSA.java: Fixed ToNoSSA to work with new CALLs. An equally tortured class, with the same fatal flaw: it currently works, so it will never be rewritten. ;-) [grin and bear it] [ToNoSSA may have the honor of being the most hacked-over class in the infrastructure. According to the logs, almost every single person who's ever contributed a significant amount of code to harpoon/FLEX/Magic has touched ToNoSSA at some point. andyb might be the only virgin left.] 1999-09-17 bdemsky * IR/Quads/HandInfo.java, IR/Quads/ReHandler.java: Taken out large amounts of code that is no longer required. I think everything is now y2k compatible...make that new CALL compatible. I'll test stuff tomorrow...when I can find a keyboard with a working spacebar... I agree inner-classes are nicer... But isn't ReHandler already evil/cursed beyond repair... I'd like to rewrite/restructure it, but it currently works... 1999-09-17 C. Scott Ananian * IR/Quads/ReHandler.java, IR/Quads/ReProtection.java, IR/Quads/ToNoSSA.java, IR/Quads/Pattern.java: Anally protect package namespace. Basically, I just moved a lot of non-public classes inside their parent classes, making them properly-scoped inner-classes instead of random package-scope classes which were just begging for a naming conflict. It's inevitable that somebody else will want to use the name NameMap someday -- so put it inside so they can! This actually already happened with multiple PHIVisitors... but instead of properly scoping the name in an inner class PHIVisitor mutated to 'PHVisitor' on it's second incarnation. OK, I'll admit I'm being anal about this, but inner classes Are Just Nicer (tm). 1999-09-16 C. Scott Ananian * IR/Quads/SSIRename.java: Much thought, little code: the SSI form is fixed. * bin/source-markup.perl: Some people terminate URLs and email addresses with a period if they're writing a human-readable sentence. The source annotator now strips the trailing period, if one exists. * bin/source-markup.perl: Whoops -- the source-markup script wasn't recognizing tildes as valid URL characters. One-char fix. * IR/Quads/SSIRename.java: A second approximation at what new CALLs look like in QuadSSI form. We're hung up on the "self-modifying call" which looks like: = CALL(..., x) or = CALL(..., y) After SSI renaming, what is the relationship between the definition tuple and the sigma functions for x and y? The previous code was simply incorrect. Now the result is, er, excessively funky: CALL(x0) exception in x1 / = sigma(x0) sorta makes sense, if you squint your eyes enough. I'm going to try to add code to simply disambiguate this case, so that funky behaviour is not seen. Still thinking hard about how best to do this, though. 1999-09-16 bdemsky * IR/Quads/ReHandler.java: Small oversite...CALL's get converted from arity 2 [possibly] to arity 1 on this pass. Need to catch this case. * IR/Jasmin/TypeInfo.java: Jasmin is actually okay with the new CALL statements as stands. Jasmin's TypeInfo is modified to complain about non-arity 1 CALL statements. * IR/Quads/ReHandler.java: I think that is it for the ReHandler code... Seems that writing code that didn't assume a fixed number of outgoing edges in the original call visit methods paid off. * Analysis/SSITOSSAMap.java: Just neededto tell the visitor class that CALL quads are sigmas... It is derived from LowQuadVisitor, so the CALL method had to be overridden originally. * Analysis/ToSSA.java: Fixed to support new CALLS... 1999-09-16 C. Scott Ananian * IR/Quads/QuadWithTry.java, IR/Quads/ReHandler.java: I like type-safety. * IR/Quads/QuadWithTry.java, IR/Quads/ReHandler.java: Bad Brian. Checked in code that didn't commit.... =) * Main/Lint.java: Gave Lint a real command-line interface, sorta. Also added a check for QuadVisitor.visit() invocations that may be incorrect now that CALL has changed. This modification committed on the magic-2-0 branch, not the new-call branch. 1999-09-16 bdemsky * IR/Quads/ReHandler.java: Make javac happy... Working on making rehandler actually work correctly. 1999-09-16 C. Scott Ananian * IR/Quads/Code.java: Efficiency hack: the code that (someone) added to check TempFactory consistency inside the Iterator was *really* slowing down some pre- dead-code-elimination passes dealing with SSI form. Basically, the SSI-creation algorithm creates a heck-of-a-lot of Temps and removes the ones it doesn't need in a second pass. Having the Iterator see touch and check all of these temporary temps was a huge performance hit. So away it goes. Check your TempFactories yourself if you're feeling nervous about them... * IR/Quads/SSIRename.java: Updated SSIRename to deal with the new CALLs. quad-ssi form now works. (and there was much rejoicing.) * IR/Quads/CALL.java, IR/Quads/UnHandler.java: Clarified the constraints on CALL form a little better, and updated UnHandler to take advantage of the retex==retval case to remove an unnecessary move. * IR/Quads/QuadVisitor.java: CALL is now a subclass of SIGMA. Updated QuadVisitor to reflect this. [everyone who subclasses QuadVisitor should make sure CALLs are being handled correctly. I'm adding a lint pass to find these subclasses.] * Analysis/Quads/DeadCode.java: Fixed DeadCode to work with new CALLs. Also cleaned up a little cruft. 1999-09-16 bdemsky * IR/Quads/QuadWithTry.java, IR/Quads/ReHandler.java: More code for keeping typemap working...now i'm going to switch branches. 1999-09-16 C. Scott Ananian * IR/Quads/Print.java: Updated Quads.Print to deal with new CALLs properly. * IR/Quads/UnHandler.java: New CALLs work with UnHandler (and thus with quad-no-ssa form) now. * IR/Quads/Edge.java: Added explanation strings to assertions. * IR/Quads/Translate.java: quad-with-try is now working with the new CALLs. * IR/Quads/CALL.java: This is the new SIGMA-based CALL. Checking this in breaks all sorts of stuff. I'll get the basic bytecode->quad-with-try->quad-no-ssa->quad-ssi chain working, and then we can go from there. This commit is on a new branch forked off from magic-2-0. We'll merge once everything works again. To switch to the new branch, do cvs update -r new-call and to switch back, cvs update -r magic-2-0 After using the above commands, 'make update' will work as usual to update whatever branch you're working on. Share and enjoy... * GNUmakefile: Redid 'srcdoc' makefile target; made it incremental and wonderful. * bin/source-markup.perl: Whoops -- no revisions starting with '1.1' were showing up in the annotated listing... no what I meant (darn computers, always doing what you say...). Just scrapped the idea of suppressing the hyperlink on revision 1.1. Won't do any harm, even though it's not terribly useful. 1999-09-15 C. Scott Ananian * bin/cvsblame.pl: BUG FIX! sorry, url's weren't being properly formed for remote repositories when using -u flag. Fixed now. * bin/source-markup.perl: source-markup now hyperlinks each line to the appropriate entry in the BrowsableChangeLog (tm). Nifty, no? * bin/cvsblame.pl: add option to output information (a true path and revision info in url form) needed by the snazzy new annotation routine. basically the only hard part was determining whether a particular file was kept in the CVS 'attic' in the case of a remote repository. * bin/source-markup.perl: Add cvsblame information, and a command-line option to control it. Add an option to turn off java syntax highlighting, so that you can use this script on non-java files. Tweaked layout and colors a bit: line numbers and cvsblame info are now in a font one size smaller, for better use of screen real-estate. 1999-09-15 bdemsky * IR/Quads/ReHandler.java: ReHandler.rehandler now builds a map from Tuple(new Object[] {quad, temp}) to hclasses... 1999-09-15 C. Scott Ananian * bin/source-markup.perl: add random URL and email-address highlighting. * bin/source-markup.perl: source annotator deals with tabs and unicode escapes properly now. 1999-09-15 bdemsky * IR/Quads/ReHandler.java: Beginnings of making ReHandler preserve SSA TypeMaps... Want to get rid of kludge of running modified TypeInfo on QuadWithTry in Jasmin. 1999-09-15 C. Scott Ananian * bin/cvsblame.pl: Tweaked cvsblame to deal with local modifications properly. * bin/cvsblame.pl: Update cvsblame.pl to handle remote repositories transparently. Cool. Trying it: bin/cvsblame.pl Main/Main.java * GNUmakefile: Added makefile variable for SCRIPTS (stuff in bin/ that should be included in tar bundles) to clean up the harpoon.tgz rule a bit. Also added bin/source-markup.perl and bin/cvsblame.pl to SCRIPTS. * bin/cvsblame.pl: Updated cvsblame script so that you can specify a file in your working directory on the command-line, instead of having to point directly at the file in the CVSROOT. Doesn't handle remote repositories yet; I'm working on it. Also added a '-q' option to suppress the file text and just print lists of revision information, for use by other tools. Finally, modernized traverse_cvs_tree to use proper pass-by-reference; made no revision specified on the command-line mean 'currently-checked-out revision'; and suppressed 'D-for-Directory' entries in CVS/Entries. 1999-09-15 bdemsky * IR/Jasmin/package.html: Another one. * IR/Jasmin/package.html: New file. * Analysis/LowQuad/Loop/package.html: More package.html files. * Analysis/LowQuad/Loop/package.html: New file. * Analysis/Loops/package.html: Making the documentation people happy. * Analysis/Loops/package.html: New file. 1999-09-14 pnkfelix * Analysis/Instr/RegAlloc.java, Analysis/InterfaceMethodMap.java, Backend/Generic/InstrBuilder.java, Backend/Generic/RegFileInfo.java, Tools/PatMat/Spec.java: FSK: Made javadoc fixes, and a few hacks to get around problems FSK: that the 1.1 jdk has with my code. 1999-09-14 C. Scott Ananian * bin/cvsblame.pl: Fixed up mozilla hackery so that cvsblame.pl works like it was supposed to. This is useful even w/o the WWW hookup; type bin/cvsblame.pl [filename] to get a plain-text annotation of who changed what in the file. The -h option gives a usage message. Unfortunately, some of the mozilla hackery seems to have broken cvsblame's ability to parse the CVS/Root file to find out where the version control information is found; and it is not certain that it would have dealt with remote respositories and CVS_RSH correctly even originally. So, for the moment you need to specify the complete path to the CVSROOT copy of the file; that is, bin[filename],v ...which means you have to be on the machine where CVSROOT is located (lesser-magoo) or have NFS access (which nobody does). I'll fix this RSN, but you can play with it in the meantime regardless. Oh -- and check out http://flexc.lcs.mit.edu/Harpoon/cvsweb.cgi too -- WWW browsable CVS logs with readable color-coded diffs between arbitrary revisions. I'm working on integrating this into the funky Java syntax-highlighter hyper-linking annotation stuff, and tying cvsblame together with both. Fun, fun, fun. * bin/cvsblame.pl: Import 'cvsblame' script from mozilla (and they stole it from someone else, but I can't find the original version). * bin/cvsblame.pl: New file. * Tools/Annotation/Java12.cup: Some bugfixes to make the annotation tool deal with inner and anonymous classes better. Jikes, however, has a bug that I've discovered: class Foo { Object o = new Object() { class Inner { /* inner class 1 */ } }; void bar() { class Inner { /* inner class 2 */ } } } Jikes will name both of these 'Inner' classes Foo$1$Inner, overwriting one of them in the process (seems to be the second that gets trashed). JDK1.1 just dies; it doesn't like inner classes in anonymous objects. JDK1.2 has the same naming problem that jikes does (doh!) but at least it complains (somewhat cryptically) that Class Foo. 1$Inner already defined in Foo.java. instead of silently overwriting one of the classes. Fun, fun, fun. * GNUmakefile: tweak the 'srcdoc' target to root .html files in srcdoc/harpoon/ (instead of just srcdoc) which makes the java.* classes co-exist easier. * bin/source-markup.perl: Change the background of the annotated Java source to azure (from white) ...because I like it better that way. * Tools/Annotation/Java12.cup: Add full method resolution and linking to annotator. * Tools/Annotation/Lex/Literal.java, Tools/Annotation/Lex/NullLiteral.java: Highlight all literals (numbers, null) in dark cyan. * Tools/Annotation/Java12.cup: Added anchors for method declarations. Fixed some bugs with multiple field declarations, null pointer exceptions on unresolvable types. 1999-09-13 C. Scott Ananian * Tools/Annotation/Java12.cup: Update annotation tool to properly link field accesses. Method invocations are next. 1999-09-13 pnkfelix * IR/Tree/ToTree.java: FSK: Tried to fix a bug. Couldn't. C:P FSK: For all who are interested, here's the stack trace. Yay ToTree! Compiling: Test mainException in thread "main" harpoon.Util.Util$3: Assertion Failure: edge e should not equal null for quad: PHI(2): at harpoon.Util.Util.assert(Util.java:121) at harpoon.IR.Quads.Quad.replace(Quad.java:234) at harpoon.IR.Tree.LabelingVisitor.toLabel(ToTree.java:1634) at harpoon.IR.Tree.LabelingVisitor.visit(ToTree.java:1619) at harpoon.IR.Quads.PHI.accept(PHI.java:176) at harpoon.IR.Tree.ToTree.translate(ToTree.java:146) at harpoon.IR.Tree.ToTree.(ToTree.java:77) at harpoon.IR.Tree.TreeCode.(TreeCode.java:46) at harpoon.IR.Tree.TreeCode$3.convert(TreeCode.java:117) at harpoon.IR.Tree.CanonicalTreeCode$3.convert(CanonicalTreeCode.java:126 at harpoon.Backend.StrongARM.SACode$1.convert(SACode.java:73) at harpoon.Main.SAMain.outputMethod(SAMain.java:238) at harpoon.Main.SAMain.main(SAMain.java:160) * IR/Quads/Quad.java: FSK: Fixed an aliasing probelm in Quad.replace() * IR/Quads/Quad.java, IR/Tree/ToTree.java: FSK: ToTree is dying on my infinite loop. C:( FSK: So here are some extra assertions. * Backend/StrongARM/CodeGen.spec: FSK: Got rid of unnecessary .global declarations. 1999-09-13 C. Scott Ananian * Tools/Annotation/Java12.cup: Add annotation for class or interface types anywhere in the method. Still to do: field and method accesses. * Tools/Annotation/Java12.cup, Tools/Annotation/Main.java: Write a better infrastructure for dealing with class and inner class names. * ClassFile/Loader.java: Deal with files in the default package better within listClasses method. 1999-09-13 bdemsky * IR/Quads/ReHandler.java: Fixed bugs in PHI visitor code. 1) Now checks to see if the PHI node is reachable before visiting it. [Efficiency hack] 2) Checks to see if there is a incoming edge before checking to see what phi node is previous. 1999-09-13 C. Scott Ananian * Main/SAMain.java, Util/BinomialMap.java, Util/Environment.java, ClassFile/HClass.java: Remove extraneous semicolons which violate strict java lang spec. [the annotation parser goes 'by the book' and thus gives errors when semicolons appear where they should not.] * bin/source-markup.perl: off-by-one error in generated line numbers in source markup. * GNUmakefile: Added preliminary make targets for java source->annotated html doc. * bin/source-markup.perl: Added a glue perl script to handle to rest of the source->html markup tasks, including: a) maintaining master markup list for various modules b) doing HTML translations for < > and & c) adding headers/footers d) adding line numbers and anchors e) integrating the output of harpoon.Tools.Annotation. To invoke, try: bin/source-markup Main/Main.java > test.html This will continue to improve very rapidly now. * bin/source-markup.perl: New file. * Tools/Annotation/Lex/Comment.java, Tools/Annotation/Lex/InputElement.java, Tools/Annotation/Lex/Keyword.java, Tools/Annotation/Lex/Lexer.java, Tools/Annotation/Lex/LinePos.java, Tools/Annotation/Lex/NullLiteral.java, Tools/Annotation/Lex/StringLiteral.java: Extend harpoon.Tools.Annotation package classes to do Useful Stuff, currently including: a) syntax coloring (comments, keywords, strings) b) limited package/class linking. * Tools/Annotation/Lex/LinePos.java: New file. * Tools/Annotation/.cvsignore, Tools/Annotation/Java12.cup, Tools/Annotation/Lexer.java, Tools/Annotation/Main.java, Tools/Annotation/Sym.java: Extend harpoon.Tools.Annotation package classes to do Useful Stuff, currently including: a) syntax coloring (comments, keywords, strings) b) limited package/class linking. * Tools/Annotation/.cvsignore: New file. 1999-09-13 bdemsky * IR/Quads/Pattern.java: Mods to insure validity of pattern matching transformations. Namely, that the temps created in the pattern can not be used elsewhere. * IR/Jasmin/Jasmin.java: Combines ajoining compare OPER's and CJMP's now. 1999-09-12 C. Scott Ananian * GNUmakefile: Add javaCUP-generated files in harpoon.Tools.Annotation to GNUmakefile. * Tools/Annotation/Lex/BooleanLiteral.java, Tools/Annotation/Lex/CharacterLiteral.java, Tools/Annotation/Lex/Comment.java, Tools/Annotation/Lex/DocumentationComment.java, Tools/Annotation/Lex/DoubleLiteral.java, Tools/Annotation/Lex/EOF.java, Tools/Annotation/Lex/EndOfLineComment.java, Tools/Annotation/Lex/EscapedUnicodeReader.java, Tools/Annotation/Lex/FloatLiteral.java, Tools/Annotation/Lex/Identifier.java, Tools/Annotation/Lex/InputElement.java, Tools/Annotation/Lex/IntegerLiteral.java, Tools/Annotation/Lex/Keyword.java, Tools/Annotation/Lex/Lexer.java, Tools/Annotation/Lex/Literal.java, Tools/Annotation/Lex/LongLiteral.java, Tools/Annotation/Lex/NullLiteral.java, Tools/Annotation/Lex/NumericLiteral.java, Tools/Annotation/Lex/Operator.java, Tools/Annotation/Lex/Separator.java, Tools/Annotation/Lex/StringLiteral.java, Tools/Annotation/Lex/Token.java, Tools/Annotation/Lex/TraditionalComment.java, Tools/Annotation/Lex/WhiteSpace.java: Imported Java 1.2 grammar (from JavaCUP distribution) into the CVS archive as harpoon.Tools.Annotation package. Currently it parses the input and does nothing if the input source file has no errors. I'm going to add some code to this to have the grammar output type information markup instructions, and use it to generate a WWW-browsable hyperlinked version of the source tree. Hopefully, I'll integrate this with the cvsblame tool so that you can also drill down the CVS diffs for a particular line to find out exactly who wrote it and what it looked like prior to the last change. Think 'Bonsai' at www.mozilla.org, but for Java instead of C. * Tools/Annotation/Lex/BooleanLiteral.java, Tools/Annotation/Lex/CharacterLiteral.java, Tools/Annotation/Lex/Comment.java, Tools/Annotation/Lex/DocumentationComment.java, Tools/Annotation/Lex/DoubleLiteral.java, Tools/Annotation/Lex/EOF.java, Tools/Annotation/Lex/EndOfLineComment.java, Tools/Annotation/Lex/EscapedUnicodeReader.java, Tools/Annotation/Lex/FloatLiteral.java, Tools/Annotation/Lex/Identifier.java, Tools/Annotation/Lex/InputElement.java, Tools/Annotation/Lex/IntegerLiteral.java, Tools/Annotation/Lex/Keyword.java, Tools/Annotation/Lex/Lexer.java, Tools/Annotation/Lex/Literal.java, Tools/Annotation/Lex/LongLiteral.java, Tools/Annotation/Lex/NullLiteral.java, Tools/Annotation/Lex/NumericLiteral.java, Tools/Annotation/Lex/Operator.java, Tools/Annotation/Lex/Separator.java, Tools/Annotation/Lex/StringLiteral.java, Tools/Annotation/Lex/Token.java, Tools/Annotation/Lex/TraditionalComment.java, Tools/Annotation/Lex/WhiteSpace.java: New file. * Tools/Annotation/Java12.cup, Tools/Annotation/Lexer.java, Tools/Annotation/Main.java, Tools/Annotation/Sym.java: Imported Java 1.2 grammar (from JavaCUP distribution) into the CVS archive as harpoon.Tools.Annotation package. Currently it parses the input and does nothing if the input source file has no errors. I'm going to add some code to this to have the grammar output type information markup instructions, and use it to generate a WWW-browsable hyperlinked version of the source tree. Hopefully, I'll integrate this with the cvsblame tool so that you can also drill down the CVS diffs for a particular line to find out exactly who wrote it and what it looked like prior to the last change. Think 'Bonsai' at www.mozilla.org, but for Java instead of C. * Tools/Annotation/Java12.cup, Tools/Annotation/Lexer.java, Tools/Annotation/Main.java, Tools/Annotation/Sym.java: New file. * IR/Tree/TreeFactory.java, Temp/Temp.java, Temp/TempFactory.java, ClassFile/HClass.java: Tagged HClass, Temp, TempFactory, and TreeFactory with ReferenceUnique property. * IR/Tree/ToTree.java: Thanks to Lint tool, found two uses of Label.toString() (which is deprecated) and replaced them with Label.name (preferred). * Main/Lint.java: Improved Lint tool by adding code to: 1) check for the ReferenceUnique property and suppress == message if the class is 'safe'. 2) print better warning messages, quoting the source file line whenever possible. 3) as part of #2, added a '-use' command-line option equivalent to jdb's 'use' command; i.e. it specifies a sourcepath. The sourcefile for Package.Foo.BarClass is expected to be found in ${SOURCEPATH}/Package/Foo/BarClass. An easy way to make this true (helps tons for jdb, too) is: mkdir jdb cd jdb ln -s .. harpoon If you want to be fancy, you can also do: ln -s ../Contrib gnu ln -s /usr/local/jdk/src/java . ln -s /usr/local/jdk/src/sun . ln -s /usr/local/jdk/src/sunw . * Util/ReferenceUnique.java: Added 'ReferenceUnique' property: interface harpoon.Util.ReferenceUnique. Quoting from the javadoc: * ReferenceUnique is a property indicating that, for * all instances of a class, (a==b)==(a.equals(b)). * That is, two equal objects are always reference equal. * HClass and Temp are good examples * where this is true; HMethod and String * are examples where it is not true.

* Tagging classes with ReferenceUnique allows * automated checkers to more accurately discrimate legitimate * uses of == on objects from unsafe uses. * Util/ReferenceUnique.java: New file. * Main/Lint.java: Have to use SCCOptimize if we're going to use SCCAnalysis, since SCCAnalysis doesn't compute type information for unexecutable paths. * Main/Lint.java: A simple lint-style tool to check for programming irregularities. In particular, this currently looks for: 1) lines where Label.toString() is called (should be Label.name instead) 2) places where objects are compared using == instead of equals(). [eventually I'll add a harpoon.Util.Unique property to flag classes for which this comparison is safe] It can easily be extended. Future extensions: a) a sane command-line interface to specify which checks you're interested in. b) printing out the contents of the line in question along with a more verbose explanation of what exactly is (possibly) wrong with it, instead of just a line number and source file name. c) more checks. * Main/Lint.java: New file. * ClassFile/Loader.java: Added a new method to ClassFile.Loader to allow you to query the contents of a package. This is useful for, say, javadoc-type applications, where you want to process 'every class in package X' instead of specifying each class by name. * Util/CombineIterator.java: Added new constructor to CombineIterator to allow you to pass in an 'Iterator of Iterators' instead of an 'array of Iterators', if you so desire. 1999-09-11 C. Scott Ananian * Backend/StrongARM/SAFrame.java, IR/Tree/ObjectBuilder.java, IR/Tree/ToTree.java, Interpret/Tree/TestRun.java, Temp/Label.java, Backend/Maps/NameMap.java, Backend/Maps/OffsetMap.java, Backend/Maps/OffsetMap32.java, Backend/Runtime1/ClassData.java, Backend/Runtime1/Runtime.java, Backend/Generic/Runtime.java: Remove crufty label() methods from OffsetMap and move them to NameMap where they belong. This gets rid of a dependency from OffsetMap32 to NameMap. (yay!) * Backend/Runtime1/Runtime.java, Backend/Runtime1/package.html, Backend/Generic/Frame.java, Backend/Generic/Runtime.java: Tweaked some javadoc to make clear that we were referring to Backend.Generic.Runtime and not java.lang.Runtime. * Backend/Generic/RegFileInfo.java: fixed javadoc error: javadoc makes the @exception link itself, we don't need to surround it in tags. * Backend/StrongARM/SACode.java, Backend/StrongARM/SAFrame.java, Main/SAMain.java, Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java: Rename Frame.codegen() method to Frame.getCodeGen(). * Backend/Generic/CodeGen.java: New file. * Backend/Generic/CodeGen.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/SAFrame.java, Support/NullCodeGen.template, Tools/PatMat/CodeGeneratorGenerator.java, Backend/Jouette/CodeGen.spec, Backend/Sparc/CodeGen.spec: Renamed GenericCodeGen to CodeGen to match the other classes better. I feel harpoon.Backend.Generic.GenericCodeGen was a bit redundant. I'm open to other options (adding a 'G' or 'Generic' in front of every class in Backend.Generic) but this was the smallest change that made everything consistent. Also updated javadoc in a number of places to specify which 'CodeGen' class was being referred to more precisely. Finally, added a simple package.html file to harpoon.Backend.Generic. * Backend/Generic/package.html: New file. * Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java, Backend/Generic/GenericCodeGen.java, Backend/Generic/package.html: Renamed GenericCodeGen to CodeGen to match the other classes better. I feel harpoon.Backend.Generic.GenericCodeGen was a bit redundant. I'm open to other options (adding a 'G' or 'Generic' in front of every class in Backend.Generic) but this was the smallest change that made everything consistent. Also updated javadoc in a number of places to specify which 'CodeGen' class was being referred to more precisely. Finally, added a simple package.html file to harpoon.Backend.Generic. * GNUmakefile, Tools/PatMat/Main.java: harpoon.Tools.PatMat.Main was assuming that the output class was named "CodeGen". Fixed this to allow specifying another name on the command- line. * Backend/Generic/DefaultFrame.java, Backend/Jouette/CodeGen.spec: Clean up DefaultFrame. Replace instance of getAllRegisters()[index] in Backend.Jouette.CodeGen with newish getRegister(index) method. * Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Backend/Generic/Frame.java, Backend/Generic/RegFileInfo.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/SARegFileInfo.java, IR/Tree/TEMP.java, IR/Tree/ToCanonicalTree.java: Remove legacy methods from Frame. * Analysis/DataFlow/package.html, Analysis/GraphColoring/package.html, Analysis/Instr/package.html, Analysis/package.html, Contrib/getopt/package.html, Interpret/Tree/package.html, IR/Quads/package.html: Fixed tags so that package.html files were getting the right $Id$... 1999-09-11 pnkfelix * IR/Assem/Instr.java: FSK: Backing out a change I made to make Instr's toString() more FSK: readable when debugging. I still think that toString() should FSK: be kept seperate from the assembly version of an Instr, and FSK: I've tried to make that happen with my toAssem(Instr) method in FSK: Generic.Code, but there apparently are still dependencies on FSK: a certain output format from Instr's toString() method. FSK: When I'm thinking a little more clearly, I'll go in and FSK: get rid of those dependencies, so that toString() can be FSK: freely modified as needed while debugging. * Backend/StrongARM/CodeGen.spec, Backend/StrongARM/SAFrame.java, IR/Assem/Instr.java, IR/Assem/InstrFactory.java: FSK: Made enough changes so that we can now harpoonc a Test file FSK: to completion without null pointer exceptions killing it. FSK: Basically all are small bug fixes or code cleanups, and FSK: one assertion that was incorrect was removed. * IR/Properties/HasEdges.java, Temp/Label.java, Util/Util.java, Analysis/GraphColoring/package.html, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Backend/Generic/Code.java, Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java, Backend/Generic/InstrBuilder.java, Backend/Generic/RegFileInfo.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/SAFrame.java, Backend/StrongARM/SAInstrBuilder.java, Backend/StrongARM/SARegFileInfo.java, IR/Assem/Instr.java, IR/Assem/InstrEdge.java: FSK: What a remarkable morass of modifications! FSK: 1. Updated package info for Analysis.GraphColoring FSK: 2. Moved InstrBuilder and RegFileInfo sections of Frame interface FSK: out into their own modules. FSK: 3. Updated StrongARM backend to use the new InstrBuilder and FSK: RegFileInfo modules, and had to update much crufty code that FSK: relied on SAFrame's old implementation. FSK: 4. Updated doc in HasEdges to indicate a few properties of the FSK: HCodeEdges returned by the succC() and predC() methods. FSK: 5. Updated doc in Label to make it clearer about what toString() FSK: does. FSK: 6. Began fixing the Instr.insertAt(HCodeEdge) method, which led FSK: to the majority of the above changes (take note of the three FSK: line "Oh shit" comment, and mentally put it before all of the FSK: above changes, and you'll see what I mean. * Backend/Generic/InstrBuilder.java, Backend/Generic/RegFileInfo.java, Backend/StrongARM/SAInstrBuilder.java, Backend/StrongARM/SARegFileInfo.java: New file. 1999-09-10 pnkfelix * Analysis/Instr/package.html: FSK: Wrote a package.html file for the Analysis.Instr package * Analysis/Instr/package.html: New file. * Analysis/Instr/RegAlloc.java, IR/Assem/Instr.java, IR/Assem/InstrVisitor.java: FSK: 1. Adding visit(InstrJUMP) to InstrVisitor. That script I FSK: mentioned in my previous commit is sounding better and better FSK: the more I think about it. FSK: 2. Updated existing InstrVisitor accepts (all in RegAlloc) to use FSK: Instr.accept() instead of Instr.visit(), so now stuff compiles FSK: too! FSK: 3. Updated documentation in Instr to look nicer. Hey, if Knuth FSK: can stop working on TAOCP for fifteen years to finish TeX, FSK: then I figure that making our doc looking nicer is justified FSK: somehow... * IR/Assem/Edge.java, IR/Assem/Instr.java, IR/Assem/InstrDIRECTIVE.java, IR/Assem/InstrJUMP.java, IR/Assem/InstrLABEL.java, IR/Assem/InstrMEM.java, IR/Assem/InstrMOVE.java: FSK: 1. Changed visit->accept in the Instr classes (and added a FSK: forgotten "accept(InstrVisitor v)" implementation to FSK: InstrJUMP...perhaps we should make a script that automatically FSK: checks during make that all subclasses of any class that FSK: defines "accept(*Visitor)" implement the method as well, to FSK: make sure that bugs like this (which could lead to some FSK: strange results) don't crop up FSK: 2. Changed some Javadoc in Instr so that it comes out all FSK: nice and pretty. Whoever said the tag is broken FSK: is only thinking of the damage it can do (I guess the FSK: same thing could be said of GOTO however... FSK: 3. Removed Edge.java, since we have InstrEdge and having FSK: both is silly and InstrEdge is a better name anyway. * Backend/StrongARM/CodeGen.spec, Backend/StrongARM/SACode.java, IR/Assem/Instr.java: FSK: Fixed a few bugs FSK: 1. SACode argument to an assertion caused a null pointer FSK: exception; code that is currently in there can also FSK: potentially cause a null pointer exception. FSK: 2. Fixed the spec file so that DATA(CONST(x)) does FSK: something closer to the correct thing for int, float, and FSK: pointer types. Leaving double and long out for now; when FSK: we need them and I figure out how strong arm handles them, I FSK: will incorporate them. FSK: 3. Documentation change in Instr...more will probably follow. 1999-09-10 C. Scott Ananian * Backend/StrongARM/CodeGen.spec: Uncomment CONST

(null) pattern, as per permission from Felix. * Main/SAMain.java: efficiency hack. * Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Spec.java: Extended MaximalMunchCGG to handle PreciselyTyped exps properly. My nefarious plan to have the entire architecture deal with PreciselyTypeds correctly is nearing completion! 1999-09-10 bdemsky * Analysis/SSITOSSAMap.java: Fixed bad behavior for SIGMA's with two sigma functions having the same source... 1999-09-10 C. Scott Ananian * IR/Tree/ToTree.java: Weakened Tree pattern matching for LowQuad CALLs in order to handle constant propagation better. Really, the Quad and LowQuad CALLs should be rewritten to match Tree.CALL more closely. 1999-09-09 C. Scott Ananian * IR/Tree/ToTree.java: Found another visit->accept that I missed. Fixed. ToTree now generates properly precisely-typed Trees from LowQuad form. * IR/LowQuad/PGET.java, IR/LowQuad/PSET.java, IR/LowQuad/Translate.java: Add 'type' field to PGET and PSET in order to handle sub-integer types properly. * IR/LowQuad/POPER.java: Oops! Missed one when I was doing the visit->accept renaming. * IR/Properties/Derivation.java: Put a link to the Diwan, Moss, and Hudson paper detailing the Derivation structure into the javadoc. * IR/LowQuad/PFIELD.java, IR/LowQuad/PFOFFSET.java, IR/LowQuad/PGET.java, IR/LowQuad/PMCONST.java, IR/LowQuad/PMETHOD.java, IR/LowQuad/PMOFFSET.java, IR/LowQuad/PSET.java, IR/LowQuad/Translate.java, IR/Quads/AGET.java, IR/Quads/ALENGTH.java, IR/Quads/ANEW.java, IR/Quads/ARRAYINIT.java, IR/Quads/ASET.java, IR/Quads/CALL.java, IR/Quads/CJMP.java, IR/Quads/COMPONENTOF.java, IR/Quads/CONST.java, IR/Quads/DEBUG.java, IR/Quads/FOOTER.java, IR/Quads/GET.java, IR/Quads/HANDLER.java, IR/Quads/HEADER.java, IR/Quads/INSTANCEOF.java, IR/Quads/LABEL.java, IR/Quads/METHOD.java, IR/Quads/MONITORENTER.java, IR/Quads/MONITOREXIT.java, IR/Quads/MOVE.java, IR/Quads/NEW.java, IR/Quads/NOP.java, IR/Quads/OPER.java, IR/Quads/PHI.java, IR/Quads/Pattern.java, IR/Quads/Peephole.java, IR/Quads/Quad.java, IR/Quads/RETURN.java, IR/Quads/ReHandler.java, IR/Quads/SET.java, IR/Quads/SIGMA.java, IR/Quads/SWITCH.java, IR/Quads/THROW.java, IR/Quads/TYPECAST.java, IR/Quads/ToNoSSA.java, IR/Quads/UnHandler.java, IR/Quads/Unreachable.java, IR/Quads/XI.java, IR/Tree/ToTree.java, Interpret/Quads/Method.java, Analysis/DataFlow/QuadSolver.java, Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/BasicInductions.java, Analysis/LowQuad/Loop/LoopInvariance.java, Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/Quads/DeadCode.java, Analysis/Quads/MethodInliningCodeFactory.java, Analysis/Quads/SCC/SCCAnalysis.java, Analysis/Quads/SCC/SCCOptimize.java, Analysis/Quads/TypeInfo.java, Analysis/TypeInference/IntraProc.java, IR/Jasmin/Jasmin.java, IR/Jasmin/TypeInfo.java, IR/LowQuad/LowQuad.java, IR/LowQuad/PAOFFSET.java, IR/LowQuad/PARRAY.java, IR/LowQuad/PCALL.java, IR/LowQuad/PFCONST.java, Analysis/SSITOSSAMap.java, Analysis/ToSSA.java: Item #4 on our Things To Break List: rename Quad.visit(visitor) method to Quad.accept(visitor), which is less confusing. * Main/CHStats.java, Main/CallGraph.java, Main/Graph.java, Main/Options.java, Main/SAMain.java, Main/TypesMain.java: Moved harpoon.Analysis.QuadSSA and harpoon.Analysis.QuadSSA.SCC to harpoon.Analysis.Quads and harpoon.Analysis.Quads.SCC. * Analysis/Quads/BasicCSE.java, Analysis/Quads/CallGraph.java, Analysis/Quads/DeadCode.java, Analysis/Quads/MethodInlining.java, Analysis/Quads/MethodInliningCodeFactory.java, Analysis/Quads/SCC/SCCAnalysis.java, Analysis/Quads/SCC/SCCOptimize.java, Analysis/Quads/SSIStats.java, Analysis/Quads/TypeInfo.java: @RENAME: Analysis/QuadSSA/ Analysis/Quads/@ * Analysis/Quads/SCC/package.html: @RENAME: QuadSSA/ Quads/@ * Analysis/InterfaceMethodMap.java, Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/TypeInference/InterProc.java, IR/LowQuad/LowQuadSSA.java, IR/Quads/QuadSSI.java, IR/Quads/QuadWithTry.java, IR/Quads/ReHandler.java, Interpret/Tree/TestRun.java: Moved harpoon.Analysis.QuadSSA and harpoon.Analysis.QuadSSA.SCC to harpoon.Analysis.Quads and harpoon.Analysis.Quads.SCC. * Analysis/Quads/QuadClassHierarchy.java: Moved harpoon.Analysis.QuadSSA and harpoon.Analysis.QuadSSA.SCC to harpoon.Analysis.Quads and harpoon.Analysis.Quads.SCC. @RENAME: Analysis/QuadSSA/ Analysis/Quads/@ * Analysis/Quads/BasicCSE.java, Analysis/Quads/CallGraph.java, Analysis/Quads/DeadCode.java, Analysis/Quads/MethodInlining.java, Analysis/Quads/MethodInliningCodeFactory.java, Analysis/Quads/QuadClassHierarchy.java, Analysis/Quads/SCC/SCCAnalysis.java, Analysis/Quads/SCC/SCCOptimize.java, Analysis/Quads/SCC/package.html, Analysis/Quads/SSIStats.java, Analysis/Quads/TypeInfo.java: New file. * GNUmakefile: Moved harpoon.Analysis.QuadSSA and harpoon.Analysis.QuadSSA.SCC to harpoon.Analysis.Quads and harpoon.Analysis.Quads.SCC. * Analysis/CycleEq.java: One-character bugfix for Brian's infinite loop bug. * IR/Tree/DATA.java, IR/Tree/Print.java, IR/Tree/ToTree.java, Backend/Runtime1/Data.java: Futz with DATA to make it like PreciselyTyped better. Made array initializations in ToTree properly PreciselyTyped. Noticed that field and array accesses are not properly PreciselyTyped currently. Will fix that soon. Also, the MaximalMunchCGG doesn't seem to check the bitwidth of a PreciselyTyped. That's on my to-do list, too. * IR/Tree/PreciseType.java: IR.Tree.PreciseType goes away, now that PreciselyTyped is better. * IR/Tree/CONST.java, IR/Tree/DATA.java, IR/Tree/ESEQ.java, IR/Tree/MEM.java, IR/Tree/PreciselyTyped.java, IR/Tree/Print.java, IR/Tree/Type.java, IR/Tree/Typed.java, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Spec.java: Revamped PreciselyTyped interface to play better with others. PreciselyTyped is not a true sub-interface of Typed; small exps have type==INT and isSmall()==true. Updated Tools/PatMat package to reflect new PreciselyTyped stuff. Also coalesced lots of redundant type-expression code into one place. * IR/Quads/Translate.java: Fix bug with ARRAYINIT sometimes having odd types in its value array. [Integer arrays sometimes had Byte and Short wrappers in the value array] * Main/SAMain.java: Use SortedSet when collecting methods so that we always output methods in the same (near-alphabetical) order. * IR/Tree/ToTree.java: Fixed an oversight in ToTree: the _2D ops weren't being translated. * IR/Assem/Instr.java, IR/Assem/InstrFactory.java, Main/SAMain.java, Backend/Runtime1/ClassData.java, Backend/Runtime1/Data.java: Bugfixes for Data tables. * Backend/Runtime1/ClassData.java, Backend/Runtime1/Data.java, Backend/Runtime1/Runtime.java: New file. * Backend/Runtime1/ClassData.java, Backend/Runtime1/Data.java, Backend/Runtime1/Runtime.java, Main/SAMain.java, Backend/Generic/Runtime.java: Resurrected Duncan's Tree.Data in Backend.Runtime1.ClassData. I'll probably split this up more at some point, but we should be generating the same Data information as we were before, now. * IR/Tree/Print.java: Make IR.Tree.Print deal with 0-length Code and Data objects better. * IR/Tree/SEQ.java: SEQ should be a HDataElement. 1999-09-09 bdemsky * IR/Quads/ReHandler.java: Umm...Fixed a bug in the dataflow analysis deadcode pass. 1999-09-08 C. Scott Ananian * ClassFile/HClass.java: Found an unclear bit of documentation. Fixed it. * IR/Tree/ToTree.java: Better assert() message. * Main/SAMain.java: Don't try to generate method code for interfaces or abstract methods. * Util/HClassUtil.java: The TypeInfo and SCCAnalysis passes weren't properly merging interface types. Merging two interfaces is non-trivial, but we've implemented a conservative approximation for the time being. For the rest of the cases we've Done The Right Thing now. Use HClassUtil.commonParent() for all your merging needs. * IR/Quads/Translate.java: Found & fixed the extremely subtle Quad.Translate bug that Brian discovered. * Backend/Runtime1/package.html, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/SACode.java, Backend/StrongARM/SAFrame.java, IR/Tree/Code.java, IR/Tree/Data.java, Interpret/Tree/TestRun.java, Main/SAMain.java: Continued restructuring of Backend.Generic.Frame. Removed some unused methods, normalized the tempFactory situation, split off NameMap into Runtime. * Backend/Runtime1/package.html: New file. * Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java, Backend/Generic/Runtime.java, Backend/Maps/OffsetMap32.java: Continued restructuring of Backend.Generic.Frame. Removed some unused methods, normalized the tempFactory situation, split off NameMap into Runtime. * Backend/Generic/Runtime.java: New file. * Util/HClassUtil.java: Better assert() message. 1999-09-08 pnkfelix * Main/SAMain.java, Support/NullCodeGen.template, Tools/PatMat/CodeGeneratorGenerator.java, Backend/Generic/GenericCodeGen.java: FSK: Added a gen(Tree.Data tree) method with stub and FSK: I bet it works too. C;) * IR/Assem/Instr.java, Backend/Generic/Code.java, Backend/Generic/GenericCodeGen.java: FSK: Got rid of debugging output left over from my hunting. * Backend/Generic/Code.java, Analysis/Instr/RegAlloc.java: FSK: After a bit review, I discovered that THROWs were FSK: not being included if LocalCffRegAlloc was used, FSK: but are included if BrainDeadRegAlloc is used. FSK: So I once again switched back to BrainDeadRegAlloc, FSK: and after we have a working backend I will return FSK: to LocalCffRegAlloc and figure out what it is doing FSK: wrong. 1999-09-08 bdemsky * IR/Quads/Pattern.java: Bug fix for ANEW quad. 1999-09-08 C. Scott Ananian * Interpret/Tree/TreeStackFrame.java, Analysis/Tree/TreeFolding.java, ClassFile/HData.java, IR/Tree/CONST.java, IR/Tree/CanonicalTreeCode.java, IR/Tree/Code.java, IR/Tree/DATA.java, IR/Tree/Data.java, IR/Tree/LABEL.java, IR/Tree/NAME.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/Print.java, IR/Tree/SEGMENT.java, IR/Tree/ToCanonicalTree.java, IR/Tree/ToTree.java, IR/Tree/Tree.java, IR/Tree/TreeFactory.java: Reorganization of HData interface: Tree.Data no longer extends Tree.Code. The Tree elements valid in an HData (and only those) have been made to implement HDataElement, which is more a 'property' than an interface. The TreeFactory has been split up into IR.Tree.Code.TreeFactory and IR.Tree.Data.TreeFactory so that we don't have methods which are not valid for 'HData's in TreeFactory. * ClassFile/HDataElement.java: An HDataElement class to parallel HCodeElement. * ClassFile/HDataElement.java: New file. * Main/SAMain.java: Disable Data processing in SAMain pending re-org. * IR/Tree/Data.java: oops, missed this one. * Main/CallGraph.java, Main/Graph.java, Main/SAMain.java, Main/TypesMain.java, Util/Graph.java, Analysis/TypeInference/ClassCone.java, Analysis/TypeInference/InterProc.java, Backend/Maps/OffsetMap32.java, Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/TestRun.java, Main/CHStats.java: Separate class hierarchy interface (now harpoon.Analysis.ClassHierarchy) from implementation (harpoon.Analysis.QuadSSA.QuadClassHierarchy). * Analysis/ClassHierarchy.java: New file. * Analysis/ClassHierarchy.java: Separate class hierarchy interface (now harpoon.Analysis.ClassHierarchy) from implementation (harpoon.Analysis.QuadSSA.QuadClassHierarchy). @RENAME: Analysis/QuadSSA/ClassHierarchy Analysis/ClassHierarchy@ 1999-09-08 bdemsky * IR/Quads/Pattern.java: More bug fixes. 1999-09-08 C. Scott Ananian * Util/ArraySet.java: New file. * Util/ArraySet.java: Simple implementation of a Set wrapper around an array, paralleling Arrays.asList's list wrapper. * Backend/StrongARM/SACode.java, Backend/Generic/Code.java: Addded some missing @exception tags. * Main/Graph.java, Main/Main.java: harpoon.Main.Main and harpoon.Main.Graph now use the standard Options.cfFromString command-line parser. This means that you should use '-pass to-quad-ssi' instead of '-code quad-ssi' on the command line for these tools. 1999-09-08 bdemsky * IR/Quads/Pattern.java: Bug fix. Was looking for null constant where it should have been looking for zero constant. 1999-09-08 C. Scott Ananian * IR/Quads/QuadSSI.java: doc fix. * ClassFile/Loader.java: Make it easier to debug Unsatisfied Link Errors during classfile loading. [Getting one of these generally means that a JAR file is compressed] * Util/Default.java: Committed workaround to JDK1.1 deficiency: String is not Comparable! * Analysis/TypeInference/IntraProc.java: Kill evil import *. * IR/Quads/QuadSSI.java: @RENAME: QuadSSA QuadSSI@ * IR/Quads/QuadSSI.java: New file. * IR/Jasmin/TypeInfo.java, IR/LowQuad/LowQuadSSA.java, IR/LowQuad/Translate.java, IR/Quads/FixupFunc.java, IR/Quads/QuadNoSSA.java, IR/Quads/QuadSSA.java, IR/Quads/QuadWithTry.java, IR/Quads/ReHandler.java, IR/Quads/ToNoSSA.java, IR/Quads/package.html, Interpret/Quads/Method.java, Interpret/Tree/TestRun.java, Main/Graph.java, Main/Main.java, Main/Options.java, Main/SAMain.java, Main/TypesMain.java, Util/Graph.java, Analysis/TypeInference/IntraProc.java, ClassFile/HCodeFactory.java, IR/Registration.java: Renamed harpoon.IR.Quads.QuadSSA to harpoon.IR.Quads.QuadSSI. * Backend/Pentium/README, Backend/Sparc/README, ClassFile/package.html, IR/Assem/package.html, IR/Bytecode/package.html, IR/RawClass/package.html, IR/Tree/package.html, Interpret/Quads/package.html, Tools/PatMat/doc-files/instr-selection-tool.html, Tools/PatMat/package.html, Util/package.html, Backend/Generic/README, Backend/JavaByte/README: Add trailing new-line to those files missing one. This makes munge happier, which lets me rename stuff quicker. ;-) * prj.el: Fix bug in prj.el left over from when the IR.Quads package was named IR.QuadSSA * GNUmakefile: Add jasmin JAR file to list of JAR files added to the CLASSPATH. * bin/munge: don't munge .jar files (text-munge corrupts them) 1999-09-08 bdemsky * Support/Jasminpatch, Support/jasmin.jar: New file. * Support/Jasminpatch, Support/jasmin.jar: l Patched version of jasmin. * IR/Quads/Pattern.java: Mostly implemented pattern matching. Fixed some bugs... Its good enough to get working executables out of Jasmin that are actually smaller than the original [in the case of my simple test program]. Before celebrating, it is only due to debug information being lost [I should fix sometime]. The actual code is slightly longer... [bad stack allocation] 1999-09-07 pnkfelix * Analysis/InterfaceMethodMap.java, Backend/Maps/OffsetMap32.java, IR/Tree/ObjectBuilder.java: FSK: 1. Added some assertion clauses to InterfaceMethodMap and FSK: OffsetMap32... I can't believe duncan was just putting a FSK: try/catch (NullPointerException e) {} around his code... FSK: teaches me for being nice and not explicitly checking all of FSK: my requires: clauses... FSK: 2. Added much debugging output to ObjectBuilder...revealed a FSK: few problems in ObjectBuilder, though I have not yet FSK: identified the source of my OutOfMemoryError... * Backend/StrongARM/CodeGen.spec, IR/Tree/Data.java, IR/Tree/ObjectBuilder.java, Main/SAMain.java: FSK: 1. Still working on debugging why THROWs do not seem to be FSK: included in the assembly output. FSK: 2. Begun work on fixing ObjectBuilder, which is dying with FSK: OutOfMemory Errors when I try to run SAMain, so it FSK: is blocking my progress. 1999-09-07 bdemsky * IR/Quads/Pattern.java, IR/Quads/QuadWithTry.java: Adding more patterns to look for. 1999-09-07 pnkfelix * Analysis/Instr/RegAlloc.java, IR/Assem/Instr.java, IR/Tree/Data.java: FSK: Reimplemented my changes to IR.Tree.Data (bad CVS for not FSK: making Duncan update before committing!) FSK: and in the process some of my code that I'm debugging with FSK: is getting committed... 1999-09-07 C. Scott Ananian * Main/Main.java: Reverting change to harpoon.Main.Main. Use "-code quad-ssa" on the command-line if you don't want the SCC optimization. Main.Main's going to go away now real soon anyhow... 1999-09-06 duncan * Backend/Maps/OffsetMap.java, Backend/Maps/OffsetMap32.java, IR/Tree/Code.java, IR/Tree/Data.java, IR/Tree/ObjectBuilder.java, IR/Tree/Stm.java, IR/Tree/TreeCode.java, Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/StaticState.java, Interpret/Tree/TestRun.java, Main/Main.java: Added the ObjectBuilder class (at last) to allow generation of reflection data. Sorry this took so long, I've been _really_ busy lately. The code seems to work, but unfortunately runs out of memory on my machine. The problem is that it attempts to lay out reflection data for the entire class hierarchy. Hopefully this will run fine on other ppl's machines. * IR/Tree/ObjectBuilder.java: New file. 1999-09-04 C. Scott Ananian * IR/Quads/package.html: Add pointer to my thesis to description of QuadSSA (soon to be QuadSSI...) 1999-09-03 pnkfelix * IR/Quads/Quad.java, IR/Tree/Tree.java, IR/Assem/Instr.java, IR/Properties/UseDef.java: FSK: Collection-ized the UseDef interface and made the FSK: necessary updates to the parent classes in the FSK: respective IRs 1999-09-02 pnkfelix * Backend/StrongARM/CodeGen.spec, IR/Assem/InstrMEM.java, IR/Tree/Data.java, Backend/Generic/Code.java, Backend/Generic/GenericCodeGen.java: FSK: 1. Made some fixes to Data.java (nasty inner loop index var bugs) FSK: 2. Fixed lots of stuff in the spec file, though those Handler FSK: labels still aren't showing up FSK: 3. Made a new InstrMEM ctor that allows control over the FSK: targets and canFallThrough fields (while that may seem FSK: silly for most InstrMEMs, on the StrongARM the PC is FSK: a register so it is useful (and perhaps required) to have FSK: the ability to specify this, and in any case my code FSK: needed it. FSK: 4. Fixed the Iterator in Generic.Code to use the new FSK: next field instead of relying on the HasEdges interface. FSK: 5. Turned on the DEBUG field in GenericCodeGen, which shouldn't FSK: affect anyone except me. * IR/Tree/Data.java, Main/SADataMain.java, Main/SAMain.java, Backend/StrongARM/CodeGen.spec: FSK: Added a classHierarchy field to IR.Tree.Data, so that we FSK: can eliminate non-referenced methods from the method tables. * Main/SAMain.java, Backend/StrongARM/CodeGen.spec, IR/Assem/Instr.java: FSK: 1. Fixed a significant bug in the spec file; the CodeGenerator FSK: produced was saving state between calls to gen(), which FSK: led to incorrect results. Right now the fix is completely FSK: contained within the spec file, since the saved state is FSK: local to the spec file, but I'd prefer to figure out a way FSK: to figure out a design which didn't allow this sort of bug FSK: to creep in so easily... FSK: 2. Worked on fixing problems in the spec file, mainly related FSK: to Temp production * Backend/StrongARM/CodeGen.spec, IR/Assem/InstrFactory.java: FSK: Took out the public access for the labelToBranches field in FSK: InstrFactory; since the spec file doesn't require access, it FSK: can just have package access. * Backend/StrongARM/CodeGen.spec, IR/Assem/Instr.java, IR/Assem/InstrFactory.java: FSK: 1. Took the labelToBranches update code out of the spec file; FSK: turns out I was being much cleverer than I realized, and FSK: the updating happens in the Instr ctor. FSK: 2. Fixed a bug in Instr's toString() method * Backend/StrongARM/CodeGen.spec, IR/Assem/Instr.java, IR/Assem/InstrFactory.java, IR/Assem/InstrLABEL.java: FSK: Got rid of the UGLY expanded-hungarian notation that FSK: I was using for one of the fields in InstrFactory * Backend/StrongARM/CodeGen.spec, IR/Assem/InstrFactory.java: FSK: 1. Added .global tags to _lookup references in the spec file. FSK: 2. Updated branch construction to add entrys to the FSK: label->branches map in the InstrFactory. 1999-08-30 pnkfelix * Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java, Backend/StrongARM/SAFrame.java: FSK: Added the liveOnExit() method to Frame, which should FSK: perform the same function as the procLiveOnExit in FSK: Frame without the hack-ish nature of that method FSK: (live variable analysis looks much cleaner this FSK: way) * IR/Assem/Instr.java, IR/Assem/InstrEdge.java, IR/Assem/InstrLABEL.java, Main/SAMain.java, Backend/StrongARM/SAFrame.java: FSK: Did some debugging. We now once again produce assembly FSK: code from SAMain (some of the changes to the Instr interface FSK: haven't fully propagated across the code base). Now I need FSK: to check it over. C:P * Backend/StrongARM/CodeGen.spec, IR/Assem/Instr.java, IR/Assem/InstrFactory.java: FSK: Added a layout(from, to) method to Instr, to get around FSK: the numerous constraints that insertAt(edge) has (this FSK: way the CodeGenerator can actually do its job while keeping FSK: insertAt(edge) capable of being used for arbitrary Instr FSK: insertion and reordering. 1999-08-30 C. Scott Ananian * Support/collections.jar: The interpreter can't handle compressed jar files. So uncompress Support/collections.jar. * Main/Options.java, Main/Run.java: Rework Main.Run to have a "-pass" command-line interface conforming to our newly settled command-line interface standard. Everyone who conforms to this standard should use harpoon.Main.Options to parse the pass names; you'll have to extend Options to handle passes after low quad, eventually. Probably the extra information that the instr code factories need (frame, classhierarchy) should also be added as fields to Main.Options which will define a global state. At that time, Main.Options should also become non-static. * IR/Quads/SSIRename.java: new, improved renaming algorithm.... now with correctness! 1999-08-30 pnkfelix * IR/Assem/Instr.java: FSK: Updated the Instr constructor to update the FSK: InstrFactory.labelToBranchingInstrSetMap appropriately 1999-08-30 bdemsky * IR/Quads/QuadWithTry.java, IR/Quads/Pattern.java, IR/Quads/ReHandler.java, IR/Quads/ReProtection.java: Beginning of pattern matching. * IR/Quads/Pattern.java, IR/Quads/ReProtection.java: New file. 1999-08-30 pnkfelix * IR/Assem/Instr.java, IR/Assem/InstrFactory.java, IR/Assem/InstrLABEL.java: FSK: 1. Updated doc to better reflect the improvements to FSK: InstrFactory's overriden get(key) method FSK: 2. Made InstrLABEL properly implement predC()...I FSK: think this is the last of the changes needed for FSK: the switchover to dynamic HasEdges resolution * IR/Assem/Instr.java: FSK: 1. Made the code compilable. <> sorry guys. C:( FSK: 2. Added that assertion to ensure that the default FSK: predC() method is only used when it is valid * IR/Assem/Instr.java, IR/Assem/InstrFactory.java: FSK: 1. Some nasty looking changes to Instr.succC() and FSK: Instr.predC()...I like how I handled documenting FSK: the new and improved Instr, but the implementation FSK: looks heinous. C:( I may have sacrificed readability FSK: in the interest of keeping the code straight forward, FSK: without an excess of if/else clauses... FSK: 2. Added a labelToBranchingInstr Map to InstrFactory, FSK: to assist in my coming update to InstrLABEL for the FSK: new predC() method...(need to override that in InstrLABEL... FSK: should also add an assert to Instr.predC() to ensure FSK: that future extensions don't use the default implementation FSK: if instr.hasMultiplePredeccessors() is true. 1999-08-29 C. Scott Ananian * Util/Environment.java, Util/HashEnvironment.java, Util/PersistentEnvironment.java: Implement environments (maps with scoping) because the correct SSI renaming algorithm needs it. The SSI algorithm currently checked in is incorrect, (provably so!) but the current placement algorithm is conservative enough that you'll never actually see incorrect naming. The provably-correct algorithm currently exists only in my thesis (with its proof) but will eventually make it to the CVS code base. All the sooner now that environments exist in harpoon.Util... * Util/Environment.java, Util/HashEnvironment.java, Util/PersistentEnvironment.java: New file. 1999-08-28 C. Scott Ananian * IR/Quads/SSIRename.java: Add option to sort phi/sig for more readable output. * Util/Tuple.java: Made Tuple Comparable. * Util/Default.java: Tweaked the Default.comparator to handle nulls better. 1999-08-27 pnkfelix * IR/Assem/Instr.java, IR/Assem/InstrLABEL.java: FSK: Made further changes to Instr to fit the new HasEdges interface FSK: Will finish the rest of the changes later. * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Backend/Generic/DefaultFrame.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/SAFrame.java, IR/Assem/Instr.java: FSK: Added a missing import statement (man, I REALLY have to get FSK: back in the habit of recompiling before commiting) FSK: Also switched from a static method for Insertion to FSK: a non-static method insertAt(edge) * IR/Assem/Instr.java: FSK: Finished implementing Instr.insertInstrAt... FSK: am considering making it a non-static method...(ie FSK: one would call instr.insertAt(edge) instead of FSK: Instr.insertInstrAt(instr, edge). 1999-08-27 C. Scott Ananian * IR/Quads/QuadSSA.java, IR/Quads/SSIRename.java: Brand-spankin' new SSI-renaming algorithm, fresh from thesis-land. 'salways good to implement the algorithms you're writing about at least once to make sure they work. ;-) This one's faster than the old one, too -- I timed it. * IR/Quads/SSIRename.java: New file. 1999-08-27 pnkfelix * IR/Assem/Instr.java, IR/Assem/InstrJUMP.java: FSK: added InstrJUMP (see Class Description for why Scott and FSK: I decided to create it) and further modified Instr in FSK: the interim * IR/Assem/InstrJUMP.java: New file. * IR/Assem/Instr.java: FSK: whoops. in my rush to add InstrEdge, I checked in bad FSK: uncompiliable code. Sorry * IR/Assem/Instr.java, IR/Assem/InstrEdge.java: FSK: adding this 'cause scott made me do it. * IR/Assem/InstrEdge.java: New file. 1999-08-27 C. Scott Ananian * IR/Quads/Code.java: Add a comment string for a puzzling assertion. 1999-08-27 pnkfelix * Backend/Generic/Code.java, Backend/Generic/DefaultFrame.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/SAFrame.java, IR/Assem/Instr.java, IR/Assem/InstrFactory.java, Temp/LabelList.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java: FSK: Hard at work updating the code for this new dynamic edge FSK: resolution. FSK: Also discovered that its a good thing we're changing Instr's FSK: code, because there was a large oversight in the original FSK: interface in terms of handling insertion of SpillCode. FSK: FSK: It doesn't look like we're going to be able to make FSK: a generic spill code inserter without putting some constraints FSK: on the Tree structure given to CodeGenerator; mainly, Labels FSK: targetted by a JUMP (which calculates its target dynamically) FSK: can only be targetted by *one* JUMP...otherwise we lose the FSK: ability to add spill code for one JUMP without screwing up FSK: another. Duncan, can we ensure this property in your current FSK: design? Scott, am I accurate in my analysis of the situation? FSK: (And how about "am I clear...?") FSK: FSK: anyway, all of these changes were made to accommodate the FSK: new Instr interface. 1999-08-27 bdemsky * IR/Quads/ReHandler.java: Deadcode analysis pass I promised yesterday is added. Not as smart as QuadSSA/Deadcode [won't eliminate CJMP/PHI pairs [they should be long gone by this pass]], but it works on QuadWithTry. Only tries to get rid of MOVE/CONST's. The logic is there to get rid of much more general things, it is just a matter of making visit methods for other quads [other than quads w/ side effects, phi's and sigma's]. 1999-08-26 bdemsky * IR/Quads/QuadWithTry.java, IR/Quads/ReHandler.java: Q CHANGES: 1) Fixed code that removed/shrunk arity of phis... It wasn't keeping track of reachable quads correctly. 2) I now run Peephole optimize... 3) clean method added... Will eventually do dataflow analysis to determine useless MOVE's and CONST's. For now it cheats, and only declares them useless if the temp has 0 uses... It works amazing well, but not perfectly. * IR/Quads/Peephole.java: Made peephole analysis stronger. Wanted to get rid of extraneous moves. CHANGE: If the peephole analysis is told to not allow far moves [ie. there are handlers], it creates a set with all quads that are covered by handlers in the method. It then doesn't allow a move to be propagated across one of these quads. * IR/Quads/ReHandler.java: Added code to empty out phi node of unreachable code. 1999-08-26 C. Scott Ananian * Tools/PatMat/MaximalMunchCGG.java: Hmm. Noticed that Bops and Uops weren't symbolic when I made the SEGMENT types symbolic in the CGG. Fixed that. Everythings nicely non-numeric now. Yay. * Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Parser.cup: Updated parser and CGG to reflect duncan's addition of REFLECTION_PTRS and REFLECTION_DATA segments to IR.Tree.SEGMENT earlier today. CGG now emits segment types symbolically, rather than numerically, too. * IR/Tree/Data.java, IR/Tree/LABEL.java, IR/Tree/ToTree.java: Added tag to Tree.LABEL to indicate whether the label should be exported/globally visible. Felix should be able to get his object files to compile, now, after touching up the .spec a bit. Felix, don't forget to .global _lookup and such when you reference them inside CGG patterns. 1999-08-25 pnkfelix * IR/Assem/InstrFactory.java, IR/Assem/InstrLABEL.java: FSK: 1. Continued work on dynamic HasEdges resolution * IR/Assem/Instr.java, IR/Assem/InstrFactory.java: FSK: 1. Continued work on dynamic HasEdges resolution FSK: 2. took out an "import *" from Instr. no applause, please... * IR/Assem/Instr.java: FSK: Found a scary method in the Instr interface. Commented it FSK: as scary and will promptly research its usage in the code FSK: (yay grep) before taking action against it. * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, IR/Assem/Instr.java, IR/Assem/InstrFactory.java, Main/SAMain.java, Analysis/DataFlow/LiveVars.java: FSK: 1. Began work on changing Instr's control flow representation FSK: from explicit pred and succ fields in the Instr object to FSK: a dynamic lookup in the InstrFactory. Hopefully this will FSK: make .spec files easier to write, since implementors won't FSK: need to incorporate a "fixup" pass over the Instrs to update FSK: the pred and succ fields. FSK: 2. Changed the ctor for LiveVars to begin support for passing FSK: an init-set of Temps for the exit points of the code being FSK: analyzed (so that data flow analysis can actually treat FSK: registers that are live-on-exit as actually being live-on-exit FSK: 3. Switched from BrainDeadRegAlloc back to LocalCffRegAlloc; FSK: hopefully I'll get it working this time around. FSK: 4. Removed silly STDOUT msg from LocalCffRegAlloc 1999-08-25 bdemsky * IR/Quads/ReHandler.java: Commented out debug stuff... 1999-08-25 pnkfelix * Analysis/Instr/RegAlloc.java, Main/SAMain.java: FSK: 1. fixed the register load/store commenting code to actually FSK: produce readable comments FSK: 2. Made SAMain output a set of .s files, instead of just piping FSK: assembly to STDOUT FSK: 3. added a '-o ' option to SAMain, so that I FSK: don't clutter up my code directory and so I can easily FSK: target palmpilot's httpd hierarchy, to ease copying the files FSK: onto the Shark (yay for 'wget'!) 1999-08-25 bdemsky * IR/Quads/ReHandler.java: Bug fixes for Exception HANDLER processing... Also, more ambitious treatment of phi functions. 1999-08-25 duncan * IR/Tree/SEGMENT.java: Committed dependency for last bugfix * IR/Tree/Data.java: Here's the fix that Felix needs. It works fine when I test it, let me know if there's any problems w/it 1999-08-24 bdemsky * IR/Quads/ReHandler.java: Comments added to ReHandler. Still could use some more... Well the file is now at the #4 spot for length in the compiler... * IR/Jasmin/Jasmin.java: Adding comments to code...Probably need a few. * IR/Jasmin/Jasmin.java: Fixes for stack allocation routine. It was missing lots of temps that it could safely allocate to the stack... This change improved performance by a reasonable amount. Some comments added to this routine * IR/Jasmin/Jasmin.java: More low performance patches... This fixes some brokeness/omissions in the ARRAYINIT quad... That makes all the benchmarks slow now... 1999-08-23 pnkfelix * Backend/StrongARM/CodeGen.spec: FSK: Switched from using InstrMOVEs with l/h params FSK: to using normal Instrs...I will probably add FSK: a conditional function emitMOVEext() so that I FSK: don't need to do a search-and-replace to switch FSK: from one form to another. (Essentially the FSK: focus is this: I don't think that the current FSK: implementation of the l/h params allows for FSK: InstrMOVEs with l/h to be eliminated, but I have ideas FSK: for ways to fix the design so that they can be, FSK: so a conditional emitMOVE that can be turned on FSK: and off would be good. FSK: Alternatively (perhaps better), i could just FSK: modify emitMOVE() to search for the l/h param, and FSK: "do the right thing" in response (where the "right FSK: thing" depends on my current interpretation of FSK: the way our system works). But that might have FSK: weird side effects...explicit handling in a emitMOVEext() FSK: might be better...in any case, these are all things FSK: that I will document in the code soon... * Analysis/Instr/RegAlloc.java, Backend/Generic/Code.java, Backend/StrongARM/CodeGen.spec, Main/SAMain.java: FSK: Made various changes to get around limitations of the StrongARM FSK: and of my understanding of how Assembly Code works...we now FSK: (with the help of a few lines of suffix stub functions) can FSK: successfully assemble the output of our compiler, though FSK: it coredumps as soon as it runs. FSK: I'm also trying to make the output more debuggable by adding FSK: comments to the register allocation stuff so that we can FSK: see what is Temps are being stored at specific Stack Offsets. 1999-08-23 bdemsky * IR/Quads/ReHandler.java: Cosmetic change * IR/Jasmin/Jasmin.java: Fixed the bug that was causing really high benchmarks, but bogus results. * IR/Jasmin/Jasmin.java: Bug fix: Doesn't attempt to print out quads if the method is abstract. * IR/Jasmin/Jasmin.java: Umm... Missed implementing the ARRAYINIT opcode... That wasn't so good. 1999-08-20 bdemsky * IR/Jasmin/Jasmin.java: Forgot another opcode... Found this one while running benchmarks on our compiler... Some of the programs run amazingly fast after my backed is done... It is really a shame that they don't produce correct results. :) 1999-08-19 pnkfelix * Analysis/Instr/RegAlloc.java, Main/SAMain.java, Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java: FSK: 1. Expanded Spec.TypeSet to handle PreciseTypes, and updated FSK: Parser accordingly to properly turn <((s|u):int)+> to FSK: the appropriate typeset. FSK: 2. Switched Spec.TypeSet from using BitSet to using BitString FSK: (BitSet sketches me out) FSK: 3. Fixed a couple bugs in RegAlloc that were making things die FSK: (wasn't accounting for the possibility of FSK: HCodeFactory.convert(HMethod) returning null) FSK: 4. Fixed SAMain print out something more informative when FSK: HCodeFactory.convert(HMethod) returns null 1999-08-19 bdemsky * IR/Jasmin/Jasmin.java: Oops... LCMP, DCMP, FCMP weren't storing their status... That is now fixed. * IR/Jasmin/Jasmin.java: Unimplemented operand...oops * IR/Quads/ReHandler.java: Companion set of bug fixes to go with new features.... Fixed: 1) Added visit method for HEADER... Wasn't a good idea to look at the predecessors of headers. 2) Added visit method for MOVE...want to carry TypeCast info through them, so we don't unnecesarily typecast. 3) Checked to see if q.objectref() was null for SET/GET [static]. 4) Check for void arguements to CALL's, and SET's... 5) Check to make sure we aren't typecasting to primitives... Generates working and VERIFIABLE [yeah] code for Jasmin.class... A few more passes like this, and we can make random bytes pass the bytecode verifier... :) * IR/Quads/QuadWithTry.java, IR/Quads/ReHandler.java: Changes: Added DataFlow Type Analysis to determine what TYPECASTings are implicitely present at nodes. Then TYPECAST are added on edges where there is an implicit TYPECAST on the successor side and no implicit TYPECAST on the predecessor side. This algorithm should produce a minimal number of TYPECAST in the sense that if any TYPECAST placed is removed, the code should not pass bytecode verification verify. Status: It compiles. I haven't tried to run it yet. [IE...Most likely doesn't run.] 1999-08-18 pnkfelix * Backend/Maps/OffsetMap32.java, Backend/StrongARM/CodeGen.spec, IR/Tree/DATA.java, Tools/PatMat/MaximalMunchCGG.java, Analysis/Instr/RegAlloc.java: FSK: 1. Made the CodeGeneratorGenerator support PreciseType.SMALL FSK: (at least superficially), though no rules are defined for FSK: handling SMALL types in the spec file yet FSK: 2. Fixed a bug in BrainDeadRegAlloc (wasn't updating the FSK: abstract RegFile with the assignments it made) FSK: 3. Untangled some code that was causing an array out of FSK: bounds exception for me and added an assert there FSK: instead...Duncan I'm still getting an assertion there, FSK: could you look at it? (OffsetMap32, line 248) FSK: 4. Made DATA support PreciseType in its toString() method; FSK: there may be other places it needs to be updated but FSK: I don't know about them until they break on me... C:) 1999-08-18 C. Scott Ananian * GNUmakefile: Whoops. The server copy of the ChangeLog wasn't being properly made publically readable. Maybe rms is right... permissions hinder productivity! * IR/Tree/ESEQ.java: Make ESEQ implement PreciselyTyped. Still uneasy with this interface--- what are the feelings about removing PreciseType.SMALL and adding an additional isSmall() or isPrecise() method to PreciselyTyped? Felix doesn't like the fact that SMALL isn't in Type, and I wish enumerated Types were stricter to enforce the fact that SMALL isn't a valid Type, it's only a valid PreciseType... 1999-08-18 pnkfelix * Backend/StrongARM/CodeGen.spec, Tools/PatMat/MaximalMunchCGG.java: FSK: Alright, updated the CodeGeneratorGenerator to FSK: visit SEQ's children recursively FSK: FSK: Its actually rather amazing to me how crufty was the code FSK: that preceded this, relying on all sorts of personal FSK: assumptions about the output of Tree Form FSK: FSK: anyway, hopefully we produce something that is FSK: "more better" now. C:) 1999-08-18 C. Scott Ananian * Analysis/CycleEq.java: No more deep recursion. We now have a pseudo-goto statement instead. Remember: gotos aren't evil. They just get bad press. =) * ClassFile/Loader.java: Allow overriding CLASSPATH for compiled code. [useful to compile using the JDK 1.1 library on a JDK 1.2 platform] 1999-08-18 duncan * Backend/Maps/OffsetMap32.java: Removed more assertions that don't really make sense. 1999-08-18 pnkfelix * Main/SAMain.java: FSK: Made SAMain significantly more robust 1999-08-18 duncan * IR/Tree/Data.java: Data now outputs much more reasonable class data. * Interpret/Tree/InterpreterOffsetMap.java: Forgot to mention in past commit that I added wordsize() as an abstract method of OffsetMap. Added an implementation to InterpreterOffsetMap so everyone's code compiles. * Backend/Maps/OffsetMap.java, Backend/Maps/OffsetMap32.java: Removed some overzealous assertions, fixed a couple of bugs. 1999-08-18 pnkfelix * Main/SADataMain.java, Main/SAMain.java: FSK: changed the -d argument to -D, and added a printHelp() FSK: method to SAMain that prints out a helpful man page FSK: type thing * Main/SAMain.java: FSK: made Reg Alloc'd Instr output default to false in SAMain FSK: since now it is feasible that one would use SAMain without FSK: wanted to see Reg Alloc'd code (for Data stuff) * Main/SADataMain.java: FSK: Added "deprecated" print out to SADataMain's main() method * IR/Tree/TreeCode.java, Main/SADataMain.java, Main/SAMain.java, Backend/StrongARM/SACode.java, Backend/StrongARM/SAFrame.java: FSK: Got tired of things failing because of using the zero-arg FSK: ctor for SAFrame, so I made that ctor private and updated FSK: all existing code that I could find to stop using it. FSK: Also moved the functionality of SADataMain into SAMain (didn't FSK: feel like duplicating the ClassHierarchy construction code FSK: into SADataMain) so SADataMain is effectively deprecated FSK: (i'll add a system.out to SADataMain pointing users to FSK: SAMain) 1999-08-18 C. Scott Ananian * ClassFile/HClass.java, ClassFile/HField.java, ClassFile/HMethod.java: Make HClass, HField, and HMethod implement Comparable for the heck of it. Lets you use SortedMaps without thinking overmuch. 1999-08-18 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java, IR/Assem/Instr.java, Main/SAMain.java: FSK: Made instr not save the HCodeElement source (Scott clued FSK: me in to how to do things properly) * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, IR/Assem/Instr.java, Main/SAMain.java, Util/LinearMap.java, Util/LinearSet.java: FSK: 1. Added an HCodeElement 'source' field and accessor method to FSK: Instr interface FSK: 2. Fixed Local Register Allocation in many ways (eliminated an FSK: infinite loop in spill handling, debugged idiosyncratic FSK: problems in TwoWayMap, etc) FSK: 3. Added remove() methods to LinearSet and LinearMap FSK: 4. Made SAMain have a saner command line interface (though FSK: its still pretty crazy) FSK: 5. Sprinkled ASSERTs in all of the code...most are for FSK: debugging but none hurt anything (except for that FSK: one assertion that solves the four color map problem with FSK: backtracking search...that REALLY slows down the compiler. FSK: C;) ) 1999-08-17 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java, Main/SAMain.java: FSK: 1. fixed the bug in LocalCffRegAlloc mentioned in my last commit FSK: 2. Made changes to SAMain to better fit the design of the FSK: system (I no longer try to create multiple class hierarchies) 1999-08-17 bdemsky * IR/Quads/ReHandler.java: Small changes before the big change....just to improve readability of code.... To many long if statements in a row... 1999-08-17 pnkfelix * Interpret/Tree/InterpreterOffsetMap.java, Main/SAMain.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Tree/TreeFolding.java, Backend/StrongARM/SAFrame.java: FSK: made changes to the register allocation stuff to identify a bug FSK: with the nextRef map (basically, the paper I was basing this on FSK: wasn't clear on whether nextRef mapped an Instruction to the FSK: distances to the next reference to temps *in* the instruction, or FSK: to distances to the next reference of ANY temp in the basic FSK: block...I implemented the former, but realized later that the FSK: algorithm relied on the latter interpretation) FSK: Anyway, now I'm going to have to fix that. FSK: Also, I fixed a compile-error in InterpreterOffsetMap FSK: (Duncan, I can't imagine this isn't fixed on your machine...did FSK: you run 'cvs commit' from the Backend/Generic directory or FSK: something? ) 1999-08-17 bdemsky * IR/Jasmin/Jasmin.java: Fixed bug in translating checkcast opcode. 1999-08-16 duncan * IR/Tree/BINOP.java, IR/Tree/DATA.java, IR/Tree/Data.java, IR/Tree/Print.java, IR/Tree/SEGMENT.java, IR/Tree/ToCanonicalTree.java, IR/Tree/ToTree.java: ToTree now lays out string constants in memory. * Backend/Maps/OffsetMap.java: Shoulda committed this earlier. stringConstants() should return a Set, not an Iterator. However, I am starting to doubt the utility of this method in general. It originally existed because Scott & I decided that the way we would determined which string constants we had already laid out in memory. The thing is, I don't really know how we can enforce the constraint that only the Tree translator would use this offset map to compute string labels. That is the probable behavior, but it would be a very tough bug to track down if someone else started using it. So. I think what has to be done is to keep track of which strings we've allocated in the ToTree translator. So, unless anyone disagrees, I'll remove this method entirely. 1999-08-15 duncan * Backend/Maps/OffsetMap32.java: Updates to offsetmap: * Removed weird field inlining code from OffsetMap. If object inlining is to be added as a feature of our system, we can certainly work out a better way to do it that that. * Fixed the offset(HField) method to cache more efficiently (and readably). Also, I'm not convinced it was working correctly before. * Corrected some assertions * Updated class-level javadoc If anyone wants to update anything else, feel free to do so. Felix, I'm not sure this works correctly with your SAMain class because I get a strange "ClassNotInitialized" exception when I try to test it. Was this the error you mentioned in your email? 1999-08-13 bdemsky * IR/Quads/ReHandler.java: CHANGES: Adds back in TYPECAST that were implicitly coded in INSTANCEOF quds. 1999-08-12 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java: FSK: Re-adding the new-and-improved CFF local register allocator FSK: it compiles, that's all i know (though it should exhibit FSK: the same properties as the algorithm in the paper linked FSK: in the javadoc, while conforming to our RegAlloc/Frame FSK: interface...) C:) * Analysis/Instr/RegAlloc.java, Backend/Generic/Frame.java, Backend/StrongARM/SAFrame.java, Util/LinearMap.java, Util/LinearSet.java: FSK: 1. Added Capacity-aware ctors to LinearMap and LinearSet FSK: 2. Added SpillExceptions to SAFrame's suggestRegAssignment (and FSK: am amazed that I had forgotten it in the first place) FSK: 3. Added some spec clarifications to Frame.SpillException; FSK: admittedly though, my spec is chosen in interests of FSK: laziness, not proper design. C:P FSK: 4. Made the FskLoad and FskStore classes in RegAlloc a FSK: little easier to construct 1999-08-12 bdemsky * IR/Quads/ReHandler.java: Okay...got finally clauses, etc...producing verifiable byte code... Fixed one bug in my code from 4 am this morning... Must have been sleeping or something then. 1999-08-12 C. Scott Ananian * bin/unmunge: Make unmunge script output prettier. * Tools/PatMat/ErrorMsg.java, Tools/PatMat/Main.java, GNUmakefile: Tweak the CGG to be more makefile-friendly. Tweak the makefile to be more CGG-friendly. * Tools/PatMat/Lexer.jlex, Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java: Add preliminary support for PreciseTypes to the CGG spec parser/lexer. 1999-08-12 bdemsky * IR/Quads/ReHandler.java: Doing slightly better... Fixed some bugs with the way I created PHI functions. Can compile some try blocks [ones without finally blocks] and pass the verifier... 1999-08-11 C. Scott Ananian * IR/Tree/CONST.java, IR/Tree/ESEQ.java, IR/Tree/MEM.java, IR/Tree/PreciseType.java, IR/Tree/PreciselyTyped.java, IR/Tree/Type.java, IR/Tree/Typed.java: Futzed with the PreciselyTyped interface: 1) moved Type.SMALL to PreciseType.SMALL to make it clearer that SMALL is not a valid Type -- it's a valid PreciseType only. 2) Fixed some details of toString and isValid methods. 3) Made the signed flag of CONST and EXP default to true. This is meaningless, as signed() will error if type!=SMALL, but it makes me feel better. 4) added some javadoc. we love javadoc. 5) fixed ESEQ to deal with evil evilness of PreciseTyped interface. [ie, PreciseTyped doesn't truely extend Typed, because the type() method of a PreciseTyped may return values which are invalid for a Typed, so ESEQ.type() can't just return exp.type() ] Point #5 is really gnawing at me. I'm feeling we should make PreciseTyped Trees return INT from type() and implement a *separate* method (defined in PreciseTyped) called isPrecise() [or somesuch] to distinguish INTs from small values. That way PreciseTyped would be a proper subclass of Typed. I could get rid of the ESEQ hack *and* remove the PreciseType class I've just added, too. Let me know what y'all think about this. * IR/Tree/PreciseType.java: New file. 1999-08-11 bdemsky * IR/Quads/ReHandler.java: Code added to not catch exceptions that can be implicitly handled. 1999-08-11 duncan * IR/Registration.java: Shouldn't register TreeCode. Don't ask why i'm checking this in now... * IR/Tree/MEM.java: Forgot an assertion * IR/Tree/CONST.java, IR/Tree/MEM.java: Implemented PreciselyTyped in MEM, touched up a few things in CONST 1999-08-11 bdemsky * IR/Quads/HandInfo.java, IR/Quads/ReHandler.java: 1) Update to allow maps in HandInfo. 2) Modded PHIVisitor to like my "weird internal phi functions". * IR/Jasmin/Jasmin.java: Evil, evil bug. The typemap wasn't ever getting passed the HCode. This one seemed to spring out of nowhere... :) Could have sworn it wasn't there last time I used it... :) * IR/Quads/ReHandler.java: Kind of works now...produces code that seems to execute, and sometimes passes bytecode verification. Still stuff to implement. Does SSA->Quad-With-Try by itself. 1999-08-11 duncan * IR/Tree/CONST.java: CONST's implementation of PreciselyTyped * IR/Tree/Typed.java: New interface for types that require a precise definition in terms of bitwidth and an option sign extension. * IR/Tree/PreciselyTyped.java: New file. * IR/Tree/PreciselyTyped.java, IR/Tree/Type.java: New interface for types that require a precise definition in terms of bitwidth and an option sign extension. 1999-08-11 C. Scott Ananian * Tools/PatMat/Parser.cup, IR/Tree/Data.java, IR/Tree/SEGMENT.java: Renamed STRING_CONSTANTS_CA type to STRING_DATA. Duncan can change it back if the new name annoys him. =) Updated spec file parser to tell it about the new segment types. * ClassFile/HClass.java: Found a buglet in HClass.isInstanceOf with regard to JDK1.1 introduction of java.io.Serializable as a superinterface of array types. 1999-08-11 duncan * Interpret/Tree/ArrayRef.java, Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/Method.java, Interpret/Tree/ObjectRef.java, Interpret/Tree/StaticState.java, Interpret/Tree/TestRun.java, Interpret/Tree/UndefinedRef.java: Some cut-n-paste changes to the interpreter to account for the updated interface to OffsetMap * IR/Tree/Data.java, IR/Tree/SEGMENT.java, IR/Tree/ToCanonicalTree.java, IR/Tree/ToTree.java: The following changes to tree form: 1) Updated ToTree to take advantage of display info. for arrays. The code is _much_ shorter now 2) Added a SEGMENT types for string constants 3) Made a few preliminary changes to Data for the String constant stuff, but had to wait on our decisions about the smaller typed stuff to complete it * Backend/Maps/OffsetMap.java, Backend/Maps/OffsetMap32.java: Tidied up OffsetMap a little: removed some obselete methods, removed redundant parameters, etc. * IR/Tree/Code.java: Fixed an inefficiency that caused me a lot of problems. ToCanonicalTree calls Code.getRootElement() a substantial number of times, and the thrown exceptions were slowing the translator to a crawl. 1999-08-11 C. Scott Ananian * Backend/Maps/DefaultNameMap.java: Fix a little bug in the unicode munging that slipped through. Oops! 1999-08-10 C. Scott Ananian * Backend/Maps/DefaultNameMap.java, Backend/Maps/NameMap.java, Backend/Maps/OffsetMap.java, Backend/Maps/OffsetMap32.java: Futz with Felix's NameMap and Duncan's OffsetMap32 to modularize name mangling. Now is mostly JNI-compliant, and does intelligent things with fields, classes, and string constants, too. * Backend/Maps/DefaultNameMap.java: New file. 1999-08-10 pnkfelix * Backend/StrongARM/CodeGen.spec: FSK: made an update to the spec file so that DATAs are more FSK: correctly matched...still need to seperate the different FSK: DATAs based on the type of the CONST expression contained FSK: within, but I'll leave that for tomorrow * IR/Tree/SEGMENT.java, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java, Backend/Generic/GenericCodeGen.java: FSK: 1. Added a static decode(segtype) method to SEGMENT to make FSK: everyone's life easier FSK: 2. Updated the cup file to not have ExpNativeCall FSK: 3. Added some debugging code to MMCGG that is currently commented FSK: out FSK: 3. Fixed that dastardly bug in MMCGG that was causing us to FSK: fail to match MOVE

(id, CONST

(s)). Basically, when I FSK: wrote MMCGG, I was smart enough to include the code to FSK: break out of the "switch" when an Exp was matched, but FSK: I forgot to do the same when a Stm was matched. For some FSK: reason the CGG still worked, but only for simple, non-nested FSK: expressions (so seperate rules for MOVE(dst, src) and CONST(s) FSK: worked, but combining the two and eliminating one of the FSK: original caused it to break. FSK: Hopefully this also fixed another bug I was seeing where FSK: multiple moves were being inserted needlessly. 1999-08-10 bdemsky * IR/Quads/HandInfo.java, IR/Quads/HashMapList.java, IR/Quads/QuadWithTry.java, IR/Quads/ReHandler.java: First compileable version of revision 2 of conversion back to QuadWithTry. We now go from QuadSSA, since we want to do more complicated things without definition worries. This does pattern matching on exception processing. Still need a dead code elimination pass, fix some bugs, etc... * IR/Quads/HandInfo.java, IR/Quads/HashMapList.java: New file. 1999-08-10 duncan * IR/Tree/NATIVECALL.java: Using the assertions for CALL.build() inside of NATIVECALL == trouble for felix Sorry dude. * Backend/Maps/OffsetMap32.java: Hmm. Guess I didn't get enough coffee this morning... * Backend/Maps/OffsetMap32.java: Ah. HClass.getName() _is_ fully qualified, so we can use it instead of the rather hackish use of toString(). * Backend/Maps/OffsetMap32.java: Shortened up the code here.... it was a bit cumbersome * IR/Tree/Code.java, IR/Tree/Data.java, IR/Tree/Print.java, IR/Tree/ToTree.java: A few minor fixes 1999-08-10 pnkfelix * Main/SADataMain.java, Temp/Temp.java, Backend/StrongARM/SAFrame.java: FSK: Made stuff work FSK: 1. Updated SAFrame to actually initialize its temp factory FSK: (I'm amazed this bug hadn't cropped up already!) FSK: 2. Added some assert statements in a bunch of places in FSK: the process of debugging * Tools/PatMat/MaximalMunchCGG.java: FSK: 1. Fixed a bug in the clause for StmData * Backend/StrongARM/CodeGen.spec, Tools/PatMat/MaximalMunchCGG.java: FSK: 1. filled in a buncha blanks in the CodeGen.spec file FSK: 2. fixed a compile-error bug in MMCGG * Main/SADataMain.java, Tools/PatMat/MaximalMunchCGG.java: FSK: fixed what I think was a misunderstanding (by me) of what FSK: it means to make the segtype an identifier * Main/SADataMain.java: New file. * Backend/StrongARM/CodeGen.spec, IR/Assem/Instr.java, IR/Assem/InstrFactory.java, Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/MaximalMunchCGG.java, Backend/Generic/Code.java: FSK: made a host of changes to handle the new Data stuff FSK: 1. Made InstrFactory better able to handle null as a HMethod FSK: (because Datas are not associated with an HMethod) FSK: 2. Updated the MMCGG and CodeGen.spec file for SEGMENT and DATA 1999-08-09 duncan * IR/Tree/CONST.java, IR/Tree/ToTree.java, Interpret/Tree/Method.java: null CONSTs are now represented as "null" instead of 0 1999-08-09 C. Scott Ananian * Analysis/Maps/ConstMap.java, Analysis/Maps/DefaultMap.java, Analysis/Maps/ExecMap.java: Not content to let Duncan have all the fun, I've updated ConstMap and ExecMap in the same way he updated TypeMap. All the code I broke was my own, though --- and I fixed it all, too. =) 1999-08-09 duncan * IR/Tree/ToTree.java: Hopefully the last checkin. Realized I buggily put back felix's stuff * IR/Tree/ToTree.java: Oops, checked in a silly error... * IR/Tree/ToTree.java: Put back Felix's name mangling stuff * IR/Tree/OptimizedTreeCode.java: Changed the codename from optimized-tree to canonical-tree * Interpret/Tree/Method.java: Modified the interpreter so it won't break when it encounters SEGMENTs. * IR/Tree/Code.java, IR/Tree/ToTree.java, IR/Tree/TreeCode.java: Added SEGMENT at the start of each code * Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/LowQuad/Loop/MyLowQuadSSI.java: Fixed the rest of Brian's stuff that I broke. Just so he wouldn't feel left out... * IR/Jasmin/Jasmin.java, IR/Jasmin/TypeInfo.java: Fixed some of Brian's stuff :) * IR/Tree/Data.java: Oops,forgot to update Data * IR/Tree/CALL.java, IR/Tree/CanonicalTreeCode.java, IR/Tree/Code.java, IR/Tree/INVOCATION.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/ToCanonicalTree.java, IR/Tree/ToTree.java, IR/Tree/TreeCode.java: Ahhhh. These were not fun. Updated the Tree form to use the new TypeMap interface. There's still some derivation errors in the tree form, but it shouldn't cause anyone problems but me. * Backend/Generic/DefaultFrame.java: Make all registers in DefaultFrame use the same TempFactory. This class is becoming really messy... * Interpret/Tree/InterpreterAllocationStrategy.java, Interpret/Tree/Method.java, Interpret/Tree/StaticState.java, Interpret/Tree/TestRun.java: Updated the interpreter to work with the new format of Tree CALLs * IR/LowQuad/Code.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java, IR/LowQuad/Translate.java: Updated the LowQuad package to work with the new typemap interface * IR/Quads/ToNoSSA.java: Update ToNoSSA to use the new TypeMap interface. Also replaced old utility classes with collection-based classes. * Analysis/Maps/TypeMap.java: The first in a long series of commits which replace the old TypeMap interface. The old typemap interface was: HClass typeMap(HCode, Temp); This was fine for SSA form, but in non-SSA form, it is possible that the same temp may be assigned values of different types at different points in the control flow graph. The new interface accounts for this: HClass typeMap(HCodeElement, Temp); I've update all of the code affected by this, except for Brian's. Sorry dude, I would've had to make changes that I didn't feel justified in making to unfamiliar code, so I'll leave it to you. 1999-08-09 bdemsky * Analysis/SSITOSSAMap.java: Oops...Apparently when I was disabling debug output, I just commented out the print statements, and not the actual call to the debug method... 1999-08-08 duncan * Analysis/Maps/TypeMap.java: Documented the behavior of TypeMaps on derived pointers. 1999-08-07 C. Scott Ananian * Main/Run.java: Added command-line options to harpoon.Main.Run to use the new checkpoint features added to the Quad interpreter. * Interpret/Quads/NullNativeMethod.java, Interpret/Quads/ObjectRef.java, Interpret/Quads/Ref.java, Interpret/Quads/StaticState.java: Make Quad interpreter state serializable. This means you can save program state to disk (checkpoint it) and restore it to continue execution later. We use this to pre-execute the java class library initialization code. * Interpret/Quads/NullNativeMethod.java: New file. * Interpret/Quads/ArrayRef.java, Interpret/Quads/FieldValueList.java, Interpret/Quads/INFileInputStream.java, Interpret/Quads/INFileOutputStream.java, Interpret/Quads/Method.java: Make Quad interpreter state serializable. This means you can save program state to disk (checkpoint it) and restore it to continue execution later. We use this to pre-execute the java class library initialization code. * ClassFile/CachingCodeFactory.java, ClassFile/HClass.java, ClassFile/HClassSyn.java, ClassFile/HField.java, ClassFile/HMethod.java: Clean up implementation of CachingCodeFactory. Clean up unnecessary no-args constructors in HClass,HMethod,HField,etc. * Interpret/Quads/INClass.java, Interpret/Quads/INFileInputStream.java, Interpret/Quads/INFileOutputStream.java, Interpret/Quads/INFloatDouble.java, Interpret/Quads/INObject.java, Interpret/Quads/INSystem.java, Interpret/Quads/Support.java: Extend quad interpreter to work on JDK 1.2 machines, which seem to handle the runtime native interface slightly differently. JDK 1.2 is a pain; we will definitely native-code compile JDK 1.1 code first --- fewer native methods to implement. * IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java, IR/Quads/QuadNoSSA.java, IR/Quads/QuadSSA.java, IR/Quads/QuadWithTry.java, IR/Tree/CanonicalTreeCode.java, IR/Tree/TreeCode.java, ClassFile/ImplMagic.java: Made many code factories serializable (why not? and it lets us checkpoint the compilation process). * ClassFile/HConstructorSyn.java, ClassFile/HField.java, ClassFile/HFieldSyn.java, ClassFile/HMethod.java, ClassFile/HMethodSyn.java, ClassFile/SerializableCodeFactory.java: Make HField and HMethod serializable, like HClass is. Make all the *Syn (synthetic) classes serializable, which involves writing out more information than we normally do. Make a SerializableCodeFactory class to allow easy anonymous class creation of HCodeFactory + java.io.Serializable. Make CachingCodeFactory a serializable code factory (cache is zeroed when written to disk). * ClassFile/SerializableCodeFactory.java: New file. * ClassFile/CachingCodeFactory.java, ClassFile/HClass.java, ClassFile/HClassCls.java, ClassFile/HClassSyn.java: Make HField and HMethod serializable, like HClass is. Make all the *Syn (synthetic) classes serializable, which involves writing out more information than we normally do. Make a SerializableCodeFactory class to allow easy anonymous class creation of HCodeFactory + java.io.Serializable. Make CachingCodeFactory a serializable code factory (cache is zeroed when written to disk). 1999-08-06 C. Scott Ananian * ClassFile/HClass.java: Tiny change that marginally decreases the size of a set of serialized HClasses. Perhaps. * Analysis/TypeInference/InterProc.java, Interpret/Tree/InterpreterOffsetMap.java, Main/CHStats.java, Util/Graph.java: Update to reflect new Collections-compliant interfaces to ClassHierarchy. * ClassFile/HClass.java: Make HClass serializable. WARNING: doesn't work with JDK 1.1. JDK 1.2 introduced a feature that makes this work properly. * Util/package.html: miniscule javadoc correction. 1999-08-06 pnkfelix * Backend/StrongARM/CodeGen.spec, Backend/StrongARM/SAFrame.java, Tools/PatMat/MaximalMunchCGG.java, Backend/Generic/Frame.java, Backend/Generic/GenericCodeGen.java: FSK: made some changes in an effort to debug MMCGG FSK: also added a method to the Frame interface to FSK: help with regalloc, though I didn't make it FSK: abstract so duncan doesn't have to worry about FSK: implementing it. * Backend/Maps/NameMap.java: FSK: fixing a bug that kept this from COmpiling * Backend/Maps/NameMap.java: FSK: made NameMap have a non-static version FSK: of munge(HMethod) to make the transition FSK: to passing NameMaps around easier * IR/Tree/ToTree.java: FSK: made ToTree use NameMap...we should change FSK: it to not be a static call * Backend/Maps/NameMap.java, Backend/Maps/OffsetMap32.java, IR/Tree/ToTree.java, Tools/PatMat/MaximalMunchCGG.java: FSK: 1. Made a NameMap that conforms to the JNI spec (I think) FSK: 2. Worked on trying to track down where method labels FSK: are created, since my name map doesn't seem to be FSK: used where it should FSK: 3. Modified MMCGG to check the types when munching MOVEs * Backend/Maps/NameMap.java: New file. * Backend/StrongARM/CodeGen.spec, IR/Tree/Print.java: FSK: added some more helpful stuff to Tree.Print and used it FSK: in CodeGen.spec * Backend/Generic/Code.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/SACode.java, IR/Tree/Print.java, Tools/PatMat/MaximalMunchCGG.java: FSK: 1. Fixing stuff for CodeGeneration: added support for FSK: METHOD Tree element in the spec file and MMCGG FSK: 2. Still revising the register substitution routines, FSK: this time trying to make them shoot down bad FSK: formats before they get overlooked (back to fail-fast FSK: baby FSK: 3. Made the print methods in the Tree.Print class public FSK: so I could debug stuff more easily 1999-08-06 marinov * Util/SFRE.java, Util/SORE.java: Some old useless classes that need not be here. 1999-08-06 pnkfelix * Backend/StrongARM/SAFrame.java: FSK: implemented "doubleword"-ified makeLoad and makeStore FSK: however, I think I also uncovered a bug in my design FSK: of these methods...using a simple ordinal number for offset FSK: seems to complicate the handling of double words. I'm FSK: probably going to have to redesign something, the question FSK: is whether I can keep the current interface and still have FSK: things work * Analysis/Instr/RegAlloc.java, Backend/Generic/Code.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/SACode.java, Backend/StrongARM/SAFrame.java: FSK: rewrote the register substitution routines in Code, first FSK: attempting to make them more understandable using FSK: the StreamTokenizer class, then realizing that StreamTokenizer FSK: is quite possibly the worst designed class in the JDK, and FSK: went back to our looping-over-the-char-array design. FSK: The point is, now we can extract the suffix for temp references FSK: (that l and h stuff) and properly determine what register FSK: that (Instr x Temp x Suffix) maps to. 1999-08-06 C. Scott Ananian * GNUmakefile: As per Felix's badgering, fixed 'make wc' target so that it doesn't count code in the Contrib directory. This means that I now own one more of the top five longest source files: SCCAnalysis is now number 5. Mu-ha-ha-ha-ha-ha. Time for the rest of you to start combining all your classes together into monsters able to challenge the throne. ;-) [anyone catch that every line in this commit message is the same length?] 1999-08-06 bdemsky * IR/Jasmin/Jasmin.java, IR/Jasmin/TempInfo.java, IR/Jasmin/TypeInfo.java: Moved files per Scott's request. Changes: Wasn't handling allocation of temps to stack correctly. Added code to prevent temps from being allocated to stack during try blocks. Wouldn't want an exception to throw away something useful! * IR/Jasmin/Jasmin.java, IR/Jasmin/TempInfo.java, IR/Jasmin/TypeInfo.java: New file. 1999-08-06 pnkfelix * Backend/Generic/Code.java: FSK: make Code.toAssem() more accepting of badly written FSK: assembly strings (this does violate our general principle FSK: of "fail-fast", but it's more important for me right now FSK: to be able to print out the Code, in whatever state its in, FSK: than to be told when the state of the Code is inconsistent * IR/Tree/METHOD.java: FSK: fixed a trivial (yet deadly) bug in METHOD's toString() method 1999-08-05 C. Scott Ananian * Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java: Add support for new THROW format; remove 'is this right' comment by METHOD production. 1999-08-05 duncan * IR/Tree/METHOD.java, IR/Tree/Print.java, IR/Tree/THROW.java, IR/Tree/ToTree.java: Incorporated the new METHOD object into the Tree form, and fixed a few silly bugs. Also, added a pointer to the exception-handling code in the THROW object. * IR/Tree/METHOD.java, IR/Tree/Print.java, IR/Tree/Tree.java, IR/Tree/TreeVisitor.java: Scott was, of course, correct about the exceptional return location in the METHOD object. I should not be allowed to check in code after 3am :) Also I'd forgotten to commit the updated visitor class & print class. Here they are for your visiting and printing pleasure! 1999-08-05 C. Scott Ananian * Util/Util.java: Silly bug in Util.fls(). SCCAnalysis uses this. The rest of you are probably baffled by its apparently uselessness. * GNUmakefile: Makefile tweaks. * Tools/PatMat/Lexer.jlex, Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java: Add provisional support to the .spec file grammar for: - NATIVECALL as Exp rather than Stm? - a form of the METHOD tree. some modifications to the grammar might be made as these Tree changes are finalized, but this'll do for now. [this message brought to you by the committee to keep felix's life busy] * IR/Tree/TreeKind.java: Duncan forgot this. * bin/unmunge: Compress the status messages unmunge prints. 1999-08-05 duncan * IR/Tree/METHOD.java: Added a METHOD object for Tree form * IR/Tree/METHOD.java: New file. * IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java, IR/LowQuad/Translate.java: Still more javadoc & cosmetic upgrade (i.e. conforming with existing indentation conventions). Also collection-ized these classes. Upon inspection, I'm not too crazy about passing around codefactories when we don't recognize their codenames, although I guess I can think of situations where it might shorten the code a bit. * Analysis/DataFlow/TreeSolver.java: More javadoc * Interpret/Tree/InterpreterAllocationStrategy.java, Interpret/Tree/InterpreterCachingCodeFactory.java: Added javadoc 1999-08-04 duncan * IR/Tree/ToTree.java: Modified ToTree to generate CALLs such that * CALL.retex is actually a pointer to exception handling code, as opposed to a location for exceptional return values * There is no code to explicitly check for a thrown exception after a procedure call I also seized this chance to clean up a few things in the ToTree class that were bothering me: * Collection-ized the code * Fixed a bug which would generate correct (but foolish code) that would insert redundant JUMP instructions that would simply JUMP to the next statement * Added a few comments & made some of the stranger sections of code a bit more readable Sorry Scott, I didn't modify the THROW object to contain a pointer to the exception handler. I couldn't think of a way to do it that wouldn't have been more trouble than it was worth, and the code generator doesn't really need this information. I still have to add code that deals with the case when my simplistic pattern matcher doesn't match the explicit exception checks generated by the quad form. 1999-08-04 C. Scott Ananian * ClassFile/HClass.java, IR/Quads/CALL.java, IR/Quads/CJMP.java, IR/Quads/CONST.java, IR/Quads/METHOD.java, IR/Quads/TempChain.java, IR/Tree/package.html, Util/Default.java, Analysis/Maps/SetTypeMap.java: Some trivial javadoc tweaks. People need to write package.html files for their packages. Look at Felix's JDK 1.2 javadoc pages, and fill in the blanks, please. 1999-08-04 pnkfelix * Analysis/Instr/RegAlloc.java, Backend/StrongARM/SATempVisitor.java: FSK: fixing broken stuff * Analysis/Instr/RegAlloc.java, Backend/StrongARM/SAFrame.java: FSK: last minute changes/comments. still discouraged by FSK: visitation hierarchy problem. * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/TempInstrPair.java, Backend/Generic/Code.java, Backend/StrongARM/SACode.java, Backend/StrongARM/SAFrame.java, Backend/StrongARM/SATempVisitor.java, IR/Assem/Instr.java, Temp/Temp.java, Temp/TempVisitor.java: FSK: << sigh >> Once again, my attempts to make the FSK: Visitor pattern more useful have been foiled. FSK: I really really wanted to extend the visitation FSK: hierarchy, but my quick attempt in these classes FSK: didn't work (for a description of what was supposed FSK: to happen, find a backup of Temp/TempVisitor and read FSK: its class javadoc FSK: FSK: Anyway, I'm depressed and developing a headache now, FSK: so off I go. I'll try to put in something that works later FSK: tonight...i have a bit more thinking to do if I'm going FSK: to stick to this 'local extensions of Temps in each FSK: Backend' approach * Analysis/Instr/RegAlloc.java, Backend/StrongARM/SAFrame.java, Backend/StrongARM/SATempVisitor.java, Backend/StrongARM/TwoWordTemp.java, GNUmakefile, Temp/Temp.java, Temp/TempVisitor.java: FSK: 1. added the infrastructure for making TempVisitors to FSK: make the Backend code easy. FSK: 2. Modified documentation to be more readable or informative (or FSK: possibly both!) FSK: 3. Modified the makefile to do munge/unmunge only once when FSK: doing a 'make doc' * Backend/StrongARM/SATempVisitor.java, Temp/TempVisitor.java: New file. 1999-08-04 C. Scott Ananian * Util/HClassUtil.java: Make the assertion more self-explanatory. 1999-08-04 pnkfelix * Analysis/Instr/RegAlloc.java: FSK: officially switched register allocation function to use FSK: brain-dead method instead of my hard-researched techniques FSK: <> C;) FSK: also updated some doc in the process in an attempt to make FSK: the Register Allocation classes more clear * Analysis/Instr/RegAlloc.java: FSK: finished implementation of BrainDeadInstrVisitor FSK: now time to fixup the fixup-code in RegAlloc to FSK: properly handle multi-dst/src FskLoad/Stores. * Analysis/Instr/RegAlloc.java, Backend/Generic/Frame.java, Util/LinearMap.java, Util/LinearSet.java, Util/ListFactory.java, Util/PairMapEntry.java: FSK: Working on finishing up a register allocator which will FSK: really serve as more of an example of how to use the new FSK: interface to the Frame and Code classes in the register FSK: allocator. FSK: In the process, made a set of utility classes for simplifying FSK: my work (I couldn't convince myself that a HashMap or TreeMap FSK: were appropriate internal representations for a 16 element FSK: register file, but if I'm going to write such a generic class, FSK: might as well expose it rather than make it internal to the FSK: register allocator) * Util/LinearMap.java, Util/LinearSet.java, Util/ListFactory.java, Util/PairMapEntry.java: New file. 1999-08-04 C. Scott Ananian * IR/Quads/UnHandler.java: Fix an UnHandler bug that was causing the last HANDLER block to summarily become the default handler for all exceptions, whether they matched its catch specification or not. Thanks to Duncan for finding this baddie. * IR/Tree/Code.java, IR/Tree/DATA.java, IR/Tree/Data.java, IR/Tree/INVOCATION.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/RETURN.java, IR/Tree/SEGMENT.java, IR/Tree/THROW.java, IR/Tree/ToCanonicalTree.java, IR/Tree/ToTree.java, IR/Tree/TreeCode.java, IR/Tree/TreeKind.java, IR/Tree/TreeVisitor.java, Interpret/Tree/ArrayPointer.java, Interpret/Tree/ArrayRef.java, Interpret/Tree/ClazPointer.java, Interpret/Tree/ConstPointer.java, Interpret/Tree/FieldPointer.java, Interpret/Tree/InterfaceList.java, Interpret/Tree/InterfaceListPointer.java, Interpret/Tree/InterpreterAllocationStrategy.java, Interpret/Tree/InterpreterCachingCodeFactory.java, Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/Method.java, Interpret/Tree/ObjectRef.java, Interpret/Tree/Pointer.java, Interpret/Tree/PointerTypeChangedException.java, Interpret/Tree/StringPointer.java, Interpret/Tree/TreeStackFrame.java, Interpret/Tree/UndefinedPointer.java, Interpret/Tree/UndefinedRef.java, Main/CHStats.java, Main/CallGraph.java, Main/Graph.java, RunTime/Monitor.java, Temp/Label.java, Temp/LabelList.java, Temp/Temp.java, Temp/TempList.java, Tools/PatMat/ErrorMsg.java, Util/BitString.java, Util/FIFO.java, Util/UniqueFIFO.java, Util/UniqueVector.java, Util/Util.java, Analysis/Loops/LoopFinder.java, Analysis/Partition/Main.java, Analysis/Partition/Partition.java, Analysis/Partition/PartitionGraphViewer.java, Analysis/Partition/WGNode.java, Analysis/Partition/WeightedGraph.java, Analysis/Tree/TreeFolding.java, Analysis/Tree/TreeStructure.java, Backend/Generic/Code.java, Backend/Generic/DefaultFrame.java, Backend/Maps/InlineMap.java, Backend/Maps/OffsetMap.java, Backend/Maps/OffsetMap32.java, Backend/StrongARM/ExpValue.java, Backend/StrongARM/SAFrame.java, ClassFile/HClass.java, ClassFile/HClassCls.java, ClassFile/HClassSyn.java, ClassFile/HCode.java, ClassFile/HCodeElement.java, ClassFile/HConstructor.java, ClassFile/HConstructorSyn.java, ClassFile/HData.java, ClassFile/HField.java, ClassFile/HFieldSyn.java, ClassFile/HMember.java, ClassFile/HMethod.java, ClassFile/HMethodSyn.java, ClassFile/Loader.java, IR/Assem/Edge.java, IR/Assem/Instr.java, IR/Assem/InstrDIRECTIVE.java, IR/Assem/InstrFactory.java, IR/Assem/InstrLABEL.java, IR/Bytecode/Code.java, IR/Bytecode/InCti.java, IR/Bytecode/InGen.java, IR/Bytecode/InMerge.java, IR/Bytecode/InSwitch.java, IR/Bytecode/Instr.java, IR/Bytecode/Op.java, IR/Bytecode/OpClass.java, IR/Bytecode/OpConstant.java, IR/Bytecode/OpField.java, IR/Bytecode/OpLocalVariable.java, IR/Bytecode/OpMethod.java, IR/Bytecode/Operand.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java, IR/Quads/Quad.java, IR/Quads/ToNoSSA.java, IR/RawClass/AccessFlags.java, IR/RawClass/Attribute.java, IR/RawClass/AttributeCode.java, IR/RawClass/AttributeConstantValue.java, IR/RawClass/AttributeExceptions.java, IR/RawClass/AttributeInnerClasses.java, IR/RawClass/AttributeLineNumberTable.java, IR/RawClass/AttributeLocalVariableTable.java, IR/RawClass/AttributeSourceFile.java, IR/RawClass/AttributeSynthetic.java, IR/RawClass/AttributeUnknown.java, IR/RawClass/ClassDataException.java, IR/RawClass/ClassDataInputStream.java, IR/RawClass/ClassDataOutputStream.java, IR/RawClass/ClassFile.java, IR/RawClass/Constant.java, IR/RawClass/ConstantClass.java, IR/RawClass/ConstantDouble.java, IR/RawClass/ConstantFieldref.java, IR/RawClass/ConstantFloat.java, IR/RawClass/ConstantInteger.java, IR/RawClass/ConstantInterfaceMethodref.java, IR/RawClass/ConstantLong.java, IR/RawClass/ConstantMethodref.java, IR/RawClass/ConstantNameAndType.java, IR/RawClass/ConstantString.java, IR/RawClass/ConstantUtf8.java, IR/RawClass/ConstantValue.java, IR/RawClass/ExceptionTable.java, IR/RawClass/FieldInfo.java, IR/RawClass/InnerClass.java, IR/RawClass/LineNumberTable.java, IR/RawClass/LocalVariableTable.java, IR/RawClass/MethodInfo.java, IR/Tree/CanonicalTreeCode.java, Analysis/DataFlow/BackwardDataFlowQuadVisitor.java, Analysis/DataFlow/BasicBlock.java, Analysis/DataFlow/BasicBlockVisitor.java, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/DataFlow/DataFlowQuadVisitor.java, Analysis/DataFlow/ForwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/ForwardDataFlowQuadVisitor.java, Analysis/DataFlow/QuadBasicBlock.java, Analysis/DataFlow/QuadEnumerator.java, Analysis/DataFlow/QuadSolver.java, Analysis/DataFlow/ReachingDefInfo.java, Analysis/DataFlow/ReachingDefs.java, Analysis/DataFlow/ReversePostOrderEnumerator.java, Analysis/DataFlow/ReversePostOrderIterator.java, Analysis/DataFlow/TreeSolver.java: Fix the month-off-by-one error in the first-check-in date string. * bin/copyright.perl: Oops! Checked-in version has an off-by-one error in the month. Fixed now. Also added code to insert first check-in time for files not currently possessing a "created on" date. * IR/Tree/Exp.java, IR/Tree/ExpList.java, IR/Tree/INVOCATION.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/NATIVECALL.java, IR/Tree/OPER.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/Print.java, IR/Tree/RETURN.java, IR/Tree/SEGMENT.java, IR/Tree/SEQ.java, IR/Tree/Stm.java, IR/Tree/StmList.java, IR/Tree/TEMP.java, IR/Tree/THROW.java, IR/Tree/ToCanonicalTree.java, IR/Tree/ToTree.java, IR/Tree/TreeCode.java, IR/Tree/TreeKind.java, IR/Tree/TreeVisitor.java, IR/Tree/Typed.java, IR/Tree/UNOP.java, Interpret/Quads/ArrayRef.java, Interpret/Quads/FieldValueList.java, Interpret/Quads/HCLibrary.java, Interpret/Quads/INClass.java, Interpret/Quads/INFileInputStream.java, Interpret/Quads/INFileOutputStream.java, Interpret/Quads/INFloatDouble.java, Interpret/Quads/INObject.java, Interpret/Quads/INRandomAccessFile.java, Interpret/Quads/INRuntime.java, Interpret/Quads/INString.java, Interpret/Quads/INSystem.java, Interpret/Quads/InterpretedThrowable.java, Interpret/Quads/Method.java, Interpret/Quads/NativeMethod.java, Interpret/Quads/NativeStackFrame.java, Interpret/Quads/ObjectRef.java, Interpret/Quads/QuadStackFrame.java, Interpret/Quads/Ref.java, Interpret/Quads/StackFrame.java, Interpret/Quads/StaticState.java, Interpret/Quads/Support.java, Interpret/Tree/ArrayPointer.java, Interpret/Tree/ArrayRef.java, Interpret/Tree/ClazPointer.java, Interpret/Tree/ConstPointer.java, Interpret/Tree/FieldPointer.java, Interpret/Tree/FieldValueList.java, Interpret/Tree/HCLibrary.java, Interpret/Tree/INClass.java, Interpret/Tree/INFileInputStream.java, Interpret/Tree/INFileOutputStream.java, Interpret/Tree/INFloatDouble.java, Interpret/Tree/INObject.java, Interpret/Tree/INRandomAccessFile.java, Interpret/Tree/INRuntime.java, Interpret/Tree/INString.java, Interpret/Tree/INSystem.java, Interpret/Tree/InterfaceList.java, Interpret/Tree/InterfaceListPointer.java, Interpret/Tree/InterpretedThrowable.java, Interpret/Tree/InterpreterAllocationStrategy.java, Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/Method.java, Interpret/Tree/NativeMethod.java, Interpret/Tree/NativeStackFrame.java, Interpret/Tree/ObjectRef.java, Interpret/Tree/Pointer.java, Interpret/Tree/PointerTypeChangedException.java, Interpret/Tree/Ref.java, Interpret/Tree/StackFrame.java, Interpret/Tree/StaticState.java, Interpret/Tree/StringPointer.java, Interpret/Tree/Support.java, Interpret/Tree/TestRun.java, Interpret/Tree/TreeStackFrame.java, Interpret/Tree/UndefinedPointer.java, Interpret/Tree/UndefinedRef.java, Main/Run.java, Main/TypesMain.java, RunTime/Monitor.java, Temp/Label.java, Temp/LabelList.java, Temp/TempFactory.java, Temp/WritableTempMap.java, Tools/PatMat/ErrorMsg.java, Util/ArrayFactory.java, Util/BitString.java, Util/Graph.java, Util/SFRE.java, Util/SORE.java, Analysis/DataFlow/BasicBlockVisitor.java, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/DataFlow/DataFlowQuadVisitor.java, Analysis/DataFlow/ForwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/ForwardDataFlowQuadVisitor.java, Analysis/DataFlow/QuadBasicBlock.java, Analysis/DataFlow/QuadEnumerator.java, Analysis/DataFlow/QuadSolver.java, Analysis/DataFlow/ReachingDefInfo.java, Analysis/DataFlow/ReachingDefs.java, Analysis/DataFlow/ReversePostOrderEnumerator.java, Analysis/DataFlow/ReversePostOrderIterator.java, Analysis/DataFlow/TreeSolver.java, Analysis/GraphColoring/Color.java, Analysis/GraphColoring/ColorFactory.java, Analysis/GraphColoring/ColorableGraph.java, Analysis/GraphColoring/ColorableNode.java, Analysis/GraphColoring/EdgeNotPresentException.java, Analysis/GraphColoring/Graph.java, Analysis/GraphColoring/GraphColorer.java, Analysis/GraphColoring/IllegalEdgeException.java, Analysis/GraphColoring/NoFactorySetException.java, Analysis/GraphColoring/Node.java, Analysis/GraphColoring/NodeAlreadyColoredException.java, Analysis/GraphColoring/NodeNotColoredException.java, Analysis/GraphColoring/NodeNotPresentInGraphException.java, Analysis/GraphColoring/NodeNotRemovedException.java, Analysis/GraphColoring/ObjectNotModifiableException.java, Analysis/GraphColoring/SimpleGraphColorer.java, Analysis/GraphColoring/SparseGraph.java, Analysis/GraphColoring/SparseNode.java, Analysis/GraphColoring/UncolorableGraphException.java, Analysis/GraphColoring/WrongNodeTypeException.java, Analysis/Loops/LoopFinder.java, Analysis/LowQuad/Loop/WorkTempMap.java, Analysis/Maps/SetTypeMap.java, Analysis/Partition/Main.java, Analysis/Partition/Partition.java, Analysis/Partition/PartitionGraphViewer.java, Analysis/Partition/WGNode.java, Analysis/Partition/WeightedGraph.java, Analysis/Tree/TreeFolding.java, Analysis/Tree/TreeStructure.java, Analysis/TypeInference/AuxUniqueFIFO.java, Analysis/TypeInference/ClassCone.java, Analysis/TypeInference/FieldType.java, Analysis/TypeInference/InterProc.java, Analysis/TypeInference/SetHClass.java, Backend/Generic/DefaultFrame.java, Backend/Maps/ClassDepthMap.java, Backend/Maps/DefaultClassDepthMap.java, Backend/Maps/DefaultFinalMap.java, Backend/Maps/DefaultInlineMap.java, Backend/Maps/DefaultOffsetMap.java, Backend/Maps/FieldMap.java, Backend/Maps/FinalMap.java, Backend/Maps/InlineMap.java, Backend/Maps/MethodMap.java, Backend/Maps/OffsetMap.java, Backend/Maps/OffsetMap32.java, ClassFile/ClassPointer.java, ClassFile/HData.java, ClassFile/HPointer.java, IR/Bytecode/InRet.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java, IR/Quads/HandlerSet.java, IR/Quads/Peephole.java, IR/Quads/Print.java, IR/Quads/QuadFactory.java, IR/Quads/QuadKind.java, IR/Quads/QuadNoSSA.java, IR/Quads/QuadWithTry.java, IR/Quads/ReHandler.java, IR/Quads/TYPECAST.java, IR/Quads/ToNoSSA.java, IR/Quads/UnHandler.java, IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/CanonicalTreeCode.java, IR/Tree/Code.java, IR/Tree/DATA.java, IR/Tree/Data.java, IR/Tree/ESEQ.java, IR/Tree/EXP.java, Analysis/DataFlow/BackwardDataFlowQuadVisitor.java, Analysis/DataFlow/BasicBlock.java, Analysis/InterfaceMethodMap.java: Add GNU GPL boilerplate to all files currently missing it, using magical perl script. * bin/copyright.perl: Check in perl script to fixup copyright header at top of java files. * bin/copyright.perl: New file. * IR/AIRE/IR_SourceLanguage.java, Interpret/Tree/InterpreterAllocationStrategy.java, Interpret/Tree/InterpreterCachingCodeFactory.java, Temp/Label.java, Temp/LabelList.java, Temp/TempList.java, Tools/PatMat/ErrorMsg.java, IR/AIRE/IR_DelayMechanism.java, IR/AIRE/IR_Kind.java, IR/AIRE/IR_Mode.java, IR/AIRE/IR_Pure.java, IR/AIRE/IR_SignalKind.java, Analysis/DataFlow/BasicBlockVisitor.java, Analysis/DataFlow/ReachingDefInfo.java, Analysis/DataFlow/TreeSolver.java: Added @author and @version tags to all source files that were missing them. Duncan, there are several classes with no class-level javadoc. I've tagged them with "FILL ME IN", and they should be very obvious when looking through Felix's JDK 1.2 javadoc. Please fill these in with at least a terse description of what these classes are meant to do. * IR/Quads/FixupFunc.java: Check in phi/sig counting code. This is statistics infrastructure, for the thesis. Not strictly necessary to check it in, but having modified files in my tree is annoying me. * bin/munge, bin/unmunge, bin/unmunge.awk: rewrite munge and unmunge for better speed. also because i needed a break from thesis writing and perl is working to seduce me. ML's exotic and beautiful, but perl will do you on a dark night, no questions asked... 1999-08-03 C. Scott Ananian * IR/Quads/QuadNoSSA.java, IR/Quads/QuadSSA.java, IR/Quads/QuadWithTry.java: Add some more implicit-chaining cases to the codeFactory() methods of quad-ssa, quad-no-ssa, and quad-with-try forms, to further my eventual goal of specifying code factory compositions on the compiler command-line. Also, update some documentation which had fallen behind implementation, especially in the case of the ReHandler and QuadSSA->QuadNoSSA converter. 1999-08-03 pnkfelix * Backend/StrongARM/SACode.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java, IR/Tree/CanonicalTreeCode.java, IR/Tree/TreeCode.java: FSK: added and improved javadoc. that's enough mindless documentation FSK: for now...time to start thinking about switching from FSK: PriorityQueues to TreeSets in the register allocator. * IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java, IR/Tree/CanonicalTreeCode.java, IR/Tree/TreeCode.java: FSK: documented my changes to the Codes for the various IRs * Backend/Generic/Code.java, Backend/StrongARM/SACode.java: FSK: experimenting with changing the interface for Register FSK: Assignment, in the interest of making the Register Allocator FSK: simple and understandable * Backend/Generic/Code.java, Backend/StrongARM/SACode.java, Main/SAMain.java: FSK: 1. Made print output more informative for Generic/Code FSK: 2. Made SACode as accepting of other HCodeFactories as FSK: Codes for other IRs earlier in the assembly line FSK: 3. Made SAMain print out code first sorted by IR, then by FSK: method (as opposed to the prior method of printing FSK: each method in order, with all the IRs in a row). While FSK: this makes matching up the same methods in different IRs FSK: more difficult, it makes SAMain print out more information FSK: (since in the earlier setup it would die on the first FSK: failed assertion, and therefore usually one would only FSK: see output for a single method (usually the method, FSK: which isn't really what I want to see in most cases)). * IR/Tree/CanonicalTreeCode.java, IR/Tree/TreeCode.java, Main/SAMain.java, Tools/PatMat/MaximalMunchCGG.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Backend/Generic/Code.java, Backend/Generic/GenericCodeGen.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/SACode.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java: FSK: 1. Worked on adding additional debugging information to FSK: MMCGG, in the process extending the GenericCodeGen FSK: interface to make it easier to write debugging code FSK: for all CGGs FSK: 2. Got rid of some superfluous debugging print statements FSK: that were hard to track down. FSK: 3. Changed FSK-STORE and FSK-LOAD instructions into actual FSK: classes (internal to RegAlloc and its subclasses) and FSK: added a specialized InstrVisitor for working with the FSK: new classes FSK: 4. Updated doc for RegAlloc, making the design significantly FSK: more correct (before, it tried to allocate stack space FSK: for ALL kinds of InstrMEMs, and essentially acted pretty FSK: stupid with regards to how InstrMEMs should be handled. FSK: Now, with localized InstrMEM subclasses, RegAlloc can FSK: more effectively identify what instructions it should FSK: be fiddling with.) FSK: 5. Updated the codeFactory() method for several IRs, FSK: making them more accepting of input that they don't FSK: know how to deal with (instead of failing immediately, FSK: they pass the input onto the IR that they DO know how FSK: to deal with.) This allows us to, for example, pass FSK: a QuadSSA code factory to TreeCode, and the system FSK: will recursively resolve the order in which each FSK: factory should be created. FSK: While this does make code easier to write, the resulting FSK: code is by no means as efficient as it would be if a FSK: few CachingCodeFactorys were sprinkled along the FSK: assembly line. 1999-08-03 C. Scott Ananian * IR/Tree/CALL.java, IR/Tree/NAME.java: better documentation on how CALL works when exceptions are involved. * IR/Tree/CALL.java: Whoops! Duncan forgot this. 1999-08-03 bdemsky * IR/Quads/ReHandler.java: Few changes...Things from a past life were still around. 1999-08-03 pnkfelix * Backend/Generic/GenericCodeGen.java, Backend/StrongARM/CodeGen.spec, Tools/PatMat/MaximalMunchCGG.java: FSK: Okay I fixed the "incomplete spec-file" assertion failure FSK: we were getting, but in the process I think I've found FSK: symptoms of a TERRIBLE TERRIBLE bug: MMCGG is probably FSK: not performing a truly Maximal munch. This is badbadbad! FSK: And unfortunately its very hard to debug. So I'll start FSK: going back over the code for MMCGG to see if I can decipher FSK: what's going on. 1999-08-03 duncan * IR/Tree/CALL.java, IR/Tree/INVOCATION.java, IR/Tree/NATIVECALL.java, IR/Tree/Print.java: Removed NATIVECALL.retex from the IR.Tree package * Interpret/Tree/ConstPointer.java, Interpret/Tree/InterfaceList.java, Interpret/Tree/InterpreterCachingCodeFactory.java, Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/Method.java, Interpret/Tree/StaticState.java, Interpret/Tree/TestRun.java: Removed all evidence of NATIVECALL.retex 1999-08-03 C. Scott Ananian * Tools/PatMat/Lexer.jlex, Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java: Allow CONST(null) pattern in the CGG grammar as well as existing CONST

(c) pattern to match a null constant. Or you could go all the way and match with CONST

(null). Although the grammar supports CONST(null), this generates a new LeafNull type which the code-generator-generator doesn't yet handle. So until Felix extends the CGG, use the CONST

(c) pattern in your spec files. * Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java: Removed transitional NATIVECALL cruft from CGG parser/ir. 1999-08-03 pnkfelix * Backend/StrongARM/CodeGen.spec, Tools/PatMat/MaximalMunchCGG.java: FSK: Fixed things so that NATIVECALL processing in the FSK: pattern matcher doesn't break...now its FSK: your turn duncan. C:) 1999-08-03 C. Scott Ananian * GNUmakefile: Allow user to override JAVA to specify java runtime options when invoking the parser-, lexer-, or code-generator- generator. 1999-08-03 duncan * IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/DATA.java, IR/Tree/Data.java, IR/Tree/ESEQ.java, IR/Tree/EXP.java, IR/Tree/Exp.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/NATIVECALL.java, IR/Tree/Print.java, IR/Tree/RETURN.java, IR/Tree/SEGMENT.java, IR/Tree/SEQ.java, IR/Tree/Stm.java, IR/Tree/TEMP.java, IR/Tree/THROW.java, IR/Tree/ToCanonicalTree.java, IR/Tree/TreeCode.java, IR/Tree/UNOP.java: Changes here include: 1) The ToCanonicalTree class (which was largely copied from appel's book) had to be revamped to preserve Tree/TempFactory consistency. 2) a build(TreeFactory, Exp) method was added to Exps (and a similar one for Stms) to allow reconstruction of a Tree with a different TreeFactory 3) data view now works correctly (minus reflection & GC tables) 1999-08-03 C. Scott Ananian * IR/Tree/NATIVECALL.java: Document IR.Tree.NATIVECALL better. * Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java: Transitional CGG grammar that provisionally accepts a new form of NATIVECALL with no retex argument. 1999-08-03 pnkfelix * Backend/StrongARM/CodeGen.spec: FSK: 1. incorporated InstrMOVE into the spec-file with a FSK: emitMOVE helper function. FSK: 2. switched the CALL and NATIVECALL pattern to FSK: match 'NAME(retex)' instead of just 'retex' so FSK: that we reference the name of the location of retex FSK: and not retex directly. * Analysis/Instr/LocalCffRegAlloc.java, Backend/Generic/Frame.java: FSK: a little bit of code that doesn't amount to squat (going to FSK: be rewritten tomorrow). More important are the documentation FSK: updates, though some of them are admittedly just notes to myself FSK: that just seemed to flow from the pen. 1999-08-02 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java: FSK: <> that void I mentioned in the earlier commit message FSK: wasn't as empty as I thought. Backed out the changed to the FSK: javadoc (since I'm no longer using the "fix" that they document * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, IR/Assem/InstrMOVE.java, IR/Assem/InstrVisitor.java: FSK: continued work on merging the new Register Allocation design FSK: with the implemented Register Allocator (complete with the empty FSK: void once occupied by full implementation of a fix for a FSK: "problem" in LocalCffRegAlloc prior to the removal of said fix FSK: after the implementor took the time to realize FSK: 1. the fix couldn't work the way it was planned FSK: 2. the problem was already solved by a later stage in register FSK: allocation ) FSK: FSK: Also added a new InstrMOVE class, at the request of Scott, and FSK: modified InstrVisitor accordingly. * IR/Assem/InstrMOVE.java: New file. * Analysis/Instr/LocalCffRegAlloc.java: FSK: In preperation for incorporating the new Register Allocation FSK: interface into the Conservative Furthest First allocator, FSK: I added a toMap() method to LocalCff's internal representation FSK: for the register file (grafting the Map interface onto the FSK: interface used by the internal class would have been needlessly FSK: painful, and besides this allows me to make the register file's FSK: state mutable within LocalCff while exporting an immutable FSK: view of the register file outside of LocalCff) * Main/SAMain.java: FSK: a quick Main class to compile to StrongARM code; hate FSK: to pollute the CVS repository with it, but desperate FSK: times call for desperate measures and this will make FSK: the collaboration between duncan and me easier. * Main/SAMain.java: New file. * Backend/StrongARM/CodeGen.spec: FSK: implemented pattern to match THROW (using the convention FSK: specified after the meeting...would it be worthwhile for FSK: one of us three (Duncan, Scott, and I) to try to write up FSK: the convention more formally for the future generations FSK: of Backend implementors?) and changed the CALL and NATIVECALL FSK: patterns to use the new convention. 1999-08-02 C. Scott Ananian * Main/CHStats.java: Fix class hierarchy statistics generator to count interface inheritance properly. * Util/Graph.java, Main/Graph.java: Add code for printing class hierarchy graphs. Also for my thesis. * ClassFile/HClass.java: Ack --- if you don't specify a constructor, java inserts a public one for you... and the constructor for HClass shouldn't be public! Define a do-nothing protected constructor to get the permissions back in line. * GNUmakefile: Speed up 'make' by avoiding recomputation of the source list & such, when possible. * Main/CHStats.java: A driver to compute some stats on the FLEX class hierarchy for my thesis. * Main/CHStats.java: New file. 1999-07-30 C. Scott Ananian * GNUmakefile: Hmm. Harpoon.jar file wasn't being made correctly, because classes with dollar signs in their names (inner or anonymous classes) were undergoing variable expansion in the shell, resulting in foo$bar.class being replaced by foo.class. Bash is just too clever by half. I've outwitted it this time, though. (Mu-ha-ha-ha-ha-ha) 1999-07-30 pnkfelix * Tools/PatMat/MaximalMunchCGG.java, Backend/Generic/GenericCodeGen.java, Backend/StrongARM/CodeGen.spec, Backend/StrongARM/SACode.java, IR/Assem/Instr.java, Support/NullCodeGen.template, Tools/PatMat/CodeGeneratorGenerator.java, GNUmakefile: FSK: Messed around a lot with the CGG...Managed to get things to FSK: the point where MMCGG actually scans the Tree and outputs FSK: some assembly (not running assembly, but still...) FSK: Hit a wall however when MMCGG complained that the Spec file FSK: doesn't have enough patterns to match a MOVE(TEMP, CONST) FSK: pattern; that shouldn't be a problem. FSK: So there's still plenty to do. Anyway, all of this involved FSK: changing a few interfaces here and there, but the bulk of FSK: the work was adding hacks to MMCGG 1999-07-30 C. Scott Ananian * IR/Tree/OptimizedTreeCode.java: Old-school javac barfing on 'final's. On the Great Day Of Reckoning, we will all upgrade to JDK 1.2 and sed all those "/*final*/"s into "final"s once more. And oh, what rejoicing there will be. 1999-07-30 duncan * IR/Tree/ToCanonicalTree.java: Uses TreeCode.clone() instead of Tree.clone() to maintain consistency between the Tree object's TreeFactories * ClassFile/HData.java: Added a print() method to the HData interface 1999-07-30 bdemsky * IR/Quads/QuadWithTry.java, IR/Quads/ReHandler.java: Code implemented to convert QuadNoSSA-->QuadWithTry in the most trivial way. Better methods will be developed later. Transformation done is: CALL returning exception value in temp1 to L0: CALL with exceptions thrown DIRECTLY L1: temp1=CONST(null) L2: PHI[L1, H1] H1: temp1=Handler for any protecting [L0] Goto L2 * IR/Quads/ReHandler.java: New file. 1999-07-30 pnkfelix * Backend/StrongARM/SACode.java: FSK: bad me. checked in broken code. bad bad bad * Backend/StrongARM/SACode.java, IR/Tree/Code.java: FSK: working towards getting a working compiler. Removed a FSK: mistaken assertion, reorganized some code, and now things FSK: are set up so that I can really dig my hands into the FSK: StrongARM spec file. 1999-07-30 duncan * IR/Tree/Tree.java: Documented the change to Tree.clone() * IR/Tree/CanonicalTreeCode.java, IR/Tree/Code.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/Print.java, IR/Tree/TEMP.java, IR/Tree/ToCanonicalTree.java, IR/Tree/TreeCode.java: Updated Tree.clone() to not attempt to clone temps which are registers 1999-07-30 pnkfelix * Backend/Generic/DefaultFrame.java, Backend/StrongARM/SAFrame.java: FSK: Added calls to Util.safeCopy for the arrays of register Temps * IR/Tree/BINOP.java, IR/Tree/CJUMP.java, IR/Tree/DATA.java, IR/Tree/ESEQ.java, IR/Tree/EXP.java, IR/Tree/INVOCATION.java, IR/Tree/JUMP.java, IR/Tree/MEM.java, IR/Tree/MOVE.java, IR/Tree/RETURN.java, IR/Tree/SEQ.java, IR/Tree/THROW.java, IR/Tree/UNOP.java: FSK: okay assertion additions and a little bit o' doc. * Backend/Generic/Frame.java, Backend/StrongARM/SAFrame.java: FSK: a slew of debugging related changes. Added bunch of FSK: Tree construction assertions and a little bit o' FSK: documentation * Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Backend/Generic/Code.java, Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java, Backend/Generic/GenericCodeGen.java, Backend/StrongARM/SACode.java, IR/Assem/Instr.java, Support/NullCodeGen.template, Tools/PatMat/CodeGeneratorGenerator.java, GNUmakefile: FSK: Changed the interface to the CodeGen class, and made a safe FSK: replacement for the SACode class I deleted the other day. FSK: I've also started a little reorganization; Frame is in grave FSK: danger of becoming a so-called "God" class, where all the random FSK: functionality for a Backend is stuffed instead of being put FSK: where it belongs. In an effort to combat this, I moved a FSK: method from Frame into the Generic.Code class. FSK: I'm also trying to clean up how register name substitution is FSK: performed; the prior method was to directly call toString on FSK: each Instr, but now I'm trying to move the intelligence of FSK: the register name substitution out of Instr and into the FSK: Code class. We'll see how it works out. 1999-07-30 C. Scott Ananian * Backend/StrongARM/.cvsignore: New file. * Backend/StrongARM/.cvsignore: tell cvs to ignore generated code-generator. * Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java: Not content with fame in the on-line world, C. Scott Ananian attempts to defy fate's allotment of *only* 15 minutes of global publicity in commiting Yet Another Brilliant Piece of Code to the revolutionary FLEX project. Except in this case, the stellar patch only adds support for Tree DATA elements to the code-generator-generator (i love the sound of that) parser/lexer --- which a properly-trained monkey could have pounded out, given enough time. If only animal-training were easier! But I can't stand the urine, the newspaper, and the metal bars... http://www.salon.com/tech/feature/1999/07/30/redhat_shares/index.html ^ above URL added for the benefit of the ChangeLog. ;-) 1999-07-29 C. Scott Ananian * Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java: OK, segment enumerated constants are now parsed and lexed correctly. 1999-07-29 duncan * IR/Tree/SEGMENT.java: Added more segment types as per Scott's suggestion. 1999-07-29 C. Scott Ananian * Tools/PatMat/Spec.java, Tools/PatMat/Parser.cup: Added support for SEGMENT(id) %{ }% directives in the Spec file, in accordance with my suggestion to Duncan that TreeCodes start including them at the top. Actual segment enumerated constant names haven't been determined yet, so far as I know. * GNUmakefile: Solve the chicken-and-egg problem. Felix should be happy about this. * Support/NullCodeGen.template: A stubbed-out blank CodeGen template, involved in solving the chicken-and-egg problem. * Support/NullCodeGen.template: New file. 1999-07-28 pnkfelix * Backend/StrongARM/CodeGen.spec, Backend/StrongARM/SAFrame.java, Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/MaximalMunchCGG.java, GNUmakefile: FSK: got the spec file to conform to new interfaces (at FSK: least as far as I can see) and hacked around some FSK: compilation problems we were having in the resulting FSK: .java files * IR/Registration.java, IR/Tree/Data.java, Backend/StrongARM/SAFrame.java: FSK: fixed what I *think* was a bug in Data, and removed references FSK: to SACode from a few key files * Backend/StrongARM/SACode.java: FSK: removing a bad broken old file of Andy's. I'll try FSK: to have a working equivalent replacement tomorrow, FSK: but I'm trying to get things compilable *tonight* * Backend/Generic/GenericCodeGen.java: FSK: forgot to add a file * Backend/Generic/GenericCodeGen.java: New file. * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java, Backend/StrongARM/CodeGen.java, Backend/StrongARM/SAFrame.java, Tools/PatMat/CodeGeneratorGenerator.java, Util/BinHeapPriorityQueue.java: FSK: hard at work to get things working. FSK: scott and i discussed merging the SABackend FSK: with the standard codeFactory design, and FSK: also giving Frame a codeFactory() method. 1999-07-28 C. Scott Ananian * Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java: Ok, the new parser rules actually do something now. * Tools/PatMat/Lexer.jlex, Tools/PatMat/Parser.cup: Updated the code-generator specification for thread-safeness at Felix's request. 1999-07-28 duncan * Backend/StrongARM/SAFrame.java, Backend/Generic/DefaultFrame.java: Updated the AllocationInfo interface to return Labels & Temps as opposed to Stms and Exps. 1999-07-28 pnkfelix * Backend/StrongARM/CodeGen.spec, Backend/StrongARM/SAFrame.java, IR/Tree/MOVE.java: FSK: Some collective modifications made by Scott, Felix, and Duncan FSK: to deal with incorporating the 'nextPtr' into the Flex scheme FSK: of things 1999-07-28 duncan * Backend/Generic/DefaultFrame.java, Backend/StrongARM/SAFrame.java: Supports the new AllocationInfo interface * Backend/StrongARM/SAFrame.java: Fixed up procPrologue() in SAFrame * IR/Tree/ToTree.java: Removed some annoying debug information, added parameter types in procPrologue() method. * Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java: Added "parameter types" as parameter of the procPrologue() method. * IR/Tree/Data.java: Implementation of a data view for tree form. It compiles, but I haven't actually run it yet. In order to avoid duplication of all of the functionality present in harpoon.IR.Tree.Code, I decided to make Data extend Code, but implement HData. If anyone disagrees with this decision, I'd be happy to hear other ideas. * IR/Tree/Data.java: New file. * IR/Tree/Stm.java: Added a utility method to convert List objects to Stm objects. * ClassFile/HData.java: Added an interface to be implemented by all data views. * ClassFile/HData.java: New file. 1999-07-28 pnkfelix * Backend/StrongARM/CodeGen.spec, Tools/PatMat/MaximalMunchCGG.java: FSK: Well, in the process of trying to get the newest FSK: spec-file's corresponding CG to compile, I found FSK: a few bugs in not just the spec-file but also in FSK: the MM-CGG. Wheee. FSK: Resulting CodeGen.java file now compiles error-free. FSK: Will try incorporating it into the rest of the FSK: Flex Compiler tomorrow 1999-07-27 pnkfelix * Backend/StrongARM/CodeGen.spec: FSK: added an assertion so that things will break at compile FSK: time rather than assembly time (HOPEFULLY they would FSK: have broken at assembly time, rather than runtime...) * Backend/StrongARM/CodeGen.spec: FSK: Added support for function calls. It seems like enough FSK: patterns are filled in that i can actually start testing FSK: this puppy with the compiler. Now if only that pesky FSK: new regAlloc<->frame interface would just make itself FSK: so I wouldn't have to do it. C:P FSK: (scott, I'm kidding, no need to offer to write it up FSK: for me. C;) ) * Backend/StrongARM/CodeGen.spec: FSK: Got tired of unreadable, unmaintainable code, and made some FSK: fluffy helper emit functions, and defined some helper variables FSK: to represent the registers (which, in hindsight, is more FSK: efficient anyway). Implemented all the unary operations (at FSK: least all the ones I think that we'll need...at worst we can FSK: concatenate a series of unary operations together if we need to FSK: (like Long->Short becomes Long->Int->Short (at a conceptual level FSK: at least)) (wow this is starting to look like scheme code)) FSK: FSK: All that seems to remain is the function call patterns, and I FSK: think that I can get that done tonight. 1999-07-27 duncan * Analysis/Tree/TreeStructure.java: One more dependency to make tree folding work right. * Analysis/DataFlow/TreeSolver.java: In the future, it might not be necessary to have a solver class for each of the different codes, but since TreeFolding currently requires this file, here it is. * Analysis/DataFlow/TreeSolver.java: New file. * Analysis/DataFlow/ReversePostOrderIterator.java: made constructor public so I could access it from Analysis.Tree * Analysis/Tree/TreeFolding.java: Added TreeFolding in Analysis.Tree * IR/Tree/OptimizedTreeCode.java: *** empty log message *** * Analysis/DataFlow/TreeFolding.java: Moving TreeFolding to Analysis.Tree, per felix's suggestion. * Analysis/DataFlow/ReversePostOrderIterator.java: *** empty log message *** * Analysis/DataFlow/ReversePostOrderIterator.java: New file. * IR/Tree/CanonicalTreeCode.java, IR/Tree/OptimizedTreeCode.java: Added tree folding as a standard optimization of OptimizedTreeCode. In doing so, discovered & fixed a bug in the clone() methods of OptimizedTreeCode and CanonicalTreeCode. * Analysis/DataFlow/TreeFolding.java: Removed static final fields from inner class * Analysis/DataFlow/TreeFolding.java: A new version of the tree folding optimization which uses the existing dataflow classes. The tree interpreter was able to interpret the optimized code, so most of the bugs should be gone. There is definitely room to tighten this code up, especially with regards to memory usage. * Analysis/DataFlow/TreeFolding.java, IR/Tree/SEGMENT.java: New file. * IR/Tree/Print.java, IR/Tree/SEGMENT.java, IR/Tree/TreeKind.java, IR/Tree/TreeVisitor.java: Should've checked this in earlier, but I wasn't around this weekend. The SEGMENT type is used to mark the beginning of a new section in memory. In other words, all instructions after the SEGMENT object will be stored in the specified memory section. 1999-07-23 pnkfelix * Backend/StrongARM/CodeGen.spec: FSK: After a discussion with Scott, we decided to punt the issue FSK: of %extra for now (it ends up becoming a larger issue of FSK: how to properly handle Temp creation between the CGG and FSK: the Spec file) FSK: So I made the necessary changes so that CGG now produces FSK: a compilable CodeGen.java file from the StrongARM's Spec FSK: file, and moved the 'mov' assembly instructions into their FSK: own Instrs, per Scotts suggestion in an earlier email. 1999-07-23 C. Scott Ananian * IR/Tree/Bop.java: Fixed javadoc error caused by unclear Sun Java documentation on FREM. 1999-07-23 duncan * IR/Tree/DATA.java, IR/Tree/Print.java, IR/Tree/TreeKind.java, IR/Tree/TreeVisitor.java: Added a class to represent data stored to memory as the program is loaded. Modified the TreeVisitor class to visit the DATA class, the TreeKind class to contain TreeKind.DATA, and the Print class to print out DATA objects. Next I'll address the issues Scott alluded to earlier (endian-ness & sections). * IR/Tree/DATA.java: New file. 1999-07-23 C. Scott Ananian * IR/Quads/QuadNoSSA.java, IR/Quads/UnHandler.java: Add exception-coalescing code to reduce code size at the expense of losing some information about exception locality. This is an option that can be turned off, if the precise exception location is important. [basically, this just combines the code to create, initialize, handle and throw identical exceptions into one place in a procedure.] * GNUmakefile: Add a 'list-source' rule for good and sufficient reason. * Main/Options.java: New file. * Main/Main.java, Main/Options.java, Main/Run.java: Try to modularize command-line option processing a little bit. * IR/Tree/Bop.java, IR/Tree/Uop.java: javadoc updates for IR.Tree.Bop and IR.Tree.Uop to explain a little better. In particular, there *is* a floating-point remainder operation defined. 1999-07-22 pnkfelix * Backend/StrongARM/CodeGen.spec: FSK: realized that the name choice for one of my FSK: methods was needlessly psycho and changed it FSK: to save everyone's sanity * Backend/StrongARM/CodeGen.spec, Backend/StrongARM/TwoWordTemp.java, IR/Tree/Uop.java, Tools/PatMat/MaximalMunchCGG.java: FSK: lessee... I finally tried running the CGG on my StrongARM FSK: spec file, and that led to the following: FSK: 1. Fixed a number of syntax bugs in CGG's output that FSK: didn't come up earlier FSK: 2. Fixed some problems with the logic in the Spec file FSK: 3. Remembered that I never implemented the %extra directive, FSK: because I didn't understand it then (and even now I'm FSK: not sure that its the right way to do things, because FSK: it limits the control of the spec-writer over the type FSK: of Temp that the %extra variable will be...) FSK: So, at this point, my attempts to produce a CG from the Spec file FSK: are limited because the incorrect handling of the %extra FSK: directive leads to CG-compilation errors. FSK: Need to give the design of this some thought. Will shift FSK: gears to the design of the RegAlloc/Frame interface until FSK: I get a chance to discuss this matter with Scott FSK: FSK: also, added some Doc to Uop and made an extension of Temp FSK: specifically for the StrongARM backend; didn't want to FSK: pollute the Temp package with it until we decided that FSK: extending Temps was a correct way to do things... * Backend/StrongARM/TwoWordTemp.java: New file. * IR/Tree/Uop.java, Tools/PatMat/Spec.java, Backend/StrongARM/CodeGen.spec: Added extra comments to Uop and Spec (though the comment I added to Spec may not be appropriate; they're helpful for me, but may be a maintenance nightmare later. What say ye?) Added plenty more patterns to the StrongARM spec file. 1999-07-21 pnkfelix * Backend/StrongARM/CodeGen.spec: FSK: added support for floating point addition and comparison FSK: operations. Look into combining all of the comparison operations FSK: with pattern matching cleverness, since most of the code is the FSK: same FSK: left to do: subtract, multiply, and divide; WOO! 1999-07-20 pnkfelix * Backend/StrongARM/CodeGen.spec: FSK: added some interesting stuff to handle multi-word compares, FSK: and a couple unary operands. * Backend/StrongARM/CodeGen.spec: FSK: Decided that the beginning of a StrongARM spec file had become FSK: substantial enough to warrant adding to the repository. * Backend/StrongARM/CodeGen.spec: New file. 1999-07-20 duncan * IR/Tree/BINOP.java: Fixed a bugfix that was not quite correct. The right operand of a shift operator must always be of type INT. 1999-07-19 duncan * Analysis/Tree/TreeCFG.java, Analysis/Tree/TreeFolding.java: These classes are now obselete. I'll be checking in their replacements later tonight. 1999-07-17 C. Scott Ananian * IR/Quads/UnHandler.java: Bug fix. Same bug that was in the Interpreter was also in the code which translates from quad-with-try to quad-no-ssa (called the 'UnHandler'). Result was that exception handlers would get skipped at times. Fixed now. * Tools/PatMat/MaximalMunchCGG.java: Move an inner class to make javac 1.1 happy. * IR/Tree/Code.java, IR/Tree/OptimizedTreeCode.java, IR/Tree/ToTree.java, IR/Tree/Tree.java: Make harpoon.IR.Tree package compile properly with javac 1.1 again. This involved: 1) commenting out some final fields, as usual. javac is broken that way. 2) moving some static final fields from an inner class to an inner interface; javac doesn't allow static members in inner classes. Neither should jikes, but jikes is a little too accepting, sometimes. 3) There was a 'HClass.forClass(new Object[1].getClass())' expression that javac and jikes were disagreeing about over precedence. As I try not to use java.lang.Class if I can help it (to make Felix's life easier when he writes the runtime), I changed this to HClass.getDescriptor("[Ljava/lang/Object;"), which is equivalent. * GNUmakefile: A minor nit: don't print the names of every source file (many many many) when you do a 'make java'. * Analysis/LowQuad/Loop/MyLowQuadSSI.java: Brian was a bit sloppy declaring his DLists, which he hadn't imported separately. jikes allows the sloppiness, javac is a stickler. fixed. * Interpret/Quads/InterpretedThrowable.java: Paranoid assertions. * Interpret/Quads/Method.java: Fix a buglet in the quad-with-try interpreter's THROW handling: sometimes the proper exception handler wouldn't be called. * IR/Quads/Qop.java: Fixed a documentation error. * Util/BitString.java: Clean-up of BitString class. Duncan's bugfixes have been left alone. Mostly, I just added a few comments to try and clarify this beastie a bit better. * Util/Util.java: Uncomment some code which Darko commented out a while ago when various parts of the bytecode->Quad translation engine couldn't handle it. Added population-count and zero-count functions to Util. * Util/HClassUtil.java: Disallow merging differing primitive types, which is verboten. This is a partial revert of duncan's patch. According to his check-in message, this should break TypeInfo. Whoever discovers this breakage first (ie, triggers the assertion I just added to this file) should send me email describing how to reproduce the bug, and I will fix TypeInfo appropriately. 1999-07-16 duncan * IR/Tree/ToTree.java: Fixes a bug in the array allocation routine 1999-07-14 bdemsky * Analysis/LowQuad/Loop/LoopInvariance.java: Explicity declare LowQuads that are allowed to be loop invariants now. Quads that are not declared candidates for loop invariants or non-candidates are implicitly made non-candidates. And an error message is printed on an unrecognized lowquad. * Analysis/LowQuad/Loop/LoopInvariance.java: Oops.... Seems that I forgot to make NEW operands loop invariant... That sort of thing could result in nasty, odd bugs. 1999-07-14 duncan * IR/Tree/ToTree.java: Checked in code with a bug. My apologies. * IR/Tree/ToTree.java: Part 2 of fixing the bug with the shift operators. * IR/Tree/BINOP.java: Fixed bug in the handling of the shift operators. 1999-07-14 bdemsky * Analysis/LowQuad/Loop/AllInductions.java: Oops... Been a little too optimistic about making derived induction variables... 1999-07-13 bdemsky * IR/LowQuad/LowQuadSSA.java: Changed constructor from private->protected to allow derived classes. * Analysis/LowQuad/Loop/MyLowQuadSSI.java: Made to extend LowQuadSSA instead of LowQuad/Code.java * Analysis/LowQuad/Loop/LoopOptimize.java: 2 bugs fixed: 1) Typo in routine that ensures we don't duplicate SSA aliases of induction variables. 2) Temp renaming scheme for loop hoisting fixed. * Analysis/LowQuad/Loop/LoopInvariance.java: Class of function that cannot be loop invariant was expanded. * Analysis/LowQuad/Loop/LoopAnalysis.java: Debug code commented out. Not needed right now. * Analysis/SSITOSSAMap.java: Debug code commented out. Its annoying to watch. 1999-07-12 bdemsky * Interpret/Tree/Method.java: Added support for pointer CMPGT. * IR/Tree/UNOP.java: Added support for PNEG. * IR/Quads/ToNoSSA.java: Derivation information for the PHI nodes was being deleted, however, the PHI's Temps were not, which confused the Quad.clone() method. Hopefully this will fix this problem. * Analysis/LowQuad/Loop/LoopOptimize.java: Bug fixes.. * Analysis/LowQuad/Loop/Induction.java: Fixed toString() method. * Analysis/LowQuad/Loop/LoopOptimize.java: Code modified to handle larger class of induction variables. * Analysis/LowQuad/Loop/LoopMap.java: Fixed nasty bug. I have no clue why this class even appeared to work before. * Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/BasicInductions.java, Analysis/LowQuad/Loop/Induction.java: Classes changed to denote larger class of induction variables. We now handle not only induction variables derived through constants, but also loop invariants. 1999-07-09 bdemsky * Analysis/LowQuad/Loop/MyLowQuadSSI.java: LowQuadSSI class with lots of bells and whistles that make it easy to build derivation maps, typeMaps, etc... * Analysis/LowQuad/Loop/MyLowQuadSSI.java: New file. * Analysis/ToSSA.java: Clones HCode before it starts to play with it. Important: Clone method for LowQuadSSA doesn't duplicate TypeMap or Derivation information. This needs to be changed. * Analysis/LowQuad/Loop/LoopOptimize.java, Analysis/LowQuad/Loop/WorkTempMap.java: Changes: LoopOptimize: Now builds derivation and typemaps. Now clones original HCode. Now only modifies cloned HCode. Wrote QuadInserter class to clean up adding quads. WorkTempMap: Implementation of WritableTempMap Used for renaming loop invariant quads that are loop hoisted in LoopOptimize. * Analysis/LowQuad/Loop/WorkTempMap.java: New file. 1999-07-08 duncan * IR/Tree/OptimizedTreeCode.java: New file. * IR/Tree/OptimizedTreeCode.java: The OptimizedTreeCode class is (unsurprisingly) a codeview that generates optimized tree code. Not much different than the CanonicalTreeCode class, except that it allows you to specify your own translation passes. * IR/Tree/CONST.java, IR/Tree/ToTree.java: Thanks to Scott's well-placed assertion in the Tree.MOVE class, I realized that I'd been lazy about typing some of my Tree objects. This check-in fixes those bugs. * IR/LowQuad/Translate.java: Fixed an incorrect type mapping. The type of PMCONST and PFCONST should be a pointer. * Util/HClassUtil.java: I fixed this bug long ago, but forgot to check it in. Oops. For me, the tree interpreter will not run without this fix. I hope that doesn't mean that I am the only one who's been able to run the tree intepreter successfully! The problem was that code in Analysis.QuadSSA.TypeInfo was using HClass.commonSuper() to merge primitive types, but commonSuper() punted on primitive types, causing the type analysis to fail. 1999-07-07 C. Scott Ananian * IR/Quads/Quad.java: Add 'cloneMaps' method to allow you to clone a graph of Quads and get back mappings from old quads/temps to new quads/temps. * Temp/CloningTempMap.java: Added better javadoc. Added unmodifiable() method to access an unmodifiable copy of this mapping (which won't magically create new temps for you as you query it). 1999-07-07 bdemsky * Analysis/LowQuad/Loop/LoopOptimize.java: Some comments added/javadoc stuff. 1999-07-07 duncan * IR/Tree/CJUMP.java, IR/Tree/ESEQ.java, IR/Tree/Exp.java, IR/Tree/ExpList.java, IR/Tree/INVOCATION.java, IR/Tree/MOVE.java, IR/Tree/RETURN.java, IR/Tree/SEQ.java, IR/Tree/Stm.java, IR/Tree/TEMP.java, IR/Tree/THROW.java, IR/Tree/ToTree.java, IR/Tree/Tree.java, IR/Tree/TreeKind.java: Collection-ized the remaining classes in the tree form. There are also scattered (small) changes. * IR/Tree/Code.java: *** empty log message *** * IR/Tree/TreeCode.java: Mainly a documentation checkin, but some small changes & fixes too. * IR/Tree/CanonicalTreeCode.java: Upon closer inspection I see that this class does not actually need any of the Collections classes, it was just importing classes it doesn't need. * IR/Tree/CanonicalTreeCode.java: Added documentation and a couple of bug fixes. Ack, I just realized I should probably update this class to use the Collections API. I'll check in that update in a few mins. 1999-07-06 bdemsky * Analysis/LowQuad/Loop/LoopOptimize.java: Compares in loops moved to induction variables that are used. Much commenting, cleaning up code, etc remains, but it might work now. 1999-07-06 duncan * Util/BitString.java: Fixed a bug in the setUpTo() and setAll() functions. Not all bits were being set. 1999-07-06 pnkfelix * Backend/Generic/Frame.java, Tools/PatMat/CodeGeneratorGenerator.java: FSK: fixing some more specification issues, both in the FSK: CodeGeneratorGenerator (which was mostly just spec FSK: clarifications) and in the Frame (which included a FSK: fundamental shift from SortedSets to Lists in preparation for a FSK: future addition to Frame for handling weird Register Allocation FSK: stuff ) 1999-07-06 C. Scott Ananian * Backend/Sparc/CodeGen.spec: Add proper typecasts to ROOT. Remove 'String op' definitions made unnecessary by the suffix() function. 1999-07-05 bdemsky * Analysis/ToSSA.java: ToSSA takes in an SSI HCode, eats the SSI part of it, and leaves the SSA part. It transforms both Quads and LowQuads. * Analysis/ToSSA.java: New file. 1999-07-02 bdemsky * Analysis/LowQuad/Loop/LoopOptimize.java: Added in dead code elimination... 1999-07-02 pnkfelix * Backend/StrongARM/SAFrame.java, Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java: FSK: Added function for asking the Frame for registers to FSK: spill/allocate 1999-07-02 bdemsky * Analysis/LowQuad/Loop/LoopOptimize.java: Does strength reduction, generates new induction variables, lots of wonderful stuff... Now I just need to: 1) Rewrite Deadcode to work on lowquads... 2) Replace test with derived induction variables... * Analysis/LowQuad/Loop/LoopOptimize.java: More additions... Calculate loop increments now... 1999-07-01 bdemsky * Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopOptimize.java: Code to find increment of basic induction variable added. Changes from HashMap-->Map. More initial setup done for new induction variables... * Analysis/Maps/AllInductionsMap.java, Analysis/Maps/BasicInductionsMap.java: Changed from HashMap to Map. * Analysis/Maps/AllInductionsMap.java, Analysis/Maps/BasicInductionsMap.java: More bugs....... * Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopOptimize.java: Bugs fixed. Started work on initializing new induction variables. * Analysis/LowQuad/Loop/Induction.java, Analysis/LowQuad/Loop/LoopInvariance.java: Induction now implements copied boolean. Lets me know if some other induction is derived from the current one... LoopInvariance now will not consider pointer writes or return quads for loopinvariance. 1999-06-30 bdemsky * Analysis/LowQuad/Loop/LoopMap.java, Analysis/LowQuad/Loop/LoopOptimize.java: LoopOptimize now is SSI friendly... It correctly maps temps of quads hoisted. LoopMap does a breadth first search to map a given temp in the loop, to the correct SSI temp coming into the loop. * Analysis/LowQuad/Loop/LoopMap.java: New file. 1999-06-30 pnkfelix * Tools/PatMat/CodeGeneratorGenerator.java: FSK: Realized that the javadoc was trying to serve two seperate FSK: purposes at once: telling users how to USE a FSK: CodeGeneratorGenerator, and telling implementors how to extend a FSK: CodeGeneratorGenerator. Since these really are two different FSK: things, I revamped the javadoc clauses a little to make the FSK: purpose of each piece of information clear... * Tools/PatMat/CodeGeneratorGenerator.java: FSK: small aesthetic fix to javadoc for CGG * Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Spec.java: FSK: 1. Updated specification for contract between FSK: CodeGeneratorGenerator, its subclasses, and the .spec files FSK: 2. Added Predicate Support for MaximalMunch. Output of FSK: SPARC .spec file seems like PREDs are handled correctly FSK: 3. Added some helper methods for combining $List with $Visitor. 1999-06-30 bdemsky * Analysis/LowQuad/Loop/LoopOptimize.java: Fixed: 1) Putting the preheader at the right place. 2) Ordering the preheader correctly. * Analysis/LowQuad/Loop/LoopInvariance.java: Changed to not declare divide statements loop invariant... * Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopOptimize.java: Changes: 1) Loop invariant hoisting... May do very evil things...But it is there. Note: Does evil things to SSI... 2) Changed the way HashMaps were built on loop objects. Used to use loop objects as a key, but that doesn't work because new ones are always generated. Instead we use the first loop entrance. That does work. 1999-06-30 pnkfelix * Tools/PatMat/doc-files/instr-selection-tool.html, GNUmakefile: FSK: 1. Added a new Make variable which is a slight variation on FSK: NONEMPTYPACKAGES -- this new one lists packages that have at FSK: least one .java source file (Javadoc 1.2 was dying on the FSK: SPARC and Jouette packages because they don't have any .java FSK: files) FSK: 2. Replaced the current example instr-selection-tool template FSK: with one illustrating definining a .spec file for the FSK: Jouette architecture * Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Spec.java: FSK: Last check-in for the night... first of all, FSK: Backend/StrongARM/SAFrame.java FSK: is consistently showing up on my modified files list. FSK: any ideas of why? FSK: ANYWAY, this change fixes the bug when one tries to FSK: run MaxMunchCGG on Backend/Sparce/CodeGen.spec FSK: (I forgot to implement accept(ExpVisitor) in FSK: Spec.ExpName) FSK: we now generate code, but there's no way in hell that FSK: it compiles because it uses 'if' as an identifier C:P FSK: FSK: *SO* the only thing left on my plate for CGG stuff is FSK: to incorporate Predicate Support...no sweat! C:) * Backend/Jouette/CodeGen.spec, Tools/PatMat/MaximalMunchCGG.java: FSK: 1. implemented outputting visit(IR.Tree.Stm)...I left FSK: visit(Exp) alone because that shouldn't ever be called; FSK: we should only encounter Exp's while working on some Stm FSK: (ie, the CggVisitor should really just be visiting a FSK: series of IR.Tree.Stms) FSK: 2. Made the CodeGen file look prettier...still need to FSK: document my change to the spec that it is the responsibility FSK: of the .spec file to initialize the Spec.RuleExp.result_id FSK: variable, because the .spec file is (and should remain, FSK: IMHO) the part of the system with access to the TempFactory FSK: for that architecture's Frame... FSK: 3. Have not a clue what I could have done to SAFrame...lets FSK: hope its something good... * Backend/Jouette/CodeGen.spec, Tools/PatMat/MaximalMunchCGG.java: FSK: YES! I got the MaxMunchCGG to generate code that compiles FSK: without an error! FSK: Remaining to do tomorrow: FSK: 1. Incorporate Predicates (shouldn't be too bad actually) FSK: 2. Fill in the blank for visit(Tree) (will just throw an FSK: assertion, I realize now; the real meat (well, actually FSK: the procedure-calls to the real meat) are in visit(Stm) FSK: and visit(Exp) * Tools/PatMat/Main.java, Tools/PatMat/MaximalMunchCGG.java: FSK: Made various improvements on the output, including making FSK: codegen's inner class (to implement recursive munching) FSK: non-static which brought the number of errors down to 25! * Backend/Jouette/CodeGen.spec, Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/ErrorMsg.java, Tools/PatMat/Lexer.jlex, Tools/PatMat/Main.java, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java: FSK: Okay, lets see... FSK: 1. Updated spec in CodeGeneratorGenerator with ROOT and other FSK: need-to-define-variable requirements for subclasses of CGG. FSK: 2. Made the references to TreeCode in CGG be paramerized so that FSK: I could then fully qualify the package-name easily (did FSK: similarly for classes referenced in MaximalMunchCGG)...still FSK: need to clean up specification given in javadoc some FSK: more...rough on edges... FSK: 3. Added some simple debugging code to the Parser and Lexer files FSK: (mostly just stuff to give me more information when I was FSK: wrestling with my definition of the Jouette architecture) FSK: 4. Added a Jouette backend directory with CodeGen.spec file... FSK: this is really meant just for testing my own code, but I'm FSK: putting it in in the hope that it will be added to our FSK: doc as an example .spec file for an excessively simple FSK: architecture. FSK: 5. Made Tools.PatMat.Main fail-fast for lexing/parsing problems. FSK: 6. Added code to visitors in MaxMunchCGG to initialize variables FSK: that will be referenced in the action statements before the FSK: action statements are executed. FSK: 7. Made an effort to prettify output of MaxMunchCGG further... FSK: 8. Added code to set the ROOT variable in the RuleVisitor FSK: 9. Fixed some problems with scoping in the outputted FSK: CodeGenerator FSK: and of course... FSK: 10. Updated some Javadoc FSK: FSK: with these changes, the code output by MaxMunchCGG on Jouette's FSK: CodeGen.spec only has 74 errors! Woo woo! * Backend/Jouette/CodeGen.spec: New file. 1999-06-29 bdemsky * Analysis/LowQuad/Loop/LoopAnalysis.java: *** empty log message *** * Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopOptimize.java: Made LoopAnalysis implement InvariantsMap, BasicInductionsMap, AllInductionsMap. Started building optimization pass in LoopOptimize. * Analysis/LowQuad/Loop/LoopAnalysis.java: Last of these renaming changes * Analysis/Maps/AllInductionsMap.java, Analysis/Maps/BasicInductionsMap.java: Choosing coherent naming scheme. * Analysis/Maps/AllInductionsMap.java, Analysis/Maps/BasicInductionsMap.java: New file. * Analysis/Maps/AllInductionMap.java, Analysis/Maps/BasicInductionMap.java: renaming * Analysis/LowQuad/Loop/BasicInductions.java: Renamed to match AllInductions. * Analysis/LowQuad/Loop/BasicInductions.java: New file. * Analysis/LowQuad/Loop/BasicInduction.java: *** empty log message *** * Analysis/Maps/BasicInductionMap.java, Analysis/Maps/InvariantsMap.java: Interfaces to be implemented by LoopAnalysis. * Analysis/Maps/BasicInductionMap.java, Analysis/Maps/InvariantsMap.java: New file. * Analysis/Maps/AllInductionMap.java: Interfaces to be implemented by LoopAnalysis. * Analysis/Maps/AllInductionMap.java: New file. * Analysis/LowQuad/Loop/AllInductions.java: More document changes. * Analysis/LowQuad/Loop/BasicInduction.java: Fixed typo... * Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/BasicInduction.java, Analysis/LowQuad/Loop/Induction.java, Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopInvariance.java, Analysis/LowQuad/Loop/LoopOptimize.java: Very rough comments added. Debug code added to LoopAnalysis to print out induction variable information. * Analysis/LowQuad/Loop/Induction.java: Implements toString() method now. 1999-06-29 C. Scott Ananian * NOTES/codegen-out.java: Added sample code-generator output template file. * NOTES/codegen-out.java: New file. * Backend/Sparc/CodeGen.spec: Wrote UNOP rules. Better floating-point support. * Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java: It turns out that MOVEs need to be typed, too, since moves between (for example) floating-point registers, or 64-bit long values, are different than moves between ordinary 32-bit registers (on a 32-bit architecture). The type of a move is the type of its src and dst expressions. There's an assert() in IR.Tree.MOVE to guarantee that the src and dst types always match. Use a Tree.UNOP to coerce the types if you're trying to make an assignment between, say, pointer and integer. The grammar and Tools.PatMat.Spec have been updated to support typed MOVEs. See the upcoming commit to Backend/Sparc/CodeGen.spec for an example of where typed MOVEs are necessary. * IR/Tree/MOVE.java, IR/Tree/THROW.java: Make THROW and MOVE implement Typed, for completeness. THROW's type is always POINTER (and there's a Util.assert to guarantee this). MOVE's type is the type of its src and dst expressions, and there's an Util.assert to guarantee that the src and dst types always match. 1999-06-29 pnkfelix * Tools/PatMat/MaximalMunchCGG.java: FSK: prettified output of MaxMunchCGG further; will move now FSK: to making a proper spec file, because I can't tell FSK: whether the resulting code can't compile because the FSK: Spec is bad or because my CGG is bad (prolly the second, FSK: but better to start off certain that the Spec is good) 1999-06-29 C. Scott Ananian * Backend/Sparc/CodeGen.spec: More work on SPEC .spec file. This is all I'll probably do for a while. The .spec file parses okay, but triggers an assertion failure in Felix's code at the moment. * GNUmakefile: Preliminary makefile support for code-generator-generator .spec files. Eventually we need to add a rule to make .java from .spec, and then add the .java files to MACHINE_GEN. * IR/Tree/BINOP.java, IR/Tree/UNOP.java: Added javadoc. 1999-06-29 pnkfelix * Tools/PatMat/MaximalMunchCGG.java: FSK: added code to actually use the statement muncher in generating FSK: the generator. C:) * Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Spec.java: FSK: 1. added some documentation to CodeGeneratorGenerator FSK: 2. added a recursive STM type checking visitor to complement FSK: the EXP type checking visitor. Next up will be the predicate FSK: and action generation FSK: 3. Added some doc to Spec to help myself link back and forth FSK: between relavant classes 1999-06-29 C. Scott Ananian * IR/Tree/CONST.java, IR/Tree/ESEQ.java, IR/Tree/Exp.java, IR/Tree/MEM.java, IR/Tree/NAME.java, IR/Tree/OPER.java, IR/Tree/RETURN.java, IR/Tree/TEMP.java: Simplify Tree.Exps by making all Exps implement the Typed interface. Tree.RETURN now also implements Typed (using the type of its retval Exp). * Backend/Sparc/CodeGen.spec: More work on SPARC instr-sel patterns. * IR/Assem/InstrLABEL.java: Fixup javadoc. 1999-06-28 C. Scott Ananian * Backend/Sparc/CodeGen.spec: A start at a Sparc code-generator Spec file for Felix to play with. * Backend/Sparc/CodeGen.spec: New file. 1999-06-28 bdemsky * Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/BasicInduction.java, Analysis/LowQuad/Loop/Induction.java, Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopInvariance.java: BasicInduction finds basic induction variables of either integer or pointer variants. AllInductions finds all inductions variables. LoopInvariance finds look invariant pieces of code. Induction.java is a class for defining derived/basic induction variables. Comments, etc, will be added later... * Analysis/LowQuad/Loop/AllInductions.java, Analysis/LowQuad/Loop/BasicInduction.java, Analysis/LowQuad/Loop/Induction.java, Analysis/LowQuad/Loop/LoopInvariance.java: New file. 1999-06-28 duncan * Interpret/Tree/package.html: Added a package description to Harpoon.Interpret.Tree * Interpret/Tree/package.html: New file. * Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/Method.java, Interpret/Tree/Ref.java, Interpret/Tree/StaticState.java, Interpret/Tree/TestRun.java, Interpret/Tree/TreeStackFrame.java: 1) Fixed some bugs in the class loader 2) Removed some instanceofs (using the Pointer.kind() method) 3) Added a few comments * Interpret/Tree/INFileOutputStream.java: Oops. This was the file from which I removed debug code. * Interpret/Tree/INSystem.java: Removed some debug code. * Interpret/Tree/ArrayPointer.java, Interpret/Tree/ClazPointer.java, Interpret/Tree/ConstPointer.java, Interpret/Tree/FieldPointer.java, Interpret/Tree/InterfaceListPointer.java, Interpret/Tree/Pointer.java, Interpret/Tree/StringPointer.java, Interpret/Tree/UndefinedPointer.java: Added a kind() method to the Tree interpreter's pointers. * IR/Tree/ToTree.java: A couple of bug fixes for the Tree form. First, I was converting from char to int incorrectly. Sigh. Second, I was creating an HClass incorrectly. * IR/Tree/Code.java, IR/Tree/INVOCATION.java, IR/Tree/ToCanonicalTree.java: Removed more instanceofs * IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/ESEQ.java, IR/Tree/EXP.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/NATIVECALL.java, IR/Tree/RETURN.java, IR/Tree/SEQ.java, IR/Tree/TEMP.java, IR/Tree/THROW.java, IR/Tree/Tree.java, IR/Tree/UNOP.java: Implementation of the kind() method in all non-abstract Tree objects. Additionally, used the kind() method to get rid some instanceofs. * IR/Tree/TreeKind.java: Added a parallel of Scott's QuadKind class for Tree form. * IR/Tree/TreeKind.java: New file. 1999-06-28 pnkfelix * Tools/PatMat/Main.java, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Spec.java: FSK: Working more on CodeGeneratorGenerator; I now seem to FSK: successfully build a recursive "munchExp" function. FSK: Task for tomorrow is the "munchStm" function. FSK: still TODO before code will run: FSK: 1. Incorporate .spec predicates into generated Muncher FSK: 2. Make a *real* .spec file to really test this puppy FSK: 3. Speed up Muncher by subdividing EXPs and STMs further FSK: (but I'm not convinced the time coding that would FSK: take is not better spent simply making a seperate FSK: CGG that uses Dynamic Programming...the priority FSK: of this task should prolly be dropped to below 4.) FSK: 4. Write StrongARM Runtime. C;) FSK: Of course, if I artificially limit the current system to not FSK: support predicates (and write the .spec accordingly), I could get FSK: everything done more quickly; but this code is heinous enough to FSK: justify not leaving it crippled for now and coming back to it FSK: later...otherwise it will take me three times as long to add the FSK: features we _need_. 1999-06-28 C. Scott Ananian * Tools/PatMat/Lexer.jlex, Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java: Fix numeric constants to be int/long/float/double instead of only int. Also fix Lexer to properly scan int/long/float/double. 1999-06-25 C. Scott Ananian * Tools/PatMat/Spec.java: Explain what Spec.DetailExtra does. * bin/annotate.perl: Overcome enforced neglect of inner classes. 1999-06-25 pnkfelix * Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Spec.java, Tools/PatMat/package.html: FSK: further work on the PatMat package...a little javadoc, also a bit FSK: more implementation. FSK: am working out details of how to automatically generate maximal FSK: muncher... Appel's Jouette architecture doesn't seem to have FSK: things like Conditional Branches, so its not serving as a great FSK: model of how many munchBar() functions I need to make (Appel says FSK: munchStm, munchExp, munchMove, and munchArgs are enough, but FSK: I'm not convinced that that translates over to a GENERIC FSK: pattern matcher generator...I'll give it some thought) FSK: More disturbing is the following statement: "instructions that FSK: produce more than one result - such a autoincrement instructions FSK: on the VAX - are difficult to express using tree patterns" FSK: These sorts of tricky instructions are all over the place FSK: on the strongarm...one doesnt HAVE to use them, but are we just FSK: going to leave them to peephole optimizations? That doesn't FSK: sound good; does anybody know anything about using DAG FSK: patterns instead of Tree Patterns? * Tools/PatMat/doc-files/instr-selection-tool.html: FSK: Added this example set of Instr Patterns to the repository. FSK: Should continually update this as an example file spec... FSK: (right now you just cut-and-paste out the spec file...I may FSK: commit the .spec file as well, though keeping the two consistent FSK: is more of a headache than what I want to deal with right now...) * Tools/PatMat/doc-files/instr-selection-tool.html: New file. * IR/Tree/NAME.java, Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/Main.java, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java, Tools/PatMat/package.html, Util/MaxPriorityQueue.java, Backend/StrongARM/CodeGen.java: FSK: Fuller documentation for Spec and several other classes. FSK: Continuing to flesh out design for CodeGeneratorGenerator. FSK: Added a clarification to what NAME does FSK: Added link to example template for instruction patterns in the FSK: PatMat package (but just realized that I haven't added the FSK: necessary doc-files directory to the repository, that will be FSK: my next commit... 1999-06-25 C. Scott Ananian * bin/annotate.perl: Handle arbitrary sub-package specifications in annotations. This means that harpoon.IR.Quads.Quad, IR.Quads.Quad, Quads.Quad, and Quad will all be linked the same way (assuming no other classes named 'Quad' exist). This means we should also handle inner classes properly using a variety of specification styles. * GNUmakefile: Put the new annotate.perl script in the .tgz file for the web page. * Tools/PatMat/Lexer.jlex, Tools/PatMat/Parser.cup: Remove ESEQ, which should never appear in Trees we instruction-select on. * bin/annotate.perl: New file. * GNUmakefile, bin/annotate.perl: New, spiffy (and fast) hyperlink-annotation script. 1999-06-25 pnkfelix * GNUmakefile, Tools/PatMat/CodeGeneratorGenerator.java: FSK: moved ChangeLog generation for "doc" target to "doc-install" FSK: target FSK: removed references to generating HCodeFactories (basically, we're FSK: trying to make the CodeGeneratorGenerator work "as independently FSK: as possible" from the rest of the system...its the responsibility FSK: of the person using the CodeGeneratorGenerator to make a FSK: HCodeFactory class that wraps around the generated CodeGenerator) * Analysis/GraphColoring/Graph.java, Analysis/GraphColoring/package.html, IR/Tree/UNOP.java, Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/MaximalMunchCGG.java, Tools/PatMat/Spec.java: FSK: Updated a slew of javadoc, some trivial changes, most not. FSK: also put in the start of my work on CodeGeneratorGeneration FSK: (just in case my laptop crashes C:P ) * Tools/PatMat/CodeGeneratorGenerator.java, Tools/PatMat/MaximalMunchCGG.java: New file. 1999-06-24 C. Scott Ananian * GNUmakefile: Make sure READMEs go in tar.gz file, too. 1999-06-24 pnkfelix * Analysis/GraphColoring/package.html: FSK: adding my own package.html before Scott gets a chance. C:) * Analysis/GraphColoring/package.html: New file. 1999-06-24 bdemsky * Analysis/SSITOSSAMap.java: SSI->SSA map wasn't being ambitious enough. Namely, for the Quad x=PHI(y,z), where one of y,z is an alias for x and the other y or z points outside of the set of phi's and sigma's the routine tossed the PHI. This fixes this problem. Its more ambitious with its SSI->SSA mapping and less ambitious at throwing things away. 1999-06-24 C. Scott Ananian * Backend/Analysis/package.html, ClassFile/package.html, Interpret/Quads/package.html, Tools/PatMat/package.html: New file. * Backend/Analysis/package.html, ClassFile/package.html, IR/LowQuad/package.html, IR/Quads/package.html, IR/RawClass/package.html, Interpret/Quads/package.html, Tools/PatMat/package.html: Yet more package-description hacking. This will be the last for a while. * IR/Assem/package.html, IR/Bytecode/package.html, IR/LowQuad/package.html, IR/Properties/package.html, IR/Quads/package.html, IR/RawClass/package.html, IR/Tree/package.html, IR/package.html, Util/package.html: More package-description hacking. Added @author and $Id$ flags to existing descriptions. Added many new ones. * IR/Assem/package.html, IR/Bytecode/package.html, IR/Tree/package.html, Util/package.html: New file. * Analysis/DataFlow/package.html, Analysis/package.html, Backend/Generic/Frame.java, Contrib/getopt/package.html: More package-description hacking. Added @author and $Id$ flags to existing descriptions. Added many new ones. 1999-06-24 bdemsky * Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopOptimize.java: Just moving these files... * Analysis/LowQuad/Loop/LoopAnalysis.java, Analysis/LowQuad/Loop/LoopOptimize.java: New file. 1999-06-24 C. Scott Ananian * Analysis/package.html, Contrib/getopt/package.html, IR/LowQuad/package.html, IR/Properties/package.html, IR/Quads/package.html, IR/RawClass/package.html, IR/package.html: Added a slew of javadoc package-description files. * Analysis/package.html, Contrib/getopt/package.html, IR/LowQuad/package.html, IR/Properties/package.html, IR/Quads/package.html, IR/RawClass/package.html, IR/package.html: New file. * Interpret/Quads/StaticState.java: Simplify implementation of String.intern() in the interpreter. 1999-06-23 C. Scott Ananian * GNUmakefile: sh is picky. * GNUmakefile: Makefile tweaks. Major fixes are: 1) properties files are properly included in the JAR file. 2) packages.html and overview.html descriptions are properly included in the TAR file. 1999-06-23 pnkfelix * Analysis/DataFlow/LiveVars.java: FSK: fixed stupid thing with listing the requirements that Scott FSK: pointed out to me (repeating numbers) * Analysis/DataFlow/InstrSolver.java, Analysis/DataFlow/LiveVars.java, Analysis/DataFlow/package.html: FSK: documentation updates and HTML fixes, oh my! 1999-06-23 C. Scott Ananian * Interpret/Quads/Method.java: Yet more javadoc'ing. * Temp/Label.java, Temp/TempMap.java: more javadoc'ing. 1999-06-23 pnkfelix * Analysis/DataFlow/package.html: FSK: added a package.html file for the DataFlow package. FSK: we should use this as a model for the package.html FSK: files we'll add to ALL of our packages * Analysis/DataFlow/package.html: New file. 1999-06-23 C. Scott Ananian * IR/Properties/Derivation.java, IR/LowQuad/Code.java, IR/LowQuad/LowQuadKind.java, IR/LowQuad/LowQuadNoSSA.java: More javadoc'ing fun. * IR/Quads/UnHandler.java: Ack. I don't know how this ever worked. The quad-no-ssa codeview should be much more correct now. Another Bug Zapped By The Quad Interpreter (tm). 1999-06-23 pnkfelix * GNUmakefile: FSK: sigh. more permissions weirdness. * GNUmakefile: FSK: added some more Javadoc fixit stuff (permissions weren't being FSK: set correctly before) 1999-06-23 C. Scott Ananian * IR/Quads/HANDLER.java, Temp/LabelList.java, ClassFile/HArrayField.java, ClassFile/HArrayMethod.java: add javadoc for some classes missing it. * RunTime/Monitor.java: Fix the last odd version tag. * IR/Tree/CALL.java, IR/Tree/NATIVECALL.java, Interpret/Tree/PointerTypeChangedException.java, Util/BitString.java, ClassFile/HClass.java: Fixed some edit boo-boos. Removed @serial tags on the premise that javadoc should continue to complain about them until we properly document the serialization. 1999-06-23 pnkfelix * Analysis/DataFlow/BasicBlock.java: FSK: fixed stupid id -> Id problem * Analysis/Partition/Main.java, Analysis/Partition/Partition.java, Analysis/Partition/PartitionGraphViewer.java, Analysis/Partition/WGNode.java, Analysis/Partition/WeightedGraph.java: FSK: Fixed the way I was indicated the version for these FSK: old crufty files C:) * Analysis/DataFlow/BasicBlock.java, Analysis/Partition/Main.java, Analysis/Partition/Partition.java, Analysis/Partition/PartitionGraphViewer.java, Analysis/Partition/WGNode.java, Analysis/Partition/WeightedGraph.java, ClassFile/HClass.java, ClassFile/HMethod.java, IR/Tree/CALL.java, IR/Tree/INVOCATION.java, IR/Tree/NATIVECALL.java, Interpret/Tree/PointerTypeChangedException.java, RunTime/Monitor.java, Util/BitString.java, GNUmakefile: FSK: 1. Put a $ in several @version tags so javadoc would smile at me FSK: 2. Updated the Makefile to use the -link option to link to the JDK FSK: javadoc if the -link is available (Javadoc 1.2) FSK: 3. added empty @serial tags for a few classes for javadoc 1999-06-22 C. Scott Ananian * Interpret/Quads/StaticState.java: More Hashtable->HashMap conversions. * Interpret/Quads/HCLibrary.java, Interpret/Quads/Method.java: Continuing work on the quad interpreter: * fixed a bogus INSTANCEOF implementation that was handling nulls incorrectly. * added scopeCheck() function to ensure that access modifiers are enforced. * Throw the proper "InterpretedException"s when a method isn't found or an illegal access occurs, to support code which might try to catch these. Not necessary for the current compiler, but I wrote code once-upon-a-time that detected whether it was running under internet explorer, netscape, or the straight JVM by trying to invoke various implementation-specific methods and catching the MethodNotFoundErrors produced... so maybe other folk will try this too. [Previously the interpreter just bombed out complaining of invalid code when a method wasn't found during a CALL...] * ClassFile/HClass.java: Disable visibility supression of non-package methods. The comments in the code explain why. Basically, removing non-package inherited methods from subclasses makes it much more difficult to determine the proper target of a virtual method invocation. This is continuing work on the 'make the compiler interpret itself correctly like it used to' from. Modifications to the codebase since the original interpreter validation seem to have exposed more corner-cases that we weren't handling correctly. 1999-06-21 bdemsky * Analysis/SSITOSSAMap.java: Overrided members in LowQuadVisitor that don't like normal Quads. * Analysis/Loops/LoopFinder.java, Analysis/Loops/Loops.java: No really cool changes. Just fixed the comment tags and version tags... 1999-06-21 C. Scott Ananian * Interpret/Quads/Method.java: Last check-in for tonight: expand ClassCastException message in the interpreter so we know both what the object was and what it was supposed to be cast to. This helps debug bogus ClassCastException's caused by Sun's overly-vague definition of the 'instanceof' operation. * ClassFile/HClass.java: Fix a subtle bug in the isInstanceOf() implementation: although (new HCodeElement[10]) is an instanceof Object[], our code was claiming it wasn't. It turns out that both the VM spec and the Language spec are extremely hazy on the exact definition of the 'instanceof' operation... and the O'Reilly book gives 'pseudo-code' for the instanceof operation that is just plain wrong. (The implementation in Sun's books is plain wrong as published, too, but at least they provide errata on their website. Corrected, the Sun definition is *incomplete* but not *plain wrong*---an important difference...) I'm fairly certain the HClass implementation of isInstanceOf() now is correct for all cases, but don't quote me on that. Lots of nasty hairy stuff involved. Backend people: talk to me before you implement instanceof! (I suspect the Tree conversion probably doesn't handle interfaces or arrays properly). 1999-06-20 C. Scott Ananian * IR/Bytecode/Op.java: Fix EVIL NASTY BUG in bytecode file parsing of TABLESWITCH bytecodes involving negative case keys. Basically we were interpreting the negative numbers as huge unsigned values, which was pretty much screwing us over. Only shows up when the compiler generates TABLESWITCH bytecodes, so comes and goes, since javac and jikes disagree on this point and both much prefer to generate LOOKUPSWITCH opcodes instead. I was quite surprised to find a bug lurking in the harpoon.IR.Bytecode package, to say the least. This hopefully should be the very last of them. * IR/Bytecode/Instr.java: trivial compactness hack. * ClassFile/Loader.java: Update ClassLoader to JDK 1.2 Collection API. That means, out with the Enumerations and Vectors and in with the Iterators and Lists! This is purely cosmetic---functionality should be unchanged---but I'm trying to set a good example, especially if people outside this place ever take a good gander at the code. * Util/BinomialMap.java: Javadoc fixes. * Util/BinomialMap.java: Implement a few more methods. O(n) time for get() really sucks. * Util/BinomialMap.java: Mergeable Binomial Heap implementation, with O(lg n) for most interesting operations, including union. containsKey() is O(n), however. * Util/BinomialMap.java: New file. 1999-06-19 bdemsky * Analysis/SSITOSSAMap.java: Code to generate TempMap object mapping SSI temps to SSA temps. This will be useful for Loop invariant recognition. It appears to work...:) Needs more testing/etc...but a simple look over the output verifies that it does the really nasty cases I spot checked correctly. * Analysis/SSITOSSAMap.java: New file. 1999-06-19 C. Scott Ananian * Util/BinHeapPriorityQueue.java: The remove() method of BinHeapPriorityQueue should work now. * Util/BinHeapPriorityQueue.java: Replace java.util.Vectors with java.util.ArrayLists in harpoon.Util.BinHeapPriorityQueue to make the class more Collections-compliant. Basically, ArrayList is identical to Vector except that a) the excessive synchronization of the original JDK 1.0 class is punted, and b) the 'compatibility' methods with the old JDK 1.0 names (addElement and the like) are removed. Since BinHeapPriorityQueue didn't use the old method names anyway, there wasn't much point to using Vector. Also removed some implementations that duplicated code found in the java.util.AbstractCollection base-class. Fixed a bug in the clear() method, too. * Util/Default.java: Add new unmodifiableIterator() method to harpoon.Util.Default to generate an unmodifiable instance of an underlying iterator, much like java.util.Collections will generate unmodifiable instances of the various Collection types. Uses an anonymous instance of harpoon.Util.UnmodifiableIterator. The idea here is to minimize the size of the class hierarchy of the compiler. If we all use the *same* trivial implementations and classes instead of reimplementing our own two-to-three-line implementations, we simplify the class hierarchy and thus dramatically speed-up (one hopes) interclass analysis. 1999-06-18 pnkfelix * Backend/StrongARM/CodeGen.java: Modified Code Generation for Conditional Jumps so that only one Instr is emitted for the set of three assembly instructions (note that the previous behavior produced correct code and valid BasicBlocks, but this will reduce the number of one-instruction BasicBlocks floating around every branch statement) * Analysis/DataFlow/BackwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/BasicBlock.java, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/DataFlow/ForwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/InstrSolver.java, Analysis/DataFlow/LiveVars.java, Analysis/DataFlow/QuadSolver.java, Analysis/DataFlow/ReachingDefs.java, Analysis/Instr/LocalCffRegAlloc.java, GNUmakefile: 1. Added DEBUG flags to much of the DataFlow package in an effort to track down a bug in LiveVars 2. Added a few more methods to InstrSolver to let me initialize the Worklist with more than just one Object 3. Fixed bug in usage of LiveVars (basically I wasn't initalizing the Worklist with enough elements; see (2.) above) 4. Got Local Register working Should look into making the Solver stuff generalized. There's no need for an actual InstrSolver (it doesn't internally depend on the BasicBlocks being composed of Instrs, it just tries to enforce that constraint on the Visitors you pass in). QuadSolver might be able to be generalized into a Solver that does generic DataFlow analysis, given an code for an IR and an appropriate Visitor for that IR (or for Properties of that IR; LiveVars doesn't require Instrs, just UseDefs I believe) 1999-06-18 sportbilly * Analysis/CycleEq.java, Analysis/Place.java, Analysis/SESE.java, IR/Quads/ToSSI.java: Check-in new & improved cycle-equivalency algorithm. This implementation is twice as fast (measured) as the old one. Time cost is O(E). New algorithm only computes edge cycle-equivalency; no more node equivalency. There's an easy way to split nodes to get node equivalency with an edge-based algorithm, if we ever want the node equivalency for some reason. Modified everything which called the old harpoon.Analysis.CycleEq (which took a boolean telling whether node equivalency or edge equivalency was wanted) and updated the constructor to correspond to the new harpoon.Analysis.CycleEq. 1999-06-18 C. Scott Ananian * Analysis/CycleEq.java: Fix a bug in the original Node/Edges cycle equivalency code. 1999-06-17 C. Scott Ananian * Temp/Label.java, Util/AbstractMapEntry.java, Util/BinHeapPriorityQueue.java, Util/BitString.java, Util/SFRE.java, Util/SORE.java, Util/Tuple.java, Analysis/Instr/TempInstrPair.java, ClassFile/HField.java, ClassFile/HMethod.java, IR/Bytecode/Instr.java, IR/Quads/Edge.java, IR/Quads/HandlerSet.java, IR/RawClass/ClassFile.java, IR/RawClass/Constant.java, IR/RawClass/ConstantDouble.java, IR/RawClass/ConstantLong.java, IR/Tree/Edge.java, Interpret/Tree/ArrayPointer.java, Interpret/Tree/ClazPointer.java, Interpret/Tree/ConstPointer.java, Interpret/Tree/FieldPointer.java, Interpret/Tree/InterfaceListPointer.java, Interpret/Tree/StringPointer.java, Analysis/CycleEq.java, Analysis/DomTree.java, Analysis/InterfaceMethodMap.java, Analysis/SESE.java: Remove lots of instanceofs. * Util/ArrayEnumerator.java, Util/CombineEnumerator.java, Util/FIFO.java, Util/FilterEnumerator.java, Util/HashSet.java, Util/NullEnumerator.java, Util/ReverseEnumerator.java, Util/Set.java, Util/SingletonEnumerator.java, Util/TreeSet.java, Util/UniqueFIFO.java: Add @deprecated tags to lots of classes no one should be using anymore. * Util/UniqueStack.java, Util/UniqueVector.java: Update UniqueVector and UniqueStack to implement the proper JDK 1.2 Collections APIs. Backwards-compatibility is maintained. * Analysis/DomFrontier.java, Analysis/UseDef.java: Updated harpoon.Analysis.DomFrontier and harpoon.Analysis.UseDef to use the proper JDK 1.2 Collections interfaces internally, instead of the deprecated harpoon.Util.Set and friends. The interface still exports Enumerations, which we would really like to see become Iterators instead, but that's another project for another day. No external interface changes in this commit. * Util/Default.java: Fix a javadoc blooper (forgot to double the star, so the doc comment wasn't showing up). Added nullEnumerator and nullIterator fields to replace the deprecated harpoon.Util.NullEnumerator class. Added singletonIterator() method to replace the deprecated harpoon.Util.SingletonEnumerator class. * Util/AbstractMapEntry.java, Util/Tuple.java: Remove instanceof in equals() methods. [Make Martin happy.] 1999-06-17 bdemsky * Analysis/Loops/LoopFinder.java, Analysis/Loops/Loops.java: Changed method call names to conform to project standard. 1999-06-16 pnkfelix * Util/BinHeapPriorityQueue.java: FSK: instanceof elimination 1999-06-16 bdemsky * Analysis/Loops/LoopFinder.java, Analysis/Loops/Loops.java: 1) Cleaned up comments. 2) Changed return type of interface into Set instead of WorkSet. 3) Made internal data structure private. 1999-06-16 C. Scott Ananian * Util/ArrayFactory.java: Found missing javadoc, and added it. 1999-06-16 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/DataFlow/LiveVars.java: FSK: 1. Improved the LiveVars.dump() method FSK: 2. Added code to make use of Liveness Info when storing FSK: modified Temps back to memory (hopefully now the stack FSK: frames I generate will be of a more reasonable size) FSK: 3. Updated doc for RegAlloc (realized one of the 'requires' FSK: clauses was unnecessary and cumbersome, so I removed it) FSK: FSK: Register Allocation should be working reasonably now. I'm FSK: going to go over its output with a fine toothed comb now to FSK: make sure its correct. I still have to make the Stack Offset FSK: Assignment code smarter, but hopefully the code this generates FSK: won't cause a Stack Overflow too easily. * Analysis/Instr/LocalCffRegAlloc.java: FSK: fixed a small bug regarding where modified Temps are stored FSK: at the end of the BasicBlock (the Stores were being added after FSK: the branch, making them useless) 1999-06-16 bdemsky * Analysis/Loops/LoopFinder.java: 1. Renamed a few methods for clarity. 2. Documented code so I'll know how it works tomorrow. 3. Changed some internal methods to private, so they won't be used by other objects. * Analysis/Loops/Loops.java: 1) Renamed some of the methods for clarity. 2) Documented stuff... 1999-06-15 bdemsky * Analysis/Loops/LoopFinder.java: Finds nested loops in any HCode implementing HCodeEdges. Implements the interface defined in Loops.java. Status: 1) Doesn't break anything :) 2) All the interface methods tested, and they at least appear to work correctly. * Analysis/Loops/LoopFinder.java: New file. * Analysis/Loops/Loops.java: Loops.java defines the Loops interface used by the LoopFinder object. * Analysis/Loops/Loops.java: New file. 1999-06-15 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java: FSK: Fixed another problem in Local Register Allocation: FSK: switched from procedure (as given in paper on LocalRegAlloc) FSK: 1. count #References in Instr FSK: 2. free space equals to above # in RegFile FSK: 3. foreach (Reference r in Instr) FSK: 4. find a register for r FSK: to FSK: 1. foreach (Reference r in Instr) FSK: 2. get a register for r FSK: 3. if above failed then FSK: 4. free one Register in RegFile FSK: 5. get a register for r FSK: FSK: The two algorithms are the same at the highlevel, but its FSK: easy to check for Liveness-Web conflicts between a FSK: Temp and a potential Register with the second one, while FSK: with the first it seems to be stupid (but neccesary) to do such FSK: an analysis in steps 1. and 2. FSK: FSK: The other changes should be bogus; my last commit failed FSK: 9/10s if the way through (my bad) so while the repository saw my FSK: changes, my own machine didn't seem to realize that it had FSK: actually commited them. 1999-06-15 C. Scott Ananian * Util/ArrayIterator.java, Util/BinHeapPriorityQueue.java, Util/EnumerationIterator.java, Util/FilterIterator.java, Util/PersistentMap.java, Util/PersistentSet.java, Util/ReverseIterator.java, Util/UnmodifiableIterator.java: Added new class harpoon.Util.UnmodifiableIterator to save everyone the hassle of implementing the remove() method of java.util.Iterator over and over again when you have no intention of actually making it do anything over than throw an immediate UnsupportedOperationException. Grokked through the codebase looking for such uses and replaced a slew of them. Seems to make anonymous iterator definitions more compact and thus easier to read & understand. * Util/UnmodifiableIterator.java: New file. * Analysis/EdgesIterator.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/SESE.java, Backend/Generic/Code.java, IR/Bytecode/Liveness.java, IR/Quads/Code.java, IR/Quads/HandlerSet.java, IR/Quads/Translate.java: Added new class harpoon.Util.UnmodifiableIterator to save everyone the hassle of implementing the remove() method of java.util.Iterator over and over again when you have no intention of actually making it do anything over than throw an immediate UnsupportedOperationException. Grokked through the codebase looking for such uses and replaced a slew of them. Seems to make anonymous iterator definitions more compact and thus easier to read & understand. 1999-06-15 pnkfelix * Analysis/Instr/RegAlloc.java, Backend/StrongARM/CodeGen.java, Backend/StrongARM/SAFrame.java, Analysis/Instr/LocalCffRegAlloc.java: FSK: 1. fixed massive bug that was killing me. (Wasnt actually FSK: replacing Temp DEFs with corresponding Register assignments, FSK: which definitely explains why I kept seeing Temps in the dsts FSK: of the generated Instrs... FSK: FSK: 2. Filled in more of CodeGen (basically added an assertion FSK: for yet another Tree element that I don't know how to handle) FSK: FSK: 3. Made the free register finder smarter; now takes into FSK: account future instructions so that registers that WILL FSK: be defined while the Temp 't' in question is still alive will FSK: not be considered for storing 't' in. 1999-06-15 sportbilly * IR/Assem/Instr.java, IR/Bytecode/Instr.java, IR/Properties/HasEdges.java, IR/Quads/Quad.java, IR/Tree/Tree.java: Added a Collections interface to harpoon.IR.Properties.HasEdges, continuing the slow migration away from arrays and towards Collections for our external API. Old methods retained for compatibility. Updated harpoon.IR.Quads.Quad, harpoon.IR.Tree.Tree, harpoon.IR.Assem.Instr, and harpoon.IR.Bytecode.Instr to implement the new interface, with varying degrees of efficiency. * Util/ArrayIterator.java, Util/CombineIterator.java: Added harpoon.Util.ArrayIterator so that harpoon.Util.ArrayEnumerator doesn't get lonely at night. Fixed bug in CombineIterator that would show up if you called next(), hasNext(), remove() in that order on the last element of a component iterator. * Util/ArrayIterator.java: New file. * Util/WorkSet.java: Fixed an evil evil bug in harpoon.Util.WorkSet. Who wrote this awful thing, anyway? The iterator works now. Really.[*] I have no clue how anything that used WorkSet was working properly before. [*] Well, maybe. 1999-06-15 pnkfelix * Backend/StrongARM/CodeGen.java, Backend/StrongARM/SAFrame.java, Util/BinHeapPriorityQueue.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java: FSK: Fixing more and more stuff in the Register Allocation system (its FSK: nearly working too) FSK: FSK: Fixed a number of bugs in CodeGen (order of arguments, proper FSK: def/use information in the resulting Instrs) FSK: FSK: Exposed the registers in SAFrame to the harpoon.Backend.StrongARM FSK: package (ironically, I believe that exposing the variables made FSK: the resulting code SAFER, because now getting SP, PC, etc. is FSK: done by directly referencing the needed register, instead of FSK: using a seemingly random index into Frame.getAllRegisters()) FSK: FSK: Fixed further bugs in the implementation of BinHeapPriorityQueue FSK: (used more stuff from CLR, and eventually also realized that FSK: while CLR's arrays are one-indexed, we do not have such a FSK: "luxury" in Java) 1999-06-14 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java, Backend/StrongARM/CodeGen.java, Backend/StrongARM/SAFrame.java, IR/Assem/Instr.java, Util/BinHeapPriorityQueue.java: FSK: Fixed some problems in Register Allocation FSK: Added a fixup-function to RegAlloc FSK: Added memory interfacing functions to Frame, and stub FSK: implementations to extensions of Frame FSK: Changed implementation of BinHeapPriorityQueue from FSK: a looping iterative version (which may have been FSK: broken) to a recursive version courtesy of CLR * Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java, Backend/StrongARM/SAFrame.java, IR/Assem/Edge.java, IR/Assem/Instr.java, IR/Quads/ToNoSSA.java: FSK: Added a "fixup" stage to register allocation to clean up FSK: and provide things like stack offsets and other garbage to FSK: the assembly code. Am going to focus on making this fixup FSK: stage work, so that (hopefully) code compiled with just the FSK: local register allocation will run (global allocation will be FSK: added later in a trivial manner if I do this right). That way I FSK: can switch gears completely over to implementing the runtime FSK: system. FSK: Made some additions to the Frame class to support getting FSK: memory traffic instructions for particular architectures FSK: in a generic manner (so that the register allocators are FSK: machine independent). Put stub implementations of these FSK: methods in DefaultFrame and SAFrame. FSK: Added some Instruction Replacement methods to Instr to support FSK: modifying the Instruction Stream, and made the private variables FSK: in Edge package-visible for my own sanity (if anyone wants them FSK: back to being private, I can do that later, but it seemed silly FSK: to me at the time to waste time with pointless casting just FSK: because Java doesn't support covariant return types) FSK: Finally, moved an anonymous inner class initialization out FSK: of calls to this()-constructors in ToNoSSA. Javac didn't FSK: mind it, but Jikes did, and it seems that Jikes is correct FSK: in flagging it as an error, due to the inner classes implicitly FSK: containing a pointer to 'this' (which, in the constructor, is FSK: supposed to be better protected...see scott for more info if FSK: interested C:P ). Anyway, making the inner classes *static* FSK: fixed the bug and now jikes 0.51 makes JDK 1.2 happy class FSK: files. 1999-06-13 C. Scott Ananian * GNUmakefile: Fix the 'wc' target, which was broken. * GNUmakefile: Allow 'make doc' to work even without CVS access to the archive. 1999-06-11 C. Scott Ananian * Analysis/CycleEq.java: Add a comment to clarify the code. Rediscovered this while writing it up. * IR/Quads/ToSSI.java: Check in this code, which has been languishing in my directory for some time now. This was a rewrite of the SSI form, dated Apr 8, that never ended up being used. However, it is much closer to the Truely Marvelous algorithm that is being written up in my thesis than the crufty one we currently use, so when it comes time to generate numbers, they'll probably come from here. [CSA] * Analysis/CycleEq.java: Found a typo in a comment while writing up this algorithm. 1999-06-11 pnkfelix * Backend/StrongARM/CodeGen.java: FSK: fixed a few mistakes (simple ommisions of ` in `s0, for example) FSK: and added the Commenting of the outputted assembly code with FSK: the original Quad instructions that resulted in each block of FSK: Instrs, for ease in debugging the resulting code FSK: also replaced direct references to r0 and r1 to indirect substitutions FSK: using `d0 and `s0, so that the register allocator could actually FSK: DETECT when those registers are about to be written to. (Need FSK: to integrate that knowledge into LocalCffRegAlloc still....) * Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java: FSK: made both of these compilable (thus suitable for commital) FSK: Changed LocalCffRegAlloc to finish Analysis before attempting FSK: to modify the Instruction Stream (to deal with the fact that FSK: BasicBlocks currently break if you modify the underlying structure FSK: while the BasicBlock is still in use) FSK: Still not dealing with Register vs. Temp vs. Memory location FSK: issue properly. Should we wait until after global allocation FSK: has had a crack at the Instrs before actually asignning Stack FSK: Offsets to Temps? Or is it appropriate to assign Offsets during FSK: local allocation? * Analysis/DataFlow/BasicBlock.java: FSK: Tracked down some issues while using BasicBlock; added internal FSK: Rep verifier and updated doc to clarify how BasicBlocks and the FSK: HCodeElements they contain should be dealt with (short answer: FSK: very carefully...) 1999-06-09 C. Scott Ananian * GNUmakefile: Allow 'make update' to work even if your lame machine doesn't have the 'fortune' program installed (how awful!). 1999-06-07 C. Scott Ananian * GNUmakefile: OK. Final tweaks to GNUmakefile to let FLEX compile on washington from the .tgz distributed on the web page. Now I think we've got everything we need in there. * GNUmakefile: tweaks to 'make first' (forgot gnu.* packages) * GNUmakefile: Turns out that the carefully constructed set of initial dependencies isn't necessary for 'make first' -- all we need to do is create an initial directory structure corresponding to the package hierarchy. 'make first' is now much much faster. * GNUmakefile: - touched up 'make first' to compile nicely after a 'make clean' - touched up 'make VERSIONS' to filter out binary .jar files. - touched up 'make update' to be a little less noisy. * GNUmakefile: Added rules to makefile to add Support/collections.jar to the CLASSPATH only if we need it. * bin/test-collections: Added a script to check whether we need to add the JDK 1.2 collections stuff or not. * bin/test-collections: New file. 1999-06-06 C. Scott Ananian * Support/collections.jar: Add java 1.2 collections package to Support directory to make FLEX self- contained. * Support/collections.jar: New file. 1999-06-05 C. Scott Ananian * GNUmakefile: Make sure the $(PROPERTIES) files are included in the source .tgz. [thanks, radu!] 1999-06-02 pnkfelix * Util/BinHeapPriorityQueue.java, Util/MaxPriorityQueue.java: FSK: added a generic MaxPriorityQueue interface and FSK: a Binary Heap based implementation. Other implementations FSK: are detailed in CLR, but I'm not taking the time to FSK: make them now... * Util/BinHeapPriorityQueue.java, Util/MaxPriorityQueue.java: New file. * IR/Assem/Instr.java: FSK: changed the toString method to properly print out sources FSK: and dests...as I noted several times in past, Andy, can FSK: you please check with me about the source/dest issue? * Backend/StrongARM/CodeGen.java: FSK: filled in more of the blanks in CodeGen. Now produces code that FSK: can't possibly run but at least our compiler doesn't bomb out. * Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java, Analysis/Instr/RegAlloc.java, Analysis/Instr/TempInstrPair.java: FSK: moved the TempInstrPair utility class out of DemandDrivenRegAlloc FSK: and into a file of its own, since it found use in both Register FSK: allocators. FSK: Finished implementing LocalCffRegAlloc, though I have yet to FSK: test it. C:P I'll do that tomorrow, along with finishing FSK: DemandDrivenRegAlloc. At least they all compile. * Analysis/Instr/TempInstrPair.java: New file. * Analysis/DataFlow/LiveVars.java: FSK: I changed something in LiveVars, but I don't know what. C:( 1999-05-27 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java: I was a little too quick to commit this file. This one compiles. * Analysis/Instr/LocalCffRegAlloc.java: Found a more recent paper on CFF (by searching on Google and finding a Compiler Lab Assignment at Rice). Its much clearer. I realized that half of my code was going about CFF the wrong way (looking up the furthest LAST reference, instead of the furthest FIRST reference; an understandable mistake). Anyway, I added a link to the new paper, which details the differences between FF, CF, and CFF, and says why we should use CFF. Though the Branch+Bound algorithm they propose could also be good for us to implement, since it is provably optimal while CFF is suboptimal. * Analysis/DataFlow/LiveVars.java: Added an accessor method to get the set of Live Variables at the entry to a BasicBlock * Backend/StrongARM/CodeGen.java: Tried to put incorporate support for MEMs...definitely haven't finished...also not sure how to handle JUMPs * Backend/Maps/OffsetMap32.java: I was messing with the code in OffsetMap32 to try to debug a problem I was getting when running the compiler on itself to output strongarm code (as a quick stress test); the recursive call to size(HClass, boolean) in line 275 breaks when the HClass is an array. * Analysis/Instr/LocalCffRegAlloc.java: fixing some things and finally putting in parts of the Local Register Allocator that had been omitted originally. Also making the code a little more self-documenting * Analysis/DataFlow/LiveVars.java: New file. * Analysis/DataFlow/LiveVars.java: Putting in my LiveVariable analysis class and the corresponding BackwardDataFlowBasicBlockVisitor (try saying *that* ten times fast!) Right now there is no way to actually access the data discovered by running the analysis (except through hardcore parsing of its debugging dump() method) I'll finish incorporating accessor methods tomorrow. * Analysis/DataFlow/BackwardDataFlowBasicBlockVisitor.java: New file. * Analysis/DataFlow/BackwardDataFlowBasicBlockVisitor.java: Putting in my LiveVariable analysis class and the corresponding BackwardDataFlowBasicBlockVisitor (try saying *that* ten times fast!) Right now there is no way to actually access the data discovered by running the analysis (except through hardcore parsing of its debugging dump() method) I'll finish incorporating accessor methods tomorrow. 1999-05-26 pnkfelix * Util/HashSet.java: Temporarily considered making HashSet implement java.util.Set, but namespace conflicts got in the way * IR/Assem/Instr.java: Added some code to handle NULL parameter for dst/src arrays in constructor * Backend/StrongARM/CodeGen.java: There was small CVS conflict. No real change. * Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java: Still working on these; in the process of implementing a Liveness Analysis component in the DataFlow package (and I'm amazed that its taken me this long to realize3 that I need to do Liveness analysis...) * Analysis/DataFlow/BasicBlock.java, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/DataFlow/ForwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/InstrSolver.java, Analysis/DataFlow/ReachingDefs.java: Fixed a large bug in BasicBlock.listIterator() tested things out, seems to generate BasicBlocks for Instr form correctly 1999-05-25 andyb * Backend/StrongARM/CodeGen.java, IR/Assem/Instr.java: Fixed some bugs in insertInstrBefore/After and addEdge in Instr. Added removeEdge to Instr. Updated StrongARM CodeGen to insert edges for branches. Everything should be ready for register allocating now. * GNUmakefile: Small update to eliminate some warnings from make first. * Backend/StrongARM/CodeGen.java, Backend/StrongARM/SACode.java, Backend/StrongARM/SAFrame.java: Changes to reflect that Instr's now implement HasEdges and can be treated as a dataflow graph instead of an array or list. Note that currently CodeGen does not build a complete graph yet, just a straight list of instructions. Adding edges for branches and labels is next on my todo list. * Backend/Generic/Code.java, Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java: Updates to reflect that Instr's are now a dataflow graph instead of an array or list. * IR/Assem/Edge.java: New file. * IR/Assem/Edge.java, IR/Assem/Instr.java, IR/Assem/InstrLABEL.java, IR/Assem/InstrMEM.java, IR/Assem/InstrVisitor.java: Updated Instr to use HasEdges so that it can be analyzed by Felix' generic dataflow and basic block tools. * Analysis/Instr/LocalCffRegAlloc.java: Small modification to reflect changes to InstrMEM. 1999-05-24 pnkfelix * Temp/TempFactory.java: Added carriage returns in between the method descriptions * IR/Tree/Code.java: Merged a number of irrelevant code conflicts (just changes in the comments of the code) * IR/Registration.java: Added an indent to make the code look uniform * Backend/StrongARM/CodeGen.java, Backend/StrongARM/SACode.java: Added support for almost all Opcodes in IR/Tree/Bop.java, based on the handling of ADD and CMPEQ Still need to add support for Division operations (DIV and REM) and I couldn't figure out how to handle Unsigned shifts; I may have misinterpreted the distinction between Logical Shift Right and Arithmetic Shift Right in the ARM Instruction Set's Quick Reference Card (available in http://lm.lcs.mit.edu/~pnkfelix/ArmQuickRef.pdf ) * Backend/Generic/Code.java: Merged conflicting changes between my local version and the one online. Still need to fix discrepancy over internal representation of Instruction Stream (this file uses List[Instr] right now; need to change it to just the header Instr) * Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java: Changed the URLs from locations on remote websites to my local copies in ~pnkfelix on lesser-magoo 1999-05-22 marinov * GNUmakefile: It took me a while to figure out why Flex can't be built on my machine... 1999-05-20 marinov * prj.el: Oops, sorry guys I commited something that didn't quite work. * prj.el: A small useless change in prj.el which allows a java file to be created in the Harpoon/Code directory. 1999-05-19 andyb * Util/Graph.java: Renamed IR.Properties.Edges to IR.Properties.HasEdges, and updated the rest of the source accordingly. * IR/Properties/HasEdges.java: New file. * Analysis/DataFlow/QuadSolver.java, Analysis/DataFlow/ReachingDefs.java, Analysis/Instr/RegAlloc.java, IR/Assem/Instr.java, IR/Bytecode/Instr.java, IR/Properties/Edges.java, IR/Quads/Edge.java, IR/Quads/Quad.java, IR/Tree/Tree.java: Renamed IR.Properties.Edges to IR.Properties.HasEdges, and updated the rest of the source accordingly. * IR/Properties/HasEdges.java: Renamed IR.Properties.Edges to IR.Properties.HasEdges, and updated the rest of the source accordingly. @RENAME: Edges HasEdges@ * Analysis/CycleEq.java, Analysis/DataFlow/BasicBlock.java, Analysis/DomFrontier.java, Analysis/DomTree.java, Analysis/EdgesIterator.java, Analysis/SESE.java, GNUmakefile: Renamed IR.Properties.Edges to IR.Properties.HasEdges, and updated the rest of the source accordingly. 1999-05-17 andyb * IR/Assem/InstrList.java: No reason to keep this file around since we're making Instr's implement Edges now. It's not used anywhere else, so no other updates are necessary. * Analysis/Instr/LocalCffRegAlloc.java: Analysis/DataFlow/InstrSolver.java now exists, so I uncommented the references to it. 1999-05-17 pnkfelix * Analysis/DataFlow/InstrSolver.java: Ack! Andy noticed this file hadn't been added! Commiting to fix this problem! * Analysis/DataFlow/InstrSolver.java: New file. 1999-05-17 andyb * Interpret/Tree/HCLibrary.java, Interpret/Tree/ObjectRef.java, Interpret/Tree/TreeStackFrame.java: Commented out a few debugging calls to appease javac. * Temp/Label.java: Add equals method to Label. * IR/Assem/Instr.java, IR/Assem/InstrDIRECTIVE.java: Added StrongARM to registered code views. Added InstrDIRECTIVE to represent assembler-specific directives. * IR/Assem/InstrDIRECTIVE.java: New file. * IR/Registration.java: Added StrongARM to registered code views. Added InstrDIRECTIVE to represent assembler-specific directives. * IR/Tree/Code.java, IR/Tree/TreeCode.java: Updated TreeCode to use SAFrame in register. Commented out some finals and statics in Code to appease javac. * Backend/StrongARM/CodeGen.java, Backend/StrongARM/ExpValue.java, Backend/StrongARM/SAFrame.java: Added prologue generators to SAFrame, code in CodeGen to do basic (but incomplete) code generation as a temporary measure until the auto-generated code generator is working. * Backend/StrongARM/ExpValue.java: New file. * Backend/Maps/OffsetMap32.java: Commented out exception throwing (assert) temporarily until SAFrame is updated to pass ClassHierarchy to constructor of OffsetMap32. * Backend/Generic/Code.java: Added getFrame, updated print method to make generic Instr printing look nicer. * Analysis/Instr/LocalCffRegAlloc.java: Commented out references to InstrSolver, should be undone once this is checked in by Felix (??) 1999-05-09 duncan * IR/Tree/ToTree.java, IR/Tree/Tree.java, IR/Tree/TreeCode.java, IR/Tree/BINOP.java, IR/Tree/CanonicalTreeCode.java, IR/Tree/Code.java, IR/Tree/Stm.java, IR/Tree/ToCanonicalTree.java: Various bug fixes, mainly to do with implementing the "Edges" interface. * IR/Tree/UNOP.java: Fixed silly bug. The _2B operator was acting as a "toBoolean()" operator, as opposed to a "toByte()" operator. * Interpret/Tree/ArrayPointer.java, Interpret/Tree/ArrayRef.java, Interpret/Tree/ConstPointer.java, Interpret/Tree/FieldPointer.java, Interpret/Tree/FieldValueList.java, Interpret/Tree/HCLibrary.java, Interpret/Tree/INFileOutputStream.java, Interpret/Tree/INSystem.java, Interpret/Tree/InterfaceListPointer.java, Interpret/Tree/InterpreterCachingCodeFactory.java, Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/Method.java, Interpret/Tree/ObjectRef.java, Interpret/Tree/StackFrame.java, Interpret/Tree/StaticState.java, Interpret/Tree/StringPointer.java, Interpret/Tree/TestRun.java, Interpret/Tree/TreeStackFrame.java: Latest version of the interpreter. Many bug fixes. Still have to check in some other files to maintain consistency, so wait a little bit before you use it. * Interpret/Tree/InterpreterCachingCodeFactory.java: New file. 1999-05-07 C. Scott Ananian * IR/Quads/QuadKind.java, IR/Quads/QuadVisitor.java, IR/Quads/TempChain.java, IR/Quads/XI.java: First inklings of XI-function quad type, for Scott's thesis work. Hopefully the rest of you will never have to deal with these, but I'll probably talk about them briefly in the next group meeting. * IR/Quads/TempChain.java, IR/Quads/XI.java: New file. 1999-04-26 duncan * IR/Tree/ToCanonicalTree.java: Fixed bugs in the tree canonicalizer that were assigning the wrong TreeFactories to the new Tree objects. * IR/Tree/Code.java: Fixed some bugs, took out some redundant code 1999-04-25 duncan * IR/Tree/Edge.java: Forgot to commit this file. Thanks Felix! * IR/Tree/Edge.java: New file. 1999-04-23 duncan * IR/Tree/Code.java: I'd forgotten to take out some debug code. oops! * IR/Tree/ToTree.java: instanceof bug fix * IR/Tree/Tree.java: Stole some of scott's quad Edge code to implement the Edges interface in the Tree form * IR/Tree/CanonicalTreeCode.java, IR/Tree/Code.java: Calculates the CFG for CanonicalTreeCode 1999-04-23 pnkfelix * Interpret/Tree/ArrayRef.java, Interpret/Tree/ClazPointer.java, Interpret/Tree/StaticState.java: The java compiler wasn't at all happy about the final variables, saying that they "must be assigned a value in an initializer, or in every constructor" Apparently the java compiler isn't smart enough to combine the effects of constructors that call each other using the 'this' keyword. So I commented out the final declarations for now * Analysis/Tree/TreeCFG.java: Moved a static variable out of an inner class to the outer class, since the java compiler was complaining about it being in the inner class * Analysis/Instr/LocalCffRegAlloc.java: More work on Local register allocation. 1999-04-20 pnkfelix * Analysis/Instr/LocalCffRegAlloc.java: Fixed some stupid bugs that kept this from compiling. <> me bad. * Analysis/Instr/LocalCffRegAlloc.java: Fixed a small for-loop bug * Util/CloneableIterator.java: Changed CloneableIterator from an Iterator to a ListIterator, and switched the internal rep from an explicit homegrown linkedlist to a standard java List. * Analysis/Instr/LocalCffRegAlloc.java: Began adding code to perform modifications to Instrs for register allocation * Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java: New file. * Analysis/Instr/DemandDrivenRegAlloc.java, Analysis/Instr/LocalCffRegAlloc.java: Whoops, forgot to check these in before. Good thing I caught that or the other code I checked in wouldn't have compiled... * Util/CloneableIterator.java: Developed a CloneableIterator wrapper class (needed it for my implementation of Local Reg Alloc), and decided that others might find it useful so I put it in the Util package instead of just making it a hidden away inner class * Util/CloneableIterator.java: New file. * Util/WorkSet.java, Util/Worklist.java: Made WorkSet implement Worklist, I think... * IR/Assem/Instr.java, IR/Assem/InstrList.java, IR/Assem/InstrVisitor.java: Made a variety of changes to the Instr package... deprecated the InstrList, since after discussion with Andy and analysis of the current code base it makes more sense to use a standard java.util.List On nate's suggestion, made all the member variables of Instr public to allow for modification of Instr objects during Instr optimization * Analysis/Instr/RegAlloc.java: Made progress in code for Register Allocation...worked on incorporating both the Global allocation and the Local allocation stages into the generalized register allocator. * Analysis/DataFlow/BasicBlock.java, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/DataFlow/ForwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/ReachingDefInfo.java, Analysis/DataFlow/ReachingDefs.java: Continued work on generalizing the DataFlow package for use with Register allocation 1999-04-12 C. Scott Ananian * IR/Quads/UnHandler.java: Fixed bug in UnHandler that would mark retval as non-null if it was aliased to temp used to pass in 'this' to the method. Thanks to Duncan for finding this. 1999-04-12 duncan * IR/Tree/ExpList.java: Fixed small bug 1999-04-09 pnkfelix * IR/Assem/InstrList.java: Changed deprecation tag slightly to give the reader more of a clue as to what their available options are (since I'm planning on using a Code as the register allocators interface to the rest of the world, figured I should give other people the same idea too...) * IR/Assem/InstrList.java: I put a deprecated tag in this class, since nothing uses it, and I don't want other people to think that it is how sets of Instrs are being passed around (as I did). If I am wrong about this being unused, and the code that uses it has simply not been commited by the person using it, please 1. Email me and let me know 2. Commit your code if possible please so that I can use it as a model of how to use these things and I will subsequently undeprecate the class. 1999-04-08 C. Scott Ananian * Util/PersistentTreeNode.java: New file. * Util/PersistentTreeNode.java: Reorganized persistent binary tree code to allow for sets as well as maps. * Util/Default.java, Util/PersistentMap.java, Util/PersistentSet.java: New file. * Util/Default.java, Util/PersistentMap.java, Util/PersistentSet.java, Util/PersistentTree.java: Reorganized persistent binary tree code to allow for sets as well as maps. 1999-04-07 pnkfelix * Util/Worklist.java: Minor documentation change (previous doc seemed correct but was really totally bogus. My bad. * Analysis/DataFlow/QuadSolver.java, Analysis/DataFlow/ReachingDefs.java, Analysis/DataFlow/Solver.java: I renamed Solver to QuadSolver to reflect the fact that the original Solver implementation was tightly coupled to working with QuadVisitors. Soon I shall implement an InstrSolver that will work with InstrVisitors. Woo. * Analysis/DataFlow/QuadSolver.java: New file. 1999-04-06 C. Scott Ananian * Util/AbstractMapEntry.java, Util/PersistentTree.java: Work on the harpoon.Util.PersistentTree class. Complete, but untested, now. Also added some javadoc to harpoon.Util.AbstractMapEntry. * GNUmakefile: Removed +$ option from jikes command-line, as new versions of jikes don't need it anymore. (um, some people may have to upgrade jikes if they suddenly get lots of errors). For reasons unbeknownst to me, jikes also generates .class files for some java_cup stuff during the build process. So I added a line to ignore the jikes-created java_cup directory when the makefile's searching around for valid package names. 1999-04-05 duncan * Backend/Generic/DefaultFrame.java: Added a constructor. * Analysis/Tree/TreeCFG.java, Analysis/Tree/TreeFolding.java, Analysis/Tree/TreeStructure.java: New file. * Analysis/Tree/TreeCFG.java, Analysis/Tree/TreeFolding.java, Analysis/Tree/TreeStructure.java: TreeFolding code. The implementation is currently a bit naive. * IR/Tree/CJUMP.java, IR/Tree/Code.java, IR/Tree/ESEQ.java, IR/Tree/EXP.java, IR/Tree/Exp.java, IR/Tree/ExpList.java, IR/Tree/INVOCATION.java, IR/Tree/MOVE.java, IR/Tree/SEQ.java, IR/Tree/Stm.java, IR/Tree/ToCanonicalTree.java: The rest of the UseDef implementation * IR/Tree/TEMP.java: UseDef implementation. * IR/Tree/Tree.java: Tree form now implements the UseDef interface 1999-04-05 pnkfelix * IR/Assem/InstrMEM.java, IR/Assem/InstrVisitor.java: New file. * IR/Assem/Instr.java, IR/Assem/InstrLABEL.java, IR/Assem/InstrMEM.java, IR/Assem/InstrVisitor.java: The InstrMEM class is an abstract way to represent memory operations in assembly (needed to add Loads and Stores after register allocation) The InstrVisitor class is part of the continuing Visitor Pattern. I'm adding it because the Solver from the DataFlow package uses the Visitor pattern in all of its calls...still not sure if this is the right way, since we don't have a Visitor superclass that all the other visitors extend, and we probably need that to make a truly generic DataFlow solver. * Analysis/DataFlow/ReachingDefInfo.java, Analysis/DataFlow/ReachingDefs.java: <> Well, no one gets everything right the first time. More changes to reaching defs analysis to be fully generalized. * IR/Properties/Edges.java: I was experimenting with trying to "fix" the design of HCodeEdge so that to() and from() returned something that implemented the Edges interface, rather than HCodeElements. However, a lot of the code relies on getting HCodeElements from HCodeEdges, and although a mixin interface could fix the problem, its an ugly hack and at this point I'll just cast to Edges. But Edges really should be defined to be linked to *other* Edges, not HCodeElements... * Analysis/Instr/RegAlloc.java: I'm still pounding. Still a lot to go. But a lot of time has been saved by reusing the ReachingDefs code Whaley had already made. * Analysis/DataFlow/ReachingDefs.java, Analysis/DataFlow/Solver.java: Generalized Whaley's ReachingDefs implementation from Quads to other IRs. Now any IR that implements Edges, HCodeElement, and UseDef *should* run successfully in the ReachingDefs system. (Needed for register allocation) * Analysis/EdgesIterator.java: EdgesIterator is a generic class for iterating over a Set of Edges, by recursing down the Edges' successors. Needs to generalize Whaley's ReachingDefs implementation from Quads to other IRs. * Analysis/EdgesIterator.java: New file. * Analysis/Instr/RegAlloc.java: First efforts at Demand Driven Register Allocation code...most still isn't done (though algorithms are outlined here as in the paper on Demand Driven Reg Alloc) * Analysis/Instr/RegAlloc.java: New file. * IR/Assem/Instr.java: Made changes to support register allocation code * Analysis/DataFlow/BasicBlock.java: Added a listIterator() method to BasicBlock * Backend/Generic/Code.java: Found a getElementsE() method that was marked XXX unimplemented, so I implemented it. 1999-04-03 C. Scott Ananian * IR/Quads/ToSSI.java: Check in the skeleton of the new toSSI conversion, so that it propagates properly to my laptop. * IR/Quads/ToSSI.java: New file. * Analysis/SESE.java: Silly grammar change in comment. * Util/PersistentTree.java, Analysis/Place.java: Comment out more final declarations to make javac happy. Stupid javac. * Analysis/CycleEq.java: Reproducible hashcodes for cycle equivalency graph nodes (link hashcode to hashcode of underlying hcodeelement, which should be deterministic). 1999-03-31 C. Scott Ananian * Util/PersistentTree.java: A generic implementation of a persistant binary search tree. Not balanced. Do I *look* like I'm crazy? * Util/PersistentTree.java: New file. 1999-03-29 duncan * IR/Tree/ToCanonicalTree.java: New file. * IR/Tree/ToCanonicalTree.java: Translator to canonical form. First pass, probably still has bugs. Based on Appel's translator. * IR/Tree/CanonicalTreeCode.java: Code view for canonical trees. * IR/Tree/CanonicalTreeCode.java: New file. * IR/Tree/Bop.java: *** empty log message *** * IR/Tree/Code.java: Use of the Vector class was providing unacceptable performance in the getElementsE() method, for large TreeCodes. Replaced Vector with HashSet. * IR/Tree/ToTree.java: Small bug fix to handle instanceof on primitive types correctly. 1999-03-27 duncan * Interpret/Tree/TestRun.java: Cleaned up the code to TestRun a bit * Interpret/Tree/README: Current information about the Tree interpreter * Interpret/Tree/README: New file. * Interpret/Tree/TestTypeInfo.java: Mistakenly commited test file. * Interpret/Tree/TestRun.java, Interpret/Tree/TestTypeInfo.java, Interpret/Tree/TreeStackFrame.java, Interpret/Tree/UndefinedPointer.java, Interpret/Tree/UndefinedRef.java: Checking in all files for the tree interpreter. These files fall into 3 categories: 1) Classes which were not present in the quad interpreter. These files exist primarily to provide an implementation of pointers. These files include: ArrayPointer.java // Pointer to array reference ClazPointer.java // Pointer to static class data ConstPointer.java // Points to method or static field FieldPointer.java // Points to non-static field InterfaceListPointer.java // Points to interface list in static class data Pointer.java // Abstract Pointer class StringPointer.java // Pointer to String constant UndefinedPointer.java // Pointer to data for which the type is not known PointerTypeChangedException.java // Thrown when one Pointer is converted // to another Pointer class Additionally, a specialized OffsetMap and AllocationStrategy were added: InterpreterAllocationStrategy.java // Strategy specific to Tree Interpreter InterpreterOffsetMap.java // OffsetMap specific to Tree Interpreter 2) Classes which were modified from the quad interpreter. These include ObjectRef and ArrayRef, which were modified to allow access to their data through the Pointer classes. However, I tried to keep changes to these classes to a minimum to preserve their compatibility with the native method classes. Substantial changes of course were made to the Method class, which is the bulk of the Tree Interpreter. Changes were made to the class loader in StaticState to make it possible to access static data through the Pointer classes. Finally, TreeStackFrame is a direct knock-off of QuadStackFrame, except that it uses the Tree classes. 3) Classes which are unchanged from the Quad interpreter (everything else). This information will be duplicated in a README which I'll leave in this directory. * Interpret/Tree/TestRun.java, Interpret/Tree/TestTypeInfo.java, Interpret/Tree/TreeStackFrame.java, Interpret/Tree/UndefinedPointer.java, Interpret/Tree/UndefinedRef.java: New file. * Interpret/Tree/ArrayPointer.java, Interpret/Tree/ArrayRef.java, Interpret/Tree/ClazPointer.java, Interpret/Tree/ConstPointer.java, Interpret/Tree/FieldPointer.java, Interpret/Tree/FieldValueList.java, Interpret/Tree/HCLibrary.java, Interpret/Tree/INClass.java, Interpret/Tree/INFileInputStream.java, Interpret/Tree/INFileOutputStream.java, Interpret/Tree/INFloatDouble.java, Interpret/Tree/INObject.java, Interpret/Tree/INRandomAccessFile.java, Interpret/Tree/INRuntime.java, Interpret/Tree/INString.java, Interpret/Tree/INSystem.java, Interpret/Tree/InterfaceList.java, Interpret/Tree/InterfaceListPointer.java, Interpret/Tree/InterpretedThrowable.java, Interpret/Tree/InterpreterAllocationStrategy.java, Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/Method.java, Interpret/Tree/NativeMethod.java, Interpret/Tree/NativeStackFrame.java, Interpret/Tree/ObjectRef.java, Interpret/Tree/Pointer.java, Interpret/Tree/PointerTypeChangedException.java, Interpret/Tree/Ref.java, Interpret/Tree/StackFrame.java, Interpret/Tree/StaticState.java, Interpret/Tree/StringPointer.java, Interpret/Tree/Support.java: Checking in all files for the tree interpreter. These files fall into 3 categories: 1) Classes which were not present in the quad interpreter. These files exist primarily to provide an implementation of pointers. These files include: ArrayPointer.java // Pointer to array reference ClazPointer.java // Pointer to static class data ConstPointer.java // Points to method or static field FieldPointer.java // Points to non-static field InterfaceListPointer.java // Points to interface list in static class data Pointer.java // Abstract Pointer class StringPointer.java // Pointer to String constant UndefinedPointer.java // Pointer to data for which the type is not known PointerTypeChangedException.java // Thrown when one Pointer is converted // to another Pointer class Additionally, a specialized OffsetMap and AllocationStrategy were added: InterpreterAllocationStrategy.java // Strategy specific to Tree Interpreter InterpreterOffsetMap.java // OffsetMap specific to Tree Interpreter 2) Classes which were modified from the quad interpreter. These include ObjectRef and ArrayRef, which were modified to allow access to their data through the Pointer classes. However, I tried to keep changes to these classes to a minimum to preserve their compatibility with the native method classes. Substantial changes of course were made to the Method class, which is the bulk of the Tree Interpreter. Changes were made to the class loader in StaticState to make it possible to access static data through the Pointer classes. Finally, TreeStackFrame is a direct knock-off of QuadStackFrame, except that it uses the Tree classes. 3) Classes which are unchanged from the Quad interpreter (everything else). This information will be duplicated in a README which I'll leave in this directory. * Interpret/Tree/ArrayPointer.java, Interpret/Tree/ArrayRef.java, Interpret/Tree/ClazPointer.java, Interpret/Tree/ConstPointer.java, Interpret/Tree/FieldPointer.java, Interpret/Tree/HCLibrary.java, Interpret/Tree/INClass.java, Interpret/Tree/INFileInputStream.java, Interpret/Tree/INFileOutputStream.java, Interpret/Tree/INFloatDouble.java, Interpret/Tree/INObject.java, Interpret/Tree/INRandomAccessFile.java, Interpret/Tree/INRuntime.java, Interpret/Tree/INString.java, Interpret/Tree/INSystem.java, Interpret/Tree/InterfaceList.java, Interpret/Tree/InterfaceListPointer.java, Interpret/Tree/InterpretedThrowable.java, Interpret/Tree/InterpreterAllocationStrategy.java, Interpret/Tree/InterpreterOffsetMap.java, Interpret/Tree/Method.java, Interpret/Tree/NativeMethod.java, Interpret/Tree/NativeStackFrame.java, Interpret/Tree/ObjectRef.java, Interpret/Tree/Pointer.java, Interpret/Tree/PointerTypeChangedException.java, Interpret/Tree/Ref.java, Interpret/Tree/StackFrame.java, Interpret/Tree/StaticState.java, Interpret/Tree/StringPointer.java, Interpret/Tree/Support.java: New file. 1999-03-15 pnkfelix * IR/Properties/Edges.java: ...I changed something. I have no idea what. Probably just a stray carriage return * Analysis/DataFlow/BasicBlock.java, Analysis/DataFlow/QuadBasicBlock.java: FSK: Made some minor comment changes and added a static method FSK: to generate a set of BasicBlocks from a single Edges object FSK: (presumably the header) to BasicBlock.java FSK: Perhaps I should make it take both a head Edges and a tail FSK: Edges ? But then have to worry about multiple exit points; FSK: easier to work with this case first. 1999-03-15 duncan * Backend/Maps/OffsetMap32.java: I checked in code that did not compile. Bad me. 1999-03-15 pnkfelix * Analysis/DataFlow/QuadBasicBlock.java, Analysis/DataFlow/ReachingDefInfo.java, Analysis/DataFlow/ReachingDefs.java: FSK: generalized Whaley's design so that BasicBlocks can be generated for FSK: all implementors of the Edges interface, not just Quad. FSK: Made all dependant code use QuadBasicBlock instead of BasicBlock FSK: (the only dependant code was the example ReachingDefs class, which FSK: inherently relies on SSA form...) * Analysis/DataFlow/QuadBasicBlock.java: New file. * Analysis/DataFlow/BasicBlock.java: FSK: generalized Whaley's design so that BasicBlocks can be generated for FSK: all implementors of the Edges interface, not just Quad. FSK: Made all dependant code use QuadBasicBlock instead of BasicBlock FSK: (the only dependant code was the example ReachingDefs class, which FSK: inherently relies on SSA form...) 1999-03-15 duncan * Backend/Maps/OffsetMap32.java: Cleaned up the OffsetMap32 class a bit 1999-03-12 duncan * Backend/Generic/DefaultFrame.java: Added a new constructor to DefaultFrame which takes an OffsetMap and an AllocationStrategy * IR/Quads/ToNoSSA.java: No longer bother to actually remove PHIs from a PHI node, as it doesn't really serve any purpose, and it slows down my code. * IR/Tree/BINOP.java: Allowed a few more pointer operations * Backend/Maps/OffsetMap32.java: Stubbed in a implementation of the new OffsetMap methods. OffsetMap32 is becoming a mess. I'll clean it up this weekend. * Backend/Maps/OffsetMap.java: Added a few new methods needed by some of my other classes. If anyone disagrees with them, let me know. * IR/Tree/ToTree.java: Numerous fixes to bugs uncovered by the Tree interpreter. Additionally, completely recoded the run-time type checking to be consistent with Sun's run-time type checking algorithm. 1999-03-10 jwhaley * Analysis/DataFlow/BackwardDataFlowQuadVisitor.java, Analysis/DataFlow/BasicBlock.java, Analysis/DataFlow/BasicBlockVisitor.java, Analysis/DataFlow/DESIGN, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/DataFlow/DataFlowQuadVisitor.java, Analysis/DataFlow/ForwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/ForwardDataFlowQuadVisitor.java, Analysis/DataFlow/QuadEnumerator.java, Analysis/DataFlow/ReachingDefInfo.java, Analysis/DataFlow/ReachingDefs.java, Analysis/DataFlow/ReversePostOrderEnumerator.java, Analysis/DataFlow/Solver.java: *** empty log message *** * Analysis/DataFlow/BackwardDataFlowQuadVisitor.java, Analysis/DataFlow/BasicBlock.java, Analysis/DataFlow/BasicBlockVisitor.java, Analysis/DataFlow/DESIGN, Analysis/DataFlow/DataFlowBasicBlockVisitor.java, Analysis/DataFlow/DataFlowQuadVisitor.java, Analysis/DataFlow/ForwardDataFlowBasicBlockVisitor.java, Analysis/DataFlow/ForwardDataFlowQuadVisitor.java, Analysis/DataFlow/QuadEnumerator.java, Analysis/DataFlow/ReachingDefInfo.java, Analysis/DataFlow/ReachingDefs.java, Analysis/DataFlow/ReversePostOrderEnumerator.java, Analysis/DataFlow/Solver.java: New file. * Util/BitString.java: *** empty log message *** * Util/BitString.java: New file. 1999-03-08 andyb * IR/Tree/Code.java: Added a getFrame class to make a TreeCode's Frame available to other interested objects (primarily for use by the assembly-level codeview). * IR/Assem/Instr.java, IR/Assem/InstrFactory.java, IR/Assem/InstrLABEL.java: Added jumps method to Instr (sorry it took me this long to get this checked in Felix). Made toString more complete so that Instrs print out prettier, with temp names instead of the assem string placeholders. Added getFrame method to InstrFactory. Made InstrLABEL constructor public. * Backend/StrongARM/SACode.java, Backend/StrongARM/SAFrame.java: Updated SACode and SAFrame to reflect changes to Generic Code and Frame. Also fleshed out some more of the routines in SAFrame (albeit with rather generic implementations). * Backend/Generic/Code.java, Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java: Added ability of Generic assembly codeviews to keep track of their Frame. Modified Frame to use Instr arrays instead of InstrLists, maintaining consistency with use of Instr arrays in the Instr class itself. 1999-03-07 duncan * Interpret/Tree/FieldValueList.java: Adding a file for the TreeInterpreter. More to follow after I check that they do not break the compilation process. This file is unchanged from the Quad interpreter. Eventually scott or I should go through and unify the interpreters under a set of abstract superclasses. But first, I have to finish getting my interpreter fully debugged. * Interpret/Tree/FieldValueList.java: New file. * Interpret/Tree/Heap.java: Removed file that is no longer part of the tree interpreter. 1999-03-05 duncan * Backend/StrongARM/CodeGen.java: Modified the visitor in the CodeGen class to work with the updated TreeVisitor * IR/Tree/Print.java: Modified the PrintVisitor in this class to work with the updated TreeVisitor * IR/Tree/TreeVisitor.java: Added abstract Tree type to the TreeVisitor class 1999-03-02 C. Scott Ananian * IR/Quads/HandlerSet.java, IR/Quads/UnHandler.java: Update HandlerSet to JDK1.2 by adding Iterators to complement the existing Enumerations. Moved UnHandler to JDK1.2 classes for a tiny performance tweak, and in preparation for an optimization I'm working on. * IR/Quads/FixupFunc.java, Analysis/Place.java: New phi-sigma placement using cycle equivalence. * Analysis/CycleEq.java: Efficiency improvements to harpoon.Analysis.CycleEq: rewrote dfs numbering to use explicit stack instead of recursion, and added sizing hints to maps and sets. * Interpret/Quads/Method.java: Reworked the callStack slightly to improve debug-ability. Previously, if the HCodeFactory threw an exception, we'd end up with a screwed-up call stack (too few frames) which would eventually throw an exception that masked the real problem (the exception in HCodeFactory.convert). * IR/Quads/FOOTER.java, IR/Quads/UnHandler.java: Fix a nasty quadratic inefficiency in UnHandler. * Analysis/SESE.java: Changed the iterator interface slightly. Now you can get either a top-down iteration of the tree or a depth-first iteration. Oh, boy. Made the debugging output prettier, too. =) * Util/ReverseIterator.java: Bug-fix. Proving that no class is too small to contain an error. * Util/ReverseIterator.java: New file. * Util/ReverseIterator.java: You never know when a ReverseIterator might come in handy. * Analysis/SESE.java: javac is too stupid to recognize that this 'final' tag is legal. * Analysis/CycleEq.java, Analysis/SESE.java: Reversed order of CycleEq.cdClass lists so they match what one expects. (Entry node first, Exit node last). Wrote code to determine smallest enclosing canonical SESE region of a Node/Edge in harpoon.Analysis.SESE. * Analysis/SESE.java: New file. * Analysis/CycleEq.java, Analysis/SESE.java: Tweaked harpoon.Analysis.CycleEq to return an (ordered) List instead of an (unordered) Set. Also added a method to return all nodes in DFS order. Added new class harpoon.Analysis.SESE to use the results of CycleEq to construct a tree of Single-Entry Single-Exit regions. * Util/CombineIterator.java: Forgot to add this file. harpoon.Util.CombineIterator combines an array of Iterators into a single Iterator that goes through each Iterator in turn. It parallels the old harpoon.Util.CombineEnumerator. * Util/CombineIterator.java: New file. 1999-03-01 C. Scott Ananian * Analysis/CycleEq.java: Updated Analysis.CycleEq (core of the new ToSSA stuff) to use the JDK 1.2 Collections API. * GNUmakefile: Futzed with makefile so that the support jars (Support/Lex.jar and Support/CUP.jar) get properly installed on the website. * Support/CUP.jar, Support/Lex.jar: Used uncompressed JAR file because some tools don't support compression. * GNUmakefile: Added makefile rule to add Support/CUP.jar and Support/Lex.jar to the classpath when building. * Support/CUP.jar, Support/Lex.jar: Add JAR files for recent versions of CUP and Lex. * Support/CUP.jar, Support/Lex.jar: New file. 1999-02-26 andyb * Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java, Backend/StrongARM/SAFrame.java, IR/Tree/ToTree.java: Modified ToTree and Frame so that the necessary temp mapping is done to the Temps before calling procPrologue - to avoid passing around too many odd parameters if its not necessary. (6.170-strength specs coming soon) Also a minor bugfix to SAFrame to avoid an array indexing problem in the initialization of the pre-allocated register temps. * Backend/StrongARM/README, Backend/StrongARM/SAFrame.java: Modified SAFrame to reflect changes in Generic.Frame and DefaultAllocation Info. README contains some notes on calling convention and such. * Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java: Renamed a few functions in Frame to a more consistant naming scheme, removed RV() and RX() which are unnecessary with RETURN and THROW in Tree. Added getGeneralRegisters to be used by register allocator. Added regTempFactory to return temp factory for pre-allocated temps. Added newFrame to create a new per-method frame under the current one. Added procedure entry/exit code generating routines (based on procEntryExit[123] in Appel, but with meaningful names) * IR/Tree/Code.java, IR/Tree/TEMP.java, IR/Tree/ToTree.java, IR/Tree/TreeCode.java: Modified TEMP to allow pre-register-allocated Temps. Modified Code to use a per-method frame from Frame.newFrame. Added Quad.METHOD visitor to ToTree to be able to generate parameter storing at the beginning of methods. * IR/Assem/Instr.java, IR/Assem/InstrList.java: Made constructors public so they can be accessed from Codegen and Frame classes. Added getFactory to Instr to return its InstrFactory. * Temp/CloningTempMap.java: Added assertion checks in constructor. 1999-02-25 C. Scott Ananian * Main/Graph.java: Bug fixes for harpoon.Main.Graph. Command-line arguments weren't being numbered properly. * IR/Quads/Edge.java: Made equals() and hashCode() consistent. I don't know any bugs that this fixes, but there *should* be some. * Analysis/Place.java: added toString() method for easier debugging (yes, Place is broken). * GNUmakefile: Makefile tweaks: make JIKES_OPT=++ jikes will start jikes in incremental mode; see FAQ for details. Added VCG_OPT option to make it easier to print graphs in landscape mode: java harpoon.Main.Graph harpoon.Main.Main main CFG > main.vcg make VCG_OPT=-landscape main.ps * Util/Util.java: Tweaked Util.escape() function to use backslash-octal escapes instead of unicode escapes when printing out character's whose value is less than 0x100. This makes sequences 'look right' when, for example, a quotation mark is embedded in a string constant. Under java's lexing rules, you can't use a unicode escape for a quotation mark. * Temp/Temp.java: Temps now implement java.lang.Comparable, so you can sort them easily. * IR/Quads/ARRAYINIT.java, IR/Quads/Translate.java: Clarified that value array in harpoon.IR.Quads.ARRAYINIT must match the type specified in its type field (can't wrap values in java.lang.Integer if its a byte array, for example). Made the toString() output prettier. Fixed the Translate code to properly generate ARRAYINITs for character arrays; also ensures that the above constraint on ARRAYINITs was met. * Interpret/Quads/ArrayRef.java, Interpret/Quads/ObjectRef.java, Interpret/Quads/StackFrame.java: Handy helpful toString() methods for debugging. * IR/Quads/SIGMA.java: Deprecate a function in harpoon.IR.Quads.SIGMA that doesn't preserve immutability. 1999-02-24 C. Scott Ananian * IR/Quads/UnHandler.java, IR/Quads/Unreachable.java: A quick hack I added months ago to UnHandler came back to haunt me, so I called Drs. Venkman, Stantz and Spengler to take care of it. Should have no more undefined variable problems. * IR/Quads/Unreachable.java: New file. * IR/Quads/Edge.java, IR/Quads/Quad.java: Added Quad.nextLength() and Quad.prevLength() methods to allow iterating over next and previous quads without using Quad.next() or Quad.prev() and copying an array. Added extra assertions to Quad.Edge. 1999-02-24 andyb * IR/Tree/Code.java, IR/Tree/Print.java: Rewrote the Tree Print class to make it work nicely, the output is fairly understandable now. 1999-02-24 C. Scott Ananian * IR/Bytecode/Liveness.java: Updated harpoon.IR.Bytecode.Liveness to use the new harpoon.Util.WorkSet method names. * Util/WorkSet.java: Tweaks to the WorkSet class, which is an implementation of java.util.AbstractSet which offers efficient access to the elements in insertion order. Regularized the naming. WorkSet now has pop() and peek() methods which work as expected. * Util/ListComparator.java: Forgot to check this in. ListComparator lets you add Lists to SortedSets or SortedMaps by defining an element-wise ordering. * Util/ListComparator.java: New file. * IR/Quads/Translate.java: This is the new, improved bytecode-to-quad translator. It eats finally blocks for lunch. It may even work properly. * IR/Bytecode/Code.java: Make Code.ExceptionEntry implement the Comparable interface, since exception handlers *are* inherently ordered. This makes life easier elsewhere. Also wrote a toString() method to make debugging easier. * IR/Quads/Quad.java: Make Quad implement the comparable interface to allow easy use of SortedMaps and such. Sorting is by Quad.getID(). 1999-02-24 duncan * IR/Tree/UNOP.java: Added evalValue() method to UNOP 1999-02-24 andyb * IR/Tree/Code.java: Fixed bug in getElementsE which caused it to return code elements more than once. Commented out print method since the Tree Print class doesn't work quite right at the moment, use the uglier, yet functional HCode printer for the time being. * IR/Tree/Code.java, IR/Tree/Print.java, IR/Tree/ToTree.java: Some small fixes in Tree - - changed RETURN in ToTree to take an argument of CONST(0) if the method returns void (instead of using a newly generated TEMP which is never def'd) - Fixed Code.java and Print.java to use PrintWriters instead of PrintStreams. Now Tree.Code.print really does override HCode.print. 1999-02-24 duncan * IR/Tree/BINOP.java: Added methods to evaluate BINOPs. Stole a lot from Scott's Qop.evaluate() method. 1999-02-24 C. Scott Ananian * IR/Quads/Translate.java: Minor changes: added toString() methods, fixed capitalization in comments, added skeleton of transHandler map which will save the world very very soon. 1999-02-23 C. Scott Ananian * IR/Quads/Translate.java: First-draft of jsr/ret fixes to Translate.java. Works about as well as the previous version; that is, perfectly on most code, but really doesn't like certain uses of 'finally'. After a Martin-suggested break, I'll patch up those last holes, I hope. I know how to do it now, it's just *so evil*. * Util/AbstractMapEntry.java, Util/Util.java: Added toString() method to harpoon.Util.AbstractMapEntry. Touched up a @deprecation comment in harpoon.Util.Util; 1999-02-23 andyb * IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/ESEQ.java, IR/Tree/EXP.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/NATIVECALL.java, IR/Tree/RETURN.java, IR/Tree/SEQ.java, IR/Tree/TEMP.java, IR/Tree/THROW.java, IR/Tree/UNOP.java: These are toString methods I added to the Tree code elements in order to be able to debug the instruction selection, others may find them useful as well. 1999-02-23 C. Scott Ananian * IR/Quads/CONST.java: Javadoc fix -- noticed that sample code was out-of-date (didn't have quad factories in the constructors). * Util/Tuple.java: Fixed harpoon.Util.Tuple so it handles nulls in tuples properly. Added Collections view to harpoon.Util.Tuple (unmodifiable List view). * Util/AbstractMapEntry.java: Forgot to add this (bad Scott). The Collections API makes you implement the Map.Entry Interface everytime you extend AbstractMap. There are only two "interesting" methods in Map.Entry, getKey() and getValue() -- the rest is code which will almost always be the same. So we provide an abstract class implementing Map.Entry to take care of the grunge work. * Util/AbstractMapEntry.java: New file. * IR/Quads/Translate.java: Added Collections view of return addresses on the stack during the translation process. Added bytecode liveness analysis to the static state used during translation. * GNUmakefile: Added -mx option to javadoc command to keep it from running out of memory. * IR/Bytecode/Liveness.java: Added Collection interface to liveness information. * IR/Bytecode/Liveness.java: optimization hack to reduce memory usage. * Util/FilterIterator.java: New file. * Util/FilterIterator.java: harpoon.Util.FilterIterator is the Collections-equivalent to the old harpoon.Util.FilterEnumeration. * IR/Quads/Code.java: More Collections-ization. * IR/Quads/Translate.java: More Collections-ization. Moved harpoon.IR.Quads.Translate over to the Collections API. * IR/Bytecode/Liveness.java: New file. * IR/Bytecode/Liveness.java: harpoon.IR.Bytecode.Liveness does a local variable liveness analysis to aid harpoon.IR.Quads.Translate Do The Right Thing for JSR/RETs. * Util/WorkSet.java: Bug fixes for new WorkSet set implementation. * Tools/PatMat/Parser.cup: Updated parser specification to take advantage of CUP v0.10i's improved parser-class accessibility (see the ChangeLog for the latest version of CUP). If this causes your build to break, you should make sure you have the latest version of CUP installed. Grab it from http://www.cs.princeton.edu/~appel/modern/java/CUP * Util/EnumerationIterator.java, Util/IteratorEnumerator.java, Util/WorkSet.java: New file. * ClassFile/HCode.java, Util/EnumerationIterator.java, Util/IteratorEnumerator.java, Util/WorkSet.java: The search for the eternal buzz... Wrote EnumerationIterator and IteratorEnumerator classes in harpoon.Util to convert old-style Enumerations to new-style Iterators and back. Changed the default ClassFile/HCode implementation methods to use these. Added harpoon.Util.WorkSet class to provide a Set implementation using the new Collections API that offers linear-time iteration and constant-time arbitrary-element extraction --- what you need for worklist-based algorithms. The Collections API only provides two implementations of Set: TreeSet, which has first() and last() methods to return the first and last leaves which take O(log n) time, and HashSet(), which scans linearly through its hashtable to iterate, leading to O(C) performance, where C is a (large) constant related to the load factor of the hashtable. WorkSet keeps an auxilliary linked list to allow efficient access to the last-added element of the set. * ClassFile/HCode.java, IR/Bytecode/Code.java: Continued the Collections-ization of the code base. Added methods to harpoon.ClassFile.HCode to access the elements of an IR using Collections-oriented APIs. The old legacy methods still work, but new code is recommended to use the new methods. In this vein --- since I'm hacking on the Bytecode IR at the moment --- I updated all files in IR/Bytecode to use the Collections APIs. 1999-02-23 duncan * Interpret/Tree/Heap.java: Created class to simulate a program's heap storage, for use in the Tree interpreter * Interpret/Tree/Heap.java: New file. 1999-02-22 C. Scott Ananian * IR/Bytecode/Instr.java: Implement Comparable interface for harpoon.IR.Bytecode.Instr to allow our (soon-to-be-committed) bytecode liveness analysis to use a SortedSet. In the process, update all the java.util.Vector usage in Instr to use the new java.util.ArrayList in the collections API instead. 1999-02-21 duncan * IR/Tree/ToTree.java: Major bug fixes pertaining to derivation info * IR/Quads/ToNoSSA.java: Fixed bugs in deriv. information * IR/Tree/Print.java: Added the new Tree objects to the Print class * IR/Properties/Derivation.java: Added a clone() method which does not require a CloningTempMap 1999-02-20 duncan * IR/Tree/MemoryAllocator.java: Memory allocation is now handled by the Frame class 1999-02-18 C. Scott Ananian * GNUmakefile, Tools/PatMat/Lexer.jlex, Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java: Tweaks to lexer/parser for instruction selection tool to generate better messages when the input file contains an error. Also, a minor pretty-printing tweak for Tools/PatMat/Spec.java, and removal of an unnecessary dependency in GNUmakefile. 1999-02-18 duncan * IR/Tree/TreeVisitor.java: My absent-mindedness seems infinite. I forgot to add the THROW and RETURN Tree expressions to the TreeVisitor class. * IR/Tree/ToTree.java: Updated the LQ->Tree translator to preserve deriv. and type info. * IR/Tree/TreeVisitor.java: Added new Tree classes to the TreeVisitor class * IR/Tree/CALL.java, IR/Tree/INVOCATION.java, IR/Tree/INVOKATION.java, IR/Tree/NATIVECALL.java: Fixed my atrocious spelling :) * IR/Tree/INVOCATION.java: New file. * IR/Tree/CALL.java, IR/Tree/INVOKATION.java, IR/Tree/NATIVECALL.java: Added the NATIVECALL Tree classes * IR/Tree/INVOKATION.java, IR/Tree/NATIVECALL.java: New file. 1999-02-18 C. Scott Ananian * GNUmakefile, IR/LowQuad/LowQuadSSA.java, Tools/PatMat/Spec.java: Tweaks (mostly workarounds to javac bugs) to get FLEX to compile with javac. 1999-02-18 duncan * IR/Tree/RETURN.java, IR/Tree/THROW.java: Added files to represent the exit of a method body * IR/Tree/RETURN.java, IR/Tree/THROW.java: New file. 1999-02-18 C. Scott Ananian * Analysis/GraphColoring/ColorableGraph.java: One-line fix to compiler errors in SparseGraph.java. * IR/Tree/Code.java: Fix a missing import statement. 1999-02-18 duncan * IR/Tree/ToTree.java, IR/LowQuad/LowQuadSSA.java, IR/Quads/ToNoSSA.java: Removed accesses to the type of derived ptrs * IR/Quads/ToNoSSA.java: Fixed a scoping error. 1999-02-18 C. Scott Ananian * Tools/PatMat/Lexer.jlex, Tools/PatMat/Main.java, Tools/PatMat/Parser.cup: Cleaned up comments a bit. * Tools/PatMat/Lexer.jlex, Tools/PatMat/Main.java, Tools/PatMat/Parser.cup, Tools/PatMat/Spec.java: Finished input file parser for instruction-selection tool. Currently harpoon.Tools.PatMat.Main reads in the file and uses the in-memory representation to print it back out again. andyb will add all the smarts. The harpoon.Tools.PatMat.Spec class could be split into multiple source files, but I am lazy. * Tools/PatMat/Spec.java: New file. * Backend/StrongARM/strongarm.flex: '%%' division between input file sections must be alone on the line. 1999-02-17 andyb * IR/Assem/InstrLABEL.java: New file. * Backend/StrongARM/CodeGen.java, Backend/StrongARM/strongarm.flex, IR/Assem/InstrLABEL.java, IR/Assem/LABEL.java: enamed IR.Assem.LABEL to IR.Assem.InstrLABEL, to avoid confusion with IR.Tree.LABEL, as these two classes will typically be used in close proximity in the code generator. Also, having to worry about specifying classes by package name in the pattern matching tool input would be undesirable. 1999-02-17 C. Scott Ananian * Tools/PatMat/.cvsignore: New file. * Tools/PatMat/.cvsignore, Tools/PatMat/Parser.cup: Tweaked the grammer to be pickier about where it accepts numbers. * IR/Tree/CJUMP.java: Somehow I forgot the documentation for this Tree class. 1999-02-17 andyb * Temp/Temp.java, Temp/TempFactory.java, Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java, Backend/StrongARM/SAFrame.java: Turned Backend.Generic.Frame back into a class instead of an interface because of efficiency concerns. Changed getUniqueID again, this time to protected. This allows custom TempFactories (specifically for generating "register" Temps in Frames) to override this without making it totally public. 1999-02-17 C. Scott Ananian * Tools/PatMat/Lexer.jlex, Tools/PatMat/Main.java, Tools/PatMat/Parser.cup: More work on pattern-matching instruction-selection tool parser/lexer. Now reads in StrongARM spec without problems. Just hafta flesh out the parser action rules to build a representation of the input file. * Tools/PatMat/Main.java: New file. * NOTES/instr-selection-tool, Backend/StrongARM/strongarm.flex: Update to use special brackets for action blocks and predicates. This makes the lexer much easier. * Tools/PatMat/ErrorMsg.java, Tools/PatMat/Lexer.jlex, Tools/PatMat/Parser.cup: First-pass lexer/parser for pattern-matching tool. Not complete yet. * Tools/PatMat/ErrorMsg.java, Tools/PatMat/Lexer.jlex, Tools/PatMat/Parser.cup: New file. * GNUmakefile: Updated makefile to handle machine-generated parsers/lexers. 1999-02-17 andyb * Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java, Backend/StrongARM/SAFrame.java, Backend/StrongARM/strongarm.flex, Temp/Temp.java, Temp/TempFactory.java: Changed Backend.Generic.Frame into an interface, made TempFactory.isUniqueID public access instead of default access, and fleshed out the StrongARM pattern matching tool input some more. 1999-02-16 andyb * IR/Tree/TreeCode.java: Small change - made TreeCode.codename public so that it could be checked from the SACode codeFactory's convert method. * Backend/StrongARM/SACode.java, Backend/StrongARM/SAFrame.java: New file. * Backend/StrongARM/CodeGen.java: Renamed Code and Frame to SACode and SAFrame respectively to help avoid confusion and name duplication with their superclasses. Also added code factory related methods to SACode and the beginnings of a TreeVisitor subclass to CodeGen. * Backend/StrongARM/Code.java, Backend/StrongARM/SACode.java: Renamed Code and Frame to SACode and SAFrame respectively to help avoid confusion and name duplication with their superclasses. Also added code factory related methods to SACode and the beginnings of a TreeVisitor subclass to CodeGen. @RENAME: /Code /SACode@ * Backend/StrongARM/Frame.java, Backend/StrongARM/SAFrame.java: Renamed Code and Frame to SACode and SAFrame respectively to help avoid confusion and name duplication with their superclasses. Also added code factory related methods to SACode and the beginnings of a TreeVisitor subclass to CodeGen. @RENAME: /Frame /SAFrame@ 1999-02-16 C. Scott Ananian * bin/brilliance.tcsh: Include the classes in the collections API for command-completion. * GNUmakefile: Jikes is picky about dollar signs in identifiers unless you specify the +$ flag. So we specify this flag by default. I am actually in the midst of a heated discussion with the jikes developers as to whether the Java Language Specification includes the output of parser generators like javaCUP when it talks about 'machine-generated code'. 1999-02-16 andyb * Backend/Generic/Code.java, Backend/Generic/Frame.java: Created harpoon.Backend.Generic.Code, which contains most of the code which used to be in StrongARM.Code, to serve as the superclass for all the backends when the need arises. Housekeeping - removed some unecessary imports from Frame.java. * Backend/Generic/Code.java: New file. 1999-02-16 C. Scott Ananian * IR/Bytecode/Code.java: Fixed bytecode translator to handle 'bytecode runs off end of array' case, even though JVM spec might prohibit this in valid bytecode. 1999-02-16 andyb * IR/Assem/Instr.java, IR/Assem/LABEL.java: Made Instr non-abstract so that it can actually be instantiated, and fixed a small typo. Added LABEL subclass of instruction to be used for reprensenting (surprise surprise) labels. * IR/Assem/LABEL.java: New file. * Backend/StrongARM/strongarm.flex: Updated example of parser wonder tool input with new methods of type-specification and extra temp declaration. 1999-02-16 duncan * IR/Tree/ToTree.java: It seems that it was a fortuitous choice to die horribly when acquiring the type of a derived pointer. Corrected one instance of that error. * IR/Tree/Code.java: Implemented the trivial Code.print() method * IR/LowQuad/LowQuadSSA.java, IR/Quads/ToNoSSA.java: More changes to forbid typing a derived pointer * IR/LowQuad/Translate.java: On Scott's request, added code to make the translator die horribly if an attempt was made to extract the type of a derived pointer 1999-02-16 andyb * Backend/StrongARM/strongarm.flex: New file. * Backend/StrongARM/strongarm.flex: Some examples and thoughts on an input format for the Tree pattern matching code generating singing and dancing tool. Example output forthcoming. 1999-02-16 duncan * IR/Tree/TreeCode.java: Updated registration procedure * IR/Registration.java: Registers the TreeCode codeview * Backend/Maps/OffsetMap32.java: Still haven't found out what the problem is with ClassHierarchy. Had to take it out of my code for now to allow it to run without crashing. * IR/Tree/ToTree.java: New file. * IR/Tree/ToTree.java: Small fix for a silly bug. * IR/Tree/Code.java: Small fixes to the abstract Tree codeview * Backend/StrongARM/Frame.java: Small tweak of Andy's code to work with the updated Frame interface * Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java: Updated the Frame classes to provide a Temp for the exceptional return value, as well as for the regular one. * Backend/Maps/OffsetMap.java, Backend/Maps/OffsetMap32.java: Added more methods to the OffsetMap class. * IR/LowQuad/Translate.java: Updated LowQuad.Translate to preserve type information. However, this implementation is rather placeholder-ish, (I did it quickly, just so I could start testing my LQ->Tree code). Scott & I should really fix this to work properly. * IR/LowQuad/Code.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java: Small changes in the interface to the LowQuad codeviews, mainly related to propagating type/derivation information 1999-02-16 andyb * Backend/StrongARM/Frame.java, Backend/StrongARM/README, Backend/StrongARM/Code.java, Backend/StrongARM/CodeGen.java: Added beginning of a StrongARM Frame class, also added documentation and some method definitions to the StrongARM codeview. * Backend/StrongARM/Frame.java: New file. 1999-02-16 duncan * IR/Quads/ToNoSSA.java: Fixed a small bug concerning the preservation of derivation info 1999-02-16 andyb * IR/Assem/InstrList.java: New file. * IR/Assem/Instr.java, IR/Assem/InstrFactory.java, IR/Assem/InstrList.java: Rewrote Instr and related classes to use a String-based representation for instruction selection. * Backend/Generic/Frame.java: Merged in the work I was doing on Frame with Duncan's modifications. No major changes. 1999-02-15 duncan * IR/Tree/TreeCode.java: Codeview for Tree form. Another codeview will be added for canonical trees. * IR/Tree/TreeCode.java: New file. * Backend/Generic/DefaultFrame.java, Backend/Generic/Frame.java: Added a couple more methods to Frame.java. Additionally added a DefaultFrame class. This class is probably not very useful, I simply added it to allow me to test my Tree translator. * Backend/Generic/DefaultFrame.java: New file. 1999-02-12 C. Scott Ananian * NOTES/instr-selection-tool: Added notes on the format of the input file of the instruction selection tool to NOTES for andyb. * NOTES/instr-selection-tool: New file. 1999-02-12 pnkfelix * Temp/CloningTempMap.java: Made some of the assertions in CloningTempMap include a explanation String, due to frustration I was having while violating the assertions. * IR/Quads/Quad.java: Made some of the assertions in Quad include a explanation String, due to frustration I was having while violating the assertions. * Analysis/DefMap.java, Analysis/TempToHceArrayMap.java, Analysis/UseMap.java: Found that requiring an HCode for these Maps was too strigent because I couldn't properly perform analysis on clones of codebodies. Looking through the code, I found that the heart of the matter was that I needed an arrayFactory, not the HCode itself (it was just simpler to pass an HCode into the constructor.) So I changed the constructor to TempToHceArrayMap so that takes an arrayFactory. Then I added a constructor to UseMap that takes an arrayFactory and a HCodeElement[], to accomidate the analysis needed as mentioned above. A similar constructor could be added to DefMap easily, but I didn't bother to. (NOTE: Should we possibly add getArrayFactory() to the HCodeElement interface, so that classes that need to duplicate HCodeElements into new arrays can do it properly without this sort of hackery?) 1999-02-12 duncan * Backend/Maps/OffsetMap32.java: A more up-to-date version of OffsetMap32. It may undergo substantial stylistic revisions, but the functionality is there * IR/Tree/TEMP.java: Changed the protected constructor to be public. I needed this constructor for my memory allocation code. Additionally, I surmised that the protected constructor was probably leftover from the old version of the Tree code, when TEMP was an abstract superclass. 1999-02-11 C. Scott Ananian * IR/Quads/CALL.java, NOTES/jls.problems: Added NOTES file on open problems relating to the Java Language Specification. Ways that our translation differs, etc. Also updated the documentation on the CALL quad a little to make it clearer that isVirtual() will return false for a private method, even if it is not static. * NOTES/jls.problems: New file. * Main/Graph.java, Main/LQMain.java: Normalized harpoon.Main.Graph so it accepts a -code option like the rest of harpoon.Main.*. Removed harpoon.Main.LQMain since it is not needed anymore (harpoon.Main.Main -code low-quad-ssa does the same thing). * ClassFile/HClass.java: Java 1.1/1.2 specify that arrays implement the java.io.Serializable interface. This factoid has been propagated to the HClass representation of arrays. 1999-02-09 duncan * IR/Tree/CALL.java, IR/Tree/CONST.java, IR/Tree/ExpList.java, IR/Tree/StmList.java, IR/Tree/Tree.java: Various small changes: 1) Changed rename() methods for ExpList and StmList to be static, thereby making it easier to deal with the case when the lists are null 2) Replaced clone(void) with clone(TreeFactory) to simplify my life 3) Updated CALL.java to use the static ExpList.rename() method 4) Simplified & shortened CONST.java by recalling that the Number class is immutable. (I was previously cloning Number classes from within the rename method, which was unnecessary) * IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/ESEQ.java, IR/Tree/EXP.java, IR/Tree/Exp.java, IR/Tree/ExpList.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/OPER.java, IR/Tree/SEQ.java, IR/Tree/Stm.java, IR/Tree/StmList.java, IR/Tree/TEMP.java, IR/Tree/Tree.java, IR/Tree/UNOP.java: added clone() and rename() methods to the Objects in the Tree package. These will be necessary when performing transformations on the Tree form. 1999-02-09 C. Scott Ananian * Tools/PatMat/README: Creating harpoon.Tools.PatMat package for pattern-matching instruction-selector-generator. * Tools/PatMat/README: New file. * Tools/README: Creating harpoon.Tools package. * Tools/README: New file. * IR/Quads/Translate.java: Optimization of bytecode SWITCH translation (compactness) * Interpret/Quads/QuadStackFrame.java: Be more verbose about use-before-def errors. 1999-02-09 andyb * Backend/Generic/Frame.java, Backend/StrongARM/AddrMode1.java, Backend/StrongARM/AddrMode2.java, Backend/StrongARM/AddrMode3.java, Backend/StrongARM/AddrMode4.java, Backend/StrongARM/Branch.java, Backend/StrongARM/Code.java, Backend/StrongARM/CodeGen.java, Backend/StrongARM/Edge.java, Backend/StrongARM/Multiply.java, Backend/StrongARM/SAInsn.java, Backend/StrongARM/SAInsnEnumCond.java, Backend/StrongARM/SAInsnFactory.java, Backend/StrongARM/SAInsnKind.java, Backend/StrongARM/SAInsnVisitor.java, Backend/StrongARM/Semaphore.java, IR/Assem/Instr.java, IR/Assem/InstrFactory.java: Making changes to begin the path to the real way of representing machine-level instructions and other machine dependant information, in order to simplify code generation and remove lots of code. Removed most of the files from Backend/StrongARM and began reworking the few parts that we're keeping. Flushed out Assem.Instr some more, created an InstrFactory, and added a few abstract methods to Generic.Frame * IR/Assem/InstrFactory.java: New file. 1999-02-08 C. Scott Ananian * Main/Main.java, Main/Run.java: Reworked harpoon.Main.Main and harpoon.Main.Run to allow specification of a codeview on the command line. % java harpoon.Main.Main -code low-quad-ssa harpoon.Main.Main will print the low-quad view of harpoon.Main.Main in SSA form. The default behaviour of harpoon.Main.Main is unchanged: with no command-line options it will behave the same as before. harpoon.Main.LQMain can probably be removed now. * ClassFile/HMethod.java: Add new getCodeFactory() function to HMethod to get a default-implementation codeFactory by name. 1999-02-08 duncan * IR/Tree/Code.java: Abstract code view class for the Tree package. Completely untested, but compilable. * IR/Tree/Code.java: New file. * IR/Quads/ToNoSSA.java: Uses static utility functions in DList class * IR/Properties/Derivation.java: On Scott's request, made utility functions in Derivation static * IR/LowQuad/Code.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java: Tweaked source files to accomodate changes to ToNoSSA * IR/Quads/QuadNoSSA.java, IR/Quads/ToNoSSA.java: Fixed the ToNoSSA class to handle propagation of type and derivation information. Tweaked QuadNoSSA to handle the changes correctly. * IR/Properties/Derivation.java: Added another utility procedure to DList 1999-02-08 andyb * Backend/StrongARM/AddrMode1.java, Backend/StrongARM/AddrMode2.java, Backend/StrongARM/AddrMode3.java, Backend/StrongARM/AddrMode4.java, Backend/StrongARM/Branch.java, Backend/StrongARM/Multiply.java, Backend/StrongARM/README, Backend/StrongARM/Semaphore.java: More of the class heirarchy to represent StrongARM instructions, added some information to README. * Backend/StrongARM/AddrMode1.java, Backend/StrongARM/AddrMode2.java, Backend/StrongARM/AddrMode3.java, Backend/StrongARM/AddrMode4.java, Backend/StrongARM/Branch.java, Backend/StrongARM/Multiply.java, Backend/StrongARM/Semaphore.java: New file. * IR/Assem/Instr.java: First pass at a machine independant superclass for representing assembly level instructions. * IR/Assem/Instr.java: New file. 1999-02-07 andyb * Backend/StrongARM/Code.java, Backend/StrongARM/CodeGen.java, Backend/StrongARM/Edge.java, Backend/StrongARM/README, Backend/StrongARM/SAInsn.java, Backend/StrongARM/SAInsnEnumCond.java, Backend/StrongARM/SAInsnFactory.java, Backend/StrongARM/SAInsnKind.java, Backend/StrongARM/SAInsnVisitor.java: Added basic infrastructure classes for StrongARM instruction representation. Specific opcode classes will be coming once they compile, later tonight. * Backend/StrongARM/Code.java, Backend/StrongARM/CodeGen.java, Backend/StrongARM/Edge.java, Backend/StrongARM/SAInsn.java, Backend/StrongARM/SAInsnEnumCond.java, Backend/StrongARM/SAInsnFactory.java, Backend/StrongARM/SAInsnKind.java, Backend/StrongARM/SAInsnVisitor.java: New file. * NOTES/BackendTODO: Noted what I'm working on in BackendTODO, and it's 1999 now 1999-02-07 C. Scott Ananian * Interpret/Quads/Ref.java: New file. * Interpret/Quads/ArrayRef.java, Interpret/Quads/INFloatDouble.java, Interpret/Quads/INObject.java, Interpret/Quads/INSystem.java, Interpret/Quads/Method.java, Interpret/Quads/ObjectRef.java, Interpret/Quads/Ref.java: Split ObjectRef/ArrayRef and introduce new abstract superclass Ref. This is primarily to improve code clarity and improve the efficiency (and correctness) of interpreted arrays somewhat. Many things needed tweaking after this change. * ClassFile/HArrayMethod.java, ClassFile/HClass.java, Interpret/Quads/StaticState.java: Fix bugs with: 1) HClass.isInstanceOf, which was incorrect for interfaces. 2) Array instances of HClass, which lacked the proper public clone() method. Interpret/Quads/StaticState.java required a correction after fixing item 2 above. * GNUmakefile, bin/annotate.sh: Minor tweaks to make javadoc html faster (maybe) and whiter (certainly). * IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java: Jikes likes it, but javac doesn't: add explicit imports for DList. * GNUmakefile: Makefile tweaks to improve 'from-scratch' compilation. * Main/LQMain.java: Added harpoon.Main.LQMain class to showcase LowQuad form. * Main/LQMain.java: New file. * Main/Main.java: Revert changes to harpoon.Main.Main. * IR/Properties/Derivation.java, IR/LowQuad/Code.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java: Sorry, I couldn't resist: this updates the Derivation interface to accomodate xNoSSA form. 1999-02-06 duncan * IR/Properties/Derivation.java: Added a clone() method to the DList interface. * IR/Quads/QuadNoSSA.java, IR/Quads/ToNoSSA.java: *** empty log message *** * Main/Main.java: Shows translation to LowQuadNoSSA form * IR/Quads/QuadNoSSA.java: Wrong # of args supplied to ToNoSSA.translate() * IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java: *** empty log message *** * IR/Quads/ToNoSSA.java: Fixed various bugs in the ToNoSSA translation 1999-02-05 pnkfelix * Util/TreeSet.java: Aforementioned TreeSet class. Nothing is implemented (in fact it is still abstract) but I wanted to get what's ready so far (mostly doc and a Node inner class) in the repository for public viewing...) * Util/TreeSet.java: New file. * Util/HashSet.java, Util/Set.java, Util/Worklist.java: 1. Modified doc for Worklist to conform to requires/modifies/effects style. 2. Implemented redudant Worklist functionality in Set (means that extensions of Set have less to implement, though I did add an abstract getArbitrary() method to handle the pull() method of Worklist... 3. Removed reimplementations of Worklist methods from HashSet (since they are now implemented in Set) and added implementation of getArbitary. I have also begun work on a TreeSet class (a ListSet couldn't work, at least not efficiently, because we ensure that the addition of duplicates is not allowed. THis implies that a sorted storage mechanism is useful (thus a Tree Structured Set, so that we don't have the overhead of Hashtables). Will continue work on it later. 1999-02-05 C. Scott Ananian * IR/LowQuad/LQop.java: Made LowQuad form consistent with Quad and Tree form by changing the PSUB operation to PNEG. * IR/Tree/Bop.java, IR/Tree/Uop.java, IR/Quads/Qop.java: Expound furthur on the rationale behind the opcode selection in harpoon.IR.Quads.Qop and harpoon.IR.Tree.Bop/harpoon.IR.Tree.Uop. * IR/Tree/BINOP.java, IR/Tree/CONST.java, IR/Tree/MEM.java, IR/Tree/OPER.java, IR/Tree/Print.java, IR/Tree/TEMP.java, IR/Tree/Typed.java, IR/Tree/UNOP.java: Added isDoubleWord() and isFloatingPoint() back to Typed interface. Also swapped around meaning of OPER.type() to make it clearer that there are two types involved: operand type and result type. * IR/Tree/MemoryAllocator.java, IR/Tree/NAME.java, IR/Tree/OPER.java, IR/Tree/SEQ.java, IR/Tree/Stm.java, IR/Tree/TEMP.java, IR/Tree/Tree.java, IR/Tree/TreeFactory.java, IR/Tree/Type.java, IR/Tree/UNOP.java: Added TreeFactory class, and abstract Tree superclass for Exp and Stm to make elements proper harpoon.ClassFile.HCodeElements. Updated constructors for all Exp/Stm subclasses to properly use TreeFactory. * IR/Tree/Tree.java, IR/Tree/TreeFactory.java: New file. * IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/ESEQ.java, IR/Tree/EXP.java, IR/Tree/Exp.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/MOVE.java: Added TreeFactory class, and abstract Tree superclass for Exp and Stm to make elements proper harpoon.ClassFile.HCodeElements. Updated constructors for all Exp/Stm subclasses to properly use TreeFactory. * Backend/Generic/Frame.java: New file. * Backend/Generic/Frame.java: Skeletal Frame class. * IR/Quads/Quad.java, IR/Quads/QuadFactory.java: Minor comment cleanup for harpoon.IR.Quads. * IR/Tree/Type.java: New file. * IR/Tree/Type.java: Oops. Forgot to check in necessary file. Bad Scott. * IR/Tree/BINOP.java, IR/Tree/Bop.java, IR/Tree/CONST.java, IR/Tree/CONSTD.java, IR/Tree/CONSTF.java, IR/Tree/CONSTI.java, IR/Tree/CONSTL.java, IR/Tree/MEM.java, IR/Tree/MEMA.java, IR/Tree/MEMD.java, IR/Tree/MEMF.java, IR/Tree/MEMI.java, IR/Tree/MEML.java, IR/Tree/MemoryAllocator.java, IR/Tree/OPER.java, IR/Tree/Print.java, IR/Tree/TEMP.java, IR/Tree/TEMPA.java, IR/Tree/TEMPD.java, IR/Tree/TEMPF.java, IR/Tree/TEMPI.java, IR/Tree/TEMPL.java, IR/Tree/TreeVisitor.java, IR/Tree/Typed.java, IR/Tree/UNOP.java, IR/Tree/Uop.java: Added harpoon.IR.Tree.Bop and harpoon.IR.Tree.Uop which enumerate the possible opcodes for harpoon.IR.Tree.BINOP and harpoon.IR.Tree.UNOP. In order to make a reasonably-sized set of opcode, reworked Typed interface and applied it to BINOP and UNOP. Made changes to CONST/MEM/TEMP to accomodate new Typed interface --- notably, removed *A/*I/*L/*F/*D subclasses, replacing them with a 'type' field on the base class. Modified Print, TreeVisitor, MemoryAllocator so they still work with the interface changes, and so Print properly prints the opcodes of BINOP/UNOP. * IR/Tree/Bop.java, IR/Tree/Uop.java: New file. * IR/Quads/Qop.java: Fix javadoc spelling mistake. * IR/RawClass/ClassFile.java: tiny javadoc correction. * IR/Quads/Qop.java: Better documentation. * IR/Quads/OperVisitor.java, IR/Quads/Qop.java, IR/Quads/Translate.java, IR/Quads/UnHandler.java: In search of a minimal set of Quad OPER opcodes (Qops) we remove all subtraction opcodes, since for java x-y == x+(-y). The idea here is that analysis passes have to deal with fewer opcode cases and thus can be simpler/easier. 1999-02-04 duncan * Backend/Maps/OffsetMap32.java: *** empty log message *** 1999-02-04 C. Scott Ananian * IR/Quads/CloningTempMap.java, IR/Quads/Quad.java, IR/Quads/QuadNoSSA.java, IR/Quads/ToNoSSA.java, IR/Quads/UnHandler.java, Temp/CloningTempMap.java: Moved harpoon.IR.Quads.CloningTempMap to harpoon.Temp.CloningTempMap, as it seems to be of general utility. Also added new method to harpoon.IR.Quads.ToNoSSA to make it clearer that derivation information is optional (as for QuadSSA->QuadNoSSA translation). * Temp/CloningTempMap.java: New file. * IR/LowQuad/Translate.java: Moved harpoon.IR.Quads.CloningTempMap to harpoon.Temp.CloningTempMap, as it seems to be of general utility. Also added new method to harpoon.IR.Quads.ToNoSSA to make it clearer that derivation information is optional (as for QuadSSA->QuadNoSSA translation). * IR/Quads/QuadNoSSA.java, IR/LowQuad/Code.java, IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java, IR/LowQuad/Translate.java: harpoon.IR.LowQuad.Code: make hD final for efficiency, and to enforce prog. style. harpoon.IR.LowQuad.LowQuadNoSSA: added note regarding hD brokenness. also added constructor to make LowQuadNoSSA from QuadNoSSA form. added corresponding HCodeFactory and fixed javadoc typos. harpoon.IR.LowQuad.LowQuadSSA: added note regarding class-scope javadoc incompleteness. Also restructured the constructor a little bit, and added the hook to codeFactory() to handle LowQuadNoSSA->LowQuadSSA conversions eventually. harpoon.IR.LowQuad.Translate: changed QuadSSA types to harpoon.IR.Quads.Code to allow Translate to work on QuadNoSSA in addition to QuadSSA. harpoon.IR.Quads.QuadNoSSA: added constructor and code factory to handle QuadSSA->QuadNoSSA conversions using Duncan's ToNoSSA translator. 1999-02-04 pnkfelix * Analysis/InterfaceMethodMap.java: In response to Duncan's question and Scott's subsequent response, I have added @see tags to harpoon.Analysis.QuadSSA.ClassHierarchy and harpoon.Main.CallGraph to the constructor for InterfaceMethodMap 1999-02-04 duncan * IR/LowQuad/Code.java: Made harpoon.IR.LowQuad.Code and abstract class. * IR/LowQuad/LowQuadSSA.java, IR/LowQuad/LowQuadNoSSA.java: A few slight modifications * Main/Graph.java: Modified code to work with new codeviews * IR/Registration.java: Modified code to work with new codeviews. 1999-02-03 duncan * Backend/Maps/OffsetMap32.java: First pass at a 32-bit OffsetMap class. It compiles, but has a few bugs that need to be fixed. * Backend/Maps/OffsetMap32.java: New file. 1999-02-03 pnkfelix * Util/FIFO.java, Util/HashSet.java, Util/Set.java, Util/UniqueFIFO.java, Util/UniqueStack.java, Util/Worklist.java: Moved everything over to follow with the new Set abstraction and HashSet implementation. These files constructed Sets with the new Set() constructor, and had to be dealt with accordingly. Also previous extensions of Set that relied on Sets implementation now extend HashSet. Also changed Worklist.push(Object) to return void, instead of Object (it seems that most implementations were just passing back the Object that was passed in anyway...were we inviting code like w1.push(w2.push(w3.push(obj))); ? ) * Util/HashSet.java: New file. * IR/Quads/Code.java, IR/Quads/Peephole.java, IR/Quads/Translate.java, Main/TypesMain.java, Analysis/TypeInference/ClassCone.java, Analysis/TypeInference/FieldType.java, Analysis/TypeInference/IntraProc.java, Analysis/TypeInference/SetHClass.java, Analysis/CycleEq.java, Analysis/DomFrontier.java, Analysis/GraphColoring/GraphColorer.java, Analysis/Place.java, Analysis/TempToHceArrayMap.java, Analysis/UseDef.java: Moved everything over to follow with the new Set abstraction and HashSet implementation. These files constructed Sets with the new Set() constructor, and had to be dealt with accordingly. Remember, if you make an algorithm and want to REQUIRE constant time accesses (as the previous implementation of Set provided) then be sure to type your Set as HashSet, so that pokey people like me don't switch them over to things like ListSet. C:) 1999-02-03 duncan * IR/LowQuad/LowQuadSSA.java: New file. * IR/LowQuad/LowQuadNoSSA.java, IR/LowQuad/LowQuadSSA.java: The two codeviews for LowQuad form. * IR/Quads/ToNoSSA.java: New file. * IR/Quads/ToNoSSA.java: On Scott's suggestion, separated the translation from SSA to No-SSA and put it in this class. * IR/LowQuad/Code.java, IR/LowQuad/LowQuadNoSSA.java: Added a code view which implements the SSA to No-SSA transformation. Derivation information is currently not preserved, I'm in the process of adding it. * IR/LowQuad/LowQuadNoSSA.java: New file. 1999-02-02 pnkfelix * Analysis/GraphColoring/ColorFactory.java, Analysis/GraphColoring/SparseGraph.java, Analysis/InterfaceMethodMap.java: Fixed some HTML bugs that were screwing up the javadoc output (putting instead of apparently screws the whole remainder of the output, not just everything up until the next tag...does the javadoc system try to allow for nesting for tags or something?) 1999-02-01 pnkfelix * Analysis/GraphColoring/ColorableGraph.java, Analysis/GraphColoring/SparseGraph.java, Analysis/DefMap.java: me check in code that no compile. me go bang head against wall now. All fixed, you can take these classes out of your .ignore files now.... * Analysis/InterfaceMethodMap.java: More documentation cleanups: Added a description of the InterfaceMethodMap class to the doc. * Analysis/GraphColoring/ColorFactory.java, Analysis/GraphColoring/ColorableGraph.java, Analysis/GraphColoring/ColorableNode.java, Analysis/GraphColoring/Graph.java, Analysis/GraphColoring/GraphColorer.java, Analysis/GraphColoring/Node.java, Analysis/GraphColoring/SparseGraph.java, Analysis/GraphColoring/SparseNode.java, Analysis/DefMap.java, Analysis/InterfaceMethodMap.java, Analysis/TempToHceArrayMap.java, Analysis/UseMap.java: Mass documentation cleanup. Removed direct exposure of rep of objects from javadoc comments. Prettified requires/modifies/effects clauses slightly. Fixed some specification errors. * NOTES/OptimizationsTODO: Added in the three optimizations mentioned in the meeting today. Woo. * NOTES/BackendTODO, NOTES/OptimizationsTODO: I went through the TODO list but realized that the things in there weren't neatly divided into just Backend and Optimizations, but also bugfixes and such. Also there seemed to be a lot of cruft that was just old task that have been completed and marked as done...wasn't sure if we were planning on keeping the old TODO around forever, so here's the compromise I made: I moved everything related to Backend stuff into the BackendTODO, and likewise for the OptimizationsTODO. Even tasks that were already completed. I tried to keep things in the same order and left the dates dividing up the sections (as best I remember). I didn't save my editted TODO file because I wasn't comfortable putting my deletions into the repository. If people want me to either move the rest of the stuff out of TODO (creating, for example, a DesignTODO and a BugfixTODO) or just delete the redudant stuff that has been moved into these two files from the original TODO, I can do that. But for now, we've got multiple files floating around that have the same info. Plus I'm not sure if I caught all the "optimizations." Some things I may have interpreted as Bugfixes or something may have fallen under the category of Optimization. * NOTES/BackendTODO, NOTES/OptimizationsTODO: New file. 1999-01-31 C. Scott Ananian * Main/Run.java, Main/TypesMain.java, Analysis/TypeInference/InterProc.java, Analysis/TypeInference/IntraProc.java, ClassFile/CachingCodeFactory.java, ClassFile/HCodeFactory.java, ClassFile/HMethod.java, ClassFile/ImplMagic.java, IR/Bytecode/Code.java, IR/LowQuad/Code.java, IR/Quads/QuadNoSSA.java, IR/Quads/QuadSSA.java, IR/Quads/QuadWithTry.java, Main/CallGraph.java, Main/Graph.java, Main/Main.java: Deprecated getCode() and putCode(). Use composition of HCodeFactories instead. Added new clear() method to HCodeFactory. Added codeFactory() methods to subclasses of HCode. Also updated harpoon.Analysis.* packages to use passed HCodeFactories instead of using getCode(). This affects harpoon.Analysis.QuadSSA.CallGraph, harpoon.Analysis.QuadSSA.ClassHierarchy, and harpoon.Analysis.QuadSSA.SCC.SCCOptimize (also new codeFactory() method), harpoon.Analysis.TypeInference.InterProc, and harpoon.Analysis.TypeInference.IntraProc. Fixed harpoon.Main.* to deal with changed harpoon.Analysis.* classes. harpoon.Main.Main now applies SCC optimization by default. * ClassFile/CachingCodeFactory.java: New file. 1999-01-30 pnkfelix * Analysis/DefMap.java, Analysis/TempToHceArrayMap.java, Analysis/UseMap.java: Added a group of classes to replace the UseDef class. TempToHceArrayMap seemed like a logical addition (a superclass containing common code for both the UseMap and the DefMap) but because the logical names for the methods offered by the two objects differ, I ended up still doing a fair amount of unnecessary code duplication between the two Maps. Any suggestions on how to get around this? * Analysis/DefMap.java, Analysis/TempToHceArrayMap.java, Analysis/UseMap.java: New file. 1999-01-29 C. Scott Ananian * TODO: Updated TODO list. Nate, you should compare this with the scribbled-on piece of paper we were working with yesterday and make sure I haven't omitted any of the changes/additions we discussed. 1999-01-28 duncan * Backend/Maps/OffsetMap.java: Some more small changes to OffsetMap. 1999-01-27 duncan * IR/Tree/MemoryAllocator.java: Abstract class which generates the Tree code needed to allocate a block of memory. * IR/Tree/MemoryAllocator.java: New file. 1999-01-26 duncan * Backend/Maps/OffsetMap.java: Added a few abstract methods, nothing earth-shaking 1999-01-25 C. Scott Ananian * TODO: More stuff on the TODO list. Please note that the TODO list is roughly ordered: generally the top things need to be done before the bottom things can be done properly. 1999-01-23 C. Scott Ananian * TODO: Updated the TODO. * IR/LowQuad/Code.java, IR/LowQuad/LowQuadVisitor.java, IR/LowQuad/PMETHOD.java, IR/LowQuad/Translate.java, Backend/Maps/DefaultFinalMap.java: Implemented translator from Quad to LowQuad form. It needs a type analysis to do its job, so I ought to go back and make harpoon.Analysis.QuadSSA.TypeInfo more efficient someday. Can do a better job if it's got a better FinalMap, too. Made 'disallowed' methods in LowQuadVisitor non-final so we can implement visitors that work on both Quad and LowQuad forms. Need to extend TypeInfo and Interpret/Quads so they work properly on LowQuad form. Minor javadoc typo fixed in harpoon.IR.LowQuad.PMETHOD. * Backend/Maps/OffsetMap.java: Silly Scott. He checked in code without trying to compile it first. Bad Scott. The proper 'import' line is now added to make his "trivial" check-in compile. Don't be like Scott. Check in code that compiles. * Backend/Maps/DefaultOffsetMap.java, Backend/Maps/OffsetMap.java, TODO: Wrote detailed Backend to-do list, at top of file TODO in harpoon root. Also updated harpoon.Backend.Maps.OffsetMap to better handle static fields and static references to methods. * IR/Quads/CloningTempMap.java: Forgot to add this for the last commit. CloningTempMap helps you map temps from one quadFactory to the next. * IR/Quads/CloningTempMap.java: New file. * IR/Quads/Quad.java, IR/Quads/UnHandler.java, Temp/Temp.java, IR/Quads/Code.java, TODO: Fixed implementation of clone(), rename() methods for Quads to ensure that TempFactory of all Temps used in a Quad agrees with the tempFactory() of the Quad's QuadFactory. Gosh. 1999-01-22 C. Scott Ananian * Interpret/Quads/ArrayRef.java, Interpret/Quads/FieldValueList.java, Interpret/Quads/HCLibrary.java, Interpret/Quads/INClass.java, Interpret/Quads/INFileInputStream.java, Interpret/Quads/INFileOutputStream.java, Interpret/Quads/INFloatDouble.java, Interpret/Quads/INObject.java, Interpret/Quads/INRandomAccessFile.java, Interpret/Quads/INRuntime.java, Interpret/Quads/INString.java, Interpret/Quads/INSystem.java, Interpret/Quads/Method.java, Interpret/Quads/NativeMethod.java, Interpret/Quads/NativeStackFrame.java, Interpret/Quads/ObjectRef.java, Interpret/Quads/QuadStackFrame.java, Interpret/Quads/StackFrame.java, Interpret/Quads/StaticState.java, Interpret/Quads/Support.java: Removed all 'import harpoon.ClassFile.*;' statements from harpoon.Interpret.Quads package. * Util/ArrayFactory.java, Util/FilterEnumerator.java, Util/Graph.java, Util/HClassUtil.java, Util/SFRE.java, Util/SORE.java, Util/Tuple.java, Util/Worklist.java: Remove all 'import harpoon.ClassFile.*;' statements from harpoon.Util package. * Main/CallGraph.java, Main/Graph.java, Main/Main.java, Main/Run.java, Main/TypesMain.java: Remove all 'import harpoon.ClassFile.*;' statements from harpoon.Main package. * Analysis/Maps/DefaultMap.java, Analysis/Maps/SetTypeMap.java: Remove all 'import harpoon.ClassFile.*;' statements from harpoon.Analysis.Maps package. * Analysis/CycleEq.java, Analysis/DomFrontier.java, Analysis/DomTree.java, Analysis/Place.java, Analysis/UseDef.java: Remove all 'import harpoon.ClassFile.*;' statements from harpoon.Analysis package. * IR/Quads/HEADER.java, IR/Quads/INSTANCEOF.java, IR/Quads/LABEL.java, IR/Quads/METHOD.java, IR/Quads/MONITORENTER.java, IR/Quads/MONITOREXIT.java, IR/Quads/MOVE.java, IR/Quads/NEW.java, IR/Quads/NOP.java, IR/Quads/OPER.java, IR/Quads/OperVisitor.java, IR/Quads/PHI.java, IR/Quads/Peephole.java, IR/Quads/Print.java, IR/Quads/Quad.java, IR/Quads/QuadFactory.java, IR/Quads/QuadNoSSA.java, IR/Quads/QuadSSA.java, IR/Quads/QuadVisitor.java, IR/Quads/QuadWithTry.java, IR/Quads/RETURN.java, IR/Quads/SET.java, IR/Quads/SIGMA.java, IR/Quads/SWITCH.java, IR/Quads/THROW.java, IR/Quads/TYPECAST.java, IR/Quads/Translate.java, IR/Quads/UnHandler.java, IR/Quads/AGET.java, IR/Quads/ALENGTH.java, IR/Quads/ANEW.java, IR/Quads/ARRAYINIT.java, IR/Quads/ASET.java, IR/Quads/CALL.java, IR/Quads/CJMP.java, IR/Quads/COMPONENTOF.java, IR/Quads/CONST.java, IR/Quads/DEBUG.java, IR/Quads/Edge.java, IR/Quads/Eval.java, IR/Quads/FOOTER.java, IR/Quads/FixupFunc.java, IR/Quads/GET.java, IR/Quads/HANDLER.java: Removed all 'import harpoon.ClassFile.*;' statements from harpoon.IR.Quads package. * IR/Bytecode/Code.java, IR/Bytecode/InGen.java, IR/Bytecode/Instr.java, IR/Bytecode/OpClass.java, IR/Bytecode/OpConstant.java, IR/Bytecode/OpField.java, IR/Bytecode/OpLocalVariable.java, IR/Bytecode/OpMethod.java, IR/Bytecode/Operand.java: Removed all 'import harpoon.ClassFile.*;' statements from harpoon.IR.Bytecode package. * ClassFile/HCodeFactory.java: Removed (completely unnecessary) 'import harpoon.ClassFile.*;' statements from harpoon.ClassFile package. * IR/LowQuad/Translate.java, IR/Properties/Derivation.java: New file. * IR/LowQuad/Translate.java, IR/Properties/Derivation.java, IR/Quads/Code.java, IR/Quads/QuadFactory.java: Scattered changes needed to implement the HCode object for LowQuad form. Mostly access-mode tweaks to allow the harpoon.IR.LowQuad package to use the implementations in harpoon.IR.Quads. I really wish java's package scoping were more powerful. * IR/LowQuad/Code.java: New file. * IR/LowQuad/Code.java, IR/Registration.java: Scattered changes needed to implement the HCode object for LowQuad form. Mostly access-mode tweaks to allow the harpoon.IR.LowQuad package to use the implementations in harpoon.IR.Quads. I really wish java's package scoping were more powerful. 1999-01-22 pnkfelix * Analysis/GraphColoring/ColorableNode.java, Analysis/GraphColoring/Node.java: I moved the abstracted methods one level higher (from ColorableNode into Node) because 1.) All extensions of the Graph class need nodes that implement correct equals() and hashcode(), not just extensions of the ColorableGraph class 2.) Its not an evil thing to force other coders to your will. <> * Analysis/InterfaceMethodMap.java: Okay, changed InterfaceMethodMap to rely solely on the getMethods() function, instead of recursing through the interface tree on its own, now that Scott has fixed that code. 1999-01-22 C. Scott Ananian * ClassFile/HClassCls.java, ClassFile/HField.java, ClassFile/HMethod.java: Optimizations. The class, field, and method representations try to delay class loading as long as possible, to achieve demand-driven operation. I've rewritten it so that the loading occurs in an exception handler when necessary, and thus is completely ignored in typical method execution. This should result in some tiny performance gain. * ClassFile/HClass.java, ClassFile/ImplMagic.java: Fix two bugs in harpoon.ClassFile. First, interfaces were declaring themselves to have java.lang.Object as their superclass, which is just plain wrong. It's not my fault, though -- the java class file format specifies that the superclass field of objects should point to the class constant for java.lang.Object, without any apparent good reason. Oh, well. Second, getMethods() was sometimes returning the wrong things: it did not enumerate all the methods of interfaces, as it ought, and it was returning superclass methods that were really hidden by local methods of the same name/descriptor. All this is fixed now, and there was much rejoicing. 1999-01-21 pnkfelix * Analysis/GraphColoring/ColorableNode.java: With the newfound knowledge of System.identityHashCode(Object) firmly in grip, I have added hashCode as an abstract method to ColorableNode thanks Scott! * Analysis/GraphColoring/ColorableNode.java, Analysis/GraphColoring/SparseNode.java: After a bit of experimentation and thought, I decided to put an abstract declaration of equals(Object) in but not hashCode(). My reasoning is this: the default equals() implementation of Object is easily duplicated with ==. Therefore we don't lose the functionality of the method by abstracting it in the ColorableNode class. However, the default hashCode() implementation is NOT easily duplicated, or at least I don't see how. I considered adding a method objectsHashCode() to ColorableNode, that would allow subclasses access to the implementation, but then I realized that such complexity was counterproductive. So right now subclasses of ColorableNode are forced to implement equals() but it is the responsibility of the programmer to see when it is necessary to override the default hashCode() implementation. * Analysis/InterfaceMethodMap.java: I added a equals() method to the HmNode inner class, so the graph is built properly (no duplicate nodes). I will put hashcode() and equals(Object) as abstract methods in the Node class so that people are forced to implement them. Also added a DEBUG variable for printing out status information during graph assembly. Implemented a filter that keeps methods of java.lang.Object out of the Interface method graph. 1999-01-21 C. Scott Ananian * IR/LowQuad/LowQuadKind.java, IR/LowQuad/LowQuadVisitor.java, IR/LowQuad/PAOFFSET.java, IR/LowQuad/PARRAY.java, IR/LowQuad/PCONST.java, IR/LowQuad/PFCONST.java, IR/LowQuad/PFIELD.java, IR/LowQuad/PFOFFSET.java, IR/LowQuad/PMCONST.java, IR/LowQuad/PMETHOD.java, IR/LowQuad/PMOFFSET.java, IR/LowQuad/POPER.java, IR/LowQuad/PPTR.java: Completed the set of LowQuads. Now to write the Quad-to-LowQuad translation routines... * IR/LowQuad/PAOFFSET.java, IR/LowQuad/PARRAY.java, IR/LowQuad/PCONST.java, IR/LowQuad/PFCONST.java, IR/LowQuad/PFIELD.java, IR/LowQuad/PFOFFSET.java, IR/LowQuad/PMCONST.java, IR/LowQuad/PMETHOD.java, IR/LowQuad/PMOFFSET.java: New file. * Analysis/InterfaceMethodMap.java: Javadoc @-tags, if present, must always follow all descriptive text. * IR/Quads/OPER.java: Update to OPER to allow it to be subclassed (by harpoon.IR.LowQuad.POPER). * IR/LowQuad/LQop.java, IR/LowQuad/PCALL.java, IR/LowQuad/POPER.java, IR/LowQuad/PPTR.java, IR/LowQuad/PSET.java: New file. * IR/LowQuad/LQop.java, IR/LowQuad/LowQuadKind.java, IR/LowQuad/LowQuadVisitor.java, IR/LowQuad/PCALL.java, IR/LowQuad/PGET.java, IR/LowQuad/POPER.java, IR/LowQuad/PPTR.java, IR/LowQuad/PSET.java: PCALL PPTR PSET POPER added; LQop created to enumerate POPER opcodes. 1999-01-20 C. Scott Ananian * IR/Quads/Code.java, IR/Quads/Quad.java: Framework for new LowQuad form. [Access modifiers in some bits of harpoon.IR.Quads package needed to be changed to allow subclassing in harpoon.IR.LowQuad package] * IR/LowQuad/LowQuadKind.java, IR/LowQuad/LowQuadVisitor.java, IR/LowQuad/PGET.java: Framework for new LowQuad form. * IR/LowQuad/LowQuadVisitor.java, IR/LowQuad/PGET.java: New file. * IR/LowQuad/LowQuad.java, IR/LowQuad/LowQuadFactory.java: Framework for new LowQuad form. * IR/LowQuad/LowQuad.java, IR/LowQuad/LowQuadFactory.java, IR/LowQuad/LowQuadKind.java: New file. 1999-01-19 C. Scott Ananian * prj.el: Updated prj.el to remove the 'import harpoon.ClassFile.*;' statement (since we dislike import * statements nowadays) and to add GPL license boilerplate. 1999-01-19 pnkfelix * Analysis/GraphColoring/EdgeNotPresentException.java, Analysis/GraphColoring/IllegalEdgeException.java, Analysis/GraphColoring/NodeAlreadyColoredException.java, Analysis/GraphColoring/NodeNotColoredException.java, Analysis/GraphColoring/NodeNotPresentInGraphException.java, Analysis/GraphColoring/NodeNotRemovedException.java, Analysis/GraphColoring/ObjectNotModifiableException.java, Analysis/GraphColoring/WrongNodeTypeException.java: Following Scott's preferences, I have made almost all of the Exceptions in my GraphColoring package extensions of RuntimeException. The only exception (ha) to this is UncolorableGraphException, because that is more dependant on the data being worked on than the code that we've written. * Analysis/InterfaceMethodMap.java, Analysis/InterfaceSlotAllocation.java, Analysis/InterfaceSlotImpl.java: Changed implementation design from a MethodMap factory to a MethodMap with the construction code in the (you got it) constructor Code compiles. Not sure if its correct. Need to figure out how to test this...will someone tell me where this function is that will return an Enumeration of HClass's during compilation? * Analysis/InterfaceMethodMap.java: New file. * Analysis/GraphColoring/ColorableNode.java: Changed setHidden(boolean) and isHidden() methods from protected to package-visible (the default visibility level) because I realized that the hidden attribute really is no business of the subclasses of ColorableNode; it should only be used by the graph coloring system. * Analysis/GraphColoring/Node.java, Analysis/GraphColoring/NodeAlreadyColoredException.java, Analysis/GraphColoring/NodeNotColoredException.java, Analysis/GraphColoring/NodeNotPresentInGraphException.java, Analysis/GraphColoring/NodeNotRemovedException.java, Analysis/GraphColoring/ObjectNotModifiableException.java, Analysis/GraphColoring/SimpleGraphColorer.java, Analysis/GraphColoring/SparseGraph.java, Analysis/GraphColoring/SparseNode.java, Analysis/GraphColoring/WrongNodeTypeException.java, Analysis/GraphColoring/Color.java, Analysis/GraphColoring/ColorFactory.java, Analysis/GraphColoring/ColorableGraph.java, Analysis/GraphColoring/ColorableNode.java, Analysis/GraphColoring/EdgeNotPresentException.java, Analysis/GraphColoring/Graph.java, Analysis/GraphColoring/GraphColorer.java, Analysis/GraphColoring/IllegalEdgeException.java, Analysis/GraphColoring/NoFactorySetException.java: In accordance with Scott's request, I have removed all "import *" statements (all but one were merely the "import harpoon.ClassFile.*" that jde is right now automatically putting into new class buffers...) * Analysis/InterfaceSlotAllocation.java, Analysis/InterfaceSlotImpl.java: Added the skeleton for an implementation of an InterfaceSlotAllocator, and removed all "import *" statements... * Analysis/InterfaceSlotImpl.java: New file. * Analysis/InterfaceSlotAllocation.java: Adding abstract object, InterfaceSlotAllocation, for use in the Interface-Method ordering problem that my graph-coloring system should solve. Will soon follow with a subclasses that uses the graph-coloring system to produce an ordering. * Analysis/InterfaceSlotAllocation.java: New file. 1999-01-18 C. Scott Ananian * IR/Assem/README, IR/Bytecode/Code.java, IR/Bytecode/Op.java, IR/Bytecode/OpClass.java, IR/Bytecode/OpConstant.java, IR/Bytecode/OpField.java, IR/Bytecode/OpMethod.java, IR/RawClass/AccessFlags.java, IR/RawClass/Attribute.java, IR/RawClass/AttributeCode.java, IR/RawClass/AttributeConstantValue.java, IR/RawClass/AttributeExceptions.java, IR/RawClass/AttributeInnerClasses.java, IR/RawClass/AttributeLineNumberTable.java, IR/RawClass/AttributeLocalVariableTable.java, IR/RawClass/AttributeSourceFile.java, IR/RawClass/AttributeSynthetic.java, IR/RawClass/AttributeUnknown.java, IR/RawClass/ClassDataException.java, IR/RawClass/ClassDataInputStream.java, IR/RawClass/ClassDataOutputStream.java, IR/RawClass/ClassFile.java, IR/RawClass/Constant.java, IR/RawClass/ConstantClass.java, IR/RawClass/ConstantDouble.java, IR/RawClass/ConstantFieldref.java, IR/RawClass/ConstantFloat.java, IR/RawClass/ConstantInteger.java, IR/RawClass/ConstantInterfaceMethodref.java, IR/RawClass/ConstantLong.java, IR/RawClass/ConstantMethodref.java, IR/RawClass/ConstantNameAndType.java, IR/RawClass/ConstantString.java, IR/RawClass/ConstantUtf8.java, IR/RawClass/ConstantValue.java, IR/RawClass/ExceptionTable.java, IR/RawClass/FieldInfo.java, IR/RawClass/InnerClass.java, IR/RawClass/LineNumberTable.java, IR/RawClass/LocalVariableTable.java, IR/RawClass/MethodInfo.java, IR/RawClass/README: Moved harpoon.ClassFile.Raw package to harpoon.IR.RawClass. You should make sure CVS properly removes the java files from ClassFile/Raw, ClassFile/Raw/Attribute and ClassFile/Raw/Constant. If it does not, manually delete the java files, but LEAVE THE CVS DIRECTORY INTACT. Then 'make update' and CVS should (belatedly) realize that the harpoon.ClassFile.Raw stuff has been removed from the archive and properly clean up the directory structure for you. I moved the package for two reasons: 1) an obscure rule in the java language reference that says classes should not be named identically to packages, and 2) because the raw binary file as IR reinforces the idea that one day we'll be able to convert back from harpoon.IR.Bytecode back to harpoon.IR.RawClass. * IR/RawClass/AccessFlags.java, IR/RawClass/Attribute.java, IR/RawClass/AttributeCode.java, IR/RawClass/AttributeConstantValue.java, IR/RawClass/AttributeExceptions.java, IR/RawClass/AttributeInnerClasses.java, IR/RawClass/AttributeLineNumberTable.java, IR/RawClass/AttributeLocalVariableTable.java, IR/RawClass/AttributeSourceFile.java, IR/RawClass/AttributeSynthetic.java, IR/RawClass/AttributeUnknown.java, IR/RawClass/ClassDataException.java, IR/RawClass/ClassDataInputStream.java, IR/RawClass/ClassDataOutputStream.java, IR/RawClass/ClassFile.java, IR/RawClass/Constant.java, IR/RawClass/ConstantClass.java, IR/RawClass/ConstantDouble.java, IR/RawClass/ConstantFieldref.java, IR/RawClass/ConstantFloat.java, IR/RawClass/ConstantInteger.java, IR/RawClass/ConstantInterfaceMethodref.java, IR/RawClass/ConstantLong.java, IR/RawClass/ConstantMethodref.java, IR/RawClass/ConstantNameAndType.java, IR/RawClass/ConstantString.java, IR/RawClass/ConstantUtf8.java, IR/RawClass/ConstantValue.java, IR/RawClass/ExceptionTable.java, IR/RawClass/FieldInfo.java, IR/RawClass/InnerClass.java, IR/RawClass/LineNumberTable.java, IR/RawClass/LocalVariableTable.java, IR/RawClass/MethodInfo.java, IR/RawClass/README: New file. * ClassFile/HClass.java, ClassFile/ImplMagic.java: Moved harpoon.ClassFile.Raw package to harpoon.IR.RawClass. You should make sure CVS properly removes the java files from ClassFile/Raw, ClassFile/Raw/Attribute and ClassFile/Raw/Constant. If it does not, manually delete the java files, but LEAVE THE CVS DIRECTORY INTACT. Then 'make update' and CVS should (belatedly) realize that the harpoon.ClassFile.Raw stuff has been removed from the archive and properly clean up the directory structure for you. I moved the package for two reasons: 1) an obscure rule in the java language reference that says classes should not be named identically to packages, and 2) because the raw binary file as IR reinforces the idea that one day we'll be able to convert back from harpoon.IR.Bytecode back to harpoon.IR.RawClass. 1999-01-18 pnkfelix * Analysis/GraphColoring/ColorableGraph.java: *** empty log message *** 1999-01-17 C. Scott Ananian * IR/Quads/Qop.java: Added documentation for Qop types. 1999-01-16 C. Scott Ananian * ClassFile/ImplMagic.java: Document my assumptions. * ClassFile/HClass.java, ClassFile/HPointer.java, ClassFile/ImplMagic.java: Optimize performance of hashCode() method in HClass/HField/HMethod, since maps utilize this frequently. * IR/Tree/TreeVisitor.java: Buglet in TreeVisitor (remenants of the old LMEM/LTEMP system lying around). Fixed. * Backend/Maps/ClassDepthMap.java, Backend/Maps/DefaultClassDepthMap.java, Backend/Maps/DefaultFinalMap.java, Backend/Maps/DefaultInlineMap.java, Backend/Maps/DefaultOffsetMap.java, Backend/Maps/FieldMap.java, Backend/Maps/FinalMap.java, Backend/Maps/MethodMap.java: New file. * Backend/Maps/ClassDepthMap.java, Backend/Maps/DefaultClassDepthMap.java, Backend/Maps/DefaultFinalMap.java, Backend/Maps/DefaultInlineMap.java, Backend/Maps/DefaultOffsetMap.java, Backend/Maps/FieldMap.java, Backend/Maps/FinalMap.java, Backend/Maps/MethodMap.java: Wrote interfaces for all the various numberings needed. MethodMaps map methods to ordered numbers. Felix, your interface numbering scheme should implement a MethodMap to export its results. There are also FieldMaps to order fields, ClassDepthMaps to report on class nesting depth, and InlineMaps to determine whether or not a field can be inlined. FinalMaps determine whether a class, method, or field is final. Some of these maps have simple implementations that return conservative (if not-too-bright) results; some are non-trivial. If you are working on the back end, you should closely examine this map structure to determine which maps your code should be implementing. At this point these are all abstract superclasses rather than interfaces. I would like to keep it this way, both for efficiency and because I would rather the code for each mapping function be kept separate, rather than combined in some huge unmaintainable map-of-all-trades. If you can justify a reason why a particular map should be an interface instead, talk to me. * Backend/Maps/InlineMap.java, Backend/Maps/OffsetMap.java: Minor changes to Duncan's map definitions. Mostly more explicit javadoc about the intended function of these maps. Also changed the maps from interfaces to abstract superclasses for efficiency. Maybe we'll have to change them back, but we'll leave them as classes for as long as possible. * IR/Quads/UnHandler.java: Darko's back on duty, finding my bugs... =) This is a simple typo in the routine which makes explicit quad form from quad-with-implicit-exception-handlers. I love stack traces. 1999-01-15 duncan * IR/Tree/Print.java: Various bug fixes, modified class to account for the new CALL type * IR/Tree/CONSTF.java, IR/Tree/CONSTI.java, IR/Tree/CONSTL.java, IR/Tree/ESEQ.java, IR/Tree/EXP.java, IR/Tree/Exp.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/MEM.java, IR/Tree/MEMA.java, IR/Tree/MEMD.java, IR/Tree/MEMF.java, IR/Tree/MEMI.java, IR/Tree/MEML.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/OPER.java, IR/Tree/Print.java, IR/Tree/SEQ.java, IR/Tree/Stm.java, IR/Tree/TEMP.java, IR/Tree/TEMPA.java, IR/Tree/TEMPD.java, IR/Tree/TEMPF.java, IR/Tree/TEMPI.java, IR/Tree/TEMPL.java, IR/Tree/TreeVisitor.java, IR/Tree/UNOP.java, IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/CONSTD.java: Added visit() methods to all subclasses of Exp and Stm. Converted the Print class to use the visitor model. Code compiles, is not yet tested. 1999-01-14 C. Scott Ananian * IR/Tree/CALL.java: This makes CALL a statement in IR.Tree form, instead of an expression, to deal with the fact that CALLs return a possible exception in addition to the return value. 1999-01-14 duncan * IR/Tree/TreeVisitor.java: *** empty log message *** * Backend/Maps/InlineMap.java, Backend/Maps/OffsetMap.java: Fixed silly mistake. Sorry to flood inboxes. * Backend/Maps/OffsetMap.java: Added size() method * Backend/Maps/InlineMap.java, Backend/Maps/OffsetMap.java: *** empty log message *** * Backend/Maps/InlineMap.java, Backend/Maps/OffsetMap.java: New file. 1999-01-14 pnkfelix * Analysis/GraphColoring/ColorFactory.java, Analysis/GraphColoring/GraphColorer.java, Analysis/GraphColoring/NoFactorySetException.java, Analysis/GraphColoring/SimpleGraphColorer.java: Moved the ColorFactory parameter out of the methods for GraphColorer, and into its constructor, where it is now an immutable field. Added an argumentless constructor to GraphColorer, for use by classes that don't need the capability for color production in their searches (such as allocating a fixed set of registers). Added the runtime exception NoFactorySetException that is thrown when a Factory-Less colorer is used to perform an unbounded color search/allocation. * Analysis/GraphColoring/NoFactorySetException.java: New file. 1999-01-14 C. Scott Ananian * IR/Tree/LTEMP.java, IR/Tree/MEMA.java, IR/Tree/MOVE.java, IR/Tree/TEMP.java, IR/Tree/TEMPA.java, IR/Tree/TEMPD.java, IR/Tree/TEMPF.java, IR/Tree/TEMPI.java, IR/Tree/TEMPL.java: Made TEMP typed; fixed buglets in MOVE and MEMA. * IR/Tree/TEMPA.java, IR/Tree/TEMPD.java, IR/Tree/TEMPF.java, IR/Tree/TEMPI.java, IR/Tree/TEMPL.java: New file. 1999-01-14 duncan * IR/Tree/TreeVisitor.java: Forgot to add the MEM* classes. 1999-01-14 C. Scott Ananian * IR/Tree/CONSTD.java, IR/Tree/CONSTF.java, IR/Tree/CONSTI.java, IR/Tree/CONSTL.java: New file. * IR/Tree/CONST.java, IR/Tree/CONSTD.java, IR/Tree/CONSTF.java, IR/Tree/CONSTI.java, IR/Tree/CONSTL.java, IR/Tree/DCONST.java, IR/Tree/FCONST.java, IR/Tree/ICONST.java, IR/Tree/LCONST.java, IR/Tree/LMEM.java: New typed CONST in Tree form. Should CONSTA (for addresses) replace NAME? * IR/Tree/MEM.java, IR/Tree/MEMA.java, IR/Tree/MEMD.java, IR/Tree/MEMF.java, IR/Tree/MEMI.java, IR/Tree/MEML.java, IR/Tree/Typed.java: Changes to the MEM class to support typed values. Note the MEMA to represent fetches of addresses from memory. The length of an address is machine-dependent. * IR/Tree/MEMA.java, IR/Tree/MEMD.java, IR/Tree/MEMF.java, IR/Tree/MEMI.java, IR/Tree/MEML.java, IR/Tree/Typed.java: New file. 1999-01-14 pnkfelix * Analysis/GraphColoring/GraphColorer.java, Analysis/GraphColoring/SimpleGraphColorer.java: Abstracted away the graph coloring object, allowing for easy replacement or parameterization of the graph coloring algorithm used. * Analysis/GraphColoring/GraphColorer.java: New file. 1999-01-14 duncan * IR/Tree/TreeVisitor.java: Abstract visitor class for the harpoon.IR.Tree package * IR/Tree/TreeVisitor.java: New file. 1999-01-14 pnkfelix * Analysis/GraphColoring/SimpleGraphColorer.java: Set the DEBUG flag in SimpleGraphColorer back to false now that all know problems have been fixed. * Analysis/GraphColoring/ColorableGraph.java, Analysis/GraphColoring/SparseGraph.java, Analysis/GraphColoring/SparseNode.java: Fixed a bug in SparseGraph's implementation of unhideAllNodes(). The SimpleGraphColorer now works on at least three simple and one complex test cases. * Analysis/GraphColoring/NodeAlreadyColoredException.java: Forgot to add this file before * Analysis/GraphColoring/NodeAlreadyColoredException.java: New file. * Analysis/GraphColoring/ColorableGraph.java, Analysis/GraphColoring/ColorableNode.java, Analysis/GraphColoring/Graph.java, Analysis/GraphColoring/IllegalEdgeException.java, Analysis/GraphColoring/ObjectNotModifiableException.java, Analysis/GraphColoring/SimpleGraphColorer.java, Analysis/GraphColoring/SparseGraph.java, Analysis/GraphColoring/SparseNode.java: Finished implementation of classes and have begun testing. Will add test package to repository shortly. * Analysis/GraphColoring/IllegalEdgeException.java, Analysis/GraphColoring/ObjectNotModifiableException.java, Analysis/GraphColoring/NodeNotColoredException.java, Analysis/GraphColoring/SimpleGraphColorer.java: New file. * Analysis/GraphColoring/NodeNotColoredException.java, Analysis/GraphColoring/SimpleGraphColorer.java: The rest of the files (I wasn't sure which ones I forgot to add until after I did the commit...) The start of a Graph Coloring Framework. It compiles, but I'm not sure about correctness yet. There are two main modules that can be extended and adapted (perhaps I should have put them in seperate packages). Right now I've implemented a SparseGraph representation and a simple-minded Graph coloring algorith. Will begin work on extending the system to do the interface-slot problem after I do some test runs to ensure that the algorithm does indeed color correctly. * Analysis/GraphColoring/Color.java, Analysis/GraphColoring/ColorFactory.java, Analysis/GraphColoring/EdgeNotPresentException.java: New file. * Analysis/GraphColoring/Color.java, Analysis/GraphColoring/ColorFactory.java, Analysis/GraphColoring/EdgeNotPresentException.java: The rest of the files (I wasn't sure which ones I forgot to add until after I did the commit...) The start of a Graph Coloring Framework. It compiles, but I'm not sure about correctness yet. There are two main modules that can be extended and adapted (perhaps I should have put them in seperate packages). Right now I've implemented a SparseGraph representation and a simple-minded Graph coloring algorith. Will begin work on extending the system to do the interface-slot problem after I do some test runs to ensure that the algorithm does indeed color correctly. * Analysis/GraphColoring/ColorableGraph.java, Analysis/GraphColoring/ColorableNode.java, Analysis/GraphColoring/Graph.java, Analysis/GraphColoring/Node.java, Analysis/GraphColoring/NodeNotPresentInGraphException.java, Analysis/GraphColoring/NodeNotRemovedException.java, Analysis/GraphColoring/SparseGraph.java, Analysis/GraphColoring/SparseNode.java, Analysis/GraphColoring/UncolorableGraphException.java, Analysis/GraphColoring/WrongNodeTypeException.java: New file. * Analysis/GraphColoring/ColorableGraph.java, Analysis/GraphColoring/ColorableNode.java, Analysis/GraphColoring/Graph.java, Analysis/GraphColoring/Node.java, Analysis/GraphColoring/NodeNotPresentInGraphException.java, Analysis/GraphColoring/NodeNotRemovedException.java, Analysis/GraphColoring/SparseGraph.java, Analysis/GraphColoring/SparseNode.java, Analysis/GraphColoring/UncolorableGraphException.java, Analysis/GraphColoring/WrongNodeTypeException.java: The start of a Graph Coloring Framework. It compiles, but I'm not sure about correctness yet. There are two main modules that can be extended and adapted (perhaps I should have put them in seperate packages). Right now I've implemented a SparseGraph representation and a simple-minded Graph coloring algorith. Will begin work on extending the system to do the interface-slot problem after I do some test runs to ensure that the algorithm does indeed color correctly. 1999-01-14 C. Scott Ananian * IR/Tree/LTEMP.java, IR/Tree/Print.java, IR/Tree/TEMP.java: Added LTEMP class for 64-bit values. Fixed Print class for LTEMP and UNOP. * IR/Tree/LTEMP.java: New file. * Temp/Label.java, Temp/LabelList.java, IR/Tree/MOVE.java, IR/Tree/NAME.java, IR/Tree/OPER.java, IR/Tree/Print.java, IR/Tree/SEQ.java, IR/Tree/Stm.java, IR/Tree/StmList.java, IR/Tree/TEMP.java, IR/Tree/UNOP.java: First crack at definition of TREE IR, based on Appel's skeleton. Labels need factories, yet, and i haven't yet defined the enumeration for BINOP and UNOP opcodes. We may not need ESEQ and EXP, but they're here anyway. Perhaps we need an LTEMP class to go with LMEM? probably so. * IR/Tree/NAME.java, IR/Tree/OPER.java, IR/Tree/Print.java, IR/Tree/SEQ.java, IR/Tree/Stm.java, IR/Tree/StmList.java, IR/Tree/TEMP.java, IR/Tree/UNOP.java: New file. * IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/DCONST.java, IR/Tree/ESEQ.java, IR/Tree/EXP.java, IR/Tree/Exp.java, IR/Tree/ExpList.java, IR/Tree/FCONST.java, IR/Tree/ICONST.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/LCONST.java, IR/Tree/LMEM.java, IR/Tree/MEM.java: First crack at definition of TREE IR, based on Appel's skeleton. Labels need factories, yet, and i haven't yet defined the enumeration for BINOP and UNOP opcodes. We may not need ESEQ and EXP, but they're here anyway. Perhaps we need an LTEMP class to go with LMEM? probably so. * IR/Tree/BINOP.java, IR/Tree/CALL.java, IR/Tree/CJUMP.java, IR/Tree/CONST.java, IR/Tree/DCONST.java, IR/Tree/ESEQ.java, IR/Tree/EXP.java, IR/Tree/Exp.java, IR/Tree/ExpList.java, IR/Tree/FCONST.java, IR/Tree/ICONST.java, IR/Tree/JUMP.java, IR/Tree/LABEL.java, IR/Tree/LCONST.java, IR/Tree/LMEM.java, IR/Tree/MEM.java, IR/Tree/MOVE.java: New file. 1999-01-13 C. Scott Ananian * IR/LowQuad/README, IR/Quads/README, IR/Tree/README: Added package structure for harpoon.IR hierarchy. * IR/LowQuad/README, IR/Quads/README, IR/Tree/README: New file. * IR/Assem/README: Added package structure for harpoon.IR hierarchy. * IR/Assem/README: New file. * Backend/Generic/README, Backend/JavaByte/README, Backend/Pentium/README, Backend/Sparc/README, Backend/StrongARM/README: More package skeletons and README files. * Backend/Generic/README, Backend/JavaByte/README, Backend/Pentium/README, Backend/Sparc/README, Backend/StrongARM/README: New file. * Backend/Analysis/README, Backend/README: Oops. Commited backend to HEAD instead of to magic/2.0 branch. * Backend/Analysis/README, Backend/README: Adding files to the Backend subdirectories to make them visible. Setting up package structure for the back end. 1999-01-12 C. Scott Ananian * Analysis/CycleEq.java: Trivial change to primes() in preparation for implementing canonical SESE regions. Moving to the laptop, though, so I need to check it in. * IR/Quads/METHOD.java: Removed 'arity' bracketed-string from toString() output to normalize things. * IR/Quads/UnHandler.java: Added names to several temps to keep them from being "tX_Y" temps in harpoon.Main.Main's output. * Analysis/CycleEq.java: The cycle-equivalency code now groks graphs made from edges, as well as the old graphs made from nodes. 1999-01-11 C. Scott Ananian * Analysis/CycleEq.java: More work on CycleEq. Efficiency improvements and restructuring, mostly. 1999-01-10 C. Scott Ananian * Analysis/CycleEq.java: Code restructuring and cleanup. Goal here is to abstract graph representation so we can compute cycle-equivalency on either CFG nodes *or* CFG edges. Fast computation of cycle-equivalency classes is the core component of the new linear-time phi/sigma placement algorithms. 1999-01-09 C. Scott Ananian * Interpret/Quads/ObjectRef.java: Javac is stupid and disallows the final modifier on fields where it should be applicable. Jikes is smarter, but we don't want to *require* jikes be used; not yet at least. So take off the final modifier for compatability. * Main/ProfileMain.java: Code-rot has set in; remove Profile and ProfileMain before the corruption spreads. Profile and ProfileMain will eventually be re-merged from magic/1.0, so there's no point to keeping around broken versions of these in magic/2.0. 1999-01-07 C. Scott Ananian * Analysis/CycleEq.java: Heavier use of Enumeration classes to avoid array copies; don't know if this improves efficiency but maybe it improves readability? * Util/CombineEnumerator.java: Fixed a bug in the CombineEnumerator. * TODO: Updated TODO list to more accurately reflect current state of the codebase. 1999-01-06 C. Scott Ananian * Interpret/Quads/Method.java: Buglet in handling of throw exceptions in void methods in explicit-exception quad form. fixed. * ClassFile/Loader.java: The tya java JIT doesn't seem to like exceptions thrown in finalizers. The only place this happens is in harpoon.ClassFile.Loader and is due to a strange bug in java: uninitialized objects can be finalized. This could even lead to a security breach, but i'm to lazy to follow up on it now. Anyway, this one-line commit keeps TYA happy. 1999-01-02 C. Scott Ananian * ClassFile/HClass.java, ClassFile/Loader.java, IR/Quads/COMPONENTOF.java, IR/Quads/Eval.java, IR/Quads/HANDLER.java, IR/Quads/INSTANCEOF.java, IR/Quads/OPER.java, IR/Quads/Qop.java, IR/Quads/QuadFactory.java, IR/Quads/QuadKind.java, IR/Quads/QuadVisitor.java, IR/Quads/TYPECAST.java, IR/Quads/Translate.java, IR/Quads/UnHandler.java, Interpret/Quads/ArrayRef.java, Interpret/Quads/FieldValueList.java, Interpret/Quads/HCLibrary.java, Interpret/Quads/INFileInputStream.java, Interpret/Quads/INFileOutputStream.java, Interpret/Quads/INFloatDouble.java, Interpret/Quads/INObject.java, Interpret/Quads/INRandomAccessFile.java, Interpret/Quads/INRuntime.java, Interpret/Quads/INSystem.java, Interpret/Quads/Method.java, Interpret/Quads/ObjectRef.java, Interpret/Quads/StaticState.java, Interpret/Quads/Support.java, Main/Run.java, TODO, Temp/WritableTempMap.java: Just got back from South Carolina today, so I've got lots of code to commit: Added a TYPECAST quad to mark type casting of temporaries. TYPECAST is a subclass of NOP, so existing code requires no changes. Type analysis can take advantage of the extra information, and the implicit-exception form is cleaner with the TYPECAST quads. Normalized the COMPONENTOF and INSTANCEOF quads. They both work on null-pointers now -- before, only COMPONENTOF was supposed to work on null, and INSTANCEOF was supposed to be used only on quads that had been previously determined to be non-null. That silly restriction is gone. Some optimizations may work better if the explicit null-check before INSTANCEOF (which is now absent) is re-inserted. It's on the TODO list. MAJOR FIX to harpoon.ClassFile.Loader: through a slip of my fingers, the Loader class was actually treating all non-zip file entries as '.' (ie, ignoring the directory portion of the path). I don't think anyone noticed this, but they were bound to eventually. I kissed it and made it better. Many improvements to harpoon.Interpret.Quads classes. Interpreting harpoon.Main.Main now works. Implemented more native methods (INFileInputStream/INObject/INRuntime/INFloatDouble) and removed some java language reflection in harpoon.IR.Quads.OPER to make this possible. [try java harpoon.Main.Run harpoon.Main.Main harpoon.Main.Main.... and be prepared to wait a while. I give java the -noasyncgc and -mx70m flags when I do this.] Profiling support in harpoon.Interpret.Quads. The -prof option works, with syntax identical to java: java harpoon.Main.Run -prof:prof.out [classname] [args] puts profiling information in prof.out. All methods invoked and objects created are logged. Separate tools (not included in this commit) analyze the data. The profile data is output in a simple plaintext format, but it is gzip-compressed on the fly to save space. Use gunzip or zcat if you want to take a gander. Added harpoon.ClassFile.HClass.isInstanceOf() method which supersedes the HClass.isSuperclassOf() method. Several instance of tests in the codebase were using isSuperclass which incorrectly reports interface inheritance and array hierarchies. The new isInstanceOf() method correctly reports if one class or array is an instance of another class, interface, or array type. Affected: harpoon.Analysis.QuadSSA.SCC.SCCAnalysis harpoon.Interpret.Quads.{Method,INSystem} [also some minor tweaking to harpoon.ClassFile.HClass to cache class constants] Miscellaneous: Updated TODO list. Improved assertions in IR.Quads.HANDLER to ensure that the caught exception is a subclass of java.lang.Throwable (or null, which means "any"). As mentioned, use of java language reflection in IR.Quads.OPER is removed; this entails adding a two methods to IR.Quads.Qop. I commented out the proxy quad construction methods in IR.Quads.QuadFactory, since I don't think they are a good idea. Support for profiling in Main/Run Added WriteableTempMap interface (subclass of TempMap) which will be used by some of the translation routines. Logged 1400+ miles in my pickup without initiating unplanned rotation, revolution, or convulsion of the vehicle. Had to replace my windshield wiper fluid because it froze solid in Boston. Finally thawed in the Carolinas. * IR/Quads/TYPECAST.java, Interpret/Quads/INFileInputStream.java, Interpret/Quads/INFloatDouble.java, Interpret/Quads/INObject.java, Interpret/Quads/INRuntime.java, Temp/WritableTempMap.java: New file. 1998-12-29 C. Scott Ananian * Main/Run.java: Change the interpreter to use quad-with-try form by default (instead of quad-no-ssa or quad-ssa) because it's the fastest to generate and we need all the speed we can get. Interpreting in an interpreted language, what fun. * Interpret/Quads/INString.java, Interpret/Quads/INSystem.java, Interpret/Quads/Method.java, Interpret/Quads/NativeMethod.java, Interpret/Quads/ObjectRef.java, Interpret/Quads/StaticState.java, Interpret/Quads/Support.java: Many improvements to Quad Interpreter. Added interpreter for quad-with-try form that handled implicit exception handling. Cleaned up code lots. Added per-class and per-object 'closures' for use by native methods. This allows us to associate internal HClass objects with interpreted java.lang.Class objects and internal java.io.* objects with the interpreted ones, etc. Preliminary profiling support. More native methods. Much more useful now that System.out and System.err interpret properly. Simple programs that do computation and write to System.out/err should work perfectly now. Working on improving file i/o so we can run the interpreter with itself. The standard java "hello, world"-type programs should interpret with: java harpoon.Main.Run Hello * Interpret/Quads/INSystem.java: New file. * Interpret/Quads/HCLibrary.java, Interpret/Quads/INClass.java, Interpret/Quads/INFileOutputStream.java, Interpret/Quads/INRandomAccessFile.java: Many improvements to Quad Interpreter. Added interpreter for quad-with-try form that handled implicit exception handling. Cleaned up code lots. Added per-class and per-object 'closures' for use by native methods. This allows us to associate internal HClass objects with interpreted java.lang.Class objects and internal java.io.* objects with the interpreted ones, etc. Preliminary profiling support. More native methods. Much more useful now that System.out and System.err interpret properly. Simple programs that do computation and write to System.out/err should work perfectly now. Working on improving file i/o so we can run the interpreter with itself. The standard java "hello, world"-type programs should interpret with: java harpoon.Main.Run Hello * Interpret/Quads/HCLibrary.java, Interpret/Quads/INClass.java, Interpret/Quads/INFileOutputStream.java, Interpret/Quads/INRandomAccessFile.java, Interpret/Quads/INString.java: New file. * IR/Quads/QuadWithTry.java: Full optimization breaks quad-with-try form, so turn off the dangerous stuff. * ClassFile/Loader.java: Trivial change to harpoon.ClassFile.Loader to reduce memory footprint. 1998-12-28 C. Scott Ananian * IR/Quads/METHOD.java, IR/Quads/Quad.java, IR/Quads/QuadFactory.java, Interpret/Quads/QuadStackFrame.java: jikes is more strict than javac, so make method information more public than it was before. * Interpret/Quads/ArrayRef.java, Interpret/Quads/FieldValueList.java, Interpret/Quads/InterpretedThrowable.java, Interpret/Quads/Method.java, Interpret/Quads/NativeMethod.java, Interpret/Quads/NativeStackFrame.java, Interpret/Quads/ObjectRef.java, Interpret/Quads/QuadStackFrame.java, Interpret/Quads/StackFrame.java, Interpret/Quads/StaticState.java, Interpret/Quads/Support.java, Main/Run.java: Checked in a Quad-form interpreter to help profile & verify correctness. Currently, not enough 'native' methods are implemented to make this very useful. I'm still working on it. Usage will be: java harpoon.Main.Run [classname] [class args] for example, java harpoon.Main.Run harpoon.Main.Main harpoon.Main.Main or java harpoon.Main.Run harpoon.Main.Run harpoon.Main.Main harpoon.Main.Main etc. * Interpret/Quads/ArrayRef.java, Interpret/Quads/FieldValueList.java, Interpret/Quads/InterpretedThrowable.java, Interpret/Quads/Method.java, Interpret/Quads/NativeMethod.java, Interpret/Quads/NativeStackFrame.java, Interpret/Quads/ObjectRef.java, Interpret/Quads/QuadStackFrame.java, Interpret/Quads/StackFrame.java, Interpret/Quads/StaticState.java, Interpret/Quads/Support.java, Main/Run.java: New file. * IR/Quads/CALL.java, IR/Quads/HANDLER.java, IR/Quads/HandlerSet.java, IR/Quads/Peephole.java, IR/Quads/Print.java, IR/Quads/Quad.java, IR/Quads/QuadNoSSA.java, IR/Quads/QuadWithTry.java, IR/Quads/Translate.java: Various internal fixes/improvements: - new harpoon.IR.Quads.CALL.paramType(int) method. - added remove() and insert() method to harpoon.IR.Quads.HANDLER.ProtectedSet. - harpoon.IR.Quads.HandlerSet made public; fields made package scope instead of private to improve efficiency within harpoon.IR.Quads package. - Improved harpoon.IR.Quads.Quad.replace() to maintain HANDLER protection sets when quads are replaced. - Added harpoon.IR.Quads.Peephole class to optimize MOVE instructions. - Fixed a bug in the translation of INSTANCEOF. * Util/Set.java: Add clear() method to Set. 1998-12-27 C. Scott Ananian * IR/Quads/QuadNoSSA.java, IR/Quads/QuadWithTry.java, IR/Quads/UnHandler.java: New file. * IR/Properties/Renameable.java, IR/Quads/ANEW.java, IR/Quads/ARRAYINIT.java, IR/Quads/CALL.java, IR/Quads/CleanUp.java, IR/Quads/Code.java, IR/Quads/FOOTER.java, IR/Quads/METHOD.java, IR/Quads/OPER.java, IR/Quads/OperVisitor.java, IR/Quads/PHI.java, IR/Quads/Qop.java, IR/Quads/Quad.java, IR/Quads/QuadNoSSA.java, IR/Quads/QuadSSA.java, IR/Quads/QuadWithTry.java, IR/Quads/SIGMA.java, IR/Quads/SWITCH.java, IR/Quads/Translate.java, IR/Quads/UnHandler.java, IR/Registration.java, TODO: The Eagle has landed. This commit brings the new Translate classes I've been working on into the main magic/2.0 tree. Phi-placement is still slow; that's next on the todo list. User visible changes: ARRAYINIT quads are now present in quad-ssa form, and the ICMPGE and LCMPGE OPER opcodes have been removed, since they are unnecessary. The translation only generates ICMPEQ/ICMPGT/LCMPEQ/LCMPGT. [Note that DCMPGE and FCMPGE are still present and necessary, due to how they handle floating-point NaN values]. Checking the diffs for harpoon.Analysis.DeadCode and harpoon.Analysis.SCC.SCCAnalysis may be instructive in determining how to update your analyses. The translation of LCMP bytecode has been greatly improved. The translation of array initializers has been greatly improved. The number of phi/sigma functions have been reduced. The number of exception tests have been reduced. You can getCode("quad-with-try") and getCode("quad-no-ssa") now, which are intermediate forms for "quad-ssa". Right now the translations are all one-way, but I'm hoping to make them bidirectional. The implementation of clone() for all the Quad types has been improved. * Temp/Temp.java: Implement clone() functions in Temps similarly to how they are implemented for Quads. 1998-12-23 C. Scott Ananian * IR/Quads/Quad.java: Silly rabbit. Committed a file with a typo. * IR/Quads/PHI.java: Same changes to rename(), applied to PHI. * IR/Quads/NEW.java, IR/Quads/NOP.java, IR/Quads/OPER.java, IR/Quads/Quad.java, IR/Quads/RETURN.java, IR/Quads/SET.java, IR/Quads/SIGMA.java, IR/Quads/SWITCH.java, IR/Quads/THROW.java, IR/Quads/AGET.java, IR/Quads/ALENGTH.java, IR/Quads/ANEW.java, IR/Quads/ARRAYINIT.java, IR/Quads/ASET.java, IR/Quads/CALL.java, IR/Quads/CJMP.java, IR/Quads/COMPONENTOF.java, IR/Quads/CONST.java, IR/Quads/DEBUG.java, IR/Quads/FOOTER.java, IR/Quads/GET.java, IR/Quads/HANDLER.java, IR/Quads/HEADER.java, IR/Quads/INSTANCEOF.java, IR/Quads/LABEL.java, IR/Quads/METHOD.java, IR/Quads/MONITORENTER.java, IR/Quads/MONITOREXIT.java, IR/Quads/MOVE.java: Changed semantics of rename() method, since phi-function placement algorithms need to rename uses and defs separately. * IR/Quads/HandlerSet.java, IR/Quads/Print.java: Improve pretty-printer to show handler regions better. * IR/Quads/HandlerSet.java: New file. * IR/Quads/Quad.java: Quad.replace() should be used only when arities match exactly. * IR/Quads/FOOTER.java: Quad.replace() should only be used when edge arities match exactly. * IR/Quads/HANDLER.java: Updated HANDLER to allow a null exception class, which corresponds to the 'catch any' handler in java bytecode. Don't worry, the javadoc explains it all. * Util/FilterEnumerator.java, Util/ReverseEnumerator.java: Added two more useful Enumeration utility classes to harpoon.Util. FilterEnumerator filters and maps an enumeration. ReverseEnumerator reverses an enumeration. * Util/FilterEnumerator.java, Util/ReverseEnumerator.java: New file. * IR/Bytecode/Code.java: Fixed bug in IR.Bytecode which resulted in instructions immediately following MERGEs being unprotected by the proper exception handler. 1998-12-21 C. Scott Ananian * IR/Bytecode/InCti.java, IR/Bytecode/InGen.java, IR/Bytecode/InSwitch.java, IR/Bytecode/Instr.java, IR/Bytecode/OpClass.java, IR/Bytecode/OpConstant.java, IR/Bytecode/OpField.java, IR/Bytecode/OpLocalVariable.java, IR/Bytecode/OpMethod.java: In the interests of efficiency, made as many classes and fields final as possible in harpoon.IR.Bytecode. * IR/Bytecode/InRet.java: Made method in InRet public, and added javadoc. * IR/Bytecode/InRet.java: New file. * IR/Bytecode/Code.java, IR/Bytecode/InRet.java: The harpoon.IR.Bytecode representation was throwing away the local variable operand of the RET opcode. Oops. We need that to translate JSRs properly with the new translate engine. So this commit fixes the problem. 1998-12-20 C. Scott Ananian * ClassFile/HCode.java, IR/Quads/AGET.java, IR/Quads/ALENGTH.java, IR/Quads/CJMP.java, IR/Quads/FOOTER.java, IR/Quads/LABEL.java, IR/Quads/PHI.java, bin/annotate.sh, bin/keywords.sed: Added scripts to hyperlink class references inside CODE tags in the javadoc. Liked the result so much, I futzed with javadoc to add more CODE tags. * bin/annotate.sh, bin/keywords.sed: New file. * GNUmakefile: Added scripts to hyperlink class references inside CODE tags in the javadoc. Liked the result so much, I futzed with javadoc to add more CODE tags. * Analysis/DomFrontier.java, IR/Quads/CONST.java, IR/Quads/THROW.java: Fixed some unterminated CODE tags in the javadoc. * IR/Quads/HANDLER.java, IR/Quads/QuadFactory.java: HANDLER quads need an exceptionTemp field to record which variable gets the thrown exception on entry to the HANDLER. * IR/Bytecode/Instr.java: Efficiency improvement: allow us to access only a certain element of the next[] and prev[] vectors without copying the whole thing into an array first. * IR/Quads/ARRAYINIT.java, IR/Quads/QuadFactory.java: Added 'offset' field to ARRAYINIT, because array initializations skip over zero elements. * IR/Quads/ARRAYINIT.java: Oops. toString() method of ARRAYINIT had a bug. * IR/Quads/Print.java: Improvements to pretty-printer. CALL and METHOD quads look nicer now. * IR/Quads/SWITCH.java, IR/Quads/CALL.java, IR/Quads/CJMP.java: Changed toString() method of CJMP and SWITCH so it doesn't print quad IDs anymore. The new harpoon.IR.Quads.Print pretty-printer doesn't use the id numbers, and in the graph representation the edges are obvious, so there's not really much point in printing them. Besides, the edge information is mutable, but the result of toString() should be immutable. Allowed retex field of CALL to be null. When retex is null, any exception generated by the call is rethrown rather than caught and handled. This makes the quad-with-try representation that I'm working on more straightforward. retex field should still never be null in quad-ssa form. 1998-12-19 C. Scott Ananian * IR/Quads/Print.java: Clean up pretty-printing code. 1998-12-17 C. Scott Ananian * IR/Quads/Print.java: New file. * IR/Quads/Code.java, IR/Quads/Print.java: Wrote a pretty-printer for Quad forms to make it easier to figure out control flow when not using a CFG. Try harpoon.Main.Main and tell me if you like how it looks. * Analysis/TypeInference/IntraProc.java, IR/Quads/AGET.java, IR/Quads/ALENGTH.java, IR/Quads/ANEW.java, IR/Quads/ARRAYINIT.java, IR/Quads/ASET.java, IR/Quads/CALL.java, IR/Quads/CJMP.java, IR/Quads/COMPONENTOF.java, IR/Quads/CONST.java, IR/Quads/Code.java, IR/Quads/DEBUG.java, IR/Quads/FOOTER.java, IR/Quads/FixupFunc.java, IR/Quads/GET.java, IR/Quads/HANDLER.java, IR/Quads/HEADER.java, IR/Quads/INSTANCEOF.java, IR/Quads/LABEL.java, IR/Quads/METHOD.java, IR/Quads/MONITORENTER.java, IR/Quads/MONITOREXIT.java, IR/Quads/MOVE.java, IR/Quads/NEW.java, IR/Quads/NOP.java, IR/Quads/OPER.java, IR/Quads/PHI.java, IR/Quads/Peephole.java, IR/Quads/Quad.java, IR/Quads/QuadFactory.java, IR/Quads/QuadKind.java, IR/Quads/QuadSSA.java, IR/Quads/QuadVisitor.java, IR/Quads/RETURN.java, IR/Quads/SET.java, IR/Quads/SIGMA.java, IR/Quads/SWITCH.java, IR/Quads/THROW.java, IR/Quads/Translate.java, Temp/Temp.java, Temp/TempFactory.java: Added harpoon.IR.Quads.QuadFactory and harpoon.Temp.TempFactory classes to generate consistent and repeatably numbered Quads and Temps. This numbering should be repeatably across runs of the program and insensitive to the order in which methods are translated to bytecode. Also split the HEADER quad into HEADER and METHOD so that the HEADER node never needs to be modified or replaced. Also discarded the 'footer' field of HEADER, replacing it with an explicit link, which simplifies things considerably and Just Makes Sense. See the javadoc for details. The HANDLER quad, which represents explicit try-catch blocks, has also been committed, although the current translator doesn't generate them. The next generation translator, which is not ready to check in yet, will generate HANDLERs and ARRAYINITs so start thinking about them. I have updated all code in the magic/2.0 branch in accordance with these changes. Please double-check my work and make sure I haven't missed anything. Nate will be glad to know that you can finally get the Method and HCode containing a Quad from the reference to the Quad (via the QuadFactory). Yay. * IR/Quads/HANDLER.java, IR/Quads/METHOD.java, IR/Quads/QuadFactory.java, Temp/TempFactory.java: New file. 1998-12-11 C. Scott Ananian * IR/Quads/FOOTER.java: Bugfix by mfoltz to FOOTER.remove() which was leaving the edges numbered incorrectly (oops!). We really need a graph-checker to verify some of these flow-graph properties. * IR/Properties/Renameable.java, IR/Quads/AGET.java, IR/Quads/ALENGTH.java, IR/Quads/ANEW.java, IR/Quads/ARRAYINIT.java, IR/Quads/ASET.java, IR/Quads/CALL.java, IR/Quads/CJMP.java, IR/Quads/COMPONENTOF.java, IR/Quads/CONST.java, IR/Quads/DEBUG.java, IR/Quads/FOOTER.java, IR/Quads/GET.java, IR/Quads/HEADER.java, IR/Quads/INSTANCEOF.java, IR/Quads/LABEL.java, IR/Quads/MONITORENTER.java, IR/Quads/MONITOREXIT.java, IR/Quads/MOVE.java, IR/Quads/NEW.java, IR/Quads/NOP.java, IR/Quads/OPER.java, IR/Quads/PHI.java, IR/Quads/Quad.java, IR/Quads/QuadKind.java, IR/Quads/QuadVisitor.java, IR/Quads/RETURN.java, IR/Quads/SET.java, IR/Quads/SIGMA.java, IR/Quads/SWITCH.java, IR/Quads/THROW.java, Temp/TempMap.java: Added kind() method to all Quads to make Martin happy and attempt to reduce the number of instanceof's. Use it if you feel like it. Also added a replace(old_quad, new_quad) static method to Quad, and reworked the rename() interface to work better with immutable quads. Shouldn't break any old code, unless you were using Quad.rename(). Only harpoon.Analysis.QuadSSA.DeadCode was doing this. * IR/Quads/QuadKind.java: New file. * IR/Quads/ARRAYINIT.java: Added the ARRAYINIT quad to compactly represent array initialization. Nothing generates this quad, yet, but the rewritten bytecode-to-quad translator will. You should start thinking about supporting this quad in your analysis routines. * IR/Quads/ARRAYINIT.java: New file. * IR/Quads/LABEL.java, IR/Quads/Qop.java, IR/Quads/QuadVisitor.java: Added new Quad type 'LABEL' which is a simple superclass of PHI. LABELs are used to head basic blocks. * IR/Quads/LABEL.java: New file. * TODO: Added new Quad type 'LABEL' which is a simple superclass of PHI. LABELs are used to head basic blocks. * ClassFile/ClassPointer.java, ClassFile/HClass.java, ClassFile/HClassCls.java, ClassFile/HClassSyn.java, ClassFile/HConstructorSyn.java, ClassFile/HField.java, ClassFile/HMethod.java, ClassFile/HPointer.java, ClassFile/ImplMagic.java: Add 'ClassPointer's to the HClass loading code to delay the loading of classes as much as possible. This result in our loading many many fewer classes, as we don't load ones we don't need. For example, running harpoon.Main.Main on itself now results in only 18 classes being loaded, instead of 115 before. This change is entirely internal to harpoon.ClassFile; all methods on HClass, HField, HMethod, & etc return real, genuine HClasses loaded from disk, not the new HPointers. That means it won't break existing code at all. Yay. This should restore a lot of speed to the infrastructure. Getting the quadssa translator rewritten will help a lot, too. Enjoy, kids. * ClassFile/ClassPointer.java, ClassFile/HPointer.java: New file. * TODO: more stuff to do. gosh. 1998-12-09 C. Scott Ananian * IR/Quads/Translate.java, RunTime/Monitor.java, IR/Quads/METHODHEADER.java, IR/Quads/MONITORENTER.java, IR/Quads/MONITOREXIT.java, IR/Quads/MOVE.java, IR/Quads/NEW.java, IR/Quads/OPER.java, IR/Quads/PHI.java, IR/Quads/Peephole.java, IR/Quads/Qop.java, IR/Quads/Quad.java, IR/Quads/QuadVisitor.java, IR/Quads/RETURN.java, IR/Quads/SET.java, IR/Quads/SIGMA.java, IR/Quads/SWITCH.java, IR/Quads/THROW.java, IR/Quads/AGET.java, IR/Quads/ALENGTH.java, IR/Quads/ANEW.java, IR/Quads/ASET.java, IR/Quads/CALL.java, IR/Quads/CJMP.java, IR/Quads/COMPONENTOF.java, IR/Quads/CONST.java, IR/Quads/CleanUp.java, IR/Quads/DEBUG.java, IR/Quads/GET.java, IR/Quads/HEADER.java, IR/Quads/INSTANCEOF.java, Analysis/TypeInference/IntraProc.java: The day of immutability has arrived. This commit changes the access modifier on the fields of all quads to 'protected' to enforce immutability. New accessor methods are used to query the values of the fields. Some mutability still remains, especially with respect to the temp renaming interface, but this will eventually disappear. I have modified all the code I could find on the magic-2-0 branch to work with the immutable quads. Darko's stuff should work fine. Since Nate and Mark's stuff is not current on magic-2-0, the changes I have checked in for their code should be viewed as guides. Please examine the change to CALL carefully. The sense of the final boolean parameter to CALL has been inverted, because 'isSpecial' didn't seem to mean anything much. The flag is now 'isVirtual' and is usually true. It is false for: constructors, static methods, private methods, and code which uses the 'super.' prefix in the java source. See the JVM reference entry on 'invokespecial' for more details. Also, METHODHEADER has now been officially put to rest. There is just HEADER now. Again, I have modified the code to work with this change; you may want to double-check code of yours that I have modified to be sure I did the right thing. There is still much room for tweaks and improvement, but this is the first big step towards immutable quads. Please offer your comments. Oh -- and there's lots of new javadoc for the Quads now, too. I also added lots of assertions to ensure that all created quads are valid. Since you can't change quads after you create them, they better be right from the start. Have fun & let me know if I broke anything. * Temp/Temp.java: Added @exception tag to make javadoc happy. * Util/Tuple.java, Util/ArrayEnumerator.java, Util/Set.java, Util/SingletonEnumerator.java: Minor improvements to code in harpoon.Util package: javadoc editing, added final tags to a few fields, wrote an enumeration and a projection method for harpoon.Util.Tuple. 1998-12-08 C. Scott Ananian * GNUmakefile: More makefile hacks: 'make jikes' cooperates with 'make java' now. ChangeLog includes entries for moved files. * IR/Quads/Code.java: New file. * IR/Quads/Code.java, IR/Quads/QuadSSA.java: Prepare for split of quad-ssa into quad-no-ssa and friends by moving shared methods to a common superclass, Code. * Temp/Temp.java, IR/Quads/OPER.java, IR/Quads/PHI.java, IR/Quads/SIGMA.java: Fix some calls to clone() so that they call safeCopy() instead. For safe code, safeCopy() can be reduced to a nop, resulting in efficiency gains. This happens to work around a jikes compiler bug, too. * IR/Bytecode/InMerge.java: Backport changes to MAGIC/1.2 (soon to become MAGIC/1.3) * IR/Bytecode/InMerge.java: Backport IR.Bytecode.InMerge fix to nate-working. I hate back-porting. * TODO: More stuff for me to do. * IR/Bytecode/InMerge.java: Bugfix. PHIs were being created too small because try-handlers in the IR.Bytecode representation don't add edges to the control flow graph. * bin/brilliance.tcsh: Command-complete 'javap' and 'jdb' commands, too. [Have y'all considered putting 'source ~/Harpoon/Code/bin/brilliance.tcsh' commands in your .login's yet?] 1998-12-07 marinov * Main/TypesMain.java: New file. * Main/TypesMain.java: i decided to move to Main directory this helper main program which was for a while in Test directory. * Analysis/TypeInference/AuxUniqueFIFO.java, Analysis/TypeInference/InterProc.java, Analysis/TypeInference/IntraProc.java: commiting some more changes to flow-sensitive type inference. should be the last for today (or tonight, or whatever...). 1998-12-06 marinov * Analysis/TypeInference/AuxUniqueFIFO.java: New file. * Analysis/TypeInference/AuxUniqueFIFO.java, Analysis/TypeInference/InterProc.java, Analysis/TypeInference/IntraProc.java: added further improvements to type analysis. it works faster now and requires less memory (hopefully). * Analysis/TypeInference/IntraProc.java: added some "tricks" to decrease memory requirements (but increased time) of intraprocedural part of type inference. 1998-12-05 marinov * Analysis/TypeInference/InterProc.java, Analysis/TypeInference/IntraProc.java: added procedures for obtaining list of called methods at each call site (not only for the entire method). * Analysis/TypeInference/InterProc.java, Analysis/TypeInference/IntraProc.java: improved, actually corrected, handling of some special cases: for interproc, added analysis of methods automatically (?) invoked at start-up for intraproc, added proper modelling of some native methods (a lot of methods still need to be considered when found to be used; the question is if this is worth to do right now) 1998-12-03 marinov * Analysis/Maps/SetTypeMap.java: New file. * Analysis/Maps/SetTypeMap.java: i forgot to add this when i was commiting the first version of type analysis. (as mark said, i'd "discover" javadoc one of these days. ;) * Util/SFRE.java, Util/SORE.java: New file. * Util/SFRE.java, Util/SORE.java: according to the policy established in one the previous e-mails, i'm commiting some things that i started working on, but postponed. the others should just .ignore this! so, nothing there actually works, but everything can be compiled. hopefully some changes will be made automagically there, and in case that i continue working on that, i'll have less to do by hand. * Analysis/TypeInference/InterProc.java, Analysis/TypeInference/IntraProc.java: changed QuadSSA and Code to Quads and QuadSSA. 1998-12-03 mfoltz * Analysis/Partition/Main.java: initialPartition only does 2-way partitions, so the additional argument is wishful thinking at this point. * Analysis/Partition/Partition.java, Analysis/Partition/WeightedGraph.java, Analysis/Partition/WGNode.java: mark discovers javadoc. * RunTime/Monitor.java: mark discovers javadoc, so that someone might be able to figure out what my code does. 1998-12-02 marinov * Util/HClassUtil.java, Util/Util.java: a "change" to Util.java, actually commenting out unused stuff. this is just a temporary step toward enabling translation of all class initializers from bytecode to quad ssa form. also commiting a minusculous change to HClassUtil.java that's been hanging around for a while. * RunTime/Monitor.java: fixed a bug (?), i.e. tried to make a reasonable assumption about how this piece of code should be changed so that it can be compiled at all. * Analysis/TypeInference/IntraProc.java: changed the code to use the new version of call quads (no explicit objectref). now everything can be compiled, but i am not happy that again not all methods can be transltaed to intermediate form. * Analysis/TypeInference/ClassCone.java, Analysis/TypeInference/FieldType.java, Analysis/TypeInference/InterProc.java, Analysis/TypeInference/IntraProc.java, Analysis/TypeInference/SetHClass.java: New file. * Analysis/TypeInference/ClassCone.java, Analysis/TypeInference/FieldType.java, Analysis/TypeInference/InterProc.java, Analysis/TypeInference/IntraProc.java, Analysis/TypeInference/SetHClass.java: finally added a version of 0-CFA alike type inference to repository. a lot of changes still needed (can't even compile right now because of changes in CALL quad, so just .ignore Analysis/TypeInference/*), but i just wanted to "copy" this to some secure place. :) 1998-12-01 C. Scott Ananian * ClassFile/Loader.java: Javadoc improvements. * ClassFile/HMethodSyn.java, ClassFile/Loader.java: Tore apart the Loader class and put it back together 3x faster. Sorry, guys, but you've got to be using the MAGIC/2.0 codebase to benefit. Also fixed HMethodSyn so that it works with demand-loaded HCodes (see previous changes to ImplMagic). 1998-12-01 mfoltz * RunTime/Monitor.java: several fixes: caught exceptions now print a stack trace; check for null arguments to profiling methods and insert placeholder names; load properties from a relative path, instead of an absolute path. 1998-12-01 C. Scott Ananian * IR/Quads/CALL.java: @RENAME: IR/QuadSSA IR/Quads@ * IR/Quads/AGET.java, IR/Quads/ALENGTH.java, IR/Quads/ANEW.java, IR/Quads/ASET.java, IR/Quads/CJMP.java, IR/Quads/COMPONENTOF.java, IR/Quads/CONST.java, IR/Quads/DEBUG.java, IR/Quads/Edge.java, IR/Quads/Eval.java, IR/Quads/FOOTER.java, IR/Quads/FixupFunc.java, IR/Quads/GET.java, IR/Quads/HEADER.java, IR/Quads/INSTANCEOF.java, IR/Quads/MONITORENTER.java, IR/Quads/MONITOREXIT.java, IR/Quads/MOVE.java, IR/Quads/NEW.java, IR/Quads/NOP.java, IR/Quads/OPER.java, IR/Quads/OperVisitor.java, IR/Quads/PHI.java, IR/Quads/Peephole.java, IR/Quads/Qop.java, IR/Quads/Quad.java, IR/Quads/QuadVisitor.java, IR/Quads/RETURN.java, IR/Quads/SET.java, IR/Quads/SIGMA.java, IR/Quads/SWITCH.java, IR/Quads/THROW.java, IR/Quads/Translate.java: @RENAME: IR/QuadSSA/ IR/Quads/@ * IR/Quads/AGET.java, IR/Quads/ALENGTH.java, IR/Quads/ANEW.java, IR/Quads/ASET.java, IR/Quads/CALL.java, IR/Quads/CJMP.java, IR/Quads/COMPONENTOF.java, IR/Quads/CONST.java, IR/Quads/CleanUp.java, IR/Quads/DEBUG.java, IR/Quads/Edge.java, IR/Quads/Eval.java, IR/Quads/FOOTER.java, IR/Quads/FixupFunc.java, IR/Quads/GET.java, IR/Quads/HEADER.java, IR/Quads/INSTANCEOF.java, IR/Quads/METHODHEADER.java, IR/Quads/MONITORENTER.java, IR/Quads/MONITOREXIT.java, IR/Quads/MOVE.java, IR/Quads/NEW.java, IR/Quads/NOP.java, IR/Quads/OPER.java, IR/Quads/OperVisitor.java, IR/Quads/PHI.java, IR/Quads/Peephole.java, IR/Quads/Qop.java, IR/Quads/Quad.java, IR/Quads/QuadSSA.java, IR/Quads/QuadVisitor.java, IR/Quads/RETURN.java, IR/Quads/SET.java, IR/Quads/SIGMA.java, IR/Quads/SWITCH.java, IR/Quads/THROW.java, IR/Quads/Translate.java: New file. * IR/Quads/CleanUp.java, IR/Quads/METHODHEADER.java, Main/Main.java, Main/ProfileMain.java, Util/Graph.java: Renamed harpoon.IR.QuadSSA package to harpoon.IR.Quads. Renamed harpoon.IR.QuadSSA.Code class to harpoon.IR.Quads.QuadSSA. * IR/Quads/QuadSSA.java: Renamed harpoon.IR.QuadSSA package to harpoon.IR.Quads. Renamed harpoon.IR.QuadSSA.Code class to harpoon.IR.Quads.QuadSSA. @RENAME: QuadSSA/Code Quads/QuadSSA@ * ClassFile/HCodeFactory.java, IR/Registration.java: Renamed harpoon.IR.QuadSSA package to harpoon.IR.Quads. Renamed harpoon.IR.QuadSSA.Code class to harpoon.IR.Quads.QuadSSA. * GNUmakefile: added 'list-packages' target. made list of properties into a makefile variable. ensured gnu/getopt directory exists before we copy property into it. * GNUmakefile: 'make clean' wasn't removing the ChangeLog. Fixed now. * GNUmakefile: Whoops. GNUmakefile didn't work on non-tagged branches of the cvs tree. It's fixed now. * Util/Util.java: Improve the escape() method which makes strings safe to print. The nastiness in java.lang.Character was overwhelming the original method. * TODO: updated. * Analysis/DomFrontier.java, Analysis/DomTree.java, Analysis/UseDef.java, Util/Util.java: Improved use of new ArrayFactory constructs. Analysis/* classes re-examined for use of HCodeElement[] arrays and changed to use arrays constructed by HCode.elementArrayFactory(). Analysis/DomTree.java still has some HCodeElement[] arrays, though. Util/Util.java modified so that copy() is identical to clone() and is deprecated: use clone() instead. safeCopy() has some efficiency improvements over clone(): it only copies the array when necessary to preserve immutability. * bin/brilliance.tcsh: Darko outdoes himself: class name completion now works on library classes, too! 1998-11-30 C. Scott Ananian * Util/Util.java: Added more explanatory javadoc to harpoon.Util.Util class. * .cvsignore: The .ignore file, used for piecewise compilation, is not and should never be checked into the CVS archive. Therefore it has been added to .cvsignore. * ClassFile/HClass.java, ClassFile/HClassSyn.java, ClassFile/HConstructor.java, ClassFile/HInitializer.java, ClassFile/ImplMagic.java, IR/Bytecode/Code.java, TODO: Added HInitializer class to encapsulate class initializer methods the same way HConstructor encapsulates class constructors. Also, some minor javadoc editing. Lastly, changed the way ImplMagic constructor HMethods so that the HCodes are all generated on demand, instead of at once on loading. Should still garbage collect the original classfile structure correctly, once all the method HCodes are generated. This may speed up class loading slightly. There is not yet an HInitializerSyn class to accompany the HInitializer. I'm planning on majorly overhauling the HClass/HClassSyn system anyway, so this isn't a priority for me right now. Nevertheless, it's on the TODO list. * ClassFile/HInitializer.java: New file. * Analysis/UseDef.java, ClassFile/HClass.java, ClassFile/HClassCls.java, ClassFile/HClassSyn.java, ClassFile/HCode.java, ClassFile/HConstructor.java, ClassFile/HField.java, ClassFile/HMethod.java, IR/Bytecode/Code.java, IR/Bytecode/InGen.java, IR/Bytecode/Instr.java, IR/Bytecode/Operand.java, Temp/Temp.java, Util/ArrayFactory.java, Util/Util.java: More wide-spread changes. As per discussion, the generic array copy functions in Util.Util have been modified so that they do not need to use run-time type information via the java reflection interface. All copy functions now take an extra parameter specifying the arrayFactory to use. A new Util.ArrayFactory interface has been created for this purpose. There is a generic factory creation method in Util that uses run-time reflection; use of this function is, of course, strongly discouraged. Most classes will now have a static arrayFactory field containing an array constructor for the class. If a two-dimensional array is required, we are calling the two-dimensional array factory fields 'doubleArrayFactory'; see harpoon.Temp.Temp for an example. If you were using Util.Util.copy() before, your code will break. Note the new Util.Util.safeCopy() method for copies made only to guarantee immutability of array contents. For 'safe' code, the 'debug' flag in Util can be turned off to improve performance by not making these copies. * Util/ArrayFactory.java: New file. * TODO: The day is upon you. This commit changes the semantics of the CALL quad as per our discussion. There is no explicit objectref field; rather the objectref of non-virtual CALLs is passed in as the first parameter in the parameter field. [Also added javadoc to IR/QuadSSA/DEBUG.java and updated TODO list] This check-in breaks code. Please fix code you are responsible for. 1998-11-27 mfoltz * RunTime/Monitor.properties, RunTime/Monitor.java: adding * Analysis/Partition/Main.java, Analysis/Partition/Partition.java, Analysis/Partition/PartitionGraphViewer.java, Analysis/Partition/WGNode.java, RunTime/Monitor.properties: *** empty log message *** * RunTime/Monitor.java: now synchronized for mt apps. 1998-11-26 C. Scott Ananian * ClassFile/HClass.java: Make internal NoSuchMethod and NoSuchField methods more verbose in describing the method they are unable to find. 1998-11-25 nkushman * GNUmakefile: merged magic-1-2 with nate-working to give nate the bugfixes he needs. 1998-11-25 C. Scott Ananian * GNUmakefile: Committed pair of bugfixes to IR/QuadSSA/Translate, and improvements to GNUmakefile to create main-line revision magic-1-2. * TODO: Insight gained whilst debugging. * Util/Graph.java: Added code to print which_pred of edge in CFG graph to make interpretation of phi functions easier. * GNUmakefile: Allow filtering of individual source files via entries in .ignore. * GNUmakefile: The CVS_ variables are only referenced a maximum of one time, so improve performance by making them recursively-defined variables. This way, they are only evaluated if they are needed. This is good if you have slow cvs access. 1998-11-25 nkushman * GNUmakefile, ClassFile/Loader.java: Updated nate-working branch to magic 1.1, incorporating fixes to ClassFile/Loader.java, GNUmakefile, and IR/QuadSSA/Translate.java. 1998-11-25 C. Scott Ananian * ClassFile/Loader.java, GNUmakefile: Merging fixes to GNUmakefile, ClassFile/Loader and IR/QuadSSA/Translate onto magic/1.0 branch. Tagging this revision magic/1.1. * GNUmakefile: Use 'simple expanded variables' (see info page for GNU make) to speed up make times by avoiding repeated evaluation of shell commands. * GNUmakefile: Added an easy way to specify packages/files to ignore during the build process. The file .ignore in the root Harpoon/Code directory contains white-space separated regular expressions indicating files or packages to ignore. For example: AIRE ^./IR/QuadNoSSA QuadSSA "$SOME_SHELL_VARIABLE" This is intended to make it easier to test changes that break other people's code. For example, I can filter out Mark, Nate and Darko's code when I make changes to the core IR that break stuff. I can then test, compile and fix all my own code before committing the change. Darko can then .ignore Mark's code while he updates his code, and likewise Mark would temporarily .ignore Darko's code while working. They would then each check in their changes independently. The .ignore file should never be added to the archive, as it is strictly a working file. Send me mail if the operation of .ignore is not clear. * GNUmakefile: Completed addition of tag/branch functionality to cvs-related make targets. Should work even on main branch now. 1998-11-24 C. Scott Ananian * GNUmakefile: update cvs rules to take branch revision/tag into account. for example 'make update' should use '-r magic-2-0' on the command line if you are working on the magic-2-0 branch. 'make commit' is still untested, though. Behavior on the main branch is also untested and probably broken. That's okay, since this commit is happening on the magic-2-0 branch. I'll fix it all eventually, but I'm late for a meeting at the moment. * ClassFile/Loader.java: Applied Nate's bug-fix to ClassFile loader. We were forgetting a case and *still* leaving some zip files open. Ack. It's fixed now. If you're getting NoClassDefFound or having trouble opening files, please update. 1998-11-23 marinov * Main/Graph.java: darko (hope he) learned how strings should be used in java. * Util/Set.java: changed access modifier of (hashtable) member. set is easier to extend now. 1998-11-22 mfoltz * RunTime/Monitor.java: The NEW call now accepts the class name as an argument. 1998-11-21 nkushman * Util/Set.java, Analysis/TypeInfo.java, Analysis/UseDef.java, ClassFile/HClass.java, ClassFile/HClassCls.java, ClassFile/HClassSyn.java, ClassFile/HFieldSyn.java, ClassFile/HMethod.java, ClassFile/HMethodSyn.java, ClassFile/ImplMagic.java, GNUmakefile, IR/Bytecode/OpMethod.java, IR/Registration.java: Nate's working code has been split off onto its own branch. This is a commit of the current status of his partitioning code. Before this is merged back onto the main tree we want to clean things up with respect to the base code: remove meaningless diffs, clean out debugging code, etc. This Is Nate's Really Cool Partitioning Code. [don't worry, we'll change the harpoon.Nate package name before we merge] 1998-11-21 C. Scott Ananian * Analysis/TypeInfo.java: Moved Analysis.TypeInfo to Analysis.QuadSSA.TypeInfo, which is where it really belongs. Change all your import statements, folks. * Analysis/TypeInfo.java: TypeInfo was attempting to be overly general in its ACMPEQ rule and was thus failing miserably in certain cases. The idea was that on the true side of an if (objectref1 == objectref2) { /* true */ } branch, the types of objectref1 and objectref2 should be equal. But this requires figuring out which of objectref1 or objectref2 has the narrower type, which I'm too lazy to do right now. Therefore I only do this propagation when one of the objectrefs is the null constant (type HClass.Void). This works, or should. * ClassFile/HClassCls.java, ClassFile/HField.java, ClassFile/ImplGNU.java: Remove gnu.bytecode stuff. The gnu classfile reader is far inferior to ours, and I don't feel like fixing it since it's not any faster, either. So purge the mention of gnu.bytecode from our sources. * GNUmakefile: 'make wipe' wasn't getting rid of the class binaries in gnu/*. 1998-11-21 mfoltz * Analysis/Partition/PartitionGraphViewer.java: Now uses paint() instead of update() to draw partitioning GUI, so window repaints correctly. * Analysis/Partition/Main.java: Now terminates when a phase-1 optimal partition has been found (i.e., no further gain by node exchanges). * Analysis/Partition/WeightedGraph.java: Added weightPlus for summing edge weights which may be +infinity or -infinity. * Analysis/Partition/Partition.java: The partitioning algorithm now handles +infinity and -infinity edge weights appropriately, and has more verbose monitoring output. 1998-11-20 C. Scott Ananian * TODO: Need to think through circular dependencies. * ClassFile/Loader.java: The ZipFile interface is evil. My Loader code was equally evil. This commit fixes a long-standing bug where the Loader would keep *every zip file it ever touched* open. Apparently java doesn't garbage collect these intelligently, either. So eventually we'd run out of file descriptors and get nasty NoClassDefFound errors. From the JVM, from random places in the code, from everywhere. This bug is fixed now. If you got unexplainable NoClassDefFoundErrors in your code, you should 'make update' now. 1998-11-20 mfoltz * Analysis/Partition/Main.java: Partitioning now supports multiple input files on the command line, and BIND directives in those files of the form BIND ::= :: ::= Integer+ 1998-11-18 C. Scott Ananian * ClassFile/HClass.java: Bug fix for sloppiness in uniqueName() function; uniqueName() would sometimes return non-unique names (oops!) and left lots of streams open when checking that a name doesn't exist in the classpath. Also, we were passing Loader.classToResource() a slash-delimited (instead of dot-delimited) class name, which might have broken cross-platform operation. It's all fixed now. * GNUmakefile: Be less cananian-specific when munging email addresses for proper javadoc HTML output. Now mfoltz@ai.lcs.mit.edu will appear properly, too. * ClassFile/Loader.java: Classes with nothing but static methods ought to be abstract, to enforce the idea that the constructor is meaningless and ought not to be used. * Analysis/TypeInfo.java: Improved analysis to detect typecasting constructs and return appropriate type information. 1998-11-17 C. Scott Ananian * ClassFile/Loader.java: Made Loader class public so that utilities can grab streams and make them into ClassFile.Raw.ClassFile objects. Basically this is for debugging purposes; sometimes we want to look at the contents of a classfile in more detail than javap allows. 1998-11-16 mfoltz * Analysis/Partition/Main.java, Analysis/Partition/Partition.java, Analysis/Partition/PartitionGraphViewer.java, Analysis/Partition/WGNode.java, Analysis/Partition/WeightedGraph.java, Main/ProfileMain.java, RunTime/Monitor.java, RunTime/Monitor.properties, Analysis/Partition/properties: *** empty log message *** 1998-11-11 C. Scott Ananian * TODO: Added QuadSSA checker project to the TODO list. * TODO: Added another item to the TODO list. 1998-11-10 C. Scott Ananian * .cvsignore: Updated .cvsignore so that 'make update' ignores ChangeLog and the gnu and jdb directories. 1998-11-09 C. Scott Ananian * Util/Util.java: Added optional message to assertion method. * IR/Bytecode/Code.java: Bytecode.Code.clone() will never throw a CloneNotSupportedException. * ClassFile/HCode.java: Document CloneNotSupportedException thrown by HCode.clone(HMethod). Add HCode.toString(). * TODO: Updated TODO list. * IR/Bytecode/Code.java: Added HCode.clone() method to IR.Bytecode. This allows one to clone an HMethod *before* getCode("quadssa") on the cloned method: the quadssa form for the new HMethod is generated from the cloned bytecode. * Temp/Temp.java: Remove deprecated rename methods from Temp. No one should have been using these anyway. Added hashCode method to make Temp hashcodes less sensitive to environment. As temp numbering still depends on the order in which methods are converted, hashcodes are still non-deterministic; this will be fixed shortly. * Main/Main.java: Do the right thing for methods with no code attribute (abstract, interface). * ClassFile/HClass.java, ClassFile/HConstructor.java, ClassFile/HField.java, ClassFile/HMethod.java: Added hashCode() methods so that hash values are not dependant on the order in which classes are loaded into memory (as they would be if the default java.lang.Object.hashCode() method was used). Simplified HClassPrimitive class. Makes much more sense now. 1998-10-22 C. Scott Ananian * TODO: Updated TODO list. I've implemented "copy-quads" (as clone()) but I need to implement "copy-bytecode", too. 1998-10-21 C. Scott Ananian * ClassFile/HClassSyn.java, ClassFile/HCode.java, ClassFile/HFieldSyn.java, ClassFile/HMethod.java, ClassFile/HMethodSyn.java: Fixed some long standing brokennesses in HClassSyn/HMethodSyn/HFieldSyn. If you're not working on cloning methods, you won't notice the changes. 1) declaredFields are cloned correctly in HClassSyn. This required adding a constructor to HFieldSyn. 2) HClassSyn.setModifiers() tries hard to do the right thing when you change a class to an interface, or vice-versa. 3) HClassSyn.setSuperclass() does some minimal sanity checking. 4) Added method HClassSyn.removeAllInterfaces() for completeness. 5) Added HCode.clone(HMethod) to copy a code representation, possibly changing the method associated with it. 6) Fixed HMethodSyn constructor. It now uses the new HCode.clone() method to copy all the cloneable representations associated with the template method. By default all representations are uncloneable. [Also regularized the constructor parameters for HMethodSyn] 7) Implemented clone() in IR.QuadSSA.Code to make it cloneable. IR.QuadSSA.Code clones the quads in the representation using... 8) New static Quad.clone(Quad header) method. This copies all the quads in the graph connected to the supplied header, rewriting the edges in the proper way. Quad implements Cloneable now, to faciliatate this, although the standard Quad.clone() method (non-static, no parameters) returns a *shallow* copy; that is, the edges still point to uncloned quads. 9) Added removeCode() and removeAllCode() methods to HMethodSyn for symmetry. These complement getCode() and putCode() in HMethod. * ClassFile/HMethodSyn.java: makeDescriptor must be static, or else javac complains. * ClassFile/HClass.java: Whoops. HClass was never closing its files. Fixed now. 1998-10-21 nkushman * ClassFile/HClassSyn.java: Fixed the HClassSyn constructor, leaving problems for Scott to fix.. = ) * ClassFile/HMethodSyn.java: Added constructors to the HMethodSyn 1998-10-19 C. Scott Ananian * ClassFile/HMethodSyn.java: Make putCode() on an HMethodSyn reset the ABSTRACT modifier on the method, like the javadoc said it would. 1998-10-18 C. Scott Ananian * NOTES/erase.me, erase.me: Goodbye, erase.me. * NOTES/erase.me, erase.me: Two-level test of the system. * NOTES/erase.me, erase.me: Hmm. What happens in this case? * NOTES/erase.me, erase.me: Test of the new commit email system. * erase.me: lessee. mebbe this'll work. * erase.me: A test of the new commit email system. * erase.me: Let's see if this works. * erase.me: testing 1 2 3 * erase.me: testing testing testing. * erase.me: just a test. * erase.me: more testing. * erase.me: throw this file away. * GNUmakefile: Changed name of uploaded ChangeLog to ChangeLog.txt to be friendly to dumb web-browsers. * GNUmakefile: Added automatic generation of a ChangeLog file from CVS log entries, courtesy of the 'rcs2log' program (included with the standard CVS distribution). Do 'make ChangeLog' if you'd like to have a gander; I'm adding a link to the ChangeLog to the Harpoon homepage, too (right next to the javadoc link) so that 1) you can see what people have been up to if you chose not to subscribe to java-dev, and 2) when MAGIC becomes world-famous, people can keep up to date with the development effort. 1998-10-17 C. Scott Ananian * bin/brilliance.tcsh: I added Darko's brilliant class-name completion script to the CVS archive. Just do 'source bin/brilliance.tcsh' if you're running tcsh and thereafter every harpoon class name you type after 'java' will be automagically tab-completed. Saves lotsa typing. See the suggestions in bin/brilliance.tcsh for making your life even easier. [Remember, guys, everyone's going to read your commit messages, so make them useful & coherent!] 1998-10-17 marinov * prj.el: Added visitor class template. * Analysis/TypeInfo.java: Added handling of SIGMA quads. 1998-10-16 marinov * Main/Graph.java: Changed Main.Graph to call right procedures in Util.Graph. * Util/Graph.java: Util.Graph made "nicer", some changes to be made after Main.CallGraph is debugged. 1998-10-16 C. Scott Ananian * Util/CombineEnumerator.java: Copyright tagging. * Contrib/getopt/Getopt.class, Contrib/getopt/GetoptDemo.class, Contrib/getopt/LongOpt.class: We don't need these binaries in CVS. * ClassFile/ImplGNU.java, ClassFile/ImplMagic.java, Analysis/CycleEq.java: Copyright tagging. * Analysis/CycleEq.java: javadoc update. * Analysis/CycleEq.java: This should work now. * ClassFile/HClass.java, ClassFile/HClassSyn.java, ClassFile/HConstructor.java, ClassFile/HConstructorSyn.java, ClassFile/HField.java, ClassFile/HMethod.java: More improvements to the *Syn classes. * GNUmakefile: Temporarily removed AIRE classes from makefile. * ClassFile/HClass.java, ClassFile/HClassSyn.java, ClassFile/HField.java, ClassFile/HFieldSyn.java, ClassFile/HMethod.java, ClassFile/HMethodSyn.java, ClassFile/ImplMagic.java: updates to *Syn methods to assign them unique names. * ClassFile/HClass.java, ClassFile/HMethod.java, ClassFile/ImplMagic.java: Revert to old classloader. Just have to decompress classes.zip, that's all. * ClassFile/Loader.java, ClassFile/HClass.java, ClassFile/ImplMagic.java: A preloading loader. not faster, unfortunately. * ClassFile/HConstructorSyn.java, ClassFile/ImplGNU.java: Stomped on bugs. Added HConstructorSyn. * GNUmakefile: Updated 'properties' rules. * Util/CombineEnumerator.java: Useful utility class to combine the results of separate enumerators. * ClassFile/HArrayConstructor.java, ClassFile/HArrayField.java, ClassFile/HArrayMethod.java, ClassFile/HClass.java, ClassFile/HClassCls.java, ClassFile/HClassSyn.java, ClassFile/HConstructor.java, ClassFile/HField.java, ClassFile/HFieldSyn.java, ClassFile/HMethod.java, ClassFile/HMethodSyn.java, ClassFile/ImplGNU.java, ClassFile/ImplMagic.java: Major overhaul of HClass & related methods. Big enhancement: Synthetic classes/methods/fields are implemented. * Analysis/CycleEq.java: Analysis pass to compute cycle equivalence. * Util/Util.java: Fix long-standing bug in (never previously used) repeatString method. 1998-10-15 C. Scott Ananian * GNUmakefile: Updated makefile to properly place gnu.getopt properties. * Contrib/getopt/GetoptDemo.java, Contrib/getopt/GetoptDemo.javax: Made sure GetoptDemo wasn't automagically compiled. (Maybe should have fixed this in the makefile?) 1998-10-15 marinov * Util/Graph.java, Main/Graph.java: printGraph moved from Main.Graph to Util.Graph. 1998-10-14 C. Scott Ananian * GNUmakefile: Add makefile support for gnu.* classes. * ClassFile/HClass.java, ClassFile/HClassSyn.java: First (incomplete) draft of HClassSyn methods. * Contrib/getopt/GetoptDemo.class, Contrib/getopt/GetoptDemo.java, Contrib/getopt/LongOpt.class, Contrib/getopt/LongOpt.java, Contrib/getopt/Makefile, Contrib/getopt/MessagesBundle.properties, Contrib/getopt/README, Contrib/getopt/gnu.getopt.Getopt.html, Contrib/getopt/gnu.getopt.LongOpt.html, Contrib/getopt/COPYING.LIB, Contrib/getopt/ChangeLog, Contrib/getopt/Getopt.class, Contrib/getopt/Getopt.java: Added gnu.getopt package. 1998-10-13 C. Scott Ananian * IR/Bytecode/Code.java: Fix bug with MERGES that happen at the very start of the bytecode. * GNUmakefile, TODO: Fixed jar-creation bug in GNUmakefile. Added stuff to TODO list. 1998-10-12 C. Scott Ananian * Main/CallGraph.java: This works better now. * Main/CallGraph.java: New call-graph generation utility. Needs work still. * prj.el: Made debugging work in JDE (assuming you have a "jdb" link... maybe I'll add that to the Makefile). 1998-10-11 C. Scott Ananian * GNUmakefile: Forgot to clean up the new VERSIONS file. Fixed. * ClassFile/HClass.java: I'm an idiot. How did this ever work? i/j index confusion is getMethod(...) and getDeclaredMethod(...). When this code just plain didn't work, it would have returned the wrong overloaded method sometimes, I guess. It's fixed now. * ClassFile/HMethod.java: Abstract methods have no code, too. * IR/Bytecode/InGen.java: Oops! Forgot DCONST_0 and DCONST_1 entries! (Found while loading java.lang.Hashtable). Fixed now. * ClassFile/Loader.java: conformity is good. * GNUmakefile: Ack! CVS hacked my makefile! * .cvsignore, GNUmakefile: Added VERSIONS information to binary jar file. * ClassFile/HClass.java: Added getDeclaredMethod() call using descriptor as discriminant, for reasons of symmetry. * prj.el: Made JDE project file location-independent. * IR/AIRE/IIR_Visitor.java, bin/mkvisitor.perl: New auto-generated IIR_Visitor class (and the script used to produce it). * bin/mkvisitor.perl: First (simple sorted) implementation of a script to automatically generate visitor classes. * TODO: fixed possible bug in stack handling at phi. updated todo to reflect this. corrected javadoc for CleanUp class. 1998-10-10 C. Scott Ananian * IR/AIRE/IR_Kind.java: Javac doesn't like 'final' fields. * GNUmakefile: Added COPYING to tar/jar files. * IR/Bytecode/Code.java, IR/Bytecode/InCti.java, IR/Bytecode/InGen.java, IR/Bytecode/InMerge.java, IR/Bytecode/InSwitch.java, IR/Bytecode/Instr.java, IR/Bytecode/Op.java, IR/Bytecode/OpClass.java, IR/Bytecode/OpConstant.java, IR/Bytecode/OpField.java, IR/Bytecode/OpLocalVariable.java, IR/Bytecode/OpMethod.java, IR/Bytecode/Operand.java, Main/Graph.java, Temp/Temp.java, Temp/TempList.java, Util/FIFO.java, Util/UniqueFIFO.java, Util/UniqueVector.java, Util/Util.java, ClassFile/HClass.java, ClassFile/HCode.java, ClassFile/HCodeElement.java, ClassFile/HConstructor.java, ClassFile/HField.java, ClassFile/HMember.java, ClassFile/HMethod.java, ClassFile/Loader.java: Added GPL/copyright notice. * bin/copyright.sed, JavaChip/Interface.java, Main/Main.java, Temp/TempMap.java, Util/ArrayEnumerator.java, Util/HClassUtil.java, Util/NullEnumerator.java, Util/Set.java, Util/SingletonEnumerator.java, Util/Tuple.java, Util/UniqueStack.java, Util/Worklist.java, IR/Properties/Edges.java, IR/Properties/Renameable.java, IR/Properties/UseDef.java, IR/AIRE/IIR_LessThanOperator.java, IR/AIRE/IIR_LessThanOrEqualOperator.java, IR/AIRE/IIR_LibraryClause.java, IR/AIRE/IIR_LibraryDeclaration.java, IR/AIRE/IIR_LibraryUnit.java, IR/AIRE/IIR_LibraryUnitList.java, IR/AIRE/IIR_List.java, IR/AIRE/IIR_Literal.java, IR/AIRE/IIR_LowAttribute.java, IR/AIRE/IIR_ModulusOperator.java, IR/AIRE/IIR_MonadicOperator.java, IR/AIRE/IIR_MultiplicationOperator.java, IR/AIRE/IIR_Name.java, IR/AIRE/IIR_NandOperator.java, IR/AIRE/IIR_NatureDeclaration.java, IR/AIRE/IIR_NatureDefinition.java, IR/AIRE/IIR_NatureElementDeclaration.java, IR/AIRE/IIR_NatureElementDeclarationList.java, IR/AIRE/IIR_NegationOperator.java, IR/AIRE/IIR_NextStatement.java, IR/AIRE/IIR_NoiseSourceQuantityDeclaration.java, IR/AIRE/IIR_NorOperator.java, IR/AIRE/IIR_NotOperator.java, IR/AIRE/IIR_NullStatement.java, IR/AIRE/IIR_ObjectDeclaration.java, IR/AIRE/IIR_OrOperator.java, IR/AIRE/IIR_OthersInitialization.java, IR/AIRE/IIR_PackageBodyDeclaration.java, IR/AIRE/IIR_PackageDeclaration.java, IR/AIRE/IIR_PathNameAttribute.java, IR/AIRE/IIR_PhysicalLiteral.java, IR/AIRE/IIR_PhysicalSubtypeDefinition.java, IR/AIRE/IIR_PhysicalTypeDefinition.java, IR/AIRE/IIR_PhysicalUnit.java, IR/AIRE/IIR_PortList.java, IR/AIRE/IIR_PosAttribute.java, IR/AIRE/IIR_PredAttribute.java, IR/AIRE/IIR_ProcedureCallStatement.java, IR/AIRE/IIR_ProcedureDeclaration.java, IR/AIRE/IIR_ProcessStatement.java, IR/AIRE/IIR_QualifiedExpression.java, IR/AIRE/IIR_QuantityDeclaration.java, IR/AIRE/IIR_QuantityInterfaceDeclaration.java, IR/AIRE/IIR_QuietAttribute.java, IR/AIRE/IIR_ROLOperator.java, IR/AIRE/IIR_ROROperator.java, IR/AIRE/IIR_RangeAttribute.java, IR/AIRE/IIR_RangeTypeDefinition.java, IR/AIRE/IIR_RecordNatureDefinition.java, IR/AIRE/IIR_RecordSubnatureDefinition.java, IR/AIRE/IIR_RecordSubtypeDefinition.java, IR/AIRE/IIR_RecordTypeDefinition.java, IR/AIRE/IIR_ReferenceAttribute.java, IR/AIRE/IIR_RemainderOperator.java, IR/AIRE/IIR_ReportStatement.java, IR/AIRE/IIR_ReturnStatement.java, IR/AIRE/IIR_ReverseRangeAttribute.java, IR/AIRE/IIR_RightAttribute.java, IR/AIRE/IIR_RightOfAttribute.java, IR/AIRE/IIR_SLAOperator.java, IR/AIRE/IIR_SLLOperator.java, IR/AIRE/IIR_SRAOperator.java, IR/AIRE/IIR_SRLOperator.java, IR/AIRE/IIR_ScalarNatureDefinition.java, IR/AIRE/IIR_ScalarSubnatureDefinition.java, IR/AIRE/IIR_ScalarTypeDefinition.java, IR/AIRE/IIR_SelectedName.java, IR/AIRE/IIR_SelectedNameByAll.java, IR/AIRE/IIR_SelectedWaveform.java, IR/AIRE/IIR_SelectedWaveformList.java, IR/AIRE/IIR_SensitizedProcessStatement.java, IR/AIRE/IIR_SequentialStatement.java, IR/AIRE/IIR_SequentialStatementList.java, IR/AIRE/IIR_SharedVariableDeclaration.java, IR/AIRE/IIR_SignalAssignmentStatement.java, IR/AIRE/IIR_SignalDeclaration.java, IR/AIRE/IIR_SignalInterfaceDeclaration.java, IR/AIRE/IIR_Signature.java, IR/AIRE/IIR_SimpleName.java, IR/AIRE/IIR_SimpleNameAttribute.java, IR/AIRE/IIR_SimpleSimultaneousStatement.java, IR/AIRE/IIR_SimultaneousAlternative.java, IR/AIRE/IIR_SimultaneousAlternativeByChoices.java, IR/AIRE/IIR_SimultaneousAlternativeByExpression.java, IR/AIRE/IIR_SimultaneousAlternativeByOthers.java, IR/AIRE/IIR_SimultaneousAlternativeList.java, IR/AIRE/IIR_SimultaneousCaseStatement.java, IR/AIRE/IIR_SimultaneousElsif.java, IR/AIRE/IIR_SimultaneousIfStatement.java, IR/AIRE/IIR_SimultaneousProceduralStatement.java, IR/AIRE/IIR_SimultaneousStatement.java, IR/AIRE/IIR_SimultaneousStatementList.java, IR/AIRE/IIR_SliceName.java, IR/AIRE/IIR_SpectrumSourceQuantityDeclaration.java, IR/AIRE/IIR_StableAttribute.java, IR/AIRE/IIR_Statement.java, IR/AIRE/IIR_StatementList.java, IR/AIRE/IIR_StringLiteral.java, IR/AIRE/IIR_SubnatureDeclaration.java, IR/AIRE/IIR_SubprogramDeclaration.java, IR/AIRE/IIR_SubtractionOperator.java, IR/AIRE/IIR_SubtypeDeclaration.java, IR/AIRE/IIR_SuccAttribute.java, IR/AIRE/IIR_TerminalDeclaration.java, IR/AIRE/IIR_TerminalInterfaceDeclaration.java, IR/AIRE/IIR_TextLiteral.java, IR/AIRE/IIR_ThroughAttribute.java, IR/AIRE/IIR_ThroughQuantityDeclaration.java, IR/AIRE/IIR_ToleranceAttribute.java, IR/AIRE/IIR_TransactionAttribute.java, IR/AIRE/IIR_Tuple.java, IR/AIRE/IIR_TypeConversion.java, IR/AIRE/IIR_TypeDeclaration.java, IR/AIRE/IIR_TypeDefinition.java, IR/AIRE/IIR_UnitList.java, IR/AIRE/IIR_UseClause.java, IR/AIRE/IIR_UserAttribute.java, IR/AIRE/IIR_ValAttribute.java, IR/AIRE/IIR_ValueAttribute.java, IR/AIRE/IIR_VariableAssignmentStatement.java, IR/AIRE/IIR_VariableDeclaration.java, IR/AIRE/IIR_VariableInterfaceDeclaration.java, IR/AIRE/IIR_Visitor.java, IR/AIRE/IIR_WaitStatement.java, IR/AIRE/IIR_WaveformElement.java, IR/AIRE/IIR_WaveformList.java, IR/AIRE/IIR_WhileLoopStatement.java, IR/AIRE/IIR_XnorOperator.java, IR/AIRE/IIR_XorOperator.java, IR/AIRE/IIR_ZOHAttribute.java, IR/AIRE/IIR_ZTFAttribute.java, IR/AIRE/IR_DelayMechanism.java, IR/AIRE/IR_Kind.java, IR/AIRE/IR_Mode.java, IR/AIRE/IR_Pure.java, IR/AIRE/IR_SignalKind.java, IR/AIRE/IR_SourceLanguage.java, IR/AIRE/IIR_AboveAttribute.java, IR/AIRE/IIR_AbsoluteOperator.java, IR/AIRE/IIR_AccessSubtypeDefinition.java, IR/AIRE/IIR_AccessTypeDefinition.java, IR/AIRE/IIR_AcrossAttribute.java, IR/AIRE/IIR_AcrossQuantityDeclaration.java, IR/AIRE/IIR_ActiveAttribute.java, IR/AIRE/IIR_AdditionOperator.java, IR/AIRE/IIR_Aggregate.java, IR/AIRE/IIR_AliasDeclaration.java, IR/AIRE/IIR_Allocator.java, IR/AIRE/IIR_AndOperator.java, IR/AIRE/IIR_ArchitectureDeclaration.java, IR/AIRE/IIR_ArrayNatureDefinition.java, IR/AIRE/IIR_ArraySubnatureDefinition.java, IR/AIRE/IIR_ArraySubtypeDefinition.java, IR/AIRE/IIR_ArrayTypeDefinition.java, IR/AIRE/IIR_AscendingAttribute.java, IR/AIRE/IIR_AssertionStatement.java, IR/AIRE/IIR_AssociationElement.java, IR/AIRE/IIR_AssociationElementByExpression.java, IR/AIRE/IIR_AssociationElementOpen.java, IR/AIRE/IIR_AssociationList.java, IR/AIRE/IIR_Attribute.java, IR/AIRE/IIR_AttributeDeclaration.java, IR/AIRE/IIR_AttributeSpecification.java, IR/AIRE/IIR_AttributeSpecificationList.java, IR/AIRE/IIR_BaseAttribute.java, IR/AIRE/IIR_BitStringLiteral.java, IR/AIRE/IIR_BlockConfiguration.java, IR/AIRE/IIR_BlockStatement.java, IR/AIRE/IIR_BreakElement.java, IR/AIRE/IIR_BreakList.java, IR/AIRE/IIR_BreakStatement.java, IR/AIRE/IIR_CaseStatement.java, IR/AIRE/IIR_CaseStatementAlternative.java, IR/AIRE/IIR_CaseStatementAlternativeByChoices.java, IR/AIRE/IIR_CaseStatementAlternativeByExpression.java, IR/AIRE/IIR_CaseStatementAlternativeByOthers.java, IR/AIRE/IIR_CaseStatementAlternativeList.java, IR/AIRE/IIR_CharacterLiteral.java, IR/AIRE/IIR_Choice.java, IR/AIRE/IIR_ChoiceList.java, IR/AIRE/IIR_Comment.java, IR/AIRE/IIR_CommentList.java, IR/AIRE/IIR_ComponentConfiguration.java, IR/AIRE/IIR_ComponentDeclaration.java, IR/AIRE/IIR_ComponentInstantiationStatement.java, IR/AIRE/IIR_CompositeNatureDefinition.java, IR/AIRE/IIR_ConcatenationOperator.java, IR/AIRE/IIR_ConcurrentAssertionStatement.java, IR/AIRE/IIR_ConcurrentBreakStatement.java, IR/AIRE/IIR_ConcurrentConditionalSignalAssignment.java, IR/AIRE/IIR_ConcurrentGenerateForStatement.java, IR/AIRE/IIR_ConcurrentGenerateIfStatement.java, IR/AIRE/IIR_ConcurrentProcedureCallStatement.java, IR/AIRE/IIR_ConcurrentSelectedSignalAssignment.java, IR/AIRE/IIR_ConcurrentStatement.java, IR/AIRE/IIR_ConcurrentStatementList.java, IR/AIRE/IIR_ConditionalWaveform.java, IR/AIRE/IIR_ConditionalWaveformList.java, IR/AIRE/IIR_ConfigurationDeclaration.java, IR/AIRE/IIR_ConfigurationItem.java, IR/AIRE/IIR_ConfigurationItemList.java, IR/AIRE/IIR_ConfigurationSpecification.java, IR/AIRE/IIR_ConstantDeclaration.java, IR/AIRE/IIR_ConstantInterfaceDeclaration.java, IR/AIRE/IIR_ContributionAttribute.java, IR/AIRE/IIR_Declaration.java, IR/AIRE/IIR_DeclarationList.java, IR/AIRE/IIR_DelayedAttribute.java, IR/AIRE/IIR_DesignFile.java, IR/AIRE/IIR_DesignFileList.java, IR/AIRE/IIR_Designator.java, IR/AIRE/IIR_DesignatorByAll.java, IR/AIRE/IIR_DesignatorByOthers.java, IR/AIRE/IIR_DesignatorExplicit.java, IR/AIRE/IIR_DesignatorList.java, IR/AIRE/IIR_DisconnectionSpecification.java, IR/AIRE/IIR_DivisionOperator.java, IR/AIRE/IIR_DotAttribute.java, IR/AIRE/IIR_DrivingAttribute.java, IR/AIRE/IIR_DyadicOperator.java, IR/AIRE/IIR_ElementDeclaration.java, IR/AIRE/IIR_ElementDeclarationList.java, IR/AIRE/IIR_Elsif.java, IR/AIRE/IIR_EntityClassEntry.java, IR/AIRE/IIR_EntityClassEntryList.java, IR/AIRE/IIR_EntityDeclaration.java, IR/AIRE/IIR_EnumerationLiteral.java, IR/AIRE/IIR_EnumerationLiteralList.java, IR/AIRE/IIR_EnumerationSubtypeDefinition.java, IR/AIRE/IIR_EnumerationTypeDefinition.java, IR/AIRE/IIR_EqualityOperator.java, IR/AIRE/IIR_EventAttribute.java, IR/AIRE/IIR_ExitStatement.java, IR/AIRE/IIR_ExponentiationOperator.java, IR/AIRE/IIR_Expression.java, IR/AIRE/IIR_FileDeclaration.java, IR/AIRE/IIR_FileInterfaceDeclaration.java, IR/AIRE/IIR_FileTypeDefinition.java, IR/AIRE/IIR_FloatingPointLiteral.java, IR/AIRE/IIR_FloatingPointLiteral32.java, IR/AIRE/IIR_FloatingPointLiteral64.java, IR/AIRE/IIR_FloatingSubtypeDefinition.java, IR/AIRE/IIR_FloatingTypeDefinition.java, IR/AIRE/IIR_ForLoopStatement.java, IR/AIRE/IIR_FreeQuantityDeclaration.java, IR/AIRE/IIR_FunctionCall.java, IR/AIRE/IIR_FunctionDeclaration.java, IR/AIRE/IIR_GenericList.java, IR/AIRE/IIR_GreaterThanOperator.java, IR/AIRE/IIR_GreaterThanOrEqualOperator.java, IR/AIRE/IIR_GroupDeclaration.java, IR/AIRE/IIR_GroupTemplateDeclaration.java, IR/AIRE/IIR_HighAttribute.java, IR/AIRE/IIR_Identifier.java, IR/AIRE/IIR_IdentityOperator.java, IR/AIRE/IIR_IfStatement.java, IR/AIRE/IIR_ImageAttribute.java, IR/AIRE/IIR_IndexedName.java, IR/AIRE/IIR_InequalityOperator.java, IR/AIRE/IIR_IntegAttribute.java, IR/AIRE/IIR_IntegerLiteral.java, IR/AIRE/IIR_IntegerLiteral32.java, IR/AIRE/IIR_IntegerLiteral64.java, IR/AIRE/IIR_IntegerSubtypeDefinition.java, IR/AIRE/IIR_IntegerTypeDefinition.java, IR/AIRE/IIR_InterfaceDeclaration.java, IR/AIRE/IIR_InterfaceList.java, IR/AIRE/IIR_LTFAttribute.java, IR/AIRE/IIR_Label.java, IR/AIRE/IIR_LastActiveAttribute.java, IR/AIRE/IIR_LastEventAttribute.java, IR/AIRE/IIR_LastValueAttribute.java, IR/AIRE/IIR_LeftAttribute.java, IR/AIRE/IIR_LeftOfAttribute.java, IR/AIRE/IIR_LengthAttribute.java, Analysis/Maps/ConstMap.java, Analysis/Maps/DefaultMap.java, Analysis/Maps/ExecMap.java, Analysis/Maps/TypeMap.java, Analysis/Maps/UseDefMap.java, ClassFile/HArrayConstructor.java, ClassFile/HArrayField.java, ClassFile/HArrayMethod.java, ClassFile/HCodeEdge.java, ClassFile/HCodeFactory.java, IR/AIRE/IIR.java, IR/Registration.java, Analysis/DomFrontier.java, Analysis/DomTree.java, Analysis/Place.java, Analysis/TypeInfo.java, Analysis/UseDef.java: Add copyright/GPL notice. * .cvsignore, COPYING, GNUmakefile: Add copyright/GPL terms. Add related rules to makefile. * IR/AIRE/IR_Kind.java, IR/AIRE/IR_Mode.java, IR/AIRE/IR_Pure.java, IR/AIRE/IR_SignalKind.java, IR/AIRE/IR_SourceLanguage.java, IR/AIRE/IR_DelayMechanism.java: Made enumeration types into real, honest-to-goodness class objects. * IR/AIRE/IIR_PackageDeclaration.java, IR/AIRE/IIR_PathNameAttribute.java, IR/AIRE/IIR_PhysicalLiteral.java, IR/AIRE/IIR_PhysicalSubtypeDefinition.java, IR/AIRE/IIR_PhysicalTypeDefinition.java, IR/AIRE/IIR_PhysicalUnit.java, IR/AIRE/IIR_PortList.java, IR/AIRE/IIR_PosAttribute.java, IR/AIRE/IIR_PredAttribute.java, IR/AIRE/IIR_ProcedureCallStatement.java, IR/AIRE/IIR_ProcedureDeclaration.java, IR/AIRE/IIR_ProcessStatement.java, IR/AIRE/IIR_QualifiedExpression.java, IR/AIRE/IIR_QuantityDeclaration.java, IR/AIRE/IIR_QuantityInterfaceDeclaration.java, IR/AIRE/IIR_QuietAttribute.java, IR/AIRE/IIR_ROLOperator.java, IR/AIRE/IIR_ROROperator.java, IR/AIRE/IIR_RangeAttribute.java, IR/AIRE/IIR_RangeTypeDefinition.java, IR/AIRE/IIR_RecordNatureDefinition.java, IR/AIRE/IIR_RecordSubnatureDefinition.java, IR/AIRE/IIR_RecordSubtypeDefinition.java, IR/AIRE/IIR_RecordTypeDefinition.java, IR/AIRE/IIR_ReferenceAttribute.java, IR/AIRE/IIR_RemainderOperator.java, IR/AIRE/IIR_ReportStatement.java, IR/AIRE/IIR_ReturnStatement.java, IR/AIRE/IIR_ReverseRangeAttribute.java, IR/AIRE/IIR_RightAttribute.java, IR/AIRE/IIR_RightOfAttribute.java, IR/AIRE/IIR_SLAOperator.java, IR/AIRE/IIR_SLLOperator.java, IR/AIRE/IIR_SRAOperator.java, IR/AIRE/IIR_SRLOperator.java, IR/AIRE/IIR_ScalarNatureDefinition.java, IR/AIRE/IIR_ScalarSubnatureDefinition.java, IR/AIRE/IIR_ScalarTypeDefinition.java, IR/AIRE/IIR_SelectedName.java, IR/AIRE/IIR_SelectedNameByAll.java, IR/AIRE/IIR_SelectedWaveform.java, IR/AIRE/IIR_SelectedWaveformList.java, IR/AIRE/IIR_SensitizedProcessStatement.java, IR/AIRE/IIR_SequentialStatement.java, IR/AIRE/IIR_SequentialStatementList.java, IR/AIRE/IIR_SharedVariableDeclaration.java, IR/AIRE/IIR_SignalAssignmentStatement.java, IR/AIRE/IIR_SignalDeclaration.java, IR/AIRE/IIR_SignalInterfaceDeclaration.java, IR/AIRE/IIR_Signature.java, IR/AIRE/IIR_SimpleName.java, IR/AIRE/IIR_SimpleNameAttribute.java, IR/AIRE/IIR_SimpleSimultaneousStatement.java, IR/AIRE/IIR_SimultaneousAlternative.java, IR/AIRE/IIR_SimultaneousAlternativeByChoices.java, IR/AIRE/IIR_SimultaneousAlternativeByExpression.java, IR/AIRE/IIR_SimultaneousAlternativeByOthers.java, IR/AIRE/IIR_SimultaneousAlternativeList.java, IR/AIRE/IIR_SimultaneousCaseStatement.java, IR/AIRE/IIR_SimultaneousElsif.java, IR/AIRE/IIR_SimultaneousIfStatement.java, IR/AIRE/IIR_SimultaneousProceduralStatement.java, IR/AIRE/IIR_SimultaneousStatement.java, IR/AIRE/IIR_SimultaneousStatementList.java, IR/AIRE/IIR_SliceName.java, IR/AIRE/IIR_SpectrumSourceQuantityDeclaration.java, IR/AIRE/IIR_StableAttribute.java, IR/AIRE/IIR_Statement.java, IR/AIRE/IIR_StatementList.java, IR/AIRE/IIR_StringLiteral.java, IR/AIRE/IIR_SubnatureDeclaration.java, IR/AIRE/IIR_SubprogramDeclaration.java, IR/AIRE/IIR_SubtractionOperator.java, IR/AIRE/IIR_SubtypeDeclaration.java, IR/AIRE/IIR_SuccAttribute.java, IR/AIRE/IIR_TerminalDeclaration.java, IR/AIRE/IIR_TerminalInterfaceDeclaration.java, IR/AIRE/IIR_TextLiteral.java, IR/AIRE/IIR_ThroughAttribute.java, IR/AIRE/IIR_ThroughQuantityDeclaration.java, IR/AIRE/IIR_ToleranceAttribute.java, IR/AIRE/IIR_TransactionAttribute.java, IR/AIRE/IIR_Tuple.java, IR/AIRE/IIR_TypeConversion.java, IR/AIRE/IIR_TypeDeclaration.java, IR/AIRE/IIR_TypeDefinition.java, IR/AIRE/IIR_UnitList.java, IR/AIRE/IIR_UseClause.java, IR/AIRE/IIR_UserAttribute.java, IR/AIRE/IIR_ValAttribute.java, IR/AIRE/IIR_ValueAttribute.java, IR/AIRE/IIR_VariableAssignmentStatement.java, IR/AIRE/IIR_VariableDeclaration.java, IR/AIRE/IIR_VariableInterfaceDeclaration.java, IR/AIRE/IIR_WaitStatement.java, IR/AIRE/IIR_WaveformElement.java, IR/AIRE/IIR_WaveformList.java, IR/AIRE/IIR_WhileLoopStatement.java, IR/AIRE/IIR_XnorOperator.java, IR/AIRE/IIR_XorOperator.java, IR/AIRE/IIR_ZOHAttribute.java, IR/AIRE/IIR_ZTFAttribute.java, IR/AIRE/IIR.java, IR/AIRE/IIR_AboveAttribute.java, IR/AIRE/IIR_AbsoluteOperator.java, IR/AIRE/IIR_AccessSubtypeDefinition.java, IR/AIRE/IIR_AccessTypeDefinition.java, IR/AIRE/IIR_AcrossAttribute.java, IR/AIRE/IIR_AcrossQuantityDeclaration.java, IR/AIRE/IIR_ActiveAttribute.java, IR/AIRE/IIR_AdditionOperator.java, IR/AIRE/IIR_Aggregate.java, IR/AIRE/IIR_AliasDeclaration.java, IR/AIRE/IIR_Allocator.java, IR/AIRE/IIR_AndOperator.java, IR/AIRE/IIR_ArchitectureDeclaration.java, IR/AIRE/IIR_ArrayNatureDefinition.java, IR/AIRE/IIR_ArraySubnatureDefinition.java, IR/AIRE/IIR_ArraySubtypeDefinition.java, IR/AIRE/IIR_ArrayTypeDefinition.java, IR/AIRE/IIR_AscendingAttribute.java, IR/AIRE/IIR_AssertionStatement.java, IR/AIRE/IIR_AssociationElement.java, IR/AIRE/IIR_AssociationElementByExpression.java, IR/AIRE/IIR_AssociationElementOpen.java, IR/AIRE/IIR_AssociationList.java, IR/AIRE/IIR_Attribute.java, IR/AIRE/IIR_AttributeDeclaration.java, IR/AIRE/IIR_AttributeSpecification.java, IR/AIRE/IIR_AttributeSpecificationList.java, IR/AIRE/IIR_BaseAttribute.java, IR/AIRE/IIR_BitStringLiteral.java, IR/AIRE/IIR_BlockConfiguration.java, IR/AIRE/IIR_BlockStatement.java, IR/AIRE/IIR_BreakElement.java, IR/AIRE/IIR_BreakList.java, IR/AIRE/IIR_BreakStatement.java, IR/AIRE/IIR_CaseStatement.java, IR/AIRE/IIR_CaseStatementAlternative.java, IR/AIRE/IIR_CaseStatementAlternativeByChoices.java, IR/AIRE/IIR_CaseStatementAlternativeByExpression.java, IR/AIRE/IIR_CaseStatementAlternativeByOthers.java, IR/AIRE/IIR_CaseStatementAlternativeList.java, IR/AIRE/IIR_CharacterLiteral.java, IR/AIRE/IIR_Choice.java, IR/AIRE/IIR_ChoiceList.java, IR/AIRE/IIR_Comment.java, IR/AIRE/IIR_CommentList.java, IR/AIRE/IIR_ComponentConfiguration.java, IR/AIRE/IIR_ComponentDeclaration.java, IR/AIRE/IIR_ComponentInstantiationStatement.java, IR/AIRE/IIR_CompositeNatureDefinition.java, IR/AIRE/IIR_ConcatenationOperator.java, IR/AIRE/IIR_ConcurrentAssertionStatement.java, IR/AIRE/IIR_ConcurrentBreakStatement.java, IR/AIRE/IIR_ConcurrentConditionalSignalAssignment.java, IR/AIRE/IIR_ConcurrentGenerateForStatement.java, IR/AIRE/IIR_ConcurrentGenerateIfStatement.java, IR/AIRE/IIR_ConcurrentProcedureCallStatement.java, IR/AIRE/IIR_ConcurrentSelectedSignalAssignment.java, IR/AIRE/IIR_ConcurrentStatement.java, IR/AIRE/IIR_ConcurrentStatementList.java, IR/AIRE/IIR_ConditionalWaveform.java, IR/AIRE/IIR_ConditionalWaveformList.java, IR/AIRE/IIR_ConfigurationDeclaration.java, IR/AIRE/IIR_ConfigurationItem.java, IR/AIRE/IIR_ConfigurationItemList.java, IR/AIRE/IIR_ConfigurationSpecification.java, IR/AIRE/IIR_ConstantDeclaration.java, IR/AIRE/IIR_ConstantInterfaceDeclaration.java, IR/AIRE/IIR_ContributionAttribute.java, IR/AIRE/IIR_Declaration.java, IR/AIRE/IIR_DeclarationList.java, IR/AIRE/IIR_DelayedAttribute.java, IR/AIRE/IIR_DesignFile.java, IR/AIRE/IIR_DesignFileList.java, IR/AIRE/IIR_Designator.java, IR/AIRE/IIR_DesignatorByAll.java, IR/AIRE/IIR_DesignatorByOthers.java, IR/AIRE/IIR_DesignatorExplicit.java, IR/AIRE/IIR_DesignatorList.java, IR/AIRE/IIR_DisconnectionSpecification.java, IR/AIRE/IIR_DivisionOperator.java, IR/AIRE/IIR_DotAttribute.java, IR/AIRE/IIR_DrivingAttribute.java, IR/AIRE/IIR_DyadicOperator.java, IR/AIRE/IIR_ElementDeclaration.java, IR/AIRE/IIR_ElementDeclarationList.java, IR/AIRE/IIR_Elsif.java, IR/AIRE/IIR_EntityClassEntry.java, IR/AIRE/IIR_EntityClassEntryList.java, IR/AIRE/IIR_EntityDeclaration.java, IR/AIRE/IIR_EnumerationLiteral.java, IR/AIRE/IIR_EnumerationLiteralList.java, IR/AIRE/IIR_EnumerationSubtypeDefinition.java, IR/AIRE/IIR_EnumerationTypeDefinition.java, IR/AIRE/IIR_EqualityOperator.java, IR/AIRE/IIR_EventAttribute.java, IR/AIRE/IIR_ExitStatement.java, IR/AIRE/IIR_ExponentiationOperator.java, IR/AIRE/IIR_Expression.java, IR/AIRE/IIR_FileDeclaration.java, IR/AIRE/IIR_FileInterfaceDeclaration.java, IR/AIRE/IIR_FileTypeDefinition.java, IR/AIRE/IIR_FloatingPointLiteral.java, IR/AIRE/IIR_FloatingPointLiteral32.java, IR/AIRE/IIR_FloatingPointLiteral64.java, IR/AIRE/IIR_FloatingSubtypeDefinition.java, IR/AIRE/IIR_FloatingTypeDefinition.java, IR/AIRE/IIR_ForLoopStatement.java, IR/AIRE/IIR_FreeQuantityDeclaration.java, IR/AIRE/IIR_FunctionCall.java, IR/AIRE/IIR_FunctionDeclaration.java, IR/AIRE/IIR_GenericList.java, IR/AIRE/IIR_GreaterThanOperator.java, IR/AIRE/IIR_GreaterThanOrEqualOperator.java, IR/AIRE/IIR_GroupDeclaration.java, IR/AIRE/IIR_GroupTemplateDeclaration.java, IR/AIRE/IIR_HighAttribute.java, IR/AIRE/IIR_Identifier.java, IR/AIRE/IIR_IdentityOperator.java, IR/AIRE/IIR_IfStatement.java, IR/AIRE/IIR_ImageAttribute.java, IR/AIRE/IIR_IndexedName.java, IR/AIRE/IIR_InequalityOperator.java, IR/AIRE/IIR_IntegAttribute.java, IR/AIRE/IIR_IntegerLiteral.java, IR/AIRE/IIR_IntegerLiteral32.java, IR/AIRE/IIR_IntegerLiteral64.java, IR/AIRE/IIR_IntegerSubtypeDefinition.java, IR/AIRE/IIR_IntegerTypeDefinition.java, IR/AIRE/IIR_InterfaceDeclaration.java, IR/AIRE/IIR_InterfaceList.java, IR/AIRE/IIR_LTFAttribute.java, IR/AIRE/IIR_Label.java, IR/AIRE/IIR_LastActiveAttribute.java, IR/AIRE/IIR_LastEventAttribute.java, IR/AIRE/IIR_LastValueAttribute.java, IR/AIRE/IIR_LeftAttribute.java, IR/AIRE/IIR_LeftOfAttribute.java, IR/AIRE/IIR_LengthAttribute.java, IR/AIRE/IIR_LessThanOperator.java, IR/AIRE/IIR_LessThanOrEqualOperator.java, IR/AIRE/IIR_LibraryClause.java, IR/AIRE/IIR_LibraryDeclaration.java, IR/AIRE/IIR_LibraryUnit.java, IR/AIRE/IIR_LibraryUnitList.java, IR/AIRE/IIR_List.java, IR/AIRE/IIR_Literal.java, IR/AIRE/IIR_LowAttribute.java, IR/AIRE/IIR_ModulusOperator.java, IR/AIRE/IIR_MonadicOperator.java, IR/AIRE/IIR_MultiplicationOperator.java, IR/AIRE/IIR_Name.java, IR/AIRE/IIR_NandOperator.java, IR/AIRE/IIR_NatureDeclaration.java, IR/AIRE/IIR_NatureDefinition.java, IR/AIRE/IIR_NatureElementDeclaration.java, IR/AIRE/IIR_NatureElementDeclarationList.java, IR/AIRE/IIR_NegationOperator.java, IR/AIRE/IIR_NextStatement.java, IR/AIRE/IIR_NoiseSourceQuantityDeclaration.java, IR/AIRE/IIR_NorOperator.java, IR/AIRE/IIR_NotOperator.java, IR/AIRE/IIR_NullStatement.java, IR/AIRE/IIR_ObjectDeclaration.java, IR/AIRE/IIR_OrOperator.java, IR/AIRE/IIR_OthersInitialization.java, IR/AIRE/IIR_PackageBodyDeclaration.java: Documented get_kind() and accept(IIR_Visitor). * IR/AIRE/IIR_ArraySubtypeDefinition.java, IR/AIRE/IIR_BitStringLiteral.java, IR/AIRE/IIR_Comment.java, IR/AIRE/IIR_EnumerationSubtypeDefinition.java, IR/AIRE/IIR_FloatingSubtypeDefinition.java, IR/AIRE/IIR_IntegerSubtypeDefinition.java, IR/AIRE/IIR_PhysicalSubtypeDefinition.java, IR/AIRE/IIR_RecordSubtypeDefinition.java: some problems with mutable classes accessed through static get. * IR/AIRE/IIR_StringLiteral.java: Whoops. IIR_StringLiteral is mutable. * IR/AIRE/IIR.java, IR/AIRE/IIR_Identifier.java, IR/AIRE/IIR_StringLiteral.java: Make IIR_Identifier,IIR_StringLiteral draw from a static pool. Properly initialize filename/offset for IIR.java * IR/AIRE/IIR_FileDeclaration.java, IR/AIRE/IIR_FileInterfaceDeclaration.java, IR/AIRE/IIR_FileTypeDefinition.java, IR/AIRE/IIR_FloatingPointLiteral.java, IR/AIRE/IIR_FloatingPointLiteral32.java, IR/AIRE/IIR_FloatingPointLiteral64.java, IR/AIRE/IIR_FloatingSubtypeDefinition.java, IR/AIRE/IIR_FloatingTypeDefinition.java, IR/AIRE/IIR_ForLoopStatement.java, IR/AIRE/IIR_FreeQuantityDeclaration.java, IR/AIRE/IIR_FunctionCall.java, IR/AIRE/IIR_FunctionDeclaration.java, IR/AIRE/IIR_GenericList.java, IR/AIRE/IIR_GreaterThanOperator.java, IR/AIRE/IIR_GreaterThanOrEqualOperator.java, IR/AIRE/IIR_GroupDeclaration.java, IR/AIRE/IIR_GroupTemplateDeclaration.java, IR/AIRE/IIR_HighAttribute.java, IR/AIRE/IIR_Identifier.java, IR/AIRE/IIR_IdentityOperator.java, IR/AIRE/IIR_IfStatement.java, IR/AIRE/IIR_ImageAttribute.java, IR/AIRE/IIR_IndexedName.java, IR/AIRE/IIR_InequalityOperator.java, IR/AIRE/IIR_IntegAttribute.java, IR/AIRE/IIR_IntegerLiteral.java, IR/AIRE/IIR_IntegerLiteral32.java, IR/AIRE/IIR_IntegerLiteral64.java, IR/AIRE/IIR_IntegerSubtypeDefinition.java, IR/AIRE/IIR_IntegerTypeDefinition.java, IR/AIRE/IIR_InterfaceDeclaration.java, IR/AIRE/IIR_InterfaceList.java, IR/AIRE/IIR_LTFAttribute.java, IR/AIRE/IIR_Label.java, IR/AIRE/IIR_LastActiveAttribute.java, IR/AIRE/IIR_LastEventAttribute.java, IR/AIRE/IIR_LastValueAttribute.java, IR/AIRE/IIR_LeftAttribute.java, IR/AIRE/IIR_LeftOfAttribute.java, IR/AIRE/IIR_LengthAttribute.java, IR/AIRE/IIR_LessThanOperator.java, IR/AIRE/IIR_LessThanOrEqualOperator.java, IR/AIRE/IIR_LibraryClause.java, IR/AIRE/IIR_LibraryDeclaration.java, IR/AIRE/IIR_LibraryUnit.java, IR/AIRE/IIR_LibraryUnitList.java, IR/AIRE/IIR_List.java, IR/AIRE/IIR_Literal.java, IR/AIRE/IIR_LowAttribute.java, IR/AIRE/IIR_ModulusOperator.java, IR/AIRE/IIR_MonadicOperator.java, IR/AIRE/IIR_MultiplicationOperator.java, IR/AIRE/IIR_Name.java, IR/AIRE/IIR_NandOperator.java, IR/AIRE/IIR_NatureDeclaration.java, IR/AIRE/IIR_NatureDefinition.java, IR/AIRE/IIR_NatureElementDeclaration.java, IR/AIRE/IIR_NatureElementDeclarationList.java, IR/AIRE/IIR_NegationOperator.java, IR/AIRE/IIR_NextStatement.java, IR/AIRE/IIR_NoiseSourceQuantityDeclaration.java, IR/AIRE/IIR_NorOperator.java, IR/AIRE/IIR_NotOperator.java, IR/AIRE/IIR_NullStatement.java, IR/AIRE/IIR_ObjectDeclaration.java, IR/AIRE/IIR_OrOperator.java, IR/AIRE/IIR_OthersInitialization.java, IR/AIRE/IIR_PackageBodyDeclaration.java, IR/AIRE/IIR_PackageDeclaration.java, IR/AIRE/IIR_PathNameAttribute.java, IR/AIRE/IIR_PhysicalLiteral.java, IR/AIRE/IIR_PhysicalSubtypeDefinition.java, IR/AIRE/IIR_PhysicalTypeDefinition.java, IR/AIRE/IIR_PhysicalUnit.java, IR/AIRE/IIR_PortList.java, IR/AIRE/IIR_PosAttribute.java, IR/AIRE/IIR_PredAttribute.java, IR/AIRE/IIR_ProcedureCallStatement.java, IR/AIRE/IIR_ProcedureDeclaration.java, IR/AIRE/IIR_ProcessStatement.java, IR/AIRE/IIR_QualifiedExpression.java, IR/AIRE/IIR_QuantityDeclaration.java, IR/AIRE/IIR_QuantityInterfaceDeclaration.java, IR/AIRE/IIR_QuietAttribute.java, IR/AIRE/IIR_ROLOperator.java, IR/AIRE/IIR_ROROperator.java, IR/AIRE/IIR_RangeAttribute.java, IR/AIRE/IIR_RangeTypeDefinition.java, IR/AIRE/IIR_RecordNatureDefinition.java, IR/AIRE/IIR_RecordSubnatureDefinition.java, IR/AIRE/IIR_RecordSubtypeDefinition.java, IR/AIRE/IIR_RecordTypeDefinition.java, IR/AIRE/IIR_ReferenceAttribute.java, IR/AIRE/IIR_RemainderOperator.java, IR/AIRE/IIR_ReportStatement.java, IR/AIRE/IIR_ReturnStatement.java, IR/AIRE/IIR_ReverseRangeAttribute.java, IR/AIRE/IIR_RightAttribute.java, IR/AIRE/IIR_RightOfAttribute.java, IR/AIRE/IIR_SLAOperator.java, IR/AIRE/IIR_SLLOperator.java, IR/AIRE/IIR_SRAOperator.java, IR/AIRE/IIR_SRLOperator.java, IR/AIRE/IIR_ScalarNatureDefinition.java, IR/AIRE/IIR_ScalarSubnatureDefinition.java, IR/AIRE/IIR_ScalarTypeDefinition.java, IR/AIRE/IIR_SelectedName.java, IR/AIRE/IIR_SelectedNameByAll.java, IR/AIRE/IIR_SelectedWaveform.java, IR/AIRE/IIR_SelectedWaveformList.java, IR/AIRE/IIR_SensitizedProcessStatement.java, IR/AIRE/IIR_SequentialStatement.java, IR/AIRE/IIR_SequentialStatementList.java, IR/AIRE/IIR_SharedVariableDeclaration.java, IR/AIRE/IIR_SignalAssignmentStatement.java, IR/AIRE/IIR_SignalDeclaration.java, IR/AIRE/IIR_SignalInterfaceDeclaration.java, IR/AIRE/IIR_Signature.java, IR/AIRE/IIR_SimpleName.java, IR/AIRE/IIR_SimpleNameAttribute.java, IR/AIRE/IIR_SimpleSimultaneousStatement.java, IR/AIRE/IIR_SimultaneousAlternative.java, IR/AIRE/IIR_SimultaneousAlternativeByChoices.java, IR/AIRE/IIR_SimultaneousAlternativeByExpression.java, IR/AIRE/IIR_SimultaneousAlternativeByOthers.java, IR/AIRE/IIR_SimultaneousAlternativeList.java, IR/AIRE/IIR_SimultaneousCaseStatement.java, IR/AIRE/IIR_SimultaneousElsif.java, IR/AIRE/IIR_SimultaneousIfStatement.java, IR/AIRE/IIR_SimultaneousProceduralStatement.java, IR/AIRE/IIR_SimultaneousStatement.java, IR/AIRE/IIR_SimultaneousStatementList.java, IR/AIRE/IIR_SliceName.java, IR/AIRE/IIR_SpectrumSourceQuantityDeclaration.java, IR/AIRE/IIR_StableAttribute.java, IR/AIRE/IIR_Statement.java, IR/AIRE/IIR_StatementList.java, IR/AIRE/IIR_StringLiteral.java, IR/AIRE/IIR_SubnatureDeclaration.java, IR/AIRE/IIR_SubprogramDeclaration.java, IR/AIRE/IIR_SubtractionOperator.java, IR/AIRE/IIR_SubtypeDeclaration.java, IR/AIRE/IIR_SuccAttribute.java, IR/AIRE/IIR_TerminalDeclaration.java, IR/AIRE/IIR_TerminalInterfaceDeclaration.java, IR/AIRE/IIR_TextLiteral.java, IR/AIRE/IIR_ThroughAttribute.java, IR/AIRE/IIR_ThroughQuantityDeclaration.java, IR/AIRE/IIR_ToleranceAttribute.java, IR/AIRE/IIR_TransactionAttribute.java, IR/AIRE/IIR_Tuple.java, IR/AIRE/IIR_TypeConversion.java, IR/AIRE/IIR_TypeDeclaration.java, IR/AIRE/IIR_TypeDefinition.java, IR/AIRE/IIR_UnitList.java, IR/AIRE/IIR_UseClause.java, IR/AIRE/IIR_UserAttribute.java, IR/AIRE/IIR_ValAttribute.java, IR/AIRE/IIR_ValueAttribute.java, IR/AIRE/IIR_VariableAssignmentStatement.java, IR/AIRE/IIR_VariableDeclaration.java, IR/AIRE/IIR_VariableInterfaceDeclaration.java, IR/AIRE/IIR_WaitStatement.java, IR/AIRE/IIR_WaveformElement.java, IR/AIRE/IIR_WaveformList.java, IR/AIRE/IIR_WhileLoopStatement.java, IR/AIRE/IIR_XnorOperator.java, IR/AIRE/IIR_XorOperator.java, IR/AIRE/IIR_ZOHAttribute.java, IR/AIRE/IIR_ZTFAttribute.java, IR/AIRE/IR_Kind.java, IR/AIRE/IIR.java, IR/AIRE/IIR_AboveAttribute.java, IR/AIRE/IIR_AbsoluteOperator.java, IR/AIRE/IIR_AccessSubtypeDefinition.java, IR/AIRE/IIR_AccessTypeDefinition.java, IR/AIRE/IIR_AcrossAttribute.java, IR/AIRE/IIR_AcrossQuantityDeclaration.java, IR/AIRE/IIR_ActiveAttribute.java, IR/AIRE/IIR_AdditionOperator.java, IR/AIRE/IIR_Aggregate.java, IR/AIRE/IIR_AliasDeclaration.java, IR/AIRE/IIR_Allocator.java, IR/AIRE/IIR_AndOperator.java, IR/AIRE/IIR_ArchitectureDeclaration.java, IR/AIRE/IIR_ArrayNatureDefinition.java, IR/AIRE/IIR_ArraySubnatureDefinition.java, IR/AIRE/IIR_ArraySubtypeDefinition.java, IR/AIRE/IIR_ArrayTypeDefinition.java, IR/AIRE/IIR_AscendingAttribute.java, IR/AIRE/IIR_AssertionStatement.java, IR/AIRE/IIR_AssociationElement.java, IR/AIRE/IIR_AssociationElementByExpression.java, IR/AIRE/IIR_AssociationElementByOthers.java, IR/AIRE/IIR_AssociationElementOpen.java, IR/AIRE/IIR_AssociationList.java, IR/AIRE/IIR_Attribute.java, IR/AIRE/IIR_AttributeDeclaration.java, IR/AIRE/IIR_AttributeSpecification.java, IR/AIRE/IIR_AttributeSpecificationList.java, IR/AIRE/IIR_BaseAttribute.java, IR/AIRE/IIR_BitStringLiteral.java, IR/AIRE/IIR_BlockConfiguration.java, IR/AIRE/IIR_BlockStatement.java, IR/AIRE/IIR_BreakElement.java, IR/AIRE/IIR_BreakList.java, IR/AIRE/IIR_BreakStatement.java, IR/AIRE/IIR_CaseStatement.java, IR/AIRE/IIR_CaseStatementAlternative.java, IR/AIRE/IIR_CaseStatementAlternativeByChoices.java, IR/AIRE/IIR_CaseStatementAlternativeByExpression.java, IR/AIRE/IIR_CaseStatementAlternativeByOthers.java, IR/AIRE/IIR_CaseStatementAlternativeList.java, IR/AIRE/IIR_CharacterLiteral.java, IR/AIRE/IIR_Choice.java, IR/AIRE/IIR_ChoiceList.java, IR/AIRE/IIR_Comment.java, IR/AIRE/IIR_CommentList.java, IR/AIRE/IIR_ComponentConfiguration.java, IR/AIRE/IIR_ComponentDeclaration.java, IR/AIRE/IIR_ComponentInstantiationStatement.java, IR/AIRE/IIR_CompositeNatureDefinition.java, IR/AIRE/IIR_ConcatenationOperator.java, IR/AIRE/IIR_ConcurrentAssertionStatement.java, IR/AIRE/IIR_ConcurrentBreakStatement.java, IR/AIRE/IIR_ConcurrentConditionalSignalAssignment.java, IR/AIRE/IIR_ConcurrentGenerateForStatement.java, IR/AIRE/IIR_ConcurrentGenerateIfStatement.java, IR/AIRE/IIR_ConcurrentProcedureCallStatement.java, IR/AIRE/IIR_ConcurrentSelectedSignalAssignment.java, IR/AIRE/IIR_ConcurrentStatement.java, IR/AIRE/IIR_ConcurrentStatementList.java, IR/AIRE/IIR_ConditionalWaveform.java, IR/AIRE/IIR_ConditionalWaveformList.java, IR/AIRE/IIR_ConfigurationDeclaration.java, IR/AIRE/IIR_ConfigurationItem.java, IR/AIRE/IIR_ConfigurationItemList.java, IR/AIRE/IIR_ConfigurationSpecification.java, IR/AIRE/IIR_ConstantDeclaration.java, IR/AIRE/IIR_ConstantInterfaceDeclaration.java, IR/AIRE/IIR_ContributionAttribute.java, IR/AIRE/IIR_Declaration.java, IR/AIRE/IIR_DeclarationList.java, IR/AIRE/IIR_DelayedAttribute.java, IR/AIRE/IIR_DesignFile.java, IR/AIRE/IIR_DesignFileList.java, IR/AIRE/IIR_Designator.java, IR/AIRE/IIR_DesignatorByAll.java, IR/AIRE/IIR_DesignatorByOthers.java, IR/AIRE/IIR_DesignatorExplicit.java, IR/AIRE/IIR_DesignatorList.java, IR/AIRE/IIR_DisconnectionSpecification.java, IR/AIRE/IIR_DivisionOperator.java, IR/AIRE/IIR_DotAttribute.java, IR/AIRE/IIR_DrivingAttribute.java, IR/AIRE/IIR_DyadicOperator.java, IR/AIRE/IIR_ElementDeclaration.java, IR/AIRE/IIR_ElementDeclarationList.java, IR/AIRE/IIR_Elsif.java, IR/AIRE/IIR_EntityClassEntry.java, IR/AIRE/IIR_EntityClassEntryList.java, IR/AIRE/IIR_EntityDeclaration.java, IR/AIRE/IIR_EnumerationLiteral.java, IR/AIRE/IIR_EnumerationLiteralList.java, IR/AIRE/IIR_EnumerationSubtypeDefinition.java, IR/AIRE/IIR_EnumerationTypeDefinition.java, IR/AIRE/IIR_EqualityOperator.java, IR/AIRE/IIR_EventAttribute.java, IR/AIRE/IIR_ExitStatement.java, IR/AIRE/IIR_ExponentiationOperator.java, IR/AIRE/IIR_Expression.java: Implemented get_kind() method. Fixed some abstractness issues & IR_Kind typos. * IR/AIRE/IIR_ConcurrentConditionalSignalAssignment.java, IR/AIRE/IIR_ConcurrentSelectedSignalAssignment.java, IR/AIRE/IIR_FunctionDeclaration.java, IR/AIRE/IIR_InterfaceDeclaration.java: Some old names stuck by me: Corrected the IIR_* stuff that should have been IR_*. * IR/AIRE/IIR_AttributeSpecification.java, IR/AIRE/IIR_BlockConfiguration.java, IR/AIRE/IIR_BlockStatement.java, IR/AIRE/IIR_BreakList.java, IR/AIRE/IIR_BreakStatement.java, IR/AIRE/IIR_CaseStatement.java, IR/AIRE/IIR_CaseStatementAlternative.java, IR/AIRE/IIR_CaseStatementAlternativeByChoices.java, IR/AIRE/IIR_CaseStatementAlternativeList.java, IR/AIRE/IIR_ComponentConfiguration.java, IR/AIRE/IIR_ConcurrentGenerateForStatement.java, IR/AIRE/IIR_ConcurrentProcedureCallStatement.java, IR/AIRE/IIR_ConfigurationDeclaration.java, IR/AIRE/IIR_ConfigurationSpecification.java, IR/AIRE/IIR_DesignFile.java, IR/AIRE/IIR_DisconnectionSpecification.java, IR/AIRE/IIR_EnumerationLiteral.java, IR/AIRE/IIR_EnumerationSubtypeDefinition.java, IR/AIRE/IIR_GroupTemplateDeclaration.java, IR/AIRE/IIR_InterfaceDeclaration.java, IR/AIRE/IIR_Label.java, IR/AIRE/IIR_NatureDeclaration.java, IR/AIRE/IIR_ObjectDeclaration.java, IR/AIRE/IIR_ProcedureCallStatement.java, IR/AIRE/IIR_ProcessStatement.java, IR/AIRE/IIR_SelectedWaveform.java, IR/AIRE/IIR_SignalAssignmentStatement.java, IR/AIRE/IIR_Signature.java, IR/AIRE/IIR_SimultaneousAlternative.java, IR/AIRE/IIR_SimultaneousAlternativeByChoices.java, IR/AIRE/IIR_SimultaneousElsif.java, IR/AIRE/IIR_SimultaneousIfStatement.java, IR/AIRE/IIR_SimultaneousProceduralStatement.java, IR/AIRE/IIR_SubprogramDeclaration.java, IR/AIRE/IIR_TypeDeclaration.java, IR/AIRE/IIR_WhileLoopStatement.java: Made public members really public. * GNUmakefile: change the order in which we do the install rule. * GNUmakefile: Cleaned up generated JAR file (removed Test,etc classes). * bin/unmunge, bin/unmunge.awk: modifications to unmunge script. awk version can't handle AIRE. * GNUmakefile: modifications to unmunge script. awk version can't handle AIRE. added makefile rule to set stuff in bin executable; checkout usually does not do this. * IR/AIRE/IR_Kind.java, IR/AIRE/IR_SignalKind.java: fixed speling mistakes. * IR/AIRE/IIR_ArrayNatureDefinition.java, IR/AIRE/IIR_Attribute.java, IR/AIRE/IIR_CaseStatementAlternative.java, IR/AIRE/IIR_CompositeNatureDefinition.java, IR/AIRE/IIR_ConcurrentStatement.java, IR/AIRE/IIR_ConfigurationItem.java, IR/AIRE/IIR_Declaration.java, IR/AIRE/IIR_Designator.java, IR/AIRE/IIR_DyadicOperator.java, IR/AIRE/IIR_Expression.java, IR/AIRE/IIR_InterfaceDeclaration.java, IR/AIRE/IIR_LibraryUnit.java, IR/AIRE/IIR_Literal.java, IR/AIRE/IIR_MonadicOperator.java, IR/AIRE/IIR_NatureDefinition.java, IR/AIRE/IIR_ObjectDeclaration.java, IR/AIRE/IIR_RecordNatureDefinition.java, IR/AIRE/IIR_RecordSubnatureDefinition.java, IR/AIRE/IIR_ScalarNatureDefinition.java, IR/AIRE/IIR_ScalarSubnatureDefinition.java, IR/AIRE/IIR_ScalarTypeDefinition.java, IR/AIRE/IIR_SequentialStatement.java, IR/AIRE/IIR_SimultaneousStatement.java, IR/AIRE/IIR_Statement.java, IR/AIRE/IIR_SubprogramDeclaration.java, IR/AIRE/IIR_TextLiteral.java, IR/AIRE/IIR_Tuple.java, IR/AIRE/IIR_TypeDefinition.java: Added abstract label to non-instantiatable classes. * IR/AIRE/IR_DelayMechanism.java, IR/AIRE/IR_Kind.java, IR/AIRE/IR_Mode.java, IR/AIRE/IR_Pure.java, IR/AIRE/IR_SignalKind.java, IR/AIRE/IR_SourceLanguage.java, IR/Bytecode/Op.java, Main/Graph.java, Main/Main.java, Util/HClassUtil.java, Util/Util.java: Make classes with only static methods (no constructor) into abstract methods. * .cvsignore: Added entry for .jdproperties, which our debug created in the root dir. * Util/Tuple.java: Whoops, forgot to check this in. This is necessary for the AIRE classes. It's also a handy thing to have. * IR/AIRE/IIR.java, IR/AIRE/IIR_AccessTypeDefinition.java, IR/AIRE/IIR_AcrossQuantityDeclaration.java, IR/AIRE/IIR_ArrayNatureDefinition.java, IR/AIRE/IIR_ArraySubnatureDefinition.java, IR/AIRE/IIR_ArraySubtypeDefinition.java, IR/AIRE/IIR_AssertionStatement.java, IR/AIRE/IIR_ConcurrentAssertionStatement.java, IR/AIRE/IIR_ConcurrentConditionalSignalAssignment.java, IR/AIRE/IIR_ConcurrentGenerateIfStatement.java, IR/AIRE/IIR_Designator.java, IR/AIRE/IIR_EntityClassEntry.java, IR/AIRE/IIR_EntityDeclaration.java, IR/AIRE/IIR_EnumerationSubtypeDefinition.java, IR/AIRE/IIR_FloatingPointLiteral.java, IR/AIRE/IIR_FloatingSubtypeDefinition.java, IR/AIRE/IIR_ForLoopStatement.java, IR/AIRE/IIR_GroupDeclaration.java, IR/AIRE/IIR_IfStatement.java, IR/AIRE/IIR_IntegerSubtypeDefinition.java, IR/AIRE/IIR_LibraryUnit.java, IR/AIRE/IIR_NatureDeclaration.java, IR/AIRE/IIR_NatureElementDeclaration.java, IR/AIRE/IIR_NextStatement.java, IR/AIRE/IIR_NoiseSourceQuantityDeclaration.java, IR/AIRE/IIR_OthersInitialization.java, IR/AIRE/IIR_PackageDeclaration.java, IR/AIRE/IIR_ProcessStatement.java, IR/AIRE/IIR_RecordNatureDefinition.java, IR/AIRE/IIR_RecordSubnatureDefinition.java, IR/AIRE/IIR_RecordSubtypeDefinition.java, IR/AIRE/IIR_ReportStatement.java, IR/AIRE/IIR_ScalarSubnatureDefinition.java, IR/AIRE/IIR_SharedVariableDeclaration.java, IR/AIRE/IIR_SignalDeclaration.java, IR/AIRE/IIR_SimpleSimultaneousStatement.java, IR/AIRE/IIR_SpectrumSourceQuantityDeclaration.java, IR/AIRE/IIR_StringLiteral.java, IR/AIRE/IIR_SubnatureDeclaration.java, IR/AIRE/IIR_SubtypeDeclaration.java, IR/AIRE/IIR_TerminalDeclaration.java, IR/AIRE/IIR_ThroughQuantityDeclaration.java, IR/AIRE/IIR_VariableAssignmentStatement.java, IR/AIRE/IIR_VariableDeclaration.java, IR/AIRE/IIR_WaitStatement.java, IR/AIRE/IIR_WhileLoopStatement.java: Fixed compilation errors. Discovered more static get() methods. Added some classes I thought were deprecated. * IR/AIRE/IIR_PhysicalUnit.java, IR/AIRE/IIR_PortList.java, IR/AIRE/IIR_PosAttribute.java, IR/AIRE/IIR_PredAttribute.java, IR/AIRE/IIR_ProcedureCallStatement.java, IR/AIRE/IIR_ProcedureDeclaration.java, IR/AIRE/IIR_ProcessStatement.java, IR/AIRE/IIR_QualifiedExpression.java, IR/AIRE/IIR_QuantityDeclaration.java, IR/AIRE/IIR_QuantityInterfaceDeclaration.java, IR/AIRE/IIR_QuietAttribute.java, IR/AIRE/IIR_ROLOperator.java, IR/AIRE/IIR_ROROperator.java, IR/AIRE/IIR_RangeAttribute.java, IR/AIRE/IIR_RangeTypeDefinition.java, IR/AIRE/IIR_RecordNatureDefinition.java, IR/AIRE/IIR_RecordSubnatureDefinition.java, IR/AIRE/IIR_RecordSubtypeDefinition.java, IR/AIRE/IIR_RecordTypeDefinition.java, IR/AIRE/IIR_ReferenceAttribute.java, IR/AIRE/IIR_RemainderOperator.java, IR/AIRE/IIR_ReportStatement.java, IR/AIRE/IIR_ReturnStatement.java, IR/AIRE/IIR_ReverseRangeAttribute.java, IR/AIRE/IIR_RightAttribute.java, IR/AIRE/IIR_RightOfAttribute.java, IR/AIRE/IIR_SLAOperator.java, IR/AIRE/IIR_SLLOperator.java, IR/AIRE/IIR_SRAOperator.java, IR/AIRE/IIR_SRLOperator.java, IR/AIRE/IIR_ScalarNatureDefinition.java, IR/AIRE/IIR_ScalarSubnatureDefinition.java, IR/AIRE/IIR_ScalarTypeDefinition.java, IR/AIRE/IIR_SelectedName.java, IR/AIRE/IIR_SelectedNameByAll.java, IR/AIRE/IIR_SelectedWaveform.java, IR/AIRE/IIR_SelectedWaveformList.java, IR/AIRE/IIR_SensitizedProcessStatement.java, IR/AIRE/IIR_SequentialStatement.java, IR/AIRE/IIR_SequentialStatementList.java, IR/AIRE/IIR_SharedVariableDeclaration.java, IR/AIRE/IIR_SignalAssignmentStatement.java, IR/AIRE/IIR_SignalDeclaration.java, IR/AIRE/IIR_SignalInterfaceDeclaration.java, IR/AIRE/IIR_Signature.java, IR/AIRE/IIR_SimpleName.java, IR/AIRE/IIR_SimpleNameAttribute.java, IR/AIRE/IIR_SimpleSimultaneousStatement.java, IR/AIRE/IIR_SimultaneousAlternative.java, IR/AIRE/IIR_SimultaneousAlternativeByChoices.java, IR/AIRE/IIR_SimultaneousAlternativeByExpression.java, IR/AIRE/IIR_SimultaneousAlternativeByOthers.java, IR/AIRE/IIR_SimultaneousAlternativeList.java, IR/AIRE/IIR_SimultaneousCaseStatement.java, IR/AIRE/IIR_SimultaneousElsif.java, IR/AIRE/IIR_SimultaneousIfStatement.java, IR/AIRE/IIR_SimultaneousProceduralStatement.java, IR/AIRE/IIR_SimultaneousStatement.java, IR/AIRE/IIR_SimultaneousStatementList.java, IR/AIRE/IIR_SliceName.java, IR/AIRE/IIR_SpectrumSourceQuantityDeclaration.java, IR/AIRE/IIR_StableAttribute.java, IR/AIRE/IIR_Statement.java, IR/AIRE/IIR_StatementList.java, IR/AIRE/IIR_StringLiteral.java, IR/AIRE/IIR_SubnatureDeclaration.java, IR/AIRE/IIR_SubprogramDeclaration.java, IR/AIRE/IIR_SubtractionOperator.java, IR/AIRE/IIR_SubtypeDeclaration.java, IR/AIRE/IIR_SuccAttribute.java, IR/AIRE/IIR_TerminalDeclaration.java, IR/AIRE/IIR_TerminalInterfaceDeclaration.java, IR/AIRE/IIR_TextLiteral.java, IR/AIRE/IIR_ThroughAttribute.java, IR/AIRE/IIR_ToleranceAttribute.java, IR/AIRE/IIR_TransactionAttribute.java, IR/AIRE/IIR_Tuple.java, IR/AIRE/IIR_TypeConversion.java, IR/AIRE/IIR_TypeDeclaration.java, IR/AIRE/IIR_TypeDefinition.java, IR/AIRE/IIR_UnitList.java, IR/AIRE/IIR_UseClause.java, IR/AIRE/IIR_UserAttribute.java, IR/AIRE/IIR_ValAttribute.java, IR/AIRE/IIR_ValueAttribute.java, IR/AIRE/IIR_VariableAssignmentStatement.java, IR/AIRE/IIR_VariableDeclaration.java, IR/AIRE/IIR_VariableInterfaceDeclaration.java, IR/AIRE/IIR_Visitor.java, IR/AIRE/IIR_WaitStatement.java, IR/AIRE/IIR_WaveformElement.java, IR/AIRE/IIR_WaveformList.java, IR/AIRE/IIR_WhileLoopStatement.java, IR/AIRE/IIR_XnorOperator.java, IR/AIRE/IIR_XorOperator.java, IR/AIRE/IIR_ZOHAttribute.java, IR/AIRE/IIR_ZTFAttribute.java, IR/AIRE/IR_DelayMechanism.java, IR/AIRE/IR_Kind.java, IR/AIRE/IR_Mode.java, IR/AIRE/IR_Pure.java, IR/AIRE/IR_SignalKind.java, IR/AIRE/IR_SourceLanguage.java, IR/AIRE/IIR.java, IR/AIRE/IIR_AboveAttribute.java, IR/AIRE/IIR_AbsoluteOperator.java, IR/AIRE/IIR_AccessSubtypeDefinition.java, IR/AIRE/IIR_AccessTypeDefinition.java, IR/AIRE/IIR_AcrossAttribute.java, IR/AIRE/IIR_ActiveAttribute.java, IR/AIRE/IIR_AdditionOperator.java, IR/AIRE/IIR_Aggregate.java, IR/AIRE/IIR_AliasDeclaration.java, IR/AIRE/IIR_Allocator.java, IR/AIRE/IIR_AndOperator.java, IR/AIRE/IIR_ArchitectureDeclaration.java, IR/AIRE/IIR_ArrayNatureDefinition.java, IR/AIRE/IIR_ArraySubtypeDefinition.java, IR/AIRE/IIR_ArrayTypeDefinition.java, IR/AIRE/IIR_AscendingAttribute.java, IR/AIRE/IIR_AssertionStatement.java, IR/AIRE/IIR_AssociationElement.java, IR/AIRE/IIR_AssociationElementByExpression.java, IR/AIRE/IIR_AssociationElementByOthers.java, IR/AIRE/IIR_AssociationElementOpen.java, IR/AIRE/IIR_AssociationList.java, IR/AIRE/IIR_Attribute.java, IR/AIRE/IIR_AttributeDeclaration.java, IR/AIRE/IIR_AttributeSpecification.java, IR/AIRE/IIR_AttributeSpecificationList.java, IR/AIRE/IIR_BaseAttribute.java, IR/AIRE/IIR_BitStringLiteral.java, IR/AIRE/IIR_BlockConfiguration.java, IR/AIRE/IIR_BlockStatement.java, IR/AIRE/IIR_BreakElement.java, IR/AIRE/IIR_BreakList.java, IR/AIRE/IIR_BreakStatement.java, IR/AIRE/IIR_CaseStatement.java, IR/AIRE/IIR_CaseStatementAlternative.java, IR/AIRE/IIR_CaseStatementAlternativeByChoices.java, IR/AIRE/IIR_CaseStatementAlternativeByExpression.java, IR/AIRE/IIR_CaseStatementAlternativeByOthers.java, IR/AIRE/IIR_CaseStatementAlternativeList.java, IR/AIRE/IIR_CharacterLiteral.java, IR/AIRE/IIR_Choice.java, IR/AIRE/IIR_ChoiceList.java, IR/AIRE/IIR_Comment.java, IR/AIRE/IIR_CommentList.java, IR/AIRE/IIR_ComponentConfiguration.java, IR/AIRE/IIR_ComponentDeclaration.java, IR/AIRE/IIR_ComponentInstantiationStatement.java, IR/AIRE/IIR_CompositeNatureDefinition.java, IR/AIRE/IIR_ConcatenationOperator.java, IR/AIRE/IIR_ConcurrentAssertionStatement.java, IR/AIRE/IIR_ConcurrentBreakStatement.java, IR/AIRE/IIR_ConcurrentConditionalSignalAssignment.java, IR/AIRE/IIR_ConcurrentGenerateForStatement.java, IR/AIRE/IIR_ConcurrentGenerateIfStatement.java, IR/AIRE/IIR_ConcurrentProcedureCallStatement.java, IR/AIRE/IIR_ConcurrentSelectedSignalAssignment.java, IR/AIRE/IIR_ConcurrentStatement.java, IR/AIRE/IIR_ConcurrentStatementList.java, IR/AIRE/IIR_ConditionalWaveform.java, IR/AIRE/IIR_ConditionalWaveformList.java, IR/AIRE/IIR_ConfigurationDeclaration.java, IR/AIRE/IIR_ConfigurationItem.java, IR/AIRE/IIR_ConfigurationItemList.java, IR/AIRE/IIR_ConfigurationSpecification.java, IR/AIRE/IIR_ConstantDeclaration.java, IR/AIRE/IIR_ConstantInterfaceDeclaration.java, IR/AIRE/IIR_ContributionAttribute.java, IR/AIRE/IIR_Declaration.java, IR/AIRE/IIR_DeclarationList.java, IR/AIRE/IIR_DelayedAttribute.java, IR/AIRE/IIR_DesignFile.java, IR/AIRE/IIR_DesignFileList.java, IR/AIRE/IIR_Designator.java, IR/AIRE/IIR_DesignatorByAll.java, IR/AIRE/IIR_DesignatorByOthers.java, IR/AIRE/IIR_DesignatorExplicit.java, IR/AIRE/IIR_DesignatorList.java, IR/AIRE/IIR_DisconnectionSpecification.java, IR/AIRE/IIR_DivisionOperator.java, IR/AIRE/IIR_DotAttribute.java, IR/AIRE/IIR_DrivingAttribute.java, IR/AIRE/IIR_DyadicOperator.java, IR/AIRE/IIR_ElementDeclaration.java, IR/AIRE/IIR_ElementDeclarationList.java, IR/AIRE/IIR_Elsif.java, IR/AIRE/IIR_EntityClassEntry.java, IR/AIRE/IIR_EntityClassEntryList.java, IR/AIRE/IIR_EntityDeclaration.java, IR/AIRE/IIR_EnumerationLiteral.java, IR/AIRE/IIR_EnumerationLiteralList.java, IR/AIRE/IIR_EnumerationSubtypeDefinition.java, IR/AIRE/IIR_EnumerationTypeDefinition.java, IR/AIRE/IIR_EqualityOperator.java, IR/AIRE/IIR_EventAttribute.java, IR/AIRE/IIR_ExitStatement.java, IR/AIRE/IIR_ExponentiationOperator.java, IR/AIRE/IIR_Expression.java, IR/AIRE/IIR_FileDeclaration.java, IR/AIRE/IIR_FileInterfaceDeclaration.java, IR/AIRE/IIR_FileTypeDefinition.java, IR/AIRE/IIR_FloatingPointLiteral.java, IR/AIRE/IIR_FloatingPointLiteral32.java, IR/AIRE/IIR_FloatingPointLiteral64.java, IR/AIRE/IIR_FloatingSubtypeDefinition.java, IR/AIRE/IIR_FloatingTypeDefinition.java, IR/AIRE/IIR_ForLoopStatement.java, IR/AIRE/IIR_FreeQuantityDeclaration.java, IR/AIRE/IIR_FunctionCall.java, IR/AIRE/IIR_FunctionDeclaration.java, IR/AIRE/IIR_GenericList.java, IR/AIRE/IIR_GreaterThanOperator.java, IR/AIRE/IIR_GreaterThanOrEqualOperator.java, IR/AIRE/IIR_GroupDeclaration.java, IR/AIRE/IIR_GroupTemplateDeclaration.java, IR/AIRE/IIR_HighAttribute.java, IR/AIRE/IIR_Identifier.java, IR/AIRE/IIR_IdentityOperator.java, IR/AIRE/IIR_IfStatement.java, IR/AIRE/IIR_ImageAttribute.java, IR/AIRE/IIR_IndexedName.java, IR/AIRE/IIR_InequalityOperator.java, IR/AIRE/IIR_IntegAttribute.java, IR/AIRE/IIR_IntegerLiteral.java, IR/AIRE/IIR_IntegerLiteral32.java, IR/AIRE/IIR_IntegerLiteral64.java, IR/AIRE/IIR_IntegerSubtypeDefinition.java, IR/AIRE/IIR_IntegerTypeDefinition.java, IR/AIRE/IIR_InterfaceDeclaration.java, IR/AIRE/IIR_InterfaceList.java, IR/AIRE/IIR_LTFAttribute.java, IR/AIRE/IIR_Label.java, IR/AIRE/IIR_LastActiveAttribute.java, IR/AIRE/IIR_LastEventAttribute.java, IR/AIRE/IIR_LastValueAttribute.java, IR/AIRE/IIR_LeftAttribute.java, IR/AIRE/IIR_LeftOfAttribute.java, IR/AIRE/IIR_LengthAttribute.java, IR/AIRE/IIR_LessThanOperator.java, IR/AIRE/IIR_LessThanOrEqualOperator.java, IR/AIRE/IIR_LibraryClause.java, IR/AIRE/IIR_LibraryDeclaration.java, IR/AIRE/IIR_LibraryUnit.java, IR/AIRE/IIR_LibraryUnitList.java, IR/AIRE/IIR_List.java, IR/AIRE/IIR_Literal.java, IR/AIRE/IIR_LowAttribute.java, IR/AIRE/IIR_ModulusOperator.java, IR/AIRE/IIR_MonadicOperator.java, IR/AIRE/IIR_MultiplicationOperator.java, IR/AIRE/IIR_Name.java, IR/AIRE/IIR_NandOperator.java, IR/AIRE/IIR_NatureDeclaration.java, IR/AIRE/IIR_NatureDefinition.java, IR/AIRE/IIR_NatureElementDeclaration.java, IR/AIRE/IIR_NatureElementDeclarationList.java, IR/AIRE/IIR_NegationOperator.java, IR/AIRE/IIR_NextStatement.java, IR/AIRE/IIR_NoiseSourceQuantityDeclaration.java, IR/AIRE/IIR_NorOperator.java, IR/AIRE/IIR_NotOperator.java, IR/AIRE/IIR_NullStatement.java, IR/AIRE/IIR_ObjectDeclaration.java, IR/AIRE/IIR_OrOperator.java, IR/AIRE/IIR_OthersInitialization.java, IR/AIRE/IIR_PackageBodyDeclaration.java, IR/AIRE/IIR_PackageDeclaration.java, IR/AIRE/IIR_PathNameAttribute.java, IR/AIRE/IIR_PhysicalLiteral.java, IR/AIRE/IIR_PhysicalSubtypeDefinition.java, IR/AIRE/IIR_PhysicalTypeDefinition.java: AIRE/CE: Advanced Intermediate Representation with Extensibility/ Common Environment IR for VHDL/Verilog HDLs. 1998-10-09 C. Scott Ananian * TODO: updated. 1998-10-08 C. Scott Ananian * Analysis/DomTree.java: appel screwed up the dom tree algorithm. fixed now. 1998-10-06 C. Scott Ananian * ClassFile/HMethod.java: javadoc edit. 1998-10-04 C. Scott Ananian * TODO: More crazy ideas. 1998-09-29 C. Scott Ananian * ClassFile/HMethod.java: Fixed boo-boo: if conversion was unsuccessful we tried to putCode(null) which is Not Good. 1998-09-25 C. Scott Ananian * TODO: Updated status. 1998-09-24 C. Scott Ananian * Main/Graph.java: Took out meaningless comment from Graph.java * TODO: updated. * Main/Graph.java: Merged the improvements to Test.Graph into the main code tree. * ClassFile/HCodeFactory.java, ClassFile/HMethod.java: Added documentation (and code) to handle getCode()/convert() on native methods. 1998-09-23 C. Scott Ananian * TODO: new stuff to do, new bugs to fix! * TODO: new thought. * TODO: Updated todo list. 1998-09-21 C. Scott Ananian * GNUmakefile: make clean now removes timestamps. * .cvsignore: New time stamp generation == new directive to ignore time stamps. * TODO: updated todo list. * GNUmakefile: Added timestamping to tgz and jar targets. 1998-09-20 C. Scott Ananian * Main/Graph.java: Replaced many getElements() calls with getElementsE(). Maybe the code is faster/less memory-intensive now? --- * ClassFile/HCode.java: Replaced many getElements() calls with getElementsE(). Maybe the code is faster/less memory-intensive now? --- Fixed forgotten import in HCode. * ClassFile/HCode.java, IR/Bytecode/Code.java: Added new getElementsE method to return enumeration (and save the overhead of an array copy). * Analysis/SCC.java: Moved harpoon.Analysis.SCC to harpoon.Analysis.QuadSSA.SCC.SCCAnalysis. * Analysis/SCC.java: Added special case to OPER acmpeq x, null is x is known non-null. Started work on handleSigmas function to Do The Right Thing with conditional branches. * Analysis/SCC.java: Forgot that Boolean can be a const type, too. * Analysis/SCC.java: finished roughing out SCC class. haven't debugged. haven't written the bitwise cases for some parts. * TODO: updated todo. * .cvsignore: Ignore compiler graphs (*.vcg) and the postscript files generated from them. * Analysis/SCC.java: Another day's work on SCC. Still doesn't do CJMP, SWITCH, bitwidth analysis in OPER. But it's coming along. * GNUmakefile: fixed some oversights. Renamed INSTALLMACHINE to www.magic.lcs.mit.edu. Removed only-me dependencies in places where it's no longer true. * TODO: Added new item after disc. with Martin. * GNUmakefile: Modified install rules to reflect new magic.lcs.mit.edu web service. 1998-09-19 C. Scott Ananian * IDEAS, TODO: Put more random stuff in IDEAS and TODO. These are actually thoughts of Fri 18 Sep around 4:30pm. * TODO: updated TODO list. * GNUmakefile: Updated ALLPKGS variable to filter out 'jdb' directory which I use for debugging. * Util/SingletonEnumerator.java: New enumerator for a single object. * TODO: Added null-pointer checks to translation of MONITORENTER/MONITOREXIT. * Util/Util.java: Working on new SCC analysis pass. Will do: null/bitwidth/type/constant prop. Also, array-of-constant-length optimizations. It may wash dishes, too. Util got new methods to support bitwidth analysis. * Analysis/Maps/UseDefMap.java: Working on new SCC analysis pass. Will do: null/bitwidth/type/constant prop. Also, array-of-constant-length optimizations. It may wash dishes, too. UseDefMap got new Enumeration-oriented interface methods. * Analysis/SCC.java, TODO: Working on new SCC analysis pass. Will do: null/bitwidth/type/constant prop. Also, array-of-constant-length optimizations. It may wash dishes, too. 1998-09-18 C. Scott Ananian * TODO: Made synchronized blocks and methods work, and fixed a sneaky bug in phimerge processing. * TODO: Updated TODO. * GNUmakefile: Trivial addition of '@' to front of jikes rule. 1998-09-17 C. Scott Ananian * Main/Main.java: Toba tool didn't like the fact that Main was final. * GNUmakefile: Added 'list' target to list all relevant sources. Added rudimentary support for the IBM Jikes compiler (which dies miserably on some of our sources: it seems to dislike very much packages and classes that share a name). * Analysis/Place.java, TODO: Changed all 'lambda's to 'sigma's. Global function renaming. * GNUmakefile: I was smoking something. Put the JFLAGS where they belong. 1998-09-16 C. Scott Ananian * Util/ArrayEnumerator.java, Util/NullEnumerator.java: Forgot to check these puppies in. Oops. * GNUmakefile, TODO: Fixed vcg->ps rule in Makefile. Updated TODO. * Util/Set.java: Added toString() method for Set. * Main/Graph.java: Updated Graph class to use new DomFrontier method names. * Analysis/DomFrontier.java, Analysis/Place.java, Analysis/UseDef.java: New Place algorithm. We need to do phi and lambda placement simultaneously. UseDef and DomFrontier got methods that return Enumerations. * Temp/Temp.java: Added (commented-out) new method clear() to reset the temp indices. * GNUmakefile: Ack. Forgot to add a hyphen before 'rm' in the new vcg->ps rule. * Analysis/Place.java: Reverting to previous revision. lambas *are* uses, phis are defs. * Main/Graph.java: Added edge labels & prettiness. * GNUmakefile: Added rule to make postscript from .vcg files using xvcg. * IR/Properties/Renameable.java: New interface for HCodeElements that can have their temps renamed. 1998-09-15 C. Scott Ananian * Analysis/Place.java: lambda placement now uses defs like phis, instead of uses. * Analysis/Place.java: Forgot to remove a debugging println. * Util/FIFO.java, Util/Set.java: Various changed intended to improve performance. The real performance bottleneck is the Translate function, however: there are just too many temps being generated, so the phi functions are *huge*. 6) New enumeration and copyInto methods added to FIFO (and UniqueFIFO) 7) New Util.Set class added to reduce memory requirements. * ClassFile/HClass.java: Various changed intended to improve performance. The real performance bottleneck is the Translate function, however: there are just too many temps being generated, so the phi functions are *huge*. 4) HClass modified to use BufferedInputStream to improve performance. * Analysis/DomFrontier.java, Analysis/DomTree.java, Analysis/Place.java, Analysis/UseDef.java: Various changed intended to improve performance. The real performance bottleneck is the Translate function, however: there are just too many temps being generated, so the phi functions are *huge*. 1) UniqueVectors replaced with Sets. This should be more space-efficient. 2) Place changed to allow us to use only one instance of the UseDef() for phi and lambda node placement. 3) Horribly inefficient Place$SetHTable class replaced. * Analysis/DomFrontier.java, Analysis/DomTree.java, Analysis/Place.java, Analysis/UseDef.java: Some speed optimizations to the analysis passes. * TODO: notes on phi placement. * Main/Graph.java: Allow codetype to be selectable on command-line. * Analysis/DomTree.java, Analysis/UseDef.java: Added checks that the HCode implements the proper interfaces. This prevents cryptic error messages further on. * Analysis/Place.java: change constructor to allow placing lamba functions. * Analysis/Place.java: Analysis pass to place phi/lambda functions. 1998-09-14 C. Scott Ananian * Analysis/DomFrontier.java, Analysis/DomTree.java: Updated javadoc documentation. * Analysis/DomFrontier.java: New analysis class to compute the (post)dominance frontier. * Main/Graph.java: Added ID # to graph label. * Main/Graph.java: Added graph generation tool to Main. * IR/Bytecode/Code.java, ClassFile/HCode.java: getLeafElements() method needed for post-dominator tree generation. * Analysis/DomTree.java: Implemented generation of post-dominator tree. * IR/Bytecode/Code.java: Forgot to get rid of an aborted attempt at a registration mechanism. * Analysis/DomTree.java: new analysis class to construct a dominator tree. * IR/Properties/Edges.java: Extended the interface with succ() and pred() methods. * IR/Bytecode/Instr.java: Implemented the IR.Properties.Edges interface. * TODO: First-draft LAMBDA nodes. * TODO: peephole optimization ideas. * IR/Bytecode/Code.java, TODO: Fixed handling to 'catch any' blocks. * Analysis/SCC.java: Optimization. * Analysis/Maps/UseDefMap.java, Analysis/SCC.java, Analysis/TypeInfo.java, Analysis/UseDef.java, TODO: Make usedef a separate map/class. * Analysis/Maps/TypeMap.java: javadoc typo fix. 1998-09-13 C. Scott Ananian * TODO: Decided not to rename harpoon.IR.*.Code classes, for now. * Util/HClassUtil.java: missing a close paren in javadoc. * IR/Bytecode/Code.java, IR/Bytecode/InCti.java, IR/Bytecode/InGen.java, IR/Bytecode/InMerge.java, IR/Bytecode/InSwitch.java, IR/Bytecode/Instr.java, IR/Bytecode/Op.java, IR/Bytecode/OpClass.java, IR/Bytecode/OpConstant.java, IR/Bytecode/OpField.java, IR/Bytecode/OpLocalVariable.java, IR/Bytecode/OpMethod.java, IR/Bytecode/Operand.java, NOTES/analysis, NOTES/misc, NOTES/testcase, ClassFile/HCode.java, ClassFile/HCodeElement.java, ClassFile/HCodeFactory.java, ClassFile/HMethod.java, TODO: Moved bytecode IR from harpoon.ClassFile.Bytecode to harpoon.IR.Bytecode. * GNUmakefile: Added '-Pd' flags to 'make update' rule. * TODO: checked off 'remove symtable package'. * .cvsignore: Added 'cvs-tmp' -- a makefile temporary file -- to ignore list. * Main/Main.java, Temp/ConstMap.java, Temp/Temp.java, Temp/TempMap.java, Temp/TypeMap.java, Util/FIFO.java, Util/HClassUtil.java, Util/UniqueFIFO.java, Util/UniqueStack.java, Util/Worklist.java, Analysis/Maps/ConstMap.java, Analysis/Maps/DefaultMap.java, Analysis/Maps/ExecMap.java, Analysis/Maps/TypeMap.java, Analysis/SCC.java, Analysis/TypeInfo.java, Analysis/UseDef.java, ClassFile/HClass.java, ClassFile/HCode.java, ClassFile/HCodeEdge.java, ClassFile/HCodeFactory.java, ClassFile/HMethod.java, IR/Properties/Edges.java, IR/Properties/UseDef.java, IR/Registration.java, TODO: Lots of changes to lots of the code. Would have checked them in separately, but I was away from the network. Let's see: 1) TODO list additions/completions. 2) Maps moved from harpoon.Temp.Temp to harpoon.Analysis.Maps. Interface changed to take an HCode rather than an HMethod. Changes made to harpoon.Analysis.SCC, harpoon.Analysis.TypeInfo, harpoon.Analysis.UseDef to accomodate this. 3) All subclasses of harpoon.IR.QuadSSA.Quad got a 'rename' method to take a harpoon.Temp.TempMap (new file) and rename the temps for that particular quad. 4) New harpoon.Util.Worklist interface to UniqueFIFO and UniqueVector. Idea here is to clarify the code & function of UniqueFIFO and UniqueVector. Changes to harpoon.Analysis.* to support this. (also renamed empty() to isEmpty() to protect my sanity). 5) Added some INSTANCEOF processing code to SCC. SCC needs to rewritten anyway, but this was a nice first draft. 6) New Registration interface to code. harpoon.IR.Register will register well-known IRs. static HMethod.register(HCodeFactory f) will register a new IR type. Changed all occurances of 'convertFrom' and friends (the old interface) to use the new interface via getCode. Much nicer now. 7) Added getRootElement() method to HCode. Changed all occurances of HCode.getElements()[0] to use the new method instead. 8) Added assertions HClass.forName and HClass.forDescriptor to ensure that the '.' and '/' confusion that showed up as a cross-platform bug running on Win95 has been well taken care of. 9) Added 'isSuperclassOf()' method to HClass. 10) New HCodeEdge class to complement HCodeElement. Change Quad implementation to use this. New ExecMap mapping taking HCodeElements or HCodeEdges. 11) New harpoon.IR.Properties interfaces for general properties (edges, use/def info) of IRs. Added edges() method to Quad. 12) Added harpoon.IR.QuadSSA.CleanUp class to pretty-up (make strictly correct) the QuadSSA graphs generated by Translate. 13) Removed evalValue(ConstMap c) method from OPER because it broke package encapsulation. 1998-09-11 C. Scott Ananian * TODO: new stuff. * TODO: fixed typo. * TODO: updated todo list. * Util/Util.java: Added 'shrink' and 'grow' to Util. Added remove() to PHI. * Analysis/TypeInfo.java: Modified this class to use Visitor pattern. * GNUmakefile: Add 'needs-cvs' rule for the benefit of those without CVS access. * .cvsignore: Started .cvsignore file to get rid of make update warnings about class file directories, documentation, etc. * TODO: Updated TODO. * Analysis/SCC.java, Util/HClassUtil.java, Util/Util.java: Made SCC functional (implemented merge method). New implementation of repeatString() in Util. * Util/HClassUtil.java, Util/Util.java: Added repeatString() method to Util. Added HClass utilities in HClassUtil. * Analysis/SCC.java, Analysis/TypeInfo.java, Temp/ConstMap.java, Temp/TypeMap.java: Changed ConstMap and TypeMap interfaces to take an HMethod argument; this allows us to lazily evaluate things when needed. Changed TypeInfo and SCC to use and implement this modified interface; the evalValue() method in OPER now needed an HMethod given to it in order to work properly. * Analysis/SCC.java: Documentation updates. * Analysis/SCC.java: First pass implementation of sparse conditional constant propagation analysis pass. 1998-09-10 C. Scott Ananian * Analysis/TypeInfo.java: Modified TypeInfo to use new UniqueFIFO class. * Util/FIFO.java, Util/UniqueFIFO.java: Split UniqueFIFO class into FIFO and UniqueFIFO implementations. * Util/UniqueFIFO.java: First-pass implementation of a 'unique fifo' class. * Util/UniqueStack.java, Analysis/TypeInfo.java: Added new UniqueStack class and changed Analysis.TypeInfo to use it. * TODO: updated todo. * Analysis/TypeInfo.java: Extremely simple-minded type analysis of an IR. Implements TypeMap. * Analysis/UseDef.java: useSites now returns a zero-length array if no use sites exist. * ClassFile/HField.java, ClassFile/HMethod.java: Added isStatic() methods to HField and HMethod. * Analysis/UseDef.java: Added allDefs() method. * Analysis/UseDef.java: Added simple class to find use and definition sites for Temps. * TODO: updated TODO * ClassFile/HClass.java: HClass.forClass did not work properly for array or primitive types. It should be fixed now. * Temp/ConstMap.java: Fixed interface. 1998-09-09 C. Scott Ananian * ClassFile/HMethod.java: bug in getParameterNames: wasn't handling two-slot types correctly (longs and doubles). Fixed now. * GNUmakefile: Added harpoon.tgz to 'clean' rule. * GNUmakefile: Added 'only-me' rule to simply *-install rules. * GNUmakefile: Added 'tar' rule and a set of 'install' rules. 1998-09-04 C. Scott Ananian * GNUmakefile: Have fun with fortune. * TODO: Updated TODO list. * TODO: updated todo list. 1998-09-03 C. Scott Ananian * Util/UniqueVector.java: Ack! The contains() method was *completely broken*! It's fixed now. 1998-09-02 C. Scott Ananian * TODO: updated ToDo list. * Temp/Temp.java: Added what may be a misguided method to rename Temps. * Main/Main.java: PrintWriter are invisible unless they are flushed. 1998-09-01 C. Scott Ananian * Main/Main.java: Added code to print the Quads of declaredMethods. * GNUmakefile: Added funky 'make first' rule. * GNUmakefile: Added Harpoon.jar to clean rule. * GNUmakefile: Added 'jar' target. 1998-08-26 C. Scott Ananian * NOTES/martins-crazy-ideas: Warehouse for Martin's Crazy Ideas. * GNUmakefile: Broadened the mind of my Makefile to accomodate developers who are not me. * Temp/Temp.java: Reimplemented slightly. 1998-08-25 C. Scott Ananian * TODO: thoughts on Quads. * TODO: Added testcases I want to be sure to check out. 1998-08-24 C. Scott Ananian * ClassFile/HMethod.java: Added isInterfaceMethod() method. * TODO: Updated TODO. * Temp/Temp.java: Fixed bugs. Temp(null) is no longer valid. 1998-08-22 C. Scott Ananian * Temp/Temp.java: Added a new constructor to generate like-named temps. * TODO: updated todo list. 1998-08-21 C. Scott Ananian * TODO: Updated todo list. 1998-08-20 C. Scott Ananian * ClassFile/HClass.java: Added 'static' to Primitive interface definition. Makes things a touch more efficient. 1998-08-19 C. Scott Ananian * Temp/Label.java, Temp/LabelList.java: Got rid of label/labellist. * Temp/ConstMap.java, Temp/Temp.java, Temp/TypeMap.java: Removed strong typing from Temp.Temp; added ConstMap and TypeMap interfaces to disclose type and possible constant values of temporaries. 1998-08-08 C. Scott Ananian * GNUmakefile: Cleaned up the 'ALLPKGS' definition. * ClassFile/HArrayConstructor.java, ClassFile/HArrayField.java, ClassFile/HArrayMethod.java, ClassFile/HClass.java, ClassFile/HConstructor.java, ClassFile/HField.java: Completed support for phantom array methods/fields/constructors. Added getConstant() method to HField to fetch value of constant fields. * ClassFile/HClass.java: Hid superclass constructors from getMethods(). Added code to give arrays get/set methods, and to report the correct signature for clone(). * NOTES/ir: Added more details on array representation as HClass. * ClassFile/HArrayMethod.java, ClassFile/HClass.java, ClassFile/HMethod.java: Straighten out version number discrepancy. * ClassFile/HArrayMethod.java, ClassFile/HClass.java, ClassFile/HMethod.java: HClass: fixed a bug that was omitting methods of array's superclass Object. HMethod: Added constructor to allow HArrayMethod to subclass HMethod and override most of its methods. HArrayMethod: created class to represent 'phantom' methods of arrays. Bytecode.Code: Added methods to interrogate max_stack, max_locals, and exception_table. * NOTES/ir: Added details on array support. 1998-08-07 C. Scott Ananian * TODO: updated. * Util/Util.java: Removed QuadList class. Added 'assert' method to Util.java * Main/Main.java: Implemented basic skeleton of Quad objects. Added a bare-bones Main method, basically just encapsulating the idea that Thread object names are given on the command line. * Util/Util.java: Moved string escape function here. * prj.el: Updated prj.el to use user-mail-address *variable* instead of *function*. * prj.el: Use user-mail-address in top comment block. * TODO: Updated TODO. * GNUmakefile: Updated Makefile to: 1) use the new munge/unmunge tools that are pipe-safe. 2) do the right thing with the new silicon.* packages. * bin/munge, bin/unmunge: Make munge/unmunge pipe-safe. * JavaChip/Interface.java: Added first skeleton of the java chip implementation. * bin/munge, bin/unmunge: Moved munge and unmunge tools into the source tree. 1998-08-06 C. Scott Ananian * NOTES/analysis, NOTES/misc, NOTES/testcase: Some more notes from the drive to Princeton today. 1998-08-05 C. Scott Ananian * GNUmakefile: hmm. backup rule doesn't work unless we're on lesser-magoo. i'll have to fix that someday. * GNUmakefile: Changed jdk docs path to hopefully make it more portable between platforms. * GNUmakefile: Added 'update' rule to makefile for the times I confuse 'make' and 'cvs'... * IDEAS: Added new-line to end of file. * TODO: Added newline to end of file. * NOTES/bytecode-to-ssa, NOTES/exceptions, NOTES/final-methods, NOTES/ir: Added newlines to end of files that needed them. Updated IR with the names of the abstract classes corresponding to the bytecode categories. * Temp/Temp.java: Modified Temp so it doesn't use the defunct harpoon.Type.* classes anymore. * prj.el: Configuration file for the JDE emacs java development environment. 1998-08-04 C. Scott Ananian * NOTES/ir: more thoughts on the ir. * NOTES/final-methods, NOTES/ir: Some notes on intermediate representation of bytecodes, and optimization of final methods. * ClassFile/HCodeElement.java: Documentation updates. * GNUmakefile: Refined 'clean' and 'polish' rules to clean things up better. * TODO: updated. 1998-08-03 C. Scott Ananian * TODO: Updated TODO list. * ClassFile/HClass.java: Fixed bad bug in isPrimitive(). In attempting to optimize it, I broke it completely. It's back to the way it was before now. * ClassFile/HMethod.java: Added a method to return the descriptor field of an HMethod. * ClassFile/HField.java: Added a method to return the descriptor string for an HField. * ClassFile/HClass.java: Changed "NoSuch*Exception"s to "NoSuch*Error"s, which better reflects their status in this compiler project. Added method to get an HMethod by name/descriptor. * ClassFile/HClass.java: Added getWrapper() method. * ClassFile/HCode.java: Added pretty-print method to HCode. * NOTES/bytecode-to-ssa, NOTES/exceptions: Added NOTES to CVS. We can now delete them when we're done with them without removing all record of their existence. * GNUmakefile: Make cvs be quieter so the diff doesn't scroll so far off the screen before commit. * ClassFile/HMethod.java: Always call putCode with bytecode representation, even for interface methods. * ClassFile/HClass.java: Fixed pretty-print output to properly display class initializer class. Used javap output as a guide here. * Util/Util.java: Disabled constructor. Made methods and class final. * GNUmakefile: Filtered out @see warnings from javadoc messages. Filtered out .#*.java temporary files from $(ALLSOURCE) * GNUmakefile: Added a few lines to 'make commit' to show us what changes we are committing. * Util/Util.java: Added general array copy method. * ClassFile/HCodeElement.java: Working on Bytecode.Instr classes. * IDEAS: Added quick description of java-to-java exception unthrower. 1998-08-02 C. Scott Ananian * ClassFile/HCode.java, ClassFile/HCodeElement.java, ClassFile/HMethod.java: javadoc'ing. * GNUmakefile: Added handling of scp options. I like the -A flag. * TODO: added this to CVS, so I can freely delete items that have been done. Records are left in CVS. * IDEAS: added a coupla ideas. * IDEAS: first draft of running ideas document for longer-term research goals. * ClassFile/HClass.java: Simplified isPrimitive() method using an inner interface class. Fun! * ClassFile/HCode.java, ClassFile/HCodeElement.java, ClassFile/HMethod.java: Cleanup to HMethod. Changed get/putCode methods in HMethod to use HCodes. Changed docs in HCode and HCodeElement. * ClassFile/HCode.java, ClassFile/HCodeElement.java: Implemented HCode and HCodeElement interfaces. * ClassFile/HClass.java: verified an assertion. * ClassFile/HClass.java, ClassFile/HMethod.java: Added accessor methods for formal parameter names, and added this information to the print() method of HClass. * ClassFile/HClass.java: Added getSourceFile() method to access AttributeSourceFile information. * ClassFile/HMethod.java: Added comment: "interface methods don't have code attributes" which I determined experimentally. * ClassFile/HField.java, ClassFile/HMember.java, ClassFile/HMethod.java: Added an isSynthetic() method to check for the present of the Synthetic attribute. * GNUmakefile: Added 'wc' target. 1998-08-01 C. Scott Ananian * ClassFile/HClass.java: Fixed thinko in forDescriptor: descriptors are supposed to have '/'-delimited class names. * ClassFile/HClass.java: trivial doc change. * GNUmakefile: Fixed makefile bug --- munge|unmunge as a pipeline breaks because we start overwriting the file before we're done reading it. I fixed this. * ClassFile/HClass.java: Added print() method to pretty-print this class, its fields, and its method declarations in java source form. * ClassFile/HMethod.java: Added getCode and putCode methods. * GNUmakefile: Added munge/sed/unmunge sequence to doc rule to properly format my email address, and get rid of javadoc brokenness on the @see "string" constructs. * ClassFile/HClass.java, ClassFile/HConstructor.java, ClassFile/HField.java, ClassFile/HMember.java, ClassFile/HMethod.java, ClassFile/Loader.java, Temp/Temp.java, Util/UniqueVector.java: Undo previous global change (don't like how it looks). * ClassFile/HClass.java, ClassFile/HConstructor.java, ClassFile/HField.java, ClassFile/HMember.java, ClassFile/HMethod.java, ClassFile/Loader.java, Temp/Temp.java, Util/UniqueVector.java: Changed brackets in my email address uniformly to parentheses, so that they are HTML-friendly. * ClassFile/HConstructor.java, ClassFile/Loader.java: Added my name to the javadoc comments (forgot before!). * Util/UniqueVector.java: Fixed some javadoc errors. * GNUmakefile: Fiddled with makefile rules a bit. * ClassFile/HClass.java: Added method to access the class initializer, if present. * ClassFile/HClass.java, ClassFile/HConstructor.java: Added constructor objects. Diverged from java.lang.reflect.* functions in not masking constructors in getMethods(), etc calls. * GNUmakefile: Got rid of annoying standard error on cvs-add. * GNUmakefile: Added cvs-add to cvs-commit rule. * ClassFile/HClass.java: Finished implementation of HMethod (I think). * Util/UniqueVector.java: Created a new utility class for vectors that resemble ordered sets. * ClassFile/HClass.java, ClassFile/HField.java, ClassFile/HMethod.java: Fixed discrepancies between java.lang.reflect.Fields and HFields. Stomped on a few bugs. Worked some on HMethods. * GNUmakefile: Added cvs-add and cvs-commit rules to make sure I don't forget to check in any source files. 1998-07-31 C. Scott Ananian * ClassFile/HMethod.java, ClassFile/HClass.java, ClassFile/HField.java: Implemented HMethod. * GNUmakefile: Filter out *.Test packages from javadoc. * ClassFile/HField.java: Fixed one-letter typos. * ClassFile/HClass.java, ClassFile/HField.java, ClassFile/HMember.java: More work on class file wrappers. Have implemented fields. Only HMethods and HConstructors left to go... * ClassFile/HClass.java: Implemented most of the HClass methods, drawing from java.lang.Class. The methods dealing with HMethod and HField objects have not yet been implemented. * ClassFile/HClass.java, ClassFile/Loader.java: Started writing clean wrapper around the raw classfile functions, based on java.lang.Class and java.lang.reflect.* * GNUmakefile: got rid of javamake.sh, which wasn't doing the right thing any more. * GNUmakefile: Touched up makefile to support multiple levels of nested packages. * ClassFile/LineNumberTable.java, ClassFile/LocalVariableTable.java: Revised calling conventions, added documentation, extended to provide write support. Renamed packages. 1998-07-30 C. Scott Ananian * ClassFile/LineNumberTable.java, ClassFile/LocalVariableTable.java: Importing sources from first-pass compiler. Will modify heavily to regularize code. * ClassFile/LineNumberTable.java, ClassFile/LocalVariableTable.java: Botched source import. Removing to try again. 1998-07-29 C. Scott Ananian * GNUmakefile: Fixed backup rule to not use non-standard .tgz extension. 1998-07-28 C. Scott Ananian * GNUmakefile: Added 'backup' rule. * Temp/Label.java, Temp/LabelList.java, Temp/Temp.java, Temp/TempList.java, GNUmakefile: Imported more packages from first-draft source. Renamed packages to add 'harpoon.' prefix. I know sun recommends edu.mit.lcs.harpoon.* but this is MUCH too cumbersome. Moved base types to harpoon.Type.Basic package. ...edited source some to accomodate this... Hacked GNUmakefile to work with new directory structure. * Temp/Label.java, Temp/LabelList.java, Temp/Temp.java, Temp/TempList.java, GNUmakefile: Initial import of sources from first-pass Harpoon source. Most of these files are based on Appel's Tiger sources. 1998-03-20 C. Scott Ananian * ClassFile/LineNumberTable.java, ClassFile/LocalVariableTable.java: Imported sources * ClassFile/LineNumberTable.java, ClassFile/LocalVariableTable.java: New file.