by phantombeta » Mon Oct 07, 2019 4:02 am
			
			
			Some testing with an alternate example indicates this likely isn't the JIT's fault at all, and is probably just a case of the JIT being less forgiving of broken bytecode.
Code: Select all
class BEPlayerBase : DoomPlayer
{
	private void CheckCursorMovement(out vector2 CursorPosition, int maxWidth, int maxHeight)
	{
		Console.Printf ("%f, %f", CursorPosition.X, CursorPosition.Y);
	}
	vector2 SomeGridCoords;
	override void Tick()
	{
		int buttons = player.original_cmd.buttons;
		int oldbuttons = player.original_oldbuttons;
		if (buttons & BT_ATTACK)
		{
			CheckCursorMovement((50, 25), 5, 5);
		}
		Super.Tick();
	}
}
This alternate example causes the VM to crash with a Fatal Error window. Might include more details soon.
Edit: Further investigation shows that this is, indeed, (just as I thought) compiler fuckery:

More details soon maybe.
					- Attachments
- 
			
		
		
				
			 JIT out vector2 Test_Alternate.pk3 JIT out vector2 Test_Alternate.pk3
- (567 Bytes) Downloaded 129 times
 
Some testing with an alternate example indicates this likely isn't the JIT's fault at all, and is probably just a case of the JIT being less forgiving of broken bytecode.
[code]class BEPlayerBase : DoomPlayer
{
	private void CheckCursorMovement(out vector2 CursorPosition, int maxWidth, int maxHeight)
	{
		Console.Printf ("%f, %f", CursorPosition.X, CursorPosition.Y);
	}
	vector2 SomeGridCoords;
	override void Tick()
	{
		int buttons = player.original_cmd.buttons;
		int oldbuttons = player.original_oldbuttons;
		if (buttons & BT_ATTACK)
		{
			CheckCursorMovement((50, 25), 5, 5);
		}
		Super.Tick();
	}
}[/code]
This alternate example causes the VM to crash with a Fatal Error window. Might include more details soon.
Edit: Further investigation shows that this is, indeed, (just as I thought) compiler fuckery:
[img]https://cdn.discordapp.com/attachments/630143990389538870/630710770199691264/unknown.png[/img]
More details soon maybe.