What's the difference between java bytecode astore_1 and astore_2

半世苍凉 提交于 2020-01-02 08:52:33

问题


What's the difference between java bytecode astore_1 and astore_2 ?


回答1:


The instructions astore_n, for small values of n, are just shorthand equivalents for astore n. Either version stores what's on top of the stack into local variable n.




回答2:


astore_1 is the same as astore 1, and astore_2 is the same as astore 2, except that astore_1 and astore_2 are one byte each, whereas astore is a two-byte instruction.



来源:https://stackoverflow.com/questions/6983641/whats-the-difference-between-java-bytecode-astore-1-and-astore-2

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!