15.

prev next contents
iconst_m1

push the integer constant -1

Jasmin Syntax
     iconst_m1 
Stack

Before

After
...
-1

...
Description

This instruction pushes the int -1 onto the operand stack.

Bytecode

Type

Description
u1
iconst_m1 opcode = 0x02 (2)
See Also

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

Notes

You could also use bipush -1, sipush -1 or ldc -1 to achieve the same effect, although iconst_m1 is typically more efficient and uses fewer bytes in the bytecode.


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