【问题标题】:Extended-width dalvik bytecodes missing on JellybeanJellybean 上缺少扩展宽度的 dalvik 字节码
【发布时间】:2012-09-10 17:47:28
【问题描述】:

当 ICS 出现时,引入了几个新的扩展宽度字节码。其中大部分是用于支持巨型 ID 的说明。以下是其中一些新指令,取自我的 ics/dalvik/opcode-gen/bytecode.txt:

#
# Extended-width opcodes
#

op 00ff const-class/jumbo           41c  y type-ref      continue|throw
op 01ff check-cast/jumbo            41c  n type-ref      continue|throw
op 02ff instance-of/jumbo           52c  y type-ref      continue|throw
op 03ff new-instance/jumbo          41c  y type-ref      continue|throw
op 04ff new-array/jumbo             52c  y type-ref      continue|throw
op 05ff filled-new-array/jumbo      5rc  n type-ref      continue|throw
op 06ff iget/jumbo                  52c  y field-ref     continue|throw
...

但是,在 JB 代码中,我找不到对这些新字节码的任何引用。在我的 jellybean 版本的 bytecodes.txt 中,最后一个操作码以 0xfe 结尾:

op   fc +iput-object-volatile       22c  n field-ref     optimized|continue|throw
op   fd +sget-object-volatile       21c  y field-ref     optimized|continue|throw
op   fe +sput-object-volatile       21c  n field-ref     optimized|continue|throw

# unused: op ff

JellyBean 不支持这些新指令吗?

此外,我什至似乎无法在 jellybean 中找到原始 dalvik 字节码文档。这是我的 dalvik/docs 文件夹的目录列表:

$ ls -a dalvik/docs | cat
.
..
dalvik-constraints.css
dalvik-constraints.html
debugger.html
debugmon.html
dexopt.html
embedded-vm-control.html
heap-profiling.html
hello-world.html
java-bytecode.css
java-bytecode.html
java-constraints.css
java-constraints.html
porting-guide.html
porting-proto.c.txt
prettify.css
prettify.js
verifier.html

或者,也许,我刚刚从错误的分支下载?我正在使用 jb-4.1.1_r4 分支。

【问题讨论】:

标签: android android-ndk bytecode dalvik android-source


【解决方案1】:

我在离开 Google 之前实现了这些新指令的 dx 方面,但它们的运行时方面尚未完成。我想没有人完成过这项工作,而是单独留下了规范文档。

【讨论】:

  • 感谢您的回复。我可以在 ICS 的 libdex/InstrUtils.cpp 中看到这些巨型指令已实现。但是,在 JB 中,它们不是……您认为我可以假设在这两种情况下,仍然不支持具有巨型组件的应用程序吗?
  • 是的,这是一个安全的假设。
猜你喜欢
  • 1970-01-01
  • 2012-10-18
  • 2011-10-07
  • 2017-01-05
  • 2010-11-13
  • 2013-05-21
  • 1970-01-01
  • 1970-01-01
  • 2011-08-20
相关资源
最近更新 更多