Check-in [2ac2df2f0a]

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

Overview
Comment:Deprecate transitional object data.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | wip-springcoat-bringup
Files: files | file ages | folders
SHA1: 2ac2df2f0aa95fce8a6b24574293921be394a95d
User & Date: stephanie.gawroriski 2020-03-22 21:47:37
Context
2020-03-22
22:15
Add more IntelliJ templates; Deprecate SpringPointerArea. check-in: 97b03316b8 user: stephanie.gawroriski tags: wip-springcoat-bringup
21:47
Deprecate transitional object data. check-in: 2ac2df2f0a user: stephanie.gawroriski tags: wip-springcoat-bringup
20:07
Add base for initializing ClassInfo. check-in: 8abb266042 user: stephanie.gawroriski tags: wip-springcoat-bringup
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to emulators/springcoat-vm/src/main/java/cc/squirreljme/vm/springcoat/ReferenceChainer.java.

10
11
12
13
14
15
16

17
18
19

20
21
22
23
24
25
26
27

28
29
30
31
32
33
34
35
36
37
38

39
40
41
42
43
package cc.squirreljme.vm.springcoat;

/**
 * This class manages the reference chain.
 *
 * @since 2020/03/13
 */

public final class ReferenceChainer
{
	/** The pointer value. */

	private SpringPointer _pointer;
	
	/**
	 * Gets the chain.
	 *
	 * @return The chain pointer.
	 * @since 2020/03/13
	 */

	public final SpringPointer get()
	{
		return this._pointer;
	}
	
	/**
	 * Sets the chain.
	 *
	 * @param __v The new value to set.
	 * @since 2020/03/13
	 */

	public final void set(SpringPointer __v)
	{
		this._pointer = __v;
	}
}







>



>








>











>





10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package cc.squirreljme.vm.springcoat;

/**
 * This class manages the reference chain.
 *
 * @since 2020/03/13
 */
@Deprecated
public final class ReferenceChainer
{
	/** The pointer value. */
	@Deprecated
	private SpringPointer _pointer;
	
	/**
	 * Gets the chain.
	 *
	 * @return The chain pointer.
	 * @since 2020/03/13
	 */
	@Deprecated
	public final SpringPointer get()
	{
		return this._pointer;
	}
	
	/**
	 * Sets the chain.
	 *
	 * @param __v The new value to set.
	 * @since 2020/03/13
	 */
	@Deprecated
	public final void set(SpringPointer __v)
	{
		this._pointer = __v;
	}
}

Changes to emulators/springcoat-vm/src/main/java/cc/squirreljme/vm/springcoat/ReferenceCounter.java.

10
11
12
13
14
15
16

17
18
19
20
21
22
23
..
27
28
29
30
31
32
33

34
35
36
37
38
package cc.squirreljme.vm.springcoat;

/**
 * This is used to wrap the reference counter.
 *
 * @since 2020/03/13
 */

public final class ReferenceCounter
{
	/**
	 * The current count.
	 *
	 * @deprecated This will be transitioned to somewhere in memory.
	 */
................................................................................
	
	/**
	 * Increases the count and returns the new value.
	 *
	 * @return The new value.
	 * @since 2020/03/13
	 */

	public final int up()
	{
		return ++this._count;
	}
}







>







 







>





10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
..
28
29
30
31
32
33
34
35
36
37
38
39
40
package cc.squirreljme.vm.springcoat;

/**
 * This is used to wrap the reference counter.
 *
 * @since 2020/03/13
 */
@Deprecated
public final class ReferenceCounter
{
	/**
	 * The current count.
	 *
	 * @deprecated This will be transitioned to somewhere in memory.
	 */
................................................................................
	
	/**
	 * Increases the count and returns the new value.
	 *
	 * @return The new value.
	 * @since 2020/03/13
	 */
	@Deprecated
	public final int up()
	{
		return ++this._count;
	}
}

Changes to emulators/springcoat-vm/src/main/java/cc/squirreljme/vm/springcoat/SpringMonitor.java.

14
15
16
17
18
19
20

