Mercurial > paraspace
changeset 89:7a059ab408f0
Refactoring procedure of initialize dependency declarations
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Sun, 24 Jul 2011 20:54:54 +0800 |
parents | bbe8d5cbe368 |
children | fe7b3f111d57 |
files | paraspace/dex_deptracker.py |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/paraspace/dex_deptracker.py Sun Jul 24 19:15:04 2011 +0800 +++ b/paraspace/dex_deptracker.py Sun Jul 24 20:54:54 2011 +0800 @@ -553,6 +553,12 @@ pass +## \brief Re-link dependencies that depend on a composite type. +# +# If an attribute depends on a composite type, it is still reference +# composite type itself after a marker been installed on the composite +# type. This function will fix it. +# def _patch_dex_type_markers(all_dep_decls): import itertools marked_types = dict([(marker.back_type, name) @@ -876,6 +882,14 @@ pass +## \brief Prepare and return dependency declares. +def prepare_dep_decls(): + decls = collect_all_dep_decls() + _install_idx_marker(decls) + _patch_dex_type_markers(decls) + return decls + + if __name__ == '__main__': dex = dexfile.DEXFile.open('data/testdata1.dex')