summaryrefslogtreecommitdiffstats
path: root/dx
Commit message (Collapse)AuthorAgeFilesLines
* Ensure deterministic multidex partitioningYohann Roussel2015-09-011-1/+2
| | | | | | | | This is done by sorting inputs before processing them. Bug: 23305646 Change-Id: Ia55c481f4eb342bc925bc100299324ea470bf9a0
* Keep annotated classes in main dex listYohann Roussel2014-12-0111-202/+410
| | | | | | | | | | | Only classes annotated with a runtime visible annotation are to be kept. See https://code.google.com/p/android/issues/detail?id=78144 Bug: 18385117 (cherry picked from commit 893795fc95fdd77d398ebb77a0fe336c45b596cf) Change-Id: I46ceef4aab5119ba4515a07e8f17577e15931dbd
* Keep --input-list order.Xavier Ducrohet2014-11-131-6/+7
| | | | | | | | | | | | Merging dex files starting with smaller ones can have a big impact on performance as it potentially reduces the number of compact events during the merge. Gradle will now send the list sorted in ascending order of file size, and dex should keep this order when parsing the input list file. Change-Id: Iff3ae4d30106fe70dca0764b33addfecceb84d09
* Add +x on mainDexClasses.Xavier Ducrohet2014-10-311-0/+0
| | | | Change-Id: Iaea2a8ec163cdfc50a5647e4071735675eee3481
* Merge "Bump dx version to 1.10" into lmp-devBenoit Lamarche2014-09-091-1/+1
|\
| * Bump dx version to 1.10Benoit Lamarche2014-09-091-1/+1
| | | | | | | | | | | | | | | | | | This new version should include the following fixes: 8863d0fd24b293032a7e749e89b6f36524e0ff4f (Bug: 16709921) 0ab4f7a318db3635c870ac50b669085312feb567 (Bug: 17438982) (cherry picked from commit 70df3df67bd1076177072110d643c618f51789a2) Change-Id: I986804c02ba807dac5bbfc9a280e0c0f5a684419
* | Merge "Fixes command line too long error on Windows" into lmp-devBenoit Lamarche2014-09-092-7/+31
|\ \
| * | Fixes command line too long error on WindowsJohn Fazekas2014-09-092-7/+31
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows machines the command line can only accept commands that are 8192 characters or less. This can cause a problem when a project has many dependencies and many libraries are being passed to dex at once. This fixes it by adding a new option to dex called --input-list that can read inputs from a file. This way we only have to pass a single file name instead of a ton of jar files. This keeps the command short so Windows will not complain about it. Bug: 17438982 Signed-off-by: John Fazekas <jfazekas@fd-software.com> (cherry picked from commit 914f2263ca57b21dc4ef1fb218e345a16a5a5db5) Change-Id: I6edd1e7c1d1fddc8d6bf4c4963295d4f4e64032e
* / Replace == between class constants by ".equals"Benoit Lamarche2014-09-081-2/+2
|/ | | | | | | | | | This is needed since class constants may not be unique. Indeed, there may be multiple identical class contants in the constant pool. Bug: 16709921 (cherry picked from commit 8863d0fd24b293032a7e749e89b6f36524e0ff4f) Change-Id: I63c07ebf03d67eb942aec6364c7e02c631744612
* Add libcore src to the dx docs module.Ying Wang2014-09-041-3/+8
| | | | | | | | This fixed bogus docs build errors like: dalvik/dx/src/com/android/dx/io/DexIndexPrinter.java:19: error: package com.android.dex does not exist Change-Id: I3217a51c1562194974410c54f936c0713455a93c
* Do not align 64-bit registers during instruction expansionmikaelpeltier2014-07-292-51/+6
| | | | | | | | | | - The reordering performs during instruction expansion is not correct for all instructions, in particular for xxx/range instructions that require sequential registers. (cherry picked from commit 26a4440a703ed98d19b2b77b4398ad42e8367f5d) Change-Id: Ida3c8a1abfb78a7b119c463b19030572d3fbc40e
* Merge "Do not generate empty dex in multidex." into lmp-devYohann Roussel2014-07-242-2/+5
|\
| * Do not generate empty dex in multidex.Yohann Roussel2014-07-252-2/+5
| | | | | | | | | | | | | | | | | | | | This was possible when the first class considered for adding in a dex was too big to be sure it will fit. Now DX will try to add the class in the current dex and crash if the class causes one index to overflow. (cherry picked from commit f15dafe674d2270cafaf4fb7993963ec474d3761) Change-Id: I323f8111c2be6bace908d0539ff324c4bd033c05
* | Renumber dx test multidex-option-overflow to 128.Yohann Roussel2014-07-233-0/+0
|/ | | | | | | | Because there were 2 tests 123. (cherry picked from commit d3fb68891cffc4e43cff49d46e30d511dc6f1315) Change-Id: Ic6df7590ab32893a40e42ea145d04c64cc265308
* Fix bad debug info due to 64-bit registers alignmentmikaelpeltier2014-07-215-1/+55
| | | | | | | | | | - Registers of LocalStart and LocalSnapshot must also be shift when it is required. Bug: 16344305 (cherry picked from commit 32631e6ee656840701f76e0d736290bfcd4aab7e) Change-Id: Ic437ed4102ad0fbeccc069df0f44cb2d774ff27d
* Remove LocalEnd since it is not usedmikaelpeltier2014-07-212-93/+0
| | | | | | | | Bug: 16344305 (cherry picked from commit 45778955d5383f750db6350a851b657075bfea84) Change-Id: Ic607ffda267d8c61ae0a943747b770ac4c8b460d
* am 388f055a: am 46cf2623: Merge "Align 64-bit registers on even dalvik ↵Ian Rogers2014-07-088-67/+398
|\ | | | | | | | | | | | | registers" * commit '388f055aeaff51493d8e570c872afabde16f66f8': Align 64-bit registers on even dalvik registers
| * am 46cf2623: Merge "Align 64-bit registers on even dalvik registers"Ian Rogers2014-07-088-67/+398
| |\ | | | | | | | | | | | | * commit '46cf26234d9d0a3f9b95e79479c3447e9a5c7e14': Align 64-bit registers on even dalvik registers
| | * Merge "Align 64-bit registers on even dalvik registers"Ian Rogers2014-07-078-67/+398
| | |\
| | | * Align 64-bit registers on even dalvik registersmikaelpeltier2014-05-138-67/+398
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following alignments are done during register allocation - Align 64-bit registers that are not parameters by modifying the method giving the next free register to take into account alignment constraints. - Align the first register of a range to maximize the number of 64-bit registers that will be aligned into the range. The following alignments are done during instruction massaging - Mov instructions inserted to transfer registers which are not compatible with the selected instruction will use even registers for 64-bit registers - Insert the right number of registers during instruction massaging in order not to break alignment done by the register allocator - Align parameters to maximize the number of 64-bit register aligned. Change-Id: Iaac6d7038f33699e9d9897b95d923297c72e20c6
| * | | am 3b1d953b: Merge "Force dx compilation target to java 6."Yohann Roussel2014-06-031-0/+4
| |\| | | | | | | | | | | | | | | | | | * commit '3b1d953b3d5366bd550335ad373ed354067d85fc': Force dx compilation target to java 6.
| | * | Merge "Force dx compilation target to java 6."Yohann Roussel2014-06-031-0/+4
| | |\ \
| | | * | Force dx compilation target to java 6.Yohann Roussel2014-06-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we want it to be executable on a java 6 runtime. (cherry picked from commit bb57b6e032652f835b03414e22e52904ad6ba458) Change-Id: I35422d5a2768f8d1c0426d6416cb95419e51d6d1
| * | | | am f3d79371: am 10bd97f0: Merge "Split multicatch so they have different ↵Yohann Roussel2014-06-021-57/+160
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handlers." * commit 'f3d79371d9908558ac32fe41c4f3cf2900e1c281': Split multicatch so they have different handlers.
| | * | | am 10bd97f0: Merge "Split multicatch so they have different handlers."Yohann Roussel2014-06-021-57/+160
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit '10bd97f0dd9a521d0bf681b6922f7d0657977d26': Split multicatch so they have different handlers.
| | | * | | Split multicatch so they have different handlers.Yohann Roussel2014-06-021-57/+160
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a workaround for bug 14256107. See bug 14499218 for more discussion about the motivations for this change. (cherry picked from commit 38f3f7c42f4d71e80f98e6bb7b45072fe6b884fa) Change-Id: Ia99b8ba64217f712c72bf9ffb6a5396409639550
* | | | | Bump version to 1.9.Jeff Hamilton2014-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | Bug: 15670857 Change-Id: Iaf7e2460c4cc62128bae2f3efd4c3c9b06f1bbfc
* | | | | Merge "Force dx compilation target to java 6."Yohann Roussel2014-05-271-0/+4
|\ \ \ \ \
| * | | | | Force dx compilation target to java 6.Yohann Roussel2014-05-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we want it to be executable on a java 6 runtime. Change-Id: Ie6b62244b11b1b4a54b5a879cec589c66bdf3c4d
* | | | | | Merge "Make a better detection of index limit in multidex."Yohann Roussel2014-05-239-56/+79
|\ \ \ \ \ \
| * | | | | | Make a better detection of index limit in multidex.Yohann Roussel2014-05-209-56/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Intern annotation content sooner. - Count declared methods separatly because it seems possible to have them generate more method ids than they account in the constant pool if their name and descriptor are the same as those of called methods. - Take into account some possible ids that can be added during dex creation. - Drop evaluation of type ids numbers because it was wrong, it's not simple to do better and it's nearly impossible to have type ids overflow before method ids. Detection is still rough, only a max value is evaluated not the real value. Bug 14633887 Change-Id: I2e3180662cb4b1c58bbc743b69270ffaa64f3106
* | | | | | | Split multicatch so they have different handlers.Yohann Roussel2014-05-221-57/+160
| |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a workaround for bug 14256107. See bug 14499218 for more discussion about the motivations for this change. Change-Id: Ic33d69941d837f6114c919b076798c51fe8552c8
* | | | | | am b9227cd0: am d3b54de9: am 8dbff580: Merge "Return the correct error code ↵Benoit Lamarche2014-05-141-51/+70
|\ \ \ \ \ \ | |/ / / / / |/| / / / / | |/ / / / | | | | | | | | | | | | | | | in multi-thread mode" * commit 'b9227cd05d0751774bda5c915dea0276123576b3': Return the correct error code in multi-thread mode
| * | | | am d3b54de9: am 8dbff580: Merge "Return the correct error code in ↵Benoit Lamarche2014-05-141-51/+70
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | multi-thread mode" * commit 'd3b54de9bcce9e030f2201b8db0132cf39565bdd': Return the correct error code in multi-thread mode
| | * | | am 8dbff580: Merge "Return the correct error code in multi-thread mode"Benoit Lamarche2014-05-141-51/+70
| | |\| | | | | | | | | | | | | | | | | | | | | | * commit '8dbff5809a1648750a768ad68ea601c26f4e0a43': Return the correct error code in multi-thread mode
| | | * | Return the correct error code in multi-thread modeBenoit Lamarche2014-05-131-51/+70
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 14062905 In "--num-threads" mode, dx did not return a result code different than zero in case of a Throwable. This CL aims to have the same behaviour in multi-threaded mode as in normal mode. There are 2 cases: - When there is an Exception, it is supposed to be handled by ClassPathOpener.Consumer.onException(). The number of errors is then incremented, which is used in "com.android.dx.command.dexer.Main" to return the error code. With "--num-threads" it couldn't be handled by onException(). So I've modified the ParallelProcessor to use the ClassPathOpener, so that the Exception is handled inside the thread. - When there is an Error it is handled using the Futures of ParallelProcessors through ExecutorService. Change-Id: Idc9d8d8bc737587ca518f8f9166e5e511ec22908
| | * | am 8b68699e: Merge "Remove dx/tests/120-disable-extend-ops"Narayan Kamath2014-03-134-118/+0
| | |\| | | | | | | | | | | | | | | | | * commit '8b68699e4f9a37c1e7da64e204a5fc856e3b1624': Remove dx/tests/120-disable-extend-ops
| | * | am dc003e0f: Merge "Transform incorrect invokevirtual ops to invokedirect."Narayan Kamath2014-03-1311-9/+118
| | |\ \ | | | | | | | | | | | | | | | | | | | | * commit 'dc003e0f9cf0ebed43b86eecf33cb3cb8b7697fa': Transform incorrect invokevirtual ops to invokedirect.
* | | | | Keep all annotation in main dex.Yohann Roussel2014-04-253-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because proguard does not trace annotation attribute it just filter the annotation attributes according to annotation classes it already kept. Bug: 14233284 Change-Id: I601c6c59f5a25b35f777c3952498440f9ae36266
* | | | | am a0433557: am 8b68699e: Merge "Remove dx/tests/120-disable-extend-ops"Narayan Kamath2014-03-124-118/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | * commit 'a0433557ef5d7ffc75fca4d3f583540c8f75e70e': Remove dx/tests/120-disable-extend-ops
| * | | | am 8b68699e: Merge "Remove dx/tests/120-disable-extend-ops"Narayan Kamath2014-03-124-118/+0
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | * commit '8b68699e4f9a37c1e7da64e204a5fc856e3b1624': Remove dx/tests/120-disable-extend-ops
| | * | | Remove dx/tests/120-disable-extend-opsNarayan Kamath2014-03-114-118/+0
| | | |/ | | |/| | | | | | | | | | | | | | | | | Support for the target-api flag was removed in 2011. Change-Id: Id50c53f759d4e3a59f550dbeb6e733b68df58dd3
* | | | am 3014c365: am dc003e0f: Merge "Transform incorrect invokevirtual ops to ↵Narayan Kamath2014-03-1111-9/+118
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | invokedirect." * commit '3014c36515e2eae4a53dd697c82ffb5333d95292': Transform incorrect invokevirtual ops to invokedirect.
| * | | am dc003e0f: Merge "Transform incorrect invokevirtual ops to invokedirect."Narayan Kamath2014-03-1111-9/+118
| |\| | | | | | | | | | | | | | | | | | * commit 'dc003e0f9cf0ebed43b86eecf33cb3cb8b7697fa': Transform incorrect invokevirtual ops to invokedirect.
| | * | Transform incorrect invokevirtual ops to invokedirect.Narayan Kamath2014-03-1111-9/+118
| | | | | | | | | | | | | | | | | | | | | | | | bug: 12370565 Change-Id: I75de311912d3e620f95fbac712e799e64622e4ab
* | | | am 44cb3d64: am 5dbae316: Exclude host dx tools in PDK build.Ying Wang2014-03-082-4/+4
|\| | | | | | | | | | | | | | | | | | | * commit '44cb3d6400ef6a7e6dff8ffdb6a00022e42ada8d': Exclude host dx tools in PDK build.
| * | | Exclude host dx tools in PDK build.Ying Wang2014-03-072-4/+4
| | |/ | |/| | | | | | | | | | Bug: 13028632 Change-Id: I65f96ec4fd8c5ab443a7ce3ee5f6d3dc1062e303
* | | Fix detection of main dex overflow in multidexBenoit Lamarche2014-02-281-1/+1
| | | | | | | | | | | | | | | Bug: 13239620 Change-Id: Ie897070cbbe0605f38fd6db7b6a50c91f2d1364b
* | | Fix mainDexClasses with obfuscation.Yohann Roussel2014-02-262-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the input jar is obfuscated, multidex package can be renamed so the multidex classes were not always correctly included in the main dex. Tracing from Application.attachBaseContext() is not subject to this problem since the method is defined in android API and this will keep the multidex clases in the main dex since attachBaseContext must call MultiDex.install(). Change-Id: I62efd2292700a04c2bc3fd7434d20b18d3d74343
* | | Improve the new ClassReferenceListBuilder API.Xavier Ducrohet2014-01-211-7/+6
| | | | | | | | | | | | Change-Id: I5576f5483b43dd58934d2badff5a8d8ea694abd0