What does the `Stack=1, Locals=1, Args_size=1` Mean in Java Bytecode?

那年仲夏 提交于 2019-12-31 07:28:07

问题


I made a simple class to learn how to read Java byte code. What does the line

Stack=1, Locals=1, Args_size=1

mean in the folloiwng code?

public Demo();
  Code:
   Stack=1, Locals=1, Args_size=1
   0:   aload_0
   1:   invokespecial   #1; //Method java/lang/Object."<init>":()V
   4:   return
  LineNumberTable: 
   line 1: 0

回答1:


It means you have one argument (the object to be initialised), one local variable (the object to be initialised) and at most one object on the stack (the object to be intialised)



来源:https://stackoverflow.com/questions/10241914/what-does-the-stack-1-locals-1-args-size-1-mean-in-java-bytecode

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