Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/390 aes #7

Closed
wants to merge 88 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
b719e0d
Add failing test
AliveDevil Jul 23, 2024
780e286
Merge branch 'develop' into bugfix/509
wasabii Jul 24, 2024
676b4a7
Merge branch 'develop' into bugfix/509
wasabii Aug 12, 2024
240c76f
Merge branch 'develop' into bugfix/509
wasabii Aug 20, 2024
7ec4b5c
Merge branch 'develop' into bugfix/509
AliveDevil Sep 18, 2024
ea7a0c4
Merge pull request #629 from iterate-ch/develop
wasabii Dec 2, 2024
8ef3ff5
Remove a bit of stale code.
wasabii Dec 3, 2024
044cf0e
Merge branch 'develop' of https://github.com/ikvmnet/ikvm into develop
wasabii Dec 3, 2024
e3c835f
No need for return statement.
wasabii Dec 3, 2024
ff9f9dc
Merge branch 'develop' into bugfix/509
wasabii Dec 3, 2024
02b7cf9
Add -optimize option handling.
wasabii Dec 5, 2024
8d8e271
Optimize handling.
wasabii Dec 5, 2024
c8710f5
Add -optimize option handling.
wasabii Dec 5, 2024
7cb043a
Optimize handling.
wasabii Dec 5, 2024
11c1194
Property can exist outside importer.
wasabii Dec 5, 2024
5fbf38b
Merge branch 'develop' into bugfix/509
wasabii Dec 5, 2024
408a87b
Add tests to test method references. These work, but I'm isolating th…
wasabii Dec 6, 2024
78e76ef
Bunch more tests testing various other ways to access this functional…
wasabii Dec 6, 2024
94776eb
'bump'
wasabii Dec 7, 2024
8806aa5
install Powershell explicitely
wasabii Dec 7, 2024
f444756
Fix up for latest IKVM.ByteCode version.
wasabii Dec 11, 2024
3b11eaf
Add path properties.
wasabii Dec 11, 2024
9a1d120
Merge remote-tracking branch 'origin/main' into bugfix/509
wasabii Dec 11, 2024
bf35e9b
Fix Java code.
wasabii Dec 11, 2024
3cf351b
Remove runtimes.
wasabii Dec 11, 2024
cb31e9c
Remove launchSettings.
wasabii Dec 12, 2024
152a074
Spaces.
wasabii Dec 12, 2024
3cadd20
Fix usings.
wasabii Dec 12, 2024
525294d
Merge pull request #563 from ikvmnet/bugfix/509
wasabii Dec 12, 2024
0389c9a
Add some benchmarks.
wasabii Dec 12, 2024
a2cc374
Only disable optmizations of -optimize is false. Not when any symbols…
wasabii Dec 12, 2024
dd4d0c9
Add Optimize flag to IkvmReference.
wasabii Dec 12, 2024
cce4210
Add an object test.
wasabii Dec 13, 2024
3f1d8cb
Switch to using System.Reflection instead of java.lang.reflect. Cuts …
wasabii Dec 13, 2024
241f48a
Fixes #634
wasabii Dec 15, 2024
90f7a44
Checkcast not needed.
wasabii Dec 15, 2024
39cfd38
Dont' need second ghost thing.
wasabii Dec 15, 2024
db8e3ec
Use record for MethodKey.
wasabii Dec 15, 2024
644f016
Split up files.
wasabii Dec 15, 2024
7a96458
Some formatting cleanup.
wasabii Dec 15, 2024
8f13d90
Bunch more formatting cleanup.
wasabii Dec 15, 2024
0705a90
More formatting.
wasabii Dec 16, 2024
3b3bf82
Support null console.
wasabii Dec 16, 2024
495b274
Add precompiled proxy support back.
wasabii Dec 16, 2024
12a769d
Remove Proxy.java from ojdk.
wasabii Dec 16, 2024
f757d6d
Update to support LLVM 19.
wasabii Dec 18, 2024
af34b1c
Update Ubuntu.
wasabii Dec 18, 2024
53f6cf5
Initial android support.
wasabii Dec 18, 2024
f367ca8
Android support.
wasabii Dec 18, 2024
c6aaf3b
Remove arm version.
wasabii Dec 18, 2024
d1cc818
Add android.
wasabii Dec 18, 2024
39f756b
Keep android libs.
wasabii Dec 18, 2024
5a48ef4
Only log that we emitted a verifier error.
wasabii Dec 18, 2024
bc04b4f
Update libjvm.clangproj
wasabii Dec 18, 2024
cd991a1
Fix values.h
wasabii Dec 19, 2024
00652e3
Merge branch 'android' of https://github.com/ikvmnet/ikvm into android
wasabii Dec 19, 2024
b0337f5
Use TARGET_ARCH_zero instead of arch specific. This serves our purpos…
wasabii Dec 19, 2024
ef8d98d
Naw
wasabii Dec 19, 2024
09e58a1
Merge pull request #640 from ikvmnet/android
wasabii Dec 19, 2024
71da61a
Remove full debug mode from command options completely. Translate ful…
wasabii Dec 19, 2024
9096ddf
Can't build an exe for android anyways.
wasabii Dec 19, 2024
1fd696b
Don't output symbol. Not helpful.
wasabii Dec 19, 2024
6b524e8
Was still passing full.
wasabii Dec 19, 2024
2c9ad62
Add android-x64, for emulator support mostly.
wasabii Dec 28, 2024
f78907b
Split ImageRuntime into ImageBinRuntime, so we can deal with native l…
wasabii Dec 31, 2024
9f6bbb9
Move IKVM.Image-bin logic into Image.runtime.targets. Prevents a publ…
wasabii Dec 31, 2024
26dd502
Eliminate IKVM.Image.JDK-bin and IKVM.Image.JRE-bin. Removes two leve…
wasabii Dec 31, 2024
cd54822
Remove comment.
wasabii Dec 31, 2024
f28d20f
Add prefix to code.
wasabii Dec 31, 2024
cb9bf4a
No need for x86.
wasabii Dec 31, 2024
7c6d8fc
Change order.
wasabii Jan 1, 2025
6d7f729
Update Directory.Build.props
wasabii Jan 1, 2025
9b4ebc2
Update Directory.Build.props
wasabii Jan 1, 2025
064be94
Update Directory.Build.props
wasabii Jan 1, 2025
4b7dfd7
Merge dev.
wasabii Jan 1, 2025
37156f4
Fix up.
wasabii Jan 1, 2025
7d02804
Merge pull request #642 from ikvmnet/android-x64
wasabii Jan 3, 2025
2775c09
Generate ikvm.properties instead of copying it.
wasabii Jan 3, 2025
068fd7b
Merge branch 'develop' of https://github.com/ikvmnet/ikvm into develop
wasabii Jan 3, 2025
bb27e98
AESCrypt encryptBlock X86
AliveDevil Jan 6, 2025
3bcad11
Fix namespace
AliveDevil Jan 7, 2025
33ba1bc
Fix Vector128 creation on .NET 6
AliveDevil Jan 7, 2025
b9c9e9e
Aes Decrypt
AliveDevil Jan 7, 2025
41eb38f
Move ref structs to nested classes
AliveDevil Jan 7, 2025
18ed012
Inline
AliveDevil Jan 7, 2025
2a9a579
Fix map
AliveDevil Jan 7, 2025
63bdfaf
Reuse as much of the Hotspot offsets
AliveDevil Jan 7, 2025
3da3113
Fixes
AliveDevil Jan 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions .github/workflows/IKVM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ env:
jobs:
build-jtreg:
name: Build OpenJDK Test Harness
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout Source
uses: actions/checkout@v4
Expand All @@ -43,8 +43,7 @@ jobs:
- name: Install Java
run: |
sudo apt-get update && \
sudo apt-get install -y \
openjdk-8-jdk-headless && \
sudo apt-get install -y openjdk-8-jdk-headless && \
echo "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $GITHUB_ENV
- name: Build OpenJDK Test Harness
if: steps.jtreg-build-stamp.outputs.files_exists != 'true'
Expand Down Expand Up @@ -89,12 +88,17 @@ jobs:
if: runner.os == 'Linux'
uses: jlumbroso/free-disk-space@main
with:
android: false
swap-storage: false
- name: Checkout Source
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Install Powershell
run: |
sudo apt-get update && \
sudo apt-get install -y powershell
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v4
with:
Expand All @@ -110,20 +114,17 @@ jobs:
- name: Install Mono
run: |
sudo apt-get update && \
sudo apt-get install -y \
mono-runtime \
mono-devel
sudo apt-get install -y mono-runtime mono-devel
- name: Install Java
run: |
sudo apt-get update && \
sudo apt-get install -y \
openjdk-8-jdk-headless && \
sudo apt-get install -y openjdk-8-jdk-headless && \
echo "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $GITHUB_ENV
- name: Install LLVM and Clang
run: |
sudo apt-get update && \
sudo apt-get install -y clang-17 llvm-17 && \
echo "PATH=/usr/lib/llvm-17/bin:$PATH" >> $GITHUB_ENV
sudo apt-get install -y clang-18 llvm-18 && \
echo "PATH=/usr/lib/llvm-18/bin:$PATH" >> $GITHUB_ENV
- name: Install apple-codesign
uses: baptiste0928/cargo-install@v3
with:
Expand Down Expand Up @@ -361,7 +362,7 @@ jobs:
name: Test Variables
needs:
- build-ikvm
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
matrix: ${{ steps.test-vars.outputs.matrix }}
steps:
Expand Down Expand Up @@ -662,7 +663,7 @@ jobs:
name: Release
needs:
- test
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Free Disk Space (Linux)
uses: jlumbroso/free-disk-space@main
Expand Down
18 changes: 10 additions & 8 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
<Project>
<PropertyGroup Label="Runtime Info">
<SupportedRuntimes>win-x64;win-x86;win-arm64;linux-x64;linux-arm;linux-arm64;linux-musl-x64;linux-musl-arm;linux-musl-arm64;osx-x64;osx-arm64</SupportedRuntimes>
<SupportedRuntimes>win-x64;win-x86;win-arm64;linux-x64;linux-arm;linux-arm64;linux-musl-x64;linux-musl-arm;linux-musl-arm64;osx-x64;osx-arm64;android-x64;android-arm64</SupportedRuntimes>
<EnabledRuntimes Condition=" '$(EnabledRuntimes)' == '' ">$(SupportedRuntimes)</EnabledRuntimes>
<SupportedImageRuntimes>win-x64;win-x86;win-arm64;linux-x64;linux-arm;linux-arm64;linux-musl-x64;linux-musl-arm;linux-musl-arm64;osx-x64;osx-arm64;android-x64;android-arm64</SupportedImageRuntimes>
<EnabledImageRuntimes Condition=" '$(EnabledImageRuntimes)' == '' ">$(SupportedImageRuntimes)</EnabledImageRuntimes>
<SupportedImageBinRuntimes>win-x64;win-x86;win-arm64;linux-x64;linux-arm;linux-arm64;linux-musl-x64;linux-musl-arm;linux-musl-arm64;osx-x64;osx-arm64</SupportedImageBinRuntimes>
<EnabledImageBinRuntimes Condition=" '$(EnabledImageBinRuntimes)' == '' ">$(SupportedImageBinRuntimes)</EnabledImageBinRuntimes>
<SupportedToolRuntimes>win-x64;win-arm64;linux-x64;linux-arm;linux-arm64;linux-musl-x64;linux-musl-arm;linux-musl-arm64;osx-x64;osx-arm64</SupportedToolRuntimes>
<EnabledToolRuntimes Condition=" '$(EnabledToolRuntimes)' == '' ">$(SupportedToolRuntimes)</EnabledToolRuntimes>
<SupportedImageRuntimes>win-x64;win-x86;win-arm64;linux-x64;linux-arm;linux-arm64;linux-musl-x64;linux-musl-arm;linux-musl-arm64;osx-x64;osx-arm64</SupportedImageRuntimes>
<EnabledImageRuntimes Condition=" '$(EnabledImageRuntimes)' == '' ">$(SupportedImageRuntimes)</EnabledImageRuntimes>

