mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-22 13:49:58 +08:00
27e934d8ba
* configure: Rebuilt. * configure.in: Build include/Makefile. * Makefile.in: Rebuilt. * Makefile.am (SUBDIRS): Added gcj and include. (install-data-local): New target. (extra_headers): New macro. * include/Makefile.in: New file. * include/Makefile.am: New file. * interpret.cc: Don't include gcj/field.h or gcj/cni.h. * java/lang/reflect/natField.cc: Don't include gcj/field.h or gcj/cni.h. * boehm.cc: Don't include java-threads.h or gcj/field.h. * resolve.cc: Include config.h. * defineclass.cc: Include config.h. * include/java-interp.h: Don't include config.h. * include/jvm.h: Include java-threads.h, Object.h, java-gc.h, cni.h. * gcj/javaprims.h: Regenerated namespace decls. * classes.pl (scan): Don't put `;' after closing brace. * Makefile.in: Rebuilt. * Makefile.am (INCLUDES): Added -I for top_srcdir. * configure.in: Create gcj/Makefile. * gcj/Makefile.in: New file. * gcj/Makefile.am: New file. * java/lang/Object.h: Don't include any other headers. * gcj/array.h: Renamed from include/java-array.h. * gcj/field.h: Renamed from include/java-field.h. * gcj/method.h: Renamed from include/java-method.h. * gcj/cni.h, gcj/javaprims.h: Moved from include/. Updated all files to reflect new include structure. From-SVN: r29278
118 lines
2.3 KiB
C++
118 lines
2.3 KiB
C++
// java-cpool.h - Constant pool parsing header. -*- c++ -*-
|
|
|
|
/* Copyright (C) 1999 Cygnus Solutions
|
|
|
|
This file is part of libgcj.
|
|
|
|
This software is copyrighted work licensed under the terms of the
|
|
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
|
details. */
|
|
|
|
#ifndef __JAVA_CPOOL_H__
|
|
#define __JAVA_CPOOL_H__
|
|
|
|
#include <gcj/javaprims.h>
|
|
|
|
// we rename these, to avoid polluting the name space
|
|
#define JV_CONSTANT_Undefined (0L)
|
|
#define JV_CONSTANT_Utf8 (1L)
|
|
#define JV_CONSTANT_Unicode (2L)
|
|
#define JV_CONSTANT_Integer (3L)
|
|
#define JV_CONSTANT_Float (4L)
|
|
#define JV_CONSTANT_Long (5L)
|
|
#define JV_CONSTANT_Double (6L)
|
|
#define JV_CONSTANT_Class (7L)
|
|
#define JV_CONSTANT_String (8L)
|
|
#define JV_CONSTANT_Fieldref (9L)
|
|
#define JV_CONSTANT_Methodref (10L)
|
|
#define JV_CONSTANT_InterfaceMethodref (11L)
|
|
#define JV_CONSTANT_NameAndType (12L)
|
|
#define JV_CONSTANT_ResolvedFlag (16L)
|
|
#define JV_CONSTANT_ResolvedString (16L | 8L)
|
|
#define JV_CONSTANT_ResolvedClass (16L | 7L)
|
|
|
|
extern inline void
|
|
_Jv_storeIndexes (_Jv_word *data,
|
|
_Jv_ushort index0,
|
|
_Jv_ushort index1)
|
|
{
|
|
data->i = (((jint)index0) << 16) | (jint) index1;
|
|
}
|
|
|
|
extern inline void
|
|
_Jv_loadIndexes (const _Jv_word *data,
|
|
_Jv_ushort& index0,
|
|
_Jv_ushort& index1)
|
|
{
|
|
jint udata = data->i;
|
|
|
|
_Jv_uint uindex0 = ((udata >> 16) & 0xffff);
|
|
_Jv_uint uindex1 = udata & 0xffff;
|
|
|
|
index0 = uindex0;
|
|
index1 = uindex1;
|
|
}
|
|
|
|
extern inline void
|
|
_Jv_storeFloat (_Jv_word *data, jfloat f)
|
|
{
|
|
data->f = f;
|
|
}
|
|
|
|
extern inline jfloat
|
|
_Jv_loadFloat (_Jv_word *data)
|
|
{
|
|
return data->f;
|
|
}
|
|
|
|
extern inline void
|
|
_Jv_storeInt (_Jv_word *data, jint i)
|
|
{
|
|
data->i = i;
|
|
}
|
|
|
|
extern inline jint
|
|
_Jv_loadInt (_Jv_word *data)
|
|
{
|
|
return data->i;
|
|
}
|
|
|
|
extern inline void
|
|
_Jv_storeLong (_Jv_word *data, jlong l)
|
|
{
|
|
_Jv_word2 tmp;
|
|
tmp.l = l;
|
|
data[0].ia[0] = tmp.ia[0];
|
|
data[1].ia[0] = tmp.ia[1];
|
|
}
|
|
|
|
extern inline jlong
|
|
_Jv_loadLong (_Jv_word *data)
|
|
{
|
|
_Jv_word2 tmp;
|
|
tmp.ia[0] = data[0].ia[0];
|
|
tmp.ia[1] = data[1].ia[0];
|
|
return tmp.l;
|
|
}
|
|
|
|
extern inline void
|
|
_Jv_storeDouble (_Jv_word *data, jdouble d)
|
|
{
|
|
_Jv_word2 tmp;
|
|
tmp.d = d;
|
|
data[0].ia[0] = tmp.ia[0];
|
|
data[1].ia[0] = tmp.ia[1];
|
|
}
|
|
|
|
extern inline jdouble
|
|
_Jv_loadDouble (_Jv_word *data)
|
|
{
|
|
_Jv_word2 tmp;
|
|
tmp.ia[0] = data[0].ia[0];
|
|
tmp.ia[1] = data[1].ia[0];
|
|
return tmp.d;
|
|
}
|
|
|
|
|
|
#endif /* __JAVA_CPOOL_H__ */
|