/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Shared constants
* @author John Rose
*/
class Constants {
private Constants(){}
/*
Java Class Version numbers history
1.0 to 1.3.X 45,3
1.4 to 1.4.X 46,0
1.5 to 1.5.X 49,0
1.6 to 1.5.x 50,0 NOTE Assumed for now
*/
// pseudo-constants:
// pseudo-access bits
// attribute "context types"
= { "class", "field", "method", "code" };
// predefined attr bits
public static final int
// File option bits, from LSB in ascending bit position.
// Archive option bits, from LSB in ascending bit position:
// visitRefs modes:
// some comstantly empty containers
public final static int[] noInts = {};
public final static byte[] noBytes = {};
// meta-coding
public final static int
// bytecodes
public final static int
// End marker, used to terminate bytecode sequences:
// Escapes:
// Self-relative pseudo-opcodes for better compression.
// A "linker op" is a bytecode which links to a class member.
// (But in what follows, "invokeinterface" ops are excluded.)
//
// A "self linker op" is a variant bytecode which works only
// with the current class or its super. Because the number of
// possible targets is small, it admits a more compact encoding.
// Self linker ops are allowed to absorb a previous "aload_0" op.
// There are (7 * 4) self linker ops (super or not, aload_0 or not).
//
// For simplicity, we define the full symmetric set of variants.
// However, some of them are relatively useless.
// Self linker ops are enabled by Pack.selfCallVariants (true).
// An "invoke init" op is a variant of invokespecial which works
// only with the method name "<init>". There are variants which
// link to the current class, the super class, or the class of the
// immediately previous "newinstance" op. There are 3 of these ops.
// They all take method signature references as operands.
// Invoke init ops are enabled by Pack.initCallVariants (true).
// linker variant limit == 202+(7*4)+3 == 233
// Ldc variants support strongly typed references to constants.
// This lets us index constant pool entries completely according to tag,
// which is a great simplification.
// Ldc variants gain us only 0.007% improvement in compression ratio,
// but they simplify the file format greatly.
}