21
22
23

24
25
26
27

28
29
30

31
32
33

34
35
36

37
38
39
40
41
42
43
44
45

46
47
48
49
50
51
52
..
92
93
94
95
96
97
98

99
100
101
102
103
104
105
...
137
138
139
140
141
142
143

144
145
146
147
148
149
150
...
179
180
181
182
183
184
185

186
187
188
189
190
191
192
...
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
import cc.squirreljme.vm.springcoat.exceptions.SpringIllegalMonitorStateException;

/**
 * This is a monitor which is associated with an object.
 *
 * @since 2018/09/15
 */

public final class SpringMonitor
{
	/** The monitor lock. */

	protected final Object lock =
		new Object();
	
	/** The thread which owns this monitor. */

	volatile SpringThread _owner;
	
	/** Number of threads which are waiting on this monitor. */

	volatile int _waitcount;
	
	/** The number of notifications happening. */

	volatile int _notifycount;
	
	/** The entry count on the monitor. */

	private int _count;
	
	/**
	 * Enters the monitor.
	 *
	 * @param __t The thread trying to lock the monitor.
	 * @throws NullPointerException On null arguments.
	 * @since 2018/09/15
	 */

	public final void enter(SpringThread __t)
		throws NullPointerException
	{
		if (__t == null)
			throw new NullPointerException("NARG");
		
		// Lock on the monitor lock
................................................................................
	 * @param __t The thread exiting the monitor.
	 * @param __notify Should threads be notified that an unlock happened?
	 * @throws NullPointerException On null arguments.
	 * @throws SpringIllegalMonitorStateException If the monitor is not owned
	 * by this thread.
	 * @since 2018/09/15
	 */

	public final void exit(SpringThread __t, boolean __notify)
		throws NullPointerException, SpringIllegalMonitorStateException
	{
		if (__t == null)
			throw new NullPointerException("NARG");
		
		// Lock on the monitor lock
................................................................................
	 *
	 * @param __by The thread that is doing the notify.
	 * @param __all Notify all threads?
	 * @return The notification status.
	 * @throws NullPointerException On null arguments.
	 * @since 2018/11/20
	 */

	public final int monitorNotify(SpringThread __by, boolean __all)
		throws NullPointerException
	{
		if (__by == null)
			throw new NullPointerException("NARG");
		
		// Lock on the monitor lock
................................................................................
	 * @param __by The thread doing the wait.
	 * @param __ms The milliseconds to wait.
	 * @param __ns The nanoseconds to wait.
	 * @return The wait result.
	 * @throws NullPointerException On null arguments.
	 * @since 2018/11/21
	 */

	public final int monitorWait(SpringThread __by, long __ms, int __ns)
		throws NullPointerException
	{
		if (__by == null)
			throw new NullPointerException("NARG");
		
		// Lock on the monitor lock
................................................................................
					catch (InterruptedException e)
					{
						interrupted = true;
					}
				}
			}
		}
	}
	
	/**
	 * Waiting information on this monitor.
	 *
	 * @since 2018/11/20
	 */
	private static final class __Waiting__
	{
	}
}








>



>




>



>



>



>









>







 







>







 







>







 







>







 







<
<
<
<
<
<
<
<
<



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
..
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
...
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
...
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
...
284
285
286
287
288
289
290









291
292
293
import cc.squirreljme.vm.springcoat.exceptions.SpringIllegalMonitorStateException;

/**
 * This is a monitor which is associated with an object.
 *
 * @since 2018/09/15
 */
@Deprecated
public final class SpringMonitor
{
	/** The monitor lock. */
	@Deprecated
	protected final Object lock =
		new Object();
	
	/** The thread which owns this monitor. */
	@Deprecated
	volatile SpringThread _owner;
	
	/** Number of threads which are waiting on this monitor. */
	@Deprecated
	volatile int _waitcount;
	
	/** The number of notifications happening. */
	@Deprecated
	volatile int _notifycount;
	
	/** The entry count on the monitor. */
	@Deprecated
	private int _count;
	
