This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[0.98 merge] Generalise native methods for StringBuffer/Builder


This patch removes a lot of unnecessary differences
between the implementations of StringBuffer and StringBuilder
in GNU Classpath and provides one implementation of the native
methods used by these classes.  Using one native implementation
in AbstractStringBuilder means we also don't run into as many
problems with bridge methods.

With this patch, we could probably remove StringBuilder.java altogether
as it becomes identical to the one in GNU Classpath.  StringBuffer retains
a single difference; the use of System over VMSystem.

ChangeLog:

2008-09-08  Andrew John Hughes  <gnu_andrew@member.fsf.org>

	* Makefile.am: Replace natStringBuffer.cc
	and natStringBuilder.cc with natAbstractStringBuffer.cc.
	* Makefile.in: Regenerated.
	* java/lang/AbstractStringBuffer.java:
	(append(int)): Made native.
	(regionMatches(int,String)): Likewise.
	* java/lang/StringBuffer.h: Regenerated.
	* java/lang/StringBuffer.java: Remerged with GNU Classpath.
	* java/lang/StringBuilder.h: Regenerated.
	* java/lang/StringBuilder.java: Remerged with GNU Classpath.
	* java/lang/natAbstractStringBuffer.cc: Provide common
	native methods for StringBuffer and StringBuilder.
	* java/lang/natStringBuffer.cc,
	* java/lang/natStringBuilder.cc: Removed.

-- 
Andrew :)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint = F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8

Attachment: 0.98_merge-04.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]