Skip to content

Commit

Permalink
Remove ENABLE_IL2CPP
Browse files Browse the repository at this point in the history
  • Loading branch information
Atlinx committed Mar 26, 2024
1 parent a508d1b commit c83e8c6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 47 deletions.
2 changes: 1 addition & 1 deletion GDTask.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Godot.NET.Sdk/4.2.1">
<Project Sdk="Godot.NET.Sdk/4.2.0">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net7.0</TargetFramework>
Expand Down
14 changes: 7 additions & 7 deletions GDTask.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GDTask", "GDTask.csproj", "{2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GDTask", "GDTask.csproj", "{CEF6A453-1034-46B7-9617-C94E19891B46}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -9,11 +9,11 @@ Global
ExportRelease|Any CPU = ExportRelease|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
{2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
{2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
{2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
{CEF6A453-1034-46B7-9617-C94E19891B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CEF6A453-1034-46B7-9617-C94E19891B46}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CEF6A453-1034-46B7-9617-C94E19891B46}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
{CEF6A453-1034-46B7-9617-C94E19891B46}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
{CEF6A453-1034-46B7-9617-C94E19891B46}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
{CEF6A453-1034-46B7-9617-C94E19891B46}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
EndGlobalSection
EndGlobal
10 changes: 0 additions & 10 deletions addons/GDTask/CompilerServices/AsyncGDTaskVoidMethodBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@ public void SetException(Exception exception)
// runner is finished, return first.
if (runner != null)
{
#if ENABLE_IL2CPP
// workaround for IL2CPP bug.
PlayerLoopHelper.AddContinuation(PlayerLoopTiming.LastPostLateUpdate, runner.ReturnAction);
#else
runner.Return();
#endif
runner = null;
}

Expand All @@ -59,12 +54,7 @@ public void SetResult()
// runner is finished, return.
if (runner != null)
{
#if ENABLE_IL2CPP
// workaround for IL2CPP bug.
PlayerLoopHelper.AddContinuation(PlayerLoopTiming.LastPostLateUpdate, runner.ReturnAction);
#else
runner.Return();
#endif
runner = null;
}
}
Expand Down
29 changes: 1 addition & 28 deletions addons/GDTask/CompilerServices/StateMachineRunner.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma warning disable CS1591

using System;
using System.Linq;
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;

namespace Fractural.Tasks.CompilerServices
Expand Down Expand Up @@ -56,9 +56,6 @@ internal sealed class AsyncGDTaskVoid<TStateMachine> : IStateMachineRunner, ITas
public AsyncGDTaskVoid()
{
MoveNext = Run;
#if ENABLE_IL2CPP
ReturnAction = Return;
#endif
}

public static void SetStateMachine(ref TStateMachine stateMachine, ref IStateMachineRunner runnerFieldRef)
Expand Down Expand Up @@ -120,10 +117,6 @@ internal sealed class AsyncGDTask<TStateMachine> : IStateMachineRunnerPromise, I
where TStateMachine : IAsyncStateMachine
{
static TaskPool<AsyncGDTask<TStateMachine>> pool;

#if ENABLE_IL2CPP
readonly Action returnDelegate;
#endif
public Action MoveNext { get; }

TStateMachine stateMachine;
Expand All @@ -132,9 +125,6 @@ internal sealed class AsyncGDTask<TStateMachine> : IStateMachineRunnerPromise, I
AsyncGDTask()
{
MoveNext = Run;
#if ENABLE_IL2CPP
returnDelegate = Return;
#endif
}

public static void SetStateMachine(ref TStateMachine stateMachine, ref IStateMachineRunnerPromise runnerPromiseFieldRef)
Expand Down Expand Up @@ -210,12 +200,7 @@ public void GetResult(short token)
}
finally
{
#if ENABLE_IL2CPP
// workaround for IL2CPP bug.
PlayerLoopHelper.AddContinuation(PlayerLoopTiming.LastPostLateUpdate, returnDelegate);
#else
TryReturn();
#endif
}
}

Expand Down Expand Up @@ -243,10 +228,6 @@ internal sealed class AsyncGDTask<TStateMachine, T> : IStateMachineRunnerPromise
{
static TaskPool<AsyncGDTask<TStateMachine, T>> pool;

#if ENABLE_IL2CPP
readonly Action returnDelegate;
#endif

public Action MoveNext { get; }

TStateMachine stateMachine;
Expand All @@ -255,9 +236,6 @@ internal sealed class AsyncGDTask<TStateMachine, T> : IStateMachineRunnerPromise
AsyncGDTask()
{
MoveNext = Run;
#if ENABLE_IL2CPP
returnDelegate = Return;
#endif
}

public static void SetStateMachine(ref TStateMachine stateMachine, ref IStateMachineRunnerPromise<T> runnerPromiseFieldRef)
Expand Down Expand Up @@ -333,12 +311,7 @@ public T GetResult(short token)
}
finally
{
#if ENABLE_IL2CPP
// workaround for IL2CPP bug.
PlayerLoopHelper.AddContinuation(PlayerLoopTiming.LastPostLateUpdate, returnDelegate);
#else
TryReturn();
#endif
}
}

Expand Down
1 change: 0 additions & 1 deletion tests/manual/Test.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

[node name="Test" type="Node2D"]
script = ExtResource("1")
runTestOnReady = true
spritePath = NodePath("Sprite2D")

[node name="Sprite2D" type="Sprite2D" parent="."]
Expand Down

0 comments on commit c83e8c6

Please sign in to comment.