Check-in [41b9ac2142]

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

Overview
Comment:Deprecate the basic sequence in the string.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:41b9ac214294b5a9b1d61dcb1002e96aa64f4fad
User & Date: stephanie.gawroriski 2019-05-24 13:34:50
Context
2019-05-24
13:37
Add quick flag for an intern check so that `this` is quickly returned if the string is already an intern. check-in: 25bf7f0071 user: stephanie.gawroriski tags: trunk
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
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to runt/apis/cldc-compact/cc/squirreljme/runtime/cldc/string/BasicSequence.java.

17
18
19
20
21
22
23

24
25
26
27
28
29
30
 *
 * Some strings may refer to characters which have been mapped to another
 * address space and as such will require remote access to the memory of
 * that process.
 *
 * @since 2018/02/24
 */

public abstract class BasicSequence
{
	/**
	 * Returns the character at the given index.
	 *
	 * @param __i The index of the character.
	 * @return The character at the given index.







>







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 *
 * Some strings may refer to characters which have been mapped to another
 * address space and as such will require remote access to the memory of
 * that process.
 *
 * @since 2018/02/24
 */
@Deprecated
public abstract class BasicSequence
{
	/**
	 * Returns the character at the given index.
	 *
	 * @param __i The index of the character.
	 * @return The character at the given index.

Changes to runt/apis/cldc-compact/cc/squirreljme/runtime/cldc/string/ByteArraySequence.java.

11
12
13
14
15
16
17

18
19
20
21
22
23
24

/**
 * This is a sequence of characters which uses basic bytes to represent basic
 * character sequences.
 *
 * @since 2019/04/27
 */

public final class ByteArraySequence
	extends BasicSequence
{
	/** The array data. */
	protected final byte[] data;
	
	/** The array length. */







>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

/**
 * This is a sequence of characters which uses basic bytes to represent basic
 * character sequences.
 *
 * @since 2019/04/27
 */
@Deprecated
public final class ByteArraySequence
	extends BasicSequence
{
	/** The array data. */
	protected final byte[] data;
	
	/** The array length. */

Changes to runt/apis/cldc-compact/cc/squirreljme/runtime/cldc/string/CharArraySequence.java.

13
14
15
16
17
18
19

20
21
22
23
24
25
26
/**
 * This is a sequence which is backed by a directly access character array.
 *
 * The array data is not copied.
 *
 * @since 2018/09/16
 */

public final class CharArraySequence
	extends BasicSequence
{
	/** The array data. */
	protected final char[] data;
	
	/** The array length. */







>







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
 * This is a sequence which is backed by a directly access character array.
 *
 * The array data is not copied.
 *
 * @since 2018/09/16
 */
@Deprecated
public final class CharArraySequence
	extends BasicSequence
{
	/** The array data. */
	protected final char[] data;
	
	/** The array length. */

Changes to runt/apis/cldc-compact/cc/squirreljme/runtime/cldc/string/CharSequenceSequence.java.

11
12
13
14
15
16
17

18
19
20
21
22
23
24
package cc.squirreljme.runtime.cldc.string;

/**
 * A sequence which uses a character sequence.
 *
 * @since 2018/09/20
 */

public final class CharSequenceSequence
	extends BasicSequence
{
	/** The sequence to wrap. */
	protected final CharSequence sequence;
	
	/**







>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package cc.squirreljme.runtime.cldc.string;

/**
 * A sequence which uses a character sequence.
 *
 * @since 2018/09/20
 */
@Deprecated
public final class CharSequenceSequence
	extends BasicSequence
{
	/** The sequence to wrap. */
	protected final CharSequence sequence;
	
	/**

Changes to runt/apis/cldc-compact/cc/squirreljme/runtime/cldc/string/ClassConstantCharArraySequence.java.

15
16
17
18
19
20
21

22
23
24
25
26
27
28
 *
 * The array data is not copied.
 *
 * This is a special class to indicate the character array is a class constant.
 *
 * @since 2018/11/11
 */

public final class ClassConstantCharArraySequence
	extends BasicSequence
{
	/** The array data. */
	protected final char[] data;
	
	/** The array length. */







>







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 *
 * The array data is not copied.
 *
 * This is a special class to indicate the character array is a class constant.
 *
 * @since 2018/11/11
 */
@Deprecated
public final class ClassConstantCharArraySequence
	extends BasicSequence
{
	/** The array data. */
	protected final char[] data;
	
	/** The array length. */

Changes to runt/apis/cldc-compact/cc/squirreljme/runtime/cldc/string/EmptySequence.java.

11
12
13
14
15
16
17

18
19
20
21
22
23
24
package cc.squirreljme.runtime.cldc.string;

/**
 * This represents an empty string.
 *
 * @since 2018/02/24
 */

public final class EmptySequence
	extends BasicSequence
{
	/** Single instance of the empty string. */
	public static final EmptySequence INSTANCE =
		new EmptySequence();
	







>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package cc.squirreljme.runtime.cldc.string;

/**
 * This represents an empty string.
 *
 * @since 2018/02/24
 */
@Deprecated
public final class EmptySequence
	extends BasicSequence
{
	/** Single instance of the empty string. */
	public static final EmptySequence INSTANCE =
		new EmptySequence();
	

Changes to runt/apis/cldc-compact/cc/squirreljme/runtime/cldc/string/MemoryUTFSequence.java.

10
11
12
13
14
15
16

17
18
19
20
21
22
23
package cc.squirreljme.runtime.cldc.string;

/**
 * This is a sequence which accesses memory and uses the UTF encoded form.
 *
 * @since 2019/04/30
 */

public final class MemoryUTFSequence
	extends BasicSequence
{
	/** The memory pointer. */
	protected final int pointer;
	
	/**







>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package cc.squirreljme.runtime.cldc.string;

/**
 * This is a sequence which accesses memory and uses the UTF encoded form.
 *
 * @since 2019/04/30
 */
@Deprecated
public final class MemoryUTFSequence
	extends BasicSequence
{
	/** The memory pointer. */
	protected final int pointer;
	
	/**

Changes to runt/apis/cldc-compact/cc/squirreljme/runtime/cldc/string/SingleCharacterSequence.java.

11
12
13
14
15
16
17

18
19
20
21
22
23
24
package cc.squirreljme.runtime.cldc.string;

/**
 * This is a sequence which contains only a single character.
 *
 * @since 2018/10/12
 */

public final class SingleCharacterSequence
	extends BasicSequence
{
	/** The value to store. */
	protected final char value;
	
	/**







>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package cc.squirreljme.runtime.cldc.string;

/**
 * This is a sequence which contains only a single character.
 *
 * @since 2018/10/12
 */
@Deprecated
public final class SingleCharacterSequence
	extends BasicSequence
{
	/** The value to store. */
	protected final char value;
	
	/**

Changes to runt/apis/cldc-compact/cc/squirreljme/runtime/cldc/string/SubBasicSequenceSequence.java.

11
12
13
14
15
16
17

18
19
20
21
22
23
24
package cc.squirreljme.runtime.cldc.string;

/**
 * This is a sequence which provides a sub-sequence.
 *
 * @since 2018/09/29
 */

public final class SubBasicSequenceSequence
	extends BasicSequence
{
	/** The sequence to wrap. */
	protected final BasicSequence sequence;
	
	/** The start index. */







>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package cc.squirreljme.runtime.cldc.string;

/**
 * This is a sequence which provides a sub-sequence.
 *
 * @since 2018/09/29
 */
@Deprecated
public final class SubBasicSequenceSequence
	extends BasicSequence
{
	/** The sequence to wrap. */
	protected final BasicSequence sequence;
	
	/** The start index. */

Changes to runt/apis/cldc-compact/cc/squirreljme/runtime/cldc/string/package-info.java.

11
12
13
14
15
16
17

18
19
/**
 * This contains backing characters stores for contained string data that will
 * be internally used by {@link java.lang.String}.
 *
 * @since 2018/02/24
 */


package cc.squirreljme.runtime.cldc.string;








>


11
12
13
14
15
16
17
18
19
20
/**
 * This contains backing characters stores for contained string data that will
 * be internally used by {@link java.lang.String}.
 *
 * @since 2018/02/24
 */

@Deprecated
package cc.squirreljme.runtime.cldc.string;

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

62
63
64
65
66
67
68

69
70
71
72
73
74
75
...
279
280
281
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
		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 the string using the given sequence for characters.
	 *
	 * @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;







>







 







>







 







>







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
...
280
281
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
308
309
		0b0000_0000__0000_0001;
	
	/** Is this string already uppercased? */
	private static final short _QUICK_ISUPPER =
		0b0000_0000__0000_0010;
	
	/** The basic character sequence data. */
	@Deprecated
	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 the string using the given sequence for characters.
	 *
	 * @param __bs The sequence of characters to use.
	 * @throws NullPointerException On null arguments.
	 * @since 2018/02/24
	 */
	@Deprecated
	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
	 */
	@Deprecated
	private String(BasicSequence __bs, short __qf)
		throws NullPointerException
	{
		if (__bs == null)
			throw new NullPointerException("NARG");
		
		this._sequence = __bs;