Jacob Groundwater
Jacob Groundwater

Reputation: 6671

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

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

Upvotes: 0

Views: 1027

Answers (1)

Peter Lawrey
Peter Lawrey

Reputation: 533550

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)

Upvotes: 6

Related Questions