| ldc_w | |
| indexbyte1 | |
| indexbyte2 |
Description
The unsigned indexbyte1 and indexbyte2 are assembled into an unsigned 16-bit index into the constant pool of the current class (§3.6), where the value of the index is calculated as (indexbyte1 << 8) | indexbyte2. The index must be a valid index into the constant pool of the current class. The constant pool entry at the index must be a CONSTANT_Integer (§4.4.4), CONSTANT_Float (§4.4.4), or CONSTANT_String (§4.4.3). The constant pool entry is resolved (§5.4, §5.5). If the entry is a CONSTANT_Integer or CONSTANT_Float, it must contain a numeric item which is pushed onto the operand stack as an int or float, respectively.
If the entry at the constant pool index is a CONSTANT_String, it must contain a CONSTANT_Utf8 (§4.4.7) string. An instance of class String is created and initialized to the CONSTANT_Utf8 string. The item, a reference to the instance, is pushed onto the operand stack.
Linking Exceptions
During resolution of a CONSTANT_String constant pool item, any of the exceptions documented in §5.4 can be thrown.
Contents | Prev | Next | Index
Java Virtual Machine Specification (HTML generated by dkramer on February 25, 1997)
Copyright © 1996 Sun Microsystems, Inc.
All rights reserved
Please send any comments or corrections to doug.kramer@sun.com