diff options
author | 2011-08-01 16:15:47 -0700 | |
---|---|---|
committer | 2011-08-01 16:15:47 -0700 | |
commit | 4ca11d1c4875b31596d9384dae40eab228ab74a2 (patch) | |
tree | 2905387cf43e23081a975a6e21370ae7092cceb1 /BCT/BytecodeTranslator | |
parent | 1747766d30d7a8f9fe6d35b0162677191f9059f3 (diff) | |
parent | a6cba37bce36a29b08601da6e61f59271100319f (diff) |
Merge
Diffstat (limited to 'BCT/BytecodeTranslator')
-rw-r--r-- | BCT/BytecodeTranslator/Program.cs | 4 | ||||
-rw-r--r-- | BCT/BytecodeTranslator/Sink.cs | 14 |
2 files changed, 12 insertions, 6 deletions
diff --git a/BCT/BytecodeTranslator/Program.cs b/BCT/BytecodeTranslator/Program.cs index 3e6db57f..a0836de6 100644 --- a/BCT/BytecodeTranslator/Program.cs +++ b/BCT/BytecodeTranslator/Program.cs @@ -124,8 +124,8 @@ namespace BytecodeTranslator { exemptionList.Add(new Regex(line));
i++;
}
- Console.WriteLine("Read {0} lines from the exclusion file '{1}'.",
- i, options.exemptionFile);
+ //Console.WriteLine("Read {0} lines from the exclusion file '{1}'.",
+ // i, options.exemptionFile);
}
} catch (Exception e) {
Console.WriteLine("Something went wrong reading the exclusion file '{0}'; read in {1} lines, continuing processing.",
diff --git a/BCT/BytecodeTranslator/Sink.cs b/BCT/BytecodeTranslator/Sink.cs index e641f7cb..5a4de710 100644 --- a/BCT/BytecodeTranslator/Sink.cs +++ b/BCT/BytecodeTranslator/Sink.cs @@ -800,12 +800,14 @@ namespace BytecodeTranslator { IGenericTypeParameter gtp = type as IGenericTypeParameter;
if (gtp != null) {
- // calculate the index
int index = gtp.Index;
- INestedTypeDefinition containingType = gtp.DefiningType as INestedTypeDefinition;
- while (containingType != null) {
+ var nestedType = gtp.DefiningType as INestedTypeDefinition;
+ while (nestedType != null) {
+ // calculate the consolidated index: the parameter knows only its index
+ // in the type that declares it, not including any outer containing types
+ var containingType = nestedType.ContainingTypeDefinition;
index += containingType.GenericParameterCount;
- containingType = containingType.ContainingTypeDefinition as INestedTypeDefinition;
+ nestedType = containingType as INestedTypeDefinition;
}
ProcedureInfo info = FindOrCreateProcedure(methodBeingTranslated);
@@ -1083,6 +1085,8 @@ namespace BytecodeTranslator { public void AddDelegate(ITypeDefinition type, IMethodDefinition defn)
{
+ if (type == Dummy.Type) {
+ }
uint key = type.InternedKey;
if (!delegateTypeToDelegates.ContainsKey(key))
delegateTypeToDelegates[key] = new Tuple<ITypeDefinition, HashSet<IMethodDefinition>>(type, new HashSet<IMethodDefinition>());
@@ -1091,6 +1095,8 @@ namespace BytecodeTranslator { }
public void AddDelegateType(ITypeDefinition type) {
+ if (type == Dummy.Type) {
+ }
uint key = type.InternedKey;
if (!delegateTypeToDelegates.ContainsKey(key))
delegateTypeToDelegates[key] = new Tuple<ITypeDefinition, HashSet<IMethodDefinition>>(type, new HashSet<IMethodDefinition>());
|