Skip to content

Commit

Permalink
IKVM.NET 8.6.5.1: fixed SERVE compiler bugs + friends access for the …
Browse files Browse the repository at this point in the history
…IKVM.NET Next Generation Platform
  • Loading branch information
jessiepathfinder committed Jan 12, 2020
1 parent 12fb6b4 commit 3bac85c
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 28 deletions.
4 changes: 2 additions & 2 deletions CommonAssemblyInfo.cs.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ using System.Reflection;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Jessie Lesbian (based on work by Jeroen Frijters and Windward Studios)")]
[assembly: AssemblyProduct("IKVM.NET")]
[assembly: AssemblyCopyright("Copyright (C) 2019 Jessie Lesbian (based on work by Jeroen Frijters and Windward Studios)")]
[assembly: AssemblyCopyright("Copyright (C) 2020 Jessie Lesbian (based on work by Jeroen Frijters and Windward Studios)")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("8.6.5.0")]
[assembly: AssemblyVersion("8.6.5.1")]

#if SIGNCODE
#pragma warning disable 1699
Expand Down
2 changes: 1 addition & 1 deletion ikvmc/ikvmc.build
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<include buildfile="../ikvm.include" />

<target name="ikvmc">
<property name="defs" value="TRACE;FIRST_PASS;STATIC_COMPILER;EMITTERS" />
<property name="defs" value="TRACE;STATIC_COMPILER;EMITTERS" />
<if test="${property::exists('signed')}">
<property name="defs" value="${defs};${signed}" />
</if>
Expand Down
2 changes: 1 addition & 1 deletion ikvmstub/ikvmstub.build
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<include buildfile="../ikvm.include" />

<target name="ikvmstub">
<property name="defs" value="FIRST_PASS;STUB_GENERATOR;TRACE" />
<property name="defs" value="STUB_GENERATOR;TRACE" />
<if test="${property::exists('signed')}">
<property name="defs" value="${defs};${signed}" />
</if>
Expand Down
Binary file modified openjdk/commonAttributes.class
Binary file not shown.
Binary file modified openjdk/java/lang/PropertyConstants.class
Binary file not shown.
2 changes: 2 additions & 0 deletions runtime/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ Jeroen Frijters
[assembly: InternalsVisibleTo("IKVM.OpenJDK.Remoting")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.SwingAWT")]
#endif
[assembly: InternalsVisibleTo("ikvm2")]
[assembly: InternalsVisibleTo("ikvmc2")]
2 changes: 2 additions & 0 deletions runtime/AssemblyInfo.cs.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("IKVM.OpenJDK.Remoting")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.SwingAWT")]
#endif
[assembly: InternalsVisibleTo("ikvm2")]
[assembly: InternalsVisibleTo("ikvmc2")]
34 changes: 10 additions & 24 deletions runtime/jessielesbian.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
using System;
using IKVM.Internal;
using System.Reflection;
using System.Reflection.Emit;
using Instruction = IKVM.Internal.ClassFile.Method.Instruction;

//Do you believe in high-quality code by Female/LGBT programmers? Leave u/jessielesbian a PM on Reddit!

[assembly: jessielesbian.IKVM.MadeByLGBTProgrammers]

namespace jessielesbian.IKVM
{
public class MadeByLGBTProgrammersAttribute : Attribute
{

}
public static class Helper
{
static Helper()
Expand All @@ -22,7 +29,7 @@ internal static bool experimentalOptimizations
{
get
{
return (optpasses > 0);
return (optpasses > 0) || extremeOptimizations;
}
}
private static Instruction GetInstuction(NormalizedByteCode bc)
Expand Down Expand Up @@ -311,7 +318,7 @@ internal static Instruction[] Optimize(Instruction[] instructions)
optimizations = optimizations + 1;
}
}
//peephole optimization: remove unnecessary swaps + branch optimizations
//peephole optimization: remove unnecessary swaps
if (prev.NormalizedOpCode == NormalizedByteCode.__swap)
{
switch (current.NormalizedOpCode)
Expand All @@ -336,34 +343,13 @@ internal static Instruction[] Optimize(Instruction[] instructions)
current = GetInstuction(NormalizedByteCode.__nop);
optimizations = optimizations + 1;
}
//peephole optimization: return optimization
if (current.NormalizedOpCode == NormalizedByteCode.__return)
{
switch (prev.NormalizedOpCode)
{
case NormalizedByteCode.__dup:
prev = GetInstuction(NormalizedByteCode.__nop);
optimizations = optimizations + 1;
break;
case NormalizedByteCode.__swap:
prev = GetInstuction(NormalizedByteCode.__pop);
optimizations = optimizations + 1;
break;
default:
break;
}
}
instructions[i] = current;
instructions[prevIndex] = prev;
}
}
return instructions;
}
internal static readonly MethodInfo ArrayLoad;
internal static readonly MethodInfo ArrayStore;
public static object aaload(Array array, int index)
{
return array.GetValue(index);
}
internal static readonly MethodInfo ArrayStore;
}
}

0 comments on commit 3bac85c

Please sign in to comment.