Check-in [af64655e08]

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

Overview
Comment:Add base for running methods and such.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:af64655e08808a06c762eb020342256b615d7328
User & Date: stephanie.gawroriski 2019-01-11 01:59:29
Context
2019-01-11
02:21
Add MethodHandle which is a better and much simpler means to refering to methods for entry and it can have multiple lookup types as well. check-in: 102720fa69 user: stephanie.gawroriski tags: trunk
01:59
Add base for running methods and such. check-in: af64655e08 user: stephanie.gawroriski tags: trunk
01:46
Add base API for entering methods. check-in: aed04b090e user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to runt/libs/summercoat-vm/cc/squirreljme/vm/summercoat/RunningThread.java.

6
7
8
9
10
11
12


13
14
15
16
17
18
19
..
26
27
28
29
30
31
32



33
34
35
36
37
38
39
..
71
72
73
74
75
76
77


































78
79
80
81
82
83
84
// ---------------------------------------------------------------------------
// SquirrelJME is under the GNU General Public License v3+, or later.
// See license.mkd for licensing and copyright information.
// ---------------------------------------------------------------------------

package cc.squirreljme.vm.summercoat;



import net.multiphasicapps.classfile.ClassName;
import net.multiphasicapps.classfile.MethodDescriptor;
import net.multiphasicapps.classfile.MethodNameAndType;

/**
 * This represents a thread which is running in the virtual machine.
 *
................................................................................
	extends Thread
{
	/** The ID of this thread. */
	protected final int id;
	
	/** The task status this reports on. */
	protected final TaskStatus status;



	
	/**
	 * Initializes the thread.
	 *
	 * @param __id The thread ID.
	 * @param __s The task status.
	 * @throws NullPointerException On null arguments.
................................................................................
	/**
	 * {@inheritDoc}
	 * @since 2019/01/05
	 */
	@Override
	public void run()
	{


































		throw new todo.TODO();
	}
	
	/**
	 * Creates a new array instance.
	 *
	 * @param __cl The class to create an array of, this is not the component







>
>







 







>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
..
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
..
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
// ---------------------------------------------------------------------------
// SquirrelJME is under the GNU General Public License v3+, or later.
// See license.mkd for licensing and copyright information.
// ---------------------------------------------------------------------------

package cc.squirreljme.vm.summercoat;

import java.lang.ref.Reference;
import java.lang.ref.WeakReference;
import net.multiphasicapps.classfile.ClassName;
import net.multiphasicapps.classfile.MethodDescriptor;
import net.multiphasicapps.classfile.MethodNameAndType;

/**
 * This represents a thread which is running in the virtual machine.
 *
................................................................................
	extends Thread
{
	/** The ID of this thread. */
	protected final int id;
	
	/** The task status this reports on. */
	protected final TaskStatus status;
	
	/** Has this thread been started via the run method. */
	private volatile boolean _didstart;
	
	/**
	 * Initializes the thread.
	 *
	 * @param __id The thread ID.
	 * @param __s The task status.
	 * @throws NullPointerException On null arguments.
................................................................................
	/**
	 * {@inheritDoc}
	 * @since 2019/01/05
	 */
	@Override
	public void run()
	{
		// Thread is started by this, so method runs may only occur when the
		// current thread is self
		this._didstart = true;
		
		throw new todo.TODO();
	}
	
	/**
	 * Runs the specified method within the context of this thread and then
	 * returns the value of the execution. Note that if this thread has ever
	 * been started (its {@link run()} method called, then this must only
	 * ever be called by this self.
	 *
	 * @param __static Is this method static?
	 * @param __cl The class to enter.
	 * @param __name The method name.
	 * @param __desc The method type.
	 * @param __args The method arguments.
	 * @return The return value of the method, will be {@code null} on void
	 * types.
	 * @throws IllegalStateException If this thread has been run and the
	 * thread calling this method is not itself.
	 * @throws NullPointerException On null arguments.
	 * @since 2019/01/10
	 */
	public Value runMethod(boolean __static, String __cl, String __name,
		String __desc, Value... __args)
		throws IllegalStateException, NullPointerException
	{
		// {@squirreljme.error AE01 This thread has already been started and
		// as such this method may only be called from within that thread.}
		if (this._didstart && this != Thread.currentThread())
			throw new IllegalStateException("AE01");
		
		throw new todo.TODO();
	}
	
	/**
	 * Creates a new array instance.
	 *
	 * @param __cl The class to create an array of, this is not the component