-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Java.Interop.Tools.Expressions] Add Java.Interop.Tools.Expressions
Write an `Expression<T>` compiler which uses Cecil for codegen and assembly writing! Then updated jnimarshalmethod-gen to use it! Testing this puppy: % export PATH=$HOME/Developer/src/xamarin/xamarin-android/bin/Debug/dotnet:$PATH % mkdir _x % dotnet bin/Debug-net7.0/jnimarshalmethod-gen.dll \ bin/TestDebug-net7.0/Java.Interop.Export-Tests.dll \ -v --keeptemp \ --jvm /Library/Java/JavaVirtualMachines/microsoft-11.jdk/Contents/Home/lib/jli/libjli.dylib \ -o _x \ -L bin/TestDebug-net7.0 \ -L /usr/local/share/dotnet/shared/Microsoft.NETCore.App/7.0.0-rc.2.22472.3 First param is assembly to process; `Java.Interop.Export-Tests.dll` is handy because that's what the `run-test-jnimarshal` target in `Makefile` processes. `-v` is verbose, `--keeptemp` is keep temporary files. `--jvm PATH` is the path to the JVM library to load+use. `-o DIR` is where to place output files; this will create `_x/Java.Interop.Export-Tests.dll`. `-L DIR` adds `DIR` to library resolution paths; this adds `bin/TestDebug/net7.0` (dependencies of `Java.Interop.Export-Tests.dll`) and `Microsoft.NETCore.App/7.0.0-rc.1.22422.12` (net7 libs). …plus we have, like, *real* unit tests. Which are differently odd. "one-off" non-unit test test: make sure that the unit test assembly can be decompiled: ikdasm bin/TestDebug-net7.0/Java.Interop.Tools.Expressions-Tests-ExpressionCompilerTests.dll This currently fails. :-/
- Loading branch information
Showing
12 changed files
with
1,562 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace Java.Interop.Tools.ExpressionCompiler; | ||
|
||
public class Class1 | ||
{ | ||
} |
26 changes: 26 additions & 0 deletions
26
src/Java.Interop.Tools.Expressions/Java.Interop.Tools.Expressions.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>$(DotNetTargetFramework)</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<Import Project="..\..\TargetFrameworkDependentValues.props" /> | ||
|
||
<PropertyGroup> | ||
<OutputPath>$(UtilityOutputFullPath)</OutputPath> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" /> | ||
</ItemGroup> | ||
|
||
<Import Project="..\..\build-tools\scripts\cecil.projitems" /> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Java.Interop.Tools.Cecil\Java.Interop.Tools.Cecil.csproj" /> | ||
<ProjectReference Include="..\..\src\Java.Interop.Tools.Diagnostics\Java.Interop.Tools.Diagnostics.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.