问题
ByteCode:ldc pushes a one-word constant onto the operand stack. ldc takes a single parameter, , which is the value to push.
Most of the bytecodes in JVM can figure out their name by the code description. However, the ldc, I don't see any clue.
回答1:
I suppose it is LoaD Constant but I do not have any reference.
回答2:
It is Load Constant. It loads an item from the constant pool onto the stack. The available types are:
int
float
java.lang.String
java.lang.Class
The Java 7 JVM added java.lang.invoke.MethodType and java.lang.invoke.MethodHandle.
The special variant ldc2_w
will load an item of either long
or double
type onto the stack.
来源:https://stackoverflow.com/questions/28264012/im-curious-about-what-ldc-short-for-in-jvm