Skip to content

Commit

Permalink
.NET 9 Upgrade in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
ackava committed Nov 28, 2024
1 parent 5a5db93 commit eba9508
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion YantraJS.Core.Tests/YantraJS.Core.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions YantraJS.Core/Core/Number/JSNumberPrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static JSValue Constructor(in Arguments a)
[JSExport("clz")]
public static JSValue Clz(in Arguments a)
{
uint x = (uint)a.This.ToNumber().value;
var x = a.This.ToNumber().IntValue;

// Propagate leftmost 1-bit to the right
x = x | (x >> 1);
Expand All @@ -60,7 +60,7 @@ public static JSValue Clz(in Arguments a)
x = x | (x >> 8);
x = x | (x >> 16);

int i = sizeof(int) * 8 - CountOneBits(x);
int i = sizeof(int) * 8 - CountOneBits((uint)x);
return new JSNumber(i);
}

Expand Down
2 changes: 1 addition & 1 deletion YantraJS.Core/Core/Number/JSNumberStatic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public static JSValue ParseInt(in Arguments a)
var n = a1.DoubleValue;
if (!double.IsNaN(n))
{
radix = (int)(uint)n;
radix = a1.IntValue;
if (radix < 0 || radix == 1 || radix > 36)
return nan;
}
Expand Down
4 changes: 2 additions & 2 deletions YantraJS.Core/Core/Objects/JSMath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ public static double Hypot(double number1, double number2) {
public static JSValue Imul(in Arguments args)
{
var (first, second) = args.Get2();
var d1 = (uint)first.DoubleValue;
var d2 = (uint)second.DoubleValue;
var d1 = first.IntValue;
var d2 = second.IntValue;
var r = (int)(d1 * d2);
return new JSNumber(r);

Expand Down
2 changes: 1 addition & 1 deletion YantraJS.Core/Core/String/JSStringStatic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal static JSValue FromCharCode(in Arguments a)
for(var ai = 0; ai < al; ai++)
{
var ch = a.GetAt(ai);
sb.Append((char)(ushort)(uint)ch.DoubleValue);
sb.Append((char)ch.IntValue);
}
return new JSString(sb.ToString());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>

<IsPackable>false</IsPackable>

Expand Down

0 comments on commit eba9508

Please sign in to comment.