History log of /dalvik/dx/src/com/android/dx/dex/code/OutputFinisher.java
Revision Date Author Comments
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
f870f2dce9300c8dec620613371f08e5c234245b 16-Oct-2012 jeffhao <jeffhao@google.com> Add dx option to always generate const-string/jumbo.do not merge.

This allows large dex files with many strings to be merged properly.

(cherry picked from commit 266f45ff7da18022faf5f77df76c69f8cdad313f)

Change-Id: I5fe4c55d84a91101a4f89f590117aa6dc0bfc0f2
9db54b1e21b8e994658890328e57caa822e444a7 16-Oct-2012 jeffhao <jeffhao@google.com> Add dx option to always generate const-string/jumbo. do not merge.

This allows large dex files with many strings to be merged properly.

(cherry picked from commit 266f45ff7da18022faf5f77df76c69f8cdad313f)

Change-Id: I0277b1a0a81b3a77092a9e9f8f648ff190e29723
69dd411c7ef47e3ea3f6ff8be9a4d903f545f0d5 16-Oct-2012 jeffhao <jeffhao@google.com> Add dx option to always generate const-string/jumbo. do not merge.

This allows large dex files with many strings to be merged properly.

(cherry picked from commit 266f45ff7da18022faf5f77df76c69f8cdad313f)

Change-Id: I5e85346610c4c5280ecdd9e97c63eaef4420642e
266f45ff7da18022faf5f77df76c69f8cdad313f 16-Oct-2012 jeffhao <jeffhao@google.com> Add dx option to always generate const-string/jumbo.

This allows large dex files with many strings to be merged properly.

Change-Id: I2c32b03ddb42735d16bc6155c1a1096159fb15ed
40c69d949e67fe2cc2cccf4dd16b2f9fdabea396 23-Aug-2012 Ben Gruver <bgruv@google.com> Correctly handle switches on values in a high register

When dx generates a switch on a value in a high register, it prepends a move
instruction, to move the value to a low register. However, this causes the
switch data pseudo-instruction to use address of the move instruction as the
base address of the switch targets, rather than the address of the switch
instruction

Change-Id: I0708d35ec3059c30221cd0a64f426244411d31ea
fc785c7597c477af84b273c8f191f33339f7735e 19-Oct-2011 Jesse Wilson <jessewilson@google.com> Provide debugging info should extended opcode lookup fail.

Bug: http://code.google.com/p/android/issues/detail?id=20814
Change-Id: Iedaf07721c29dd3d24827c3f7a953b7371c9735d
333201833d506a3accdeac6ceb7caba8d4b95797 13-Apr-2011 Jesse Wilson <jessewilson@google.com> Combine CstUtf8 and CstString.

The only benefit we were seeing is that one wrapped its toHuman
in quotes, the other didn't.

It was far too easy to use the wrong one. We had code defending
against that in NameValuePair and CstArray.

Change-Id: Ib2e6a1596b97decced37952d46e1831b7bcd0d5d
eba7057935e122d8a9234154ea97e3fa32452a4f 19-Apr-2011 Jesse Wilson <jessewilson@google.com> Change Type, Method and Field to be IDs rather than values.

This makes it possible to declare constants for types like
void and int.

http://code.google.com/p/android/issues/detail?id=6322

Change-Id: Ic0b6e7d9b89aba40457c3015b75ab24c413a6f33
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
3dfda9ad1964510e4a7948a240b30cd710e86341 17-Mar-2011 Dan Bornstein <danfuzz@android.com> Add --target-api=N option to dx.

This change adds the option and plumbs it into where it
needs to go, but doesn't add any code to take action on it.
That will come in a follow-up.

Bug: 4094709
Change-Id: I9c796e176e125b0bcee18af56d9e6da802dfa081
7ba91291bb6ce64691398a8751656207e8e3e98d 30-Jan-2011 Dan Bornstein <danfuzz@android.com> Move dx.dex.code.DalvOps -> dx.io.Opcodes.

This breaks a nascent circular dependency, keeping dx.io the lower layer.

Bonus: While I was in the territory, I clarified the data payload
opcodes, including adding explicit constants for them.

Change-Id: I8655064ebc3b5713cbb4a6c83bcc90984393701f
dd79e4e11fa20d6677b70ce6618a8653a1f3520d 17-Jan-2011 jeffhao <jeffhao@google.com> Optimized dx instruction expansion to only generate necessary moves.

When an instruction's fields do not fit into an instruction format, dx
expands the instruction. Before, this would always use new registers for
sources and destination, generating moves for each. However, some of
these moves would be unnecessary if an original register already fit
into the instruction format. This change checks to see if the original
register fits before using a new register and generating a new move.

Change-Id: I17c6722cf4053573bf913a28d631386f2c3a733d
380dc65454b24ee89274ed26b1188386ece7ccdc 04-Nov-2010 Dan Bornstein <danfuzz@android.com> Use the static opcode chains in dx.

This removes the need to iterate over all possible opcodes looking for
family/format matches whenever the need arises to rewrite an
instruction with a new opcode. This should speed dx up at least a
little, though I don't know if it will be measurable. It's certainly
cleaner and a bit simpler, though.

Change-Id: I779f19cb1249d30f6886faf76670ae37d5dfc402
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
077f9d75d9701778830742b9c2afad4742635b58 19-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132276
2ad60cfc28e14ee8f0bb038720836a4696c478ad 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution