[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] Patch: FYI: trampolines in gnu.*
From: |
Tom Tromey |
Subject: |
[cp-patches] Patch: FYI: trampolines in gnu.* |
Date: |
06 Nov 2004 16:36:16 -0700 |
I'm checking this in to Classpath and libgcj.
This removes the need for trampolines from gnu.*, excepting AWT which
comes later.
The PolicyFile part isn't going in libgcj, as that class doesn't
exist there for whatever reason.
Tom
Index: ChangeLog
from Tom Tromey <address@hidden>
* gnu/java/rmi/server/UnicastConnectionManager.java (clients): Now
package-private.
(connections): Likewise.
(scavenger): Likewise.
* gnu/java/rmi/server/ConnectionRunnerPool.java (freelist): Now
package-private.
* gnu/java/rmi/server/UnicastRemoteCall.java (vec): Now
package-private.
(ptr): Likewise.
* gnu/java/security/PolicyFile.java (debug): Now package-private.
* gnu/classpath/ServiceFactory.java (log): Now package-private.
Index: gnu/classpath/ServiceFactory.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/classpath/ServiceFactory.java,v
retrieving revision 1.2
diff -u -r1.2 ServiceFactory.java
--- gnu/classpath/ServiceFactory.java 23 Apr 2004 21:13:20 -0000 1.2
+++ gnu/classpath/ServiceFactory.java 6 Nov 2004 23:38:29 -0000
@@ -521,6 +521,7 @@
}
+ // Package-private to avoid a trampoline.
/**
* Passes a log message to the <code>java.util.logging</code>
* framework. This call returns very quickly if no log message will
@@ -542,7 +543,7 @@
* <code>null</code> if the log message is not associated with a
* Throwable.
*/
- private static void log(Level level, String msg, Object param, Throwable t)
+ static void log(Level level, String msg, Object param, Throwable t)
{
LogRecord rec;
Index: gnu/java/rmi/server/ConnectionRunnerPool.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/gnu/java/rmi/server/ConnectionRunnerPool.java,v
retrieving revision 1.2
diff -u -r1.2 ConnectionRunnerPool.java
--- gnu/java/rmi/server/ConnectionRunnerPool.java 31 Oct 2002 18:35:21 -0000 1.2
+++ gnu/java/rmi/server/ConnectionRunnerPool.java 6 Nov 2004 23:38:29 -0000
@@ -1,5 +1,5 @@
/* gnu.java.rmi.server.ConnectionRunnerPool
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -95,7 +95,8 @@
private static int size = 5;
private static int max_size = 10;
- private static ArrayList freelist;
+ // Package-private to avoid a trampoline.
+ static ArrayList freelist;
private static ThreadGroup group = new ThreadGroup("pool");
Index: gnu/java/rmi/server/UnicastConnectionManager.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/gnu/java/rmi/server/UnicastConnectionManager.java,v
retrieving revision 1.9
diff -u -r1.9 UnicastConnectionManager.java
--- gnu/java/rmi/server/UnicastConnectionManager.java 13 Oct 2004 14:32:34
-0000 1.9
+++ gnu/java/rmi/server/UnicastConnectionManager.java 6 Nov 2004 23:38:29 -0000
@@ -65,8 +65,9 @@
private static String localhost;
// use different maps for server/client type UnicastConnectionManager
private static Hashtable servers = new Hashtable();
-private static Hashtable clients = new Hashtable();
-private ArrayList connections; //client connection pool
+// Package-private to avoid trampolines.
+static Hashtable clients = new Hashtable();
+ArrayList connections; //client connection pool
// make serverThread volatile for poll
private volatile Thread serverThread;
@@ -74,7 +75,8 @@
String serverName;
int serverPort;
-static private Thread scavenger;
+// Package-private to avoid a trampoline.
+static Thread scavenger;
// If client and server are in the same VM, serverobj represents server
Object serverobj;
Index: gnu/java/rmi/server/UnicastRemoteCall.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/gnu/java/rmi/server/UnicastRemoteCall.java,v
retrieving revision 1.11
diff -u -r1.11 UnicastRemoteCall.java
--- gnu/java/rmi/server/UnicastRemoteCall.java 13 Oct 2004 14:32:34 -0000 1.11
+++ gnu/java/rmi/server/UnicastRemoteCall.java 6 Nov 2004 23:38:29 -0000
@@ -61,8 +61,9 @@
private Object object;
private int opnum;
private long hash;
- private Vector vec;
- private int ptr;
+ // These are package-private due to inner class access.
+ Vector vec;
+ int ptr;
private ObjID objid;
private ObjectOutput oout;
Index: gnu/java/security/PolicyFile.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/java/security/PolicyFile.java,v
retrieving revision 1.1
diff -u -r1.1 PolicyFile.java
--- gnu/java/security/PolicyFile.java 3 Jun 2004 09:16:57 -0000 1.1
+++ gnu/java/security/PolicyFile.java 6 Nov 2004 23:38:29 -0000
@@ -143,7 +143,8 @@
// -------------------------------------------------------------------------
private static final boolean DEBUG = true;
- private static void debug(String msg)
+ // Package-private to avoid a trampoline.
+ static void debug(String msg)
{
System.err.print(">> PolicyFile: ");
System.err.println(msg);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] Patch: FYI: trampolines in gnu.*,
Tom Tromey <=