33.

prev next contents
lconst_<l>

push the long integer 0 or 1

Jasmin Syntax
     lconst_0 or     lconst_1 
Stack

Before

After
...
<l>-word1

<l>-word2

...
Description

lconst_<l> represents the two opcodes lconst_0, lconst_1 that are used to push the constant long integers 0 and 1 onto the stack. For example, to push the long integer zero onto the stack, use:

     lconst_0 ; push long integer 0 onto the stack 
Note that you could also use:
     ldc2_w 0    ; push the long integer 0 onto the stack 
although this instruction takes more space in the class file and is also slower.

Example

 lconst_0    ; push the long int 0 onto the stack lconst_1    ; push the long int 1 onto the stack 
Bytecode

Type

Description
u1
lconst_0 opcode = 0x09 (9)
u1
lconst_1 opcode = 0x0A (10)
See Also

bipush, sipush, ldc, ldc_w, ldc2_w, aconst_null, iconst_m1 iconst_<n>, fconst_<f>, dconst_<d>


prev next contents
Java Virtual Machine, by Jon Meyer and Troy Downing, O'Reilly Associates


Java Virtual Machine
Java Virtual Machine (Java Series)
ISBN: 1565921941
EAN: 2147483647
Year: 1996
Pages: 171

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net