Your SlideShare is downloading. ×

Java Bytecode: Passing Parameters

14,564

Published on

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
14,564
On Slideshare
0
From Embeds
0
Number of Embeds
30
Actions
Shares
0
Downloads
86
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Local Variables
    public java.lang.Object execute();
    0: aload_0
    1: invokespecial #2;
    4: astore_1
    5: aload_0
    6: aload_1
    7: invokespecial #3;
    10: areturn
    Stack
    var
    value
    1
    value
    depth
    2
    1
    3
    2
    3
    private java.lang.Integer incValue(java.lang.Integer);
    4
    var
    value
    0: aload_1
    1: invokevirtual #8;
    4: iconst_1
    5: iadd
    6: invokestatic #7;
    9: areturn
    5
    1
    6
    2
    3
  • 2. Local Variables
    public java.lang.Object execute();
    0: aload_0
    1: invokespecial #2;
    4: astore_1
    5: aload_0
    6: aload_1
    7: invokespecial #3;
    10: areturn
    Stack
    var
    value
    1
    value
    depth
    2
    1
    this
    3
    2
    3
    private java.lang.Integer incValue(java.lang.Integer);
    4
    var
    value
    0: aload_1
    1: invokevirtual #8;
    4: iconst_1
    5: iadd
    6: invokestatic #7;
    9: areturn
    5
    1
    6
    2
    3
  • 3. Local Variables
    public java.lang.Object execute();
    0: aload_0
    1: invokespecial #2;
    4: astore_1
    5: aload_0
    6: aload_1
    7: invokespecial #3;
    10: areturn
    Stack
    var
    value
    1
    value
    depth
    2
    1
    objectref
    3
    2
    3
    private java.lang.Integer incValue(java.lang.Integer);
    4
    var
    value
    0: aload_1
    1: invokevirtual #8;
    4: iconst_1
    5: iadd
    6: invokestatic #7;
    9: areturn
    5
    1
    6
    2
    3
  • 4. Local Variables
    public java.lang.Object execute();
    0: aload_0
    1: invokespecial #2;
    4: astore_1
    5: aload_0
    6: aload_1
    7: invokespecial #3;
    10: areturn
    Stack
    var
    value
    objectref
    1
    value
    depth
    2
    1
    3
    2
    3
    private java.lang.Integer incValue(java.lang.Integer);
    4
    var
    value
    0: aload_1
    1: invokevirtual #8;
    4: iconst_1
    5: iadd
    6: invokestatic #7;
    9: areturn
    5
    1
    6
    2
    3
  • 5. Local Variables
    public java.lang.Object execute();
    0: aload_0
    1: invokespecial #2;
    4: astore_1
    5: aload_0
    6: aload_1
    7: invokespecial #3;
    10: areturn
    Stack
    var
    value
    objectref
    1
    value
    depth
    2
    1
    this
    3
    2
    3
    private java.lang.Integer incValue(java.lang.Integer);
    4
    var
    value
    0: aload_1
    1: invokevirtual #8;
    4: iconst_1
    5: iadd
    6: invokestatic #7;
    9: areturn
    5
    1
    6
    2
    3
  • 6. Local Variables
    public java.lang.Object execute();
    0: aload_0
    1: invokespecial #2;
    4: astore_1
    5: aload_0
    6: aload_1
    7: invokespecial #3;
    10: areturn
    Stack
    var
    value
    objectref
    1
    value
    depth
    2
    1
    objectref
    3
    2
    this
    3
    private java.lang.Integer incValue(java.lang.Integer);
    4
    var
    value
    0: aload_1
    1: invokevirtual #8;
    4: iconst_1
    5: iadd
    6: invokestatic #7;
    9: areturn
    5
    1
    6
    2
    3
  • 7. Local Variables
    public java.lang.Object execute();
    0: aload_0
    1: invokespecial #2;
    4: astore_1
    5: aload_0
    6: aload_1
    7: invokespecial #3;//incValue
    10: areturn
    Stack
    var
    value
    objectref
    1
    value
    depth
    2
    1
    3
    2
    3
    private java.lang.Integer incValue(java.lang.Integer);
    4
    var
    value
    0: aload_1
    1: invokevirtual #8;
    4: iconst_1
    5: iadd
    6: invokestatic #7;
    9: areturn
    5
    objectref
    1
    6
    2
    3
  • 8. Local Variables
    public java.lang.Object execute();
    0: aload_0
    1: invokespecial #2;
    4: astore_1
    5: aload_0
    6: aload_1
    7: invokespecial #3; //incValue
    10: areturn
    Stack
    var
    value
    objectref
    1
    value
    depth
    2
    1
    objectref
    3
    2
    3
    private java.lang.Integer incValue(java.lang.Integer);
    4
    var
    value
    0: aload_1
    1: invokevirtual #8;
    4: iconst_1
    5: iadd
    6: invokestatic #7;
    9: areturn
    5
    objectref
    1
    6
    2
    3
  • 9. Local Variables
    public java.lang.Object execute();
    0: aload_0
    1: invokespecial #2;
    4: astore_1
    5: aload_0
    6: aload_1
    7: invokespecial #3; //incValue
    10: areturn
    Stack
    var
    value
    objectref
    1
    value
    depth
    2
    1
    X
    3
    2
    3
    private java.lang.Integer incValue(java.lang.Integer);
    4
    var
    value
    0: aload_1
    1: invokevirtual #8;// Integer.intValue:()
    4: iconst_1
    5: iadd
    6: invokestatic #7;
    9: areturn
    5
    objectref
    1
    6
    2
    3
  • 10. Local Variables
    public java.lang.Object execute();
    0: aload_0
    1: invokespecial #2;
    4: astore_1
    5: aload_0
    6: aload_1
    7: invokespecial #3; //incValue
    10: areturn
    Stack
    var
    value
    objectref
    1
    value
    depth
    2
    1
    1
    3
    2
    X
    3
    private java.lang.Integer incValue(java.lang.Integer);
    4
    var
    value
    0: aload_1
    1: invokevirtual #8;
    4: iconst_1
    5: iadd
    6: invokestatic #7;
    9: areturn
    5
    objectref
    1
    6
    2
    3
  • 11. Local Variables
    public java.lang.Object execute();
    0: aload_0
    1: invokespecial #2;
    4: astore_1
    5: aload_0
    6: aload_1
    7: invokespecial #3; //incValue
    10: areturn
    Stack
    var
    value
    objectref
    1
    value
    depth
    2
    1
    X + 1
    3
    2
    3
    private java.lang.Integer incValue(java.lang.Integer);
    4
    var
    value
    0: aload_1
    1: invokevirtual #8;
    4: iconst_1
    5: iadd
    6: invokestatic #7;
    9: areturn
    5
    objectref
    1
    6
    2
    3
  • 12. Local Variables
    public java.lang.Object execute();
    0: aload_0
    1: invokespecial #2;
    4: astore_1
    5: aload_0
    6: aload_1
    7: invokespecial #3; //incValue
    10: areturn
    Stack
    var
    value
    objectref
    1
    value
    depth
    2
    1
    objectref
    3
    2
    3
    private java.lang.Integer incValue(java.lang.Integer);
    4
    var
    value
    0: aload_1
    1: invokevirtual #8;
    4: iconst_1
    5: iadd
    6: invokestatic #7;//Integer.valueOf
    9: areturn
    5
    objectref
    1
    6
    2
    3
  • 13. Local Variables
    public java.lang.Object execute();
    0: aload_0
    1: invokespecial #2;
    4: astore_1
    5: aload_0
    6: aload_1
    7: invokespecial #3; //incValue
    10: areturn
    Stack
    var
    value
    objectref
    1
    value
    depth
    2
    1
    objectref
    3
    2
    3
    private java.lang.Integer incValue(java.lang.Integer);
    4
    var
    value
    0: aload_1
    1: invokevirtual #8;
    4: iconst_1
    5: iadd
    6: invokestatic #7;
    9: areturn
    5
    objectref
    1
    6
    2
    3
  • 14. Local Variables
    public java.lang.Object execute();
    0: aload_0
    1: invokespecial #2;
    4: astore_1
    5: aload_0
    6: aload_1
    7: invokespecial #3;
    10: areturn
    Stack
    var
    value
    objectref
    1
    value
    depth
    2
    1
    objectref
    3
    2
    3
    private java.lang.Integer incValue(java.lang.Integer);
    4
    var
    value
    0: aload_1
    1: invokevirtual #8;
    4: iconst_1
    5: iadd
    6: invokestatic #7;
    9: areturn
    5
    1
    6
    2
    3
  • 15. Local Variables
    public java.lang.Object execute();
    0: aload_0
    1: invokespecial #2;
    4: astore_1
    5: aload_0
    6: aload_1
    7: invokespecial #3;
    10: areturn
    Stack
    var
    value
    1
    value
    depth
    2
    1
    objectref
    3
    2
    3
    private java.lang.Integer incValue(java.lang.Integer);
    4
    var
    value
    0: aload_1
    1: invokevirtual #8;
    4: iconst_1
    5: iadd
    6: invokestatic #7;
    9: areturn
    5
    1
    6
    2
    3

×