Skip to content
Commit dbc36e2b authored by Eric Holk's avatar Eric Holk
Browse files

Start on DexBuilder

This change begins work on DexBuilder, which will allow us to generate DEX files
directly from layouts. This version is rather limited, but we will expand its
functionality in future CLs. The DexBuilder in this CL can create a DEX file
from scratch, define classes, and define methods on those classes. Within
methods, it supports extremely simple instructions, such as storing a small
constant in a register and returning a value from a register. Additionally,
there are tests to make sure that at least at a structural level, the generated
DEX files are valid.

DexBuilder and its associated builder classes use functionality from
libartdexfile and the Dex Slicer tool to support the actual encoding of DEX
files.

Test: atest, also manually tested by loaded a generated DEX file in an Android
app and verifying its behavior.

Change-Id: Iaa01aa7e3a0c7e4d5f4fa8dbce1492499c93c222
parent 0af8c5c7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment