DX是否转换为DEX包括原来的类文件验证? [英] Does dx conversion to dex include verification of original class files?

查看:269
本文介绍了DX是否转换为DEX包括原来的类文件验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我感兴趣的是在编译的类文件做一些修修补补他们通过转换为DX DEX文件之前。我打量了一下在官方的Dalvik文档以及在之间的<一个比较href=\"http://stackoverflow.com/questions/8210173/what-is-the-difference-between-class-and-dex-files\">DEX格式和类格式。我找不到关于实际的转换过程中很多信息的,类 - >地塞米松。请问DX首先验证转换之前的类文件?它简单地去逐个字段和方法通过法,合并的指令组成更紧凑的分组?任何有识之士将AP preciated。

I'm interested in doing some tinkering on compiled Class files before they're converted to dex files by dx. I've looked a bit at the official Dalvik documentation and also at comparisons between the DEX format and Class format. I can't find much information regarding the actual conversion process, class->dex. Does dx first verify the Class files before the conversion? Does it simply go field by field and method by method, merging groups of instructions into more compact groupings? Any insight would be appreciated.

感谢。

推荐答案

我不熟悉DX本身和转换过程与Dalvik的字节code,但我不记得看​​到的任何核查原始的Java字节code,虽然很明显它已经很好地形成足够被解析/ DX所理解的。

I'm not as familiar with dx itself and the conversion process as with dalvik bytecode, but I don't recall seeing any verification of the original java bytecode, although obviously it has to be well-formed enough to be parsed/understood by dx.

有是关于转换的过程,我所知道的任何文档。它涉及字节code转换成一对夫妇中间格式(ROP,SSA),并包括有效的寄存器分配和一些逻辑上的中间形式一些优化(我认为)。

There is no documentation on the conversion process that I am aware of. It involves converting the bytecode into a couple of intermediate formats (ROP, SSA), and includes some logic for efficient register allocation and some optimizations on the intermediate forms (I think).

有关转换过程的详细信息,最好的办法是看DX源本身(/达尔维克/ DX)

For more information on the conversion process, your best bet is to look at the dx source itself (/dalvik/dx)

这篇关于DX是否转换为DEX包括原来的类文件验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