Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix broken build from a bad rebase.

  • Loading branch information...
commit c1f30ef62cee7ef8022e7c968a3a917157ef4513 1 parent d77c947
@jdhardy authored
View
1  Languages/IronPython/IronPython.Modules/Properties/AssemblyInfo.cs
@@ -39,3 +39,4 @@
[assembly: SecurityTransparent]
[assembly: AllowPartiallyTrustedCallers]
[assembly: SecurityRules(SecurityRuleSet.Level1)]
+#endif
View
2  Languages/IronPython/IronPython/Runtime/ClrModule.Compilation.cs
@@ -660,7 +660,7 @@ private static CustomAttributeBuilder MakeCab(ClrAttributeInfo attrib)
attributes = new List();
func.__dict__["clr_attributes__"] = attributes;
}
- attributes.AddRange(attribs);
+ attributes.extend(attribs);
return func;
};
View
41 Runtime/Microsoft.Dynamic/Runtime/SavableScriptCode.cs
@@ -84,14 +84,22 @@ class CodeInfo {
// build the assembly & type gen that all the script codes will live in...
AssemblyGen ag = new AssemblyGen(new AssemblyName(name), dir, ext, /*emitSymbols*/false);
+ GenerateAssemblyCode(ag, codes);
+ ag.SaveAssembly();
+ }
+
+ public static void GenerateAssemblyCode(AssemblyGen ag, SavableScriptCode[] codes)
+ {
TypeBuilder tb = ag.DefinePublicType("DLRCachedCode", typeof(object), true);
TypeGen tg = new TypeGen(ag, tb);
// then compile all of the code
Dictionary<Type, List<CodeInfo>> langCtxBuilders = new Dictionary<Type, List<CodeInfo>>();
- foreach (SavableScriptCode sc in codes) {
+ foreach (SavableScriptCode sc in codes)
+ {
List<CodeInfo> builders;
- if (!langCtxBuilders.TryGetValue(sc.LanguageContext.GetType(), out builders)) {
+ if (!langCtxBuilders.TryGetValue(sc.LanguageContext.GetType(), out builders))
+ {
langCtxBuilders[sc.LanguageContext.GetType()] = builders = new List<CodeInfo>();
}
@@ -111,16 +119,19 @@ class CodeInfo {
var langsWithBuilders = langCtxBuilders.ToArray();
// lang ctx array
- ilgen.EmitArray(typeof(Type), langsWithBuilders.Length, (index) => {
+ ilgen.EmitArray(typeof(Type), langsWithBuilders.Length, (index) =>
+ {
ilgen.Emit(OpCodes.Ldtoken, langsWithBuilders[index].Key);
ilgen.EmitCall(typeof(Type).GetMethod("GetTypeFromHandle", new[] { typeof(RuntimeTypeHandle) }));
});
// builders array of array
- ilgen.EmitArray(typeof(Delegate[]), langsWithBuilders.Length, (index) => {
+ ilgen.EmitArray(typeof(Delegate[]), langsWithBuilders.Length, (index) =>
+ {
List<CodeInfo> builders = langsWithBuilders[index].Value;
- ilgen.EmitArray(typeof(Delegate), builders.Count, (innerIndex) => {
+ ilgen.EmitArray(typeof(Delegate), builders.Count, (innerIndex) =>
+ {
ilgen.EmitNull();
ilgen.Emit(OpCodes.Ldftn, builders[innerIndex].Builder);
ilgen.EmitNew(
@@ -131,23 +142,30 @@ class CodeInfo {
});
// paths array of array
- ilgen.EmitArray(typeof(string[]), langsWithBuilders.Length, (index) => {
+ ilgen.EmitArray(typeof(string[]), langsWithBuilders.Length, (index) =>
+ {
List<CodeInfo> builders = langsWithBuilders[index].Value;
- ilgen.EmitArray(typeof(string), builders.Count, (innerIndex) => {
+ ilgen.EmitArray(typeof(string), builders.Count, (innerIndex) =>
+ {
ilgen.EmitString(builders[innerIndex].Code.SourceUnit.Path);
});
});
// 4th element in tuple - custom per-language data
- ilgen.EmitArray(typeof(string[]), langsWithBuilders.Length, (index) => {
+ ilgen.EmitArray(typeof(string[]), langsWithBuilders.Length, (index) =>
+ {
List<CodeInfo> builders = langsWithBuilders[index].Value;
- ilgen.EmitArray(typeof(string), builders.Count, (innerIndex) => {
+ ilgen.EmitArray(typeof(string), builders.Count, (innerIndex) =>
+ {
ICustomScriptCodeData data = builders[innerIndex].Code as ICustomScriptCodeData;
- if (data != null) {
+ if (data != null)
+ {
ilgen.EmitString(data.GetCustomScriptCodeData());
- } else {
+ }
+ else
+ {
ilgen.Emit(OpCodes.Ldnull);
}
});
@@ -165,7 +183,6 @@ class CodeInfo {
));
tg.FinishType();
- ag.SaveAssembly();
}
/// <summary>
View
6 Runtime/Microsoft.Scripting/Properties/AssemblyInfo.cs
@@ -48,9 +48,6 @@
[assembly: SecurityTransparent]
[assembly: AllowPartiallyTrustedCallers]
[assembly: SecurityRules(SecurityRuleSet.Level1)]
-
-#if !WIN8
-[assembly: SecurityTransparent]
#endif
#if !SILVERLIGHT
@@ -59,6 +56,3 @@
[assembly: AssemblyInformationalVersion("1.1")]
#endif
-#if !SILVERLIGHT && !WP75 && !WIN8
-[assembly: AllowPartiallyTrustedCallers]
-#endif
Please sign in to comment.
Something went wrong with that request. Please try again.