Check-in [27820c3767]

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

Overview
Comment:Initialize the stack state from the stack map if any exists.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:27820c376748f0fc54409cecec12f3087593e30c
User & Date: stephanie.gawroriski 2019-03-14 16:19:53
Context
2019-03-14
16:23
Base for process call. check-in: 484d03f2a7 user: stephanie.gawroriski tags: trunk
16:19
Initialize the stack state from the stack map if any exists. check-in: 27820c3767 user: stephanie.gawroriski tags: trunk
16:13
Remove ExecutableCode it is not used. check-in: 9a1f6ad1ae user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to runt/libs/tool-classfile/net/multiphasicapps/classfile/__Registerize__.java.

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
60
61
62
 * @since 2019/03/14
 */
final class __Registerize__
{
	/** The input byte code to translate. */
	protected final ByteCode bytecode;
	






	/**
	 * Converts the input byte code to a register based code.
	 *
	 * @param __bc The byte code to translate.
	 * @throws NullPointerException On null arguments.
	 * @since 2019/03/14
	 */
................................................................................
	__Registerize__(ByteCode __bc)
		throws NullPointerException
	{
		if (__bc == null)
			throw new NullPointerException("NARG");
		
		this.bytecode = __bc;


	}
	
	/**
	 * Converts the byte code into register code.
	 *
	 * @return The resulting register code.
	 * @since 2019/03/14
	 */
	public RegisterCode convert()
	{
		ByteCode bytecode = this.bytecode;


		
		// Process every instruction
		for (Instruction i : bytecode)
		{
			// Debug
			todo.DEBUG.note("Xlate %s", i);







			
			throw new todo.TODO();
		}
		
		throw new todo.TODO();
	}
}








>
>
>
>
>
>







 







>
>











>
>


|


|
>
>
>
>
>
>
>








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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
 * @since 2019/03/14
 */
final class __Registerize__
{
	/** The input byte code to translate. */
	protected final ByteCode bytecode;
	
	/** The state of the stack. */
	protected final __StackState__ stack;
	
	/** The stack map table. */
	protected final StackMapTable stackmap;
	
	/**
	 * Converts the input byte code to a register based code.
	 *
	 * @param __bc The byte code to translate.
	 * @throws NullPointerException On null arguments.
	 * @since 2019/03/14
	 */
................................................................................
	__Registerize__(ByteCode __bc)
		throws NullPointerException
	{
		if (__bc == null)
			throw new NullPointerException("NARG");
		
		this.bytecode = __bc;
		this.stackmap = __bc.stackMapTable();
		this.stack = new __StackState__(__bc.maxLocals(), __bc.maxStack());
	}
	
	/**
	 * Converts the byte code into register code.
	 *
	 * @return The resulting register code.
	 * @since 2019/03/14
	 */
	public RegisterCode convert()
	{
		ByteCode bytecode = this.bytecode;
		StackMapTable stackmap = this.stackmap;
		__StackState__ stack = this.stack;
		
		// Process every instruction
		for (Instruction inst : bytecode)
		{
			// Debug
			todo.DEBUG.note("Xlate %s", inst);
			
			// If there is a defined stack map table state (this will be for
			// any kind of branch or exception handler), load that so it can
			// be worked from
			StackMapTableState smts = stackmap.get(inst.address());
			if (smts != null)
				stack.fromState(smts);
			
			throw new todo.TODO();
		}
		
		throw new todo.TODO();
	}
}