38 Commits

Author SHA1 Message Date
Ben Gruver
0d8418ff1f Allow but ignore multiple exception handlers for the same exception 2014-07-21 18:54:30 -07:00
Ben Gruver
5280047b42 Ensure the annotation elements are sorted when written 2014-07-15 22:54:41 -07:00
Ben Gruver
9057764c22 Add ReferenceInstruction.getReferenceType() 2013-12-07 15:11:37 -08:00
Ben Gruver
6762350ca0 Add ability to converting MethodImplementation to MutableMethodImplementation 2013-09-14 00:32:32 -07:00
Ben Gruver
9a2de93a99 Implement just-in-time instruction fixup due to string jumboification 2013-09-08 21:41:23 -07:00
Ben Gruver
e94ee6fe80 Delete InstructionWriteUtil 2013-08-25 11:07:43 -07:00
Ben Gruver
ca5de1d803 Remove the Instruction template parameter from ClassSection 2013-08-24 21:36:21 -07:00
Izzat Bahadirov
46619d11bf More proper unit test conditions. 2013-06-04 21:40:42 -04:00
Izzat Bahadirov
180529840c Always aligning payload instructions. 2013-06-04 15:44:12 -04:00
Izzat Bahadirov
6d48e5db17 Breaking out of loop after test condition verification. 2013-06-04 15:35:54 -04:00
Ben Gruver
42627b850c Add new DexBuilder interface
This is a different "front-end" for the existing writer functionality that
is meant to be a more memory efficient method for building a new dex file
from scratch
2013-04-29 23:05:05 -07:00
Ben Gruver
1bf6f23245 Implementation of new generificationified writer functionality 2013-04-27 22:23:30 -07:00
Ben Gruver
83f77f51aa Refactor how api specific Opcodes work (make them non-static) 2013-04-17 22:32:08 -07:00
Ben Gruver
8c3d16b7ee Add logic to TryListBuilder to merge contiguous try blocks with identical handlers 2013-04-14 18:14:06 -07:00
Ben Gruver
5916df9999 Port TryListBuilder from dexlib 2013-04-14 17:17:00 -07:00
Ben Gruver
0a18ea7f8b Separate direct/virtual methods and static/instance fields in the ClassDef interface
This is unfortunately required to support not-quite-well-formed dex files
containing duplicate static/instance fields, or duplicate direct/virtual methods,
which dalvik inadvertently allows.

In cases when there are duplicate fields/methods in the same category, we
unambiguously remove/hide the latter duplicate fields/methods.
2013-04-13 16:25:37 -07:00
Ben Gruver
5fa302678c Add support for custom inline tables 2013-04-10 21:14:46 -07:00
Ben Gruver
45972c352c Merge pull request #9 from izzytwosheds/jumbos_nops_offsets
Handling jumbo string conversions and consequent offset adjustments for ...
2013-04-02 20:59:44 -07:00
Izzat Bahadirov
bad3ae4dd9 Refactoring unit tests. 2013-03-25 21:32:49 -04:00
Izzat Bahadirov
3d721348c5 Unit test for iterative goto embiggening and consequent payload re-alignment. 2013-03-25 19:06:07 -04:00
Izzat Bahadirov
c995fb5086 Unit tests for goto and goto/16 instructions embiggening. 2013-03-25 17:59:21 -04:00
Izzat Bahadirov
add494945d Unit tests for payload alignment. Also, typo correction. 2013-03-25 14:07:58 -04:00
Izzat Bahadirov
e7ab4b681b Unit tests for offset modification in SparseSwitchPayload and PackedSwitchPayload. 2013-03-25 13:14:14 -04:00
Izzat Bahadirov
8309057de3 Minor refactoring of simple unit tests, using the same test implementation for all branch target instructions. 2013-03-25 12:28:43 -04:00
Izzat Bahadirov
e05e01eee0 Simple unit tests for const-string to const-string/jumbo conversions, as well as target offset modifications for goto and branch target instructions. 2013-03-25 11:41:38 -04:00
Ben Gruver
39e4d4487e Fully implement common superclass functionality 2013-03-17 21:37:14 -07:00
Ben Gruver
7301fbe30e Refactor DexBuffer and DexReader to make them easier to test 2013-02-24 15:30:25 -08:00
Ben Gruver
7dff6ada5e Add tests for DexWriter (and fixes to DexWriter, to make said tests pass) 2012-12-28 16:37:41 -08:00
Ben Gruver
a8e05220c1 Refactor how method/field/string/type references are handled 2012-11-04 13:04:21 -08:00
Ben Gruver
d1662b67fe Refactor dexbacked implementations
Made construction of a new dexbacked item as light weight as possible,
only the very mimimum in computed/stored. Some of the values that were
previously calculated/loaded in the constructor are now lazily loaded
upon first use.

In general, nothing is cached, unless the item can't be fully read by
the consumer without causing the value to be computed multiple times.
Otherwise, it is up to the consume to decide if/when/what they want to
cache.
2012-11-03 18:06:41 -07:00
Ben Gruver
9c60ef2a10 Add support in dexlib2 for debug info 2012-10-26 22:23:20 -07:00
Ben Gruver
ca21c1e890 Add a test for InstructionOffsetMap 2012-10-23 22:56:42 -07:00
Ben Gruver
90a1ffeda1 Add "optional" uint, that allows -1 as a value
This is used for "optional" indexes, that have a "not present"
value of -1
2012-10-21 21:40:18 -07:00
Ben Gruver
198c33bc26 Add BareDexBuffer for testing DexBuffer 2012-10-21 21:27:23 -07:00
Ben Gruver
39d2c38685 Add tests for the various "sized" types in DexReader 2012-10-21 14:29:19 -07:00
Ben Gruver
36e2ee2005 Rename DexFileBuffer and DexFileReader to DexBuffer and DexReader 2012-10-20 23:29:26 -07:00
Ben Gruver
06eb83505b Add tests and related fixes for leb128 functionality in DexFileReader 2012-10-20 23:09:55 -07:00
Ben Gruver
e2db1542bb Add tests and related fixes for DexFileBuffer 2012-10-20 22:58:07 -07:00