Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,57 @@
/*
Copyright (C) 2002, 2003, 2004, 2005, 2006 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jeroen Frijters
jeroen@frijters.net
*/
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("IKVM.NET Runtime")]
[assembly: AssemblyDescription("JVM for Mono and .NET")]
[assembly: System.Security.AllowPartiallyTrustedCallers]
#if SIGNCODE
[assembly: InternalsVisibleTo("IKVM.Runtime.JNI, PublicKey=@PUBLICKEY@")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.Core, PublicKey=@PUBLICKEY@")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.Util, PublicKey=@PUBLICKEY@")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.Security, PublicKey=@PUBLICKEY@")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.Management, PublicKey=@PUBLICKEY@")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.Media, PublicKey=@PUBLICKEY@")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.Misc, PublicKey=@PUBLICKEY@")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.Remoting, PublicKey=@PUBLICKEY@")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.SwingAWT, PublicKey=@PUBLICKEY@")]
#else
[assembly: InternalsVisibleTo("IKVM.Runtime.JNI")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.Core")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.Util")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.Security")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.Management")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.Media")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.Misc")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.Remoting")]
[assembly: InternalsVisibleTo("IKVM.OpenJDK.SwingAWT")]
#endif

View File

@@ -0,0 +1,227 @@
/*
Copyright (C) 2002-2012 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jeroen Frijters
jeroen@frijters.net
*/
using System;
using System.IO;
sealed class BigEndianBinaryReader
{
private byte[] buf;
private int pos;
private int end;
internal BigEndianBinaryReader(byte[] buf, int offset, int length)
{
this.buf = buf;
this.pos = offset;
this.end = checked(offset + length);
if(offset < 0 || length < 0 || buf.Length - offset < length)
{
throw new ClassFormatError("Truncated class file");
}
}
internal BigEndianBinaryReader Section(uint length)
{
BigEndianBinaryReader br = new BigEndianBinaryReader(buf, pos, checked((int)length));
Skip(length);
return br;
}
internal bool IsAtEnd
{
get
{
return pos == end;
}
}
internal int Position
{
get
{
return pos;
}
}
internal void Skip(uint count)
{
if(end - pos < count)
{
throw new ClassFormatError("Truncated class file");
}
checked
{
pos += (int)count;
}
}
internal byte ReadByte()
{
if(pos == end)
{
throw new ClassFormatError("Truncated class file");
}
return buf[pos++];
}
internal sbyte ReadSByte()
{
if(pos == end)
{
throw new ClassFormatError("Truncated class file");
}
return (sbyte)buf[pos++];
}
internal double ReadDouble()
{
return BitConverter.Int64BitsToDouble(ReadInt64());
}
internal short ReadInt16()
{
if(end - pos < 2)
{
throw new ClassFormatError("Truncated class file");
}
short s = (short)((buf[pos] << 8) + buf[pos + 1]);
pos += 2;
return s;
}
internal int ReadInt32()
{
if(end - pos < 4)
{
throw new ClassFormatError("Truncated class file");
}
int i = (int)((buf[pos] << 24) + (buf[pos + 1] << 16) + (buf[pos + 2] << 8) + buf[pos + 3]);
pos += 4;
return i;
}
internal long ReadInt64()
{
if(end - pos < 8)
{
throw new ClassFormatError("Truncated class file");
}
uint i1 = (uint)((buf[pos] << 24) + (buf[pos + 1] << 16) + (buf[pos + 2] << 8) + buf[pos + 3]);
uint i2 = (uint)((buf[pos + 4] << 24) + (buf[pos + 5] << 16) + (buf[pos + 6] << 8) + buf[pos + 7]);
long l = (((long)i1) << 32) + i2;
pos += 8;
return l;
}
internal float ReadSingle()
{
return BitConverter.ToSingle(BitConverter.GetBytes(ReadInt32()), 0);
}
internal string ReadString(string classFile)
{
int len = ReadUInt16();
if(end - pos < len)
{
throw new ClassFormatError("{0} (Truncated class file)", classFile);
}
// special code path for ASCII strings (which occur *very* frequently)
for(int j = 0; j < len; j++)
{
if(buf[pos + j] == 0 || buf[pos + j] >= 128)
{
// NOTE we *cannot* use System.Text.UTF8Encoding, because this is *not* compatible
// (esp. for embedded nulls)
char[] ch = new char[len];
int l = 0;
for(int i = 0; i < len; i++)
{
int c = buf[pos + i];
int char2, char3;
switch (c >> 4)
{
case 0:
if(c == 0)
{
throw new ClassFormatError("{0} (Illegal UTF8 string in constant pool)", classFile);
}
break;
case 1: case 2: case 3: case 4: case 5: case 6: case 7:
// 0xxxxxxx
break;
case 12: case 13:
// 110x xxxx 10xx xxxx
char2 = buf[pos + ++i];
if((char2 & 0xc0) != 0x80 || i >= len)
{
throw new ClassFormatError("{0} (Illegal UTF8 string in constant pool)", classFile);
}
c = (((c & 0x1F) << 6) | (char2 & 0x3F));
break;
case 14:
// 1110 xxxx 10xx xxxx 10xx xxxx
char2 = buf[pos + ++i];
char3 = buf[pos + ++i];
if((char2 & 0xc0) != 0x80 || (char3 & 0xc0) != 0x80 || i >= len)
{
throw new ClassFormatError("{0} (Illegal UTF8 string in constant pool)", classFile);
}
c = (((c & 0x0F) << 12) | ((char2 & 0x3F) << 6) | ((char3 & 0x3F) << 0));
break;
default:
throw new ClassFormatError("{0} (Illegal UTF8 string in constant pool)", classFile);
}
ch[l++] = (char)c;
}
pos += len;
return new String(ch, 0, l);
}
}
string s = System.Text.ASCIIEncoding.ASCII.GetString(buf, pos, len);
pos += len;
return s;
}
internal ushort ReadUInt16()
{
if(end - pos < 2)
{
throw new ClassFormatError("Truncated class file");
}
ushort s = (ushort)((buf[pos] << 8) + buf[pos + 1]);
pos += 2;
return s;
}
internal uint ReadUInt32()
{
if(end - pos < 4)
{
throw new ClassFormatError("Truncated class file");
}
uint i = (uint)((buf[pos] << 24) + (buf[pos + 1] << 16) + (buf[pos + 2] << 8) + buf[pos + 3]);
pos += 4;
return i;
}
}

