
ct.bytecode-infrastructure_2.12.4.0.0.source-code.JVMInstructions.xsd Maven / Gradle / Ivy
The newest version!
This schema defines which information is specified for each Java Virtual
Machine's instruction. If a JVM instruction is fully specified w.r.t.
this schema it is then possible to, e.g., automatically derive or generate a Java /
Scala /... class to represent the instruction. Those
information necessary to derive a class file reader and those information that are
necessary for standard control and data flow analyses are immediately available.
License (BSD Style License): Copyright (c) 2009-2012
Michael Eichberg www.opal-project.de All rights
reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. - Redistributions
in binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided
with the distribution. - The names of its contributors may not be used
to endorse or promote products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
June, 16 2012
Root element of the list of all instructions.
A description of the properties of a JVM instruction.
An instruction is either a specialized instruction, a parameterized
instruction or "just" an instruction. A specialized instruction
is an instruction which can be replaced by another (more general)
instruction which has the same runtime semantics. E.g., the aload_0
instruction is a specialized variant of the aload (local_variable_index : Int)
instruction.
A short description of the semantics of a JVM
instruction.
Some instructions are statically parameterized; i.e.
information about the runtime semantics of the instruction and when and
how the instruction can be used is encoded by the instruction as such; this
information can be made explicit by parameterizing the instruction.
E.g. i2d is a cast instruction
that casts an int value to a double value.
A parameterized instruction is an instruction that belongs to a certain
category of instructions, but for which no other instruction exists that
could be used instead.
A parameterized instruction does not have to declare a parameter.
If we just want to identify that an instruction belongs to a certain
category (e.g. that ldc_w belongs to the category of push instruction.)
no specific parameter is specified.
Identifies the generic instruction for this specialized instruction.
The generic instruction is an instruction that has at most one parameter and given the parameter
has excatly the same runtime semantics. E.g. aload(local_variable_index = 0) is (from the point of view of
the runtime behavior) exactly the same as aload_0.
The value that needs to be used to initialize the base instruction
when this specialized instruction is represented using the generic base instruction. The
value can be either fixed or it can be a reference to a value.
Definition of the class file format of an instruction.
For most instructions only one format is specified (in the following
called the standard format (abbrv.:" std"). But, for some instructions a second
format (the wide format) is defined. When reading a class file, this format needs to
be used if the direct predecessor of this instruction (in the code array) is the
wide instruction.
A list of format elements that precisely
specify an instruction's format.
The specification of a concrete format element.
The id attribute is used to specify data flow dependencies. The type
attribute is used to specify the type of the next format element (if any.)
A format element (implicitly) defines the semantics of the next bytes
in the code array. Furthermore, the format element (implicitly) specifies the number
of bytes that need to be read and how. E.g. in case of the padding_bytes format
element the number of bytes that need to be read depends on the offset of the
instruction in the code array. In case of variable length instructions -
e.g. tableswitch - the number of bytes that need to be read is determined by the
count attribute of the instruction's list "format element".
An instruction's mnemonic; an unsigned byte value.
An unsigned byte value.
A signed byte value.
An unsigned short value.
A signed short value.
A signed int value.
An unsigned byte that identifies the type of the array according to the following table:
int T_BOOLEAN = 4
int T_CHARACTER = 5
int T_FLOAT = 6
int T_DOUBLE = 7
int T_BYTE = 8
int T_SHORT = 9
int T_INT = 10
int T_LONG = 11
An index in the constant pool (an unsigned short value)
referring to a CONSTANT_InvokeDynamic_info structure (Java 7).
An index in the constant pool (an unsigned short value)
referring to a methodref info structure.
An index in the constant pool (an unsigned short value)
referring to an interface methodref structure. Actually, an
interface methodref and a "simple" methodref structure are
structurally equal.
An index in the constant pool referring to a fieldref
entry .
An index in the constant pool referring to a
Constant_class entry that identifies either a class, interface or array type .
An index in the constant pool referring to a
Constant_class entry that identifies either a class or interface type .
An index in the constant pool referring to a constant
value (int, float, long, double, string, class, method type, method handle) or a
dynamically loaded constant.
An index in the constant pool (an unsigned short value).
Execution proceeds at that offset
from the address of the opcode of the given instruction.
(A signed short value).
Execution proceeds at that offset
from the address of the opcode of the given instruction.
(A signed int value).
The padding bytes format element does not have a fixed length; instead
the length is determined by the offset of the instruction / the offset (w.r.t. the
code array) of the next following information. The padding bytes format element is
used when it is "necessary" that the next information is aligned to a word (4Byte)
address. Hence, if the padding bytes format element is encountered between zero and
three bytes have to be read. The content of the following padding bytes does not
matter and can be ignored.
By today's standards this element is no longer meaningful.
The next byte value always has a fixed value or no meaningful value;
hence, it is not necessary to store the value.
Description of the exceptions that can regularly occur when
the instruction is executed.
Enumeration of all exceptions that might be thrown due to the execution
of a particular instruction. I.e., this list only encompasses those exceptions that
are directly related to the execution of a particular instruction. General errors
(exceptions), such as "VirtualMachineError", which are not related to a specific
exception are not listed.
All these instruction are defined in the package java.lang .
The standard operators. eq = equal; ne = not equal;
ge = greater or equal; le = less or equal; lt = less than; gt = greate than.
The JVM's computational types. (Type 1 are those
values that occupy just one stack slot and Type 2 are those
values that require two stack slots.)
This is an internal type used for documentation purposes
only.
One of the following values: int, float, reference, return_address
One of the following values: long, double
All concrete types specified by the JVM Specification.
This is an internal type used for documentation purposes
only.
Each reference is either an objectref, an arrayref or a
null value. An instruction is specified as operating on an reference, if further
information is not available.
An objectref is a reference to an object which is not an
array and which is not null. Hence, this term is used in a more limited
way when compared to the JVM spec.
An array reference.
Representation of the null value.
All primitive values.
This is an internal type used for documentation purposes
only.
If the name starts with a "$" then it is a reference to the place
where the value is actually determined.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy