Makefile.in: Rebuilt.

2005-02-21  Andrew Haley  <aph@redhat.com>

	* Makefile.in: Rebuilt.
	* Makefile.am (nat_source_files): Added natLogger.cc.
	* java/util/logging/natLogger.cc: New file.
	* java/util/logging/Logger.java (getCallerStackFrame): Now
	native.

From-SVN: r95338
This commit is contained in:
Andrew Haley 2005-02-21 18:19:01 +00:00 committed by Tom Tromey
parent d0a68934cf
commit 92c91cf7fe
5 changed files with 96 additions and 36 deletions

View File

@ -1,3 +1,11 @@
2005-02-21 Andrew Haley <aph@redhat.com>
* Makefile.in: Rebuilt.
* Makefile.am (nat_source_files): Added natLogger.cc.
* java/util/logging/natLogger.cc: New file.
* java/util/logging/Logger.java (getCallerStackFrame): Now
native.
2005-02-21 Andreas Tobler <a.tobler@schweiz.ch>
* Makefile.am (all_property_files): Remove left over.

View File

@ -3720,6 +3720,7 @@ java/nio/natDirectByteBufferImpl.cc \
java/text/natCollator.cc \
java/util/natResourceBundle.cc \
java/util/natVMTimeZone.cc \
java/util/logging/natLogger.cc \
java/util/zip/natDeflater.cc \
java/util/zip/natInflater.cc

View File

@ -370,21 +370,22 @@ am__libgcj0_convenience_la_SOURCES_DIST = prims.cc jni.cc exception.cc \
java/net/natInetAddress.cc java/nio/channels/natChannels.cc \
java/nio/natDirectByteBufferImpl.cc java/text/natCollator.cc \
java/util/natResourceBundle.cc java/util/natVMTimeZone.cc \
java/util/zip/natDeflater.cc java/util/zip/natInflater.cc \
java/lang/dtoa.c java/lang/k_rem_pio2.c java/lang/s_tan.c \
java/lang/e_acos.c java/lang/k_sin.c java/lang/strtod.c \
java/lang/e_asin.c java/lang/k_tan.c java/lang/w_acos.c \
java/lang/e_atan2.c java/lang/mprec.c java/lang/w_asin.c \
java/lang/e_exp.c java/lang/s_atan.c java/lang/w_atan2.c \
java/lang/e_fmod.c java/lang/s_ceil.c java/lang/w_exp.c \
java/lang/e_log.c java/lang/s_copysign.c java/lang/w_fmod.c \
java/lang/e_pow.c java/lang/s_cos.c java/lang/w_log.c \
java/lang/e_rem_pio2.c java/lang/s_fabs.c java/lang/w_pow.c \
java/lang/e_remainder.c java/lang/s_floor.c \
java/lang/w_remainder.c java/lang/e_scalb.c java/lang/s_rint.c \
java/lang/w_sqrt.c java/lang/e_sqrt.c java/lang/s_scalbn.c \
java/lang/sf_rint.c java/lang/k_cos.c java/lang/s_sin.c \
java/lang/sf_fabs.c java/lang/Class.java java/lang/Object.java \
java/util/logging/natLogger.cc java/util/zip/natDeflater.cc \
java/util/zip/natInflater.cc java/lang/dtoa.c \
java/lang/k_rem_pio2.c java/lang/s_tan.c java/lang/e_acos.c \
java/lang/k_sin.c java/lang/strtod.c java/lang/e_asin.c \
java/lang/k_tan.c java/lang/w_acos.c java/lang/e_atan2.c \
java/lang/mprec.c java/lang/w_asin.c java/lang/e_exp.c \
java/lang/s_atan.c java/lang/w_atan2.c java/lang/e_fmod.c \
java/lang/s_ceil.c java/lang/w_exp.c java/lang/e_log.c \
java/lang/s_copysign.c java/lang/w_fmod.c java/lang/e_pow.c \
java/lang/s_cos.c java/lang/w_log.c java/lang/e_rem_pio2.c \
java/lang/s_fabs.c java/lang/w_pow.c java/lang/e_remainder.c \
java/lang/s_floor.c java/lang/w_remainder.c \
java/lang/e_scalb.c java/lang/s_rint.c java/lang/w_sqrt.c \
java/lang/e_sqrt.c java/lang/s_scalbn.c java/lang/sf_rint.c \
java/lang/k_cos.c java/lang/s_sin.c java/lang/sf_fabs.c \
java/lang/Class.java java/lang/Object.java \
java/lang/AbstractMethodError.java \
java/lang/ArithmeticException.java \
java/lang/ArrayIndexOutOfBoundsException.java \
@ -2642,7 +2643,8 @@ am__objects_6 = gnu/gcj/natCore.lo \
java/net/natInetAddress.lo java/nio/channels/natChannels.lo \
java/nio/natDirectByteBufferImpl.lo java/text/natCollator.lo \
java/util/natResourceBundle.lo java/util/natVMTimeZone.lo \
java/util/zip/natDeflater.lo java/util/zip/natInflater.lo
java/util/logging/natLogger.lo java/util/zip/natDeflater.lo \
java/util/zip/natInflater.lo
am__objects_7 = java/lang/dtoa.lo java/lang/k_rem_pio2.lo \
java/lang/s_tan.lo java/lang/e_acos.lo java/lang/k_sin.lo \
java/lang/strtod.lo java/lang/e_asin.lo java/lang/k_tan.lo \
@ -8104,6 +8106,7 @@ java/nio/natDirectByteBufferImpl.cc \
java/text/natCollator.cc \
java/util/natResourceBundle.cc \
java/util/natVMTimeZone.cc \
java/util/logging/natLogger.cc \
java/util/zip/natDeflater.cc \
java/util/zip/natInflater.cc
@ -8960,6 +8963,14 @@ java/util/natResourceBundle.lo: java/util/$(am__dirstamp) \
java/util/$(DEPDIR)/$(am__dirstamp)
java/util/natVMTimeZone.lo: java/util/$(am__dirstamp) \
java/util/$(DEPDIR)/$(am__dirstamp)
java/util/logging/$(am__dirstamp):
@$(mkdir_p) java/util/logging
@: > java/util/logging/$(am__dirstamp)
java/util/logging/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) java/util/logging/$(DEPDIR)
@: > java/util/logging/$(DEPDIR)/$(am__dirstamp)
java/util/logging/natLogger.lo: java/util/logging/$(am__dirstamp) \
java/util/logging/$(DEPDIR)/$(am__dirstamp)
java/util/zip/$(am__dirstamp):
@$(mkdir_p) java/util/zip
@: > java/util/zip/$(am__dirstamp)
@ -9488,12 +9499,6 @@ java/util/VMTimeZone.lo: java/util/$(am__dirstamp) \
java/util/$(DEPDIR)/$(am__dirstamp)
java/util/WeakHashMap.lo: java/util/$(am__dirstamp) \
java/util/$(DEPDIR)/$(am__dirstamp)
java/util/logging/$(am__dirstamp):
@$(mkdir_p) java/util/logging
@: > java/util/logging/$(am__dirstamp)
java/util/logging/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) java/util/logging/$(DEPDIR)
@: > java/util/logging/$(DEPDIR)/$(am__dirstamp)
java/util/logging/ConsoleHandler.lo: \
java/util/logging/$(am__dirstamp) \
java/util/logging/$(DEPDIR)/$(am__dirstamp)
@ -20036,6 +20041,8 @@ mostlyclean-compile:
-rm -f java/util/logging/StreamHandler.lo
-rm -f java/util/logging/XMLFormatter.$(OBJEXT)
-rm -f java/util/logging/XMLFormatter.lo
-rm -f java/util/logging/natLogger.$(OBJEXT)
-rm -f java/util/logging/natLogger.lo
-rm -f java/util/natResourceBundle.$(OBJEXT)
-rm -f java/util/natResourceBundle.lo
-rm -f java/util/natVMTimeZone.$(OBJEXT)
@ -23821,6 +23828,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@java/util/logging/$(DEPDIR)/SocketHandler.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/util/logging/$(DEPDIR)/StreamHandler.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/util/logging/$(DEPDIR)/XMLFormatter.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/util/logging/$(DEPDIR)/natLogger.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/util/prefs/$(DEPDIR)/AbstractPreferences.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/util/prefs/$(DEPDIR)/BackingStoreException.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/util/prefs/$(DEPDIR)/InvalidPreferencesFormatException.Plo@am__quote@

View File

@ -1,5 +1,5 @@
/* Logger.java -- a class for logging messages
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -1169,17 +1169,5 @@ public class Logger
* That should be the initial caller of a logging method.
* @return caller of the initial looging method
*/
private StackTraceElement getCallerStackFrame()
{
Throwable t = new Throwable();
StackTraceElement[] stackTrace = t.getStackTrace();
int index = 0;
// skip to stackentries until this class
while(!stackTrace[index].getClassName().equals(getClass().getName())){index++;}
// skip the stackentries of this class
while(stackTrace[index].getClassName().equals(getClass().getName())){index++;}
return stackTrace[index];
}
private native StackTraceElement getCallerStackFrame();
}

View File

@ -0,0 +1,55 @@
// natLogger.cc - Native part of Logger class.
/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation
This Logger is part of libgcj.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the Logger "LIBGCJ_LICENSE" for
details. */
#include <config.h>
#include <platform.h>
#include <string.h>
#pragma implementation "Logger.h"
#include <gcj/cni.h>
#include <jvm.h>
#include <java/lang/Object.h>
#include <java/lang/Class.h>
#include <java/util/logging/Logger.h>
#include <java/lang/StackTraceElement.h>
#include <java/lang/ArrayIndexOutOfBoundsException.h>
java::lang::StackTraceElement*
java::util::logging::Logger::getCallerStackFrame ()
{
gnu::gcj::runtime::StackTrace *t
= new gnu::gcj::runtime::StackTrace(4);
java::lang::Class *klass = NULL;
int i = 2;
try
{
// skip until this class
while ((klass = t->classAt (i)) != getClass())
i++;
// skip the stackentries of this class
while ((klass = t->classAt (i)) == getClass() || klass == NULL)
i++;
}
catch (::java::lang::ArrayIndexOutOfBoundsException *e)
{
// FIXME: RuntimeError
}
java::lang::StackTraceElement *e
= new java::lang::StackTraceElement
(JvNewStringUTF (""), 0,
klass->getName(), t->methodAt(i), false);
return e;
}