	/**
	 * Enters the monitor.
	 *
	 * @param __t The thread trying to lock the monitor.
	 * @throws NullPointerException On null arguments.
	 * @since 2018/09/15
	 */
	@Deprecated
	public final void enter(SpringThread __t)
		throws NullPointerException
	{
		if (__t == null)
			throw new NullPointerException("NARG");
		
		// Lock on the monitor lock
................................................................................
	 * @param __t The thread exiting the monitor.
	 * @param __notify Should threads be notified that an unlock happened?
	 * @throws NullPointerException On null arguments.
	 * @throws SpringIllegalMonitorStateException If the monitor is not owned
	 * by this thread.
	 * @since 2018/09/15
	 */
	@Deprecated
	public final void exit(SpringThread __t, boolean __notify)
		throws NullPointerException, SpringIllegalMonitorStateException
	{
		if (__t == null)
			throw new NullPointerException("NARG");
		
		// Lock on the monitor lock
................................................................................
	 *
	 * @param __by The thread that is doing the notify.
	 * @param __all Notify all threads?
	 * @return The notification status.
	 * @throws NullPointerException On null arguments.
	 * @since 2018/11/20
	 */
	@Deprecated
	public final int monitorNotify(SpringThread __by, boolean __all)
		throws NullPointerException
	{
		if (__by == null)
			throw new NullPointerException("NARG");
		
		// Lock on the monitor lock
................................................................................
	 * @param __by The thread doing the wait.
	 * @param __ms The milliseconds to wait.
	 * @param __ns The nanoseconds to wait.
	 * @return The wait result.
	 * @throws NullPointerException On null arguments.
	 * @since 2018/11/21
	 */
	@Deprecated
	public final int monitorWait(SpringThread __by, long __ms, int __ns)
		throws NullPointerException
	{
		if (__by == null)
			throw new NullPointerException("NARG");
		
		// Lock on the monitor lock
................................................................................
					catch (InterruptedException e)
					{
						interrupted = true;
					}
				}
			}
		}









	}
}

Changes to emulators/springcoat-vm/src/main/java/cc/squirreljme/vm/springcoat/SpringObject.java.

21
22
23
24
25
26
27

28
29
30
31
32
33
34
..
37
38
39
40
41
42
43

44
45
46
47
48
49
50
51

52
53
54
55
56
57
58
59
60
61
62
{
	/**
	 * Returns the monitor for this object.
	 *
	 * @return This object's monitor.
	 * @since 2018/09/15
	 */

	SpringMonitor monitor();
	
	/**
	 * Returns the pointer area for this object.
	 *
	 * @return The pointer area for this object.
	 * @since 2019/12/21
................................................................................
	
	/**
	 * Returns the reference chain manager.
	 *
	 * @return The reference chain pointer.
	 * @since 2020/03/13
	 */

	ReferenceChainer refChainer();
	
	/**
	 * Returns the reference counter.
	 *
	 * @return The reference counter.
	 * @since 2020/03/13
	 */

	ReferenceCounter refCounter();
	
	/**
	 * Returns the object type.
	 *
	 * @return The object type.
	 * @since 2018/09/09
	 */
	SpringClass type();
}








>







 







>








>











21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
	/**
	 * Returns the monitor for this object.
	 *
	 * @return This object's monitor.
	 * @since 2018/09/15
	 */
	@Deprecated
	SpringMonitor monitor();
	
	/**
	 * Returns the pointer area for this object.
	 *
	 * @return The pointer area for this object.
	 * @since 2019/12/21
................................................................................
	
	/**
	 * Returns the reference chain manager.
	 *
	 * @return The reference chain pointer.
	 * @since 2020/03/13
	 */
	@Deprecated
	ReferenceChainer refChainer();
	
	/**
	 * Returns the reference counter.
	 *
	 * @return The reference counter.
	 * @since 2020/03/13
	 */
	@Deprecated
	ReferenceCounter refCounter();
	
	/**
	 * Returns the object type.
	 *
	 * @return The object type.
	 * @since 2018/09/09
	 */
	SpringClass type();
}