fe107fb6e3f308ac5174ebdc5a794ee880c741d9 |
|
17-Sep-2011 |
Jesse Wilson <jessewilson@google.com> |
Mechanical refactoring of dx into two parts. This splits off a new package, com.android.dex that contains code for parsing and modelling dex files. This code is usable both at build time (for compilation and analysis) and at runtime (for introspection). The original package, com.android.dx is the tool that compiles .class files into .dex files. That package also includes utilities for merging and querying dex files, all visible to the dx command line application. In a follow up change I'll move the new com.android.dex package into the libcore/ project, and configure build rules so that it's included in both dx.jar and core.jar. The core.jar will then be able to use it for annotation processing. Change-Id: I3c58cf87e728e4dda1925a0992c1ee7b8130e81a (cherry picked from commit bab4abb07335d162ecdb8091fc395cf84803a580) Conflicts: dx/junit-tests/com/android/dx/util/BitIntSetTest.java dx/junit-tests/com/android/dx/util/BitsTest.java dx/junit-tests/com/android/dx/util/IntListTest.java dx/junit-tests/com/android/dx/util/ListIntSetTest.java dx/src/com/android/dex/Dex.java dx/src/com/android/dex/TableOfContents.java dx/src/com/android/dx/annotations/AnnotationAccess.java dx/src/com/android/dx/command/Main.java dx/src/com/android/dx/dex/code/OutputFinisher.java dx/src/com/android/dx/dex/code/form/Form32s.java dx/src/com/android/dx/dex/code/form/Form33x.java dx/src/com/android/dx/dex/code/form/Form41c.java dx/src/com/android/dx/dex/code/form/Form52c.java dx/src/com/android/dx/gen/DexGenerator.java dx/src/com/android/dx/merge/DexMerger.java
|
ed0fe6c2f310f8c2cc28c35c2b473d8de36db8a4 |
|
14-Apr-2011 |
Jesse Wilson <jessewilson@google.com> |
Bare-bones dex code generator. This is functional but incomplete. In particular, the following are still coming: - instructions for cast/instanceof/arrays/float comparison/try/catch - debug information - annotations The API is also incomplete. When this is done I'm going to remove the type parameters to see if that's a net win. I suspect it will be because generics currently hurt the ability to do assignments between unknown types - you can't currently assign from Label<?> to Label<?>, for example. I'm anticipating changes to the way Code instances are created. In the current API these are created without an attached method and later attached to a method with Method.declare(). This doesn't work very well, particularly since the code blocks don't know how many parameters they take, whether they're static, or what their return type is. I'm tempted to make declare() return a writable Code instance, or to simply combine the Code and Method classes. This code can benefit from more error detection. It's currently quite easy to do bad things with labels: use them on the wrong Code instance, reuse them, don't use them, etc. Better error checking is due here. Change-Id: I4fe20552f2c571e41bedba6ff9db6686688d97ee http://code.google.com/p/android/issues/detail?id=6322
|
38b61748553bd387bc36b6bd82a8667b6c5f5934 |
|
24-Mar-2011 |
jeffhao <jeffhao@google.com> |
Various dx fixes to make it preserve locals and debug info. The SCCP pass checks if a register has associated local info before attepting to prune branches or replace values with constants. Also, the register allocator reserves a register for each local in a method. This could be later improved by only reserving registers for the lengths of their lifetimes as specified by the local info table. Change-Id: I654ac014a9aac530f1db0db7d5cdef7535ff49bf
|
e1c3a8e2203881759efec3538cc654937de1d817 |
|
10-Feb-2011 |
jeffhao <jeffhao@google.com> |
Added support for integer division to SCCP. Division generates a result that must be fetched with a move-result-pseudo instruction. SCCP originally had no way of tying the division with the result it generates. This change should allow proper constant propagation when division of integers is involved. Change-Id: Ib7c5d2dd26eea3ab6545b613a540f0161a8e1642
|
b75d1ca580c6a6c7ebdc813dff2855205063fc46 |
|
08-Feb-2011 |
jeffhao <jeffhao@google.com> |
SCCP propagates more constants and prunes unexecuted paths from branches. The SCCP pass now more aggressively propagates constant values through the code. Combined with changes to the LiteralOpUpgrader, instructions with known constant results will be replaced with a simple const instruction. In addition, the SCCP pass can now find branches with constant conditions and remove the branch path that never ends up being executed. Because of the way finally blocks end up being replicated, this tends to prune away error handling when no exception occurs, and hard code error handling when an exception happens. Change-Id: I6f3330151ec387c8a1e7ce098ff6cdb8d0ce5606
|
de75089fb7216d19e9c22cce4dc62a49513477d3 |
|
09-Jun-2010 |
Carl Shapiro <cshapiro@google.com> |
Remove trailing whitespace. Change-Id: I95534bb2b88eaf48f2329282041118cd034c812b
|
72e93344b4d1ffc71e9c832ec23de0657e5b04a5 |
|
13-Nov-2009 |
Jean-Baptiste Queru <jbq@google.com> |
eclair snapshot
|
99409883d9c4c0ffb49b070ce307bb33a9dfe9f1 |
|
19-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import //branches/master/...@140412
|
f6c387128427e121477c1b32ad35cdcaa5101ba3 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
|
f72d5de56a522ac3be03873bdde26f23a5eeeb3c |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
|
2ad60cfc28e14ee8f0bb038720836a4696c478ad |
|
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
|