Skip to content

Commit 49f87f8

Browse files
Jim8yshargon
andauthored
Upgrade to .NET 10 and tidy hot paths (#538)
* chore: upgrade to net10 targets * Improve logic --------- Co-authored-by: Shargon <[email protected]>
1 parent 43b47be commit 49f87f8

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

benchmarks/Neo.VM.Benchmarks/Neo.VM.Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net9.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<IsPackable>false</IsPackable>

src/Neo.VM/EvaluationStack.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,9 @@ public IReadOnlyList<StackItem> this[Range range]
4848
if (start > end)
4949
throw new ArgumentOutOfRangeException(nameof(range), "Range start must be less than or equal to end.");
5050

51-
StackItem[] copyList = [.. _innerList];
52-
List<StackItem> reverseList = [.. copyList.Reverse()];
53-
54-
return reverseList.GetRange(start, end - start);
51+
List<StackItem> copyList = new(_innerList);
52+
copyList.Reverse();
53+
return copyList.GetRange(start, end - start);
5554
}
5655
}
5756

src/Neo.VM/Neo.VM.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Description>Neo virtual machine</Description>
66
<VersionPrefix>3.9.0</VersionPrefix>
77
<Authors>The Neo Project</Authors>
8-
<TargetFrameworks>netstandard2.1;net9.0</TargetFrameworks>
8+
<TargetFrameworks>netstandard2.1;net10.0</TargetFrameworks>
99
<LangVersion>latest</LangVersion>
1010
<PackageTags>NEO;AntShares;Blockchain;Smart Contract;VM</PackageTags>
1111
<PackageProjectUrl>https://github.com/neo-project/neo-vm</PackageProjectUrl>

tests/Neo.VM.Tests/Neo.VM.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<RootNamespace>Neo.Test</RootNamespace>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<IsPackable>false</IsPackable>

0 commit comments

Comments
 (0)