| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
- Test 034 requires that a dex file is dumped in a human readable form
even if the dex file does not contain ClassDef.
Consequently, the command line behavior is modified to satisfy this requirement.
(cherry-pick from commit 64f4aad1e6ef58b29f860b59512ca1a676ac6eb8)
Change-Id: Id64b563745db2b22ec98fba9be25413192c07719
|
|
|
|
|
|
|
|
| |
- This support was removed one year ago.
(cherry-pick from commit 18b65cbb3ec6634618bd3240a692507432e634b5)
Change-Id: I1154e518dc8a15220f2fcb163056570030492bb0
|
|
|
|
|
|
|
|
|
|
|
| |
Synchronized blocks were using different locks.
Replaced by a safer version: marking intern method synchronized.
This means synchronizing more than necessary but it had no
mesurable perfomance impact.
Bug 11744785
Change-Id: I35e691232cd6971d13735be9b72969739ef71e09
|
|
|
|
|
|
|
|
|
|
|
| |
This restores the old message, replacing "ids" by "references" and
advertising for multidex otpions.
Updates dalvik/tests/089-many-methods accordingly.
(cherry picked from commit d352de04f03b848e0246119344ea13e7233018f0)
Change-Id: I5934bc9fb7812b66c0e38935946cacdf1c35a402
|
|
|
|
|
|
| |
(cherry picked from commit 39bcbf75923303d209b7e6640590cd7f5eaaa65a)
Change-Id: Iaddb2020b75f2bbba2e2ebda3a4465a890e361ca
|
|
|
|
|
|
|
|
|
|
|
| |
- Classes in archives were added in all dexes.
- Adding resources could be done twice in non "strictNameCheck" mode
(when using BestEffortMainDexListFilter) if there was 2 secondary
dex.
(cherry picked from commit ad27e19691c6723a801b127f8802f5cdf4f44359)
Change-Id: I5cbc1b273518e868fdd3d642d50488ddcbec2af6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add --multi-dex options to dx command line to allow the generation of
several dex files when method index limit is about to be reached.
Also add
--main-dex-list allowing to force some classes in the main dex.
--minimal-main-dex to keep in main edx only classes specified by
main-dex-list.
--set-max-idx-number to set an arbitrary idx limit for the
splitting.
(cherry picked from commit c7daf656da3a4854296b6a8bb702e3ee418450e5)
Change-Id: I2b42272be91484a75783eb94cd30581159948975
|
|
|
|
|
|
|
| |
http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html
Bug: https://code.google.com/p/android/issues/detail?id=58359
Change-Id: I1601cda215ebc5995117323e40a684ad352fe733
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changing directory to that of dx.bat prevents dx.bat from being
used with relative directories. This leads to all sorts of
issues integrating it with build systems that expect this to
work.
I've tested that this change works under the following conditions:
1. Android SDK in a path containing spaces.
2. java.exe in a path containing spaces.
3. Java object files in a path containing spaces.
4. Output jar file in a path containing spaces.
5. Java object files specified with relative paths.
6. Java object files specified with absolute paths.
7. Output jar file specified with relative paths.
8. Output jar file specified with absolute paths.
Change-Id: I1b47a6cc73169607cc6238acf197e3b467c9bcbc
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
If an invokedynamic is present, an exception is thrown.
(cherry picked from commit 94629f2a31206637fc79535ffef1b223e9f02e30)
Change-Id: I1922d4cf78465dfd2ac53f8694b7317a1d98016d
|
|/
|
|
|
|
| |
(cherry picked from commit 593a7233e13d6eeb8ae5d894e29c6a27cbc7b7f0)
Change-Id: I6421f95ceb97a596a19781e46cb4767bfb21cdbd
|
|
|
|
|
|
| |
(cherry picked from commit a659fe6f8a0b7d32eafc9a2ff7aa1387702da053)
Change-Id: I7c93e7d45b52655cd7adfdc3fc783757ee71079b
|
|
|
|
|
|
| |
(cherry picked from commit d8760772c49647ab197c34b8e46438c410decb42)
Change-Id: I092ff646b02abf7b3ee6285361e4e256c1ade37d
|
|
|
|
|
|
| |
(cherry picked from commit f9f7020a0a181ffba3bb9ed123f5bb211a61738e)
Change-Id: I2dd875399c2d30d214b6a025ffea995155ff48c1
|
|
|
|
|
|
|
|
| |
- Bad register usage to compute prefix or suffix expansion.
(cherry picked from commit 5bce02865087b7ec3c6321a1bef9542c18b0f90e)
Change-Id: Ife9b2b07870bbc933f959c194a4a72dfa9507cfb
|
|
|
|
| |
Change-Id: Ib2076dedc066dab0f71b038d84edd6b60565c211
|
|
|
|
|
|
|
|
| |
This is a second attempt to cherry-pick
4cd7b39876bcec03bb1d0c2afa61cbdb7d119eba
because a couple things didn't come through last time.
Change-Id: I12e5340f0504c1d875d3e4bbe23d8d5506f72fe6
|
|
|
|
|
|
| |
(cherry picked from commit 4f00f32e39f04b5b7ba6684ee3914d9904a139d5)
Change-Id: I86cedb9f48bbb8f7f1945f86b9e10bc2f37a24b9
|
|
|
|
|
|
| |
(cherry picked from commit cb9dfa123c6fcc43be629666837c4e6f86b476ea)
Change-Id: I071d73adc4a2eb812cdbc204d27884f4a527043d
|
|\ |
|
| |
| |
| |
| |
| |
| | |
(Cherry-picked from c26c1291743ce7877cf11f3dc73d6f0c240229f7)
Change-Id: I57a7678178fc58e2a101c9d86da5009c6ec4f6a0
|
| |
| |
| |
| |
| |
| |
| |
| | |
Change-Id: Ifd3672027d075b6c9f8df208a04bc33122c883af
(cherry picked from commit f8357511efd16d76ce4410459c15dbb08b0140b6)
Conflicts:
dx/src/com/android/dx/merge/DexMerger.java
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change-Id: If0022a069ba3ac51ae5cdc4b0eabb6b913cd8afe
(cherry picked from commit 7b13a4d41243f81fe80a76e2ff2f877b53610446)
Conflicts:
dx/src/com/android/dex/Code.java
dx/src/com/android/dex/Dex.java
dx/src/com/android/dex/SizeOf.java
dx/src/com/android/dex/TableOfContents.java
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| | |
(cherry picked from commit 4ec022b0b6c84f994ab2fc78934110ad96d0bdec)
Change-Id: Ia420b7661f372c59af8fe62bdab7982a1d2b008f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously primitive values were treated as opaque byte arrays.
Now the encoded values can be interpreted as their proper types:
integers, indices, floats, chars, etc. This gets complicated
pretty fast due to the dense packing dx performs when encoding
the values.
The encoding code is moved from ValueEncoder. The decoding code
is ported from C++ to Java from Annotation.cpp.
There's a bunch of new tests to make sure the decoding is correct;
porting from C++ to Java was tricky because of the '>>' shifts on
unsigned values. The test input data is generated by dex!
Change-Id: I83b2fc3e16115d667fa94b3dab782d1a9687f3ad
(cherry picked from commit 27847605b9255358f0577ffec28886c450263898)
|
|/
|
|
|
|
|
| |
See exception reported on this thread:
https://groups.google.com/d/msg/android-contrib/h0sDMo5DVBI/MAMiBv5XR44J
Change-Id: I867a8d2328b32625e5baa0b029f55e373fe11271
|
|
|
|
|
|
|
|
| |
We were silently truncating, which made an obvious problem
into a non-obvious one.
Bug: http://code.google.com/p/android/issues/detail?id=40409
Change-Id: I15576357c72ac0e98cf85c0a1d289fd5009468f9
|
|
|
|
|
|
|
|
| |
This allows large dex files with many strings to be merged properly.
(cherry picked from commit 266f45ff7da18022faf5f77df76c69f8cdad313f)
Change-Id: I5fe4c55d84a91101a4f89f590117aa6dc0bfc0f2
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In dex files, there are several places where one object refers
to another object by its position in the file. The dex merger
is generally very careful to adjust these mappings when combining
dex files.
Unfortunately one of these cases was broken. Each try_item refers
to a corresponding encoded_catch_handler by its byte offset in a
list. Most of the time this byte offset is the same in the input
dex file and the output dex file. But encoded_catch_handlers are
variable-length because they use a variable-length uleb128 encoding
to address the type_idx being caught. When dex files are merged,
some exception types may go from having a small index to having
a large index, increasing the number of bytes required to encode
that index. This breaks our ability to directly copy over offsets
as we were doing previously.
Bug: http://code.google.com/p/android/issues/detail?id=36490
Change-Id: I3bdadf20899fdb5d4d074e69103b33c0404a31f8
|
|/
|
|
|
|
|
|
|
|
|
| |
I'm not sure where the 1.34 number comes from but it's incorrect.
From the spec, the encoded_annotation is made up of a single byte
plus an unlimited number of uleb128 values. Each of these values
can double in width in the worst case. I received (personal) email
from one user who'd run into a case worse than the incorrect 1.34
limit.
Change-Id: I3b676e6d2b274aaa538ca61ce23945b3d49aff04
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Previously debugInfos' size of 0 caused a malformed dex file
because debug data was present but not mentioned in the table
of contents.
Change-Id: I07171aaee12fef9f303fc505909f44ef1a714114
|
|/
|
|
| |
Change-Id: I1f9813c9dc1dfc388f82f37584fe60256b6a8b12
|
|\
| |
| |
| |
| | |
* commit 'effc95cb732d8d5453930e647240a1665b6dc71a':
Make dex merging stateless.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is required to run dx in Eclipse which doesn't unload the dx
library after each run.
(cherry-pick of 7aa5ce7e990dc3766eba97cd0932b62e4de21503.)
Change-Id: I7a69a3015d448ddd5558c307cd01346156cbc739
|
|\|
| |
| |
| |
| | |
* commit 'a9ac3a9d1f8de71bcdc39d1f4827c04a952a0c29':
Support debug info in dexmerge.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug: 4090053
(cherry-pick of bc23c4f3ebaefebb3f1be7732767631f91e165ea.)
Change-Id: I1108933fc03330ff91be3a2edef8b4966977dcd7
Signed-off-by: Jesse Wilson <jesse@swank.ca>
|
|\|
| |
| |
| |
| |
| |
| | |
byte aligned size"
* commit '92ab8d5069c51de75903a5b4768d4d94563bceb1':
Compact merged dexes on their byte aligned size
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, if a merged dex had too much free space, the compaction step
would subtract the unused space from the section sizes generated by
adding the merged dexes section sizes. The merged sizes weren't 4-byte
aligned, which meant if a section had been bumped in size for the
boundary, the compaction would fail when loading into a section eg
'Section limit 3665072 exceeded by string data'.
This gets the compacted section size from the actual used space instead
of from the non-aligned estimate, so everything fits.
Change-Id: I1aee1abd721ec21998bb3ea78f6f424e7421b614
|
| |
| |
| |
| |
| |
| |
| |
| | |
Apparently there is some situations where a single static value
may be referenced by multiple sites. Not transforming them eagerly
lead to oversized dex files (and could crash the merge).
Change-Id: I4ac5b9cd621b0fff1e5ba247c9590aa0d562cd65
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Here's what the new message looks like:
trouble writing output: Too many fields: 88304; max is 65536. By package:
10 dalvik.annotation
278 dalvik.bytecode
81 dalvik.system
94 dalvik.system.profiler
111 java.awt.font
12 java.beans
322 java.io
519 java.lang
20 java.lang.annotation
13 java.lang.ref
72 java.lang.reflect
72 java.math
...
Change-Id: Ieea7efb178522d9ac3cb10c5a6cfb453be3fd72d
|
| |
| |
| |
| |
| |
| |
| | |
External developers were starting to try to get themselves into trouble with
this stuff...
Change-Id: I2b03bfeaa8c98b6a994bc7924fc8dcf4e4d4f6cb
|
| |
| |
| |
| |
| |
| |
| | |
This now lives as a standalone project:
http://code.google.com/p/dexmaker/
Change-Id: I4f7abff9399d6827082c9af78a015562fdbcdbb3
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- ProxyBuilder is to concrete classes what java.lang.reflect.Proxy is to
interfaces.
- Uses a builder pattern to make specifying of the various (optional)
parameters easier.
- Creates a concrete subclass of the supplied input class whose
implementation delegates to the given invocation handler.
- Also provides a fix for the Code#loadConstant method to allow loading
null values.
Change-Id: I3ca6a98b91c64466df03120bc85f095365250aca
|
|\ \ |
|