Check-in [09173c6844]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Reduce String quick flag field size to short as not that many flags are needed.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:09173c6844ed5352c19faf81def704e64be6be90
User & Date: stephanie.gawroriski 2019-05-24 13:32:34
Context
2019-05-24
13:34
Deprecate the basic sequence in the string. check-in: 41b9ac2142 user: stephanie.gawroriski tags: trunk
13:32
Reduce String quick flag field size to short as not that many flags are needed. check-in: 09173c6844 user: stephanie.gawroriski tags: trunk
13:30
Add test for intern strings. check-in: 27ade338c0 user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to runt/apis/cldc-compact/java/lang/String.java.

54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
...
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
	implements Comparable<String>, CharSequence
{
	/** The minumum trim character. */
	private static final char _MIN_TRIM_CHAR =
		' ';
	
	/** Is this string already lowercased? */
	private static final int _QUICK_ISLOWER =
		0b0000_0000__0000_0000___0000_0000__0000_0001;
	
	/** Is this string already uppercased? */
	private static final int _QUICK_ISUPPER =
		0b0000_0000__0000_0000___0000_0000__0000_0010;
	
	/** The basic character sequence data. */
	private final BasicSequence _sequence;
	
	/** Quick determination flags for speedy operations. */
	private volatile int _quickflags;
	
	/** The hash code for this string, is cached. */
	private int _hashcode;
	
	/**
	 * Initializes a new empty string.
	 *
................................................................................
	 * @param __bs The sequence of characters to use.
	 * @throws NullPointerException On null arguments.
	 * @since 2018/02/24
	 */
	String(BasicSequence __bs)
		throws NullPointerException
	{
		this(__bs, 0);
	}
	
	/**
	 * Initializes the string using the given sequence for characters.
	 *
	 * @param __bs The sequence of characters to use.
	 * @param __qf Quick determination flags.
	 * @throws NullPointerException On null arguments.
	 * @since 2018/02/24
	 */
	private String(BasicSequence __bs, int __qf)
		throws NullPointerException
	{
		if (__bs == null)
			throw new NullPointerException("NARG");
		
		this._sequence = __bs;
		this._quickflags = __qf;







|
|


|
|





|







 







|










|







54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
...
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
	implements Comparable<String>, CharSequence
{
	/** The minumum trim character. */
	private static final char _MIN_TRIM_CHAR =
		' ';
	
	/** Is this string already lowercased? */
	private static final short _QUICK_ISLOWER =
		0b0000_0000__0000_0001;
	
	/** Is this string already uppercased? */
	private static final short _QUICK_ISUPPER =
		0b0000_0000__0000_0010;
	
	/** The basic character sequence data. */
	private final BasicSequence _sequence;
	
	/** Quick determination flags for speedy operations. */
	private volatile short _quickflags;
	
	/** The hash code for this string, is cached. */
	private int _hashcode;
	
	/**
	 * Initializes a new empty string.
	 *
................................................................................
	 * @param __bs The sequence of characters to use.
	 * @throws NullPointerException On null arguments.
	 * @since 2018/02/24
	 */
	String(BasicSequence __bs)
		throws NullPointerException
	{
		this(__bs, (short)0);
	}
	
	/**
	 * Initializes the string using the given sequence for characters.
	 *
	 * @param __bs The sequence of characters to use.
	 * @param __qf Quick determination flags.
	 * @throws NullPointerException On null arguments.
	 * @since 2018/02/24
	 */
	private String(BasicSequence __bs, short __qf)
		throws NullPointerException
	{
		if (__bs == null)
			throw new NullPointerException("NARG");
		
		this._sequence = __bs;
		this._quickflags = __qf;