1. 22 Sep, 2013 2 commits
    • Ian Rogers's avatar
      Avoid computing class def indices. · a6e22fc9
      Ian Rogers authored
      Bug: 10244719
      Also tidy AnnotationAccess.
      
      (cherry-picked from 8b2c0b9abc3f520495f4387ea040132ba85cae69)
      Change-Id: I6ec8fd4e36b428d7e16e01d98b7bebc143fac8c3
      
      Conflicts:
      	libdvm/src/main/java/java/lang/Class.java
      a6e22fc9
    • Ian Rogers's avatar
      Lazier annotation signature parsing. · d4ec55c4
      Ian Rogers authored
      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
      d4ec55c4
  2. 28 Aug, 2013 1 commit
  3. 03 Aug, 2013 1 commit
    • Ian Rogers's avatar
      Improve the performance of reflective operations. · d3e31149
      Ian Rogers authored
      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
      d3e31149
  4. 30 Apr, 2013 12 commits
    • Benoit Lamarche's avatar
      Fix an ugly bug where try/catch offsets weren't being mapped properly · 00a2d1ee
      Benoit Lamarche authored
      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)
      00a2d1ee
    • Elliott Hughes's avatar
      *libcore* resolved conflicts for merge of bc23c4f3 to dalvik-dev · dc5a528c
      Elliott Hughes authored
      DexBuffer became Dex, and moved to libcore.
      
      Change-Id: I32447f83c03dd18f2339e879d015134be9f4fc18
      (cherry picked from commit 621d004d61b3eaca74fc045a3fba6afa14327a2e)
      dc5a528c
    • Jesse Wilson's avatar
      Manually merge "Compact merged dexes on their byte aligned size" · 0436f436
      Jesse Wilson authored
      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)
      0436f436
    • Ian Rogers's avatar
      Add missing @Override annotations · 04b2ff92
      Ian Rogers authored
      Change-Id: I4c5772c9549375beeb0e4f269bd61d623fca7e35
      (cherry picked from commit 49992f5003aac55e1b1cf54769abc93630ccde93)
      04b2ff92
    • Jesse Wilson's avatar
      Fix DexMerger to emit dex files without extended op codes. · eb5fee6d
      Jesse Wilson authored
      Certain tools in our tool chain don't like these.
      
      Patched from master/dalvik change: Iaaff85c1b634f647d0105c36f403b2e03aaf0ca7
      
      Change-Id: I7b5c6bf2b6a6ed96c9bb76817154344764e61c62
      (cherry picked from commit 463cf8e67948d7d82a31c74588903b70fdd6b7b0)
      eb5fee6d
    • Jesse Wilson's avatar
      Make Dex access faster by making binarySearch work. · a34f79ba
      Jesse Wilson authored
      Change-Id: I5f506ef2cd73c2f88f395ad1e1200d79ed33f654
      (cherry picked from commit 8cf91498080408179f1b96ae832b581b8547d7c4)
      a34f79ba
    • Brian Carlstrom's avatar
      Remove redundant alignToFourBytes in favor of alignToFourBytesWithZeroFill · 450a197f
      Brian Carlstrom authored
      (cherry picked from commit d2301a66b2629f2841ab3a3cc7684a645ebe7217)
      
      Change-Id: I32522d86950d0c1a89e77b44ddeab071ce9c021a
      450a197f
    • Brian Carlstrom's avatar
      Improve exception detail message · 1f203dc1
      Brian Carlstrom authored
      (cherry picked from commit 345a87a2e40955ad999e56cbd3674ccc95e16537)
      
      Change-Id: I4ecb9d07bd3bf50cdcfe67c21a53181dfcbc670b
      1f203dc1
    • Brian Carlstrom's avatar
      Fix Dex.create(ByteBuffer) to not allocate a byte[] to check magic · df605894
      Brian Carlstrom authored
      (cherry picked from commit 34c119762d55411ec2451b38f4782b923217aa2c)
      
      Change-Id: I968762e1962fb720bbcf0c2866f17cd0500a9e54
      df605894
    • Jesse Wilson's avatar
      Switch Dex from byte[] to ByteBuffer for backing store. · 030bd62e
      Jesse Wilson authored
      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)
      030bd62e
    • Brian Carlstrom's avatar
      Add Dex.create(ByteBuffer) · c69e85bf
      Brian Carlstrom authored
      (cherry picked from commit aca7a4ba7597be831164d94d787f383b8d4ac2fd)
      
      Change-Id: Id517f2ccda31a20e28fe63005120e4e975935980
      c69e85bf
    • Jesse Wilson's avatar
      Move dex utilities from dalvik/dx to libcore/dex part 2 · 2bea5ee6
      Jesse Wilson authored
      Change-Id: Ib5bb7bec80d77464f632f1cdfef708d868301c42
      (cherry picked from commit 9ae95d8f3381204108abc722e8e5a03d6ecbf311)
      2bea5ee6