812
external/ikvm/runtime/ByteCode.cs vendored Normal file

File diff suppressed because it is too large Load Diff

1165
external/ikvm/runtime/ByteCodeHelper.cs vendored Normal file

File diff suppressed because it is too large Load Diff

3595
external/ikvm/runtime/ClassFile.cs vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2998
external/ikvm/runtime/CodeEmitter.cs vendored Normal file

File diff suppressed because it is too large Load Diff

119
external/ikvm/runtime/CoreClasses.cs vendored Normal file
View File

@@ -0,0 +1,119 @@
/*
Copyright (C) 2004, 2005, 2006, 2008 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jeroen Frijters
jeroen@frijters.net
*/
namespace IKVM.Internal
{
internal static class CoreClasses
{
internal static class ikvm
{
internal static class @internal
{
internal static class CallerID
{
// NOTE we have a dummy static initializer, to make sure we don't get the beforeFieldInit attribute
// (we don't want the classes to be loaded prematurely, because they might not be available then)
static CallerID() { }
internal static readonly TypeWrapper Wrapper = ClassLoaderWrapper.LoadClassCritical("ikvm.internal.CallerID");
}
}
}
internal static class java
{
internal static class io
{
internal static class Serializable
{
// NOTE we have a dummy static initializer, to make sure we don't get the beforeFieldInit attribute
// (we don't want the classes to be loaded prematurely, because they might not be available then)
static Serializable() { }
internal static readonly TypeWrapper Wrapper = ClassLoaderWrapper.LoadClassCritical("java.io.Serializable");
}
}
internal static class lang
{
internal static class Object
{
// NOTE we have a dummy static initializer, to make sure we don't get the beforeFieldInit attribute
// (we don't want the classes to be loaded prematurely, because they might not be available then)
static Object() {}
internal static readonly TypeWrapper Wrapper = ClassLoaderWrapper.LoadClassCritical("java.lang.Object");
}
internal static class String
{
// NOTE we have a dummy static initializer, to make sure we don't get the beforeFieldInit attribute
// (we don't want the classes to be loaded prematurely, because they might not be available then)
static String() {}
internal static readonly TypeWrapper Wrapper = ClassLoaderWrapper.LoadClassCritical("java.lang.String");
}
internal static class Class
{
// NOTE we have a dummy static initializer, to make sure we don't get the beforeFieldInit attribute
// (we don't want the classes to be loaded prematurely, because they might not be available then)
static Class() {}
internal static readonly TypeWrapper Wrapper = ClassLoaderWrapper.LoadClassCritical("java.lang.Class");
}
internal static class Cloneable
{
// NOTE we have a dummy static initializer, to make sure we don't get the beforeFieldInit attribute
// (we don't want the classes to be loaded prematurely, because they might not be available then)
static Cloneable() {}
internal static readonly TypeWrapper Wrapper = ClassLoaderWrapper.LoadClassCritical("java.lang.Cloneable");
}
internal static class Throwable
{
// NOTE we have a dummy static initializer, to make sure we don't get the beforeFieldInit attribute
// (we don't want the classes to be loaded prematurely, because they might not be available then)
static Throwable() {}
internal static readonly TypeWrapper Wrapper = ClassLoaderWrapper.LoadClassCritical("java.lang.Throwable");
}
internal static class invoke
{
internal static class MethodHandle
{
// NOTE we have a dummy static initializer, to make sure we don't get the beforeFieldInit attribute
// (we don't want the classes to be loaded prematurely, because they might not be available then)
static MethodHandle() { }
internal static readonly TypeWrapper Wrapper = ClassLoaderWrapper.LoadClassCritical("java.lang.invoke.MethodHandle");
}
internal static class MethodType
{
// NOTE we have a dummy static initializer, to make sure we don't get the beforeFieldInit attribute
// (we don't want the classes to be loaded prematurely, because they might not be available then)
static MethodType() { }
internal static readonly TypeWrapper Wrapper = ClassLoaderWrapper.LoadClassCritical("java.lang.invoke.MethodType");
}
}
}
}
}
}