<_SupportedRuntimes>;$(SupportedRuntimes);</_SupportedRuntimes>
<_EnabledRuntimes>;$(EnabledRuntimes);</_EnabledRuntimes>
<_SupportedToolRuntimes>;$(SupportedToolRuntimes);</_SupportedToolRuntimes>
<_EnabledToolRuntimes>;$(EnabledToolRuntimes);</_EnabledToolRuntimes>
<_SupportedImageRuntimes>;$(SupportedImageRuntimes);</_SupportedImageRuntimes>
<_EnabledImageRuntimes>;$(EnabledImageRuntimes);</_EnabledImageRuntimes>
<_SupportedImageBinRuntimes>;$(SupportedImageBinRuntimes);</_SupportedImageBinRuntimes>
<_EnabledImageBinRuntimes>;$(EnabledImageBinRuntimes);</_EnabledImageBinRuntimes>
<_SupportedToolRuntimes>;$(SupportedToolRuntimes);</_SupportedToolRuntimes>
<_EnabledToolRuntimes>;$(EnabledToolRuntimes);</_EnabledToolRuntimes>
</PropertyGroup>

<PropertyGroup Label="OpenJDK Info">
Expand All @@ -33,9 +37,7 @@

<ItemGroup>
<Authors Include="Jeroen Frijters" />
<Authors Include="Windward Studios" />
<Authors Include="Jerome Haltom" />
<Authors Include="Shad Storhaug" />
</ItemGroup>

