当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代码中,我找不到任何关于这些新的字节码的参考。在我的Jelly Bean版本的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 bytecode文档。 这是我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分支。