2800
external/ikvm/runtime/DotNetTypeWrapper.cs vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,94 @@
/*
Copyright (C) 2010 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jeroen Frijters
jeroen@frijters.net
*/
namespace ikvm
{
namespace @internal
{
public class CallerID { }
}
}
namespace java
{
namespace io
{
public class File { }
public class FileDescriptor { }
public class ObjectInputStream { }
public class ObjectOutputStream { }
public class ObjectStreamField { }
public class PrintStream { }
public class PrintWriter { }
}
namespace lang
{
public class Class { }
public class ClassLoader { }
public class IllegalArgumentException { }
public class SecurityManager { }
public class StackTraceElement { }
namespace invoke
{
public class MemberName { }
public class AdapterMethodHandle { }
public class BoundMethodHandle { }
public class DirectMethodHandle { }
public class MethodType { }
public class MethodHandle { }
public class CallSite { }
}
namespace reflect
{
public class Constructor { }
public class Method { }
}
}
namespace net
{
public class URL { }
public class InetAddress { }
}
namespace nio
{
public class ByteBuffer { }
}
namespace security
{
public class AccessControlContext { }
public class ProtectionDomain { }
}
namespace util
{
public class Enumeration { }
public class Vector { }
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
ad0861972ed1ac0e9caf2cde6149145bd346f957

898
external/ikvm/runtime/ExceptionHelper.cs vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,185 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{F5C7B588-0403-4AF2-A4DE-5697DE21BC2C}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>IKVM.Runtime</AssemblyName>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
<DefaultClientScript>JScript</DefaultClientScript>
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<RootNamespace>
</RootNamespace>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>2.0</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>true</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
<NoWarn>
</NoWarn>
<Optimize>false</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="IKVM.OpenJDK.Core, Version=0.39.3280.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\bin\IKVM.OpenJDK.Core.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Management, Version=7.0.4259.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\bin\IKVM.OpenJDK.Management.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Misc, Version=0.39.3280.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\bin\IKVM.OpenJDK.Misc.dll</HintPath>
</Reference>
<Reference Include="IKVM.OpenJDK.Util, Version=0.39.3280.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\bin\IKVM.OpenJDK.Util.dll</HintPath>
</Reference>
<Reference Include="IKVM.Runtime.JNI, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\IKVM.Runtime.JNI.dll</HintPath>
</Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
<Reference Include="System.configuration" />
<Reference Include="System.Management" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\CommonAssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="AssemblyClassLoader.cs" />
<Compile Include="AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="atomic.cs" />
<Compile Include="attributes.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="BigEndianBinaryReader.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ByteCode.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ByteCodeHelper.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ClassFile.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ClassLoaderWrapper.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="CodeEmitter.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="common.cs" />
<Compile Include="compiler.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="CoreClasses.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="DotNetTypeWrapper.cs" />
<Compile Include="DynamicClassLoader.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="DynamicTypeWrapper.cs" />
<Compile Include="ExceptionHelper.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="fdlibm\e_hypot.cs" />
<Compile Include="fdlibm\e_pow.cs" />
<Compile Include="fdlibm\e_rem_pio2.cs" />
<Compile Include="fdlibm\fdlibm_h.cs" />
<Compile Include="fdlibm\k_rem_pio2.cs" />
<Compile Include="fdlibm\k_tan.cs" />
<Compile Include="fdlibm\s_cbrt.cs" />
<Compile Include="fdlibm\s_expm1.cs" />
<Compile Include="fdlibm\s_floor.cs" />
<Compile Include="fdlibm\s_log1p.cs" />
<Compile Include="fdlibm\s_scalbn.cs" />
<Compile Include="fdlibm\s_tan.cs" />
<Compile Include="intrinsics.cs" />
<Compile Include="JavaException.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="JsrInliner.cs" />
<Compile Include="LocalVars.cs" />
<Compile Include="MemberWrapper.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="openjdk.cs" />
<Compile Include="openjdk\java.lang.invoke.cs" />
<Compile Include="openjdk\sun.management.cs" />
<Compile Include="openjdk\sun.nio.ch.cs" />
<Compile Include="openjdk\sun.security.krb5.cs" />
<Compile Include="PassiveWeakDictionary.cs" />
<Compile Include="profiler.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ReflectUtil.cs" />
<Compile Include="RuntimeHelperTypes.cs" />
<Compile Include="Serialization.cs" />
<Compile Include="stubgen\ClassFileWriter.cs" />
<Compile Include="stubgen\SerialVersionUID.cs" />
<Compile Include="stubgen\StubGenerator.cs" />
<Compile Include="tracer.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types.cs" />
<Compile Include="TypeWrapper.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="verifier.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="vfs.cs" />
<Compile Include="vm.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,84 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{CEA4FEC4-1D24-4004-908E-F86C8D7AC772}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>IKVM.Runtime.JNI</AssemblyName>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
<DefaultClientScript>JScript</DefaultClientScript>
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<RootNamespace>
</RootNamespace>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>2.0</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug\</OutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG;WHIDBEY;OPENJDK</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>true</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
<NoWarn>
</NoWarn>
<Optimize>false</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="IKVM.OpenJDK.Core, Version=0.39.3280.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\bin\IKVM.OpenJDK.Core.dll</HintPath>
</Reference>
<Reference Include="IKVM.Runtime, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\IKVM.Runtime.dll</HintPath>
</Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\CommonAssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="JniAssemblyInfo.cs" />
<Compile Include="JniInterface.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>

218
external/ikvm/runtime/JavaException.cs vendored Normal file
View File

@@ -0,0 +1,218 @@
/*
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jeroen Frijters
jeroen@frijters.net
*/
using System;
using System.Reflection;
using IKVM.Internal;
abstract class RetargetableJavaException : ApplicationException
{
internal RetargetableJavaException(string msg) : base(msg)
{
}
internal RetargetableJavaException(string msg, Exception x) : base(msg, x)
{
}
internal static string Format(string s, object[] args)
{
if (args == null || args.Length == 0)
{
return s;
}
return String.Format(s, args);
}
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
internal abstract Exception ToJava();
#elif FIRST_PASS
internal virtual Exception ToJava()
{
return null;
}
#endif
}
// NOTE this is not a Java exception, but instead it wraps a Java exception that
// was thrown by a class loader. It is used so ClassFile.LoadClassHelper() can catch
// Java exceptions and turn them into UnloadableTypeWrappers without inadvertantly
// hiding exceptions caused by coding errors in the IKVM code.
sealed class ClassLoadingException : RetargetableJavaException
{
internal ClassLoadingException(Exception x)
: base(x.Message, x)
{
}
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
internal override Exception ToJava()
{
if (!(InnerException is java.lang.Error) && !(InnerException is java.lang.RuntimeException))
{
return new java.lang.NoClassDefFoundError(InnerException.Message).initCause(InnerException);
}
return InnerException;
}
#endif
}
class LinkageError : RetargetableJavaException
{
internal LinkageError(string msg) : base(msg)
{
}
internal LinkageError(string msg, Exception x) : base(msg, x)
{
}
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
internal override Exception ToJava()
{
return new java.lang.LinkageError(Message);
}
#endif
}
sealed class VerifyError : LinkageError
{
internal VerifyError() : base("")
{
}
internal VerifyError(string msg) : base(msg)
{
}
internal VerifyError(string msg, Exception x) : base(msg, x)
{
}
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
internal override Exception ToJava()
{
return new java.lang.VerifyError(Message);
}
#endif
}
sealed class ClassNotFoundException : RetargetableJavaException
{
internal ClassNotFoundException(string name) : base(name)
{
}
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
internal override Exception ToJava()
{
return new java.lang.NoClassDefFoundError(Message);
}
#endif
}
sealed class ClassCircularityError : LinkageError
{
internal ClassCircularityError(string msg) : base(msg)
{
}
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
internal override Exception ToJava()
{
return new java.lang.ClassCircularityError(Message);
}
#endif
}
sealed class NoClassDefFoundError : LinkageError
{
internal NoClassDefFoundError(string msg) : base(msg)
{
}
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
internal override Exception ToJava()
{
return new java.lang.NoClassDefFoundError(Message);
}
#endif
}
class IncompatibleClassChangeError : LinkageError
{
internal IncompatibleClassChangeError(string msg) : base(msg)
{
}
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
internal override Exception ToJava()
{
return new java.lang.IncompatibleClassChangeError(Message);
}
#endif
}
sealed class IllegalAccessError : IncompatibleClassChangeError
{
internal IllegalAccessError(string msg) : base(msg)
{
}
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
internal override Exception ToJava()
{
return new java.lang.IllegalAccessError(Message);
}
#endif
}
class ClassFormatError : LinkageError
{
internal ClassFormatError(string msg, params object[] p)
: base(Format(msg, p))
{
}
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
internal override Exception ToJava()
{
return new java.lang.ClassFormatError(Message);
}
#endif
}
sealed class UnsupportedClassVersionError : ClassFormatError
{
internal UnsupportedClassVersionError(string msg)
: base(msg)
{
}
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
internal override Exception ToJava()
{
return new java.lang.UnsupportedClassVersionError(Message);
}
#endif
}

View File

@@ -0,0 +1,34 @@
/*
Copyright (C) 2002-2008 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jeroen Frijters
jeroen@frijters.net
*/
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle("IKVM.NET Runtime JNI Layer")]
[assembly: AssemblyDescription("JVM for Mono and .NET")]
#if SIGNCODE
[assembly: InternalsVisibleTo("IKVM.Runtime, PublicKey=@PUBLICKEY@")]
#else
[assembly: InternalsVisibleTo("IKVM.Runtime")]
#endif

View File

@@ -0,0 +1 @@
d81576d056cfa7b19a835a0850b7b1b637108c5c

2062
external/ikvm/runtime/JsrInliner.cs vendored Normal file

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More