gcc/libjava/include/java-cpool.h
Anthony Green 7941ceabf0 [multiple changes]
Mon Aug  9 18:33:38 1999  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

        * Makefile: Rebuilt.
	* Makefile.am (toolexeclibdir): Add $(MULTISUBDIR) even for native
	builds.

	* java/net/natPlainSocketImpl.cc: Include <sys/select.h> only if
	present.

	* configure: Rebuilt.
	* configure.in: Properly align --help output, fix capitalization
	and punctuation.
	* acinclude.m4: Likewise.

1999-08-09  Kresten Krab Thorup  <krab@gnu.org>

	* include/javaprims.h (_Jv_word, _Jv_word2): New types.

	* include/java-interp.h (_Jv_InterpMethodInvocation): Use _Jv_word.
	(_Jv_callInterpretedMethod): Unused. Remove.
	(_Jv_InterpMethod::run,run_normal,run_synch_object,run_synch_class):
	Use ffi_raw.
	* include/java-cpool.h (_Jv_get, _Jv_put): Remove.
	(_Jv_{store,load}{Indexes,Int,Float,Long,Double}): Use _Jv_word.
	* boehm.cc (_Jv_MarkObj): Use _Jv_word.
	* interpret.cc: use _Jv_word.
	* defineclass.cc: use_Jv_word.
	* resolve.cc: Use _Jv_word.
	(_Jv_ResolvePoolEntry): Return _Jv_word.
	* java/lang/Class.h (_Jv_Constants): Use _Jv_word for cpool.
	* java/lang/natClassLoader.cc (_Jv_InternClassStrings): Use _Jv_word.

	* interpret.cc (gnu::gcj::runtime::MethodInvocation::continue1):
	Change comment.

From-SVN: r28641
1999-08-10 05:32:23 +00:00

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 <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__ */