<PropertyGroup Label="Copyright Info">
Expand Down Expand Up @@ -99,7 +101,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="IKVM.Core.MSBuild" Version="0.1.102">
<PackageReference Include="IKVM.Core.MSBuild" Version="0.1.106">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
7 changes: 4 additions & 3 deletions IKVM.deps.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@

<ItemGroup>
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" GeneratePathProperty="true" />
<PackageReference Include="System.Reflection.Metadata" Version="8.0.0" GeneratePathProperty="true" />
<PackageReference Include="System.Memory" Version="4.5.5" GeneratePathProperty="true" />
<PackageReference Include="System.Reflection.Metadata" Version="8.0.1" GeneratePathProperty="true" />
<PackageReference Include="System.Text.Json" Version="8.0.5" GeneratePathProperty="true" />
<PackageReference Include="IKVM.ByteCode" Version="9.2.2" />
<PackageReference Include="IKVM.ByteCode" Version="9.3.0" GeneratePathProperty="true" />
</ItemGroup>

<Choose>
<When Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net461'))">
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Security" />
<PackageReference Include="System.Buffers" Version="4.5.1" />
<PackageReference Include="System.Memory" Version="4.5.5" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
Expand Down
59 changes: 24 additions & 35 deletions IKVM.sln
Original file line number Diff line number Diff line change
Expand Up @@ -111,40 +111,19 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wsimport", "src\wsimport\wsimport.csproj", "{004561E2-DED0-464D-A7B9-85D98281FED4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IKVM.Image.JRE.runtime.linux-x64", "src\IKVM.Image.JRE.runtime.linux-x64\IKVM.Image.JRE.runtime.linux-x64.csproj", "{8068292D-8B2E-417B-B7CE-0E7159881C50}"
ProjectSection(ProjectDependencies) = postProject
{162A1F6D-7752-4686-A6C2-923633F4E4C0} = {162A1F6D-7752-4686-A6C2-923633F4E4C0}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IKVM.Image.JRE.runtime.win-x64", "src\IKVM.Image.JRE.runtime.win-x64\IKVM.Image.JRE.runtime.win-x64.csproj", "{27D0142E-7643-4E64-A6B2-995E76EF00A2}"
ProjectSection(ProjectDependencies) = postProject
{162A1F6D-7752-4686-A6C2-923633F4E4C0} = {162A1F6D-7752-4686-A6C2-923633F4E4C0}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IKVM.Image.JDK.runtime.linux-x64", "src\IKVM.Image.JDK.runtime.linux-x64\IKVM.Image.JDK.runtime.linux-x64.csproj", "{BE31AC7C-79CC-4180-A5E8-BEB3FD7579DC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IKVM.Image.JDK.runtime.win-x64", "src\IKVM.Image.JDK.runtime.win-x64\IKVM.Image.JDK.runtime.win-x64.csproj", "{71444CB1-778F-4DD5-9BDF-ACB310C97345}"
ProjectSection(ProjectDependencies) = postProject
{CCE3DE31-5DE7-4157-90D1-BAFA08C181EC} = {CCE3DE31-5DE7-4157-90D1-BAFA08C181EC}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IKVM.Image", "src\IKVM.Image\IKVM.Image.csproj", "{95C8865C-AB87-4998-880E-38B7F76BAC57}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IKVM.Image.JRE.runtime.win-x86", "src\IKVM.Image.JRE.runtime.win-x86\IKVM.Image.JRE.runtime.win-x86.csproj", "{CBB5E3B3-2B0F-41F3-8110-FDD9614FCE5D}"
ProjectSection(ProjectDependencies) = postProject
{162A1F6D-7752-4686-A6C2-923633F4E4C0} = {162A1F6D-7752-4686-A6C2-923633F4E4C0}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IKVM.Image.JDK.runtime.win-x86", "src\IKVM.Image.JDK.runtime.win-x86\IKVM.Image.JDK.runtime.win-x86.csproj", "{3E91FECF-80C0-463C-AD62-40062E0D313F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IKVM.Image.JDK-bin", "src\IKVM.Image.JDK-bin\IKVM.Image.JDK-bin.csproj", "{CCE3DE31-5DE7-4157-90D1-BAFA08C181EC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IKVM.Image.JRE-bin", "src\IKVM.Image.JRE-bin\IKVM.Image.JRE-bin.csproj", "{162A1F6D-7752-4686-A6C2-923633F4E4C0}"
ProjectSection(ProjectDependencies) = postProject
{4F7D51D0-F52D-46EF-94DF-C4081587FBB4} = {4F7D51D0-F52D-46EF-94DF-C4081587FBB4}
{7C7BCE2E-88CE-4EA8-863E-37F6B8A824C4} = {7C7BCE2E-88CE-4EA8-863E-37F6B8A824C4}
{B2EF307F-90AA-4CFE-B7F3-FF741545E35B} = {B2EF307F-90AA-4CFE-B7F3-FF741545E35B}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "javac-ref", "src\javac-ref\javac-ref.csproj", "{5DC963FD-6742-47BB-BC96-365B82F73C88}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IKVM.JTReg.TestAdapter.Core", "src\IKVM.JTReg.TestAdapter.Core\IKVM.JTReg.TestAdapter.Core.csproj", "{DD5AEB88-DC55-43C8-81C1-2879F73C8DE0}"
Expand Down Expand Up @@ -249,8 +228,6 @@ Project("{6DE1C62B-E8D7-451A-8734-87EAEB46E35B}") = "libiava", "src\libiava\libi
EndProject
Project("{6DE1C62B-E8D7-451A-8734-87EAEB46E35B}") = "libikvm", "src\libikvm\libikvm.clangproj", "{41254D0C-F8BF-4E1B-8C28-B0F7D91D3CC3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IKVM.Image-bin", "src\IKVM.Image-bin\IKVM.Image-bin.csproj", "{14BA1630-54EC-4983-BB14-C0E97835CB74}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IKVM.Image.runtime.linux-arm", "src\IKVM.Image.runtime.linux-arm\IKVM.Image.runtime.linux-arm.csproj", "{4FB7E598-95D8-41D8-BF15-D0042EC7EAB6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IKVM.Image.runtime.linux-arm64", "src\IKVM.Image.runtime.linux-arm64\IKVM.Image.runtime.linux-arm64.csproj", "{9C89C8FB-BE65-48D4-92CC-3B1CD41AC0A1}"
Expand Down Expand Up @@ -345,6 +322,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IKVM.Tools.Core", "src\IKVM
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IKVM.CoreLib.Tests", "src\IKVM.CoreLib.Tests\IKVM.CoreLib.Tests.csproj", "{21179656-9D00-45C9-A8BF-50E456AA29D4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IKVM.Benchmarks", "src\IKVM.Benchmarks\IKVM.Benchmarks.csproj", "{EBF6F5D2-08A0-4DD0-B10E-B12B06059571}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IKVM.Benchmarks.Java", "src\IKVM.Benchmarks.Java\IKVM.Benchmarks.Java.csproj", "{9F5CDC85-BCD8-468E-9FC6-4DC9E3A576D0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IKVM.Image.runtime.android-arm64", "src\IKVM.Image.runtime.android-arm64\IKVM.Image.runtime.android-arm64.csproj", "{843B0704-DA5E-4357-B683-3D6F64DEF57B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IKVM.Image.runtime.android-x64", "src\IKVM.Image.runtime.android-x64\IKVM.Image.runtime.android-x64.csproj", "{BE63E873-381D-423D-93F6-F3B25AEF4C57}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -551,14 +536,6 @@ Global
{3E91FECF-80C0-463C-AD62-40062E0D313F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3E91FECF-80C0-463C-AD62-40062E0D313F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3E91FECF-80C0-463C-AD62-40062E0D313F}.Release|Any CPU.Build.0 = Release|Any CPU
{CCE3DE31-5DE7-4157-90D1-BAFA08C181EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CCE3DE31-5DE7-4157-90D1-BAFA08C181EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CCE3DE31-5DE7-4157-90D1-BAFA08C181EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CCE3DE31-5DE7-4157-90D1-BAFA08C181EC}.Release|Any CPU.Build.0 = Release|Any CPU
{162A1F6D-7752-4686-A6C2-923633F4E4C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{162A1F6D-7752-4686-A6C2-923633F4E4C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{162A1F6D-7752-4686-A6C2-923633F4E4C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{162A1F6D-7752-4686-A6C2-923633F4E4C0}.Release|Any CPU.Build.0 = Release|Any CPU
{5DC963FD-6742-47BB-BC96-365B82F73C88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5DC963FD-6742-47BB-BC96-365B82F73C88}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5DC963FD-6742-47BB-BC96-365B82F73C88}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -735,10 +712,6 @@ Global
{41254D0C-F8BF-4E1B-8C28-B0F7D91D3CC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41254D0C-F8BF-4E1B-8C28-B0F7D91D3CC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{41254D0C-F8BF-4E1B-8C28-B0F7D91D3CC3}.Release|Any CPU.Build.0 = Release|Any CPU
{14BA1630-54EC-4983-BB14-C0E97835CB74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{14BA1630-54EC-4983-BB14-C0E97835CB74}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14BA1630-54EC-4983-BB14-C0E97835CB74}.Release|Any CPU.ActiveCfg = Release|Any CPU
{14BA1630-54EC-4983-BB14-C0E97835CB74}.Release|Any CPU.Build.0 = Release|Any CPU
{4FB7E598-95D8-41D8-BF15-D0042EC7EAB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FB7E598-95D8-41D8-BF15-D0042EC7EAB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FB7E598-95D8-41D8-BF15-D0042EC7EAB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -927,6 +900,22 @@ Global
{21179656-9D00-45C9-A8BF-50E456AA29D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{21179656-9D00-45C9-A8BF-50E456AA29D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{21179656-9D00-45C9-A8BF-50E456AA29D4}.Release|Any CPU.Build.0 = Release|Any CPU
{EBF6F5D2-08A0-4DD0-B10E-B12B06059571}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EBF6F5D2-08A0-4DD0-B10E-B12B06059571}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EBF6F5D2-08A0-4DD0-B10E-B12B06059571}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EBF6F5D2-08A0-4DD0-B10E-B12B06059571}.Release|Any CPU.Build.0 = Release|Any CPU
{9F5CDC85-BCD8-468E-9FC6-4DC9E3A576D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9F5CDC85-BCD8-468E-9FC6-4DC9E3A576D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F5CDC85-BCD8-468E-9FC6-4DC9E3A576D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9F5CDC85-BCD8-468E-9FC6-4DC9E3A576D0}.Release|Any CPU.Build.0 = Release|Any CPU
{843B0704-DA5E-4357-B683-3D6F64DEF57B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{843B0704-DA5E-4357-B683-3D6F64DEF57B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{843B0704-DA5E-4357-B683-3D6F64DEF57B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{843B0704-DA5E-4357-B683-3D6F64DEF57B}.Release|Any CPU.Build.0 = Release|Any CPU
{BE63E873-381D-423D-93F6-F3B25AEF4C57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BE63E873-381D-423D-93F6-F3B25AEF4C57}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BE63E873-381D-423D-93F6-F3B25AEF4C57}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BE63E873-381D-423D-93F6-F3B25AEF4C57}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
35 changes: 35 additions & 0 deletions src/IKVM.Benchmarks.Java/FloatArray.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package IKVM.Benchmarks.Java;

import java.lang.*;
import java.util.*;

public class FloatArray {

static float Average(float[] array) {
float sum = 0;
for (int i = 0; i < array.length; i++) {
sum += array[i];
}

return sum / array.length;
}

public int ArraySize;
public int LoopCount;
float[] Array;

public void Setup()
{
Array = new float[ArraySize];
for (int i = 0; i < Array.length; i++) {
Array[i] = i;
}
}

public void AverageFloatArray() {
for (int i = 0; i < LoopCount; i++) {
Average(Array);
}
}

}
20 changes: 20 additions & 0 deletions src/IKVM.Benchmarks.Java/IKVM.Benchmarks.Java.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)..\IKVM.NET.Sdk\Sdk\Sdk.props" />
<Import Project="$(MSBuildThisFileDirectory)..\IKVM\buildTransitive\IKVM.props" />
<Import Project="$(MSBuildThisFileDirectory)..\IKVM.MSBuild\buildTransitive\IKVM.MSBuild.props" />

<PropertyGroup>
<TargetFrameworks>net481;net6.0;net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\IKVM.Image\IKVM.Image.csproj" />
</ItemGroup>

<Import Project="$(MSBuildThisFileDirectory)..\..\IKVM.deps.targets" />
<Import Project="$(MSBuildThisFileDirectory)..\..\IKVM.refs.targets" />

<Import Project="$(MSBuildThisFileDirectory)..\IKVM.NET.Sdk\Sdk\Sdk.targets" />
<Import Project="$(MSBuildThisFileDirectory)..\IKVM\buildTransitive\IKVM.targets" />
<Import Project="$(MSBuildThisFileDirectory)..\IKVM.MSBuild\buildTransitive\IKVM.MSBuild.targets" />
</Project>
59 changes: 59 additions & 0 deletions src/IKVM.Benchmarks/FloatArray.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using BenchmarkDotNet.Attributes;

namespace IKVM.Benchmarks
{

[MemoryDiagnoser]
public class FloatArray
{

static float Average(float[] array)
{
float sum = 0;
for (int i = 0; i < array.Length; i++)
sum += array[i];

return sum / array.Length;
}

IKVM.Benchmarks.Java.FloatArray javaImpl;

[Params(1_000, 10_000, 100_000, 1_000_000)]
public int ArraySize;

[Params(100, 1_000)]
public int LoopCount;

float[] Array;

[GlobalSetup]
public void Setup()
{
Array = new float[ArraySize];
for (int i = 0; i < Array.Length; i++)
Array[i] = i;

javaImpl = new Java.FloatArray();
javaImpl.ArraySize = ArraySize;
javaImpl.LoopCount = LoopCount;
javaImpl.Setup();
}

[BenchmarkCategory("AverageFloatArray")]
[Benchmark(Baseline = true)]
public void CSharpAverageFloatArray()
{
for (int i = 0; i < LoopCount; i++)
Average(Array);
}

[BenchmarkCategory("AverageFloatArray")]
[Benchmark]
public void JavaAverageFloatArray()
{
javaImpl.AverageFloatArray();
}

}

}
Loading
Loading