提交 4f09cdc2 编写于 作者: O ohair

6732421: Removed old javavm and Classic VM files from the jdk7 sources

Reviewed-by: alanb
上级 89437204
......@@ -451,7 +451,7 @@ vpath %.$(OBJECT_SUFFIX) $(OBJDIR)
# namely jni.h, jvm.h, and jni_utils.h, plus their platform-specific
# relatives.
#
VPATH.h = $(PLATFORM_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/javavm/include$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/javavm/include
VPATH.h = $(PLATFORM_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/javavm/export
vpath %.h $(VPATH.h)
#
......
#
# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -52,12 +52,6 @@ FILES_c = \
check_code.c \
check_format.c
#
# libverify.so needs these 2 header files (opcodes.h opcodes.length)
# from the VM.
#
CPPFLAGS += -I$(SHARE_SRC)/javavm/include
#
# Targets.
#
......
......@@ -145,7 +145,6 @@ Notes on using CND (C/C++ pack) with this project and NetBeans.
(a somewhat complete list of awt and 2d native directories on windows):
../../src/share/javavm/export;
../../src/share/javavm/include;
../../src/share/native/common;
../../src/share/native/sun/awt/debug;
../../src/share/native/sun/awt/image/cvutils;
......
/*
* Copyright 2002 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -37,7 +37,6 @@
#include "bool.h"
#include "utf.h"
#include "tree.h"
#include "sys_api.h"
extern bool_t verify_class_codes(ClassClass *cb);
......
/*
* Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -41,7 +41,6 @@
#include "ArrayReferenceImpl.h"
#include "EventRequestImpl.h"
#include "StackFrameImpl.h"
#include "typedefs.h"
static void **l1Array;
......
/*
* Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -48,7 +48,6 @@
#include "util.h"
#include "proc_md.h"
#include "typedefs.h"
/* Maximim length of a message */
#define MAX_MESSAGE_LEN MAXPATHLEN*2+512
......
/*
* Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -30,7 +30,6 @@
#include "bag.h"
#include "commonRef.h"
#include "FrameID.h"
#include "typedefs.h"
#define INITIAL_REF_ALLOC 50
#define SMALLEST(a, b) ((a) < (b)) ? (a) : (b)
......
/*
* Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -26,8 +26,6 @@
#ifndef JDWP_OUTSTREAM_H
#define JDWP_OUTSTREAM_H
#include "typedefs.h"
#include "transport.h"
#include "FrameID.h"
......
/*
* Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,15 +23,14 @@
* have any questions.
*/
#include <jni.h>
#include "JPLISAgent.h"
#include "JPLISAssert.h"
#include "Utilities.h"
#include "JavaExceptions.h"
#include "FileSystemSupport.h" /* For uintptr_t */
#include "sun_instrument_InstrumentationImpl.h"
#include "typedefs.h"
/*
* Copyright 2003 Wily Technology, Inc.
......
......@@ -38,10 +38,9 @@
#include "JavaExceptions.h"
#include "EncodingSupport.h"
#include "FileSystemSupport.h" /* MAXPATHLEN */
#include "FileSystemSupport.h" /* For MAXPATHLEN & uintptr_t */
#include "sun_instrument_InstrumentationImpl.h"
#include "typedefs.h"
/*
* The JPLISAgent manages the initialization all of the Java programming language Agents.
......
......@@ -948,90 +948,8 @@ JVM_ReleaseUTF(const char *utf);
JNIEXPORT jboolean JNICALL
JVM_IsSameClassPackage(JNIEnv *env, jclass class1, jclass class2);
/* Constants in class files */
#define JVM_ACC_PUBLIC 0x0001 /* visible to everyone */
#define JVM_ACC_PRIVATE 0x0002 /* visible only to the defining class */
#define JVM_ACC_PROTECTED 0x0004 /* visible to subclasses */
#define JVM_ACC_STATIC 0x0008 /* instance variable is static */
#define JVM_ACC_FINAL 0x0010 /* no further subclassing, overriding */
#define JVM_ACC_SYNCHRONIZED 0x0020 /* wrap method call in monitor lock */
#define JVM_ACC_SUPER 0x0020 /* funky handling of invokespecial */
#define JVM_ACC_VOLATILE 0x0040 /* can not cache in registers */
#define JVM_ACC_BRIDGE 0x0040 /* bridge method generated by compiler */
#define JVM_ACC_TRANSIENT 0x0080 /* not persistant */
#define JVM_ACC_VARARGS 0x0080 /* method declared with variable number of args */
#define JVM_ACC_NATIVE 0x0100 /* implemented in C */
#define JVM_ACC_INTERFACE 0x0200 /* class is an interface */
#define JVM_ACC_ABSTRACT 0x0400 /* no definition provided */
#define JVM_ACC_STRICT 0x0800 /* strict floating point */
#define JVM_ACC_SYNTHETIC 0x1000 /* compiler-generated class, method or field */
#define JVM_ACC_ANNOTATION 0x2000 /* annotation type */
#define JVM_ACC_ENUM 0x4000 /* field is declared as element of enum */
#define JVM_ACC_PUBLIC_BIT 0
#define JVM_ACC_PRIVATE_BIT 1
#define JVM_ACC_PROTECTED_BIT 2
#define JVM_ACC_STATIC_BIT 3
#define JVM_ACC_FINAL_BIT 4
#define JVM_ACC_SYNCHRONIZED_BIT 5
#define JVM_ACC_SUPER_BIT 5
#define JVM_ACC_VOLATILE_BIT 6
#define JVM_ACC_BRIDGE_BIT 6
#define JVM_ACC_TRANSIENT_BIT 7
#define JVM_ACC_VARARGS_BIT 7
#define JVM_ACC_NATIVE_BIT 8
#define JVM_ACC_INTERFACE_BIT 9
#define JVM_ACC_ABSTRACT_BIT 10
#define JVM_ACC_STRICT_BIT 11
#define JVM_ACC_SYNTHETIC_BIT 12
#define JVM_ACC_ANNOTATION_BIT 13
#define JVM_ACC_ENUM_BIT 14
enum {
JVM_CONSTANT_Utf8 = 1,
JVM_CONSTANT_Unicode, /* unused */
JVM_CONSTANT_Integer,
JVM_CONSTANT_Float,
JVM_CONSTANT_Long,
JVM_CONSTANT_Double,
JVM_CONSTANT_Class,
JVM_CONSTANT_String,
JVM_CONSTANT_Fieldref,
JVM_CONSTANT_Methodref,
JVM_CONSTANT_InterfaceMethodref,
JVM_CONSTANT_NameAndType
};
/* Used in the newarray instruction. */
#define JVM_T_BOOLEAN 4
#define JVM_T_CHAR 5
#define JVM_T_FLOAT 6
#define JVM_T_DOUBLE 7
#define JVM_T_BYTE 8
#define JVM_T_SHORT 9
#define JVM_T_INT 10
#define JVM_T_LONG 11
/* JVM method signatures */
#define JVM_SIGNATURE_ARRAY '['
#define JVM_SIGNATURE_BYTE 'B'
#define JVM_SIGNATURE_CHAR 'C'
#define JVM_SIGNATURE_CLASS 'L'
#define JVM_SIGNATURE_ENDCLASS ';'
#define JVM_SIGNATURE_ENUM 'E'
#define JVM_SIGNATURE_FLOAT 'F'
#define JVM_SIGNATURE_DOUBLE 'D'
#define JVM_SIGNATURE_FUNC '('
#define JVM_SIGNATURE_ENDFUNC ')'
#define JVM_SIGNATURE_INT 'I'
#define JVM_SIGNATURE_LONG 'J'
#define JVM_SIGNATURE_SHORT 'S'
#define JVM_SIGNATURE_VOID 'V'
#define JVM_SIGNATURE_BOOLEAN 'Z'
/* Get classfile constants */
#include "classfile_constants.h"
/*
* A function defined by the byte-code verifier and called by the VM.
......@@ -1329,23 +1247,6 @@ JVM_GetSockOpt(jint fd, int level, int optname, char *optval, int *optlen);
JNIEXPORT jint JNICALL
JVM_SetSockOpt(jint fd, int level, int optname, const char *optval, int optlen);
/*
* These routines are only reentrant on Windows
*/
#ifdef WIN32
JNIEXPORT struct protoent * JNICALL
JVM_GetProtoByName(char* name);
JNIEXPORT struct hostent* JNICALL
JVM_GetHostByAddr(const char* name, int len, int type);
JNIEXPORT struct hostent* JNICALL
JVM_GetHostByName(char* name);
#endif /* _WINDOWS */
JNIEXPORT int JNICALL
JVM_GetHostName(char* name, int namelen);
......
/*
* Copyright 1998-2003 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
#ifndef _JAVASOFT_OPCODES_H_
#define _JAVASOFT_OPCODES_H_
typedef enum {
opc_nop = 0,
opc_aconst_null = 1,
opc_iconst_m1 = 2,
opc_iconst_0 = 3,
opc_iconst_1 = 4,
opc_iconst_2 = 5,
opc_iconst_3 = 6,
opc_iconst_4 = 7,
opc_iconst_5 = 8,
opc_lconst_0 = 9,
opc_lconst_1 = 10,
opc_fconst_0 = 11,
opc_fconst_1 = 12,
opc_fconst_2 = 13,
opc_dconst_0 = 14,
opc_dconst_1 = 15,
opc_bipush = 16,
opc_sipush = 17,
opc_ldc = 18,
opc_ldc_w = 19,
opc_ldc2_w = 20,
opc_iload = 21,
opc_lload = 22,
opc_fload = 23,
opc_dload = 24,
opc_aload = 25,
opc_iload_0 = 26,
opc_iload_1 = 27,
opc_iload_2 = 28,
opc_iload_3 = 29,
opc_lload_0 = 30,
opc_lload_1 = 31,
opc_lload_2 = 32,
opc_lload_3 = 33,
opc_fload_0 = 34,
opc_fload_1 = 35,
opc_fload_2 = 36,
opc_fload_3 = 37,
opc_dload_0 = 38,
opc_dload_1 = 39,
opc_dload_2 = 40,
opc_dload_3 = 41,
opc_aload_0 = 42,
opc_aload_1 = 43,
opc_aload_2 = 44,
opc_aload_3 = 45,
opc_iaload = 46,
opc_laload = 47,
opc_faload = 48,
opc_daload = 49,
opc_aaload = 50,
opc_baload = 51,
opc_caload = 52,
opc_saload = 53,
opc_istore = 54,
opc_lstore = 55,
opc_fstore = 56,
opc_dstore = 57,
opc_astore = 58,
opc_istore_0 = 59,
opc_istore_1 = 60,
opc_istore_2 = 61,
opc_istore_3 = 62,
opc_lstore_0 = 63,
opc_lstore_1 = 64,
opc_lstore_2 = 65,
opc_lstore_3 = 66,
opc_fstore_0 = 67,
opc_fstore_1 = 68,
opc_fstore_2 = 69,
opc_fstore_3 = 70,
opc_dstore_0 = 71,
opc_dstore_1 = 72,
opc_dstore_2 = 73,
opc_dstore_3 = 74,
opc_astore_0 = 75,
opc_astore_1 = 76,
opc_astore_2 = 77,
opc_astore_3 = 78,
opc_iastore = 79,
opc_lastore = 80,
opc_fastore = 81,
opc_dastore = 82,
opc_aastore = 83,
opc_bastore = 84,
opc_castore = 85,
opc_sastore = 86,
opc_pop = 87,
opc_pop2 = 88,
opc_dup = 89,
opc_dup_x1 = 90,
opc_dup_x2 = 91,
opc_dup2 = 92,
opc_dup2_x1 = 93,
opc_dup2_x2 = 94,
opc_swap = 95,
opc_iadd = 96,
opc_ladd = 97,
opc_fadd = 98,
opc_dadd = 99,
opc_isub = 100,
opc_lsub = 101,
opc_fsub = 102,
opc_dsub = 103,
opc_imul = 104,
opc_lmul = 105,
opc_fmul = 106,
opc_dmul = 107,
opc_idiv = 108,
opc_ldiv = 109,
opc_fdiv = 110,
opc_ddiv = 111,
opc_irem = 112,
opc_lrem = 113,
opc_frem = 114,
opc_drem = 115,
opc_ineg = 116,
opc_lneg = 117,
opc_fneg = 118,
opc_dneg = 119,
opc_ishl = 120,
opc_lshl = 121,
opc_ishr = 122,
opc_lshr = 123,
opc_iushr = 124,
opc_lushr = 125,
opc_iand = 126,
opc_land = 127,
opc_ior = 128,
opc_lor = 129,
opc_ixor = 130,
opc_lxor = 131,
opc_iinc = 132,
opc_i2l = 133,
opc_i2f = 134,
opc_i2d = 135,
opc_l2i = 136,
opc_l2f = 137,
opc_l2d = 138,
opc_f2i = 139,
opc_f2l = 140,
opc_f2d = 141,
opc_d2i = 142,
opc_d2l = 143,
opc_d2f = 144,
opc_i2b = 145,
opc_i2c = 146,
opc_i2s = 147,
opc_lcmp = 148,
opc_fcmpl = 149,
opc_fcmpg = 150,
opc_dcmpl = 151,
opc_dcmpg = 152,
opc_ifeq = 153,
opc_ifne = 154,
opc_iflt = 155,
opc_ifge = 156,
opc_ifgt = 157,
opc_ifle = 158,
opc_if_icmpeq = 159,
opc_if_icmpne = 160,
opc_if_icmplt = 161,
opc_if_icmpge = 162,
opc_if_icmpgt = 163,
opc_if_icmple = 164,
opc_if_acmpeq = 165,
opc_if_acmpne = 166,
opc_goto = 167,
opc_jsr = 168,
opc_ret = 169,
opc_tableswitch = 170,
opc_lookupswitch = 171,
opc_ireturn = 172,
opc_lreturn = 173,
opc_freturn = 174,
opc_dreturn = 175,
opc_areturn = 176,
opc_return = 177,
opc_getstatic = 178,
opc_putstatic = 179,
opc_getfield = 180,
opc_putfield = 181,
opc_invokevirtual = 182,
opc_invokespecial = 183,
opc_invokestatic = 184,
opc_invokeinterface = 185,
opc_xxxunusedxxx = 186,
opc_new = 187,
opc_newarray = 188,
opc_anewarray = 189,
opc_arraylength = 190,
opc_athrow = 191,
opc_checkcast = 192,
opc_instanceof = 193,
opc_monitorenter = 194,
opc_monitorexit = 195,
opc_wide = 196,
opc_multianewarray = 197,
opc_ifnull = 198,
opc_ifnonnull = 199,
opc_goto_w = 200,
opc_jsr_w = 201,
opc_breakpoint = 202,
opc_ldc_quick = 203,
opc_ldc_w_quick = 204,
opc_ldc2_w_quick = 205,
opc_getfield_quick = 206,
opc_putfield_quick = 207,
opc_getfield2_quick = 208,
opc_putfield2_quick = 209,
opc_getstatic_quick = 210,
opc_putstatic_quick = 211,
opc_getstatic2_quick = 212,
opc_putstatic2_quick = 213,
opc_invokevirtual_quick = 214,
opc_invokenonvirtual_quick = 215,
opc_invokesuper_quick = 216,
opc_invokestatic_quick = 217,
opc_invokeinterface_quick = 218,
opc_invokevirtualobject_quick = 219,
opc_invokeignored_quick = 220,
opc_new_quick = 221,
opc_anewarray_quick = 222,
opc_multianewarray_quick = 223,
opc_checkcast_quick = 224,
opc_instanceof_quick = 225,
opc_invokevirtual_quick_w = 226,
opc_getfield_quick_w = 227,
opc_putfield_quick_w = 228,
opc_nonnull_quick = 229,
opc_first_unused_index = 230,
opc_software = 254,
opc_hardware = 255,
opc_dummy = (int)0xF0000000U /* portability change, opc_invokeinit in the
* verifier requires more than 8 bits.
*/
} opcode_type;
#endif /* !_JAVASOFT_OPCODES_H_ */
/*
* Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
const short opcode_length[256] = {
1, /* nop */
1, /* aconst_null */
1, /* iconst_m1 */
1, /* iconst_0 */
1, /* iconst_1 */
1, /* iconst_2 */
1, /* iconst_3 */
1, /* iconst_4 */
1, /* iconst_5 */
1, /* lconst_0 */
1, /* lconst_1 */
1, /* fconst_0 */
1, /* fconst_1 */
1, /* fconst_2 */
1, /* dconst_0 */
1, /* dconst_1 */
2, /* bipush */
3, /* sipush */
2, /* ldc */
3, /* ldc_w */
3, /* ldc2_w */
2, /* iload */
2, /* lload */
2, /* fload */
2, /* dload */
2, /* aload */
1, /* iload_0 */
1, /* iload_1 */
1, /* iload_2 */
1, /* iload_3 */
1, /* lload_0 */
1, /* lload_1 */
1, /* lload_2 */
1, /* lload_3 */
1, /* fload_0 */
1, /* fload_1 */
1, /* fload_2 */
1, /* fload_3 */
1, /* dload_0 */
1, /* dload_1 */
1, /* dload_2 */
1, /* dload_3 */
1, /* aload_0 */
1, /* aload_1 */
1, /* aload_2 */
1, /* aload_3 */
1, /* iaload */
1, /* laload */
1, /* faload */
1, /* daload */
1, /* aaload */
1, /* baload */
1, /* caload */
1, /* saload */
2, /* istore */
2, /* lstore */
2, /* fstore */
2, /* dstore */
2, /* astore */
1, /* istore_0 */
1, /* istore_1 */
1, /* istore_2 */
1, /* istore_3 */
1, /* lstore_0 */
1, /* lstore_1 */
1, /* lstore_2 */
1, /* lstore_3 */
1, /* fstore_0 */
1, /* fstore_1 */
1, /* fstore_2 */
1, /* fstore_3 */
1, /* dstore_0 */
1, /* dstore_1 */
1, /* dstore_2 */
1, /* dstore_3 */
1, /* astore_0 */
1, /* astore_1 */
1, /* astore_2 */
1, /* astore_3 */
1, /* iastore */
1, /* lastore */
1, /* fastore */
1, /* dastore */
1, /* aastore */
1, /* bastore */
1, /* castore */
1, /* sastore */
1, /* pop */
1, /* pop2 */
1, /* dup */
1, /* dup_x1 */
1, /* dup_x2 */
1, /* dup2 */
1, /* dup2_x1 */
1, /* dup2_x2 */
1, /* swap */
1, /* iadd */
1, /* ladd */
1, /* fadd */
1, /* dadd */
1, /* isub */
1, /* lsub */
1, /* fsub */
1, /* dsub */
1, /* imul */
1, /* lmul */
1, /* fmul */
1, /* dmul */
1, /* idiv */
1, /* ldiv */
1, /* fdiv */
1, /* ddiv */
1, /* irem */
1, /* lrem */
1, /* frem */
1, /* drem */
1, /* ineg */
1, /* lneg */
1, /* fneg */
1, /* dneg */
1, /* ishl */
1, /* lshl */
1, /* ishr */
1, /* lshr */
1, /* iushr */
1, /* lushr */
1, /* iand */
1, /* land */
1, /* ior */
1, /* lor */
1, /* ixor */
1, /* lxor */
3, /* iinc */
1, /* i2l */
1, /* i2f */
1, /* i2d */
1, /* l2i */
1, /* l2f */
1, /* l2d */
1, /* f2i */
1, /* f2l */
1, /* f2d */
1, /* d2i */
1, /* d2l */
1, /* d2f */
1, /* i2b */
1, /* i2c */
1, /* i2s */
1, /* lcmp */
1, /* fcmpl */
1, /* fcmpg */
1, /* dcmpl */
1, /* dcmpg */
3, /* ifeq */
3, /* ifne */
3, /* iflt */
3, /* ifge */
3, /* ifgt */
3, /* ifle */
3, /* if_icmpeq */
3, /* if_icmpne */
3, /* if_icmplt */
3, /* if_icmpge */
3, /* if_icmpgt */
3, /* if_icmple */
3, /* if_acmpeq */
3, /* if_acmpne */
3, /* goto */
3, /* jsr */
2, /* ret */
99, /* tableswitch */
99, /* lookupswitch */
1, /* ireturn */
1, /* lreturn */
1, /* freturn */
1, /* dreturn */
1, /* areturn */
1, /* return */
3, /* getstatic */
3, /* putstatic */
3, /* getfield */
3, /* putfield */
3, /* invokevirtual */
3, /* invokespecial */
3, /* invokestatic */
5, /* invokeinterface */
0, /* xxxunusedxxx */
3, /* new */
2, /* newarray */
3, /* anewarray */
1, /* arraylength */
1, /* athrow */
3, /* checkcast */
3, /* instanceof */
1, /* monitorenter */
1, /* monitorexit */
0, /* wide */
4, /* multianewarray */
3, /* ifnull */
3, /* ifnonnull */
5, /* goto_w */
5, /* jsr_w */
1, /* breakpoint */
2, /* ldc_quick */
3, /* ldc_w_quick */
3, /* ldc2_w_quick */
3, /* getfield_quick */
3, /* putfield_quick */
3, /* getfield2_quick */
3, /* putfield2_quick */
3, /* getstatic_quick */
3, /* putstatic_quick */
3, /* getstatic2_quick */
3, /* putstatic2_quick */
3, /* invokevirtual_quick */
3, /* invokenonvirtual_quick */
3, /* invokesuper_quick */
3, /* invokestatic_quick */
5, /* invokeinterface_quick */
3, /* invokevirtualobject_quick */
3, /* invokeignored_quick */
3, /* new_quick */
3, /* anewarray_quick */
4, /* multianewarray_quick */
3, /* checkcast_quick */
3, /* instanceof_quick */
3, /* invokevirtual_quick_w */
3, /* getfield_quick_w */
3, /* putfield_quick_w */
1, /* nonnull_quick */
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
};
# Copyright 1994-2007 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Sun designates this
# particular file as subject to the "Classpath" exception as provided
# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
# Any line that doesn't have a-z in the 1st column is a comment.
#
# The first column is the name of the opcodes. The second column is the
# total length of the instruction. We use 99 for tableswitch and
# tablelookup, which must always be treated as special cases.
#
# The third and fourth colum give what the opcode pops off the stack, and
# what it then pushes back onto the stack
# - <no effect on stack>
# I integer
# L long integer
# F float
# D double float
# A address [array or object]
# O object only
# R return address (for jsr)
# a integer, array, or object
# ? unknown
# [I], [L], [F], [D], [A], [B], [C], [?]
# array of integer, long, float, double, address, bytes,
# chars, or anything
# 1,2,3,4,+ used by stack duplicating/popping routines.
#
# 1,2,3,4 represent >>any<< stack type except long or double. Two numbers
# separated by a + (in the third column) indicate that the two, together, can
# be used for a double or long. (Or they can represent two non-long items).
#
# The fifth column provides an *approximate* relative cost of executing the
# opcode. It is used by the instruction profiler. See profiler.h for
# blurb.
nop 1 - - 1 /* nop */
aconst_null 1 - A 1 /* push null object */
iconst_m1 1 - I 1 /* push integer constant -1 */
iconst_0 1 - I 1 /* push integer constant 0 */
iconst_1 1 - I 1 /* push integer constant 1 */
iconst_2 1 - I 1 /* push integer constant 2 */
iconst_3 1 - I 1 /* push integer constant 3 */
iconst_4 1 - I 1 /* push integer constant 4 */
iconst_5 1 - I 1 /* push integer constant 5 */
lconst_0 1 - L 1 /* push long 0L */
lconst_1 1 - L 1 /* push long 1L */
fconst_0 1 - F 1 /* push float constant 0.0 */
fconst_1 1 - F 1 /* push float constant 1.0 */
fconst_2 1 - F 1 /* push float constant 2.0 */
dconst_0 1 - D 1 /* push double float constant 0.0d */
dconst_1 1 - D 1 /* push double float constant 1.0d */
bipush 2 - I 1 /* push byte-sized value */
sipush 3 - I 1 /* push two-byte value */
ldc 2 - ? 1 /* load a const from constant table */
ldc_w 3 - ? 1
ldc2_w 3 - ? 1 /* load a 2-word constant . . . */
iload 2 - I 1 /* load local integer variable */
lload 2 - L 1 /* load local long variable */
fload 2 - F 1 /* load local floating variable */
dload 2 - D 1 /* load local double variable */
aload 2 - A 1 /* load local object variable */
iload_0 1 - I 1 /* load local integer variable #0 */
iload_1 1 - I 1 /* load local integer variable #1 */
iload_2 1 - I 1 /* load local integer variable #2 */
iload_3 1 - I 1 /* load local integer variable #3 */
lload_0 1 - L 1 /* load local long variable #0 */
lload_1 1 - L 1 /* load local long variable #1 */
lload_2 1 - L 1 /* load local long variable #2 */
lload_3 1 - L 1 /* load local long variable #3 */
fload_0 1 - F 1 /* load local float variable #0 */
fload_1 1 - F 1 /* load local float variable #1 */
fload_2 1 - F 1 /* load local float variable #2 */
fload_3 1 - F 1 /* load local float variable #3 */
dload_0 1 - D 1 /* load lcl double float variable #0 */
dload_1 1 - D 1 /* load lcl double float variable #1 */
dload_2 1 - D 1 /* load lcl double float variable #2 */
dload_3 1 - D 1 /* load lcl double float variable #3 */
aload_0 1 - A 1 /* load local object variable #0 */
aload_1 1 - A 1 /* load local object variable #1 */
aload_2 1 - A 1 /* load local object variable #2 */
aload_3 1 - A 1 /* load local object variable #3 */
iaload 1 [I]I I 1 /* load from array of integer */
laload 1 [L]I L 1 /* load from array of long */
faload 1 [F]I F 1 /* load from array of float */
daload 1 [D]I D 1 /* load from array of double */
aaload 1 [A]I A 1 /* load from array of object */
baload 1 [B]I I 1 /* load from array of (signed) bytes */
caload 1 [C]I I 1 /* load from array of chars */
saload 1 [S]I I 1 /* load from array of (signed) shorts */
istore 2 I - 1 /* store local integer variable */
lstore 2 L - 1 /* store local long variable */
fstore 2 F - 1 /* store local float variable */
dstore 2 D - 1 /* store local double variable */
astore 2 A - 1 /* store local object variable */
istore_0 1 I - 1 /* store local integer variable #0 */
istore_1 1 I - 1 /* store local integer variable #1 */
istore_2 1 I - 1 /* store local integer variable #2 */
istore_3 1 I - 1 /* store local integer variable #3 */
lstore_0 1 L - 1 /* store local long variable #0 */
lstore_1 1 L - 1 /* store local long variable #1 */
lstore_2 1 L - 1 /* store local long variable #2 */
lstore_3 1 L - 1 /* store local long variable #3 */
fstore_0 1 F - 1 /* store local float variable #0 */
fstore_1 1 F - 1 /* store local float variable #1 */
fstore_2 1 F - 1 /* store local float variable #2 */
fstore_3 1 F - 1 /* store local float variable #3 */
dstore_0 1 D - 1 /* store lcl double float variable #0 */
dstore_1 1 D - 1 /* store lcl double float variable #1 */
dstore_2 1 D - 1 /* store lcl double float variable #2 */
dstore_3 1 D - 1 /* store lcl double float variable #3 */
astore_0 1 A - 1 /* store local object variable #0 */
astore_1 1 A - 1 /* store local object variable #1 */
astore_2 1 A - 1 /* store local object variable #2 */
astore_3 1 A - 1 /* store local object variable #3 */
iastore 1 [I]II - 1 /* store into array of int */
lastore 1 [L]IL - 1 /* store into array of long */
fastore 1 [F]IF - 1 /* store into array of float */
dastore 1 [D]ID - 1 /* store into array of double float */
aastore 1 [A]IA - 1 /* store into array of object */
bastore 1 [B]II - 1 /* store into array of (signed) bytes */
castore 1 [C]II - 1 /* store into array of chars */
sastore 1 [S]II - 1 /* store into array of (signed) shorts*/
pop 1 1 - 1 /* pop top element */
pop2 1 2+1 - 1 /* pop top two elements */
dup 1 1 11 1 /* dup top element */
dup_x1 1 21 121 1 /* dup top element. Skip one */
dup_x2 1 3+21 1321 1 /* dup top element. Skip two */
dup2 1 2+1 2121 1 /* dup top two elements. */
dup2_x1 1 32+1 21321 1 /* dup top two elements. Skip one */
dup2_x2 1 4+32+1 214321 1 /* dup top two elements. Skip two */
swap 1 21 12 1 /* swap top two elements of stack. */
iadd 1 II I 1 /* integer add */
ladd 1 LL L 1 /* long add */
fadd 1 FF F 1 /* floating add */
dadd 1 DD D 1 /* double float add */
isub 1 II I 1 /* integer subtract */
lsub 1 LL L 1 /* long subtract */
fsub 1 FF F 1 /* floating subtract */
dsub 1 DD D 1 /* floating double subtract */
imul 1 II I 1 /* integer multiply */
lmul 1 LL L 1 /* long multiply */
fmul 1 FF F 1 /* floating multiply */
dmul 1 DD D 1 /* double float multiply */
idiv 1 II I 1 /* integer divide */
ldiv 1 LL L 1 /* long divide */
fdiv 1 FF F 1 /* floating divide */
ddiv 1 DD D 1 /* double float divide */
irem 1 II I 1 /* integer mod */
lrem 1 LL L 1 /* long mod */
frem 1 FF F 1 /* floating mod */
drem 1 DD D 1 /* double float mod */
ineg 1 I I 1 /* integer negate */
lneg 1 L L 1 /* long negate */
fneg 1 F F 1 /* floating negate */
dneg 1 D D 1 /* double float negate */
ishl 1 II I 1 /* shift left */
lshl 1 LI L 1 /* long shift left */
ishr 1 II I 1 /* shift right */
lshr 1 LI L 1 /* long shift right */
iushr 1 II I 1 /* unsigned shift right */
lushr 1 LI L 1 /* long unsigned shift right */
iand 1 II I 1 /* boolean and */
land 1 LL L 1 /* long boolean and */
ior 1 II I 1 /* boolean or */
lor 1 LL L 1 /* long boolean or */
ixor 1 II I 1 /* boolean xor */
lxor 1 LL L 1 /* long boolean xor */
iinc 3 - - 1 /* increment lcl variable by constant */
i2l 1 I L 1 /* integer to long */
i2f 1 I F 1 /* integer to float */
i2d 1 I D 1 /* integer to double */
l2i 1 L I 1 /* long to integer */
l2f 1 L F 1 /* long to float */
l2d 1 L D 1 /* long to double */
f2i 1 F I 1 /* float to integer */
f2l 1 F L 1 /* float to long */
f2d 1 F D 1 /* float to double */
d2i 1 D I 1 /* double to integer */
d2l 1 D L 1 /* double to long */
d2f 1 D F 1 /* double to float */
i2b 1 I I 1 /* integer to byte */
i2c 1 I I 1 /* integer to character */
i2s 1 I I 1 /* integer to signed short */
lcmp 1 LL I 1 /* long compare */
fcmpl 1 FF I 1 /* float compare. -1 on incomparable */
fcmpg 1 FF I 1 /* float compare. 1 on incomparable */
dcmpl 1 DD I 1 /* dbl floating cmp. -1 on incomp */
dcmpg 1 DD I 1 /* dbl floating cmp. 1 on incomp */
ifeq 3 I - 1 /* goto if equal */
ifne 3 I - 1 /* goto if not equal */
iflt 3 I - 1 /* goto if less than */
ifge 3 I - 1 /* goto if greater than or equal */
ifgt 3 I - 1 /* goto if greater than */
ifle 3 I - 1 /* goto if less than or equal */
if_icmpeq 3 II - 1 /* compare top two elements of stack */
if_icmpne 3 II - 1 /* compare top two elements of stack */
if_icmplt 3 II - 1 /* compare top two elements of stack */
if_icmpge 3 II - 1 /* compare top two elements of stack */
if_icmpgt 3 II - 1 /* compare top two elements of stack */
if_icmple 3 II - 1 /* compare top two elements of stack */
if_acmpeq 3 AA - 1 /* compare top two objects of stack */
if_acmpne 3 AA - 1 /* compare top two objects of stack */
goto 3 - - 1 /* unconditional goto */
jsr 3 - R 1 /* jump subroutine */
ret 2 - - 1 /* return from subroutine */
tableswitch 99 I - 1 /* goto (case) */
lookupswitch 99 I - 1 /* goto (case) */
ireturn 1 I - 1 /* return integer from procedure */
lreturn 1 L - 1 /* return long from procedure */
freturn 1 F - 1 /* return float from procedure */
dreturn 1 D - 1 /* return double from procedure */
areturn 1 A - 1 /* return object from procedure */
return 1 - - 1 /* return (void) from procedure */
getstatic 3 - ? 1 /* get static field value. */
putstatic 3 ? - 1 /* assign static field value */
getfield 3 A ? 1 /* get field value from object. */
putfield 3 ? - 1 /* assign field value to object. */
invokevirtual 3 ? ? 1 /* call method, based on object. */
invokespecial 3 ? ? 1 /* call method, not based on object. */
invokestatic 3 ? ? 1 /* call a static method. */
invokeinterface 5 ? ? 1 /* call an interface method */
xxxunusedxxx 0 ? ? 1 /* was newfromname */
new 3 - A 1 /* Create a new object */
newarray 2 I A 1 /* Create a new array of non-objects*/
anewarray 3 I A 1 /* Create a new array of objects */
arraylength 1 [?] I 1 /* get length of array */
athrow 1 O - 1 /* throw an exception */
checkcast 3 A A 1 /* error if object not of given type */
instanceof 3 A I 1 /* is object of given type? */
monitorenter 1 A - 1 /* enter a monitored region of code */
monitorexit 1 A - 1 /* exit a monitored region of code */
wide 0 - - 1 /* prefix operation. */
multianewarray 4 ? A 1 /* create multidimensional array */
ifnull 3 A - 1 /* goto if null */
ifnonnull 3 A - 1 /* goto if not null */
# The following instructions are "long" versions. They allow access to
# variables with index greater than 255.
goto_w 5 - - 1 /* unconditional goto. 4byte offset */
jsr_w 5 - R 1 /* jump subroutine. 4byte offset */
breakpoint 1 - - 1 /* call breakpoint handler */
# The compiler will not generate any of the following instructions. That
# are created by the interpreter from the non _quick versions of the
# instructions.
ldc_quick 2 - ? 1
ldc_w_quick 3 - ? 1
ldc2_w_quick 3 - ? 1
getfield_quick 3 A ? 1
putfield_quick 3 ? - 1
getfield2_quick 3 A ? 1
putfield2_quick 3 ? - 1
getstatic_quick 3 - ? 1
putstatic_quick 3 ? - 1
getstatic2_quick 3 - ? 1
putstatic2_quick 3 ? _ 1
invokevirtual_quick 3 ? ? 1
invokenonvirtual_quick 3 ? ? 1
invokesuper_quick 3 ? ? 1
invokestatic_quick 3 ? ? 1
invokeinterface_quick 5 ? ? 1
invokevirtualobject_quick 3 ? ? 1
invokeignored_quick 3 ? ? 1
new_quick 3 - A 1
anewarray_quick 3 I A 1
multianewarray_quick 4 ? A 1
checkcast_quick 3 A A 1
instanceof_quick 3 A I 1
# The following are generated when the offset is bigger than 255
invokevirtual_quick_w 3 ? ? 1
getfield_quick_w 3 A ? 1
putfield_quick_w 3 ? - 1
# used for simplification
nonnull_quick 1 A - 1 /* throw exception if stacktop null */
/*
* Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
char const opcode_weight[256] = {
1, /* nop */
1, /* aconst_null */
1, /* iconst_m1 */
1, /* iconst_0 */
1, /* iconst_1 */
1, /* iconst_2 */
1, /* iconst_3 */
1, /* iconst_4 */
1, /* iconst_5 */
1, /* lconst_0 */
1, /* lconst_1 */
1, /* fconst_0 */
1, /* fconst_1 */
1, /* fconst_2 */
1, /* dconst_0 */
1, /* dconst_1 */
1, /* bipush */
1, /* sipush */
1, /* ldc */
1, /* ldc_w */
1, /* ldc2_w */
1, /* iload */
1, /* lload */
1, /* fload */
1, /* dload */
1, /* aload */
1, /* iload_0 */
1, /* iload_1 */
1, /* iload_2 */
1, /* iload_3 */
1, /* lload_0 */
1, /* lload_1 */
1, /* lload_2 */
1, /* lload_3 */
1, /* fload_0 */
1, /* fload_1 */
1, /* fload_2 */
1, /* fload_3 */
1, /* dload_0 */
1, /* dload_1 */
1, /* dload_2 */
1, /* dload_3 */
1, /* aload_0 */
1, /* aload_1 */
1, /* aload_2 */
1, /* aload_3 */
1, /* iaload */
1, /* laload */
1, /* faload */
1, /* daload */
1, /* aaload */
1, /* baload */
1, /* caload */
1, /* saload */
1, /* istore */
1, /* lstore */
1, /* fstore */
1, /* dstore */
1, /* astore */
1, /* istore_0 */
1, /* istore_1 */
1, /* istore_2 */
1, /* istore_3 */
1, /* lstore_0 */
1, /* lstore_1 */
1, /* lstore_2 */
1, /* lstore_3 */
1, /* fstore_0 */
1, /* fstore_1 */
1, /* fstore_2 */
1, /* fstore_3 */
1, /* dstore_0 */
1, /* dstore_1 */
1, /* dstore_2 */
1, /* dstore_3 */
1, /* astore_0 */
1, /* astore_1 */
1, /* astore_2 */
1, /* astore_3 */
1, /* iastore */
1, /* lastore */
1, /* fastore */
1, /* dastore */
1, /* aastore */
1, /* bastore */
1, /* castore */
1, /* sastore */
1, /* pop */
1, /* pop2 */
1, /* dup */
1, /* dup_x1 */
1, /* dup_x2 */
1, /* dup2 */
1, /* dup2_x1 */
1, /* dup2_x2 */
1, /* swap */
1, /* iadd */
1, /* ladd */
1, /* fadd */
1, /* dadd */
1, /* isub */
1, /* lsub */
1, /* fsub */
1, /* dsub */
1, /* imul */
1, /* lmul */
1, /* fmul */
1, /* dmul */
1, /* idiv */
1, /* ldiv */
1, /* fdiv */
1, /* ddiv */
1, /* irem */
1, /* lrem */
1, /* frem */
1, /* drem */
1, /* ineg */
1, /* lneg */
1, /* fneg */
1, /* dneg */
1, /* ishl */
1, /* lshl */
1, /* ishr */
1, /* lshr */
1, /* iushr */
1, /* lushr */
1, /* iand */
1, /* land */
1, /* ior */
1, /* lor */
1, /* ixor */
1, /* lxor */
1, /* iinc */
1, /* i2l */
1, /* i2f */
1, /* i2d */
1, /* l2i */
1, /* l2f */
1, /* l2d */
1, /* f2i */
1, /* f2l */
1, /* f2d */
1, /* d2i */
1, /* d2l */
1, /* d2f */
1, /* i2b */
1, /* i2c */
1, /* i2s */
1, /* lcmp */
1, /* fcmpl */
1, /* fcmpg */
1, /* dcmpl */
1, /* dcmpg */
1, /* ifeq */
1, /* ifne */
1, /* iflt */
1, /* ifge */
1, /* ifgt */
1, /* ifle */
1, /* if_icmpeq */
1, /* if_icmpne */
1, /* if_icmplt */
1, /* if_icmpge */
1, /* if_icmpgt */
1, /* if_icmple */
1, /* if_acmpeq */
1, /* if_acmpne */
1, /* goto */
1, /* jsr */
1, /* ret */
1, /* tableswitch */
1, /* lookupswitch */
1, /* ireturn */
1, /* lreturn */
1, /* freturn */
1, /* dreturn */
1, /* areturn */
1, /* return */
1, /* getstatic */
1, /* putstatic */
1, /* getfield */
1, /* putfield */
1, /* invokevirtual */
1, /* invokespecial */
1, /* invokestatic */
1, /* invokeinterface */
1, /* xxxunusedxxx */
1, /* new */
1, /* newarray */
1, /* anewarray */
1, /* arraylength */
1, /* athrow */
1, /* checkcast */
1, /* instanceof */
1, /* monitorenter */
1, /* monitorexit */
1, /* wide */
1, /* multianewarray */
1, /* ifnull */
1, /* ifnonnull */
1, /* goto_w */
1, /* jsr_w */
1, /* breakpoint */
1, /* ldc_quick */
1, /* ldc_w_quick */
1, /* ldc2_w_quick */
1, /* getfield_quick */
1, /* putfield_quick */
1, /* getfield2_quick */
1, /* putfield2_quick */
1, /* getstatic_quick */
1, /* putstatic_quick */
1, /* getstatic2_quick */
1, /* putstatic2_quick */
1, /* invokevirtual_quick */
1, /* invokenonvirtual_quick */
1, /* invokesuper_quick */
1, /* invokestatic_quick */
1, /* invokeinterface_quick */
1, /* invokevirtualobject_quick */
1, /* invokeignored_quick */
1, /* new_quick */
1, /* anewarray_quick */
1, /* multianewarray_quick */
1, /* checkcast_quick */
1, /* instanceof_quick */
1, /* invokevirtual_quick_w */
1, /* getfield_quick_w */
1, /* putfield_quick_w */
1, /* nonnull_quick */
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
};
NoWideOpcode(nop)
NoWideOpcode(aconst_null)
NoWideOpcode(iconst_m1)
NoWideOpcode(iconst_0)
NoWideOpcode(iconst_1)
NoWideOpcode(iconst_2)
NoWideOpcode(iconst_3)
NoWideOpcode(iconst_4)
NoWideOpcode(iconst_5)
NoWideOpcode(lconst_0)
NoWideOpcode(lconst_1)
NoWideOpcode(fconst_0)
NoWideOpcode(fconst_1)
NoWideOpcode(fconst_2)
NoWideOpcode(dconst_0)
NoWideOpcode(dconst_1)
NoWideOpcode(bipush)
NoWideOpcode(sipush)
NoWideOpcode(ldc)
NoWideOpcode(ldc_w)
NoWideOpcode(ldc2_w)
WideOpcode(iload)
WideOpcode(lload)
WideOpcode(fload)
WideOpcode(dload)
WideOpcode(aload)
NoWideOpcode(iload_0)
NoWideOpcode(iload_1)
NoWideOpcode(iload_2)
NoWideOpcode(iload_3)
NoWideOpcode(lload_0)
NoWideOpcode(lload_1)
NoWideOpcode(lload_2)
NoWideOpcode(lload_3)
NoWideOpcode(fload_0)
NoWideOpcode(fload_1)
NoWideOpcode(fload_2)
NoWideOpcode(fload_3)
NoWideOpcode(dload_0)
NoWideOpcode(dload_1)
NoWideOpcode(dload_2)
NoWideOpcode(dload_3)
NoWideOpcode(aload_0)
NoWideOpcode(aload_1)
NoWideOpcode(aload_2)
NoWideOpcode(aload_3)
NoWideOpcode(iaload)
NoWideOpcode(laload)
NoWideOpcode(faload)
NoWideOpcode(daload)
NoWideOpcode(aaload)
NoWideOpcode(baload)
NoWideOpcode(caload)
NoWideOpcode(saload)
WideOpcode(istore)
WideOpcode(lstore)
WideOpcode(fstore)
WideOpcode(dstore)
WideOpcode(astore)
NoWideOpcode(istore_0)
NoWideOpcode(istore_1)
NoWideOpcode(istore_2)
NoWideOpcode(istore_3)
NoWideOpcode(lstore_0)
NoWideOpcode(lstore_1)
NoWideOpcode(lstore_2)
NoWideOpcode(lstore_3)
NoWideOpcode(fstore_0)
NoWideOpcode(fstore_1)
NoWideOpcode(fstore_2)
NoWideOpcode(fstore_3)
NoWideOpcode(dstore_0)
NoWideOpcode(dstore_1)
NoWideOpcode(dstore_2)
NoWideOpcode(dstore_3)
NoWideOpcode(astore_0)
NoWideOpcode(astore_1)
NoWideOpcode(astore_2)
NoWideOpcode(astore_3)
NoWideOpcode(iastore)
NoWideOpcode(lastore)
NoWideOpcode(fastore)
NoWideOpcode(dastore)
NoWideOpcode(aastore)
NoWideOpcode(bastore)
NoWideOpcode(castore)
NoWideOpcode(sastore)
NoWideOpcode(pop)
NoWideOpcode(pop2)
NoWideOpcode(dup)
NoWideOpcode(dup_x1)
NoWideOpcode(dup_x2)
NoWideOpcode(dup2)
NoWideOpcode(dup2_x1)
NoWideOpcode(dup2_x2)
NoWideOpcode(swap)
NoWideOpcode(iadd)
NoWideOpcode(ladd)
NoWideOpcode(fadd)
NoWideOpcode(dadd)
NoWideOpcode(isub)
NoWideOpcode(lsub)
NoWideOpcode(fsub)
NoWideOpcode(dsub)
NoWideOpcode(imul)
NoWideOpcode(lmul)
NoWideOpcode(fmul)
NoWideOpcode(dmul)
NoWideOpcode(idiv)
NoWideOpcode(ldiv)
NoWideOpcode(fdiv)
NoWideOpcode(ddiv)
NoWideOpcode(irem)
NoWideOpcode(lrem)
NoWideOpcode(frem)
NoWideOpcode(drem)
NoWideOpcode(ineg)
NoWideOpcode(lneg)
NoWideOpcode(fneg)
NoWideOpcode(dneg)
NoWideOpcode(ishl)
NoWideOpcode(lshl)
NoWideOpcode(ishr)
NoWideOpcode(lshr)
NoWideOpcode(iushr)
NoWideOpcode(lushr)
NoWideOpcode(iand)
NoWideOpcode(land)
NoWideOpcode(ior)
NoWideOpcode(lor)
NoWideOpcode(ixor)
NoWideOpcode(lxor)
WideOpcode(iinc)
NoWideOpcode(i2l)
NoWideOpcode(i2f)
NoWideOpcode(i2d)
NoWideOpcode(l2i)
NoWideOpcode(l2f)
NoWideOpcode(l2d)
NoWideOpcode(f2i)
NoWideOpcode(f2l)
NoWideOpcode(f2d)
NoWideOpcode(d2i)
NoWideOpcode(d2l)
NoWideOpcode(d2f)
NoWideOpcode(i2b)
NoWideOpcode(i2c)
NoWideOpcode(i2s)
NoWideOpcode(lcmp)
NoWideOpcode(fcmpl)
NoWideOpcode(fcmpg)
NoWideOpcode(dcmpl)
NoWideOpcode(dcmpg)
NoWideOpcode(ifeq)
NoWideOpcode(ifne)
NoWideOpcode(iflt)
NoWideOpcode(ifge)
NoWideOpcode(ifgt)
NoWideOpcode(ifle)
NoWideOpcode(if_icmpeq)
NoWideOpcode(if_icmpne)
NoWideOpcode(if_icmplt)
NoWideOpcode(if_icmpge)
NoWideOpcode(if_icmpgt)
NoWideOpcode(if_icmple)
NoWideOpcode(if_acmpeq)
NoWideOpcode(if_acmpne)
NoWideOpcode(goto)
NoWideOpcode(jsr)
WideOpcode(ret)
NoWideOpcode(tableswitch)
NoWideOpcode(lookupswitch)
NoWideOpcode(ireturn)
NoWideOpcode(lreturn)
NoWideOpcode(freturn)
NoWideOpcode(dreturn)
NoWideOpcode(areturn)
NoWideOpcode(return)
NoWideOpcode(getstatic)
NoWideOpcode(putstatic)
NoWideOpcode(getfield)
NoWideOpcode(putfield)
NoWideOpcode(invokevirtual)
NoWideOpcode(invokespecial)
NoWideOpcode(invokestatic)
NoWideOpcode(invokeinterface)
NoWideOpcode(xxxunusedxxx)
NoWideOpcode(new)
NoWideOpcode(newarray)
NoWideOpcode(anewarray)
NoWideOpcode(arraylength)
NoWideOpcode(athrow)
NoWideOpcode(checkcast)
NoWideOpcode(instanceof)
NoWideOpcode(monitorenter)
NoWideOpcode(monitorexit)
NoWideOpcode(wide)
NoWideOpcode(multianewarray)
NoWideOpcode(ifnull)
NoWideOpcode(ifnonnull)
NoWideOpcode(goto_w)
NoWideOpcode(jsr_w)
NoWideOpcode(breakpoint)
NoWideOpcode(ldc_quick)
NoWideOpcode(ldc_w_quick)
NoWideOpcode(ldc2_w_quick)
NoWideOpcode(getfield_quick)
NoWideOpcode(putfield_quick)
NoWideOpcode(getfield2_quick)
NoWideOpcode(putfield2_quick)
NoWideOpcode(getstatic_quick)
NoWideOpcode(putstatic_quick)
NoWideOpcode(getstatic2_quick)
NoWideOpcode(putstatic2_quick)
NoWideOpcode(invokevirtual_quick)
NoWideOpcode(invokenonvirtual_quick)
NoWideOpcode(invokesuper_quick)
NoWideOpcode(invokestatic_quick)
NoWideOpcode(invokeinterface_quick)
NoWideOpcode(invokevirtualobject_quick)
NoWideOpcode(invokeignored_quick)
NoWideOpcode(new_quick)
NoWideOpcode(anewarray_quick)
NoWideOpcode(multianewarray_quick)
NoWideOpcode(checkcast_quick)
NoWideOpcode(instanceof_quick)
NoWideOpcode(invokevirtual_quick_w)
NoWideOpcode(getfield_quick_w)
NoWideOpcode(putfield_quick_w)
NoWideOpcode(nonnull_quick)
NoWideOpcode(Illegal230)
NoWideOpcode(Illegal231)
NoWideOpcode(Illegal232)
NoWideOpcode(Illegal233)
NoWideOpcode(Illegal234)
NoWideOpcode(Illegal235)
NoWideOpcode(Illegal236)
NoWideOpcode(Illegal237)
NoWideOpcode(Illegal238)
NoWideOpcode(Illegal239)
NoWideOpcode(Illegal240)
NoWideOpcode(Illegal241)
NoWideOpcode(Illegal242)
NoWideOpcode(Illegal243)
NoWideOpcode(Illegal244)
NoWideOpcode(Illegal245)
NoWideOpcode(Illegal246)
NoWideOpcode(Illegal247)
NoWideOpcode(Illegal248)
NoWideOpcode(Illegal249)
NoWideOpcode(Illegal250)
NoWideOpcode(Illegal251)
NoWideOpcode(Illegal252)
NoWideOpcode(Illegal253)
NoWideOpcode(Illegal254)
NoWideOpcode(Illegal255)
/*
* Copyright 1994-1999 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
#ifndef _JAVASOFT_SYS_API_H_
#define _JAVASOFT_SYS_API_H_
#include "hpi.h"
extern HPI_MemoryInterface *hpi_memory_interface;
extern HPI_LibraryInterface *hpi_library_interface;
extern HPI_SystemInterface *hpi_system_interface;
extern HPI_ThreadInterface *hpi_thread_interface;
extern HPI_FileInterface *hpi_file_interface;
extern HPI_SocketInterface *hpi_socket_interface;
#define sysMalloc(x) hpi_memory_interface->Malloc(x)
#define sysRealloc(x,y) hpi_memory_interface->Realloc(x,y)
#define sysFree(x) hpi_memory_interface->Free(x)
#define sysCalloc(x,y) hpi_memory_interface->Calloc(x,y)
#define sysStrdup(x) hpi_memory_interface->Strdup(x)
#define sysMapMem(x,y) hpi_memory_interface->MapMem(x,y)
#define sysUnmapMem(x,y,z) hpi_memory_interface->UnmapMem(x,y,z)
#define sysCommitMem(x,y,z) hpi_memory_interface->CommitMem(x,y,z)
#define sysDecommitMem(x,y,z) hpi_memory_interface->DecommitMem(x,y,z)
#define sysAllocBlock(x,y) hpi_memory_interface->AllocBlock(x,y)
#define sysFreeBlock(x) hpi_memory_interface->FreeBlock(x)
#define sysBuildLibName(a,b,c,d) hpi_library_interface->BuildLibName(a,b,c,d)
#define sysBuildFunName(a,b,c,d) hpi_library_interface->BuildFunName(a,b,c,d)
#define sysLoadLibrary(a,b,c) hpi_library_interface->LoadLibrary(a,b,c)
#define sysUnloadLibrary(a) hpi_library_interface->UnloadLibrary(a)
#define sysFindLibraryEntry(a,b) hpi_library_interface->FindLibraryEntry(a,b)
#define sysGetSysInfo() hpi_system_interface->GetSysInfo()
#define sysGetMilliTicks() hpi_system_interface->GetMilliTicks()
#define sysTimeMillis() hpi_system_interface->TimeMillis()
#define sysSignal(a,b) hpi_system_interface->Signal(a,b)
#define sysRaise(a) hpi_system_interface->Raise(a)
#define sysSignalNotify(a) hpi_system_interface->SignalNotify(a)
#define sysSignalWait() hpi_system_interface->SignalWait()
#define sysShutdown() hpi_system_interface->Shutdown()
#define sysSetLoggingLevel(a) hpi_system_interface->SetLoggingLevel(a)
#define sysSetMonitoringOn(a) hpi_system_interface->SetMonitoringOn(a)
#define sysGetLastErrorString(a,b) hpi_system_interface->GetLastErrorString(a,b)
#define sysThreadBootstrap(a,b,c) hpi_thread_interface->ThreadBootstrap(a,b,c)
#define sysThreadCreate(a,b,c,d) hpi_thread_interface->ThreadCreate(a,b,c,d)
#define sysThreadSelf() hpi_thread_interface->ThreadSelf()
#define sysThreadYield() hpi_thread_interface->ThreadYield()
#define sysThreadSuspend(a) hpi_thread_interface->ThreadSuspend(a)
#define sysThreadResume(a) hpi_thread_interface->ThreadResume(a)
#define sysThreadSetPriority(a,b) hpi_thread_interface->ThreadSetPriority(a,b)
#define sysThreadGetPriority(a,b) hpi_thread_interface->ThreadGetPriority(a,b)
#define sysThreadStackPointer(a) hpi_thread_interface->ThreadStackPointer(a)
#define sysThreadStackTop(a) hpi_thread_interface->ThreadStackTop(a)
#define sysThreadRegs(a,b) hpi_thread_interface->ThreadRegs(a,b)
#define sysThreadSingle() hpi_thread_interface->ThreadSingle()
#define sysThreadMulti() hpi_thread_interface->ThreadMulti()
#define sysThreadCheckStack() hpi_thread_interface->ThreadCheckStack()
#define sysThreadPostException(a,b) \
hpi_thread_interface->ThreadPostException(a,b)
#define sysThreadInterrupt(a) hpi_thread_interface->ThreadInterrupt(a)
#define sysThreadIsInterrupted(a,b) \
hpi_thread_interface->ThreadIsInterrupted(a,b)
#define sysThreadAlloc(a) hpi_thread_interface->ThreadAlloc(a)
#define sysThreadFree() hpi_thread_interface->ThreadFree()
#define sysThreadCPUTime() hpi_thread_interface->ThreadCPUTime()
#define sysThreadGetStatus(a,b) hpi_thread_interface->ThreadGetStatus(a,b)
#define sysThreadEnumerateOver(a,b) \
hpi_thread_interface->ThreadEnumerateOver(a,b)
#define sysThreadIsRunning(a) hpi_thread_interface->ThreadIsRunning(a)
#define sysThreadProfSuspend(a) hpi_thread_interface->ThreadProfSuspend(a)
#define sysThreadProfResume(a) hpi_thread_interface->ThreadProfResume(a)
#define sysAdjustTimeSlice(a) hpi_thread_interface->AdjustTimeSlice(a)
#define sysMonitorSizeof() hpi_thread_interface->MonitorSizeof()
#define sysMonitorInit(a) hpi_thread_interface->MonitorInit(a)
#define sysMonitorDestroy(a) hpi_thread_interface->MonitorDestroy(a)
#define sysMonitorEnter(a,b) hpi_thread_interface->MonitorEnter(a,b)
#define sysMonitorEntered(a,b) hpi_thread_interface->MonitorEntered(a,b)
#define sysMonitorExit(a,b) hpi_thread_interface->MonitorExit(a,b)
#define sysMonitorNotify(a,b) hpi_thread_interface->MonitorNotify(a,b)
#define sysMonitorNotifyAll(a,b) hpi_thread_interface->MonitorNotifyAll(a,b)
#define sysMonitorWait(a,b,c) hpi_thread_interface->MonitorWait(a,b,c)
#define sysMonitorInUse(a) hpi_thread_interface->MonitorInUse(a)
#define sysMonitorOwner(a) hpi_thread_interface->MonitorOwner(a)
#define sysMonitorGetInfo(a,b) hpi_thread_interface->MonitorGetInfo(a,b)
#define sysThreadInterruptEvent() hpi_thread_interface->ThreadInterruptEvent()
#define sysThreadNativeID(a) hpi_thread_interface->ThreadNativeID(a)
#define sysNativePath(a) hpi_file_interface->NativePath(a)
#define sysFileType(a) hpi_file_interface->FileType(a)
#define sysOpen(a,b,c) hpi_file_interface->Open(a,b,c)
#define sysClose(a) hpi_file_interface->Close(a)
#define sysSeek(a,b,c) hpi_file_interface->Seek(a,b,c)
#define sysSetLength(a,b) hpi_file_interface->SetLength(a,b)
#define sysSync(a) hpi_file_interface->Sync(a)
#define sysAvailable(a,b) hpi_file_interface->Available(a,b)
#define sysRead(a,b,c) hpi_file_interface->Read(a,b,c)
#define sysWrite(a,b,c) hpi_file_interface->Write(a,b,c)
#define sysFileSizeFD(a,b) hpi_file_interface->FileSizeFD(a,b)
#define sysSocketClose(a) hpi_socket_interface->Close(a)
#define sysSocketShutdown(a,b) hpi_socket_interface->SocketShutdown(a,b)
#define sysSocketAvailable(a,b) hpi_socket_interface->Available(a,b)
#define sysConnect(a,b,c) hpi_socket_interface->Connect(a,b,c)
#define sysBind(a,b,c) hpi_socket_interface->Bind(a,b,c)
#define sysAccept(a,b,c) hpi_socket_interface->Accept(a,b,c)
#define sysGetSockName(a,b,c) hpi_socket_interface->GetSocketName(a,b,c)
#define sysSendTo(a,b,c,d,e,f) hpi_socket_interface->SendTo(a,b,c,d,e,f)
#define sysRecvFrom(a,b,c,d,e,f) hpi_socket_interface->RecvFrom(a,b,c,d,e,f)
#define sysListen(a,b) hpi_socket_interface->Listen(a,b)
#define sysRecv(a,b,c,d) hpi_socket_interface->Recv(a,b,c,d)
#define sysSend(a,b,c,d) hpi_socket_interface->Send(a,b,c,d)
#define sysTimeout(a,b) hpi_socket_interface->Timeout(a,b)
#define sysGetHostName(a, b) hpi_socket_interface->GetHostName(a, b)
#define sysGetHostByAddr(a, b, c) hpi_socket_interface->GetHostByAddr(a, b, c)
#define sysGetHostByName(a) hpi_socket_interface->GetHostByName(a)
#define sysSocket(a,b,c) hpi_socket_interface->Socket(a,b,c)
#define sysGetSockOpt(a, b, c, d, e) hpi_socket_interface->SocketGetOption(a, b, c, d, e)
#define sysSetSockOpt(a, b, c, d, e) hpi_socket_interface->SocketSetOption(a, b, c, d, e)
#define sysGetProtoByName(a) hpi_socket_interface->GetProtoByName(a)
#define SYS_SIG_DFL HPI_SIG_DFL
#define SYS_SIG_ERR HPI_SIG_ERR
#define SYS_SIG_IGN HPI_SIG_IGN
#define SYS_OK HPI_OK
#define SYS_ERR HPI_ERR
#define SYS_INTRPT HPI_INTRPT
#define SYS_TIMEOUT HPI_TIMEOUT
#define SYS_NOMEM HPI_NOMEM
#define SYS_NORESOURCE HPI_NORESOURCE
#define SYS_THREAD_RUNNABLE HPI_THREAD_RUNNABLE
#define SYS_THREAD_MONITOR_WAIT HPI_THREAD_MONITOR_WAIT
#define SYS_THREAD_CONDVAR_WAIT HPI_THREAD_CONDVAR_WAIT
#define MinimumPriority HPI_MINIMUM_PRIORITY
#define MaximumPriority HPI_MAXIMUM_PRIORITY
#define NormalPriority HPI_NORMAL_PRIORITY
#define SYS_THREAD_SUSPENDED HPI_THREAD_SUSPENDED
#define SYS_THREAD_INTERRUPTED HPI_THREAD_INTERRUPTED
#define PAGE_ALIGNMENT HPI_PAGE_ALIGNMENT
#define SYS_TIMEOUT_INFINITY HPI_TIMEOUT_INFINITY
#define SYS_FILETYPE_REGULAR HPI_FILETYPE_REGULAR
#define SYS_FILETYPE_DIRECTORY HPI_FILETYPE_DIRECTORY
#define SYS_FILETYPE_OTHER HPI_FILETYPE_OTHER
#endif /* !_JAVASOFT_SYS_API_H_ */
/*
* Copyright 1994-2002 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
#ifndef _JAVASOFT_TYPEDEFS_H_
#define _JAVASOFT_TYPEDEFS_H_
#include "typedefs_md.h" /* for int64_t */
/*
* Macros to deal with the JavaVM's stack alignment. Many machines
* require doublewords to be double aligned. This union is used by
* code in math.h as a more portable way do alingnment on machines
* that require it. This union and the macros that use it came from
* Netscape.
*/
#ifdef HAVE_ALIGNED_LONGLONGS
#define GET_INT64(_t,_addr) \
((((int32_t*) &(_t))[0] = ((int32_t*)(_addr))[0]), \
(((int32_t*) &(_t))[1] = ((int32_t*)(_addr))[1]), \
(_t).j )
#define SET_INT64(_t, _addr, _v) \
( (_t).j = (_v), \
((int32_t*)(_addr))[0] = ((int32_t*) &(_t))[0], \
((int32_t*)(_addr))[1] = ((int32_t*) &(_t))[1] )
#else
#define GET_INT64(_t,_addr) (*(int64_t*)(_addr))
#define SET_INT64(_t, _addr, _v) (*(int64_t*)(_addr) = (_v))
#endif
/* If double's must be aligned on doubleword boundaries then define this */
#ifdef HAVE_ALIGNED_DOUBLES
#define GET_DOUBLE(_t,_addr) \
((((int32_t*) &(_t))[0] = ((int32_t*)(_addr))[0]), \
(((int32_t*) &(_t))[1] = ((int32_t*)(_addr))[1]), \
(_t).d )
#define SET_DOUBLE(_t, _addr, _v) \
( (_t).d = (_v), \
((int32_t*)(_addr))[0] = ((int32_t*) &(_t))[0], \
((int32_t*)(_addr))[1] = ((int32_t*) &(_t))[1] )
#else
#define GET_DOUBLE(_t,_addr) (*(jdouble*)(_addr))
#define SET_DOUBLE(_t, _addr, _v) (*(jdouble*)(_addr) = (_v))
#endif
/* If pointers are 64bits then define this */
#ifdef HAVE_64BIT_POINTERS
#define GET_HANDLE(_t,_addr) \
( ((int32_t*) &(_t))[0] = ((int32_t*)(_addr))[0]), \
((int32_t*) &(_t))[1] = ((int32_t*)(_addr))[1]), \
(void*) (_t).l )
#define SET_HANDLE(_t, _addr, _v) \
( *(void**) &((_t).l) = (_v), \
((int32_t*)(_addr))[0] = ((int32_t*) &(_t))[0], \
((int32_t*)(_addr))[1] = ((int32_t*) &(_t))[1] )
#else
#define GET_HANDLE(_t,_addr) (*(JHandle*)(_addr))
#define SET_HANDLE(_t, _addr, _v) (*(JHandle*)(_addr) = (_v))
#endif
/*
* Printf-style formatters for fixed- and variable-width types as pointers and
* integers.
*
* Each platform-specific definitions file "typedefs_md.h"
* must define the macro FORMAT64_MODIFIER, which is the modifier for '%x' or
* '%d' formats to indicate a 64-bit quantity; commonly "l" (in LP64) or "ll"
* (in ILP32).
*/
/* Format 32-bit quantities. */
#define INT32_FORMAT "%d"
#define UINT32_FORMAT "%u"
#define PTR32_FORMAT "0x%08x"
/* Format 64-bit quantities. */
#define INT64_FORMAT "%" FORMAT64_MODIFIER "d"
#define UINT64_FORMAT "%" FORMAT64_MODIFIER "u"
#define PTR64_FORMAT "0x%016" FORMAT64_MODIFIER "x"
/* Format pointers and size_t (or size_t-like integer types) which change size
* between 32- and 64-bit.
*/
#if defined(_LP64) || defined(_WIN64)
#define PTR_FORMAT PTR64_FORMAT
#define SIZE_FORMAT UINT64_FORMAT
#define SSIZE_FORMAT INT64_FORMAT
#else
#define PTR_FORMAT PTR32_FORMAT
#define SIZE_FORMAT UINT32_FORMAT
#define SSIZE_FORMAT INT32_FORMAT
#endif
#define INTPTR_FORMAT PTR_FORMAT
#endif /* !_JAVASOFT_TYPEDEFS_H_ */
/*
* Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -246,7 +246,7 @@ VerifyClassname(char *name, jboolean allowArrayClass)
/* skip over the fieldname. Slashes are okay */
p = skip_over_fieldname(name, JNI_TRUE, length);
}
return (p != 0 && p - name == length);
return (p != 0 && p - name == (ptrdiff_t)length);
}
/*
......
/*
* Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -26,6 +26,9 @@
#ifndef JDWP_UTIL_MD_H
#define JDWP_UTIL_MD_H
#include <stddef.h>
#include <stdint.h> /* To get uintptr_t */
#include <limits.h>
#include <sys/types.h>
......
/*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2004-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,5 +23,8 @@
* have any questions.
*/
#include <stddef.h>
#include <stdint.h> /* For uintprt_t */
#include <stdlib.h>
#include <sys/param.h> /* For MAXPATHLEN */
/*
* Copyright 1997-1999 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -34,6 +34,8 @@
#include <dirent.h> /* For DIR */
#include <sys/param.h> /* For MAXPATHLEN */
#include <unistd.h> /* For F_OK, R_OK, W_OK */
#include <stddef.h> /* For ptrdiff_t */
#include <stdint.h> /* For uintptr_t */
#define JNI_ONLOAD_SYMBOLS {"JNI_OnLoad"}
#define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}
......
/*
* Copyright 1994-2002 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
/*
* Solaris-dependent types for Green threads
*/
#ifndef _JAVASOFT_SOLARIS_TYPES_MD_H_
#define _JAVASOFT_SOLARIS_TYPES_MD_H_
#include <sys/types.h>
#include <sys/stat.h>
#ifdef __linux__
#include <stdint.h>
#define HAVE_INTPTR_T
#define _UINT64_T
#endif
#define int8_t char
/* Fix for varargs differences on PowerPC */
#if defined(__powerpc__)
#define VARGS(x) (x)
#else
#define VARGS(x) (&x)
#endif /* __powerpc__ */
#if defined(__alpha__)
#define PTR_IS_64 1
#define LONG_IS_64 1
#else
#define PTR_IS_32 1
#endif
/* don't redefine typedef's on Solaris 2.6 or Later */
#if !defined(_ILP32) && !defined(_LP64)
#ifndef HAVE_INTPTR_T
#ifdef LONG_IS_64
typedef long intptr_t;
typedef unsigned long uintptr_t;
#else
typedef int intptr_t;
typedef unsigned int uintptr_t;
#endif /* LONG_IS_64 */
#endif /* don't HAVE_INTPTR_T */
#ifndef _UINT64_T
#define _UINT64_T
#ifdef LONG_IS_64
typedef unsigned long uint64_t;
#else
typedef unsigned long long uint64_t;
#endif
#define _UINT32_T
#ifndef uint32_t /* [sbb] scaffolding */
typedef unsigned int uint32_t;
#endif /* [sbb] scaffolding */
#if defined(__linux__)
typedef unsigned int uint_t;
#endif
#endif
#ifndef __BIT_TYPES_DEFINED__
/* that should get Linux, at least */
#ifndef _INT64_T
#define _INT64_T
#ifdef LONG_IS_64
typedef long int64_t;
#else
typedef long long int64_t;
#endif
#define _INT32_T
#ifndef int32_t /* [sbb] scaffolding */
typedef int int32_t;
#endif /* [sbb] scaffolding */
#if defined(__linux__)
typedef int int_t;
#endif
#endif
#endif /* __BIT_TYPES_DEFINED__ */
#endif /* !defined(_ILP32) && !defined(_LP64) */
/* use these macros when the compiler supports the long long type */
#define ll_high(a) ((uint32_t)(((uint64_t)(a))>>32))
#define ll_low(a) ((uint32_t)(a))
#define int2ll(a) ((int64_t)(a))
#define ll2int(a) ((int)(a))
#define ll_add(a, b) ((int64_t)(a) + (int64_t)(b))
#define ll_and(a, b) ((int64_t)(a) & (int64_t)(b))
#define ll_div(a, b) ((int64_t)(a) / (int64_t)(b))
#define ll_mul(a, b) ((int64_t)(a) * (int64_t)(b))
#define ll_neg(a) (-(a))
#define ll_not(a) (~(uint64_t)(a))
#define ll_or(a, b) ((uint64_t)(a) | (b))
#define ll_shl(a, n) ((uint64_t)(a) << (n))
#define ll_shr(a, n) ((int64_t)(a) >> (n))
#define ll_sub(a, b) ((uint64_t)(a) - (b))
#define ll_ushr(a, n) ((uint64_t)(a) >>(n))
#define ll_xor(a, b) ((int64_t)(a) ^ (int64_t)(b))
#define uint2ll(a) ((uint64_t)(a))
#define ll_rem(a,b) ((int64_t)(a) % (int64_t)(b))
extern int32_t float2l(float f);
extern int32_t double2l(double d);
extern int64_t float2ll(float f);
extern int64_t double2ll(double d);
#define ll2float(a) ((float) (a))
#define ll2double(a) ((double) (a))
/* Useful on machines where jlong and jdouble have different endianness. */
#define ll2double_bits(a) ((void) 0)
/* comparison operators */
#define ll_ltz(ll) ((ll)<0)
#define ll_gez(ll) ((ll)>=0)
#define ll_eqz(a) ((a) == 0)
#define ll_nez(a) ((a) != 0)
#define ll_eq(a, b) ((a) == (b))
#define ll_ne(a,b) ((a) != (b))
#define ll_ge(a,b) ((a) >= (b))
#define ll_le(a,b) ((a) <= (b))
#define ll_lt(a,b) ((a) < (b))
#define ll_gt(a,b) ((a) > (b))
#define ll_zero_const ((int64_t) 0)
#define ll_one_const ((int64_t) 1)
extern void ll2str(int64_t a, char *s, char *limit);
#define ll2ptr(a) ((void*)(uintptr_t)(a))
#define ptr2ll(a) ((int64_t)(uintptr_t)(a))
#ifdef ppc
#define HAVE_ALIGNED_DOUBLES
#define HAVE_ALIGNED_LONGLONGS
#endif
/* printf format modifier for printing pointers */
#ifdef _LP64
#define FORMAT64_MODIFIER "l"
#else
#define FORMAT64_MODIFIER "ll"
#endif
#endif /* !_JAVASOFT_SOLARIS_TYPES_MD_H_ */
/*
* Copyright 2000-2002 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -24,15 +24,12 @@
*/
/*
* Solaris dependent type definitions includes intptr_t, etc
* Solaris/Linux dependent type definitions includes intptr_t, etc
*/
#include <stddef.h>
#include <stdint.h> /* For uintptr_t */
#include <stdlib.h>
#include <sys/types.h>
/*
* Linux version of <sys/types.h> does not define intptr_t
*/
#ifdef __linux__
#include <stdint.h>
#include <malloc.h>
#endif /* __linux__ */
/*
* Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -28,7 +28,7 @@
/* Make sure ptrdiff_t is defined */
#include <stddef.h>
#include "typedefs.h"
#include <stdint.h> /* For uintptr_t */
#define jlong_high(a) ((jint)((a)>>32))
#define jlong_low(a) ((jint)(a))
......
/*
* Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -26,6 +26,7 @@
#ifndef JDWP_UTIL_MD_H
#define JDWP_UTIL_MD_H
#include <stddef.h> /* for uintptr_t */
#include <stdlib.h> /* for _MAx_PATH */
typedef unsigned __int64 UNSIGNED_JLONG;
......
/*
* Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -29,7 +29,6 @@
#include "hpi_impl.h"
#include "mutex_md.h"
#include "typedefs.h"
struct sockaddr;
......
/*
* Copyright 1994-2003 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1994-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -35,7 +35,6 @@
#include "threads_md.h"
#include "monitor_md.h"
#include "typedefs.h"
/*
......
/*
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2004-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,6 +23,7 @@
* have any questions.
*/
#include <stddef.h> /* For uintprt_t */
#include <stdlib.h>
#define MAXPATHLEN _MAX_PATH
......@@ -53,6 +53,7 @@ typedef struct {
WIN32_FIND_DATA find_data;
} DIR;
#include <stddef.h> /* For uintptr_t */
#include <stdlib.h>
#define JVM_MAXPATHLEN _MAX_PATH
......@@ -65,6 +66,19 @@ typedef struct {
JNIEXPORT void * JNICALL
JVM_GetThreadInterruptEvent();
/*
* These routines are only reentrant on Windows
*/
JNIEXPORT struct protoent * JNICALL
JVM_GetProtoByName(char* name);
JNIEXPORT struct hostent* JNICALL
JVM_GetHostByAddr(const char* name, int len, int type);
JNIEXPORT struct hostent* JNICALL
JVM_GetHostByName(char* name);
/*
* File I/O
*/
......
/*
* Copyright 1994-2002 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
/*
* Win32 dependent type definitions
*/
#ifndef _JAVASOFT_WIN32_TYPEDEF_MD_H_
#define _JAVASOFT_WIN32_TYPEDEF_MD_H_
#include <windows.h>
#define VARGS(x) (&x)
typedef char int8_t;
typedef __int16 int16_t;
typedef __int32 int32_t;
typedef __int64 int64_t;
typedef unsigned char uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned int uint_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
/* Make sure that we have the intptr_t and uintptr_t definitions */
#ifndef _INTPTR_T_DEFINED
#ifdef _WIN64
typedef __int64 intptr_t;
#else
typedef int intptr_t;
#endif
#define _INTPTR_T_DEFINED
#endif
#ifndef _UINTPTR_T_DEFINED
#ifdef _WIN64
typedef unsigned __int64 uintptr_t;
#else
typedef unsigned int uintptr_t;
#endif
#define _UINTPTR_T_DEFINED
#endif
typedef intptr_t ssize_t;
/* use these macros when the compiler supports the long long type */
#define ll_high(a) ((long)((a)>>32))
#define ll_low(a) ((long)(a))
#define int2ll(a) ((int64_t)(a))
#define ll2int(a) ((int)(a))
#define ll_add(a, b) ((a) + (b))
#define ll_and(a, b) ((a) & (b))
#define ll_div(a, b) ((a) / (b))
#define ll_mul(a, b) ((a) * (b))
#define ll_neg(a) (-(a))
#define ll_not(a) (~(a))
#define ll_or(a, b) ((a) | (b))
/* THE FOLLOWING DEFINITION IS NOW A FUNCTION CALL IN ORDER TO WORKAROUND
OPTIMIZER BUG IN MSVC++ 2.1 (see system_md.c)
#define ll_shl(a, n) ((a) << (n)) */
#define ll_shr(a, n) ((a) >> (n))
#define ll_sub(a, b) ((a) - (b))
#define ll_ushr(a, n) ((uint64_t)(a) >> (n))
#define ll_xor(a, b) ((a) ^ (b))
#define uint2ll(a) ((uint64_t)(unsigned long)(a))
#define ll_rem(a,b) ((a) % (b))
int32_t float2l(float f);
int32_t double2l(double f);
int64_t float2ll(float f);
int64_t double2ll(double f);
#define ll2float(a) ((float) (a))
#define ll2double(a) ((double) (a))
/* Useful on machines where jlong and jdouble have different endianness. */
#define ll2double_bits(a) ((void) 0)
/* comparison operators */
#define ll_ltz(ll) ((ll) < 0)
#define ll_gez(ll) ((ll) >= 0)
#define ll_eqz(a) ((a) == 0)
#define ll_nez(a) ((a) != 0)
#define ll_eq(a, b) ((a) == (b))
#define ll_ne(a,b) ((a) != (b))
#define ll_ge(a,b) ((a) >= (b))
#define ll_le(a,b) ((a) <= (b))
#define ll_lt(a,b) ((a) < (b))
#define ll_gt(a,b) ((a) > (b))
#define ll_zero_const ((int64_t) 0)
#define ll_one_const ((int64_t) 1)
int64_t ll_shl(int64_t a, int bits);
#define ll2ptr(a) ((void*)(a))
#define ptr2ll(a) ((jlong)(a))
/* printf format modifier for printing pointers */
#define FORMAT64_MODIFIER "I64"
#endif /* !_JAVASOFT_WIN32_TYPEDEF_MD_H_ */
/*
* Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -28,7 +28,6 @@
#include "net_util.h"
#include "jni.h"
#include "typedefs.h"
#ifndef IPTOS_TOS_MASK
#define IPTOS_TOS_MASK 0x1e
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册