Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Strehovský <michals@microsoft.com>2015-11-20 01:30:53 +0300
committerMichal Strehovský <michals@microsoft.com>2015-11-20 01:30:53 +0300
commitdf55e8e852be3583ca796a5354b5197f00dc4e56 (patch)
treea7b995142e2468872dabebb530dcbec0c269b91f /src/ILCompiler.Compiler
parent120128643d3d5397b9129faaa32ea00c9ed33e30 (diff)
Move HelperExtensions to Common
These no longer rely on CompilerTypeSystemContext and therefore can live in the Common directory.
Diffstat (limited to 'src/ILCompiler.Compiler')
-rw-r--r--src/ILCompiler.Compiler/src/IL/HelperExtensions.cs38
-rw-r--r--src/ILCompiler.Compiler/src/ILCompiler.Compiler.csproj4
2 files changed, 3 insertions, 39 deletions
diff --git a/src/ILCompiler.Compiler/src/IL/HelperExtensions.cs b/src/ILCompiler.Compiler/src/IL/HelperExtensions.cs
deleted file mode 100644
index a16595f0b..000000000
--- a/src/ILCompiler.Compiler/src/IL/HelperExtensions.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-using ILCompiler;
-using Internal.TypeSystem;
-
-namespace Internal.IL
-{
- static class HelperExtensions
- {
- public static MetadataType GetHelperType(this TypeSystemContext context, string name)
- {
- MetadataType helperType = ((CompilerTypeSystemContext)context).SystemModule.GetType("Internal.Runtime.CompilerHelpers", name, false);
- if (helperType == null)
- {
- // TODO: throw the exception that means 'Core Library doesn't have a required thing in it'
- throw new NotImplementedException();
- }
-
- return helperType;
- }
-
- public static MethodDesc GetHelperEntryPoint(this TypeSystemContext context, string typeName, string methodName)
- {
- MetadataType helperType = context.GetHelperType(typeName);
- MethodDesc helperMethod = helperType.GetMethod(methodName, null);
- if (helperMethod == null)
- {
- // TODO: throw the exception that means 'Core Library doesn't have a required thing in it'
- throw new NotImplementedException();
- }
-
- return helperMethod;
- }
- }
-} \ No newline at end of file
diff --git a/src/ILCompiler.Compiler/src/ILCompiler.Compiler.csproj b/src/ILCompiler.Compiler/src/ILCompiler.Compiler.csproj
index 01a1404fe..b3211ac45 100644
--- a/src/ILCompiler.Compiler/src/ILCompiler.Compiler.csproj
+++ b/src/ILCompiler.Compiler/src/ILCompiler.Compiler.csproj
@@ -81,7 +81,6 @@
<Compile Include="Compiler\RvaFieldData.cs" />
<Compile Include="Compiler\IntrinsicMethods.cs" />
<Compile Include="CppCodeGen\CppWriter.cs" />
- <Compile Include="IL\HelperExtensions.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\Common\src\System\Collections\Generic\ArrayBuilder.cs">
@@ -92,6 +91,9 @@
<Compile Include="..\..\Common\src\TypeSystem\IL\EcmaMethodIL.cs">
<Link>IL\EcmaMethodIL.cs</Link>
</Compile>
+ <Compile Include="..\..\Common\src\TypeSystem\IL\HelperExtensions.cs">
+ <Link>IL\HelperExtensions.cs</Link>
+ </Compile>
<Compile Include="..\..\Common\src\TypeSystem\IL\ILOpcode.cs">
<Link>IL\ILOpcode.cs</Link>
</Compile>