Check-in [68f007bc1f]

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

Overview
Comment:Do not check for compatibility in virtual invoke if the type is exactly known and matches the stack; Add more debug marks
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 68f007bc1f86a1497fb24842b45306e352c5d2ec
User & Date: stephanie.gawroriski 2019-06-12 13:38:59
Context
2019-06-12
17:13
Do not translate value for LOAD_POOL in debug print. check-in: b02eedf11f user: stephanie.gawroriski tags: trunk
13:38
Do not check for compatibility in virtual invoke if the type is exactly known and matches the stack; Add more debug marks check-in: 68f007bc1f user: stephanie.gawroriski tags: trunk
13:13
Store the actual super class in the instance check; Add interfaces and self pointer to the class information; Have memory issues read bad constants. check-in: 8679f7a02e user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

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
...
348
349
350
351
352
353
354





355
356
357
358
359
360
361
	 * @param __pc The address of the frame.
	 * @param __args Arguments to the frame
	 * @return The newly created frame.
	 * @since 2019/04/21
	 */
	public final Frame enterFrame(int __pc, int... __args)
	{




		// Debug
		if (ENABLE_DEBUG)
		{
			System.err.printf(">>>> %08x >>>>>>>>>>>>>>>>>>>>>>%n", __pc);
			System.err.printf(" > %s%n", new IntegerList(__args));


		}
		
		// Setup new frame
		Frame rv = new Frame();
		rv._pc = __pc;
		rv._entrypc = __pc;
		rv._lastpc = __pc;
		
		// Old frame, to source globals from
		LinkedList<Frame> frames = this._frames;
		Frame lastframe = frames.peekLast();
		
		// Add to frame list
		frames.addLast(rv);
		
		// Seed initial registers, if valid
		int[] dest = rv._registers;
		if (lastframe != null)
		{
................................................................................
					
					// {@squirreljme.error AE04 CPU breakpoint hit.}
					throw new VMException("AE04");
				
					// Debug entry point of method
				case NativeInstructionType.DEBUG_ENTRY:
					this.__debugEntry(nowframe, args[0], args[1], args[2]);





					break;
					
					// Debug exit of method
				case NativeInstructionType.DEBUG_EXIT:
					break;
					
					// Debug point in method.







>
>
>
>




|
>
>








<
<
<
<







 







>
>
>
>
>







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
124
...
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
	 * @param __pc The address of the frame.
	 * @param __args Arguments to the frame
	 * @return The newly created frame.
	 * @since 2019/04/21
	 */
	public final Frame enterFrame(int __pc, int... __args)
	{
		// Old frame, to source globals from
		LinkedList<Frame> frames = this._frames;
		Frame lastframe = frames.peekLast();
		
		// Debug
		if (ENABLE_DEBUG)
		{
			System.err.printf(">>>> %08x >>>>>>>>>>>>>>>>>>>>>>%n", __pc);
			System.err.printf(" > ARG %s%n", new IntegerList(__args));
			System.err.printf(" > WAS %s%n", (lastframe == null ? null :
				this.trace(lastframe)));
		}
		
		// Setup new frame
		Frame rv = new Frame();
		rv._pc = __pc;
		rv._entrypc = __pc;
		rv._lastpc = __pc;
		




		// Add to frame list
		frames.addLast(rv);
		
		// Seed initial registers, if valid
		int[] dest = rv._registers;
		if (lastframe != null)
		{
................................................................................
					
					// {@squirreljme.error AE04 CPU breakpoint hit.}
					throw new VMException("AE04");
				
					// Debug entry point of method
				case NativeInstructionType.DEBUG_ENTRY:
					this.__debugEntry(nowframe, args[0], args[1], args[2]);
					
					// Trace it!
					if (ENABLE_DEBUG)
						this.__cpuDebugPrint(nowframe, op, af, args, largs,
							reglist);
					break;
					
					// Debug exit of method
				case NativeInstructionType.DEBUG_EXIT:
					break;
					
					// Debug point in method.

Changes to runt/libs/tool-classfile/dev/shadowtail/classfile/nncc/NearNativeByteCodeHandler.java.

692
693
694
695
696
697
698

699
700
701
702
703
704
705
706
		// Interface, special, or virtual
		else
		{
			// Check that the object is of the given class type and is not null
			int ireg = __in[0].register;
			this.__basicCheckNPE(ireg);
			

			if (__in[0].isCompatible(__r.handle().outerClass()))
				this.__basicCheckCCE(ireg, __r.handle().outerClass());
			
			// Invoking interface method
			if (__t == InvokeType.INTERFACE)
			{
				// Load the interface we are looking in
				int voliclass = volatiles.get();







>
|







692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
		// Interface, special, or virtual
		else
		{
			// Check that the object is of the given class type and is not null
			int ireg = __in[0].register;
			this.__basicCheckNPE(ireg);
			
			// Check types if this is not compatible
			if (!__in[0].isCompatible(__r.handle().outerClass()))
				this.__basicCheckCCE(ireg, __r.handle().outerClass());
			
			// Invoking interface method
			if (__t == InvokeType.INTERFACE)
			{
				// Load the interface we are looking in
				int voliclass = volatiles.get();