Java Virtual Machine (Java Series)

prev next contents
dconst_<d>

push the double 0.0 or 1.0

Jasmin Syntax

dconst_0 or dconst_1

Stack

Before

After
... <d>-word1
<d>-word2
...
Description

dconst_<d> pushes the constant double precision floating point number <d> onto the stack, where <d> is either 0 or 1. For example, to push the double precision float 0.0 onto the stack, use:

dconst_0 ; push the double 0.0 onto the stack Note that you could also use:

ldc2_w 0.0 ; push the double 0.0 onto the stack although this instruction takes more space in the class file and is typically less efficient.

Example

dconst_0 ; push the double 0.0 onto the stack dconst_1 ; push the double 1.0 onto the stack Bytecode

Type

Description
u1 dconst_0 opcode = 0x0E (14)
u1 dconst_1 opcode = 0x0F (15)
See Also

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


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

Категории