summaryrefslogtreecommitdiffstats
path: root/dex
Commit message (Collapse)AuthorAgeFilesLines
* Add DexIndexOverflowExceptionBenoit Lamarche2014-07-111-0/+30
| | | | | | | | (cherry-pick of 464c226afc28aa64c293bdc4eec3b8b348bc422a.) (cherry picked from commit e114d23d4689c0b7e0494b16dad7d67c48e0e110) Change-Id: Ied546a1951904787687d07f519abcca12b1e6ae3
* resolved conflicts for merge of 69e46eea to lmp-devElliott Hughes2014-07-111-30/+0
|\ | | | | | | Change-Id: I3bb988cdcf88675f86e21a0c54f10eb39565e1fb
* \ am 9ee11a68: am 7f5533ef: am b7bef747: Merge "Improve the performance of ↵Neil Fuller2014-05-061-9/+9
|\ \ | |/ | | | | | | | | | | Annotation checks" * commit '9ee11a688766068bf8b8625b70cd8aa6cf76c9eb': Improve the performance of Annotation checks
| * Merge "Improve the performance of Annotation checks"Neil Fuller2014-05-061-9/+9
| |\
| | * Improve the performance of Annotation checksNeil Fuller2014-03-281-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the circumstance where the annotated element (field/ method/constructor/class) was loaded from a different Dex file than the annotation: The previous code would perform a binary search to determine the type ID of the annotation in the Dex file of the annotated element. That type ID would then be compared against the type IDs of annotations present on the annotated element. The binary search was quite expensive: it involved various indirections, many small native method calls and temporary String creation. Instead, the code now compares the names of the annotations on the annotated element with the name of the annotation being searched for. The name of the annotation is known and cached on the class and is therefore cheap to get. The name was previously being used to binary search for the type ID so this appears to be no less correct. Also removed some unused methods in order to delete the getFieldIndex() method. Change-Id: Ib8fb021ddf1221e3eac983aa87e7aea8174720ef
* | | am 50d637aa: am 148c6fae: Merge "Fix a copy and paste doc error"Neil Fuller2014-03-311-1/+1
|\ \ \ | |/ / | | | | | | | | | * commit '50d637aaf744e4dc028972ac02be98d07a309051': Fix a copy and paste doc error
| * | Fix a copy and paste doc errorNeil Fuller2014-03-311-1/+1
| |/ | | | | | | Change-Id: I2a142f0a6e8348993b37666876d4f812a7e69986
* | Add DexIndexOverflowExceptionBenoit Lamarche2013-12-032-1/+31
|/ | | | Change-Id: I51852fa88832db8b20ad65f091a0eb9e48fa3491
* Avoid computing class def indices.Ian Rogers2013-09-211-1/+75
| | | | | | | | | | | Bug: 10244719 Also tidy AnnotationAccess. (cherry-picked from 8b2c0b9abc3f520495f4387ea040132ba85cae69) Change-Id: I6ec8fd4e36b428d7e16e01d98b7bebc143fac8c3 Conflicts: libdvm/src/main/java/java/lang/Class.java
* Lazier annotation signature parsing.Ian Rogers2013-09-211-166/+201
| | | | | | | | | | | | | | | Bug: 10244719. Also, make wider use of empty arrays. Also, use named inner classes to aid profiling. Remove caching as the empty result will be fast. Porting the ART changes to DVM, to avoid the caching, results in bringing in a bunch of other ART clean-up. TODO, avoid modified-UTF8 to String conversions by Dex. Change-Id: I051b6e34b5a4e7a7f1383461a799755947a5ba36 Conflicts: libdvm/src/main/java/java/lang/Class.java
* Add member and type idx max values to DexFormat.Yohann Roussel2013-08-281-0/+13
| | | | | | (cherry picked from commit 4a82103cb62ef49ff597a1081334c738150b1af2) Change-Id: I6bbd2bdecd907918976eb0d8f5e19f899fb84f1b
* Improve the performance of reflective operations.Ian Rogers2013-08-032-63/+146
| | | | | | | | | | | | | | | Common dex index lookups require a number of different types to be constructed, implement short-cuts that avoid the intermediate data types. Refactor reflective operations to use dex methods that don't require temporary objects. Note: this change adds an empty short array to Dex, this code can't appear in libcore.util as Dex doesn't always come with libcore.util. Bug: 9968234 (cherry picked from commit 381db8de0ac5df124c7f482bf4be9d5756bf3ca4) Change-Id: I9122a3f01b4f41b07a84aff768193c092e29698c
* Fix an ugly bug where try/catch offsets weren't being mapped properlyBenoit Lamarche2013-04-303-39/+99
| | | | | | | | | | | | | | | | | | | | | | | | | This CL comes from CL I3bdadf20899fdb5d4d074e69103b33c0404a31f8 in AOSP master. Modifications have been made to files that were in dalvik but are now in libcore. Here is the original commit message: 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. Change-Id: I61adb8fce6fa9b83cbfbe5eef7edea84664d7ea6 (cherry picked from commit b44450d600807ab130aa7c6d91b534fde52e0a21)
* *libcore* resolved conflicts for merge of bc23c4f3 to dalvik-devElliott Hughes2013-04-301-0/+8
| | | | | | | DexBuffer became Dex, and moved to libcore. Change-Id: I32447f83c03dd18f2339e879d015134be9f4fc18 (cherry picked from commit 621d004d61b3eaca74fc045a3fba6afa14327a2e)
* Manually merge "Compact merged dexes on their byte aligned size"Jesse Wilson2013-04-301-0/+9
| | | | | | | | | The changed file was moved from dalvik/ to libcore/ in this branch. See https://android-review.googlesource.com/34010 Change-Id: I9b2fae8767fb4e7461e9b762e70efb4171e7a9f5 (cherry picked from commit 20d13d20f6b8d4094d4d66bb692ac19c4b81348f)
* Add missing @Override annotationsIan Rogers2013-04-301-1/+1
| | | | | Change-Id: I4c5772c9549375beeb0e4f269bd61d623fca7e35 (cherry picked from commit 49992f5003aac55e1b1cf54769abc93630ccde93)
* Fix DexMerger to emit dex files without extended op codes.Jesse Wilson2013-04-301-2/+2
| | | | | | | | | Certain tools in our tool chain don't like these. Patched from master/dalvik change: Iaaff85c1b634f647d0105c36f403b2e03aaf0ca7 Change-Id: I7b5c6bf2b6a6ed96c9bb76817154344764e61c62 (cherry picked from commit 463cf8e67948d7d82a31c74588903b70fdd6b7b0)
* Make Dex access faster by making binarySearch work.Jesse Wilson2013-04-301-6/+11
| | | | | Change-Id: I5f506ef2cd73c2f88f395ad1e1200d79ed33f654 (cherry picked from commit 8cf91498080408179f1b96ae832b581b8547d7c4)
* Remove redundant alignToFourBytes in favor of alignToFourBytesWithZeroFillBrian Carlstrom2013-04-301-6/+9
| | | | | | (cherry picked from commit d2301a66b2629f2841ab3a3cc7684a645ebe7217) Change-Id: I32522d86950d0c1a89e77b44ddeab071ce9c021a
* Improve exception detail messageBrian Carlstrom2013-04-301-2/+2
| | | | | | (cherry picked from commit 345a87a2e40955ad999e56cbd3674ccc95e16537) Change-Id: I4ecb9d07bd3bf50cdcfe67c21a53181dfcbc670b
* Fix Dex.create(ByteBuffer) to not allocate a byte[] to check magicBrian Carlstrom2013-04-301-17/+19
| | | | | | (cherry picked from commit 34c119762d55411ec2451b38f4782b923217aa2c) Change-Id: I968762e1962fb720bbcf0c2866f17cd0500a9e54
* Switch Dex from byte[] to ByteBuffer for backing store.Jesse Wilson2013-04-301-93/+157
| | | | | | | | | | | | The ByteBuffer allows Dex to share the mapped data with Class.getDex(). This also changes Dex.Section to use a ByteBuffer; that ByteBuffer's position and limit are used instead of a separate pair of integers. Change-Id: I2b8042a493f70213c30e5c26e0bacfb03daebf55 (cherry picked from commit 59653899ed7cbca17f5a3dd32a23e81b3c4a5339)
* Add Dex.create(ByteBuffer)Brian Carlstrom2013-04-301-0/+26
| | | | | | (cherry picked from commit aca7a4ba7597be831164d94d787f383b8d4ac2fd) Change-Id: Id517f2ccda31a20e28fe63005120e4e975935980
* Move dex utilities from dalvik/dx to libcore/dex part 2Jesse Wilson2013-04-3025-0/+3057
Change-Id: Ib5bb7bec80d77464f632f1cdfef708d868301c42 (cherry picked from commit 9ae95d8f3381204108abc722e8e5a03d6ecbf311)