OSDN Git Service

Refactor DexViewBuilder
authorEric Holk <eholk@google.com>
Tue, 17 Sep 2019 20:28:34 +0000 (13:28 -0700)
committerEric Holk <eholk@google.com>
Thu, 19 Sep 2019 00:04:50 +0000 (17:04 -0700)
commit5c6a1a516b524ad867970f25ed532f89d06eafaf
treeaeae046d75c20aeb0b69871247bcb8292e1c2436
parent763cb4638a1ed6124569b71307ca9a78373326a1
Refactor DexViewBuilder

The code was previously pretty messy and hard to follow. This reworks some
things to make it more manageable. Among the changes:

* Pull out fragments of code into their own method, so the high level steps are
  more apparent in methods like DexViewBuilder::Start.
* Pull frequently used types into global constants in dex_layout_compiler.cc.
* Rework register handling to track liveness so a strict stack discipline is no
  longer needed.

Change-Id: Idb4b41f88c96a1ac4efb2c7b9bed05c2de0da999
startop/view_compiler/dex_builder.cc
startop/view_compiler/dex_builder.h
startop/view_compiler/dex_layout_compiler.cc
startop/view_compiler/dex_layout_compiler.h
startop/view_compiler/dex_testcase_generator.cc