When local variable stack gets created?

Ramesh Papaganti

I am learning internals of jvm and i read this article. While reading i got one doubt i.e When local variable stack get created ? If local variable stack created at run time will this, super keywords point real objects Or if local variable stack is created at compile time, how this, super keywords internally works?

Peter Lawrey

When local variable stack get created ?

The javac allocates local variables to a stack in byte code. This allocation is notional and the actual allocation in a real machine could be very different.

After the JIT has optimised the code,the local variables and the method itself could be inlined in which case, nothing happens in an ideal situation.

If local variable stack created at run time will this, super keywords point real objects

There is no super at runtime. There is only the current objects available such as the one which represents this and the methods you can call on them. When you use super you are referring to methods in the parent class rather than the current one.

Or if local variable stack is created at compile time, how this, super keywords internally works?

super changes which methods the compiler chooses to call. Once this choice has been made, the distinction between super and this is discarded.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

When local variable stack gets created?

From Dev

Is a pointer variable created for stack local array?

From Dev

When does a local variable inside a function *actually* gets allocated

From Dev

how the local variable organized in stack when function call?

From Dev

how the local variable organized in stack when function call?

From Dev

How is a local variable created even when IF condition evaluates to false in Ruby?

From Dev

Static local variable gets reinitialized

From Dev

Local variable position on stack not changing

From Dev

Newline created before input when using gets or gets.chomp

From Dev

When is the variable created?

From Dev

Error undefined local variable or method `created_at'

From Dev

Where does a variable created from JRI gets stored on my disk

From Dev

Are variables local to a class that are not declared as pointers, created on the heap or stack?

From Dev

When is a variable local and when global?

From Dev

When does memory gets allocated for a variable in c?

From Dev

When does memory gets allocated for a variable in c?

From Dev

Session variable gets updated when modifying locally

From Dev

variable gets reset when entering if statement?

From Dev

How to find out when the Javascript stack gets full?

From Dev

Make boxes stack when the screen gets to small (CSS/HTML)

From Dev

Stack InvalidRelFile error when adding local package

From Dev

when the memory is cleared on stack for a local function?

From Dev

when the memory is cleared on stack for a local function?

From Dev

How does destructor gets called when object are created using Vectors

From Dev

How do I run a method when a model gets created?

From Dev

java sessions - when does a session actually gets created?

From Dev

Recursive symlink gets created when using ln -f -s

From Dev

Using a local variable when initializing a static variable

From Dev

Why is a global variable called when there is a local variable?

Related Related

  1. 1

    When local variable stack gets created?

  2. 2

    Is a pointer variable created for stack local array?

  3. 3

    When does a local variable inside a function *actually* gets allocated

  4. 4

    how the local variable organized in stack when function call?

  5. 5

    how the local variable organized in stack when function call?

  6. 6

    How is a local variable created even when IF condition evaluates to false in Ruby?

  7. 7

    Static local variable gets reinitialized

  8. 8

    Local variable position on stack not changing

  9. 9

    Newline created before input when using gets or gets.chomp

  10. 10

    When is the variable created?

  11. 11

    Error undefined local variable or method `created_at'

  12. 12

    Where does a variable created from JRI gets stored on my disk

  13. 13

    Are variables local to a class that are not declared as pointers, created on the heap or stack?

  14. 14

    When is a variable local and when global?

  15. 15

    When does memory gets allocated for a variable in c?

  16. 16

    When does memory gets allocated for a variable in c?

  17. 17

    Session variable gets updated when modifying locally

  18. 18

    variable gets reset when entering if statement?

  19. 19

    How to find out when the Javascript stack gets full?

  20. 20

    Make boxes stack when the screen gets to small (CSS/HTML)

  21. 21

    Stack InvalidRelFile error when adding local package

  22. 22

    when the memory is cleared on stack for a local function?

  23. 23

    when the memory is cleared on stack for a local function?

  24. 24

    How does destructor gets called when object are created using Vectors

  25. 25

    How do I run a method when a model gets created?

  26. 26

    java sessions - when does a session actually gets created?

  27. 27

    Recursive symlink gets created when using ln -f -s

  28. 28

    Using a local variable when initializing a static variable

  29. 29

    Why is a global variable called when there is a local variable?

HotTag

Archive