daload 0x31
Pops an array and an index; pushes the double element.
- Opcode
0x31(49)- Family
- Arrays
- Operands
- none
- Length
- 1 byte
- Operand stack
…, arrayref, index → …, value (double)- Can throw
NullPointerException,ArrayIndexOutOfBoundsException
What it does
Pops an array (double[]) and an index; pushes the element at that index.
How often javac uses it
In JDK 25.0.5's java.base module, daload appears 351 times in 34 of its 7,391 classes: 0.02% of all instructions, the 130th most common of 194 opcodes in use. Some of the methods that use it: java.io.ObjectOutputStream$BlockDataOutputStream.writeDoubles, java.lang.classfile.AnnotationValue.of, java.lang.FdLibm$Atan.compute, java.lang.FdLibm$Cos.compute.
Example
From the sample classes, compiled by javac 25 with -g. Each Java line is shown above the bytecode it compiled to; daload is highlighted.
static int arrays(int n) in Tour, compiled by javac 25Related instructions
dastore Pops an array, an index and a double value; stores the value in the array.arraylength Pops an array; pushes its length.newarray Pops a length; pushes a new array of a primitive type.
Specification: JVMS §6.5, daload (Java SE 25).