Skip to content

Commit c83e8c6

Browse files
committed
Remove ENABLE_IL2CPP
1 parent a508d1b commit c83e8c6

File tree

5 files changed

+9
-47
lines changed

5 files changed

+9
-47
lines changed

GDTask.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Godot.NET.Sdk/4.2.1">
1+
<Project Sdk="Godot.NET.Sdk/4.2.0">
22
<PropertyGroup>
33
<TargetFramework>net6.0</TargetFramework>
44
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net7.0</TargetFramework>

GDTask.sln

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 2012
3-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GDTask", "GDTask.csproj", "{2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}"
3+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GDTask", "GDTask.csproj", "{CEF6A453-1034-46B7-9617-C94E19891B46}"
44
EndProject
55
Global
66
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -9,11 +9,11 @@ Global
99
ExportRelease|Any CPU = ExportRelease|Any CPU
1010
EndGlobalSection
1111
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12-
{2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13-
{2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
14-
{2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
15-
{2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
16-
{2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
17-
{2A00429B-5E6F-4AC6-AF6C-8CA6070444BE}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
12+
{CEF6A453-1034-46B7-9617-C94E19891B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13+
{CEF6A453-1034-46B7-9617-C94E19891B46}.Debug|Any CPU.Build.0 = Debug|Any CPU
14+
{CEF6A453-1034-46B7-9617-C94E19891B46}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
15+
{CEF6A453-1034-46B7-9617-C94E19891B46}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
16+
{CEF6A453-1034-46B7-9617-C94E19891B46}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
17+
{CEF6A453-1034-46B7-9617-C94E19891B46}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
1818
EndGlobalSection
1919
EndGlobal

addons/GDTask/CompilerServices/AsyncGDTaskVoidMethodBuilder.cs

-10
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@ public void SetException(Exception exception)
3939
// runner is finished, return first.
4040
if (runner != null)
4141
{
42-
#if ENABLE_IL2CPP
43-
// workaround for IL2CPP bug.
44-
PlayerLoopHelper.AddContinuation(PlayerLoopTiming.LastPostLateUpdate, runner.ReturnAction);
45-
#else
4642
runner.Return();
47-
#endif
4843
runner = null;
4944
}
5045

@@ -59,12 +54,7 @@ public void SetResult()
5954
// runner is finished, return.
6055
if (runner != null)
6156
{
62-
#if ENABLE_IL2CPP
63-
// workaround for IL2CPP bug.
64-
PlayerLoopHelper.AddContinuation(PlayerLoopTiming.LastPostLateUpdate, runner.ReturnAction);
65-
#else
6657
runner.Return();
67-
#endif
6858
runner = null;
6959
}
7060
}

addons/GDTask/CompilerServices/StateMachineRunner.cs

+1-28
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#pragma warning disable CS1591
22

33
using System;
4-
using System.Linq;
54
using System.Diagnostics;
5+
using System.Linq;
66
using System.Runtime.CompilerServices;
77

88
namespace Fractural.Tasks.CompilerServices
@@ -56,9 +56,6 @@ internal sealed class AsyncGDTaskVoid<TStateMachine> : IStateMachineRunner, ITas
5656
public AsyncGDTaskVoid()
5757
{
5858
MoveNext = Run;
59-
#if ENABLE_IL2CPP
60-
ReturnAction = Return;
61-
#endif
6259
}
6360

6461
public static void SetStateMachine(ref TStateMachine stateMachine, ref IStateMachineRunner runnerFieldRef)
@@ -120,10 +117,6 @@ internal sealed class AsyncGDTask<TStateMachine> : IStateMachineRunnerPromise, I
120117
where TStateMachine : IAsyncStateMachine
121118
{
122119
static TaskPool<AsyncGDTask<TStateMachine>> pool;
123-
124-
#if ENABLE_IL2CPP
125-
readonly Action returnDelegate;
126-
#endif
127120
public Action MoveNext { get; }
128121

129122
TStateMachine stateMachine;
@@ -132,9 +125,6 @@ internal sealed class AsyncGDTask<TStateMachine> : IStateMachineRunnerPromise, I
132125
AsyncGDTask()
133126
{
134127
MoveNext = Run;
135-
#if ENABLE_IL2CPP
136-
returnDelegate = Return;
137-
#endif
138128
}
139129

140130
public static void SetStateMachine(ref TStateMachine stateMachine, ref IStateMachineRunnerPromise runnerPromiseFieldRef)
@@ -210,12 +200,7 @@ public void GetResult(short token)
210200
}
211201
finally
212202
{
213-
#if ENABLE_IL2CPP
214-
// workaround for IL2CPP bug.
215-
PlayerLoopHelper.AddContinuation(PlayerLoopTiming.LastPostLateUpdate, returnDelegate);
216-
#else
217203
TryReturn();
218-
#endif
219204
}
220205
}
221206

@@ -243,10 +228,6 @@ internal sealed class AsyncGDTask<TStateMachine, T> : IStateMachineRunnerPromise
243228
{
244229
static TaskPool<AsyncGDTask<TStateMachine, T>> pool;
245230

246-
#if ENABLE_IL2CPP
247-
readonly Action returnDelegate;
248-
#endif
249-
250231
public Action MoveNext { get; }
251232

252233
TStateMachine stateMachine;
@@ -255,9 +236,6 @@ internal sealed class AsyncGDTask<TStateMachine, T> : IStateMachineRunnerPromise
255236
AsyncGDTask()
256237
{
257238
MoveNext = Run;
258-
#if ENABLE_IL2CPP
259-
returnDelegate = Return;
260-
#endif
261239
}
262240

263241
public static void SetStateMachine(ref TStateMachine stateMachine, ref IStateMachineRunnerPromise<T> runnerPromiseFieldRef)
@@ -333,12 +311,7 @@ public T GetResult(short token)
333311
}
334312
finally
335313
{
336-
#if ENABLE_IL2CPP
337-
// workaround for IL2CPP bug.
338-
PlayerLoopHelper.AddContinuation(PlayerLoopTiming.LastPostLateUpdate, returnDelegate);
339-
#else
340314
TryReturn();
341-
#endif
342315
}
343316
}
344317

tests/manual/Test.tscn

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
[node name="Test" type="Node2D"]
77
script = ExtResource("1")
8-
runTestOnReady = true
98
spritePath = NodePath("Sprite2D")
109

1110
[node name="Sprite2D" type="Sprite2D" parent="."]

0 commit comments

Comments
 (0)