01: /*
02: *
03: *
04: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
05: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License version
09: * 2 only, as published by the Free Software Foundation.
10: *
11: * This program is distributed in the hope that it will be useful, but
12: * WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * General Public License version 2 for more details (a copy is
15: * included at /legal/license.txt).
16: *
17: * You should have received a copy of the GNU General Public License
18: * version 2 along with this work; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA
21: *
22: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23: * Clara, CA 95054 or visit www.sun.com if you need additional
24: * information or have any questions.
25: */
26:
27: package vm;
28:
29: /*
30: * Constants used by the Java linker which are not exported in any
31: * direct way from the Java runtime or compiler.
32: * These are constants of the VM implementation.
33: * Figure out how to do separate JVM and EVM versions.
34: * For the time being, this is the EVM Version.
35: * This does not include class-file-related constants, which are in
36: * ClassFileConst, or the opcode values or names, which are in the
37: * derived file OpcodeConst.
38: */
39:
40: public interface VMConst {
41:
42: public static int sysLockFlag = 1;
43: public static int resolvedFlag = 2;
44: public static int errorFlag = 4;
45: public static int softRefFlag = 0x8;
46: public static int initializedFlag = 0x10;
47: public static int linkedFlag = 0x20;
48: public static int verifiedFlag = 0x40;
49: public static int primitiveFlag = 0x100;
50: public static int referencedFlag = 0x200;
51: public static int stickyFlag = 0x400;
52: public static int scannableFlag = 0x1000;
53: public static int hasFinalizerFlag = 0x2000;
54:
55: public static int classFlags = sysLockFlag | initializedFlag
56: | linkedFlag | resolvedFlag | stickyFlag;
57:
58: // For now, perform no inlining of methods
59: public static final int noinlineFlag = 0x1 << 24;
60:
61: public static final int OBJ_FLAG_CLASS_ARRAY = 1;
62: public static final int OBJ_FLAG_BYTE_ARRAY = 3;
63: public static final int OBJ_FLAG_SHORT_ARRAY = 5;
64: public static final int OBJ_FLAG_INT_ARRAY = 7;
65: public static final int OBJ_FLAG_LONG_ARRAY = 9;
66: public static final int OBJ_FLAG_FLOAT_ARRAY = 11;
67: public static final int OBJ_FLAG_DOUBLE_ARRAY = 13;
68: public static final int OBJ_FLAG_BOOLEAN_ARRAY = 15;
69: public static final int OBJ_FLAG_CHAR_ARRAY = 17;
70:
71: /**
72: * From src/share/java/include/tree.h
73: */
74: public static final int ACC_DOUBLEWORD = 0x4000;
75: public static final int ACC_REFERENCE = 0x8000;
76:
77: public static final byte ROM_Initializing = 0x01;
78: public static final byte ROM_Initialized = 0x02;
79:
80: public static final byte INVOKE_JAVA_METHOD = 0;
81: public static final byte INVOKE_SYNCHRONIZED_JAVA_METHOD = 1;
82: public static final byte INVOKE_NATIVE_METHOD = 2;
83: public static final byte INVOKE_SYNCHRONIZED_NATIVE_METHOD = 3;
84: public static final byte INVOKE_JNI_NATIVE_METHOD = 4;
85: public static final byte INVOKE_JNI_SYNCHRONIZED_NATIVE_METHOD = 5;
86: public static final byte INVOKE_LAZY_NATIVE_METHOD = 6;
87: public static final byte INVOKE_ABSTRACT_METHOD = 7;
88: public static final byte INVOKE_COMPILED_METHOD = 8;
89: public static final byte INVOKE_UNSAFE = 9;
90:
91: }
|