Check-in [aed04b090e]

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

Overview
Comment:Add base API for entering methods.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:aed04b090edaed902734c751f4f7100ed1ea9401
User & Date: stephanie.gawroriski 2019-01-11 01:46:27
Context
2019-01-11
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
01:41
Add base interfaces for values; Add base for the SCRF representation; Implement most of the code needed to start a thread. check-in: bc4f03c934 user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
		// accordingly so it knows which method to invoke
		Instance threadobj = thr.vmNewInstance("java/lang/Thread",
			"(Ljava/lang/String;ILcc/squirreljme/runtime/cldc/asm/" +
			"StaticMethod;Ljava/lang/Object;)V", thr.vmTranslateString("Main"),
			IntegerValue.of((__ismid ? 3 : 4)), vmsm, entryarg);
		
		// Enter the __start() method for Thread
		if (true)
			throw new todo.TODO();
		
		// Now that the thread has been initialized it must be started, it
		// will keep running executing the method it starts in until
		// termination occurs
		thr.start();
		
		// Return out created task
		return rv;
	}
}








|
<











154
155
156
157
158
159
160
161

162
163
164
165
166
167
168
169
170
171
172
		// accordingly so it knows which method to invoke
		Instance threadobj = thr.vmNewInstance("java/lang/Thread",
			"(Ljava/lang/String;ILcc/squirreljme/runtime/cldc/asm/" +
			"StaticMethod;Ljava/lang/Object;)V", thr.vmTranslateString("Main"),
			IntegerValue.of((__ismid ? 3 : 4)), vmsm, entryarg);
		
		// Enter the __start() method for Thread
		thr.execEnterMethod(false, "java/lang/Thread", "__start", "()V");

		
		// Now that the thread has been initialized it must be started, it
		// will keep running executing the method it starts in until
		// termination occurs
		thr.start();
		
		// Return out created task
		return rv;
	}
}

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

44
45
46
47
48
49
50



















51
52
53
54
55
56
57
	{
		if (__s == null)
			throw new NullPointerException("NARG");
		
		this.id = __id;
		this.status = __s;
	}



















	
	/**
	 * {@inheritDoc}
	 * @since 2019/01/05
	 */
	@Override
	public void run()







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







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
	{
		if (__s == null)
			throw new NullPointerException("NARG");
		
		this.id = __id;
		this.status = __s;
	}
	
	/**
	 * Sets up the thread so that the given method is enterred from this
	 * thread.
	 *
	 * @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.
	 * @throws NullPointerException On null arguments.
	 * @since 2019/01/10
	 */
	public void execEnterMethod(boolean __static, String __cl, String __name,
		String __desc, Value... __args)
		throws NullPointerException
	{
		throw new todo.TODO();
	}
	
	/**
	 * {@inheritDoc}
	 * @since 2019/01/05
	 */
	@Override
	public void run()