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:
authorJan Kotas <jkotas@microsoft.com>2016-01-05 10:03:51 +0300
committerJan Kotas <jkotas@microsoft.com>2016-01-05 18:23:23 +0300
commite289a1873d972e98c486a26f385ee506fef8a574 (patch)
treea9e5d2f554050ff56987815ecfc2bda200f8a828 /src/ILCompiler.Compiler
parent78d6626a9950ae41321effab28a5dd74999a22bb (diff)
Prepare for System.Reflection.Metadata upgrade
System.Reflection.Metadata introduced LocalVariable type. Rename the type in ILCompiler to avoid collisions.
Diffstat (limited to 'src/ILCompiler.Compiler')
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/CompilerTypeSystemContext.cs2
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/PdbSymbolProvider.cs8
-rw-r--r--src/ILCompiler.Compiler/src/CppCodeGen/CppWriter.cs2
-rw-r--r--src/ILCompiler.Compiler/src/CppCodeGen/ILToCppImporter.cs10
4 files changed, 11 insertions, 11 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/CompilerTypeSystemContext.cs b/src/ILCompiler.Compiler/src/Compiler/CompilerTypeSystemContext.cs
index 1154c7714..8a86e08f0 100644
--- a/src/ILCompiler.Compiler/src/Compiler/CompilerTypeSystemContext.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/CompilerTypeSystemContext.cs
@@ -334,7 +334,7 @@ namespace ILCompiler
return _pdbSymbolProvider.GetSequencePointsForMethod(moduleData.PdbReader, MetadataTokens.GetToken(ecmaMethod.Handle));
}
- public IEnumerable<LocalVariable> GetLocalVariableNamesForMethod(MethodDesc method)
+ public IEnumerable<ILLocalVariable> GetLocalVariableNamesForMethod(MethodDesc method)
{
EcmaMethod ecmaMethod = method.GetTypicalMethodDefinition() as EcmaMethod;
if (ecmaMethod == null)
diff --git a/src/ILCompiler.Compiler/src/Compiler/PdbSymbolProvider.cs b/src/ILCompiler.Compiler/src/Compiler/PdbSymbolProvider.cs
index eafa4c2ca..0220d99a4 100644
--- a/src/ILCompiler.Compiler/src/Compiler/PdbSymbolProvider.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/PdbSymbolProvider.cs
@@ -168,7 +168,7 @@ namespace ILCompiler
//
// Gather the local details in a scope and then recurse to child scopes
//
- private void ProbeScopeForLocals(List<LocalVariable> variables, ISymUnmanagedScope scope)
+ private void ProbeScopeForLocals(List<ILLocalVariable> variables, ISymUnmanagedScope scope)
{
int localCount;
ThrowExceptionForHR(scope.GetLocalCount(out localCount));
@@ -193,7 +193,7 @@ namespace ILCompiler
int attributes;
ThrowExceptionForHR(local.GetAttributes(out attributes));
- variables.Add(new LocalVariable() { Slot = slot, Name = new String(nameBuffer, 0, nameLength - 1), CompilerGenerated = (attributes & 0x1) != 0 });
+ variables.Add(new ILLocalVariable() { Slot = slot, Name = new String(nameBuffer, 0, nameLength - 1), CompilerGenerated = (attributes & 0x1) != 0 });
}
int childrenCount;
@@ -213,7 +213,7 @@ namespace ILCompiler
// and names for all of them. This assumes a CSC-like compiler that doesn't re-use
// local slots in the same method across scopes.
//
- public IEnumerable<LocalVariable> GetLocalVariableNamesForMethod(ISymUnmanagedReader reader, int methodToken)
+ public IEnumerable<ILLocalVariable> GetLocalVariableNamesForMethod(ISymUnmanagedReader reader, int methodToken)
{
ISymUnmanagedMethod symbolMethod;
if (reader.GetMethod(methodToken, out symbolMethod) < 0)
@@ -222,7 +222,7 @@ namespace ILCompiler
ISymUnmanagedScope rootScope;
ThrowExceptionForHR(symbolMethod.GetRootScope(out rootScope));
- var variables = new List<LocalVariable>();
+ var variables = new List<ILLocalVariable>();
ProbeScopeForLocals(variables, rootScope);
return variables;
}
diff --git a/src/ILCompiler.Compiler/src/CppCodeGen/CppWriter.cs b/src/ILCompiler.Compiler/src/CppCodeGen/CppWriter.cs
index e12a68f32..7790fc05c 100644
--- a/src/ILCompiler.Compiler/src/CppCodeGen/CppWriter.cs
+++ b/src/ILCompiler.Compiler/src/CppCodeGen/CppWriter.cs
@@ -372,7 +372,7 @@ namespace ILCompiler.CppCodeGen
ilImporter.SetSequencePoints(sequencePoints);
}
- IEnumerable<LocalVariable> localVariables = typeSystemContext.GetLocalVariableNamesForMethod(method);
+ IEnumerable<ILLocalVariable> localVariables = typeSystemContext.GetLocalVariableNamesForMethod(method);
if (localVariables != null)
ilImporter.SetLocalVariables(localVariables);
diff --git a/src/ILCompiler.Compiler/src/CppCodeGen/ILToCppImporter.cs b/src/ILCompiler.Compiler/src/CppCodeGen/ILToCppImporter.cs
index 4969a25c0..f60729dab 100644
--- a/src/ILCompiler.Compiler/src/CppCodeGen/ILToCppImporter.cs
+++ b/src/ILCompiler.Compiler/src/CppCodeGen/ILToCppImporter.cs
@@ -25,7 +25,7 @@ namespace Internal.IL
// TODO: The remaining info
}
- public struct LocalVariable
+ public struct ILLocalVariable
{
public int Slot;
public string Name;
@@ -55,7 +55,7 @@ namespace Internal.IL
public int LineNumber;
}
private SequencePoint[] _sequencePoints;
- private Dictionary<int, LocalVariable> _localSlotToInfoMap;
+ private Dictionary<int, ILLocalVariable> _localSlotToInfoMap;
private Dictionary<int, string> _parameterIndexToNameMap;
private class ExceptionRegion
@@ -154,15 +154,15 @@ namespace Internal.IL
}
}
- public void SetLocalVariables(IEnumerable<LocalVariable> localVariables)
+ public void SetLocalVariables(IEnumerable<ILLocalVariable> localVariables)
{
try
{
HashSet<string> names = new HashSet<string>();
- var localSlotToInfoMap = new Dictionary<int, LocalVariable>();
+ var localSlotToInfoMap = new Dictionary<int, ILLocalVariable>();
foreach (var v in localVariables)
{
- LocalVariable modifiedLocal = v;
+ ILLocalVariable modifiedLocal = v;
modifiedLocal.Name = _compilation.NameMangler.SanitizeName(modifiedLocal.Name);
if (!names.Add(v.Name))
{