{
+ }
+
+ class Three : Two {
+ public override R Foo () {
+ throw new Exception ("Doesn't matter");
+ }
+ }
+
[Test] //Regression test for #662867
public void GetCustomAttributesOnEventOverride ()
{
diff --git a/mcs/class/corlib/Test/System/TimeZoneInfoTest.cs b/mcs/class/corlib/Test/System/TimeZoneInfoTest.cs
index e166487ef6..c762bd158e 100644
--- a/mcs/class/corlib/Test/System/TimeZoneInfoTest.cs
+++ b/mcs/class/corlib/Test/System/TimeZoneInfoTest.cs
@@ -56,12 +56,12 @@ namespace MonoTests.System
return "GTB Standard Time";
case "Europe/Chisinau":
return "E. Europe Standard Time";
- case "US/Eastern":
+ case "America/New_York":
return "Eastern Standard Time";
case "America/Chicago":
case "US/Central":
return "Central Standard Time";
- case "US/Pacific":
+ case "America/Los_Angeles":
return "Pacific Standard Time";
case "Australia/Sydney":
case "Australia/Melbourne":
@@ -84,7 +84,7 @@ namespace MonoTests.System
case "Europe/Oslo":
case "Europe/San_Marino":
return "W. Europe Standard Time";
- case "Canada/Eastern":
+ case "America/Toronto":
return "Eastern Standard Time";
case "Asia/Tehran":
return "Iran Standard Time";
@@ -482,26 +482,38 @@ namespace MonoTests.System
Assert.IsTrue (tzi.IsDaylightSavingTime (dateOffset));
}
+ // https://github.com/mono/mono/issues/16742
+ [Test]
+ public void Bug_16472 ()
+ {
+ var parsedTime = DateTime.Parse ("1948-02-19T23:00:00Z", CultureInfo.InvariantCulture);
+ var newTime = TimeZoneInfo.ConvertTime (parsedTime, TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("Europe/Rome")));
+ Assert.AreEqual (1948, newTime.Year);
+ }
+
// https://github.com/mono/mono/issues/9664
[Test]
public void Bug_9664 ()
{
- TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("US/Central"));
+ TimeZoneInfo tzi;
+ try {
+ tzi = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("US/Central"));
+ } catch (TimeZoneNotFoundException e) {
+ Assert.Ignore ("Timezone US/Central not found.");
+ return;
+ }
var date = new DateTime (2019, 3, 9, 21, 0, 0);
Assert.IsFalse (tzi.IsDaylightSavingTime (date));
Assert.AreEqual (new TimeSpan (-6, 0, 0), tzi.GetUtcOffset (date));
- tzi = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("US/Central"));
date = new DateTime (2019, 3, 10, 2, 0, 0);
Assert.IsFalse (tzi.IsDaylightSavingTime (date));
Assert.AreEqual (new TimeSpan (-6, 0, 0), tzi.GetUtcOffset (date));
- tzi = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("US/Central"));
date = new DateTime (2019, 3, 10, 2, 30, 0);
Assert.IsFalse (tzi.IsDaylightSavingTime (date));
Assert.AreEqual (new TimeSpan (-6, 0, 0), tzi.GetUtcOffset (date));
- tzi = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("US/Central"));
date = new DateTime (2019, 3, 10, 3, 0, 0);
Assert.IsTrue (tzi.IsDaylightSavingTime (date));
Assert.AreEqual (new TimeSpan (-5, 0, 0), tzi.GetUtcOffset (date));
@@ -533,207 +545,207 @@ namespace MonoTests.System
new DateTime (2020, 3, 8, 0, 0, 0), new DateTime (2020, 3, 8, 0, 30, 0), new DateTime (2020, 3, 8, 1, 0, 0),
new TimeSpan (-5, 0, 0), new TimeSpan (-4, 0, 0));
- // US, Kansas City, MO (US Central Time): Jumps ahead at 2:00 AM on 3/8/2020 to 3:00 AM
+ // US, Kansas City, MO (US Central Time): Jumps ahead at 2:00 AM on 3/8/2020 to 3:00 AM
CheckJumpingIntoDST ("America/Chicago",
new DateTime (2020, 3, 8, 2, 0, 0), new DateTime (2020, 3, 8, 2, 30, 0), new DateTime (2020, 3, 8, 3, 0, 0),
new TimeSpan (-6, 0, 0), new TimeSpan (-5, 0, 0));
- // Anchorage, AK (Alaska Time): Jumps ahead at 2:00 AM on 3/8/2020 to 3:00 AM
+ // Anchorage, AK (Alaska Time): Jumps ahead at 2:00 AM on 3/8/2020 to 3:00 AM
CheckJumpingIntoDST ("America/Anchorage",
new DateTime (2020, 3, 8, 2, 0, 0), new DateTime (2020, 3, 8, 2, 30, 0), new DateTime (2020, 3, 8, 3, 0, 0),
new TimeSpan (-9, 0, 0), new TimeSpan (-8, 0, 0));
- // Azores ST (Ponta Delgada, Portugal): Jumps ahead at 12:00 AM on 3/29/2020 to 1:00 AM
+ // Azores ST (Ponta Delgada, Portugal): Jumps ahead at 12:00 AM on 3/29/2020 to 1:00 AM
CheckJumpingIntoDST ("Atlantic/Azores",
new DateTime (2020, 3, 29, 0, 0, 0), new DateTime (2020, 3, 29, 0, 30, 0), new DateTime (2020, 3, 29, 1, 0, 0),
new TimeSpan (-1, 0, 0), new TimeSpan (0, 0, 0));
-
- // Iran, Tehran (Iran ST): Jumps ahead at 12:00 AM on 3/21/2020 to 1:00 AM
+
+ // Iran, Tehran (Iran ST): Jumps ahead at 12:00 AM on 3/21/2020 to 1:00 AM
CheckJumpingIntoDST ("Asia/Tehran",
new DateTime (2020, 3, 21, 0, 0, 0), new DateTime (2020, 3, 21, 0, 30, 0), new DateTime (2020, 3, 21, 1, 0, 0),
new TimeSpan (3, 30, 0), new TimeSpan (4, 30, 0));
-
- // Israel, Jerusalem (Israel ST): Jumps ahead at 2:00 AM on 3/27/2020 to 3:00 AM
+
+ // Israel, Jerusalem (Israel ST): Jumps ahead at 2:00 AM on 3/27/2020 to 3:00 AM
CheckJumpingIntoDST ("Asia/Jerusalem",
new DateTime (2020, 3, 27, 2, 0, 0), new DateTime (2020, 3, 27, 2, 30, 0), new DateTime (2020, 3, 27, 3, 0, 0),
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
- // Jordan, Amman (Eastern European ST): Jumps ahead at 12:00 AM on 3/27/2020 to 1:00 AM
+ // Jordan, Amman (Eastern European ST): Jumps ahead at 12:00 AM on 3/27/2020 to 1:00 AM
CheckJumpingIntoDST ("Asia/Amman",
new DateTime (2020, 3, 27, 0, 0, 0), new DateTime (2020, 3, 27, 0, 30, 0), new DateTime (2020, 3, 27, 1, 0, 0),
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
- // Albania, Tirana (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Albania, Tirana (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Tirane",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Austria, Vienna (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Austria, Vienna (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Vienna",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Belgium, Brussels (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Belgium, Brussels (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Brussels",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Bulgaria, Sofia (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
+ // Bulgaria, Sofia (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
CheckJumpingIntoDST ("Europe/Sofia",
new DateTime (2020, 3, 29, 3, 0, 0), new DateTime (2020, 3, 29, 3, 30, 0), new DateTime (2020, 3, 29, 4, 0, 0),
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
- // Czechia, Prague (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Czechia, Prague (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Prague",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Denmark, Copenhagen (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Denmark, Copenhagen (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Copenhagen",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Estonia, Tallinn (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
+ // Estonia, Tallinn (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
CheckJumpingIntoDST ("Europe/Tallinn",
new DateTime (2020, 3, 29, 3, 0, 0), new DateTime (2020, 3, 29, 3, 30, 0), new DateTime (2020, 3, 29, 4, 0, 0),
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
- // France, Paris (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // France, Paris (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Paris",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Germany, Berlin (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Germany, Berlin (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Berlin",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Greece, Athens (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
+ // Greece, Athens (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
CheckJumpingIntoDST ("Europe/Athens",
new DateTime (2020, 3, 29, 3, 0, 0), new DateTime (2020, 3, 29, 3, 30, 0), new DateTime (2020, 3, 29, 4, 0, 0),
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
- // Guernsey (UK) Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
+ // Guernsey (UK) Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
CheckJumpingIntoDST ("Europe/Guernsey",
new DateTime (2020, 3, 29, 1, 0, 0), new DateTime (2020, 3, 29, 1, 30, 0), new DateTime (2020, 3, 29, 2, 0, 0),
new TimeSpan (0, 0, 0), new TimeSpan (1, 0, 0));
- // Holy See, Vatican City (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Holy See, Vatican City (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Vatican",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Hungary, Budapest (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Hungary, Budapest (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Budapest",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // // Ireland, Dublin (Greenwich Mean Time -> Irish Standard Time): Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
+ // // Ireland, Dublin (Greenwich Mean Time -> Irish Standard Time): Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
// CheckJumpingIntoDST ("Europe/Dublin",
// new DateTime (2020, 3, 29, 1, 0, 0), new DateTime (2020, 3, 29, 1, 30, 0), new DateTime (2020, 3, 29, 2, 0, 0),
// new TimeSpan (0, 0, 0), new TimeSpan (1, 0, 0));
- // UK, Douglas, Isle of Man (GMT+1:00): Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
+ // UK, Douglas, Isle of Man (GMT+1:00): Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
CheckJumpingIntoDST ("Europe/Isle_of_Man",
new DateTime (2020, 3, 29, 1, 0, 0), new DateTime (2020, 3, 29, 1, 30, 0), new DateTime (2020, 3, 29, 2, 0, 0),
new TimeSpan (0, 0, 0), new TimeSpan (1, 0, 0));
- // Italy, Rome (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Italy, Rome (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Rome",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Jersey (UK): Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
+ // Jersey (UK): Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
CheckJumpingIntoDST ("Europe/Jersey",
new DateTime (2020, 3, 29, 1, 0, 0), new DateTime (2020, 3, 29, 1, 30, 0), new DateTime (2020, 3, 29, 2, 0, 0),
new TimeSpan (0, 0, 0), new TimeSpan (1, 0, 0));
- // Latvia, Riga (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
+ // Latvia, Riga (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
CheckJumpingIntoDST ("Europe/Riga",
new DateTime (2020, 3, 29, 3, 0, 0), new DateTime (2020, 3, 29, 3, 30, 0), new DateTime (2020, 3, 29, 4, 0, 0),
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
- // Lithuania, Vilnius (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
+ // Lithuania, Vilnius (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
CheckJumpingIntoDST ("Europe/Vilnius",
new DateTime (2020, 3, 29, 3, 0, 0), new DateTime (2020, 3, 29, 3, 30, 0), new DateTime (2020, 3, 29, 4, 0, 0),
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
- // Luxembourg, Luxembourg (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Luxembourg, Luxembourg (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Luxembourg",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Malta, Valletta (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Malta, Valletta (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Malta",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Moldova, Chişinău (Eastern European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Moldova, Chişinău (Eastern European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Chisinau",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
- // Monaco, Monaco (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Monaco, Monaco (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Monaco",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Netherlands, Amsterdam (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Netherlands, Amsterdam (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Amsterdam",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Norway, Oslo (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Norway, Oslo (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Oslo",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Poland, Warsaw (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Poland, Warsaw (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Warsaw",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Portugal, Lisbon (Western European ST): Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
+ // Portugal, Lisbon (Western European ST): Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
CheckJumpingIntoDST ("Europe/Lisbon",
new DateTime (2020, 3, 29, 1, 0, 0), new DateTime (2020, 3, 29, 1, 30, 0), new DateTime (2020, 3, 29, 2, 0, 0),
new TimeSpan (0, 0, 0), new TimeSpan (1, 0, 0));
- // San Marino, San Marino (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // San Marino, San Marino (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/San_Marino",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Slovakia, Bratislava (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Slovakia, Bratislava (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Bratislava",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Spain, Madrid (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
+ // Spain, Madrid (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
CheckJumpingIntoDST ("Europe/Madrid",
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
- // Ukraine, Kiev (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
+ // Ukraine, Kiev (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
CheckJumpingIntoDST ("Europe/Kiev",
new DateTime (2020, 3, 29, 3, 0, 0), new DateTime (2020, 3, 29, 3, 30, 0), new DateTime (2020, 3, 29, 4, 0, 0),
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
- // United Kingdom, London (British ST): Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
+ // United Kingdom, London (British ST): Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
CheckJumpingIntoDST ("Europe/London",
new DateTime (2020, 3, 29, 1, 0, 0), new DateTime (2020, 3, 29, 1, 30, 0), new DateTime (2020, 3, 29, 2, 0, 0),
new TimeSpan (0, 0, 0), new TimeSpan (1, 0, 0));
}
- void CheckJumpingIntoDST (string tzId, DateTime dstDeltaStart, DateTime inDstDelta, DateTime dstDeltaEnd, TimeSpan baseOffset, TimeSpan dstOffset)
+ void CheckJumpingIntoDST (string tzId, DateTime dstDeltaStart, DateTime inDstDelta, DateTime dstDeltaEnd, TimeSpan baseOffset, TimeSpan dstOffset)
{
var tzi = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId (tzId));
Assert.IsFalse (tzi.IsDaylightSavingTime (dstDeltaStart), $"{tzId}: #1");
Assert.AreEqual (baseOffset, tzi.GetUtcOffset (dstDeltaStart), $"{tzId}: #2");
- Assert.IsFalse (tzi.IsDaylightSavingTime (inDstDelta), $"{tzId}: #3");
+ Assert.IsFalse (tzi.IsDaylightSavingTime (inDstDelta), $"{tzId}: #3");
Assert.AreEqual (baseOffset, tzi.GetUtcOffset (inDstDelta), $"{tzId}: #4");
- Assert.IsTrue (tzi.IsDaylightSavingTime (dstDeltaEnd), $"{tzId}: #5");
+ Assert.IsTrue (tzi.IsDaylightSavingTime (dstDeltaEnd), $"{tzId}: #5");
Assert.AreEqual (dstOffset, tzi.GetUtcOffset (dstDeltaEnd), $"{tzId}: #6");
}
}
@@ -998,8 +1010,8 @@ namespace MonoTests.System
[Test (Description="Fix the bug https://bugzilla.xamarin.com/show_bug.cgi?id=1849")]
public void ConvertTime_AjustmentConvertTimeWithSourceTimeZone () {
- TimeZoneInfo easternTimeZone = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("US/Eastern"));
- TimeZoneInfo pacificTimeZone = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("US/Pacific"));
+ TimeZoneInfo easternTimeZone = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("America/New_York"));
+ TimeZoneInfo pacificTimeZone = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId ("America/Los_Angeles"));
DateTime lastMidnight = new DateTime (new DateTime (2012, 06, 13).Ticks, DateTimeKind.Unspecified);
DateTime lastMidnightAsEST = TimeZoneInfo.ConvertTime (lastMidnight, pacificTimeZone, easternTimeZone);
@@ -1276,7 +1288,6 @@ namespace MonoTests.System
"Europe/Dublin", // Europe/Dublin has a DST offset of 34 minutes and 39 seconds in 1916.
"Europe/Amsterdam",
"America/St_Johns",
- "Canada/Newfoundland",
"Europe/Moscow",
"Europe/Riga",
};
diff --git a/mcs/class/corlib/Test/System/TimeZoneTest.cs b/mcs/class/corlib/Test/System/TimeZoneTest.cs
index 9cb66e6a53..066be7ebdd 100644
--- a/mcs/class/corlib/Test/System/TimeZoneTest.cs
+++ b/mcs/class/corlib/Test/System/TimeZoneTest.cs
@@ -364,7 +364,7 @@ public class TimeZoneTest {
[Category ("NotWasm")]
public void FindSystemTimeZoneById ()
{
- TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById (TimeZoneInfoTest.MapTimeZoneId ("Canada/Eastern"));
+ TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById (TimeZoneInfoTest.MapTimeZoneId ("America/Toronto"));
Assert.IsTrue ("EDT" == tzi.DaylightName || "Eastern Daylight Time" == tzi.DaylightName, "DaylightName");
Assert.IsTrue ("EST" == tzi.StandardName || "Eastern Standard Time" == tzi.StandardName, "StandardName");
Assert.IsTrue (tzi.SupportsDaylightSavingTime, "SupportsDaylightSavingTime");
diff --git a/mcs/class/corlib/corefx/MethodInfo.cs b/mcs/class/corlib/corefx/MethodInfo.cs
deleted file mode 100644
index cbef004385..0000000000
--- a/mcs/class/corlib/corefx/MethodInfo.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace System.Reflection {
- [Serializable]
- partial class MethodInfo {
- internal virtual int GenericParameterCount => GetGenericArguments ().Length;
- }
-}
diff --git a/mcs/class/corlib/corefx/SR.cs.REMOVED.git-id b/mcs/class/corlib/corefx/SR.cs.REMOVED.git-id
index 6d36f63f8b..9fbe287fda 100644
--- a/mcs/class/corlib/corefx/SR.cs.REMOVED.git-id
+++ b/mcs/class/corlib/corefx/SR.cs.REMOVED.git-id
@@ -1 +1 @@
-0d8ca7ea2340d4d83a6e2e36ccfef2a1088c23f7
\ No newline at end of file
+35736eff07e2c640611194361c95bdb612d891be
\ No newline at end of file
diff --git a/mcs/class/corlib/corlib.dll.sources.REMOVED.git-id b/mcs/class/corlib/corlib.dll.sources.REMOVED.git-id
index d3a7d4e728..4546cd1ac0 100644
--- a/mcs/class/corlib/corlib.dll.sources.REMOVED.git-id
+++ b/mcs/class/corlib/corlib.dll.sources.REMOVED.git-id
@@ -1 +1 @@
-d3b87d5ca787d43652ead46e2ed22cd62e293e8f
\ No newline at end of file
+d8d8021a5ca1bc353a5abb4cc17334448231e895
\ No newline at end of file
diff --git a/mcs/class/corlib/unix_build_corlib.dll.sources b/mcs/class/corlib/unix_build_corlib.dll.sources
index e33ba79c14..a3ebc60f09 100644
--- a/mcs/class/corlib/unix_build_corlib.dll.sources
+++ b/mcs/class/corlib/unix_build_corlib.dll.sources
@@ -15,6 +15,7 @@
../../../external/corefx/src/Common/src/Interop/Unix/System.Native/Interop.GetEUid.cs
../../../external/corefx/src/Common/src/Interop/Unix/System.Native/Interop.GetEGid.cs
../../../external/corefx/src/Common/src/Interop/Unix/System.Native/Interop.CopyFile.cs
+../../../external/corefx/src/Common/src/Interop/Unix/System.Native/Interop.LChflags.cs
../../../external/corefx/src/Common/src/Interop/Unix/System.Native/Interop.Unlink.cs
../../../external/corefx/src/Common/src/Interop/Unix/System.Native/Interop.Link.cs
../../../external/corefx/src/Common/src/Interop/Unix/System.Native/Interop.Rename.cs
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/netstandard.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/netstandard.dll.REMOVED.git-id
deleted file mode 100644
index e0103a2a1e..0000000000
--- a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/netstandard.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-56458cedc0a306d35e8a68743d493b8814d3169d
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Cecil.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Cecil.dll.REMOVED.git-id
deleted file mode 100644
index 306cb0fa83..0000000000
--- a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Cecil.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-a59e995fac121cfdd11ce0d927c7d3b506365f17
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Security.dll.REMOVED.git-id
deleted file mode 100644
index 74df7a692f..0000000000
--- a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Security.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-7db2447256a75befb73a1f986c2a83808086ccb4
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Configuration.dll.REMOVED.git-id
deleted file mode 100644
index ef66e48d80..0000000000
--- a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Configuration.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-c9e4f0a11e45ac3c153c2a636d3ba3768a2766d2
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Core.dll.REMOVED.git-id
deleted file mode 100644
index 46be39d414..0000000000
--- a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Core.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-b2d1d12c815dd2731ceb7238b8de888ec1dc4427
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.IO.Compression.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.IO.Compression.dll.REMOVED.git-id
deleted file mode 100644
index a841d59ba6..0000000000
--- a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.IO.Compression.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-d97bbdb4e0657d02c39782f54edf8dc4467b1b92
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Numerics.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Numerics.dll.REMOVED.git-id
deleted file mode 100644
index 990a91d170..0000000000
--- a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Numerics.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-b3a0572d70584537d9b177e4afe63f7bb6ca3d5c
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.dll.REMOVED.git-id
deleted file mode 100644
index 9aa6db03d5..0000000000
--- a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-e9ae2f2451e01d5135e74708e64d84c6c9107114
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.dll.REMOVED.git-id
deleted file mode 100644
index 4d39f88a2b..0000000000
--- a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-fdd96f02a656ffe6e476fde83e4774bf4827619b
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mcs.exe.REMOVED.git-id b/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mcs.exe.REMOVED.git-id
deleted file mode 100644
index c1a75bb8a2..0000000000
--- a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mcs.exe.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-9cd9d03def90a4614eda02f0c3ca4848fea4554c
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mscorlib.dll.REMOVED.git-id
deleted file mode 100644
index 1212af84f8..0000000000
--- a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mscorlib.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-cf9041d8696b6f8d91bb0e5ce9e739575de742cf
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Collections.Concurrent.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Collections.Concurrent.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Collections.Concurrent.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Collections.Concurrent.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Collections.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Collections.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Collections.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Collections.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.Debug.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.Debug.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.Debug.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.Debug.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.FileVersionInfo.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.FileVersionInfo.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.FileVersionInfo.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.FileVersionInfo.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.Tools.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.Tools.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.Tools.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.Tools.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Dynamic.Runtime.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Dynamic.Runtime.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Dynamic.Runtime.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Dynamic.Runtime.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Globalization.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Globalization.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Globalization.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Globalization.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.FileSystem.Primitives.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.FileSystem.Primitives.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.FileSystem.Primitives.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.FileSystem.Primitives.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.FileSystem.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.FileSystem.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.FileSystem.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.FileSystem.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Linq.Expressions.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Linq.Expressions.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Linq.Expressions.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Linq.Expressions.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Linq.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Linq.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Linq.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Linq.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.Extensions.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.Extensions.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.Extensions.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.Extensions.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.Primitives.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.Primitives.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.Primitives.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.Primitives.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Resources.ResourceManager.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Resources.ResourceManager.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Resources.ResourceManager.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Resources.ResourceManager.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.Extensions.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.Extensions.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.Extensions.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.Extensions.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.InteropServices.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.InteropServices.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.InteropServices.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.InteropServices.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.Numerics.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.Numerics.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.Numerics.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.Numerics.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Security.Cryptography.Algorithms.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Security.Cryptography.Algorithms.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Security.Cryptography.Algorithms.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Security.Cryptography.Algorithms.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Security.Cryptography.Primitives.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Security.Cryptography.Primitives.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Security.Cryptography.Primitives.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Security.Cryptography.Primitives.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.CodePages.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.CodePages.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.CodePages.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.CodePages.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.Extensions.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.Extensions.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.Extensions.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.Extensions.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.Tasks.Parallel.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.Tasks.Parallel.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.Tasks.Parallel.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.Tasks.Parallel.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.Tasks.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.Tasks.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.Tasks.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.Tasks.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.ValueTuple.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.ValueTuple.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.ValueTuple.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.ValueTuple.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Xml.ReaderWriter.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Xml.ReaderWriter.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Xml.ReaderWriter.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Xml.ReaderWriter.dll
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Xml.XDocument.dll b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Xml.XDocument.dll
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Xml.XDocument.dll
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Xml.XDocument.dll
diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/netstandard.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/netstandard.dll.REMOVED.git-id
new file mode 100644
index 0000000000..c1b6653057
--- /dev/null
+++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/netstandard.dll.REMOVED.git-id
@@ -0,0 +1 @@
+1ff46092b9a120eb841c522b31e0e90e291874fe
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Cecil.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Cecil.dll.REMOVED.git-id
new file mode 100644
index 0000000000..1e92b9e74a
--- /dev/null
+++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Cecil.dll.REMOVED.git-id
@@ -0,0 +1 @@
+c835199ef4f799c5ea6f316c148249ab88cede2a
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id
new file mode 100644
index 0000000000..62534ee432
--- /dev/null
+++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id
@@ -0,0 +1 @@
+10c199f6273088a52230ffe5240dab06dc79ef6a
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id
new file mode 100644
index 0000000000..89473e8e0a
--- /dev/null
+++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id
@@ -0,0 +1 @@
+d7c75a5161e4dc77ff72514f81e5bcfee1f66f18
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id
new file mode 100644
index 0000000000..d783e90e06
--- /dev/null
+++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id
@@ -0,0 +1 @@
+97a131da135cdb88e3070994bfcb405182f0cc23
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id
new file mode 100644
index 0000000000..9eb794c682
--- /dev/null
+++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id
@@ -0,0 +1 @@
+5090147e0bd6549ca5cbf10241cacd11d023d17c
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id
new file mode 100644
index 0000000000..7ad0ca9687
--- /dev/null
+++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id
@@ -0,0 +1 @@
+3529d3fc8f191980ad92d1191106ad14ea1e6f0b
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Security.dll.REMOVED.git-id
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Security.dll.REMOVED.git-id
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Security.dll.REMOVED.git-id
diff --git a/mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.Linq.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.Linq.dll.REMOVED.git-id
similarity index 100%
rename from mcs/class/lib/monolite-linux/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.Linq.dll.REMOVED.git-id
rename to mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.Linq.dll.REMOVED.git-id
diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id
new file mode 100644
index 0000000000..4ade6a3678
--- /dev/null
+++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id
@@ -0,0 +1 @@
+5bf7ee680fde34b85692b0dfd2698af889ab8767
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.dll.REMOVED.git-id
new file mode 100644
index 0000000000..bbe262d302
--- /dev/null
+++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/System.dll.REMOVED.git-id
@@ -0,0 +1 @@
+444cfb43e9d19732c08dfc47c74331d659aabd72
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id
new file mode 100644
index 0000000000..0bd014855b
--- /dev/null
+++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id
@@ -0,0 +1 @@
+4f01f6898ed1815cc48192ace724a80bcce666f8
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id
new file mode 100644
index 0000000000..96aaab6f39
--- /dev/null
+++ b/mcs/class/lib/monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id
@@ -0,0 +1 @@
+ea565b946160f2dab6d14029d989862bb8ad1293
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/netstandard.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/netstandard.dll.REMOVED.git-id
deleted file mode 100644
index e0103a2a1e..0000000000
--- a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/netstandard.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-56458cedc0a306d35e8a68743d493b8814d3169d
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Cecil.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Cecil.dll.REMOVED.git-id
deleted file mode 100644
index 306cb0fa83..0000000000
--- a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Cecil.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-a59e995fac121cfdd11ce0d927c7d3b506365f17
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Security.dll.REMOVED.git-id
deleted file mode 100644
index 74df7a692f..0000000000
--- a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Security.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-7db2447256a75befb73a1f986c2a83808086ccb4
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Configuration.dll.REMOVED.git-id
deleted file mode 100644
index ef66e48d80..0000000000
--- a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Configuration.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-c9e4f0a11e45ac3c153c2a636d3ba3768a2766d2
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Core.dll.REMOVED.git-id
deleted file mode 100644
index 46be39d414..0000000000
--- a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Core.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-b2d1d12c815dd2731ceb7238b8de888ec1dc4427
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.IO.Compression.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.IO.Compression.dll.REMOVED.git-id
deleted file mode 100644
index a841d59ba6..0000000000
--- a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.IO.Compression.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-d97bbdb4e0657d02c39782f54edf8dc4467b1b92
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Numerics.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Numerics.dll.REMOVED.git-id
deleted file mode 100644
index 990a91d170..0000000000
--- a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Numerics.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-b3a0572d70584537d9b177e4afe63f7bb6ca3d5c
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.dll.REMOVED.git-id
deleted file mode 100644
index 9aa6db03d5..0000000000
--- a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-e9ae2f2451e01d5135e74708e64d84c6c9107114
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.dll.REMOVED.git-id
deleted file mode 100644
index 4d39f88a2b..0000000000
--- a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-fdd96f02a656ffe6e476fde83e4774bf4827619b
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mcs.exe.REMOVED.git-id b/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mcs.exe.REMOVED.git-id
deleted file mode 100644
index 57907a6470..0000000000
--- a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mcs.exe.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-81565efe2b0412f45e6703253e792f68b4fcf8f7
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mscorlib.dll.REMOVED.git-id
deleted file mode 100644
index 1212af84f8..0000000000
--- a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mscorlib.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-cf9041d8696b6f8d91bb0e5ce9e739575de742cf
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Collections.Concurrent.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Collections.Concurrent.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Collections.Concurrent.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Collections.Concurrent.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Collections.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Collections.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Collections.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Collections.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.Debug.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.Debug.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.Debug.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.Debug.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.FileVersionInfo.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.FileVersionInfo.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.FileVersionInfo.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.FileVersionInfo.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.Tools.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.Tools.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.Tools.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.Tools.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Dynamic.Runtime.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Dynamic.Runtime.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Dynamic.Runtime.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Dynamic.Runtime.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Globalization.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Globalization.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Globalization.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Globalization.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.FileSystem.Primitives.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.FileSystem.Primitives.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.FileSystem.Primitives.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.FileSystem.Primitives.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.FileSystem.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.FileSystem.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.FileSystem.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.FileSystem.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Linq.Expressions.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Linq.Expressions.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Linq.Expressions.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Linq.Expressions.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Linq.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Linq.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Linq.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Linq.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.Extensions.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.Extensions.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.Extensions.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.Extensions.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.Primitives.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.Primitives.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.Primitives.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.Primitives.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Resources.ResourceManager.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Resources.ResourceManager.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Resources.ResourceManager.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Resources.ResourceManager.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.Extensions.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.Extensions.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.Extensions.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.Extensions.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.InteropServices.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.InteropServices.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.InteropServices.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.InteropServices.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.Numerics.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.Numerics.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.Numerics.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.Numerics.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Security.Cryptography.Algorithms.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Security.Cryptography.Algorithms.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Security.Cryptography.Algorithms.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Security.Cryptography.Algorithms.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Security.Cryptography.Primitives.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Security.Cryptography.Primitives.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Security.Cryptography.Primitives.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Security.Cryptography.Primitives.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.CodePages.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.CodePages.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.CodePages.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.CodePages.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.Extensions.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.Extensions.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.Extensions.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.Extensions.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.Tasks.Parallel.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.Tasks.Parallel.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.Tasks.Parallel.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.Tasks.Parallel.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.Tasks.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.Tasks.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.Tasks.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.Tasks.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.ValueTuple.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.ValueTuple.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.ValueTuple.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.ValueTuple.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Xml.ReaderWriter.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Xml.ReaderWriter.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Xml.ReaderWriter.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Xml.ReaderWriter.dll
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Xml.XDocument.dll b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Xml.XDocument.dll
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Xml.XDocument.dll
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Xml.XDocument.dll
diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/netstandard.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/netstandard.dll.REMOVED.git-id
new file mode 100644
index 0000000000..c1b6653057
--- /dev/null
+++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/netstandard.dll.REMOVED.git-id
@@ -0,0 +1 @@
+1ff46092b9a120eb841c522b31e0e90e291874fe
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Cecil.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Cecil.dll.REMOVED.git-id
new file mode 100644
index 0000000000..1e92b9e74a
--- /dev/null
+++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Cecil.dll.REMOVED.git-id
@@ -0,0 +1 @@
+c835199ef4f799c5ea6f316c148249ab88cede2a
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id
new file mode 100644
index 0000000000..62534ee432
--- /dev/null
+++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id
@@ -0,0 +1 @@
+10c199f6273088a52230ffe5240dab06dc79ef6a
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id
new file mode 100644
index 0000000000..89473e8e0a
--- /dev/null
+++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id
@@ -0,0 +1 @@
+d7c75a5161e4dc77ff72514f81e5bcfee1f66f18
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id
new file mode 100644
index 0000000000..d783e90e06
--- /dev/null
+++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id
@@ -0,0 +1 @@
+97a131da135cdb88e3070994bfcb405182f0cc23
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id
new file mode 100644
index 0000000000..9eb794c682
--- /dev/null
+++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id
@@ -0,0 +1 @@
+5090147e0bd6549ca5cbf10241cacd11d023d17c
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id
new file mode 100644
index 0000000000..7ad0ca9687
--- /dev/null
+++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id
@@ -0,0 +1 @@
+3529d3fc8f191980ad92d1191106ad14ea1e6f0b
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Security.dll.REMOVED.git-id
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Security.dll.REMOVED.git-id
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Security.dll.REMOVED.git-id
diff --git a/mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.Linq.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.Linq.dll.REMOVED.git-id
similarity index 100%
rename from mcs/class/lib/monolite-macos/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.Linq.dll.REMOVED.git-id
rename to mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.Linq.dll.REMOVED.git-id
diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id
new file mode 100644
index 0000000000..4ade6a3678
--- /dev/null
+++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id
@@ -0,0 +1 @@
+5bf7ee680fde34b85692b0dfd2698af889ab8767
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.dll.REMOVED.git-id
new file mode 100644
index 0000000000..bbe262d302
--- /dev/null
+++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/System.dll.REMOVED.git-id
@@ -0,0 +1 @@
+444cfb43e9d19732c08dfc47c74331d659aabd72
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id
new file mode 100644
index 0000000000..0bd014855b
--- /dev/null
+++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id
@@ -0,0 +1 @@
+4f01f6898ed1815cc48192ace724a80bcce666f8
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id
new file mode 100644
index 0000000000..96aaab6f39
--- /dev/null
+++ b/mcs/class/lib/monolite-macos/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id
@@ -0,0 +1 @@
+ea565b946160f2dab6d14029d989862bb8ad1293
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/netstandard.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/netstandard.dll.REMOVED.git-id
deleted file mode 100644
index e0103a2a1e..0000000000
--- a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/netstandard.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-56458cedc0a306d35e8a68743d493b8814d3169d
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Cecil.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Cecil.dll.REMOVED.git-id
deleted file mode 100644
index 306cb0fa83..0000000000
--- a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Cecil.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-a59e995fac121cfdd11ce0d927c7d3b506365f17
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Security.dll.REMOVED.git-id
deleted file mode 100644
index 74df7a692f..0000000000
--- a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Security.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-7db2447256a75befb73a1f986c2a83808086ccb4
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Configuration.dll.REMOVED.git-id
deleted file mode 100644
index ef66e48d80..0000000000
--- a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Configuration.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-c9e4f0a11e45ac3c153c2a636d3ba3768a2766d2
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Core.dll.REMOVED.git-id
deleted file mode 100644
index 46be39d414..0000000000
--- a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Core.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-b2d1d12c815dd2731ceb7238b8de888ec1dc4427
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.IO.Compression.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.IO.Compression.dll.REMOVED.git-id
deleted file mode 100644
index a841d59ba6..0000000000
--- a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.IO.Compression.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-d97bbdb4e0657d02c39782f54edf8dc4467b1b92
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Numerics.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Numerics.dll.REMOVED.git-id
deleted file mode 100644
index 990a91d170..0000000000
--- a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Numerics.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-b3a0572d70584537d9b177e4afe63f7bb6ca3d5c
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.dll.REMOVED.git-id
deleted file mode 100644
index 9aa6db03d5..0000000000
--- a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-e9ae2f2451e01d5135e74708e64d84c6c9107114
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.dll.REMOVED.git-id
deleted file mode 100644
index 4d39f88a2b..0000000000
--- a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-fdd96f02a656ffe6e476fde83e4774bf4827619b
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mcs.exe.REMOVED.git-id b/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mcs.exe.REMOVED.git-id
deleted file mode 100644
index 57907a6470..0000000000
--- a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mcs.exe.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-81565efe2b0412f45e6703253e792f68b4fcf8f7
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mscorlib.dll.REMOVED.git-id
deleted file mode 100644
index 1212af84f8..0000000000
--- a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mscorlib.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-cf9041d8696b6f8d91bb0e5ce9e739575de742cf
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Collections.Concurrent.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Collections.Concurrent.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Collections.Concurrent.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Collections.Concurrent.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Collections.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Collections.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Collections.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Collections.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.Debug.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.Debug.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.Debug.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.Debug.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.FileVersionInfo.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.FileVersionInfo.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.FileVersionInfo.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.FileVersionInfo.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.Tools.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.Tools.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.Tools.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.Tools.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Dynamic.Runtime.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Dynamic.Runtime.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Dynamic.Runtime.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Dynamic.Runtime.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Globalization.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Globalization.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Globalization.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Globalization.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.FileSystem.Primitives.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.FileSystem.Primitives.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.FileSystem.Primitives.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.FileSystem.Primitives.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.FileSystem.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.FileSystem.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.FileSystem.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.FileSystem.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Linq.Expressions.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Linq.Expressions.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Linq.Expressions.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Linq.Expressions.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Linq.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Linq.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Linq.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Linq.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.Extensions.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.Extensions.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.Extensions.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.Extensions.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.Primitives.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.Primitives.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.Primitives.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.Primitives.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Resources.ResourceManager.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Resources.ResourceManager.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Resources.ResourceManager.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Resources.ResourceManager.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.Extensions.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.Extensions.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.Extensions.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.Extensions.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.InteropServices.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.InteropServices.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.InteropServices.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.InteropServices.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.Numerics.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.Numerics.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.Numerics.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.Numerics.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Security.Cryptography.Algorithms.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Security.Cryptography.Algorithms.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Security.Cryptography.Algorithms.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Security.Cryptography.Algorithms.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Security.Cryptography.Primitives.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Security.Cryptography.Primitives.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Security.Cryptography.Primitives.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Security.Cryptography.Primitives.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.CodePages.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.CodePages.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.CodePages.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.CodePages.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.Extensions.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.Extensions.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.Extensions.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.Extensions.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.Tasks.Parallel.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.Tasks.Parallel.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.Tasks.Parallel.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.Tasks.Parallel.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.Tasks.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.Tasks.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.Tasks.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.Tasks.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.ValueTuple.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.ValueTuple.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.ValueTuple.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.ValueTuple.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Xml.ReaderWriter.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Xml.ReaderWriter.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Xml.ReaderWriter.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Xml.ReaderWriter.dll
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Xml.XDocument.dll b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Xml.XDocument.dll
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Xml.XDocument.dll
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Xml.XDocument.dll
diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/netstandard.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/netstandard.dll.REMOVED.git-id
new file mode 100644
index 0000000000..c1b6653057
--- /dev/null
+++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/netstandard.dll.REMOVED.git-id
@@ -0,0 +1 @@
+1ff46092b9a120eb841c522b31e0e90e291874fe
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Cecil.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Cecil.dll.REMOVED.git-id
new file mode 100644
index 0000000000..1e92b9e74a
--- /dev/null
+++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Cecil.dll.REMOVED.git-id
@@ -0,0 +1 @@
+c835199ef4f799c5ea6f316c148249ab88cede2a
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id
new file mode 100644
index 0000000000..62534ee432
--- /dev/null
+++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id
@@ -0,0 +1 @@
+10c199f6273088a52230ffe5240dab06dc79ef6a
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id
new file mode 100644
index 0000000000..89473e8e0a
--- /dev/null
+++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id
@@ -0,0 +1 @@
+d7c75a5161e4dc77ff72514f81e5bcfee1f66f18
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id
new file mode 100644
index 0000000000..d783e90e06
--- /dev/null
+++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id
@@ -0,0 +1 @@
+97a131da135cdb88e3070994bfcb405182f0cc23
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id
new file mode 100644
index 0000000000..9eb794c682
--- /dev/null
+++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id
@@ -0,0 +1 @@
+5090147e0bd6549ca5cbf10241cacd11d023d17c
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id
new file mode 100644
index 0000000000..7ad0ca9687
--- /dev/null
+++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id
@@ -0,0 +1 @@
+3529d3fc8f191980ad92d1191106ad14ea1e6f0b
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Security.dll.REMOVED.git-id
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Security.dll.REMOVED.git-id
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Security.dll.REMOVED.git-id
diff --git a/mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.Linq.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.Linq.dll.REMOVED.git-id
similarity index 100%
rename from mcs/class/lib/monolite-unix/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.Linq.dll.REMOVED.git-id
rename to mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.Linq.dll.REMOVED.git-id
diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id
new file mode 100644
index 0000000000..4ade6a3678
--- /dev/null
+++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id
@@ -0,0 +1 @@
+5bf7ee680fde34b85692b0dfd2698af889ab8767
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.dll.REMOVED.git-id
new file mode 100644
index 0000000000..bbe262d302
--- /dev/null
+++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/System.dll.REMOVED.git-id
@@ -0,0 +1 @@
+444cfb43e9d19732c08dfc47c74331d659aabd72
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id
new file mode 100644
index 0000000000..0bd014855b
--- /dev/null
+++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id
@@ -0,0 +1 @@
+4f01f6898ed1815cc48192ace724a80bcce666f8
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id
new file mode 100644
index 0000000000..96aaab6f39
--- /dev/null
+++ b/mcs/class/lib/monolite-unix/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id
@@ -0,0 +1 @@
+ea565b946160f2dab6d14029d989862bb8ad1293
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/netstandard.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/netstandard.dll.REMOVED.git-id
deleted file mode 100644
index e0103a2a1e..0000000000
--- a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/netstandard.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-56458cedc0a306d35e8a68743d493b8814d3169d
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Cecil.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Cecil.dll.REMOVED.git-id
deleted file mode 100644
index 306cb0fa83..0000000000
--- a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Cecil.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-a59e995fac121cfdd11ce0d927c7d3b506365f17
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Security.dll.REMOVED.git-id
deleted file mode 100644
index 74df7a692f..0000000000
--- a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Mono.Security.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-7db2447256a75befb73a1f986c2a83808086ccb4
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Configuration.dll.REMOVED.git-id
deleted file mode 100644
index ef66e48d80..0000000000
--- a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Configuration.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-c9e4f0a11e45ac3c153c2a636d3ba3768a2766d2
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Core.dll.REMOVED.git-id
deleted file mode 100644
index dc7c54bb68..0000000000
--- a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Core.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-7be770041cc663cde7e2b4a1bc18977580b045b0
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.IO.Compression.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.IO.Compression.dll.REMOVED.git-id
deleted file mode 100644
index a841d59ba6..0000000000
--- a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.IO.Compression.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-d97bbdb4e0657d02c39782f54edf8dc4467b1b92
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Numerics.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Numerics.dll.REMOVED.git-id
deleted file mode 100644
index 990a91d170..0000000000
--- a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Numerics.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-b3a0572d70584537d9b177e4afe63f7bb6ca3d5c
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.dll.REMOVED.git-id
deleted file mode 100644
index 9aa6db03d5..0000000000
--- a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-e9ae2f2451e01d5135e74708e64d84c6c9107114
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.dll.REMOVED.git-id
deleted file mode 100644
index 4d39f88a2b..0000000000
--- a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-fdd96f02a656ffe6e476fde83e4774bf4827619b
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mcs.exe.REMOVED.git-id b/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mcs.exe.REMOVED.git-id
deleted file mode 100644
index 57907a6470..0000000000
--- a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mcs.exe.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-81565efe2b0412f45e6703253e792f68b4fcf8f7
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mscorlib.dll.REMOVED.git-id
deleted file mode 100644
index 399c9d43e7..0000000000
--- a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/mscorlib.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-5dbdcb800f29d2482c0d7ca1644fb3d37a4150ec
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Collections.Concurrent.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Collections.Concurrent.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Collections.Concurrent.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Collections.Concurrent.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Collections.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Collections.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Collections.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Collections.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.Debug.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.Debug.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.Debug.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.Debug.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.FileVersionInfo.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.FileVersionInfo.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.FileVersionInfo.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.FileVersionInfo.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.Tools.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.Tools.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Diagnostics.Tools.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Diagnostics.Tools.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Dynamic.Runtime.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Dynamic.Runtime.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Dynamic.Runtime.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Dynamic.Runtime.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Globalization.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Globalization.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Globalization.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Globalization.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.FileSystem.Primitives.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.FileSystem.Primitives.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.FileSystem.Primitives.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.FileSystem.Primitives.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.FileSystem.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.FileSystem.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.FileSystem.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.FileSystem.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.IO.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.IO.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Linq.Expressions.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Linq.Expressions.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Linq.Expressions.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Linq.Expressions.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Linq.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Linq.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Linq.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Linq.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.Extensions.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.Extensions.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.Extensions.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.Extensions.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.Primitives.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.Primitives.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.Primitives.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.Primitives.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Reflection.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Reflection.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Resources.ResourceManager.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Resources.ResourceManager.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Resources.ResourceManager.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Resources.ResourceManager.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.Extensions.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.Extensions.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.Extensions.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.Extensions.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.InteropServices.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.InteropServices.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.InteropServices.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.InteropServices.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.Numerics.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.Numerics.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.Numerics.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.Numerics.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Runtime.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Runtime.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Security.Cryptography.Algorithms.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Security.Cryptography.Algorithms.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Security.Cryptography.Algorithms.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Security.Cryptography.Algorithms.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Security.Cryptography.Primitives.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Security.Cryptography.Primitives.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Security.Cryptography.Primitives.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Security.Cryptography.Primitives.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.CodePages.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.CodePages.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.CodePages.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.CodePages.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.Extensions.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.Extensions.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.Extensions.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.Extensions.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Text.Encoding.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Text.Encoding.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.Tasks.Parallel.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.Tasks.Parallel.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.Tasks.Parallel.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.Tasks.Parallel.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.Tasks.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.Tasks.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.Tasks.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.Tasks.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Threading.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Threading.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.ValueTuple.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.ValueTuple.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.ValueTuple.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.ValueTuple.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Xml.ReaderWriter.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Xml.ReaderWriter.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Xml.ReaderWriter.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Xml.ReaderWriter.dll
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Xml.XDocument.dll b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Xml.XDocument.dll
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/Facades/System.Xml.XDocument.dll
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/System.Xml.XDocument.dll
diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/netstandard.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/netstandard.dll.REMOVED.git-id
new file mode 100644
index 0000000000..c1b6653057
--- /dev/null
+++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Facades/netstandard.dll.REMOVED.git-id
@@ -0,0 +1 @@
+1ff46092b9a120eb841c522b31e0e90e291874fe
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Cecil.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Cecil.dll.REMOVED.git-id
new file mode 100644
index 0000000000..1e92b9e74a
--- /dev/null
+++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Cecil.dll.REMOVED.git-id
@@ -0,0 +1 @@
+c835199ef4f799c5ea6f316c148249ab88cede2a
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id
new file mode 100644
index 0000000000..62534ee432
--- /dev/null
+++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/Mono.Security.dll.REMOVED.git-id
@@ -0,0 +1 @@
+10c199f6273088a52230ffe5240dab06dc79ef6a
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id
new file mode 100644
index 0000000000..89473e8e0a
--- /dev/null
+++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Configuration.dll.REMOVED.git-id
@@ -0,0 +1 @@
+d7c75a5161e4dc77ff72514f81e5bcfee1f66f18
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id
new file mode 100644
index 0000000000..cf53c6297f
--- /dev/null
+++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Core.dll.REMOVED.git-id
@@ -0,0 +1 @@
+3632d2cb0f353da9f0afa80bf2c3eae827386ab5
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id
new file mode 100644
index 0000000000..9eb794c682
--- /dev/null
+++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.IO.Compression.dll.REMOVED.git-id
@@ -0,0 +1 @@
+5090147e0bd6549ca5cbf10241cacd11d023d17c
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id
new file mode 100644
index 0000000000..7ad0ca9687
--- /dev/null
+++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Numerics.dll.REMOVED.git-id
@@ -0,0 +1 @@
+3529d3fc8f191980ad92d1191106ad14ea1e6f0b
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Security.dll.REMOVED.git-id
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Security.dll.REMOVED.git-id
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Security.dll.REMOVED.git-id
diff --git a/mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.Linq.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.Linq.dll.REMOVED.git-id
similarity index 100%
rename from mcs/class/lib/monolite-win32/A144A63D-652C-4CCF-A9EE-8E5A091547F1/System.Xml.Linq.dll.REMOVED.git-id
rename to mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.Linq.dll.REMOVED.git-id
diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id
new file mode 100644
index 0000000000..4ade6a3678
--- /dev/null
+++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.Xml.dll.REMOVED.git-id
@@ -0,0 +1 @@
+5bf7ee680fde34b85692b0dfd2698af889ab8767
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.dll.REMOVED.git-id
new file mode 100644
index 0000000000..bbe262d302
--- /dev/null
+++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/System.dll.REMOVED.git-id
@@ -0,0 +1 @@
+444cfb43e9d19732c08dfc47c74331d659aabd72
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id
new file mode 100644
index 0000000000..0bd014855b
--- /dev/null
+++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/mcs.exe.REMOVED.git-id
@@ -0,0 +1 @@
+4f01f6898ed1815cc48192ace724a80bcce666f8
\ No newline at end of file
diff --git a/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id
new file mode 100644
index 0000000000..0225f6afb0
--- /dev/null
+++ b/mcs/class/lib/monolite-win32/ABB721D6-116A-4555-B4FD-9248146D2051/mscorlib.dll.REMOVED.git-id
@@ -0,0 +1 @@
+07c246ad5b11f8c795f696149f3059cc86a761cd
\ No newline at end of file
diff --git a/mcs/class/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/PrimitiveDataContract.cs b/mcs/class/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/PrimitiveDataContract.cs
index e7a7cbd1b3..6feb1ee8c9 100644
--- a/mcs/class/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/PrimitiveDataContract.cs
+++ b/mcs/class/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/PrimitiveDataContract.cs
@@ -10,6 +10,9 @@ namespace System.Runtime.Serialization
using System.Reflection;
using System.Xml;
using System.Security;
+#if MONO
+ using System.Runtime.CompilerServices;
+#endif
#if USE_REFEMIT
public abstract class PrimitiveDataContract : DataContract
@@ -70,6 +73,35 @@ namespace System.Runtime.Serialization
internal MethodInfo XmlFormatWriterMethod
{
+#if MONO
+ [PreserveDependency ("WriteChar", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteBoolean", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteSignedByte", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteUnsignedByte", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteShort", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteUnsignedShort", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteInt", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteUnsignedInt", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteLong", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteUnsignedLong", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteFloat", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteDouble", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteDecimal", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteDateTime", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteString", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteBase64", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteAnyType", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteTimeSpan", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteGuid", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteUri", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteQName", "System.Runtime.Serialization.XmlWriterDelegator")]
+
+ [PreserveDependency ("WriteString", "System.Runtime.Serialization.XmlObjectSerializerWriteContext")]
+ [PreserveDependency ("WriteBase64", "System.Runtime.Serialization.XmlObjectSerializerWriteContext")]
+ [PreserveDependency ("WriteAnyType", "System.Runtime.Serialization.XmlObjectSerializerWriteContext")]
+ [PreserveDependency ("WriteUri", "System.Runtime.Serialization.XmlObjectSerializerWriteContext")]
+ [PreserveDependency ("WriteQName", "System.Runtime.Serialization.XmlObjectSerializerWriteContext")]
+#endif
[Fx.Tag.SecurityNote(Critical = "Fetches the critical XmlFormatWriterMethod property.",
Safe = "XmlFormatWriterMethod only needs to be protected for write; initialized in getter if null.")]
[SecuritySafeCritical]
@@ -88,6 +120,35 @@ namespace System.Runtime.Serialization
internal MethodInfo XmlFormatContentWriterMethod
{
+#if MONO
+ [PreserveDependency ("WriteChar", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteBoolean", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteSignedByte", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteUnsignedByte", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteShort", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteUnsignedShort", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteInt", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteUnsignedInt", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteLong", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteUnsignedLong", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteFloat", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteDouble", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteDecimal", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteDateTime", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteString", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteBase64", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteAnyType", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteTimeSpan", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteGuid", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteUri", "System.Runtime.Serialization.XmlWriterDelegator")]
+ [PreserveDependency ("WriteQName", "System.Runtime.Serialization.XmlWriterDelegator")]
+
+ [PreserveDependency ("WriteString", "System.Runtime.Serialization.XmlObjectSerializerWriteContext")]
+ [PreserveDependency ("WriteBase64", "System.Runtime.Serialization.XmlObjectSerializerWriteContext")]
+ [PreserveDependency ("WriteAnyType", "System.Runtime.Serialization.XmlObjectSerializerWriteContext")]
+ [PreserveDependency ("WriteUri", "System.Runtime.Serialization.XmlObjectSerializerWriteContext")]
+ [PreserveDependency ("WriteQName", "System.Runtime.Serialization.XmlObjectSerializerWriteContext")]
+#endif
[Fx.Tag.SecurityNote(Critical = "Fetches the critical XmlFormatContentWriterMethod property.",
Safe = "XmlFormatContentWriterMethod only needs to be protected for write; initialized in getter if null.")]
[SecuritySafeCritical]
@@ -106,6 +167,29 @@ namespace System.Runtime.Serialization
internal MethodInfo XmlFormatReaderMethod
{
+#if MONO
+ [PreserveDependency ("ReadElementContentAsChar", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsBoolean", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsSignedByte", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsUnsignedByte", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsShort", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsUnsignedShort", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsInt", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsUnsignedInt", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsLong", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsUnsignedLong", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsFloat", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsDouble", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsDecimal", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsDateTime", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsString", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsBase64", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsAnyType", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsTimeSpan", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsGuid", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsUri", "System.Runtime.Serialization.XmlReaderDelegator")]
+ [PreserveDependency ("ReadElementContentAsQName", "System.Runtime.Serialization.XmlReaderDelegator")]
+#endif
[Fx.Tag.SecurityNote(Critical = "Fetches the critical XmlFormatReaderMethod property.",
Safe = "XmlFormatReaderMethod only needs to be protected for write; initialized in getter if null.")]
[SecuritySafeCritical]
diff --git a/mcs/class/referencesource/System/net/System/Net/Sockets/Socket.cs.REMOVED.git-id b/mcs/class/referencesource/System/net/System/Net/Sockets/Socket.cs.REMOVED.git-id
index 15fbc77927..be183c0d0b 100644
--- a/mcs/class/referencesource/System/net/System/Net/Sockets/Socket.cs.REMOVED.git-id
+++ b/mcs/class/referencesource/System/net/System/Net/Sockets/Socket.cs.REMOVED.git-id
@@ -1 +1 @@
-78673562a9c1ebd8895e1f6d6fca65d9b978c4d7
\ No newline at end of file
+be9e666ae292ad56ce00e255ef9b47967f79d9f1
\ No newline at end of file
diff --git a/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/YieldAwaitable.cs b/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/YieldAwaitable.cs
index 9a0d1f5aed..08b6de8ceb 100644
--- a/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/YieldAwaitable.cs
+++ b/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/YieldAwaitable.cs
@@ -42,7 +42,7 @@ namespace System.Runtime.CompilerServices
/// Provides an awaitable context for switching into a target environment.
/// This type is intended for compiler use only.
- public struct YieldAwaitable
+ public readonly struct YieldAwaitable
{
/// Gets an awaiter for this .
/// An awaiter for this awaitable.
@@ -52,7 +52,7 @@ namespace System.Runtime.CompilerServices
/// Provides an awaiter that switches into a target environment.
/// This type is intended for compiler use only.
[HostProtection(Synchronization = true, ExternalThreading = true)]
- public struct YieldAwaiter : ICriticalNotifyCompletion
+ public readonly struct YieldAwaiter : ICriticalNotifyCompletion
{
/// Gets whether a yield is not required.
/// This property is intended for compiler user rather than use directly in code.
diff --git a/mcs/jay/Makefile b/mcs/jay/Makefile
index 70f6602e45..1af6867ad7 100644
--- a/mcs/jay/Makefile
+++ b/mcs/jay/Makefile
@@ -46,8 +46,17 @@ dist-local: dist-default
test-local run-test-local run-test-ondotnet-local doc-update-local:
+ifndef ENABLE_MSVC_ONLY
+
jay: $(sources:.c=.o)
$(CCOMPILE) $(LDFLAGS) -o $@ $^
%.o: %.c
$(CCOMPILE) $(JAY_CFLAGS) -c -o $@ $^
+
+else # !ENABLE_MSVC_ONLY
+
+jay:
+ make -C $(topdir)/../msvc jay
+
+endif # !ENABLE_MSVC_ONLY
diff --git a/mcs/packages/Makefile b/mcs/packages/Makefile
index c1e6d36709..342cdc62df 100644
--- a/mcs/packages/Makefile
+++ b/mcs/packages/Makefile
@@ -30,7 +30,6 @@ ROSLYN_FILES_TO_COPY_FOR_MSBUILD = \
$(ROSLYN_CSC_DIR)/Microsoft.Build.Tasks.CodeAnalysis.dll \
$(ROSLYN_CSC_DIR)/Microsoft.CSharp.Core.targets \
$(ROSLYN_CSC_DIR)/Microsoft.Managed.Core.targets \
- $(ROSLYN_CSC_DIR)/Microsoft.Managed.EditorConfig.targets \
$(ROSLYN_CSC_DIR)/Microsoft.VisualBasic.Core.targets
DISTFILES = $(ROSLYN_FILES_FOR_MONO) $(ROSLYN_FILES_TO_COPY_FOR_MSBUILD) csi-test.csx
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.Build.Tasks.CodeAnalysis.dll.REMOVED.git-id b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.Build.Tasks.CodeAnalysis.dll.REMOVED.git-id
deleted file mode 100644
index aa87f64c76..0000000000
--- a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.Build.Tasks.CodeAnalysis.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-ddfb2a7c40933dc3532392c1e6ed0f721ba1b69c
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.CodeAnalysis.CSharp.dll.REMOVED.git-id b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.CodeAnalysis.CSharp.dll.REMOVED.git-id
deleted file mode 100644
index 9c6e2f79d9..0000000000
--- a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.CodeAnalysis.CSharp.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-d4c701f5ef5e0c47d66c3701de98dfb94c3863c2
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.CodeAnalysis.Scripting.dll.REMOVED.git-id b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.CodeAnalysis.Scripting.dll.REMOVED.git-id
deleted file mode 100644
index fc4a51a6b4..0000000000
--- a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.CodeAnalysis.Scripting.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-2741119d779b36812d9c680a62391635c1bc0bbc
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.CodeAnalysis.VisualBasic.dll.REMOVED.git-id b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.CodeAnalysis.VisualBasic.dll.REMOVED.git-id
deleted file mode 100644
index 34e81a63ae..0000000000
--- a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.CodeAnalysis.VisualBasic.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-cc40681a92642d70544e5a8338fcf191c15e7f91
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.CodeAnalysis.dll.REMOVED.git-id b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.CodeAnalysis.dll.REMOVED.git-id
deleted file mode 100644
index 9611851cbb..0000000000
--- a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.CodeAnalysis.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-ae8d6064e1a9d642df02483b5e610b18bb57fb6f
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.Managed.EditorConfig.targets b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.Managed.EditorConfig.targets
deleted file mode 100644
index d659d55470..0000000000
--- a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/Microsoft.Managed.EditorConfig.targets
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
- <_AllDirectoriesAbove Include="@(Compile->GetPathsOfAllDirectoriesAbove())" Condition="'$(DiscoverEditorConfigFiles)' != 'false'" />
-
-
-
-
-
-
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.Build.Tasks.CodeAnalysis.dll.REMOVED.git-id b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.Build.Tasks.CodeAnalysis.dll.REMOVED.git-id
new file mode 100644
index 0000000000..5536b0dba4
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.Build.Tasks.CodeAnalysis.dll.REMOVED.git-id
@@ -0,0 +1 @@
+14c4ba0a932e7d62d715db026dde8455d777a8ea
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CSharp.Core.targets b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CSharp.Core.targets
new file mode 100644
index 0000000000..ed91b90b4f
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CSharp.Core.targets
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+ 7.3
+ $(MaxSupportedLangVersion)
+
+
+
+
+
+ $(NoWarn);1701;1702
+
+
+
+
+ $(NoWarn);2008
+
+
+
+
+ $(AppConfig)
+
+
+ $(IntermediateOutputPath)$(TargetName).compile.pdb
+
+
+
+
+
+
+
+
+ <_CoreCompileResourceInputs Remove="@(_CoreCompileResourceInputs)" />
+
+
+
+
+
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.CSharp.Scripting.dll b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.CSharp.Scripting.dll
new file mode 100644
index 0000000000..452298dd13
Binary files /dev/null and b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.CSharp.Scripting.dll differ
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.CSharp.dll.REMOVED.git-id b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.CSharp.dll.REMOVED.git-id
new file mode 100644
index 0000000000..e19172eb8d
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.CSharp.dll.REMOVED.git-id
@@ -0,0 +1 @@
+d981a20baaac679f86733a8e18d3d952e2e95ba3
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.Scripting.dll.REMOVED.git-id b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.Scripting.dll.REMOVED.git-id
new file mode 100644
index 0000000000..0c98b8a3ed
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.Scripting.dll.REMOVED.git-id
@@ -0,0 +1 @@
+28a3e4df48150babf00b64489910031d0226e8c1
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.VisualBasic.dll.REMOVED.git-id b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.VisualBasic.dll.REMOVED.git-id
new file mode 100644
index 0000000000..3b79397f00
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.VisualBasic.dll.REMOVED.git-id
@@ -0,0 +1 @@
+d2f4cf7f9ecbe4b3a9f3ee6cef1ba8e236b037a4
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.dll.REMOVED.git-id b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.dll.REMOVED.git-id
new file mode 100644
index 0000000000..6c42f4ca02
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.dll.REMOVED.git-id
@@ -0,0 +1 @@
+6f35dca52fcb84d0fc5489e78b50a8e4be40a68a
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.Managed.Core.targets b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.Managed.Core.targets
new file mode 100644
index 0000000000..c87a6590d1
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.Managed.Core.targets
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+ <_AllDirectoriesAbove Include="@(Compile->GetPathsOfAllDirectoriesAbove())" Condition="'$(DiscoverEditorConfigFiles)' != 'false'" />
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+ <_MappedSourceRoot Remove="@(_MappedSourceRoot)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ <_TopLevelSourceRoot Include="@(SourceRoot)" Condition="'%(SourceRoot.NestedRoot)' == ''"/>
+
+
+
+
+
+
+ ,$(PathMap)
+
+
+ @(_TopLevelSourceRoot->'%(Identity)=%(MappedPath)', ',')$(PathMap)
+
+
+
+
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.VisualBasic.Core.targets b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.VisualBasic.Core.targets
new file mode 100644
index 0000000000..d9e5eaa1c8
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.VisualBasic.Core.targets
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+ <_NoWarnings Condition="'$(WarningLevel)' == '0'">true
+ <_NoWarnings Condition="'$(WarningLevel)' == '1'">false
+
+
+
+
+ $(IntermediateOutputPath)$(TargetName).compile.pdb
+
+
+
+
+
+
+
+ <_CoreCompileResourceInputs Remove="@(_CoreCompileResourceInputs)" />
+
+
+
+
+
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/System.Collections.Immutable.dll.REMOVED.git-id b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/System.Collections.Immutable.dll.REMOVED.git-id
new file mode 100644
index 0000000000..8b2bc9cb91
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/System.Collections.Immutable.dll.REMOVED.git-id
@@ -0,0 +1 @@
+049149f17929322dd246d994780d0399a24cf90f
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/System.Memory.dll.REMOVED.git-id b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/System.Memory.dll.REMOVED.git-id
new file mode 100644
index 0000000000..202d1b1e2f
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/System.Memory.dll.REMOVED.git-id
@@ -0,0 +1 @@
+bdfc501e9647719549793297acb072d33067d4e5
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/System.Reflection.Metadata.dll.REMOVED.git-id b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/System.Reflection.Metadata.dll.REMOVED.git-id
new file mode 100644
index 0000000000..4ef79f39fb
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/System.Reflection.Metadata.dll.REMOVED.git-id
@@ -0,0 +1 @@
+52082366b0a69847cb0e6351ad4ac3690746f6b5
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/System.Runtime.CompilerServices.Unsafe.dll b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/System.Runtime.CompilerServices.Unsafe.dll
new file mode 100644
index 0000000000..3156239266
Binary files /dev/null and b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/System.Runtime.CompilerServices.Unsafe.dll differ
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/System.Threading.Tasks.Extensions.dll b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/System.Threading.Tasks.Extensions.dll
new file mode 100644
index 0000000000..e059050bb2
Binary files /dev/null and b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/System.Threading.Tasks.Extensions.dll differ
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/VBCSCompiler.exe b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/VBCSCompiler.exe
new file mode 100644
index 0000000000..d0c3890260
Binary files /dev/null and b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/VBCSCompiler.exe differ
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/VBCSCompiler.exe.config b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/VBCSCompiler.exe.config
new file mode 100644
index 0000000000..0715c1248c
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/VBCSCompiler.exe.config
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csc.exe b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csc.exe
new file mode 100644
index 0000000000..346a320519
Binary files /dev/null and b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csc.exe differ
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csc.exe.config b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csc.exe.config
new file mode 100644
index 0000000000..910bda51fc
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csc.exe.config
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csc.rsp b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csc.rsp
new file mode 100644
index 0000000000..ce72ac60cf
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csc.rsp
@@ -0,0 +1,46 @@
+# Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+# This file contains command-line options that the C#
+# command line compiler (CSC) will process as part
+# of every compilation, unless the "/noconfig" option
+# is specified.
+
+# Reference the common Framework libraries
+/r:Accessibility.dll
+/r:Microsoft.CSharp.dll
+/r:System.Configuration.dll
+/r:System.Configuration.Install.dll
+/r:System.Core.dll
+/r:System.Data.dll
+/r:System.Data.DataSetExtensions.dll
+/r:System.Data.Linq.dll
+/r:System.Data.OracleClient.dll
+/r:System.Deployment.dll
+/r:System.Design.dll
+/r:System.DirectoryServices.dll
+/r:System.dll
+/r:System.Drawing.Design.dll
+/r:System.Drawing.dll
+/r:System.EnterpriseServices.dll
+/r:System.Management.dll
+/r:System.Messaging.dll
+/r:System.Runtime.Remoting.dll
+/r:System.Runtime.Serialization.dll
+/r:System.Runtime.Serialization.Formatters.Soap.dll
+/r:System.Security.dll
+/r:System.ServiceModel.dll
+/r:System.ServiceModel.Web.dll
+/r:System.ServiceProcess.dll
+/r:System.Transactions.dll
+/r:System.Web.dll
+/r:System.Web.Extensions.Design.dll
+/r:System.Web.Extensions.dll
+/r:System.Web.Mobile.dll
+/r:System.Web.RegularExpressions.dll
+/r:System.Web.Services.dll
+/r:System.Windows.Forms.dll
+/r:System.Workflow.Activities.dll
+/r:System.Workflow.ComponentModel.dll
+/r:System.Workflow.Runtime.dll
+/r:System.Xml.dll
+/r:System.Xml.Linq.dll
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csi.exe b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csi.exe
new file mode 100644
index 0000000000..6c9a8cce40
Binary files /dev/null and b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csi.exe differ
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csi.exe.config b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csi.exe.config
new file mode 100644
index 0000000000..5340b6791e
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csi.exe.config
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csi.rsp b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csi.rsp
new file mode 100644
index 0000000000..f012133ba5
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csi.rsp
@@ -0,0 +1,15 @@
+/r:System.dll
+/r:System.Core.dll
+/r:Microsoft.CSharp.dll
+/r:Facades/System.Runtime.dll
+/r:Facades/netstandard.dll
+/u:System
+/u:System.IO
+/u:System.Collections.Generic
+/u:System.Console
+/u:System.Diagnostics
+/u:System.Dynamic
+/u:System.Linq
+/u:System.Linq.Expressions
+/u:System.Text
+/u:System.Threading.Tasks
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/vbc.exe b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/vbc.exe
new file mode 100644
index 0000000000..2f326a8c2d
Binary files /dev/null and b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/vbc.exe differ
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/vbc.exe.config b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/vbc.exe.config
new file mode 100644
index 0000000000..78ae05085a
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/vbc.exe.config
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/vbc.rsp b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/vbc.rsp
new file mode 100644
index 0000000000..473404dad7
--- /dev/null
+++ b/mcs/packages/mnt/jenkins/workspace/release-tarball-mono/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/vbc.rsp
@@ -0,0 +1,55 @@
+# Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+# This file contains command-line options that the VB
+# command line compiler (VBC) will process as part
+# of every compilation, unless the "/noconfig" option
+# is specified.
+
+# Reference the common Framework libraries
+/r:Accessibility.dll
+/r:System.Configuration.dll
+/r:System.Configuration.Install.dll
+/r:System.Data.dll
+/r:System.Data.OracleClient.dll
+/r:System.Deployment.dll
+/r:System.Design.dll
+/r:System.DirectoryServices.dll
+/r:System.dll
+/r:System.Drawing.Design.dll
+/r:System.Drawing.dll
+/r:System.EnterpriseServices.dll
+/r:System.Management.dll
+/r:System.Messaging.dll
+/r:System.Runtime.Remoting.dll
+/r:System.Runtime.Serialization.Formatters.Soap.dll
+/r:System.Security.dll
+/r:System.ServiceProcess.dll
+/r:System.Transactions.dll
+/r:System.Web.dll
+/r:System.Web.Mobile.dll
+/r:System.Web.RegularExpressions.dll
+/r:System.Web.Services.dll
+/r:System.Windows.Forms.dll
+/r:System.Xml.dll
+
+/r:System.Workflow.Activities.dll
+/r:System.Workflow.ComponentModel.dll
+/r:System.Workflow.Runtime.dll
+/r:System.Runtime.Serialization.dll
+/r:System.ServiceModel.dll
+
+/r:System.Core.dll
+/r:System.Xml.Linq.dll
+/r:System.Data.Linq.dll
+/r:System.Data.DataSetExtensions.dll
+/r:System.Web.Extensions.dll
+/r:System.Web.Extensions.Design.dll
+/r:System.ServiceModel.Web.dll
+
+# Import System and Microsoft.VisualBasic
+/imports:System
+/imports:Microsoft.VisualBasic
+/imports:System.Linq
+/imports:System.Xml.Linq
+
+/optioninfer+
diff --git a/mcs/tools/aprofutil/Program.cs b/mcs/tools/aprofutil/Program.cs
index 12972eb734..43d0b987e3 100644
--- a/mcs/tools/aprofutil/Program.cs
+++ b/mcs/tools/aprofutil/Program.cs
@@ -4,6 +4,7 @@ using System.IO;
using System.Net.Sockets;
using System.Text.RegularExpressions;
using Mono.Options;
+using System.Linq;
using Mono.Profiler.Aot;
using static System.Console;
@@ -20,8 +21,14 @@ namespace aotprofiletool {
static bool Verbose;
static Regex FilterMethod;
+ static Regex SkipMethod;
static Regex FilterModule;
+ static Regex SkipModule;
static Regex FilterType;
+ static Regex SkipType;
+
+ static int SkipCount = 0;
+ static int TakeCount = int.MaxValue;
static string Output;
@@ -51,14 +58,29 @@ namespace aotprofiletool {
"Set adb socket forwarding for Android",
v => AdbForward = true },
{ "filter-method=",
- "Filter by method with regex {VALUE}",
+ "Include by method with regex {VALUE}",
v => FilterMethod = new Regex (v) },
+ { "skip-method=",
+ "Exclude by method with regex {VALUE}",
+ v => SkipMethod = new Regex (v) },
{ "filter-module=",
- "Filter by module with regex {VALUE}",
+ "Include by module with regex {VALUE}",
v => FilterModule = new Regex (v) },
+ { "skip-module=",
+ "Exclude by module with regex {VALUE}",
+ v => SkipModule = new Regex (v) },
{ "filter-type=",
- "Filter by type with regex {VALUE}",
+ "Include by type with regex {VALUE}",
v => FilterType = new Regex (v) },
+ { "skip-type=",
+ "Exclude by type with regex {VALUE}",
+ v => SkipType = new Regex (v) },
+ { "take-count=",
+ "Take {VALUE} methods that match",
+ v => TakeCount = int.Parse (v) },
+ { "skip-count=",
+ "Skip the first {VALUE} matching methods",
+ v => SkipCount = int.Parse (v) },
{ "m|methods",
"Show methods in the profile",
v => Methods = true },
@@ -182,12 +204,10 @@ namespace aotprofiletool {
ICollection modules = new List (pd.Modules);
if (FilterMethod != null || FilterType != null || FilterModule != null) {
- methods = new List ();
types = new HashSet ();
modules = new HashSet ();
- foreach (var method in pd.Methods) {
-
+ methods = pd.Methods.Where (method => {
var type = method.Type;
var module = type.Module;
@@ -195,24 +215,51 @@ namespace aotprofiletool {
var match = FilterModule.Match (module.ToString ());
if (!match.Success)
- continue;
+ return false;
+ }
+
+ if (SkipModule != null) {
+ var skip = SkipModule.Match (module.ToString ());
+
+ if (skip.Success)
+ return false;
}
if (FilterType != null) {
var match = FilterType.Match (method.Type.ToString ());
if (!match.Success)
- continue;
+ return false;
+ }
+
+ if (SkipType != null) {
+ var skip = SkipType.Match (method.Type.ToString ());
+
+ if (skip.Success)
+ return false;
}
if (FilterMethod != null) {
var match = FilterMethod.Match (method.ToString ());
if (!match.Success)
- continue;
+ return false;
}
- methods.Add (method);
+ if (SkipMethod != null) {
+ var skip = SkipMethod.Match (method.ToString ());
+
+ if (skip.Success)
+ return false;
+ }
+
+ return true;
+ }).Skip (SkipCount).Take (TakeCount).ToList ();
+
+ foreach (var method in methods) {
+ var type = method.Type;
+ var module = type.Module;
+
types.Add (type);
modules.Add (module);
}
diff --git a/mcs/tools/linker/Makefile b/mcs/tools/linker/Makefile
index 9564a1d4d4..e408fab7d6 100644
--- a/mcs/tools/linker/Makefile
+++ b/mcs/tools/linker/Makefile
@@ -27,7 +27,6 @@ TEST_CASES := \
ifdef INCLUDE_DISABLED
TEST_CASES += \
- System.Core/test-queryable-01.cs \
System.Runtime.Serialization/test-dcs-01.cs \
mscorlib/test-marshaling.cs
endif
@@ -41,7 +40,15 @@ endif
ifndef AOT_FRIENDLY_PROFILE
TEST_CASES += \
mscorlib/test-remoting.cs \
- mscorlib/test-reflection.cs
+ mscorlib/test-reflection.cs \
+ System.Core/test-queryable-01.cs \
+ System.Core/test-queryable-02.cs
+endif
+
+ifdef MCS_MODE
+NO_INSTALL=1
+NO_BUILD=1
+NO_TEST=1
endif
TESTS_COMPILER = $(MCS) -nologo -noconfig -unsafe -nostdlib -debug:portable -r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/mscorlib.dll
diff --git a/mcs/tools/linker/monolinker.exe.sources b/mcs/tools/linker/monolinker.exe.sources
index e436b3e03e..0eb2620556 100644
--- a/mcs/tools/linker/monolinker.exe.sources
+++ b/mcs/tools/linker/monolinker.exe.sources
@@ -18,6 +18,7 @@
../../../external/linker/src/linker/Linker/MarkingHelpers.cs
../../../external/linker/src/linker/Linker/MethodAction.cs
../../../external/linker/src/linker/Linker/MethodBodyScanner.cs
+../../../external/linker/src/linker/Linker/OutputException.cs
../../../external/linker/src/linker/Linker/OverrideInformation.cs
../../../external/linker/src/linker/Linker/MethodDefinitionExtensions.cs
../../../external/linker/src/linker/Linker/MethodReferenceExtensions.cs
diff --git a/mcs/tools/mkbundle/bundle-mono-api.inc b/mcs/tools/mkbundle/bundle-mono-api.inc
index 6af254ff09..013e8901ed 100644
--- a/mcs/tools/mkbundle/bundle-mono-api.inc
+++ b/mcs/tools/mkbundle/bundle-mono-api.inc
@@ -19,7 +19,7 @@ typedef struct BundleMonoAPI
void (*mono_register_bundled_assemblies) (const MonoBundledAssembly **assemblies);
void (*mono_register_config_for_assembly) (const char* assembly_name, const char* config_xml);
void (*mono_jit_set_aot_mode) (MonoAotMode mode);
- void (*mono_aot_register_module) (void* aot_info);
+ void (*mono_aot_register_module) (void** aot_info);
void (*mono_config_parse_memory) (const char *buffer);
void (*mono_register_machine_config) (const char *config_xml);
} BundleMonoAPI;
diff --git a/mcs/tools/mkbundle/template_common.inc b/mcs/tools/mkbundle/template_common.inc
index ab0a9a77e4..2f2385b0de 100644
--- a/mcs/tools/mkbundle/template_common.inc
+++ b/mcs/tools/mkbundle/template_common.inc
@@ -49,12 +49,6 @@ validate_api_struct ()
exit (1);
}
-#ifdef USE_DEFAULT_MONO_API_STRUCT
-// We don't export in jit.h
-// So declare here, and get it from mono
-void mono_aot_register_module (void *aot_info);
-#endif // USE_DEFAULT_MONO_API_STRUCT
-
static void
init_default_mono_api_struct ()
{
diff --git a/mk/Makefile.in b/mk/Makefile.in
index 7f3ee7215a..1cfcf564f3 100644
--- a/mk/Makefile.in
+++ b/mk/Makefile.in
@@ -214,6 +214,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
diff --git a/mono/Makefile.in b/mono/Makefile.in
index ac20fa99c4..d9dd3eeba4 100644
--- a/mono/Makefile.in
+++ b/mono/Makefile.in
@@ -274,6 +274,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
diff --git a/mono/arch/Makefile.in b/mono/arch/Makefile.in
index 19b446198a..fc5da7b410 100644
--- a/mono/arch/Makefile.in
+++ b/mono/arch/Makefile.in
@@ -274,6 +274,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
diff --git a/mono/arch/amd64/Makefile.in b/mono/arch/amd64/Makefile.in
index 3aa891a6e4..ecf14698ce 100644
--- a/mono/arch/amd64/Makefile.in
+++ b/mono/arch/amd64/Makefile.in
@@ -215,6 +215,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
diff --git a/mono/arch/amd64/amd64-codegen.h b/mono/arch/amd64/amd64-codegen.h
index 8295a91eb3..7ac86b7180 100644
--- a/mono/arch/amd64/amd64-codegen.h
+++ b/mono/arch/amd64/amd64-codegen.h
@@ -1165,6 +1165,9 @@ typedef union {
#define amd64_sse_prefetch_reg_membase(inst, arg, basereg, disp) emit_sse_reg_membase_op2((inst), (arg), (basereg), (disp), 0x0f, 0x18)
+#define amd64_sse_lzcnt_reg_reg_size(inst, dreg, reg, size) emit_sse_reg_reg_size((inst), (dreg), (reg), 0xf3, 0x0f, 0xbd, (size))
+#define amd64_sse_popcnt_reg_reg_size(inst, dreg, reg, size) emit_sse_reg_reg_size((inst), (dreg), (reg), 0xf3, 0x0f, 0xb8, (size))
+
/* Generated from x86-codegen.h */
#define amd64_breakpoint_size(inst,size) do { x86_breakpoint(inst); } while (0)
diff --git a/mono/arch/arm/Makefile.in b/mono/arch/arm/Makefile.in
index 56849bb4db..430636896f 100644
--- a/mono/arch/arm/Makefile.in
+++ b/mono/arch/arm/Makefile.in
@@ -215,6 +215,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
diff --git a/mono/arch/arm64/Makefile.in b/mono/arch/arm64/Makefile.in
index 58c4eac17f..4693a32a0d 100644
--- a/mono/arch/arm64/Makefile.in
+++ b/mono/arch/arm64/Makefile.in
@@ -215,6 +215,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
diff --git a/mono/arch/mips/Makefile.in b/mono/arch/mips/Makefile.in
index 0593e2e771..8c8ede5094 100644
--- a/mono/arch/mips/Makefile.in
+++ b/mono/arch/mips/Makefile.in
@@ -266,6 +266,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
@@ -529,25 +530,22 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
diff --git a/mono/arch/ppc/Makefile.in b/mono/arch/ppc/Makefile.in
index 40a8decf7a..3b853b5811 100644
--- a/mono/arch/ppc/Makefile.in
+++ b/mono/arch/ppc/Makefile.in
@@ -215,6 +215,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
diff --git a/mono/arch/riscv/Makefile.in b/mono/arch/riscv/Makefile.in
index 97159df6ba..44f9bdc251 100644
--- a/mono/arch/riscv/Makefile.in
+++ b/mono/arch/riscv/Makefile.in
@@ -262,6 +262,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
@@ -551,25 +552,22 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/riscv-codegen-test.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
diff --git a/mono/arch/s390x/Makefile.in b/mono/arch/s390x/Makefile.in
index 94c9b0c733..691eeb9c06 100644
--- a/mono/arch/s390x/Makefile.in
+++ b/mono/arch/s390x/Makefile.in
@@ -260,6 +260,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
@@ -510,25 +511,22 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tramp.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
diff --git a/mono/arch/s390x/s390x-codegen.h b/mono/arch/s390x/s390x-codegen.h
index 12fdd2894e..0980327127 100644
--- a/mono/arch/s390x/s390x-codegen.h
+++ b/mono/arch/s390x/s390x-codegen.h
@@ -991,7 +991,8 @@ typedef struct {
#define S390_VRIa(c,opc,v1,i2,m3) do \
{ \
char rxb = (((v1) > 15) << 7); \
- s390_emit16(c, (((opc) & 0xff00) << 8) | ((v1) << 4)); \
+ int vr1 = ((v1) % 16); \
+ s390_emit16(c, ((opc) & 0xff00) | (vr1 << 4)); \
s390_emit16(c, (i2)); \
s390_emit16(c, (((m3) << 12) | ((rxb) << 8) | ((opc) & 0xff))); \
} while (0)
@@ -999,7 +1000,8 @@ typedef struct {
#define S390_VRIb(c,opc,v1,i2,i3,m4) do \
{ \
char rxb = (((v1) > 15) << 7); \
- s390_emit16(c, (((opc) & 0xff00) << 8) | ((v1) << 4)); \
+ int vr1 = ((v1) % 16); \
+ s390_emit16(c, ((opc) & 0xff00) | (vr1 << 4)); \
s390_emit16(c, (((i2) << 8) | (i3))); \
s390_emit16(c, (((m4) << 12) | ((rxb) << 8) | ((opc) & 0xff))); \
} while (0)
@@ -1008,7 +1010,8 @@ typedef struct {
{ \
char rxb = (((v1) > 15) << 7) | (((v2) > 15) << 6) | \
(((v3) > 15) << 5); \
- s390_emit16(c, (((opc) & 0xff00) << 8) | ((v1) << 4) | ((v2))); \
+ int vr1 = ((v1) % 16), vr3 = ((v3) % 16); \
+ s390_emit16(c, ((opc) & 0xff00) | (vr1 << 4) | (vr3)); \
s390_emit16(c, (v4)); \
s390_emit16(c, (((m4) << 12) | ((rxb) << 8) | ((opc) & 0xff))); \
} while (0)
@@ -1017,15 +1020,17 @@ typedef struct {
{ \
char rxb = (((v1) > 15) << 7) | (((v2) > 15) << 6) | \
(((v3) > 15) << 5); \
- s390_emit16(c, (((opc) & 0xff00) << 8) | ((v1) << 4) | ((v2))); \
- s390_emit16(c, ((v3) << 12) | (i2)); \
+ int vr1 = ((v1) % 16), vr2 = ((v2) % 16), vr3 = ((v3) % 16); \
+ s390_emit16(c, ((opc) & 0xff00) | (vr1 << 4) | (vr2)); \
+ s390_emit16(c, (vr3 << 12) | (i2)); \
s390_emit16(c, (((m5) << 12) | ((rxb) << 8) | ((opc) & 0xff))); \
} while (0)
#define S390_VRIe(c,opc,v1,v2,i3,m4,m5) do \
{ \
char rxb = (((v1) > 15) << 7) | (((v2) > 15) << 6); \
- s390_emit16(c, (((opc) & 0xff00) << 8) | ((v1) << 4) | ((v2))); \
+ int vr1 = ((v1) % 16), vr2 = ((v2) % 16); \
+ s390_emit16(c, ((opc) & 0xff00) | (vr1 << 4) | (vr2)); \
s390_emit16(c, ((i2) << 8) | (m5)); \
s390_emit16(c, (((m4) << 12) | ((rxb) << 8) | ((opc) & 0xff))); \
} while (0)
@@ -1033,7 +1038,8 @@ typedef struct {
#define S390_VRRa(c,opc,v1,v2,m3,m4,m5) do \
{ \
char rxb = (((v1) > 15) << 7) | (((v2) > 15) << 6); \
- s390_emit16(c, (((opc) & 0xff00) << 8) | ((v1) << 4) | ((v2))); \
+ int vr1 = ((v1) % 16), vr2 = ((v2) % 16); \
+ s390_emit16(c, ((opc) & 0xff00) | (vr1 << 4) | (vr2)); \
s390_emit16(c, ((m5) << 4) | (m4)); \
s390_emit16(c, (((m3) << 12) | ((rxb) << 8) | ((opc) & 0xff))); \
} while (0)
@@ -1042,8 +1048,9 @@ typedef struct {
{ \
char rxb = (((v1) > 15) << 7) | (((v2) > 15) << 6) | \
(((v3) > 15) << 5); \
- s390_emit16(c, (((opc) & 0xff00) << 8) | ((v1) << 4) | ((v2))); \
- s390_emit16(c, ((v3) << 12) | ((m5) << 4) | (m4)); \
+ int vr1 = ((v1) % 16), vr2 = ((v2) % 16), vr3 = ((v3) % 16); \
+ s390_emit16(c, ((opc) & 0xff00) | (vr1 << 4) | (vr2)); \
+ s390_emit16(c, (vr3 << 12) | ((m5) << 4) | (m4)); \
s390_emit16(c, (((m3) << 12) | ((rxb) << 8) | ((opc) & 0xff))); \
} while (0)
@@ -1051,8 +1058,9 @@ typedef struct {
{ \
char rxb = (((v1) > 15) << 7) | (((v2) > 15) << 6) | \
(((v3) > 15) << 5); \
- s390_emit16(c, (((opc) & 0xff00) << 8) | ((v1) << 4) | ((v2))); \
- s390_emit16(c, (((v3) << 12)| (m5) << 4)); \
+ int vr1 = ((v1) % 16), vr2 = ((v2) % 16), vr3 = ((v3) % 16); \
+ s390_emit16(c, ((opc) & 0xff00) | (vr1 << 4) | (vr2)); \
+ s390_emit16(c, ((vr3 << 12)| (m5) << 4)); \
s390_emit16(c, (((m4) << 12) | ((rxb) << 8) | ((opc) & 0xff))); \
} while (0)
@@ -1060,32 +1068,36 @@ typedef struct {
{ \
char rxb = (((v1) > 15) << 7) | (((v2) > 15) << 6) | \
(((v3) > 15) << 5) | (((v4) > 15) << 4); \
- s390_emit16(c, (((opc) & 0xff00) << 8) | ((v1) << 4) | ((v2))); \
- s390_emit16(c, (((v3) << 12)| ((m6) << 8)) | ((m5) << 4)); \
- s390_emit16(c, (((v4) << 12) | ((rxb) << 8) | ((opc) & 0xff))); \
+ int vr1 = ((v1) % 16), vr2 = ((v2) % 16), \
+ vr3 = ((v3) % 16); vr4 = ((v4) % 16); \
+ s390_emit16(c, ((opc) & 0xff00) | (vr1 << 4) | (vr2)); \
+ s390_emit16(c, ((vr3 << 12)| ((m6) << 8)) | ((m5) << 4)); \
+ s390_emit16(c, ((vr4 << 12) | ((rxb) << 8) | ((opc) & 0xff))); \
} while (0)
#define S390_VRRe(c,opc,v1,v2,v3,m4,m5,m6) do \
{ \
char rxb = (((v1) > 15) << 7) | (((v2) > 15) << 6) | \
(((v3) > 15) << 5); \
- s390_emit16(c, (((opc) & 0xff00) << 8) | ((v1) << 4) | ((v2))); \
+ int vr1 = ((v1) % 16), vr2 = ((v2) % 16), vr3 = ((v3) % 16); \
+ s390_emit16(c, ((opc) & 0xff00) | ((v1) << 4) | ((v2))); \
s390_emit16(c, (((v3) << 12)| ((m6) << 8)) | (m5)); \
s390_emit16(c, (((m4) << 12) | ((rxb) << 8) | ((opc) & 0xff))); \
} while (0)
#define S390_VRRf(c,opc,v1,r2) do \
{ \
- char rxb = (((v1) > 15) << 7) | (((v2) > 15) << 6); \
- s390_emit16(c, (((opc) & 0xff00) << 8) | ((v1) << 4) | ((v2))); \
+ char rxb = (((v1) > 15) << 7); \
+ s390_emit16(c, ((opc) & 0xff00) | ((v1) << 4) | ((v2))); \
s390_emit16(c, ((r2) << 12)| ((r3) << r8) | (m5)); \
s390_emit16(c, (((rxb) << 8) | ((opc) & 0xff))); \
} while (0)
#define S390_VRSa(c,opc,v1,v3,b2,d2,m4) do \
{ \
- char rxb = (((v1) > 15) << 7) | (((v2) > 15) << 6); \
- s390_emit16(c, (((opc) & 0xff00) << 8) | ((v1) << 4) | ((v3))); \
+ char rxb = (((v1) > 15) << 7) | (((v3) > 15) << 6); \
+ int vr1 = ((v1) % 16), vr3 = ((v3) % 16); \
+ s390_emit16(c, ((opc) & 0xff00) | (vr1 << 4) | (vr3)); \
s390_emit16(c, ((b2) << 12)| (d2)); \
s390_emit16(c, (((m4) << 12) | ((rxb) << 8) | ((opc) & 0xff))); \
} while (0)
@@ -1093,7 +1105,8 @@ typedef struct {
#define S390_VRSb(c,opc,v1,r3,b2,d2,m4) do \
{ \
char rxb = (((v1) > 15) << 7); \
- s390_emit16(c, (((opc) & 0xff00) << 8) | ((v1) << 4) | ((r3))); \
+ int vr1 = (v1) % 16; \
+ s390_emit16(c, ((opc) & 0xff00) | (vr1 << 4) | ((r3))); \
s390_emit16(c, ((b2) << 12)| (d2)); \
s390_emit16(c, (((m4) << 12) | ((rxb) << 8) | ((opc) & 0xff))); \
} while (0)
@@ -1101,7 +1114,8 @@ typedef struct {
#define S390_VRSc(c,opc,r1,v3,b2,d2,m4) do \
{ \
char rxb = (((v1) > 15) << 7); \
- s390_emit16(c, (((opc) & 0xff00) << 8) | ((r1) << 4) | ((v3))); \
+ int vr3 = (v3) % 16; \
+ s390_emit16(c, ((opc) & 0xff00) | ((r1) << 4) | (vr3)); \
s390_emit16(c, ((b2) << 12)| (d2)); \
s390_emit16(c, (((m4) << 12) | ((rxb) << 8) | ((opc) & 0xff))); \
} while (0)
@@ -1109,7 +1123,8 @@ typedef struct {
#define S390_VRV(c,opc,v1,v2,b2,d2,m3) do \
{ \
char rxb = (((v1) > 15) << 7) | (((v2) > 15) << 6); \
- s390_emit16(c, (((opc) & 0xff00) << 8) | ((v1) << 4) | ((v2))); \
+ int vr1 = ((v1) % 16), vr2 = ((v3) % 16); \
+ s390_emit16(c, ((opc) & 0xff00) | (vr1 << 4) | (vr2)); \
s390_emit16(c, ((b2) << 12)| (d2)); \
s390_emit16(c, (((m3) << 12) | ((rxb) << 8) | ((opc) & 0xff))); \
} while (0)
@@ -1117,7 +1132,8 @@ typedef struct {
#define S390_VRX(c,opc,v1,x2,b2,d2,m3) do \
{ \
char rxb = ((v1) > 15) << 7; \
- s390_emit16(c, (((opc) & 0xff00) << 8) | ((v1) << 4) | ((x2))); \
+ int vr1 = (v1) % 16; \
+ s390_emit16(c, ((opc) & 0xff00) | (vr1 << 4) | ((x2))); \
s390_emit16(c, ((b2) << 12)| (d2)); \
s390_emit16(c, (((m3) << 12) | ((rxb) << 8) | ((opc) & 0xff))); \
} while (0)
@@ -1496,6 +1512,8 @@ typedef struct {
#define s390_tmlh(c, r, m) S390_RI(c, 0xa70, r, m)
#define s390_tmll(c, r, m) S390_RI(c, 0xa71, r, m)
#define s390_tm(c, b, d, v) S390_SI(c, 0x91, b, d, v)
+#define s390_vlm(c, v1, v2, b, d, m) S390_VRSa(c, 0xe736, v1, v2, b, d, m)
+#define s390_vstm(c, v1, v2, b, d, m) S390_VRSa(c, 0xe73e, v1, v2, b, d, m)
#define s390_x(c, r, x, b, d) S390_RX(c, 0x57, r, x, b, d)
#define s390_xihf(c, r, v) S390_RIL_1(c, 0xc06, r, v)
#define s390_xilf(c, r, v) S390_RIL_1(c, 0xc07, r, v)
diff --git a/mono/arch/s390x/tramp.c b/mono/arch/s390x/tramp.c
index a79f64e00e..bdb81f0412 100644
--- a/mono/arch/s390x/tramp.c
+++ b/mono/arch/s390x/tramp.c
@@ -309,7 +309,7 @@ enum_retvalue:
/* */
/*------------------------------------------------------------------*/
-static inline guint8 *
+static guint8 *
emit_prolog (guint8 *p, MonoMethodSignature *sig, size_data *sz)
{
guint stack_size;
@@ -543,7 +543,7 @@ emit_save_parameters (guint8 *p, MonoMethodSignature *sig, size_data *sz)
/* */
/*------------------------------------------------------------------*/
-static inline guint8 *
+static guint8 *
alloc_code_memory (guint code_size)
{
guint8 *p;
@@ -573,7 +573,7 @@ alloc_code_memory (guint code_size)
/* */
/*------------------------------------------------------------------*/
-static inline guint8 *
+static guint8 *
emit_call_and_store_retval (guint8 *p, MonoMethodSignature *sig,
size_data *sz, gboolean string_ctor)
{
@@ -674,7 +674,7 @@ printf("Returning %d bytes for type %d (%d)\n",retSize,simpletype,sig->pinvoke);
/* */
/*------------------------------------------------------------------*/
-static inline guint8 *
+static guint8 *
emit_epilog (guint8 *p, MonoMethodSignature *sig, size_data *sz)
{
/* function epilog */
diff --git a/mono/arch/sparc/Makefile.in b/mono/arch/sparc/Makefile.in
index d85487ae4e..063c83faef 100644
--- a/mono/arch/sparc/Makefile.in
+++ b/mono/arch/sparc/Makefile.in
@@ -215,6 +215,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
diff --git a/mono/arch/x86/Makefile.in b/mono/arch/x86/Makefile.in
index 8760cf7997..8ac962dc94 100644
--- a/mono/arch/x86/Makefile.in
+++ b/mono/arch/x86/Makefile.in
@@ -215,6 +215,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
diff --git a/mono/arch/x86/x86-codegen.h b/mono/arch/x86/x86-codegen.h
index e6986687e7..9fd65230d2 100644
--- a/mono/arch/x86/x86-codegen.h
+++ b/mono/arch/x86/x86-codegen.h
@@ -359,29 +359,65 @@ typedef union {
* the instruction is inspected for validity and the correct displacement
* is inserted.
*/
-#define x86_patch(ins,target) \
- do { \
- unsigned char* pos = (ins) + 1; \
- int disp, size = 0; \
- switch (*(unsigned char*)(ins)) { \
- case 0xe8: case 0xe9: ++size; break; /* call, jump32 */ \
- case 0x0f: if (!(*pos >= 0x70 && *pos <= 0x8f)) assert (0); \
- ++size; ++pos; break; /* prefix for 32-bit disp */ \
- case 0xe0: case 0xe1: case 0xe2: /* loop */ \
- case 0xeb: /* jump8 */ \
- /* conditional jump opcodes */ \
- case 0x70: case 0x71: case 0x72: case 0x73: \
- case 0x74: case 0x75: case 0x76: case 0x77: \
- case 0x78: case 0x79: case 0x7a: case 0x7b: \
- case 0x7c: case 0x7d: case 0x7e: case 0x7f: \
- break; \
- default: assert (0); \
- } \
- disp = (target) - pos; \
- if (size) x86_imm_emit32 (pos, disp - 4); \
- else if (x86_is_imm8 (disp - 1)) x86_imm_emit8 (pos, disp - 1); \
- else assert (0); \
- } while (0)
+void
+mono_x86_patch (guchar* code, gpointer target);
+
+// This is inline only to share with amd64.
+// It is only for use by mono_x86_patch and mono_amd64_patch.
+static inline void
+mono_x86_patch_inline (guchar* code, gpointer target)
+{
+ int instruction_size = 2; // 2 or 5 or 6, code handles anything
+ int offset_size = 1; // 1 or 4
+
+ switch (*code) {
+ case 0xe8: case 0xe9: // call, jump32
+ instruction_size = 5;
+ offset_size = 4;
+ break;
+
+ case 0x0f: // 6byte conditional branches with 32bit offsets.
+ g_assert (code [1] >= 0x80 && code [1] <= 0x8F);
+ instruction_size = 6;
+ offset_size = 4;
+ break;
+
+ case 0xe0: case 0xe1: case 0xe2: /* loop */
+ case 0xeb: /* jump8 */
+ /* conditional jump opcodes */
+ case 0x70: case 0x71: case 0x72: case 0x73:
+ case 0x74: case 0x75: case 0x76: case 0x77:
+ case 0x78: case 0x79: case 0x7a: case 0x7b:
+ case 0x7c: case 0x7d: case 0x7e: case 0x7f:
+ break;
+
+ case 0xFF:
+ // call or jmp indirect; patch the data, not the code.
+ // amd64 handles this elsewhere (RIP relative).
+ g_assert (code [1] == 0x15 || code [1] == 0x25);
+ g_assert (0); // For possible use later.
+ *(void**)(code + 2) = target;
+ return;
+
+ default:
+ g_assert (0);
+ }
+
+ // Offsets are relative to the end of the instruction.
+ ptrdiff_t const offset = (guchar*)target - (code + instruction_size);
+
+ if (offset_size == 4) {
+ g_assert (offset == (gint32)offset); // for amd64
+ code += instruction_size - 4; // Next line demands lvalue, not temp.
+ x86_imm_emit32 (code, offset);
+ } else {
+ g_assert (offset == (gint8)offset);
+ code += instruction_size - 1; // Next line demands lvalue, not temp.
+ x86_imm_emit8 (code, offset);
+ }
+}
+
+#define x86_patch(ins, target) (mono_x86_patch ((ins), (target)))
#define x86_breakpoint(inst) x86_byte (inst, 0xcc)
diff --git a/mono/benchmark/Makefile.in b/mono/benchmark/Makefile.in
index 158cb13454..519d52493c 100644
--- a/mono/benchmark/Makefile.in
+++ b/mono/benchmark/Makefile.in
@@ -215,6 +215,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
diff --git a/mono/btls/Makefile.in b/mono/btls/Makefile.in
index 335a7abcc6..8daba118bd 100644
--- a/mono/btls/Makefile.in
+++ b/mono/btls/Makefile.in
@@ -214,6 +214,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
diff --git a/mono/btls/btls-pkcs12.c b/mono/btls/btls-pkcs12.c
index 180b407604..530ede6762 100644
--- a/mono/btls/btls-pkcs12.c
+++ b/mono/btls/btls-pkcs12.c
@@ -55,13 +55,13 @@ allocate_btls_password (const void *password)
return buffer;
}
#else
-static inline void
+static void
deallocate_btls_password (char *password)
{
return;
}
-static inline char *
+static char *
allocate_btls_password (const void *password)
{
return (char *)password;
diff --git a/mono/cil/Makefile.in b/mono/cil/Makefile.in
index 088045389d..3f1974c9b1 100644
--- a/mono/cil/Makefile.in
+++ b/mono/cil/Makefile.in
@@ -245,6 +245,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
diff --git a/mono/dis/Makefile.am b/mono/dis/Makefile.am
index 84730c587f..083bf5356f 100644
--- a/mono/dis/Makefile.am
+++ b/mono/dis/Makefile.am
@@ -1,5 +1,7 @@
include $(top_srcdir)/mk/common.mk
+if !ENABLE_MSVC_ONLY
+
AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
if HOST_WIN32
@@ -35,7 +37,12 @@ noinst_LIBRARIES += libmonodismain.a
endif
endif
+endif # !ENABLE_MSVC_ONLY
+
CFLAGS := $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@)
+
+if !ENABLE_MSVC_ONLY
+
libmonodis_a_CFLAGS = $(CFLAGS) @CXX_ADD_CFLAGS@
libmonodismain_a_CFLAGS = $(CFLAGS) @CXX_ADD_CFLAGS@
@@ -85,3 +92,25 @@ endif
man_MANS = monodis.1
EXTRA_DIST = $(man_MANS)
+
+endif # !ENABLE_MSVC_ONLY
+
+if ENABLE_MSVC_ONLY
+
+if SUPPORT_SGEN
+mono_bin_suffix = sgen
+else
+mono_bin_suffix =
+endif
+
+all-local:
+
+ make -C $(top_srcdir)/msvc monodis
+ cp -f $(mono_msvc_build_bin_dir)/monodis-$(mono_bin_suffix)$(EXEEXT) ./monodis$(EXEEXT)
+
+clean-local:
+
+ make -C $(top_srcdir)/msvc clean-monodis
+ rm ./monodis$(EXEEXT)
+
+endif # ENABLE_MSVC_ONLY
diff --git a/mono/dis/Makefile.in b/mono/dis/Makefile.in
index 242cda6422..07290901ed 100644
--- a/mono/dis/Makefile.in
+++ b/mono/dis/Makefile.in
@@ -90,8 +90,8 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
-@DISABLE_EXECUTABLES_FALSE@@DISABLE_LIBRARIES_FALSE@bin_PROGRAMS = monodis$(EXEEXT)
-@DISABLE_EXECUTABLES_FALSE@@DISABLE_LIBRARIES_FALSE@am__append_1 = libmonodismain.a
+@DISABLE_EXECUTABLES_FALSE@@DISABLE_LIBRARIES_FALSE@@ENABLE_MSVC_ONLY_FALSE@bin_PROGRAMS = monodis$(EXEEXT)
+@DISABLE_EXECUTABLES_FALSE@@DISABLE_LIBRARIES_FALSE@@ENABLE_MSVC_ONLY_FALSE@am__append_1 = libmonodismain.a
subdir = mono/dis
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/apple-target.m4 \
@@ -120,30 +120,40 @@ am__v_AR_0 = @echo " AR " $@;
am__v_AR_1 =
libmonodis_a_AR = $(AR) $(ARFLAGS)
libmonodis_a_LIBADD =
-am_libmonodis_a_OBJECTS = libmonodis_a-get.$(OBJEXT) \
- libmonodis_a-dis-cil.$(OBJEXT) libmonodis_a-util.$(OBJEXT)
+am__libmonodis_a_SOURCES_DIST = get.c get.h dis-cil.c dis-cil.h util.c \
+ util.h
+@ENABLE_MSVC_ONLY_FALSE@am_libmonodis_a_OBJECTS = \
+@ENABLE_MSVC_ONLY_FALSE@ libmonodis_a-get.$(OBJEXT) \
+@ENABLE_MSVC_ONLY_FALSE@ libmonodis_a-dis-cil.$(OBJEXT) \
+@ENABLE_MSVC_ONLY_FALSE@ libmonodis_a-util.$(OBJEXT)
libmonodis_a_OBJECTS = $(am_libmonodis_a_OBJECTS)
libmonodismain_a_AR = $(AR) $(ARFLAGS)
libmonodismain_a_LIBADD =
-am_libmonodismain_a_OBJECTS = libmonodismain_a-dump.$(OBJEXT) \
- libmonodismain_a-main.$(OBJEXT) \
- libmonodismain_a-declsec.$(OBJEXT)
+am__libmonodismain_a_SOURCES_DIST = dump.c dump.h main.c meta.h \
+ declsec.c declsec.h
+@ENABLE_MSVC_ONLY_FALSE@am_libmonodismain_a_OBJECTS = \
+@ENABLE_MSVC_ONLY_FALSE@ libmonodismain_a-dump.$(OBJEXT) \
+@ENABLE_MSVC_ONLY_FALSE@ libmonodismain_a-main.$(OBJEXT) \
+@ENABLE_MSVC_ONLY_FALSE@ libmonodismain_a-declsec.$(OBJEXT)
libmonodismain_a_OBJECTS = $(am_libmonodismain_a_OBJECTS)
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
am_monodis_OBJECTS =
monodis_OBJECTS = $(am_monodis_OBJECTS)
am__DEPENDENCIES_1 =
-@SUPPORT_SGEN_FALSE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
-@SUPPORT_SGEN_TRUE@am__DEPENDENCIES_2 = \
-@SUPPORT_SGEN_TRUE@ $(top_builddir)/mono/sgen/libmonosgen.la
-am__DEPENDENCIES_3 = $(metadata_lib) $(am__DEPENDENCIES_2) \
- $(top_builddir)/mono/utils/libmonoutils.la $(glib_libs)
-@HAVE_STATIC_ZLIB_TRUE@@HAVE_SYS_ZLIB_FALSE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1)
-monodis_DEPENDENCIES = libmonodismain_a-dump.$(OBJEXT) \
- libmonodismain_a-main.$(OBJEXT) \
- libmonodismain_a-declsec.$(OBJEXT) libmonodis.a \
- $(am__DEPENDENCIES_3) $(glib_libs) $(am__DEPENDENCIES_4)
+@ENABLE_MSVC_ONLY_FALSE@@SUPPORT_SGEN_FALSE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
+@ENABLE_MSVC_ONLY_FALSE@@SUPPORT_SGEN_TRUE@am__DEPENDENCIES_2 = $(top_builddir)/mono/sgen/libmonosgen.la
+@ENABLE_MSVC_ONLY_FALSE@am__DEPENDENCIES_3 = $(metadata_lib) \
+@ENABLE_MSVC_ONLY_FALSE@ $(am__DEPENDENCIES_2) \
+@ENABLE_MSVC_ONLY_FALSE@ $(top_builddir)/mono/utils/libmonoutils.la \
+@ENABLE_MSVC_ONLY_FALSE@ $(glib_libs)
+@ENABLE_MSVC_ONLY_FALSE@@HAVE_STATIC_ZLIB_TRUE@@HAVE_SYS_ZLIB_FALSE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1)
+@ENABLE_MSVC_ONLY_FALSE@monodis_DEPENDENCIES = \
+@ENABLE_MSVC_ONLY_FALSE@ libmonodismain_a-dump.$(OBJEXT) \
+@ENABLE_MSVC_ONLY_FALSE@ libmonodismain_a-main.$(OBJEXT) \
+@ENABLE_MSVC_ONLY_FALSE@ libmonodismain_a-declsec.$(OBJEXT) \
+@ENABLE_MSVC_ONLY_FALSE@ libmonodis.a $(am__DEPENDENCIES_3) \
+@ENABLE_MSVC_ONLY_FALSE@ $(glib_libs) $(am__DEPENDENCIES_4)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
@@ -183,8 +193,8 @@ am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libmonodis_a_SOURCES) $(libmonodismain_a_SOURCES) \
$(monodis_SOURCES)
-DIST_SOURCES = $(libmonodis_a_SOURCES) $(libmonodismain_a_SOURCES) \
- $(monodis_SOURCES)
+DIST_SOURCES = $(am__libmonodis_a_SOURCES_DIST) \
+ $(am__libmonodismain_a_SOURCES_DIST) $(monodis_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -326,6 +336,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
@@ -515,55 +526,58 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules
-AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
-glib_libs = $(top_builddir)/mono/eglib/libeglib.la
-@SUPPORT_SGEN_FALSE@metadata_lib = $(top_builddir)/mono/metadata/libmonoruntime.la
-@SUPPORT_SGEN_TRUE@metadata_lib = $(top_builddir)/mono/metadata/libmonoruntimesgen.la
-@SUPPORT_SGEN_FALSE@gc_lib = $(LIBGC_STATIC_LIBS)
-@SUPPORT_SGEN_TRUE@gc_lib = $(top_builddir)/mono/sgen/libmonosgen.la
-runtime_lib = \
- $(metadata_lib) \
- $(gc_lib) \
- $(top_builddir)/mono/utils/libmonoutils.la \
- $(glib_libs)
+@ENABLE_MSVC_ONLY_FALSE@AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
+@ENABLE_MSVC_ONLY_FALSE@glib_libs = $(top_builddir)/mono/eglib/libeglib.la
+@ENABLE_MSVC_ONLY_FALSE@@SUPPORT_SGEN_FALSE@metadata_lib = $(top_builddir)/mono/metadata/libmonoruntime.la
+@ENABLE_MSVC_ONLY_FALSE@@SUPPORT_SGEN_TRUE@metadata_lib = $(top_builddir)/mono/metadata/libmonoruntimesgen.la
+@ENABLE_MSVC_ONLY_FALSE@@SUPPORT_SGEN_FALSE@gc_lib = $(LIBGC_STATIC_LIBS)
+@ENABLE_MSVC_ONLY_FALSE@@SUPPORT_SGEN_TRUE@gc_lib = $(top_builddir)/mono/sgen/libmonosgen.la
+@ENABLE_MSVC_ONLY_FALSE@runtime_lib = \
+@ENABLE_MSVC_ONLY_FALSE@ $(metadata_lib) \
+@ENABLE_MSVC_ONLY_FALSE@ $(gc_lib) \
+@ENABLE_MSVC_ONLY_FALSE@ $(top_builddir)/mono/utils/libmonoutils.la \
+@ENABLE_MSVC_ONLY_FALSE@ $(glib_libs)
-noinst_LIBRARIES = libmonodis.a $(am__append_1)
-libmonodis_a_CFLAGS = $(CFLAGS) @CXX_ADD_CFLAGS@
-libmonodismain_a_CFLAGS = $(CFLAGS) @CXX_ADD_CFLAGS@
-libmonodis_a_SOURCES = \
- get.c \
- get.h \
- dis-cil.c \
- dis-cil.h \
- util.c \
- util.h
+@ENABLE_MSVC_ONLY_FALSE@noinst_LIBRARIES = libmonodis.a \
+@ENABLE_MSVC_ONLY_FALSE@ $(am__append_1)
+@ENABLE_MSVC_ONLY_FALSE@libmonodis_a_CFLAGS = $(CFLAGS) @CXX_ADD_CFLAGS@
+@ENABLE_MSVC_ONLY_FALSE@libmonodismain_a_CFLAGS = $(CFLAGS) @CXX_ADD_CFLAGS@
+@ENABLE_MSVC_ONLY_FALSE@libmonodis_a_SOURCES = \
+@ENABLE_MSVC_ONLY_FALSE@ get.c \
+@ENABLE_MSVC_ONLY_FALSE@ get.h \
+@ENABLE_MSVC_ONLY_FALSE@ dis-cil.c \
+@ENABLE_MSVC_ONLY_FALSE@ dis-cil.h \
+@ENABLE_MSVC_ONLY_FALSE@ util.c \
+@ENABLE_MSVC_ONLY_FALSE@ util.h
-libmonodismain_a_SOURCES = \
- dump.c \
- dump.h \
- main.c \
- meta.h \
- declsec.c \
- declsec.h
+@ENABLE_MSVC_ONLY_FALSE@libmonodismain_a_SOURCES = \
+@ENABLE_MSVC_ONLY_FALSE@ dump.c \
+@ENABLE_MSVC_ONLY_FALSE@ dump.h \
+@ENABLE_MSVC_ONLY_FALSE@ main.c \
+@ENABLE_MSVC_ONLY_FALSE@ meta.h \
+@ENABLE_MSVC_ONLY_FALSE@ declsec.c \
+@ENABLE_MSVC_ONLY_FALSE@ declsec.h
-monodis_SOURCES =
-@HAVE_STATIC_ZLIB_FALSE@@HAVE_SYS_ZLIB_FALSE@Z_LIBS =
-@HAVE_STATIC_ZLIB_TRUE@@HAVE_SYS_ZLIB_FALSE@Z_LIBS = $(STATIC_ZLIB_PATH)
-@HAVE_SYS_ZLIB_TRUE@Z_LIBS = -lz
-monodis_LDADD = \
- libmonodismain_a-dump.$(OBJEXT) \
- libmonodismain_a-main.$(OBJEXT) \
- libmonodismain_a-declsec.$(OBJEXT) \
- libmonodis.a \
- $(runtime_lib) \
- $(LLVM_LIBS) \
- $(LLVM_LDFLAGS) \
- $(glib_libs) \
- $(Z_LIBS)
+@ENABLE_MSVC_ONLY_FALSE@monodis_SOURCES =
+@ENABLE_MSVC_ONLY_FALSE@@HAVE_STATIC_ZLIB_FALSE@@HAVE_SYS_ZLIB_FALSE@Z_LIBS =
+@ENABLE_MSVC_ONLY_FALSE@@HAVE_STATIC_ZLIB_TRUE@@HAVE_SYS_ZLIB_FALSE@Z_LIBS = $(STATIC_ZLIB_PATH)
+@ENABLE_MSVC_ONLY_FALSE@@HAVE_SYS_ZLIB_TRUE@Z_LIBS = -lz
+@ENABLE_MSVC_ONLY_FALSE@monodis_LDADD = \
+@ENABLE_MSVC_ONLY_FALSE@ libmonodismain_a-dump.$(OBJEXT) \
+@ENABLE_MSVC_ONLY_FALSE@ libmonodismain_a-main.$(OBJEXT) \
+@ENABLE_MSVC_ONLY_FALSE@ libmonodismain_a-declsec.$(OBJEXT) \
+@ENABLE_MSVC_ONLY_FALSE@ libmonodis.a \
+@ENABLE_MSVC_ONLY_FALSE@ $(runtime_lib) \
+@ENABLE_MSVC_ONLY_FALSE@ $(LLVM_LIBS) \
+@ENABLE_MSVC_ONLY_FALSE@ $(LLVM_LDFLAGS) \
+@ENABLE_MSVC_ONLY_FALSE@ $(glib_libs) \
+@ENABLE_MSVC_ONLY_FALSE@ $(Z_LIBS)
-@HOST_DARWIN_TRUE@monodis_LDFLAGS = -framework CoreFoundation -framework Foundation
-man_MANS = monodis.1
-EXTRA_DIST = $(man_MANS)
+@ENABLE_MSVC_ONLY_FALSE@@HOST_DARWIN_TRUE@monodis_LDFLAGS = -framework CoreFoundation -framework Foundation
+@ENABLE_MSVC_ONLY_FALSE@man_MANS = monodis.1
+@ENABLE_MSVC_ONLY_FALSE@EXTRA_DIST = $(man_MANS)
+@ENABLE_MSVC_ONLY_TRUE@@SUPPORT_SGEN_FALSE@mono_bin_suffix =
+@ENABLE_MSVC_ONLY_TRUE@@SUPPORT_SGEN_TRUE@mono_bin_suffix = sgen
all: all-am
.SUFFIXES:
@@ -679,25 +693,22 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmonodismain_a-main.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
@@ -921,7 +932,8 @@ distdir: $(DISTFILES)
done
check-am: all-am
check: check-am
-all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS)
+@ENABLE_MSVC_ONLY_FALSE@all-local:
+all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS) all-local
installdirs:
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
@@ -956,9 +968,10 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+@ENABLE_MSVC_ONLY_FALSE@clean-local:
clean: clean-am
-clean-am: clean-binPROGRAMS clean-generic clean-libtool \
+clean-am: clean-binPROGRAMS clean-generic clean-libtool clean-local \
clean-noinstLIBRARIES mostlyclean-am
distclean: distclean-am
@@ -1039,8 +1052,8 @@ uninstall-man: uninstall-man1
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
- clean-binPROGRAMS clean-generic clean-libtool \
+.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am clean \
+ clean-binPROGRAMS clean-generic clean-libtool clean-local \
clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
@@ -1059,7 +1072,17 @@ uninstall-man: uninstall-man1
.PRECIOUS: Makefile
-@HOST_WIN32_TRUE@export HOST_CC
+@ENABLE_MSVC_ONLY_FALSE@@HOST_WIN32_TRUE@export HOST_CC
+
+@ENABLE_MSVC_ONLY_TRUE@all-local:
+
+@ENABLE_MSVC_ONLY_TRUE@ make -C $(top_srcdir)/msvc monodis
+@ENABLE_MSVC_ONLY_TRUE@ cp -f $(mono_msvc_build_bin_dir)/monodis-$(mono_bin_suffix)$(EXEEXT) ./monodis$(EXEEXT)
+
+@ENABLE_MSVC_ONLY_TRUE@clean-local:
+
+@ENABLE_MSVC_ONLY_TRUE@ make -C $(top_srcdir)/msvc clean-monodis
+@ENABLE_MSVC_ONLY_TRUE@ rm ./monodis$(EXEEXT)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/mono/dis/dump.c b/mono/dis/dump.c
index b3336346df..5d652d07e2 100755
--- a/mono/dis/dump.c
+++ b/mono/dis/dump.c
@@ -247,13 +247,13 @@ dump_table_memberref (MonoImage *m)
case 0:
ks = "TypeDef";
xx = get_typedef (m, idx);
- x = g_strconcat (xx, ".", mono_metadata_string_heap (m, cols [MONO_MEMBERREF_NAME]), NULL);
+ x = g_strconcat (xx, ".", mono_metadata_string_heap (m, cols [MONO_MEMBERREF_NAME]), (const char*)NULL);
g_free (xx);
break;
case 1:
ks = "TypeRef";
xx = get_typeref (m, idx);
- x = g_strconcat (xx, ".", mono_metadata_string_heap (m, cols [MONO_MEMBERREF_NAME]), NULL);
+ x = g_strconcat (xx, ".", mono_metadata_string_heap (m, cols [MONO_MEMBERREF_NAME]), (const char*)NULL);
g_free (xx);
break;
case 2:
@@ -265,7 +265,7 @@ dump_table_memberref (MonoImage *m)
case 4:
ks = "TypeSpec";
xx = get_typespec (m, idx, FALSE, NULL);
- x = g_strconcat (xx, ".", mono_metadata_string_heap (m, cols [MONO_MEMBERREF_NAME]), NULL);
+ x = g_strconcat (xx, ".", mono_metadata_string_heap (m, cols [MONO_MEMBERREF_NAME]), (const char*)NULL);
g_free (xx);
break;
default:
@@ -581,26 +581,26 @@ dump_table_method (MonoImage *m)
type_container = mono_metadata_load_generic_params (m, MONO_TOKEN_TYPE_DEF | (current_type - 1), NULL, NULL);
if (type_container) {
mono_metadata_load_generic_param_constraints_checked (m, MONO_TOKEN_TYPE_DEF | (current_type - 1), type_container, error);
- g_assert (mono_error_ok (error)); /*FIXME don't swallow the error message*/
+ g_assert (is_ok (error)); /*FIXME don't swallow the error message*/
}
}
method_container = mono_metadata_load_generic_params (m, MONO_TOKEN_METHOD_DEF | i, type_container, NULL);
if (method_container) {
mono_metadata_load_generic_param_constraints_checked (m, MONO_TOKEN_METHOD_DEF | i, method_container, error);
- g_assert (mono_error_ok (error)); /*FIXME don't swallow the error message*/
+ g_assert (is_ok (error)); /*FIXME don't swallow the error message*/
}
mono_metadata_decode_table_row (m, MONO_TABLE_METHOD, i - 1, cols, MONO_METHOD_SIZE);
sigblob = mono_metadata_blob_heap (m, cols [MONO_METHOD_SIGNATURE]);
mono_metadata_decode_blob_size (sigblob, &sigblob);
method = mono_metadata_parse_method_signature_full (m, method_container ? method_container : type_container, i, sigblob, &sigblob, error);
- if (!mono_error_ok (error)) {
+ if (!is_ok (error)) {
fprintf (output,"%d: failed to parse due to %s\n", i, mono_error_get_message (error));
mono_error_cleanup (error);
continue;
}
- g_assert (mono_error_ok (error)); /*FIXME don't swallow the error message*/
+ g_assert (is_ok (error)); /*FIXME don't swallow the error message*/
sig = dis_stringify_method_signature (m, method, i, method_container ? method_container : type_container, FALSE);
impl_flags = get_method_impl_flags (cols [MONO_METHOD_IMPLFLAGS]);
fprintf (output, "%d: %s (param: %d impl_flags: %s)\n", i, sig, cols [MONO_METHOD_PARAMLIST], impl_flags);
@@ -861,9 +861,6 @@ handle_enum:
p += 4;
break;
case MONO_TYPE_U8:
- g_string_append_printf (res, "%lld", (long long)read64 (p));
- p += 8;
- break;
case MONO_TYPE_I8:
g_string_append_printf (res, "%lld", (long long)read64 (p));
p += 8;
diff --git a/mono/dis/get.c.REMOVED.git-id b/mono/dis/get.c.REMOVED.git-id
index 44949df0e5..5196483390 100644
--- a/mono/dis/get.c.REMOVED.git-id
+++ b/mono/dis/get.c.REMOVED.git-id
@@ -1 +1 @@
-3be34fe7fdc6f20494122f604213f0d64473e0ae
\ No newline at end of file
+bca6da2a6c601b2152d37920143b1f7aef72095b
\ No newline at end of file
diff --git a/mono/dis/main.c b/mono/dis/main.c
index 846e7e8788..056da620ed 100644
--- a/mono/dis/main.c
+++ b/mono/dis/main.c
@@ -863,7 +863,7 @@ dis_method_list (const char *klass_name, MonoImage *m, guint32 start, guint32 en
if (container) {
ERROR_DECL (error);
mono_metadata_load_generic_param_constraints_checked (m, MONO_TOKEN_METHOD_DEF | (i + 1), container, error);
- g_assert (mono_error_ok (error)); /*FIXME don't swallow the error message*/
+ g_assert (is_ok (error)); /*FIXME don't swallow the error message*/
} else {
container = type_container;
}
@@ -1206,7 +1206,7 @@ dis_type (MonoImage *m, int n, int is_nested, int forward)
if (container) {
ERROR_DECL (error);
mono_metadata_load_generic_param_constraints_checked (m, MONO_TOKEN_TYPE_DEF | (n + 1), container, error);
- g_assert (mono_error_ok (error)); /*FIXME don't swallow the error message*/
+ g_assert (is_ok (error)); /*FIXME don't swallow the error message*/
}
esname = get_escaped_name (name);
@@ -1634,7 +1634,8 @@ disassemble_file (const char *file)
/* FIXME: is this call necessary? */
/* FIXME: if it's necessary, can it be refonly instead? */
MonoAssemblyLoadRequest req;
- mono_assembly_request_prepare (&req, sizeof (req), MONO_ASMCTX_DEFAULT);
+ mono_assembly_request_prepare_load (&req, MONO_ASMCTX_DEFAULT, mono_domain_default_alc (mono_domain_get ()));
+
mono_assembly_request_load_from (img, file, &req, &status);
}
@@ -1782,9 +1783,9 @@ sort_filter_elems (void)
for (item = filter_list; item; item = item->next) {
ifilter = (ImageFilter *)item->data;
- qsort (ifilter->types.elems, ifilter->types.count, sizeof (int), int_cmp);
- qsort (ifilter->fields.elems, ifilter->fields.count, sizeof (int), int_cmp);
- qsort (ifilter->methods.elems, ifilter->methods.count, sizeof (int), int_cmp);
+ mono_qsort (ifilter->types.elems, ifilter->types.count, sizeof (int), int_cmp);
+ mono_qsort (ifilter->fields.elems, ifilter->fields.count, sizeof (int), int_cmp);
+ mono_qsort (ifilter->methods.elems, ifilter->methods.count, sizeof (int), int_cmp);
}
}
@@ -1856,7 +1857,7 @@ try_load_from (MonoAssembly **assembly,
gchar *fullpath;
*assembly = NULL;
- fullpath = g_build_filename (path1, path2, path3, path4, NULL);
+ fullpath = g_build_filename (path1, path2, path3, path4, (const char*)NULL);
if (g_file_test (fullpath, G_FILE_TEST_IS_REGULAR))
*assembly = mono_assembly_request_open (fullpath, req, NULL);
@@ -1879,7 +1880,7 @@ real_load (gchar **search_path, const gchar *culture, const gchar *name, const M
local_culture = culture;
}
- filename = g_strconcat (name, ".dll", NULL);
+ filename = g_strconcat (name, ".dll", (const char*)NULL);
len = strlen (filename);
for (path = search_path; *path; path++) {
@@ -1916,16 +1917,18 @@ real_load (gchar **search_path, const gchar *culture, const gchar *name, const M
* Try to load referenced assemblies from assemblies_path.
*/
static MonoAssembly *
-monodis_preload (MonoAssemblyName *aname,
- gchar **assemblies_path,
- gpointer user_data)
+monodis_preload (MonoAssemblyLoadContext *alc,
+ MonoAssemblyName *aname,
+ gchar **assemblies_path,
+ gboolean refonly,
+ gpointer user_data,
+ MonoError *error)
{
MonoAssembly *result = NULL;
- gboolean refonly = GPOINTER_TO_UINT (user_data);
if (assemblies_path && assemblies_path [0] != NULL) {
MonoAssemblyOpenRequest req;
- mono_assembly_request_prepare (&req.request, sizeof (req), refonly ? MONO_ASMCTX_REFONLY : MONO_ASMCTX_DEFAULT);
+ mono_assembly_request_prepare_open (&req, refonly ? MONO_ASMCTX_REFONLY : MONO_ASMCTX_DEFAULT, alc);
result = real_load (assemblies_path, aname->culture, aname->name, &req);
}
@@ -1936,7 +1939,7 @@ monodis_preload (MonoAssemblyName *aname,
static GList *loaded_assemblies = NULL;
static void
-monodis_assembly_load_hook (MonoAssembly *assembly, gpointer user_data)
+monodis_assembly_load_hook (MonoAssemblyLoadContext *alc, MonoAssembly *assembly, gpointer user_data, MonoError *error)
{
loaded_assemblies = g_list_prepend (loaded_assemblies, assembly);
}
@@ -1977,14 +1980,20 @@ usage (void)
}
static void
-thread_state_init (MonoThreadUnwindState *ctx)
+monodis_thread_state_init (MonoThreadUnwindState *ctx)
{
}
+#define monodis_setup_async_callback NULL
+#define monodis_thread_state_init_from_sigctx NULL
+#define monodis_thread_state_init_from_handle NULL
+
int
main (int argc, char *argv [])
{
- MonoThreadInfoRuntimeCallbacks ticallbacks;
+ static const MonoThreadInfoRuntimeCallbacks ticallbacks = {
+ MONO_THREAD_INFO_RUNTIME_CALLBACKS (MONO_INIT_CALLBACK, monodis)
+ };
GList *input_files = NULL, *l;
int i, j;
@@ -2039,14 +2048,12 @@ main (int argc, char *argv [])
CHECKED_MONO_INIT ();
mono_counters_init ();
mono_tls_init_runtime_keys ();
- memset (&ticallbacks, 0, sizeof (ticallbacks));
- ticallbacks.thread_state_init = thread_state_init;
#ifndef HOST_WIN32
mono_w32handle_init ();
#endif
mono_thread_info_runtime_init (&ticallbacks);
- mono_install_assembly_load_hook (monodis_assembly_load_hook, NULL);
+ mono_install_assembly_load_hook_v2 (monodis_assembly_load_hook, NULL);
mono_install_assembly_search_hook_v2 (monodis_assembly_search_hook, NULL, FALSE, FALSE);
/*
@@ -2057,7 +2064,7 @@ main (int argc, char *argv [])
mono_init_from_assembly (argv [0], filename);
- mono_install_assembly_preload_hook (monodis_preload, GUINT_TO_POINTER (FALSE));
+ mono_install_assembly_preload_hook_v2 (monodis_preload, GUINT_TO_POINTER (FALSE), FALSE);
return disassemble_file (filename);
} else {
diff --git a/mono/eglib/Makefile.am b/mono/eglib/Makefile.am
index ba10873171..0c5132c633 100644
--- a/mono/eglib/Makefile.am
+++ b/mono/eglib/Makefile.am
@@ -1,9 +1,8 @@
include $(top_srcdir)/mk/common.mk
-# FIXME
-#SUBDIRS = test
+if !ENABLE_MSVC_ONLY
-DIST_SUBDIRS = test
+SUBDIRS = . test
noinst_LTLIBRARIES = libeglib.la
@@ -55,8 +54,12 @@ libeglib_la_SOURCES = \
unicode-data.h \
$(os_files)
+endif # !ENABLE_MSVC_ONLY
+
CFLAGS := $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@) @CXX_ADD_CFLAGS@
+if !ENABLE_MSVC_ONLY
+
eglibdir=$(datadir)/mono-$(API_VER)/mono/eglib
eglib_DATA = eglib-config.h
@@ -77,3 +80,18 @@ endif
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = eglib-config.h.in $(win_files) $(unix_files)
+
+endif # !ENABLE_MSVC_ONLY
+
+if ENABLE_MSVC_ONLY
+
+all-local:
+
+ make -C $(top_srcdir)/msvc eglib
+
+clean-local:
+
+ make -C $(top_srcdir)/msvc clean-eglib
+
+
+endif # ENABLE_MSVC_ONLY
diff --git a/mono/eglib/Makefile.in b/mono/eglib/Makefile.in
index 327dff7a72..110508477b 100644
--- a/mono/eglib/Makefile.in
+++ b/mono/eglib/Makefile.in
@@ -91,7 +91,6 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = mono/eglib
-SUBDIRS =
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/apple-target.m4 \
$(top_srcdir)/m4/ax_append_flag.m4 \
@@ -123,27 +122,48 @@ am__libeglib_la_SOURCES_DIST = eglib-remap.h sort.frag.h glib.h \
gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \
gmodule-win32.c gmodule-win32-internals.h gtimer-win32.c \
gunicode-win32.c
-am__objects_1 = libeglib_la-gdate-unix.lo libeglib_la-gdir-unix.lo \
- libeglib_la-gfile-unix.lo libeglib_la-gmisc-unix.lo \
- libeglib_la-gmodule-unix.lo libeglib_la-gtimer-unix.lo
-am__objects_2 = libeglib_la-gdate-win32.lo libeglib_la-gdir-win32.lo \
- libeglib_la-gfile-win32.lo libeglib_la-gmisc-win32.lo \
- libeglib_la-gmodule-win32.lo libeglib_la-gtimer-win32.lo \
- libeglib_la-gunicode-win32.lo
-@HOST_WIN32_FALSE@am__objects_3 = $(am__objects_1)
-@HOST_WIN32_TRUE@am__objects_3 = $(am__objects_2)
-am_libeglib_la_OBJECTS = libeglib_la-garray.lo \
- libeglib_la-gbytearray.lo libeglib_la-gerror.lo \
- libeglib_la-ghashtable.lo libeglib_la-giconv.lo \
- libeglib_la-gmem.lo libeglib_la-goutput.lo \
- libeglib_la-gqsort.lo libeglib_la-gstr.lo \
- libeglib_la-gslist.lo libeglib_la-gstring.lo \
- libeglib_la-gptrarray.lo libeglib_la-glist.lo \
- libeglib_la-gqueue.lo libeglib_la-gpath.lo \
- libeglib_la-gshell.lo libeglib_la-gspawn.lo \
- libeglib_la-gfile.lo libeglib_la-gfile-posix.lo \
- libeglib_la-gpattern.lo libeglib_la-gmarkup.lo \
- libeglib_la-gutf8.lo libeglib_la-gunicode.lo $(am__objects_3)
+@ENABLE_MSVC_ONLY_FALSE@am__objects_1 = libeglib_la-gdate-unix.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gdir-unix.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gfile-unix.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gmisc-unix.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gmodule-unix.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gtimer-unix.lo
+@ENABLE_MSVC_ONLY_FALSE@am__objects_2 = libeglib_la-gdate-win32.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gdir-win32.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gfile-win32.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gmisc-win32.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gmodule-win32.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gtimer-win32.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gunicode-win32.lo
+@ENABLE_MSVC_ONLY_FALSE@@HOST_WIN32_FALSE@am__objects_3 = \
+@ENABLE_MSVC_ONLY_FALSE@@HOST_WIN32_FALSE@ $(am__objects_1)
+@ENABLE_MSVC_ONLY_FALSE@@HOST_WIN32_TRUE@am__objects_3 = \
+@ENABLE_MSVC_ONLY_FALSE@@HOST_WIN32_TRUE@ $(am__objects_2)
+@ENABLE_MSVC_ONLY_FALSE@am_libeglib_la_OBJECTS = \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-garray.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gbytearray.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gerror.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-ghashtable.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-giconv.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gmem.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-goutput.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gqsort.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gstr.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gslist.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gstring.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gptrarray.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-glist.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gqueue.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gpath.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gshell.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gspawn.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gfile.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gfile-posix.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gpattern.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gmarkup.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gutf8.lo \
+@ENABLE_MSVC_ONLY_FALSE@ libeglib_la-gunicode.lo \
+@ENABLE_MSVC_ONLY_FALSE@ $(am__objects_3)
libeglib_la_OBJECTS = $(am_libeglib_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -152,6 +172,7 @@ am__v_lt_1 =
libeglib_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libeglib_la_CFLAGS) \
$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+@ENABLE_MSVC_ONLY_FALSE@am_libeglib_la_rpath =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -254,6 +275,7 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+DIST_SUBDIRS = . test
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/eglib-config.h.in \
$(top_srcdir)/depcomp $(top_srcdir)/mk/common.mk \
$(top_srcdir)/mkinstalldirs
@@ -366,6 +388,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
@@ -555,63 +578,60 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules
+@ENABLE_MSVC_ONLY_FALSE@SUBDIRS = . test
+@ENABLE_MSVC_ONLY_FALSE@noinst_LTLIBRARIES = libeglib.la
+@ENABLE_MSVC_ONLY_FALSE@AM_CFLAGS = $(WERROR_CFLAGS)
+@ENABLE_MSVC_ONLY_FALSE@win_files = \
+@ENABLE_MSVC_ONLY_FALSE@ eglib-config.hw \
+@ENABLE_MSVC_ONLY_FALSE@ gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \
+@ENABLE_MSVC_ONLY_FALSE@ gmodule-win32.c gmodule-win32-internals.h gtimer-win32.c gunicode-win32.c
-# FIXME
-#SUBDIRS = test
-DIST_SUBDIRS = test
-noinst_LTLIBRARIES = libeglib.la
-AM_CFLAGS = $(WERROR_CFLAGS)
-win_files = \
- eglib-config.hw \
- gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \
- gmodule-win32.c gmodule-win32-internals.h gtimer-win32.c gunicode-win32.c
+@ENABLE_MSVC_ONLY_FALSE@unix_files = \
+@ENABLE_MSVC_ONLY_FALSE@ gdate-unix.c gdir-unix.c gfile-unix.c gmisc-unix.c \
+@ENABLE_MSVC_ONLY_FALSE@ gmodule-unix.c gtimer-unix.c
-unix_files = \
- gdate-unix.c gdir-unix.c gfile-unix.c gmisc-unix.c \
- gmodule-unix.c gtimer-unix.c
+@ENABLE_MSVC_ONLY_FALSE@@HOST_WIN32_FALSE@os_files = $(unix_files)
+@ENABLE_MSVC_ONLY_FALSE@@HOST_WIN32_TRUE@os_files = $(win_files)
+@ENABLE_MSVC_ONLY_FALSE@libeglib_la_SOURCES = \
+@ENABLE_MSVC_ONLY_FALSE@ eglib-remap.h \
+@ENABLE_MSVC_ONLY_FALSE@ sort.frag.h \
+@ENABLE_MSVC_ONLY_FALSE@ glib.h \
+@ENABLE_MSVC_ONLY_FALSE@ garray.c \
+@ENABLE_MSVC_ONLY_FALSE@ gbytearray.c \
+@ENABLE_MSVC_ONLY_FALSE@ gerror.c \
+@ENABLE_MSVC_ONLY_FALSE@ ghashtable.c \
+@ENABLE_MSVC_ONLY_FALSE@ giconv.c \
+@ENABLE_MSVC_ONLY_FALSE@ gmem.c \
+@ENABLE_MSVC_ONLY_FALSE@ gmodule.h \
+@ENABLE_MSVC_ONLY_FALSE@ goutput.c \
+@ENABLE_MSVC_ONLY_FALSE@ gqsort.c \
+@ENABLE_MSVC_ONLY_FALSE@ gstr.c \
+@ENABLE_MSVC_ONLY_FALSE@ gslist.c \
+@ENABLE_MSVC_ONLY_FALSE@ gstring.c \
+@ENABLE_MSVC_ONLY_FALSE@ gptrarray.c \
+@ENABLE_MSVC_ONLY_FALSE@ glist.c \
+@ENABLE_MSVC_ONLY_FALSE@ gqueue.c \
+@ENABLE_MSVC_ONLY_FALSE@ gpath.c \
+@ENABLE_MSVC_ONLY_FALSE@ gshell.c \
+@ENABLE_MSVC_ONLY_FALSE@ gspawn.c \
+@ENABLE_MSVC_ONLY_FALSE@ gfile.c \
+@ENABLE_MSVC_ONLY_FALSE@ gfile-posix.c \
+@ENABLE_MSVC_ONLY_FALSE@ gpattern.c \
+@ENABLE_MSVC_ONLY_FALSE@ gmarkup.c \
+@ENABLE_MSVC_ONLY_FALSE@ gutf8.c \
+@ENABLE_MSVC_ONLY_FALSE@ gunicode.c \
+@ENABLE_MSVC_ONLY_FALSE@ unicode-data.h \
+@ENABLE_MSVC_ONLY_FALSE@ $(os_files)
-@HOST_WIN32_FALSE@os_files = $(unix_files)
-@HOST_WIN32_TRUE@os_files = $(win_files)
-libeglib_la_SOURCES = \
- eglib-remap.h \
- sort.frag.h \
- glib.h \
- garray.c \
- gbytearray.c \
- gerror.c \
- ghashtable.c \
- giconv.c \
- gmem.c \
- gmodule.h \
- goutput.c \
- gqsort.c \
- gstr.c \
- gslist.c \
- gstring.c \
- gptrarray.c \
- glist.c \
- gqueue.c \
- gpath.c \
- gshell.c \
- gspawn.c \
- gfile.c \
- gfile-posix.c \
- gpattern.c \
- gmarkup.c \
- gutf8.c \
- gunicode.c \
- unicode-data.h \
- $(os_files)
-
-eglibdir = $(datadir)/mono-$(API_VER)/mono/eglib
-eglib_DATA = eglib-config.h
-libeglib_la_CFLAGS = -g -Wall -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
-AM_CPPFLAGS = -I$(srcdir)
-@HOST_ANDROID_FALSE@@HOST_WIN32_FALSE@libeglib_la_LIBADD = -lm $(LTLIBICONV)
-@HOST_ANDROID_FALSE@@HOST_WIN32_TRUE@libeglib_la_LIBADD = -lm -lpsapi $(LTLIBICONV)
-@HOST_ANDROID_TRUE@libeglib_la_LIBADD = -lm -llog
-MAINTAINERCLEANFILES = Makefile.in
-EXTRA_DIST = eglib-config.h.in $(win_files) $(unix_files)
+@ENABLE_MSVC_ONLY_FALSE@eglibdir = $(datadir)/mono-$(API_VER)/mono/eglib
+@ENABLE_MSVC_ONLY_FALSE@eglib_DATA = eglib-config.h
+@ENABLE_MSVC_ONLY_FALSE@libeglib_la_CFLAGS = -g -Wall -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
+@ENABLE_MSVC_ONLY_FALSE@AM_CPPFLAGS = -I$(srcdir)
+@ENABLE_MSVC_ONLY_FALSE@@HOST_ANDROID_FALSE@@HOST_WIN32_FALSE@libeglib_la_LIBADD = -lm $(LTLIBICONV)
+@ENABLE_MSVC_ONLY_FALSE@@HOST_ANDROID_FALSE@@HOST_WIN32_TRUE@libeglib_la_LIBADD = -lm -lpsapi $(LTLIBICONV)
+@ENABLE_MSVC_ONLY_FALSE@@HOST_ANDROID_TRUE@libeglib_la_LIBADD = -lm -llog
+@ENABLE_MSVC_ONLY_FALSE@MAINTAINERCLEANFILES = Makefile.in
+@ENABLE_MSVC_ONLY_FALSE@EXTRA_DIST = eglib-config.h.in $(win_files) $(unix_files)
all: all-recursive
.SUFFIXES:
@@ -661,7 +681,7 @@ clean-noinstLTLIBRARIES:
}
libeglib.la: $(libeglib_la_OBJECTS) $(libeglib_la_DEPENDENCIES) $(EXTRA_libeglib_la_DEPENDENCIES)
- $(AM_V_CCLD)$(libeglib_la_LINK) $(libeglib_la_OBJECTS) $(libeglib_la_LIBADD) $(LIBS)
+ $(AM_V_CCLD)$(libeglib_la_LINK) $(am_libeglib_la_rpath) $(libeglib_la_OBJECTS) $(libeglib_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -707,25 +727,22 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeglib_la-gutf8.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
@@ -1167,7 +1184,8 @@ distdir: $(DISTFILES)
done
check-am: all-am
check: check-recursive
-all-am: Makefile $(LTLIBRARIES) $(DATA)
+@ENABLE_MSVC_ONLY_FALSE@all-local:
+all-am: Makefile $(LTLIBRARIES) $(DATA) all-local
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(eglibdir)"; do \
@@ -1204,10 +1222,11 @@ maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+@ENABLE_MSVC_ONLY_FALSE@clean-local:
clean: clean-recursive
-clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
- mostlyclean-am
+clean-am: clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES mostlyclean-am
distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
@@ -1285,8 +1304,8 @@ uninstall-am: uninstall-eglibDATA
.MAKE: $(am__recursive_targets) install-am install-strip
-.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
- check-am clean clean-generic clean-libtool \
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \
+ check check-am clean clean-generic clean-libtool clean-local \
clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
@@ -1304,6 +1323,14 @@ uninstall-am: uninstall-eglibDATA
.PRECIOUS: Makefile
+@ENABLE_MSVC_ONLY_TRUE@all-local:
+
+@ENABLE_MSVC_ONLY_TRUE@ make -C $(top_srcdir)/msvc eglib
+
+@ENABLE_MSVC_ONLY_TRUE@clean-local:
+
+@ENABLE_MSVC_ONLY_TRUE@ make -C $(top_srcdir)/msvc clean-eglib
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/mono/eglib/eglib-remap.h b/mono/eglib/eglib-remap.h
index 43d6543b8d..0bbbcab2b9 100644
--- a/mono/eglib/eglib-remap.h
+++ b/mono/eglib/eglib-remap.h
@@ -16,6 +16,7 @@
#define g_array_set_size monoeg_g_array_set_size
#define g_array_sized_new monoeg_g_array_sized_new
#define g_ascii_strdown monoeg_g_ascii_strdown
+#define g_ascii_strdown_no_alloc monoeg_g_ascii_strdown_no_alloc
#define g_ascii_strncasecmp monoeg_g_ascii_strncasecmp
#define g_ascii_tolower monoeg_g_ascii_tolower
#define g_ascii_xdigit_value monoeg_g_ascii_xdigit_value
diff --git a/mono/eglib/gfile-posix.c b/mono/eglib/gfile-posix.c
index e927cf5d3f..c18850a862 100644
--- a/mono/eglib/gfile-posix.c
+++ b/mono/eglib/gfile-posix.c
@@ -141,7 +141,7 @@ g_file_open_tmp (const gchar *tmpl, gchar **name_used, GError **gerror)
return -1;
}
- t = g_build_filename (g_get_tmp_dir (), tmpl, NULL);
+ t = g_build_filename (g_get_tmp_dir (), tmpl, (const char*)NULL);
fd = mkstemp (t);
diff --git a/mono/eglib/gfile-win32.c b/mono/eglib/gfile-win32.c
index 61e23cbe44..43de30d473 100644
--- a/mono/eglib/gfile-win32.c
+++ b/mono/eglib/gfile-win32.c
@@ -114,11 +114,8 @@ g_file_test (const gchar *filename, GFileTest test)
}
if ((test & G_FILE_TEST_IS_EXECUTABLE) != 0) {
- size_t len = strlen (filename);
- if (len > 4 && strcmp (filename + len-3, "exe"))
- return TRUE;
-
- return FALSE;
+ /* Testing executable permission on Windows is hard, and this is unused, treat as EXISTS for now. */
+ return TRUE;
}
if ((test & G_FILE_TEST_IS_REGULAR) != 0) {
diff --git a/mono/eglib/glib.h b/mono/eglib/glib.h
index bbe5fae31f..cb8d46056a 100644
--- a/mono/eglib/glib.h
+++ b/mono/eglib/glib.h
@@ -403,6 +403,7 @@ gchar *g_stpcpy (gchar *dest, const char *src);
gchar g_ascii_tolower (gchar c);
gchar g_ascii_toupper (gchar c);
gchar *g_ascii_strdown (const gchar *str, gssize len);
+void g_ascii_strdown_no_alloc (char* dst, const char* src, gsize len);
gchar *g_ascii_strup (const gchar *str, gssize len);
gint g_ascii_strncasecmp (const gchar *s1, const gchar *s2, gsize n);
gint g_ascii_strcasecmp (const gchar *s1, const gchar *s2);
@@ -414,6 +415,32 @@ gint g_ascii_xdigit_value (gchar c);
gboolean g_utf16_ascii_equal (const gunichar2 *utf16, size_t ulen, const char *ascii, size_t alen);
gboolean g_utf16_asciiz_equal (const gunichar2 *utf16, const char *ascii);
+static inline
+gboolean g_ascii_equal (const char *s1, gsize len1, const char *s2, gsize len2)
+{
+ return len1 == len2 && (s1 == s2 || memcmp (s1, s2, len1) == 0);
+}
+
+static inline
+gboolean g_asciiz_equal (const char *s1, const char *s2)
+{
+ return s1 == s2 || strcmp (s1, s2) == 0;
+}
+
+static inline
+gboolean
+g_ascii_equal_caseinsensitive (const char *s1, gsize len1, const char *s2, gsize len2)
+{
+ return len1 == len2 && (s1 == s2 || g_ascii_strncasecmp (s1, s2, len1) == 0);
+}
+
+static inline
+gboolean
+g_asciiz_equal_caseinsensitive (const char *s1, const char *s2)
+{
+ return s1 == s2 || g_ascii_strcasecmp (s1, s2) == 0;
+}
+
/* FIXME: g_strcasecmp supports utf8 unicode stuff */
#ifdef _MSC_VER
#define g_strcasecmp _stricmp
@@ -1389,8 +1416,42 @@ glong g_utf8_pointer_to_offset (const gchar *str, const gchar *pos);
#define G_HAVE_API_SUPPORT(x) (x)
#define G_UNSUPPORTED_API "%s:%d: '%s' not supported.", __FILE__, __LINE__
#define g_unsupported_api(name) G_STMT_START { g_warning (G_UNSUPPORTED_API, name); } G_STMT_END
-
-G_END_DECLS
+
+// g_free the result
+// No MAX_PATH limit.
+gboolean
+mono_get_module_filename (gpointer mod, gunichar2 **pstr, guint32 *plength);
+
+// g_free the result
+// No MAX_PATH limit.
+gboolean
+mono_get_module_filename_ex (gpointer process, gpointer mod, gunichar2 **pstr, guint32 *plength);
+
+// g_free the result
+// No MAX_PATH limit.
+gboolean
+mono_get_module_basename (gpointer process, gpointer mod, gunichar2 **pstr, guint32 *plength);
+
+// g_free the result
+// No MAX_PATH limit.
+gboolean
+mono_get_current_directory (gunichar2 **pstr, guint32 *plength);
+
+G_END_DECLS // FIXME: There is more extern C than there should be.
+
+static inline
+void
+mono_qsort (void* base, size_t num, size_t size, int (*compare)(const void*, const void*))
+{
+ g_assert (compare);
+ g_assert (size);
+ if (num < 2 || !size || !base)
+ return;
+ qsort (base, num, size, compare);
+}
+
+#define MONO_DECL_CALLBACK(prefix, ret, name, sig) ret (*name) sig;
+#define MONO_INIT_CALLBACK(prefix, ret, name, sig) prefix ## _ ## name,
// For each allocator; i.e. returning gpointer that needs to be cast.
// Macros do not recurse, so naming function and macro the same is ok.
diff --git a/mono/eglib/glist.c b/mono/eglib/glist.c
index be473d9702..9fe1748133 100644
--- a/mono/eglib/glist.c
+++ b/mono/eglib/glist.c
@@ -36,7 +36,7 @@ g_list_alloc (void)
return g_new0 (GList, 1);
}
-static inline GList*
+static GList*
new_node (GList *prev, gpointer data, GList *next)
{
GList *node = g_list_alloc ();
@@ -50,7 +50,7 @@ new_node (GList *prev, gpointer data, GList *next)
return node;
}
-static inline GList*
+static GList*
disconnect_node (GList *node)
{
if (node->next)
diff --git a/mono/eglib/gmisc-win32.c b/mono/eglib/gmisc-win32.c
index 591c13a324..4efa27ff55 100644
--- a/mono/eglib/gmisc-win32.c
+++ b/mono/eglib/gmisc-win32.c
@@ -53,7 +53,8 @@ g_getenv(const gchar *variable)
gint32 buffer_size = 1024;
gint32 retval;
var = u8to16(variable);
- buffer = g_malloc(buffer_size*sizeof(gunichar2));
+ // FIXME This should loop in case another thread is growing the data.
+ buffer = g_new (gunichar2, buffer_size);
retval = GetEnvironmentVariableW (var, buffer, buffer_size);
if (retval != 0) {
if (retval > buffer_size) {
@@ -149,7 +150,7 @@ g_get_known_folder_path (void)
#else
-static inline gchar *
+static gchar *
g_get_known_folder_path (void)
{
return NULL;
diff --git a/mono/eglib/gmodule-unix.c b/mono/eglib/gmodule-unix.c
index 77f8b8dd51..4c0d53c208 100644
--- a/mono/eglib/gmodule-unix.c
+++ b/mono/eglib/gmodule-unix.c
@@ -100,6 +100,9 @@ g_module_close (GModule *module)
}
#elif defined (G_OS_WIN32)
+#ifndef PSAPI_VERSION
+#define PSAPI_VERSION 2 // Use the Windows 7 or newer version more directly.
+#endif
#include
#include
diff --git a/mono/eglib/gmodule-win32.c b/mono/eglib/gmodule-win32.c
index d0a18375c2..88dabf1f0f 100644
--- a/mono/eglib/gmodule-win32.c
+++ b/mono/eglib/gmodule-win32.c
@@ -30,6 +30,9 @@
*/
#include
#include
+#ifndef PSAPI_VERSION
+#define PSAPI_VERSION 2 // Use the Windows 7 or newer version more directly.
+#endif
#include
#include
#include
@@ -189,3 +192,155 @@ g_module_build_path (const gchar *directory, const gchar *module_name)
}
return g_strdup_printf ("%s%s" LIBSUFFIX, lib_prefix, module_name);
}
+
+// This is not about GModule but is still a close fit.
+// This is not named "g_" but that should be ok.
+// g_free the result
+// No MAX_PATH limit.
+//
+// Prefer mono_get_module_filename over mono_get_module_filename_ex and mono_get_module_basename.
+// Prefer not-ex, not-base.
+//
+gboolean
+mono_get_module_filename (gpointer mod, gunichar2 **pstr, guint32 *plength)
+{
+ gunichar2 *str = NULL;
+ guint32 capacity = MAX_PATH; // tunable
+ guint32 length = 0;
+ gboolean success = FALSE;
+
+ while (TRUE)
+ {
+ length = 0;
+ if (capacity > (1 << 24))
+ break;
+ str = g_new (gunichar2, capacity);
+ if (!str)
+ break;
+ length = GetModuleFileNameW ((HMODULE)mod, str, capacity);
+ success = length && length < (capacity - 1); // This function does not truncate, but - 1 anyway.
+ if (success)
+ break;
+ g_free (str); // error or too small
+ str = NULL;
+ if (!length) // error
+ break;
+ capacity *= 2;
+ }
+ *pstr = str;
+ *plength = length;
+ return success;
+}
+
+// This is not about GModule but is still a close fit.
+// This is not named "g_" but that should be ok.
+// g_free the result
+// No MAX_PATH limit.
+//
+// Prefer mono_get_module_filename over mono_get_module_filename_ex and mono_get_module_basename.
+// Prefer not-ex, not-base.
+//
+gboolean
+mono_get_module_filename_ex (gpointer process, gpointer mod, gunichar2 **pstr, guint32 *plength)
+{
+ gunichar2 *str = NULL;
+ guint32 capacity = MAX_PATH; // tunable
+ guint32 length = 0;
+ gboolean success = FALSE;
+
+ while (TRUE)
+ {
+ length = 0;
+ if (capacity > (1 << 24))
+ break;
+ str = g_new (gunichar2, capacity);
+ if (!str)
+ break;
+ length = GetModuleFileNameExW (process, (HMODULE)mod, str, capacity);
+ success = length && length < (capacity - 1); // This function truncates, thus the - 1.
+ if (success)
+ break;
+ g_free (str); // error or too small
+ str = NULL;
+ if (!length) // error
+ break;
+ capacity *= 2;
+ }
+ *pstr = str;
+ *plength = length;
+ return success;
+}
+
+// This is not about GModule but is still a close fit.
+// This is not named "g_" but that should be ok.
+// g_free the result
+// No MAX_PATH limit.
+//
+// Prefer mono_get_module_filename over mono_get_module_filename_ex and mono_get_module_basename.
+// Prefer not-ex, not-base.
+//
+gboolean
+mono_get_module_basename (gpointer process, gpointer mod, gunichar2 **pstr, guint32 *plength)
+{
+ gunichar2 *str = NULL;
+ guint32 capacity = MAX_PATH; // tunable
+ guint32 length = 0;
+ gboolean success = FALSE;
+
+ while (TRUE)
+ {
+ length = 0;
+ if (capacity > (1 << 24))
+ break;
+ str = g_new (gunichar2, capacity);
+ if (!str)
+ break;
+ length = GetModuleBaseNameW (process, (HMODULE)mod, str, capacity);
+ success = length && length < (capacity - 1); // This function truncates, thus the - 1.
+ if (success)
+ break;
+ g_free (str); // error or too small
+ str = NULL;
+ if (!length) // error
+ break;
+ capacity *= 2;
+ }
+ *pstr = str;
+ *plength = length;
+ return success;
+}
+
+// g_free the result
+// No MAX_PATH limit.
+gboolean
+mono_get_current_directory (gunichar2 **pstr, guint32 *plength)
+{
+ gunichar2 *str = NULL;
+ guint32 capacity = MAX_PATH; // tunable
+ guint32 length = 0;
+ gboolean success = FALSE;
+
+ while (TRUE)
+ {
+ length = 0;
+ if (capacity > (1 << 24))
+ break;
+ str = g_new (gunichar2, capacity);
+ if (!str)
+ break;
+ // Call in loop, not just twice, in case another thread is changing it.
+ // Result is transient in currentness and validity (can get deleted or become a file).
+ length = GetCurrentDirectoryW (capacity, str);
+ success = length && length < (capacity - 1);
+ if (success)
+ break;
+ g_free (str); // error or too small
+ str = NULL;
+ if (!length) // error
+ break;
+ capacity *= 2;
+ }
+ *pstr = str;
+ *plength = length;
+ return success;
+}
diff --git a/mono/eglib/gpath.c b/mono/eglib/gpath.c
index a5f07c18a2..f6ca10ec58 100644
--- a/mono/eglib/gpath.c
+++ b/mono/eglib/gpath.c
@@ -265,8 +265,8 @@ g_find_program_in_path (const gchar *program)
if (!hasSuffix) {
listx = 0;
while (suffix_list[listx]) {
- program_exe = g_strjoin(NULL,program,suffix_list[listx],NULL);
- probe_path = g_build_path (G_DIR_SEPARATOR_S, l, program_exe, NULL);
+ program_exe = g_strjoin (NULL, program, suffix_list [listx], (const char*)NULL);
+ probe_path = g_build_path (G_DIR_SEPARATOR_S, l, program_exe, (const char*)NULL);
#ifdef HAVE_ACCESS
if (g_access (probe_path, X_OK) == 0){ /* FIXME: on windows this is just a read permissions test */
g_free (curdir);
diff --git a/mono/eglib/gptrarray.c b/mono/eglib/gptrarray.c
index 8d08729858..d18d3e8ced 100644
--- a/mono/eglib/gptrarray.c
+++ b/mono/eglib/gptrarray.c
@@ -214,7 +214,7 @@ void
g_ptr_array_sort(GPtrArray *array, GCompareFunc compare)
{
g_return_if_fail(array != NULL);
- qsort(array->pdata, array->len, sizeof(gpointer), compare);
+ mono_qsort (array->pdata, array->len, sizeof(gpointer), compare);
}
void
diff --git a/mono/eglib/gslist.c b/mono/eglib/gslist.c
index 1293564df1..65744eaa73 100644
--- a/mono/eglib/gslist.c
+++ b/mono/eglib/gslist.c
@@ -63,7 +63,7 @@ g_slist_prepend (GSList *list, gpointer data)
* Insert the given data in a new node after the current node.
* Return new node.
*/
-static inline GSList *
+static GSList *
insert_after (GSList *list, gpointer data)
{
list->next = g_slist_prepend (list->next, data);
@@ -75,7 +75,7 @@ insert_after (GSList *list, gpointer data)
* If the list is empty, or the first node contains 'data', return NULL.
* If no node contains 'data', return the last node.
*/
-static inline GSList*
+static GSList*
find_prev (GSList *list, gconstpointer data)
{
GSList *prev = NULL;
@@ -89,7 +89,7 @@ find_prev (GSList *list, gconstpointer data)
}
/* like 'find_prev', but searches for node 'link' */
-static inline GSList*
+static GSList*
find_prev_link (GSList *list, GSList *link)
{
GSList *prev = NULL;
diff --git a/mono/eglib/gspawn.c b/mono/eglib/gspawn.c
index 9be865af3d..64ac161f71 100644
--- a/mono/eglib/gspawn.c
+++ b/mono/eglib/gspawn.c
@@ -96,7 +96,7 @@ extern char **environ;
G_END_DECLS
#endif
-#ifndef G_OS_WIN32
+#if !defined (G_OS_WIN32) && defined (HAVE_FORK) && defined (HAVE_EXECV)
static int
safe_read (int fd, gchar *buffer, gint count, GError **gerror)
{
@@ -135,21 +135,12 @@ read_pipes (int outfd, gchar **out_str, int errfd, gchar **err_str, GError **ger
if (out_closed && err_closed)
break;
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable:4389)
-#endif
-
FD_ZERO (&rfds);
if (!out_closed && outfd >= 0)
FD_SET (outfd, &rfds);
if (!err_closed && errfd >= 0)
FD_SET (errfd, &rfds);
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
res = select (MAX (outfd, errfd) + 1, &rfds, NULL, NULL, NULL);
if (res > 0) {
if (buffer == NULL)
@@ -203,7 +194,6 @@ create_pipe (int *fds, GError **gerror)
}
return TRUE;
}
-#endif /* G_OS_WIN32 */
static int
write_all (int fd, const void *vbuf, size_t n)
@@ -225,6 +215,7 @@ write_all (int fd, const void *vbuf, size_t n)
return nwritten;
}
+#endif /* !defined (G_OS_WIN32) && defined (HAVE_FORK) && defined (HAVE_EXECV) */
#if !defined(G_OS_WIN32) && defined(HAVE_GETDTABLESIZE)
int
@@ -257,6 +248,7 @@ g_spawn_command_line_sync (const gchar *command_line,
GError **gerror)
{
#ifdef G_OS_WIN32
+ return TRUE;
#elif !defined (HAVE_FORK) || !defined (HAVE_EXECV)
fprintf (stderr, "g_spawn_command_line_sync not supported on this platform\n");
return FALSE;
@@ -334,8 +326,8 @@ g_spawn_command_line_sync (const gchar *command_line,
if (WIFEXITED (status) && exit_status) {
*exit_status = WEXITSTATUS (status);
}
-#endif
return TRUE;
+#endif
}
/*
@@ -356,6 +348,7 @@ g_spawn_async_with_pipes (const gchar *working_directory,
GError **gerror)
{
#ifdef G_OS_WIN32
+ return TRUE;
#elif !defined (HAVE_FORK) || !defined (HAVE_EXECVE)
fprintf (stderr, "g_spawn_async_with_pipes is not supported on this platform\n");
return FALSE;
@@ -528,8 +521,6 @@ g_spawn_async_with_pipes (const gchar *working_directory,
*standard_output = out_pipe [0];
if (standard_error)
*standard_error = err_pipe [0];
-#endif
return TRUE;
+#endif
}
-
-
diff --git a/mono/eglib/gstr.c b/mono/eglib/gstr.c
index 758aeb0179..f028501f12 100644
--- a/mono/eglib/gstr.c
+++ b/mono/eglib/gstr.c
@@ -821,11 +821,20 @@ g_ascii_tolower (gchar c)
return c >= 'A' && c <= 'Z' ? c + ('a' - 'A') : c;
}
+void
+g_ascii_strdown_no_alloc (char* dst, const char* src, gsize len)
+{
+ // dst can equal src. no_alloc means this function does no
+ // allocation; caller may very well.
+
+ for (gsize i = 0; i < len; ++i)
+ dst [i] = g_ascii_tolower (src [i]);
+}
+
gchar *
g_ascii_strdown (const gchar *str, gssize len)
{
char *ret;
- int i;
g_return_val_if_fail (str != NULL, NULL);
@@ -833,9 +842,8 @@ g_ascii_strdown (const gchar *str, gssize len)
len = strlen (str);
ret = g_malloc (len + 1);
- for (i = 0; i < len; i++)
- ret [i] = (guchar) g_ascii_tolower (str [i]);
- ret [i] = 0;
+ g_ascii_strdown_no_alloc (ret, str, len);
+ ret [len] = 0;
return ret;
}
@@ -859,26 +867,50 @@ g_ascii_strup (const gchar *str, gssize len)
ret = g_malloc (len + 1);
for (i = 0; i < len; i++)
- ret [i] = (guchar) g_ascii_toupper (str [i]);
+ ret [i] = g_ascii_toupper (str [i]);
ret [i] = 0;
return ret;
}
+static
+int
+g_ascii_charcmp (char c1, char c2)
+{
+ // Do not subtract, to avoid overflow.
+ // Use unsigned to mimic strcmp, and so
+ // shorter strings compare as less.
+
+ const guchar u1 = (guchar)c1;
+ const guchar u2 = (guchar)c2;
+ return (u1 < u2) ? -1 : (u1 > u2) ? 1 : 0;
+}
+
+static
+int
+g_ascii_charcasecmp (char c1, char c2)
+{
+ return g_ascii_charcmp (g_ascii_tolower (c1), g_ascii_tolower (c2));
+}
+
gint
g_ascii_strncasecmp (const gchar *s1, const gchar *s2, gsize n)
{
+ // Unlike strncmp etc. this function does not stop at nul,
+ // unless there is a mismatch.
+
+ if (s1 == s2)
+ return 0;
+
gsize i;
-
+
g_return_val_if_fail (s1 != NULL, 0);
g_return_val_if_fail (s2 != NULL, 0);
for (i = 0; i < n; i++) {
- gchar c1 = g_ascii_tolower (*s1++);
- gchar c2 = g_ascii_tolower (*s2++);
-
- if (c1 != c2)
- return c1 - c2;
+ const int j = g_ascii_charcasecmp (*s1++, *s2++);
+ if (j)
+ return j;
}
return 0;
@@ -887,21 +919,22 @@ g_ascii_strncasecmp (const gchar *s1, const gchar *s2, gsize n)
gint
g_ascii_strcasecmp (const gchar *s1, const gchar *s2)
{
- const char *sp1 = s1;
- const char *sp2 = s2;
-
+ if (s1 == s2)
+ return 0;
+
g_return_val_if_fail (s1 != NULL, 0);
g_return_val_if_fail (s2 != NULL, 0);
-
- while (*sp1 != '\0') {
- char c1 = g_ascii_tolower (*sp1++);
- char c2 = g_ascii_tolower (*sp2++);
-
- if (c1 != c2)
- return c1 - c2;
+
+ char c1;
+
+ while ((c1 = *s1)) {
+ ++s1;
+ const int j = g_ascii_charcasecmp (c1, *s2++);
+ if (j)
+ return j;
}
-
- return (*sp1) - (*sp2);
+
+ return g_ascii_charcmp (0, *s2);
}
gboolean
diff --git a/mono/eglib/test/Makefile.am b/mono/eglib/test/Makefile.am
index d9cc587e93..68b68d66a4 100644
--- a/mono/eglib/test/Makefile.am
+++ b/mono/eglib/test/Makefile.am
@@ -41,15 +41,24 @@ CXXFLAGS += $(GLIB_TEST_FLAGS_COMMON) @CXXFLAGS_COMMON@
test_eglib_LDADD = ../libeglib.la $(LTLIBICONV)
assertf_LDADD = ../libeglib.la $(LTLIBICONV)
-# Something amiss with subdirs ordering?
-../libeglib.la: ../goutput.c # etc
- $(MAKE) -C .. $(@F)
+abs_srcdir = $(abspath $(srcdir))
-run-eglib: all
- srcdir=`readlink -f $(srcdir)` ./test-eglib
+if DISABLE_EXECUTABLES
+run-eglib:
+else
+# FIXME: Various unit tests are broken on Win32, see https://github.com/mono/mono/issues/16576
+if HOST_WIN32
+run-eglib:
+else
+run-eglib:
+ srcdir="$(abs_srcdir)" ./test-eglib
noinst_PROGRAMS = test-eglib assertf
+endif # !HOST_WIN32
+endif # DISABLE_EXECUTABLES
run-both: run-eglib
+check-local: run-both
+
MAINTAINERCLEANFILES = Makefile.in
diff --git a/mono/eglib/test/Makefile.in b/mono/eglib/test/Makefile.in
index a6ec36cc06..923d454575 100644
--- a/mono/eglib/test/Makefile.in
+++ b/mono/eglib/test/Makefile.in
@@ -89,7 +89,8 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
-noinst_PROGRAMS = test-eglib$(EXEEXT) assertf$(EXEEXT)
+@DISABLE_EXECUTABLES_FALSE@@HOST_WIN32_FALSE@noinst_PROGRAMS = test-eglib$(EXEEXT) \
+@DISABLE_EXECUTABLES_FALSE@@HOST_WIN32_FALSE@ assertf$(EXEEXT)
subdir = mono/eglib/test
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/apple-target.m4 \
@@ -285,6 +286,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERP_CFLAGS = @INTERP_CFLAGS@
INTL = @INTL@
INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
@@ -394,7 +396,7 @@ XINERAMA = @XINERAMA@
XMKMF = @XMKMF@
ZLIB_CFLAGS = @ZLIB_CFLAGS@
abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
+abs_srcdir = $(abspath $(srcdir))
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
@@ -597,49 +599,43 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
.cpp.o:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
.cpp.obj:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
-@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cpp.lo:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
-@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
@@ -735,6 +731,7 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-local
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
@@ -848,11 +845,11 @@ test-bundle-am: test-bundle-local
uninstall-am:
-.MAKE: install-am install-strip
+.MAKE: check-am install-am install-strip
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
- clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
- ctags-am distclean distclean-compile distclean-generic \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \
+ clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
@@ -868,15 +865,16 @@ uninstall-am:
.PRECIOUS: Makefile
-# Something amiss with subdirs ordering?
-../libeglib.la: ../goutput.c # etc
- $(MAKE) -C .. $(@F)
-
-run-eglib: all
- srcdir=`readlink -f $(srcdir)` ./test-eglib
+@DISABLE_EXECUTABLES_TRUE@run-eglib:
+# FIXME: Various unit tests are broken on Win32, see https://github.com/mono/mono/issues/16576
+@DISABLE_EXECUTABLES_FALSE@@HOST_WIN32_TRUE@run-eglib:
+@DISABLE_EXECUTABLES_FALSE@@HOST_WIN32_FALSE@run-eglib:
+@DISABLE_EXECUTABLES_FALSE@@HOST_WIN32_FALSE@ srcdir="$(abs_srcdir)" ./test-eglib
run-both: run-eglib
+check-local: run-both
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/mono/eglib/test/file.c b/mono/eglib/test/file.c
index feb8d9b5a9..88023c345a 100644
--- a/mono/eglib/test/file.c
+++ b/mono/eglib/test/file.c
@@ -174,7 +174,7 @@ test_file (void)
return FAILED ("3 %s should not be a symlink", path);
#ifndef G_OS_WIN32 /* FIXME */
- sympath = g_strconcat (path, "-link", NULL);
+ sympath = g_strconcat (path, "-link", (const char*)NULL);
ignored = symlink (path, sympath);
res = g_file_test (sympath, G_FILE_TEST_EXISTS);
if (!res)
diff --git a/mono/eglib/test/module.c b/mono/eglib/test/module.c
index 75000c55ee..94b8340b0e 100644
--- a/mono/eglib/test/module.c
+++ b/mono/eglib/test/module.c
@@ -14,6 +14,15 @@
#define EXTERNAL_SYMBOL "system"
#endif
+#if _WIN32
+#ifndef PSAPI_VERSION
+#define PSAPI_VERSION 2 // Use the Windows 7 or newer version more directly.
+#endif
+#include
+#include
+#include
+#endif
+
void G_MODULE_EXPORT
dummy_test_export (void);
@@ -57,8 +66,100 @@ test_module_symbol_null (void)
return OK;
}
+static RESULT
+test_module_get_module_filename (void)
+{
+#if _WIN32
+ const HMODULE mods [ ] = {NULL, LoadLibraryW (L"msvcrt.dll"), (HMODULE)(gssize)-1 };
+
+ for (int i = 0; i < G_N_ELEMENTS (mods); ++i) {
+ const HMODULE mod = mods [i];
+ for (int j = 0; j <= 2; ++j) {
+ wchar_t* str = { 0 };
+ guint32 length = { 0 };
+ wchar_t buf2 [999] = { 0 };
+ wchar_t buf3 [2] = { 0 };
+ gboolean success = { 0 };
+ guint32 length2 = { 0 };
+ gboolean success2 = { 0 };
+ guint32 length3 = { 0 };
+ gboolean success3 = { 0 };
+
+ switch (j) {
+ case 0:
+ success = mono_get_module_filename (mod, &str, &length);
+ length2 = GetModuleFileNameW (mod, buf2, G_N_ELEMENTS (buf2)); // large buf
+ length3 = GetModuleFileNameW (mod, buf3, 1); // small buf
+ break;
+ case 1:
+ success = mono_get_module_filename_ex (GetCurrentProcess (), mods [i], &str, &length);
+ length2 = GetModuleFileNameExW (GetCurrentProcess (), mod, buf2, G_N_ELEMENTS (buf2)); // large buf
+ length3 = GetModuleFileNameExW (GetCurrentProcess (), mod, buf3, 1); // small buf
+ break;
+ case 2:
+ success = mono_get_module_basename (GetCurrentProcess (), mod, &str, &length);
+ length2 = GetModuleBaseNameW (GetCurrentProcess (), mod, buf2, G_N_ELEMENTS (buf2)); // large buf
+ length3 = GetModuleBaseNameW (GetCurrentProcess (), mod, buf3, 1); // small buf
+ break;
+ }
+ success2 = length2 && length2 < G_N_ELEMENTS (buf2);
+ success3 = length3 == 1;
+ printf ("j:%d s:%X s2:%X s3:%X l:%u l2:%u l3:%u str:%X b2:%X b3:%X\n",
+ j,
+ success, success2, success3,
+ length, length2, length3,
+ str ? str [0] : 0, buf2 [0], buf3 [0]);
+ g_assert (success == success2);
+ g_assert (success == success3 || j > 0);
+ g_assert (!success || str [0] == buf2 [0]);
+ //g_assert (!success || str [0] == buf3 [0]);
+ g_assert (length3 == 0 || length3 == 1);
+ g_assert (length == (success2 ? wcslen (buf2) :0));
+ g_assert (!success || !wcscmp (str, buf2));
+ g_assert (!success || str);
+ if (success)
+ printf ("%p %ls %ls %d %d\n", mod, str, buf2, length, length2);
+ else
+ printf ("!%p %u\n", str, (guint)length);
+ g_free (str);
+ }
+ }
+#endif
+ return OK;
+}
+
+static RESULT
+test_get_current_directory (void)
+{
+#if _WIN32
+ wchar_t* str = { 0 };
+ guint32 length = { 0 };
+ gboolean success = mono_get_current_directory (&str, &length);
+ wchar_t buf2 [999] = { 0 };
+ const int length2 = GetCurrentDirectoryW (G_N_ELEMENTS (buf2), buf2);
+ const gboolean success2 = length2 && length2 < G_N_ELEMENTS (buf2);
+ wchar_t buf3 [2] = { 0 };
+ const int length3 = GetCurrentDirectoryW (G_N_ELEMENTS (buf3), buf3);
+ const gboolean success3 = length3 > 0;
+ printf ("s:%X s2:%X s3:%X str:%X b2:%X b3:%X\n", success, success2, success3, str ? str [0] : 0, buf2 [0], buf3 [0]);
+ g_assert (length == length2);
+ g_assert (success == success2);
+ g_assert (success == success3);
+ g_assert (!success || !wcscmp (str, buf2));
+ g_assert (!success || str);
+ if (success)
+ printf ("%ls\n%ls\n", str, buf2);
+ else
+ printf ("!%p %u\n", str, (guint)length);
+ g_free (str);
+#endif
+ return OK;
+}
+
static Test module_tests [] = {
{"g_module_symbol_null", test_module_symbol_null},
+ {"module_get_module_filename", test_module_get_module_filename},
+ {"get_current_directory", test_get_current_directory},
{NULL, NULL}
};
diff --git a/mono/eglib/test/path.c b/mono/eglib/test/path.c
index 20d4626863..bd62bb7d78 100644
--- a/mono/eglib/test/path.c
+++ b/mono/eglib/test/path.c
@@ -23,80 +23,80 @@ test_buildpath (void)
const char *buffer = "var/private";
const char *dir = "/";
- s = g_build_path ("/", "hola///", "//mundo", NULL);
+ s = g_build_path ("/", "hola///", "//mundo", (const char*)NULL);
if (strcmp (s, "hola/mundo") != 0)
return FAILED ("1 Got wrong result, got: %s", s);
g_free (s);
- s = g_build_path ("/", "hola/", "/mundo", NULL);
+ s = g_build_path ("/", "hola/", "/mundo", (const char*)NULL);
if (strcmp (s, "hola/mundo") != 0)
return FAILED ("2 Got wrong result, got: %s", s);
g_free (s);
- s = g_build_path ("/", "hola/", "mundo", NULL);
+ s = g_build_path ("/", "hola/", "mundo", (const char*)NULL);
if (strcmp (s, "hola/mundo") != 0)
return FAILED ("3 Got wrong result, got: %s", s);
g_free (s);
- s = g_build_path ("/", "hola", "/mundo", NULL);
+ s = g_build_path ("/", "hola", "/mundo", (const char*)NULL);
if (strcmp (s, "hola/mundo") != 0)
return FAILED ("4 Got wrong result, got: %s", s);
g_free (s);
- s = g_build_path ("/", "/hello", "world/", NULL);
+ s = g_build_path ("/", "/hello", "world/", (const char*)NULL);
if (strcmp (s, "/hello/world/") != 0)
return FAILED ("5 Got wrong result, got: %s", s);
g_free (s);
/* Now test multi-char-separators */
- s = g_build_path ("**", "hello", "world", NULL);
+ s = g_build_path ("**", "hello", "world", (const char*)NULL);
if (strcmp (s, "hello**world") != 0)
return FAILED ("6 Got wrong result, got: %s", s);
g_free (s);
- s = g_build_path ("**", "hello**", "world", NULL);
+ s = g_build_path ("**", "hello**", "world", (const char*)NULL);
if (strcmp (s, "hello**world") != 0)
return FAILED ("7 Got wrong result, got: %s", s);
g_free (s);
- s = g_build_path ("**", "hello**", "**world", NULL);
+ s = g_build_path ("**", "hello**", "**world", (const char*)NULL);
if (strcmp (s, "hello**world") != 0)
return FAILED ("8 Got wrong result, got: %s", s);
g_free (s);
- s = g_build_path ("**", "hello**", "**world", NULL);
+ s = g_build_path ("**", "hello**", "**world", (const char*)NULL);
if (strcmp (s, "hello**world") != 0)
return FAILED ("9 Got wrong result, got: %s", s);
g_free (s);
- s = g_build_path ("1234567890", "hello", "world", NULL);
+ s = g_build_path ("1234567890", "hello", "world", (const char*)NULL);
if (strcmp (s, "hello1234567890world") != 0)
return FAILED ("10 Got wrong result, got: %s", s);
g_free (s);
- s = g_build_path ("1234567890", "hello1234567890", "1234567890world", NULL);
+ s = g_build_path ("1234567890", "hello1234567890", "1234567890world", (const char*)NULL);
if (strcmp (s, "hello1234567890world") != 0)
return FAILED ("11 Got wrong result, got: %s", s);
g_free (s);
- s = g_build_path ("1234567890", "hello12345678901234567890", "1234567890world", NULL);
+ s = g_build_path ("1234567890", "hello12345678901234567890", "1234567890world", (const char*)NULL);
if (strcmp (s, "hello1234567890world") != 0)
return FAILED ("12 Got wrong result, got: %s", s);
g_free (s);
/* Multiple */
- s = g_build_path ("/", "a", "b", "c", "d", NULL);
+ s = g_build_path ("/", "a", "b", "c", "d", (const char*)NULL);
if (strcmp (s, "a/b/c/d") != 0)
return FAILED ("13 Got wrong result, got: %s", s);
g_free (s);
- s = g_build_path ("/", "/a", "", "/c/", NULL);
+ s = g_build_path ("/", "/a", "", "/c/", (const char*)NULL);
if (strcmp (s, "/a/c/") != 0)
return FAILED ("14 Got wrong result, got: %s", s);
g_free (s);
/* Null */
- s = g_build_path ("/", NULL, NULL);
+ s = g_build_path ("/", NULL, (const char*)NULL);
if (s == NULL)
return FAILED ("must get a non-NULL return");
if (s [0] != 0)
@@ -107,7 +107,7 @@ test_buildpath (void)
// and caused all kinds of random errors.
dir = "//";
dir++;
- s = g_build_filename (dir, buffer, NULL);
+ s = g_build_filename (dir, buffer, (const char*)NULL);
if (s [0] != '/')
return FAILED ("Must have a '/' at the start");
@@ -120,7 +120,7 @@ test_buildfname (void)
{
char *s;
- s = g_build_filename ("a", "b", "c", "d", NULL);
+ s = g_build_filename ("a", "b", "c", "d", (const char*)NULL);
#ifdef G_OS_WIN32
if (strcmp (s, "a\\b\\c\\d") != 0)
#else
@@ -130,16 +130,16 @@ test_buildfname (void)
g_free (s);
#ifdef G_OS_WIN32
- s = g_build_filename ("C:\\", "a", NULL);
+ s = g_build_filename ("C:\\", "a", (const char*)NULL);
if (strcmp (s, "C:\\a") != 0)
#else
- s = g_build_filename ("/", "a", NULL);
+ s = g_build_filename ("/", "a", (const char*)NULL);
if (strcmp (s, "/a") != 0)
#endif
return FAILED ("1 Got wrong result, got: %s", s);
#ifndef G_OS_WIN32
- s = g_build_filename ("/", "foo", "/bar", "tolo/", "/meo/", NULL);
+ s = g_build_filename ("/", "foo", "/bar", "tolo/", "/meo/", (const char*)NULL);
if (strcmp (s, "/foo/bar/tolo/meo/") != 0)
return FAILED ("1 Got wrong result, got: %s", s);
#endif
diff --git a/mono/eglib/test/string-util.c b/mono/eglib/test/string-util.c
index 7b5b7af32c..fb447229ef 100644
--- a/mono/eglib/test/string-util.c
+++ b/mono/eglib/test/string-util.c
@@ -22,7 +22,7 @@ test_strfreev (void)
static RESULT
test_concat (void)
{
- gchar *x = g_strconcat ("Hello", ", ", "world", NULL);
+ gchar *x = g_strconcat ("Hello", ", ", "world", (const char*)NULL);
if (strcmp (x, "Hello, world") != 0)
return FAILED("concat failed, got: %s", x);
g_free (x);
@@ -344,27 +344,27 @@ test_strjoin (void)
{
char *s;
- s = g_strjoin (NULL, "a", "b", NULL);
+ s = g_strjoin (NULL, "a", "b", (const char*)NULL);
if (strcmp (s, "ab") != 0)
return FAILED ("Join of two strings with no separator fails");
g_free (s);
- s = g_strjoin ("", "a", "b", NULL);
+ s = g_strjoin ("", "a", "b", (const char*)NULL);
if (strcmp (s, "ab") != 0)
return FAILED ("Join of two strings with empty separator fails");
g_free (s);
- s = g_strjoin ("-", "a", "b", NULL);
+ s = g_strjoin ("-", "a", "b", (const char*)NULL);
if (strcmp (s, "a-b") != 0)
return FAILED ("Join of two strings with separator fails");
g_free (s);
- s = g_strjoin ("-", "aaaa", "bbbb", "cccc", "dddd", NULL);
+ s = g_strjoin ("-", "aaaa", "bbbb", "cccc", "dddd", (const char*)NULL);
if (strcmp (s, "aaaa-bbbb-cccc-dddd") != 0)
return FAILED ("Join of multiple strings fails");
g_free (s);
- s = g_strjoin ("-", NULL);
+ s = g_strjoin ("-", (const char*)NULL);
if (s == NULL || (strcmp (s, "") != 0))
return FAILED ("Failed to join empty arguments");
g_free (s);
@@ -624,12 +624,12 @@ test_ascii_strncasecmp (void)
return FAILED ("Should have been 0");
n = g_ascii_strncasecmp ("423", "123", 1);
- if (n != 3)
- return FAILED ("Should have been 3, got %d", n);
+ if (n <= 0)
+ return FAILED ("Should have been > 0, got %d", n);
n = g_ascii_strncasecmp ("123", "423", 1);
- if (n != -3)
- return FAILED ("Should have been -3, got %d", n);
+ if (n >= 0)
+ return FAILED ("Should have been < 0, got %d", n);
n = g_ascii_strncasecmp ("1", "1", 10);
if (n != 0)
diff --git a/mono/metadata/Makefile.am b/mono/metadata/Makefile.am
index 2d7cca46cf..0ca4f7a5fc 100644
--- a/mono/metadata/Makefile.am
+++ b/mono/metadata/Makefile.am
@@ -1,5 +1,7 @@
include $(top_srcdir)/mk/common.mk
+if !ENABLE_MSVC_ONLY
+
if HOST_WIN32
win32_sources = \
console-win32.c \
@@ -336,7 +338,6 @@ common_sources = \
mono-perfcounters-def.h \
mono-ptr-array.h \
mono-route.c \
- mono-route.h \
monitor.h \
normalization-tables.h \
number-formatter.h \
@@ -376,6 +377,7 @@ common_sources = \
threads-types.h \
threadpool.c \
threadpool.h \
+ threadpool-netcore.c \
threadpool-worker.h \
threadpool-io.c \
threadpool-io.h \
@@ -446,10 +448,14 @@ sgen_sources = \
sgen-mono.h \
sgen-client-mono.h
+endif # !ENABLE_MSVC_ONLY
+
# Per-library to workaround CoreFX/native until/unless https://github.com/dotnet/corefx/pull/31342.
#CFLAGS := $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@) @CXX_ADD_CFLAGS@
CFLAGS := $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@)
+if !ENABLE_MSVC_ONLY
+
libmonoruntime_la_SOURCES = $(common_sources) $(icall_tables_sources) $(ilgen_sources) $(gc_dependent_sources) $(null_gc_sources) $(boehm_sources)
# Add CXX_ADD_CFLAGS per-library until/unless https://github.com/dotnet/corefx/pull/31342.
libmonoruntime_la_CFLAGS = $(BOEHM_DEFINES) @CXX_ADD_CFLAGS@
@@ -460,6 +466,8 @@ libmonoruntimesgen_la_SOURCES = $(common_sources) $(icall_tables_sources) $(ilge
libmonoruntimesgen_la_CFLAGS = $(SGEN_DEFINES) @CXX_ADD_CFLAGS@
libmonoruntimesgen_la_LIBADD = libmonoruntime-config.la libmonoruntime-support.la
+endif # !ENABLE_MSVC_ONLY
+
libmonoruntimeincludedir = $(includedir)/mono-$(API_VER)/mono/metadata
# This list is sorted for easier searching.
@@ -494,6 +502,22 @@ libmonoruntimeinclude_HEADERS = \
tokentype.h \
verify.h
+if !ENABLE_MSVC_ONLY
+
EXTRA_DIST = $(null_sources) \
external-only.c \
threadpool-io-poll.c threadpool-io-epoll.c threadpool-io-kqueue.c
+
+endif # !ENABLE_MSVC_ONLY
+
+if ENABLE_MSVC_ONLY
+
+all-local:
+
+ make -C $(top_srcdir)/msvc libmonoruntime
+
+clean-local:
+
+ make -C $(top_srcdir)/msvc clean-libmonoruntime
+
+endif # ENABLE_MSVC_ONLY
diff --git a/mono/metadata/Makefile.in.REMOVED.git-id b/mono/metadata/Makefile.in.REMOVED.git-id
index d8dda21aa7..34be423ba4 100644
--- a/mono/metadata/Makefile.in.REMOVED.git-id
+++ b/mono/metadata/Makefile.in.REMOVED.git-id
@@ -1 +1 @@
-8ab54e44f984de3b1822772daa64ce40a6c423c3
\ No newline at end of file
+b9c8e398458b79f24d4fa97300b2d430d23efd95
\ No newline at end of file
diff --git a/mono/metadata/appdomain.c b/mono/metadata/appdomain.c
deleted file mode 100644
index c41c1a43d3..0000000000
--- a/mono/metadata/appdomain.c
+++ /dev/null
@@ -1,3348 +0,0 @@
-/**
- * \file
- * AppDomain functions
- *
- * Authors:
- * Dietmar Maurer (dietmar@ximian.com)
- * Patrik Torstensson
- * Gonzalo Paniagua Javier (gonzalo@ximian.com)
- *
- * Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
- * Copyright 2004-2009 Novell, Inc (http://www.novell.com)
- * Copyright 2012 Xamarin Inc
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-#undef ASSEMBLY_LOAD_DEBUG
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#ifdef HAVE_SYS_TIME_H
-#include
-#endif
-#ifdef HAVE_UNISTD_H
-#include
-#endif
-#ifdef HAVE_UTIME_H
-#include
-#else
-#ifdef HAVE_SYS_UTIME_H
-#include
-#endif
-#endif
-
-#include
-#include
-#include
-#include
-#include
-#include "mono/metadata/metadata-internals.h"
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#ifdef HOST_WIN32
-#include
-#endif
-#include "object-internals.h"
-#include "icall-decl.h"
-
-typedef struct
-{
- int runtime_count;
- int assemblybinding_count;
- MonoDomain *domain;
- gchar *filename;
-} RuntimeConfig;
-
-static gunichar2 process_guid [36];
-static gboolean process_guid_set = FALSE;
-
-static gboolean no_exec = FALSE;
-
-#ifdef ENABLE_NETCORE
-static int n_appctx_props;
-static char **appctx_keys;
-static char **appctx_values;
-#endif
-
-static const char *
-mono_check_corlib_version_internal (void);
-
-static MonoAssembly *
-mono_domain_assembly_preload (MonoAssemblyLoadContext *alc,
- MonoAssemblyName *aname,
- gchar **assemblies_path,
- gboolean refonly,
- gpointer user_data,
- MonoError *error);
-
-static MonoAssembly *
-mono_domain_assembly_search (MonoAssemblyLoadContext *alc, MonoAssembly *requesting,
- MonoAssemblyName *aname,
- gboolean refonly,
- gboolean postload,
- gpointer user_data,
- MonoError *error);
-
-
-static void
-mono_domain_fire_assembly_load (MonoAssembly *assembly, gpointer user_data);
-
-static gboolean
-mono_domain_asmctx_from_path (const char *fname, MonoAssembly *requesting_assembly, gpointer user_data, MonoAssemblyContextKind *out_asmctx);
-
-static void
-add_assemblies_to_domain (MonoDomain *domain, MonoAssembly *ass, GHashTable *hash);
-
-static void
-add_assembly_to_alc (MonoAssemblyLoadContext *alc, MonoAssembly *ass);
-
-static MonoAppDomainHandle
-mono_domain_create_appdomain_internal (char *friendly_name, MonoAppDomainSetupHandle setup, MonoError *error);
-
-static MonoDomain *
-mono_domain_create_appdomain_checked (char *friendly_name, char *configuration_file, MonoError *error);
-
-
-static void
-mono_context_set_default_context (MonoDomain *domain);
-
-static char *
-get_shadow_assembly_location_base (MonoDomain *domain, MonoError *error);
-
-static MonoLoadFunc load_function = NULL;
-
-/* Lazy class loading functions */
-static GENERATE_GET_CLASS_WITH_CACHE (assembly, "System.Reflection", "Assembly");
-
-GENERATE_GET_CLASS_WITH_CACHE (appdomain, MONO_APPDOMAIN_CLASS_NAME_SPACE, MONO_APPDOMAIN_CLASS_NAME);
-GENERATE_GET_CLASS_WITH_CACHE (appdomain_setup, MONO_APPDOMAIN_SETUP_CLASS_NAME_SPACE, MONO_APPDOMAIN_SETUP_CLASS_NAME);
-
-static MonoDomain *
-mono_domain_from_appdomain_handle (MonoAppDomainHandle appdomain);
-
-static void
-mono_error_set_appdomain_unloaded (MonoError *error)
-{
- mono_error_set_generic_error (error, "System", "AppDomainUnloadedException", "");
-}
-
-void
-mono_install_runtime_load (MonoLoadFunc func)
-{
- load_function = func;
-}
-
-MonoDomain*
-mono_runtime_load (const char *filename, const char *runtime_version)
-{
- g_assert (load_function);
- return load_function (filename, runtime_version);
-}
-
-/**
- * mono_runtime_set_no_exec:
- *
- * Instructs the runtime to operate in static mode, i.e. avoid/do not
- * allow managed code execution. This is useful for running the AOT
- * compiler on platforms which allow full-aot execution only. This
- * should be called before mono_runtime_init ().
- */
-void
-mono_runtime_set_no_exec (gboolean val)
-{
- no_exec = val;
-}
-
-/**
- * mono_runtime_get_no_exec:
- *
- * If true, then the runtime will not allow managed code execution.
- */
-gboolean
-mono_runtime_get_no_exec (void)
-{
- return no_exec;
-}
-
-static void
-create_domain_objects (MonoDomain *domain)
-{
- HANDLE_FUNCTION_ENTER ();
- ERROR_DECL (error);
-
- MonoDomain *old_domain = mono_domain_get ();
- MonoStringHandle arg;
- MonoVTable *string_vt;
- MonoClassField *string_empty_fld;
-
- if (domain != old_domain) {
- mono_thread_push_appdomain_ref (domain);
- mono_domain_set_internal_with_options (domain, FALSE);
- }
-
- /*
- * Initialize String.Empty. This enables the removal of
- * the static cctor of the String class.
- */
- string_vt = mono_class_vtable_checked (domain, mono_defaults.string_class, error);
- mono_error_assert_ok (error);
- string_empty_fld = mono_class_get_field_from_name_full (mono_defaults.string_class, "Empty", NULL);
- g_assert (string_empty_fld);
- MonoStringHandle empty_str = mono_string_new_handle (domain, "", error);
- mono_error_assert_ok (error);
- empty_str = mono_string_intern_checked (empty_str, error);
- mono_error_assert_ok (error);
- mono_field_static_set_value_internal (string_vt, string_empty_fld, MONO_HANDLE_RAW (empty_str));
- domain->empty_string = MONO_HANDLE_RAW (empty_str);
-
- /*
- * Create an instance early since we can't do it when there is no memory.
- */
- arg = mono_string_new_handle (domain, "Out of memory", error);
- mono_error_assert_ok (error);
- domain->out_of_memory_ex = MONO_HANDLE_RAW (mono_exception_from_name_two_strings_checked (mono_defaults.corlib, "System", "OutOfMemoryException", arg, NULL_HANDLE_STRING, error));
- mono_error_assert_ok (error);
-
- /*
- * These two are needed because the signal handlers might be executing on
- * an alternate stack, and Boehm GC can't handle that.
- */
- arg = mono_string_new_handle (domain, "A null value was found where an object instance was required", error);
- mono_error_assert_ok (error);
- domain->null_reference_ex = MONO_HANDLE_RAW (mono_exception_from_name_two_strings_checked (mono_defaults.corlib, "System", "NullReferenceException", arg, NULL_HANDLE_STRING, error));
- mono_error_assert_ok (error);
- arg = mono_string_new_handle (domain, "The requested operation caused a stack overflow.", error);
- mono_error_assert_ok (error);
- domain->stack_overflow_ex = MONO_HANDLE_RAW (mono_exception_from_name_two_strings_checked (mono_defaults.corlib, "System", "StackOverflowException", arg, NULL_HANDLE_STRING, error));
- mono_error_assert_ok (error);
-
- /*The ephemeron tombstone i*/
- domain->ephemeron_tombstone = MONO_HANDLE_RAW (mono_object_new_handle (domain, mono_defaults.object_class, error));
- mono_error_assert_ok (error);
-
- if (domain != old_domain) {
- mono_thread_pop_appdomain_ref ();
- mono_domain_set_internal_with_options (old_domain, FALSE);
- }
-
- /*
- * This class is used during exception handling, so initialize it here, to prevent
- * stack overflows while handling stack overflows.
- */
- mono_class_init_internal (mono_class_create_array (mono_defaults.int_class, 1));
- HANDLE_FUNCTION_RETURN ();
-}
-
-/**
- * mono_runtime_init:
- * \param domain domain returned by \c mono_init
- *
- * Initialize the core AppDomain: this function will run also some
- * IL initialization code, so it needs the execution engine to be fully
- * operational.
- *
- * \c AppDomain.SetupInformation is set up in \c mono_runtime_exec_main, where
- * we know the \c entry_assembly.
- *
- */
-void
-mono_runtime_init (MonoDomain *domain, MonoThreadStartCB start_cb, MonoThreadAttachCB attach_cb)
-{
- ERROR_DECL (error);
- mono_runtime_init_checked (domain, start_cb, attach_cb, error);
- mono_error_cleanup (error);
-}
-
-void
-mono_runtime_init_checked (MonoDomain *domain, MonoThreadStartCB start_cb, MonoThreadAttachCB attach_cb, MonoError *error)
-{
- HANDLE_FUNCTION_ENTER ();
-
- MonoAppDomainSetupHandle setup;
- MonoAppDomainHandle ad;
-
- error_init (error);
-
- mono_portability_helpers_init ();
-
- mono_gc_base_init ();
- mono_monitor_init ();
- mono_marshal_init ();
- mono_gc_init_icalls ();
-
- mono_install_assembly_preload_hook_v2 (mono_domain_assembly_preload, GUINT_TO_POINTER (FALSE), FALSE);
- mono_install_assembly_preload_hook_v2 (mono_domain_assembly_preload, GUINT_TO_POINTER (TRUE), TRUE);
- mono_install_assembly_search_hook_v2 (mono_domain_assembly_search, GUINT_TO_POINTER (FALSE), FALSE, FALSE);
- mono_install_assembly_search_hook_v2 (mono_domain_assembly_search, GUINT_TO_POINTER (TRUE), TRUE, FALSE);
- mono_install_assembly_search_hook_v2 (mono_domain_assembly_postload_search, GUINT_TO_POINTER (FALSE), FALSE, TRUE);
- mono_install_assembly_search_hook_v2 (mono_domain_assembly_postload_search, GUINT_TO_POINTER (TRUE), TRUE, TRUE);
- mono_install_assembly_load_hook (mono_domain_fire_assembly_load, NULL);
- mono_install_assembly_asmctx_from_path_hook (mono_domain_asmctx_from_path, NULL);
-
- mono_thread_init (start_cb, attach_cb);
-
- if (!mono_runtime_get_no_exec ()) {
- MonoClass *klass = mono_class_get_appdomain_setup_class ();
- setup = MONO_HANDLE_CAST (MonoAppDomainSetup, mono_object_new_pinned_handle (domain, klass, error));
- goto_if_nok (error, exit);
-
- klass = mono_class_get_appdomain_class ();
-
- ad = MONO_HANDLE_CAST (MonoAppDomain, mono_object_new_pinned_handle (domain, klass, error));
- goto_if_nok (error, exit);
-
- MONO_HANDLE_SETVAL (ad, data, MonoDomain*, domain);
- domain->domain = MONO_HANDLE_RAW (ad);
- domain->setup = MONO_HANDLE_RAW (setup);
- }
-
- mono_thread_attach (domain);
-
- mono_type_initialization_init ();
-
- if (!mono_runtime_get_no_exec ())
- create_domain_objects (domain);
-
- /* GC init has to happen after thread init */
- mono_gc_init ();
-
- /* contexts use GC handles, so they must be initialized after the GC */
-#ifndef ENABLE_NETCORE
- mono_context_init_checked (domain, error);
- goto_if_nok (error, exit);
- mono_context_set_default_context (domain);
-#endif
-
-#ifdef ENABLE_NETCORE
- if (!mono_runtime_get_no_exec ())
- mono_runtime_install_appctx_properties ();
-#endif
-
-#ifndef DISABLE_SOCKETS
- mono_network_init ();
-#endif
-
- mono_console_init ();
- mono_attach_init ();
-
- mono_locks_tracer_init ();
-
- /* mscorlib is loaded before we install the load hook */
- mono_domain_fire_assembly_load (mono_defaults.corlib->assembly, NULL);
-
-exit:
- HANDLE_FUNCTION_RETURN ();
-}
-
-static void
-mono_context_set_default_context (MonoDomain *domain)
-{
- if (mono_runtime_get_no_exec ())
- return;
-
- HANDLE_FUNCTION_ENTER ();
- mono_context_set_handle (MONO_HANDLE_NEW (MonoAppContext, domain->default_context));
- HANDLE_FUNCTION_RETURN ();
-}
-
-static char*
-mono_get_corlib_version (void)
-{
- ERROR_DECL (error);
-
- MonoClass *klass;
- MonoClassField *field;
-
- klass = mono_class_load_from_name (mono_defaults.corlib, "System", "Environment");
- mono_class_init_internal (klass);
- field = mono_class_get_field_from_name_full (klass, "mono_corlib_version", NULL);
- if (!field)
- return NULL;
-
- if (! (field->type->attrs & (FIELD_ATTRIBUTE_STATIC | FIELD_ATTRIBUTE_LITERAL)))
- return NULL;
-
- char *value;
- MonoTypeEnum field_type;
- const char *data = mono_class_get_field_default_value (field, &field_type);
- if (field_type != MONO_TYPE_STRING)
- return NULL;
- mono_metadata_read_constant_value (data, field_type, &value, error);
- mono_error_assert_ok (error);
-
- char *res = mono_string_from_blob (value, error);
- mono_error_assert_ok (error);
-
- return res;
-}
-
-/**
- * mono_check_corlib_version:
- * Checks that the corlib that is loaded matches the version of this runtime.
- * \returns NULL if the runtime will work with the corlib, or a \c g_malloc
- * allocated string with the error otherwise.
- */
-const char*
-mono_check_corlib_version (void)
-{
- const char* res;
- MONO_ENTER_GC_UNSAFE;
- res = mono_check_corlib_version_internal ();
- MONO_EXIT_GC_UNSAFE;
- return res;
-}
-
-static const char *
-mono_check_corlib_version_internal (void)
-{
-#if defined(MONO_CROSS_COMPILE)
- /* Can't read the corlib version because we only have the target class layouts */
- return NULL;
-#endif
-
- char *result = NULL;
- char *version = mono_get_corlib_version ();
- if (!version) {
- result = g_strdup_printf ("expected corlib string (%s) but not found or not string", MONO_CORLIB_VERSION);
- goto exit;
- }
- if (strcmp (version, MONO_CORLIB_VERSION) != 0) {
- result = g_strdup_printf ("The runtime did not find the mscorlib.dll it expected. "
- "Expected interface version %s but found %s. Check that "
- "your runtime and class libraries are matching.",
- MONO_CORLIB_VERSION, version);
- goto exit;
- }
-
- /* Check that the managed and unmanaged layout of MonoInternalThread matches */
- guint32 native_offset;
- guint32 managed_offset;
- native_offset = (guint32) MONO_STRUCT_OFFSET (MonoInternalThread, last);
- managed_offset = mono_field_get_offset (mono_class_get_field_from_name_full (mono_defaults.internal_thread_class, "last", NULL));
- if (native_offset != managed_offset)
- result = g_strdup_printf ("expected InternalThread.last field offset %u, found %u. See InternalThread.last comment", native_offset, managed_offset);
-exit:
- g_free (version);
- return result;
-}
-
-/**
- * mono_context_init:
- * \param domain The domain where the \c System.Runtime.Remoting.Context.Context is initialized
- * Initializes the \p domain's default \c System.Runtime.Remoting 's Context.
- */
-void
-mono_context_init (MonoDomain *domain)
-{
- ERROR_DECL (error);
- mono_context_init_checked (domain, error);
- mono_error_cleanup (error);
-}
-
-void
-mono_context_init_checked (MonoDomain *domain, MonoError *error)
-{
- HANDLE_FUNCTION_ENTER ();
-
- MonoClass *klass;
- MonoAppContextHandle context;
-
- error_init (error);
- if (mono_runtime_get_no_exec ())
- goto exit;
-
- klass = mono_class_load_from_name (mono_defaults.corlib, "System.Runtime.Remoting.Contexts", "Context");
- context = MONO_HANDLE_CAST (MonoAppContext, mono_object_new_pinned_handle (domain, klass, error));
- goto_if_nok (error, exit);
-
- MONO_HANDLE_SETVAL (context, domain_id, gint32, domain->domain_id);
- MONO_HANDLE_SETVAL (context, context_id, gint32, 0);
- mono_threads_register_app_context (context, error);
- mono_error_assert_ok (error);
- domain->default_context = MONO_HANDLE_RAW (context);
-exit:
- HANDLE_FUNCTION_RETURN ();
-}
-
-/**
- * mono_runtime_cleanup:
- * \param domain unused.
- *
- * Internal routine.
- *
- * This must not be called while there are still running threads executing
- * managed code.
- */
-void
-mono_runtime_cleanup (MonoDomain *domain)
-{
- mono_attach_cleanup ();
-
- /* This ends up calling any pending pending (for at most 2 seconds) */
- mono_gc_cleanup ();
-
- mono_thread_cleanup ();
-
-#ifndef DISABLE_SOCKETS
- mono_network_cleanup ();
-#endif
- mono_marshal_cleanup ();
-
- mono_type_initialization_cleanup ();
-
- mono_monitor_cleanup ();
-}
-
-static MonoDomainFunc quit_function = NULL;
-
-/**
- * mono_install_runtime_cleanup:
- */
-void
-mono_install_runtime_cleanup (MonoDomainFunc func)
-{
- quit_function = func;
-}
-
-/**
- * mono_runtime_quit:
- */
-void
-mono_runtime_quit ()
-{
- if (quit_function != NULL)
- quit_function (mono_get_root_domain (), NULL);
-}
-
-/**
- * mono_domain_create_appdomain:
- * \param friendly_name The friendly name of the appdomain to create
- * \param configuration_file The configuration file to initialize the appdomain with
- * \returns a \c MonoDomain initialized with the appdomain
- */
-MonoDomain *
-mono_domain_create_appdomain (char *friendly_name, char *configuration_file)
-{
- HANDLE_FUNCTION_ENTER ();
- MonoDomain *domain;
- MONO_ENTER_GC_UNSAFE;
- ERROR_DECL (error);
- domain = mono_domain_create_appdomain_checked (friendly_name, configuration_file, error);
- mono_error_cleanup (error);
- MONO_EXIT_GC_UNSAFE;
- HANDLE_FUNCTION_RETURN_VAL (domain);
-}
-
-/**
- * mono_domain_create_appdomain_checked:
- * \param friendly_name The friendly name of the appdomain to create
- * \param configuration_file The configuration file to initialize the appdomain with
- * \param error Set on error.
- *
- * \returns a MonoDomain initialized with the appdomain. On failure sets \p error and returns NULL.
- */
-MonoDomain *
-mono_domain_create_appdomain_checked (char *friendly_name, char *configuration_file, MonoError *error)
-{
- HANDLE_FUNCTION_ENTER ();
- error_init (error);
- MonoDomain *result = NULL;
-
- MonoClass *klass = mono_class_get_appdomain_setup_class ();
- MonoAppDomainSetupHandle setup = MONO_HANDLE_CAST (MonoAppDomainSetup, mono_object_new_handle (mono_domain_get (), klass, error));
- goto_if_nok (error, leave);
- MonoStringHandle config_file;
- if (configuration_file != NULL) {
- config_file = mono_string_new_handle (mono_domain_get (), configuration_file, error);
- goto_if_nok (error, leave);
- } else {
- config_file = MONO_HANDLE_NEW (MonoString, NULL);
- }
- MONO_HANDLE_SET (setup, configuration_file, config_file);
-
- MonoAppDomainHandle ad;
- ad = mono_domain_create_appdomain_internal (friendly_name, setup, error);
- goto_if_nok (error, leave);
-
- result = mono_domain_from_appdomain_handle (ad);
-leave:
- HANDLE_FUNCTION_RETURN_VAL (result);
-}
-
-/**
- * mono_domain_set_config:
- * \param domain \c MonoDomain initialized with the appdomain we want to change
- * \param base_dir new base directory for the appdomain
- * \param config_file_name path to the new configuration for the app domain
- *
- * Used to set the system configuration for an appdomain
- *
- * Without using this, embedded builds will get 'System.Configuration.ConfigurationErrorsException:
- * Error Initializing the configuration system. ---> System.ArgumentException:
- * The 'ExeConfigFilename' argument cannot be null.' for some managed calls.
- */
-void
-mono_domain_set_config (MonoDomain *domain, const char *base_dir, const char *config_file_name)
-{
- HANDLE_FUNCTION_ENTER ();
- MONO_ENTER_GC_UNSAFE;
- ERROR_DECL (error);
- mono_domain_set_config_checked (domain, base_dir, config_file_name, error);
- mono_error_cleanup (error);
- MONO_EXIT_GC_UNSAFE;
- HANDLE_FUNCTION_RETURN ();
-}
-
-gboolean
-mono_domain_set_config_checked (MonoDomain *domain, const char *base_dir, const char *config_file_name, MonoError *error)
-{
- error_init (error);
- MonoAppDomainSetupHandle setup = MONO_HANDLE_NEW (MonoAppDomainSetup, domain->setup);
- MonoStringHandle base_dir_str = mono_string_new_handle (domain, base_dir, error);
- goto_if_nok (error, leave);
- MONO_HANDLE_SET (setup, application_base, base_dir_str);
- MonoStringHandle config_file_name_str;
- config_file_name_str = mono_string_new_handle (domain, config_file_name, error);
- goto_if_nok (error, leave);
- MONO_HANDLE_SET (setup, configuration_file, config_file_name_str);
-leave:
- return is_ok (error);
-}
-
-static MonoAppDomainSetupHandle
-copy_app_domain_setup (MonoDomain *domain, MonoAppDomainSetupHandle setup, MonoError *error)
-{
- HANDLE_FUNCTION_ENTER ();
- MonoDomain *caller_domain;
- MonoClass *ads_class;
- MonoAppDomainSetupHandle result = MONO_HANDLE_NEW (MonoAppDomainSetup, NULL);
-
- error_init (error);
-
- caller_domain = mono_domain_get ();
- ads_class = mono_class_get_appdomain_setup_class ();
-
- MonoAppDomainSetupHandle copy = MONO_HANDLE_CAST (MonoAppDomainSetup, mono_object_new_handle(domain, ads_class, error));
- goto_if_nok (error, leave);
-
- mono_domain_set_internal_with_options (domain, TRUE);
-
-#define XCOPY_FIELD(type, dst, field, src, error) \
- do { \
- TYPED_HANDLE_NAME (type) src_val = MONO_HANDLE_NEW_GET (type, (src), field); \
- TYPED_HANDLE_NAME (type) copied_val = MONO_HANDLE_CAST (type, mono_marshal_xdomain_copy_value_handle (MONO_HANDLE_CAST (MonoObject, src_val), error)); \
- goto_if_nok (error, leave); \
- MONO_HANDLE_SET ((dst),field,copied_val); \
- } while (0)
-
-#define COPY_VAL(dst,field,type,src) \
- do { \
- MONO_HANDLE_SETVAL ((dst), field, type, MONO_HANDLE_GETVAL ((src),field)); \
- } while (0)
-
- XCOPY_FIELD (MonoString, copy, application_base, setup, error);
- XCOPY_FIELD (MonoString, copy, application_name, setup, error);
- XCOPY_FIELD (MonoString, copy, cache_path, setup, error);
- XCOPY_FIELD (MonoString, copy, configuration_file, setup, error);
- XCOPY_FIELD (MonoString, copy, dynamic_base, setup, error);
- XCOPY_FIELD (MonoString, copy, license_file, setup, error);
- XCOPY_FIELD (MonoString, copy, private_bin_path, setup, error);
- XCOPY_FIELD (MonoString, copy, private_bin_path_probe, setup, error);
- XCOPY_FIELD (MonoString, copy, shadow_copy_directories, setup, error);
- XCOPY_FIELD (MonoString, copy, shadow_copy_files, setup, error);
- COPY_VAL (copy, publisher_policy, MonoBoolean, setup);
- COPY_VAL (copy, path_changed, MonoBoolean, setup);
- COPY_VAL (copy, loader_optimization, int, setup);
- COPY_VAL (copy, disallow_binding_redirects, MonoBoolean, setup);
- COPY_VAL (copy, disallow_code_downloads, MonoBoolean, setup);
- XCOPY_FIELD (MonoArray, copy, domain_initializer_args, setup, error);
- COPY_VAL (copy, disallow_appbase_probe, MonoBoolean, setup);
- XCOPY_FIELD (MonoObject, copy, application_trust, setup, error);
- XCOPY_FIELD (MonoArray, copy, configuration_bytes, setup, error);
- XCOPY_FIELD (MonoArray, copy, serialized_non_primitives, setup, error);
-
-#undef XCOPY_FIELD
-#undef COPY_VAL
-
- mono_domain_set_internal_with_options (caller_domain, TRUE);
-
- MONO_HANDLE_ASSIGN (result, copy);
-leave:
- HANDLE_FUNCTION_RETURN_REF (MonoAppDomainSetup, result);
-}
-
-static MonoAppDomainHandle
-mono_domain_create_appdomain_internal (char *friendly_name, MonoAppDomainSetupHandle setup, MonoError *error)
-{
- HANDLE_FUNCTION_ENTER ();
- MonoAppDomainHandle result = MONO_HANDLE_NEW (MonoAppDomain, NULL);
- MonoClass *adclass;
- MonoDomain *data;
-
- error_init (error);
-
- adclass = mono_class_get_appdomain_class ();
-
- /* FIXME: pin all those objects */
- data = mono_domain_create();
-
- MonoAppDomainHandle ad = MONO_HANDLE_CAST (MonoAppDomain, mono_object_new_handle (data, adclass, error));
- goto_if_nok (error, leave);
- MONO_HANDLE_SETVAL (ad, data, MonoDomain*, data);
- data->domain = MONO_HANDLE_RAW (ad);
- data->friendly_name = g_strdup (friendly_name);
-
- MONO_PROFILER_RAISE (domain_name, (data, data->friendly_name));
-
- MonoStringHandle app_base;
- app_base = MONO_HANDLE_NEW_GET (MonoString, setup, application_base);
- if (MONO_HANDLE_IS_NULL (app_base)) {
- /* Inherit from the root domain since MS.NET does this */
- MonoDomain *root = mono_get_root_domain ();
- MonoAppDomainSetupHandle root_setup = MONO_HANDLE_NEW (MonoAppDomainSetup, root->setup);
- MonoStringHandle root_app_base = MONO_HANDLE_NEW_GET (MonoString, root_setup, application_base);
- if (!MONO_HANDLE_IS_NULL (root_app_base)) {
- /* N.B. new string is in the new domain */
- uint32_t gchandle = mono_gchandle_from_handle (MONO_HANDLE_CAST (MonoObject, root_app_base), TRUE);
- MonoStringHandle s = mono_string_new_utf16_handle (data, mono_string_chars_internal (MONO_HANDLE_RAW (root_app_base)), mono_string_handle_length (root_app_base), error);
- mono_gchandle_free_internal (gchandle);
- if (!is_ok (error)) {
- g_free (data->friendly_name);
- goto leave;
- }
- MONO_HANDLE_SET (setup, application_base, s);
- }
- }
-
- mono_context_init_checked (data, error);
- goto_if_nok (error, leave);
-
- data->setup = MONO_HANDLE_RAW (copy_app_domain_setup (data, setup, error));
- if (!mono_error_ok (error)) {
- g_free (data->friendly_name);
- goto leave;
- }
-
- mono_domain_set_options_from_config (data);
- add_assemblies_to_domain (data, mono_defaults.corlib->assembly, NULL);
-
-#ifndef DISABLE_SHADOW_COPY
- /*FIXME, guard this for when the debugger is not running */
- char *shadow_location;
- shadow_location = get_shadow_assembly_location_base (data, error);
- if (!mono_error_ok (error)) {
- g_free (data->friendly_name);
- goto leave;
- }
-
- g_free (shadow_location);
-#endif
-
- create_domain_objects (data);
-
- MONO_HANDLE_ASSIGN (result, ad);
-leave:
- HANDLE_FUNCTION_RETURN_REF (MonoAppDomain, result);
-}
-
-/**
- * mono_domain_has_type_resolve:
- * \param domain application domain being looked up
- *
- * \returns TRUE if the \c AppDomain.TypeResolve field has been set.
- */
-gboolean
-mono_domain_has_type_resolve (MonoDomain *domain)
-{
-#ifdef ENABLE_NETCORE
- return FALSE;
-#else
- static MonoClassField *field = NULL;
- MonoObject *o;
-
- if (field == NULL) {
- field = mono_class_get_field_from_name_full (mono_defaults.appdomain_class, "TypeResolve", NULL);
- g_assert (field);
- }
-
- /*pedump doesn't create an appdomin, so the domain object doesn't exist.*/
- if (!domain->domain)
- return FALSE;
-
- mono_field_get_value_internal ((MonoObject*)(domain->domain), field, &o);
- return o != NULL;
-#endif
-}
-
-/**
- * mono_domain_try_type_resolve:
- * \param domain application domain in which to resolve the type
- * \param name the name of the type to resolve or NULL.
- * \param typebuilder A \c System.Reflection.Emit.TypeBuilder, used if name is NULL.
- *
- * This routine invokes the internal \c System.AppDomain.DoTypeResolve and returns
- * the assembly that matches name, or ((TypeBuilder)typebuilder).FullName.
- *
- * \returns A \c MonoReflectionAssembly or NULL if not found
- */
-MonoReflectionAssembly *
-mono_domain_try_type_resolve (MonoDomain *domain, char *name, MonoObject *typebuilder_raw)
-{
- HANDLE_FUNCTION_ENTER ();
-
- g_assert (domain);
- g_assert (name || typebuilder_raw);
-
- ERROR_DECL (error);
-
- MonoReflectionAssemblyHandle ret = NULL_HANDLE_INIT;
-
- if (name) {
- MonoStringHandle name_handle = mono_string_new_handle (mono_domain_get (), name, error);
- goto_if_nok (error, exit);
- ret = mono_domain_try_type_resolve_name (domain, name_handle, error);
- } else {
- MONO_HANDLE_DCL (MonoObject, typebuilder);
- ret = mono_domain_try_type_resolve_typebuilder (domain, MONO_HANDLE_CAST (MonoReflectionTypeBuilder, typebuilder), error);
- }
-
-exit:
- mono_error_cleanup (error);
- HANDLE_FUNCTION_RETURN_OBJ (ret);
-}
-
-/**
- * mono_class_get_appdomain_do_type_resolve_method:
- *
- * This routine returns System.AppDomain.DoTypeResolve.
- */
-static MonoMethod *
-mono_class_get_appdomain_do_type_resolve_method (MonoError *error)
-{
- static MonoMethod *method; // cache
-
- if (method)
- return method;
-
- // not cached yet, fill cache under caller's lock
-
- method = mono_class_get_method_from_name_checked (mono_class_get_appdomain_class (), "DoTypeResolve", -1, 0, error);
-
- if (method == NULL)
- g_warning ("%s method AppDomain.DoTypeResolve not found. %s\n", __func__, mono_error_get_message (error));
-
- return method;
-}
-
-/**
- * mono_class_get_appdomain_do_type_builder_resolve_method:
- *
- * This routine returns System.AppDomain.DoTypeBuilderResolve.
- */
-static MonoMethod *
-mono_class_get_appdomain_do_type_builder_resolve_method (MonoError *error)
-{
- static MonoMethod *method; // cache
-
- if (method)
- return method;
-
- // not cached yet, fill cache under caller's lock
-
- method = mono_class_get_method_from_name_checked (mono_class_get_appdomain_class (), "DoTypeBuilderResolve", -1, 0, error);
-
- if (method == NULL)
- g_warning ("%s method AppDomain.DoTypeBuilderResolve not found. %s\n", __func__, mono_error_get_message (error));
-
- return method;
-}
-
-/**
- * mono_domain_try_type_resolve_name:
- * \param domain application domain in which to resolve the type
- * \param name the name of the type to resolve.
- *
- * This routine invokes the internal \c System.AppDomain.DoTypeResolve and returns
- * the assembly that matches name.
- *
- * \returns A \c MonoReflectionAssembly or NULL if not found
- */
-MonoReflectionAssemblyHandle
-mono_domain_try_type_resolve_name (MonoDomain *domain, MonoStringHandle name, MonoError *error)
-{
- HANDLE_FUNCTION_ENTER ();
-
- void *params [1] = { 0 };
-
- g_assert (domain);
- g_assert (MONO_HANDLE_BOOL (name));
- g_assert (error);
-
- error_init (error);
-
- MonoMethod *method;
- method = mono_class_get_appdomain_do_type_resolve_method (error);
- goto_if_nok (error, return_null);
-
- MonoAppDomainHandle appdomain;
- appdomain = MONO_HANDLE_NEW (MonoAppDomain, domain->domain);
-
- MonoObjectHandle ret;
- params [0] = MONO_HANDLE_RAW (name);
- ret = mono_runtime_invoke_handle (method, MONO_HANDLE_CAST (MonoObject, appdomain), params, error);
- goto_if_nok (error, return_null);
- goto exit;
-return_null:
- ret = NULL_HANDLE;
-exit:
- HANDLE_FUNCTION_RETURN_REF (MonoReflectionAssembly, MONO_HANDLE_CAST (MonoReflectionAssembly, ret));
-}
-
-/**
- * mono_domain_try_type_resolve_typebuilder:
- * \param domain application domain in which to resolve the type
- * \param typebuilder A \c System.Reflection.Emit.TypeBuilder; typebuilder.FullName is the name of the type to resolve.
- *
- * This routine invokes the internal \c System.AppDomain.DoTypeBuilderResolve and returns
- * the assembly that matches typebuilder.FullName.
- *
- * \returns A \c MonoReflectionAssembly or NULL_HANDLE if not found
- */
-MonoReflectionAssemblyHandle
-mono_domain_try_type_resolve_typebuilder (MonoDomain *domain, MonoReflectionTypeBuilderHandle typebuilder, MonoError *error)
-{
- HANDLE_FUNCTION_ENTER ();
-
- g_assert (domain);
- g_assert (MONO_HANDLE_BOOL (typebuilder));
- g_assert (error);
-
- error_init (error);
-
- MonoMethod * const method = mono_class_get_appdomain_do_type_builder_resolve_method (error);
- goto_if_nok (error, return_null);
-
- MonoAppDomainHandle appdomain;
- appdomain = MONO_HANDLE_NEW (MonoAppDomain, domain->domain);
- void *args [1];
- args [0] = MONO_HANDLE_RAW (typebuilder);
-
- MonoObjectHandle ret;
- ret = mono_runtime_invoke_handle (method, MONO_HANDLE_CAST (MonoObject, appdomain), args, error);
- goto_if_nok (error, return_null);
- goto exit;
-return_null:
- ret = NULL_HANDLE;
-exit:
- HANDLE_FUNCTION_RETURN_REF (MonoReflectionAssembly, MONO_HANDLE_CAST (MonoReflectionAssembly, ret));
-}
-
-/**
- * mono_domain_owns_vtable_slot:
- * \returns Whether \p vtable_slot is inside a vtable which belongs to \p domain.
- */
-gboolean
-mono_domain_owns_vtable_slot (MonoDomain *domain, gpointer vtable_slot)
-{
- gboolean res;
-
- mono_domain_lock (domain);
- res = mono_mempool_contains_addr (domain->mp, vtable_slot);
- mono_domain_unlock (domain);
- return res;
-}
-
-gboolean
-mono_domain_set_fast (MonoDomain *domain, gboolean force)
-{
- MONO_REQ_GC_UNSAFE_MODE;
- if (!force && domain->state == MONO_APPDOMAIN_UNLOADED)
- return FALSE;
-
- mono_domain_set_internal_with_options (domain, TRUE);
- return TRUE;
-}
-
-MonoObjectHandle
-ves_icall_System_AppDomain_GetData (MonoAppDomainHandle ad, MonoStringHandle name, MonoError *error)
-{
- error_init (error);
-
- if (MONO_HANDLE_IS_NULL (name)) {
- mono_error_set_argument_null (error, "name", "");
- return NULL_HANDLE;
- }
-
- g_assert (!MONO_HANDLE_IS_NULL (ad));
- MonoDomain *add = MONO_HANDLE_GETVAL (ad, data);
- g_assert (add);
-
- char *str = mono_string_handle_to_utf8 (name, error);
- return_val_if_nok (error, NULL_HANDLE);
-
- mono_domain_lock (add);
-
- MonoAppDomainSetupHandle ad_setup = MONO_HANDLE_NEW (MonoAppDomainSetup, add->setup);
- MonoStringHandle o;
- if (!strcmp (str, "APPBASE"))
- o = MONO_HANDLE_NEW_GET (MonoString, ad_setup, application_base);
- else if (!strcmp (str, "APP_CONFIG_FILE"))
- o = MONO_HANDLE_NEW_GET (MonoString, ad_setup, configuration_file);
- else if (!strcmp (str, "DYNAMIC_BASE"))
- o = MONO_HANDLE_NEW_GET (MonoString, ad_setup, dynamic_base);
- else if (!strcmp (str, "APP_NAME"))
- o = MONO_HANDLE_NEW_GET (MonoString, ad_setup, application_name);
- else if (!strcmp (str, "CACHE_BASE"))
- o = MONO_HANDLE_NEW_GET (MonoString, ad_setup, cache_path);
- else if (!strcmp (str, "PRIVATE_BINPATH"))
- o = MONO_HANDLE_NEW_GET (MonoString, ad_setup, private_bin_path);
- else if (!strcmp (str, "BINPATH_PROBE_ONLY"))
- o = MONO_HANDLE_NEW_GET (MonoString, ad_setup, private_bin_path_probe);
- else if (!strcmp (str, "SHADOW_COPY_DIRS"))
- o = MONO_HANDLE_NEW_GET (MonoString, ad_setup, shadow_copy_directories);
- else if (!strcmp (str, "FORCE_CACHE_INSTALL"))
- o = MONO_HANDLE_NEW_GET (MonoString, ad_setup, shadow_copy_files);
- else
- o = MONO_HANDLE_NEW (MonoString, (MonoString*)mono_g_hash_table_lookup (add->env, MONO_HANDLE_RAW (name)));
-
- mono_domain_unlock (add);
- g_free (str);
-
- return MONO_HANDLE_CAST (MonoObject, o);
-}
-
-void
-ves_icall_System_AppDomain_SetData (MonoAppDomainHandle ad, MonoStringHandle name, MonoObjectHandle data, MonoError *error)
-{
- error_init (error);
-
- if (MONO_HANDLE_IS_NULL (name)) {
- mono_error_set_argument_null (error, "name", "");
- return;
- }
-
- g_assert (!MONO_HANDLE_IS_NULL (ad));
- MonoDomain *add = MONO_HANDLE_GETVAL (ad, data);
- g_assert (add);
-
- mono_domain_lock (add);
-
- mono_g_hash_table_insert_internal (add->env, MONO_HANDLE_RAW (name), MONO_HANDLE_RAW (data));
-
- mono_domain_unlock (add);
-}
-
-MonoAppDomainSetupHandle
-ves_icall_System_AppDomain_getSetup (MonoAppDomainHandle ad, MonoError *error)
-{
- error_init (error);
- g_assert (!MONO_HANDLE_IS_NULL (ad));
- MonoDomain *domain = MONO_HANDLE_GETVAL (ad, data);
- g_assert (domain);
-
- return MONO_HANDLE_NEW (MonoAppDomainSetup, domain->setup);
-}
-
-MonoStringHandle
-ves_icall_System_AppDomain_getFriendlyName (MonoAppDomainHandle ad, MonoError *error)
-{
- error_init (error);
- g_assert (!MONO_HANDLE_IS_NULL (ad));
- MonoDomain *domain = MONO_HANDLE_GETVAL (ad, data);
- g_assert (domain);
-
- return mono_string_new_handle (domain, domain->friendly_name, error);
-}
-
-MonoAppDomainHandle
-ves_icall_System_AppDomain_getCurDomain (MonoError *error)
-{
- error_init (error);
- MonoDomain *add = mono_domain_get ();
-
- return MONO_HANDLE_NEW (MonoAppDomain, add->domain);
-}
-
-MonoAppDomainHandle
-ves_icall_System_AppDomain_getRootDomain (MonoError *error)
-{
- error_init (error);
- MonoDomain *root = mono_get_root_domain ();
-
- return MONO_HANDLE_NEW (MonoAppDomain, root->domain);
-}
-
-MonoBoolean
-ves_icall_System_CLRConfig_CheckThrowUnobservedTaskExceptions (MonoError *error)
-{
- MonoDomain *domain = mono_domain_get ();
-
- return domain->throw_unobserved_task_exceptions;
-}
-
-static char*
-get_attribute_value (const gchar **attribute_names,
- const gchar **attribute_values,
- const char *att_name)
-{
- int n;
- for (n = 0; attribute_names [n] != NULL; n++) {
- if (strcmp (attribute_names [n], att_name) == 0)
- return g_strdup (attribute_values [n]);
- }
- return NULL;
-}
-
-static void
-start_element (GMarkupParseContext *context,
- const gchar *element_name,
- const gchar **attribute_names,
- const gchar **attribute_values,
- gpointer user_data,
- GError **gerror)
-{
- RuntimeConfig *runtime_config = (RuntimeConfig *)user_data;
-
- if (strcmp (element_name, "runtime") == 0) {
- runtime_config->runtime_count++;
- return;
- }
-
- if (strcmp (element_name, "assemblyBinding") == 0) {
- runtime_config->assemblybinding_count++;
- return;
- }
-
- if (runtime_config->runtime_count != 1)
- return;
-
- if (strcmp (element_name, "ThrowUnobservedTaskExceptions") == 0) {
- const char *value = get_attribute_value (attribute_names, attribute_values, "enabled");
-
- if (value && g_ascii_strcasecmp (value, "true") == 0)
- runtime_config->domain->throw_unobserved_task_exceptions = TRUE;
- }
-
- if (runtime_config->assemblybinding_count != 1)
- return;
-
- if (strcmp (element_name, "probing") != 0)
- return;
-
- g_free (runtime_config->domain->private_bin_path);
- runtime_config->domain->private_bin_path = get_attribute_value (attribute_names, attribute_values, "privatePath");
- if (runtime_config->domain->private_bin_path && !runtime_config->domain->private_bin_path [0]) {
- g_free (runtime_config->domain->private_bin_path);
- runtime_config->domain->private_bin_path = NULL;
- return;
- }
-}
-
-static void
-end_element (GMarkupParseContext *context,
- const gchar *element_name,
- gpointer user_data,
- GError **gerror)
-{
- RuntimeConfig *runtime_config = (RuntimeConfig *)user_data;
- if (strcmp (element_name, "runtime") == 0)
- runtime_config->runtime_count--;
- else if (strcmp (element_name, "assemblyBinding") == 0)
- runtime_config->assemblybinding_count--;
-}
-
-static void
-parse_error (GMarkupParseContext *context, GError *gerror, gpointer user_data)
-{
- RuntimeConfig *state = (RuntimeConfig *)user_data;
- const gchar *msg;
- const gchar *filename;
-
- filename = state && state->filename ? (gchar *) state->filename : "";
- msg = gerror && gerror->message ? gerror->message : "";
- g_warning ("Error parsing %s: %s", filename, msg);
-}
-
-static const GMarkupParser
-mono_parser = {
- start_element,
- end_element,
- NULL,
- NULL,
- parse_error
-};
-
-void
-mono_domain_set_options_from_config (MonoDomain *domain)
-{
- ERROR_DECL (error);
- gchar *config_file_name = NULL, *text = NULL, *config_file_path = NULL;
- gsize len;
- GMarkupParseContext *context;
- RuntimeConfig runtime_config;
- gint offset;
-
- if (!domain || !domain->setup || !domain->setup->configuration_file)
- return;
-
- config_file_name = mono_string_to_utf8_checked_internal (domain->setup->configuration_file, error);
- if (!mono_error_ok (error)) {
- mono_error_cleanup (error);
- goto free_and_out;
- }
-
- config_file_path = mono_portability_find_file (config_file_name, TRUE);
- if (!config_file_path)
- config_file_path = config_file_name;
-
- if (!g_file_get_contents (config_file_path, &text, &len, NULL))
- goto free_and_out;
-
- runtime_config.runtime_count = 0;
- runtime_config.assemblybinding_count = 0;
- runtime_config.domain = domain;
- runtime_config.filename = config_file_path;
-
- offset = 0;
- if (len > 3 && text [0] == '\xef' && text [1] == (gchar) '\xbb' && text [2] == '\xbf')
- offset = 3; /* Skip UTF-8 BOM */
-
- context = g_markup_parse_context_new (&mono_parser, (GMarkupParseFlags)0, &runtime_config, NULL);
- if (g_markup_parse_context_parse (context, text + offset, len - offset, NULL))
- g_markup_parse_context_end_parse (context, NULL);
- g_markup_parse_context_free (context);
-
- free_and_out:
- g_free (text);
- if (config_file_name != config_file_path)
- g_free (config_file_name);
- g_free (config_file_path);
-}
-
-MonoAppDomainHandle
-ves_icall_System_AppDomain_createDomain (MonoStringHandle friendly_name, MonoAppDomainSetupHandle setup, MonoError *error)
-{
- error_init (error);
- MonoAppDomainHandle ad = MONO_HANDLE_NEW (MonoAppDomain, NULL);
-
-#ifdef DISABLE_APPDOMAINS
- mono_error_set_not_supported (error, "AppDomain creation is not supported on this runtime.");
-#else
- char *fname;
-
- fname = mono_string_handle_to_utf8 (friendly_name, error);
- return_val_if_nok (error, ad);
- ad = mono_domain_create_appdomain_internal (fname, setup, error);
- g_free (fname);
-#endif
- return ad;
-}
-
-static gboolean
-add_assembly_to_array (MonoDomain *domain, MonoArrayHandle dest, int dest_idx, MonoAssembly* assm, MonoError *error)
-{
- HANDLE_FUNCTION_ENTER ();
- error_init (error);
- MonoReflectionAssemblyHandle assm_obj = mono_assembly_get_object_handle (domain, assm, error);
- goto_if_nok (error, leave);
- MONO_HANDLE_ARRAY_SETREF (dest, dest_idx, assm_obj);
-leave:
- HANDLE_FUNCTION_RETURN_VAL (is_ok (error));
-}
-
-static MonoArrayHandle
-get_assembly_array_from_domain (MonoDomain *domain, MonoBoolean refonly, MonoError *error)
-{
- int i;
- GPtrArray *assemblies;
-
- assemblies = mono_domain_get_assemblies (domain, refonly);
-
- MonoArrayHandle res = mono_array_new_handle (domain, mono_class_get_assembly_class (), assemblies->len, error);
- goto_if_nok (error, leave);
- for (i = 0; i < assemblies->len; ++i) {
- if (!add_assembly_to_array (domain, res, i, (MonoAssembly *)g_ptr_array_index (assemblies, i), error))
- goto leave;
- }
-
-leave:
- g_ptr_array_free (assemblies, TRUE);
- return res;
-}
-
-#ifdef ENABLE_NETCORE
-MonoArrayHandle
-ves_icall_System_Runtime_Loader_AssemblyLoadContext_InternalGetLoadedAssemblies (MonoError *error)
-{
- MonoDomain *domain = mono_domain_get ();
- return get_assembly_array_from_domain (domain, FALSE, error);
-}
-#else
-MonoArrayHandle
-ves_icall_System_AppDomain_GetAssemblies (MonoAppDomainHandle ad, MonoBoolean refonly, MonoError *error)
-{
- MonoDomain *domain = MONO_HANDLE_GETVAL (ad, data);
- return get_assembly_array_from_domain (domain, refonly, error);
-}
-#endif
-
-MonoAssembly*
-mono_try_assembly_resolve (MonoDomain *domain, const char *fname_raw, MonoAssembly *requesting, gboolean refonly, MonoError *error)
-{
- HANDLE_FUNCTION_ENTER ();
- error_init (error);
- MonoAssembly *result = NULL;
- MonoStringHandle fname = mono_string_new_handle (domain, fname_raw, error);
- goto_if_nok (error, leave);
- result = mono_try_assembly_resolve_handle (domain, fname, requesting, refonly, error);
-leave:
- HANDLE_FUNCTION_RETURN_VAL (result);
-}
-
-MonoAssembly*
-mono_try_assembly_resolve_handle (MonoDomain *domain, MonoStringHandle fname, MonoAssembly *requesting, gboolean refonly, MonoError *error)
-{
- HANDLE_FUNCTION_ENTER ();
- MonoAssembly *ret = NULL;
- MonoMethod *method;
- MonoBoolean isrefonly;
- gpointer params [3];
-
- error_init (error);
-
- if (mono_runtime_get_no_exec ())
- goto leave;
-
- g_assert (domain != NULL && !MONO_HANDLE_IS_NULL (fname));
-
- method = mono_class_get_method_from_name_checked (mono_class_get_appdomain_class (), "DoAssemblyResolve", -1, 0, error);
- g_assert (method != NULL);
-
- isrefonly = refonly ? 1 : 0;
- MonoReflectionAssemblyHandle requesting_handle;
- if (requesting) {
- requesting_handle = mono_assembly_get_object_handle (domain, requesting, error);
- goto_if_nok (error, leave);
- }
- params [0] = MONO_HANDLE_RAW (fname);
- params [1] = requesting ? MONO_HANDLE_RAW (requesting_handle) : NULL;
- params [2] = &isrefonly;
- MonoObject *exc;
- exc = NULL;
- MonoReflectionAssemblyHandle result;
- result = MONO_HANDLE_CAST (MonoReflectionAssembly, MONO_HANDLE_NEW (MonoObject, mono_runtime_try_invoke (method, domain->domain, params, &exc, error)));
- if (!is_ok (error) || exc != NULL) {
- if (is_ok (error))
- mono_error_set_exception_instance (error, (MonoException*)exc);
- goto leave;
- }
- ret = !MONO_HANDLE_IS_NULL (result) ? MONO_HANDLE_GETVAL (result, assembly) : NULL;
-
- if (ret && !refonly && mono_asmctx_get_kind (&ret->context) == MONO_ASMCTX_REFONLY) {
- /* .NET Framework throws System.IO.FileNotFoundException in this case */
- mono_error_set_file_not_found (error, NULL, "AssemblyResolveEvent handlers cannot return Assemblies loaded for reflection only");
- ret = NULL;
- goto leave;
- }
-leave:
- HANDLE_FUNCTION_RETURN_VAL (ret);
-}
-
-MonoAssembly *
-mono_domain_assembly_postload_search (MonoAssemblyLoadContext *alc, MonoAssembly *requesting,
- MonoAssemblyName *aname,
- gboolean refonly, gboolean postload,
- gpointer user_data,
- MonoError *error_out)
-{
- ERROR_DECL (error);
- MonoAssembly *assembly;
- MonoDomain *domain = mono_domain_get ();
- char *aname_str;
-
- aname_str = mono_stringify_assembly_name (aname);
-
- /* FIXME: We invoke managed code here, so there is a potential for deadlocks */
-
- assembly = mono_try_assembly_resolve (domain, aname_str, requesting, refonly, error);
- g_free (aname_str);
- mono_error_cleanup (error);
-
- return assembly;
-}
-
-/*
- * LOCKING: assumes assemblies_lock in the domain is already locked.
- */
-static void
-add_assemblies_to_domain (MonoDomain *domain, MonoAssembly *ass, GHashTable *ht)
-{
- gint i;
- GSList *tmp;
- gboolean destroy_ht = FALSE;
-
- g_assert (ass != NULL);
-
- if (!ass->aname.name)
- return;
-
- if (!ht) {
- ht = g_hash_table_new (mono_aligned_addr_hash, NULL);
- destroy_ht = TRUE;
- for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
- g_hash_table_insert (ht, tmp->data, tmp->data);
- }
- }
-
- /* FIXME: handle lazy loaded assemblies */
-
- if (!g_hash_table_lookup (ht, ass)) {
- mono_assembly_addref (ass);
- g_hash_table_insert (ht, ass, ass);
- domain->domain_assemblies = g_slist_append (domain->domain_assemblies, ass);
- mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Assembly %s[%p] added to domain %s, ref_count=%d", ass->aname.name, ass, domain->friendly_name, ass->ref_count);
- }
-
- if (ass->image->references) {
- for (i = 0; i < ass->image->nreferences; i++) {
- if (ass->image->references[i] && ass->image->references [i] != REFERENCE_MISSING) {
- if (!g_hash_table_lookup (ht, ass->image->references [i])) {
- add_assemblies_to_domain (domain, ass->image->references [i], ht);
- }
- }
- }
- }
- if (destroy_ht)
- g_hash_table_destroy (ht);
-}
-
-#ifdef ENABLE_NETCORE
-static void
-add_assembly_to_alc (MonoAssemblyLoadContext *alc, MonoAssembly *ass)
-{
- gint i;
- GSList *tmp;
-
- g_assert (ass != NULL);
-
- if (!ass->aname.name)
- return;
-
- mono_alc_assemblies_lock (alc);
-
- for (tmp = alc->loaded_assemblies; tmp; tmp = tmp->next) {
- if (tmp->data == ass) {
- mono_alc_assemblies_unlock (alc);
- return;
- }
- }
-
- mono_assembly_addref (ass);
- // Prepending here will break the test suite with frequent InvalidCastExceptions, so we have to append
- alc->loaded_assemblies = g_slist_append (alc->loaded_assemblies, ass);
- mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Assembly %s[%p] added to ALC (%p), ref_count=%d", ass->aname.name, ass, (gpointer)alc, ass->ref_count);
-
- if (ass->image->references) {
- for (i = 0; i < ass->image->nreferences; i++) {
- // TODO: remove all this after we're confident this assert isn't hit
- g_assertf (!ass->image->references [i], "Did not expect reference %d of %s to be resolved", i, ass->image->name);
- }
- }
-
- mono_alc_assemblies_unlock (alc);
-}
-#endif
-
-static void
-mono_domain_fire_assembly_load (MonoAssembly *assembly, gpointer user_data)
-{
- HANDLE_FUNCTION_ENTER ();
- static MonoClassField *assembly_load_field;
- static MonoMethod *assembly_load_method;
- ERROR_DECL (error);
- MonoDomain *domain = mono_domain_get ();
- MonoAssemblyLoadContext *alc = mono_domain_ambient_alc (domain); // FIXME: pass alc via mono_assembly_invoke_load_hook
- MonoClass *klass;
- MonoObjectHandle appdomain;
-
- if (!MONO_BOOL (domain->domain))
- goto leave; // This can happen during startup
-
- if (mono_runtime_get_no_exec ())
- goto leave;
-
-#ifdef ASSEMBLY_LOAD_DEBUG
- fprintf (stderr, "Loading %s into domain %s\n", assembly->aname.name, domain->friendly_name);
-#endif
- appdomain = MONO_HANDLE_NEW (MonoObject, &domain->domain->mbr.obj);
- klass = mono_handle_class (appdomain);
-
- mono_domain_assemblies_lock (domain);
- add_assemblies_to_domain (domain, assembly, NULL);
- mono_domain_assemblies_unlock (domain);
-#ifdef ENABLE_NETCORE
- add_assembly_to_alc (alc, assembly);
-#endif
-
- if (assembly_load_field == NULL) {
- assembly_load_field = mono_class_get_field_from_name_full (klass, "AssemblyLoad", NULL);
- g_assert (assembly_load_field);
- }
-
- if (!MONO_HANDLE_GET_FIELD_BOOL (appdomain, MonoObject*, assembly_load_field))
- goto leave; // No events waiting to be triggered
-
- MonoReflectionAssemblyHandle reflection_assembly;
- reflection_assembly = mono_assembly_get_object_handle (domain, assembly, error);
- mono_error_assert_ok (error);
-
- if (assembly_load_method == NULL) {
- assembly_load_method = mono_class_get_method_from_name_checked (klass, "DoAssemblyLoad", -1, 0, error);
- g_assert (assembly_load_method);
- }
-
- void *params [1];
- params [0] = MONO_HANDLE_RAW (reflection_assembly);
- mono_runtime_invoke_handle_void (assembly_load_method, appdomain, params, error);
-leave:
- mono_error_cleanup (error);
- HANDLE_FUNCTION_RETURN ();
-}
-
-static gboolean
-mono_domain_asmctx_from_path (const char *fname, MonoAssembly *requesting_assembly, gpointer user_data, MonoAssemblyContextKind *out_asmctx)
-{
- MonoDomain *domain = mono_domain_get ();
- char **search_path = NULL;
-
- for (search_path = domain->search_path; search_path && *search_path; search_path++) {
- if (mono_path_filename_in_basedir (fname, *search_path)) {
- *out_asmctx = MONO_ASMCTX_DEFAULT;
- return TRUE;
- }
- }
- return FALSE;
-}
-
-/*
- * LOCKING: Acquires the domain assemblies lock.
- */
-static void
-set_domain_search_path (MonoDomain *domain)
-{
- HANDLE_FUNCTION_ENTER ();
- ERROR_DECL (error);
- MonoAppDomainSetupHandle setup;
- gchar **tmp;
- gchar *search_path = NULL;
- gint npaths = 1;
- gchar **pvt_split = NULL;
- GError *gerror = NULL;
- gint appbaselen = -1;
-
- /*
- * We use the low-level domain assemblies lock, since this is called from
- * assembly loads hooks, which means this thread might hold the loader lock.
- */
- mono_domain_assemblies_lock (domain);
-
- if (!MONO_BOOL (domain->setup))
- goto exit;
-
- setup = MONO_HANDLE_NEW (MonoAppDomainSetup, domain->setup);
-
- if (domain->search_path && !MONO_HANDLE_GET_BOOL (setup, path_changed))
- goto exit;
-
- if (!MONO_HANDLE_GET_BOOL (setup, application_base))
- goto exit; // Must set application base to get private path working
-
- if (MONO_HANDLE_GET_BOOL (setup, private_bin_path)) {
- search_path = mono_string_handle_to_utf8 (MONO_HANDLE_NEW_GET (MonoString, setup, private_bin_path), error);
- if (!mono_error_ok (error)) { /*FIXME maybe we should bubble up the error.*/
- g_warning ("Could not decode AppDomain search path since it contains invalid characters");
- goto exit;
- }
- }
-
- if (domain->private_bin_path) {
- if (search_path == NULL)
- search_path = domain->private_bin_path;
- else {
- gchar *tmp2 = search_path;
- search_path = g_strjoin (";", search_path, domain->private_bin_path, NULL);
- g_free (tmp2);
- }
- }
-
- if (search_path) {
- /*
- * As per MSDN documentation, AppDomainSetup.PrivateBinPath contains a list of
- * directories relative to ApplicationBase separated by semicolons (see
- * http://msdn2.microsoft.com/en-us/library/system.appdomainsetup.privatebinpath.aspx)
- * The loop below copes with the fact that some Unix applications may use ':' (or
- * System.IO.Path.PathSeparator) as the path search separator. We replace it with
- * ';' for the subsequent split.
- *
- * The issue was reported in bug #81446
- */
-#ifndef TARGET_WIN32
- g_strdelimit (search_path, ':', ';');
-#endif
- pvt_split = g_strsplit (search_path, ";", 1000);
- g_free (search_path);
- for (tmp = pvt_split; *tmp; tmp++, npaths++);
- }
-
- g_strfreev (domain->search_path);
- domain->search_path = NULL;
-
- tmp = g_new (gchar*, npaths + 1);
- tmp [npaths] = NULL;
-
- *tmp = mono_string_handle_to_utf8 (MONO_HANDLE_NEW_GET (MonoString, setup, application_base), error);
- if (!mono_error_ok (error)) {
- g_free (tmp);
- goto exit;
- }
-
- domain->search_path = tmp;
-
- /* FIXME: is this needed? */
- if (strncmp (*tmp, "file://", 7) == 0) {
- gchar *file = *tmp;
- gchar *uri = *tmp;
- gchar *tmpuri;
-
- if (uri [7] != '/')
- uri = g_strdup_printf ("file:///%s", uri + 7);
-
- tmpuri = uri;
- uri = mono_escape_uri_string (tmpuri);
- *tmp = g_filename_from_uri (uri, NULL, &gerror);
- g_free (uri);
-
- if (tmpuri != file)
- g_free (tmpuri);
-
- if (gerror != NULL) {
- g_warning ("%s\n", gerror->message);
- g_error_free (gerror);
- *tmp = file;
- } else {
- g_free (file);
- }
- }
-
- for (gsize i = 1; pvt_split && i < npaths; i++) {
- if (g_path_is_absolute (pvt_split [i - 1])) {
- tmp [i] = g_strdup (pvt_split [i - 1]);
- } else {
- tmp [i] = g_build_filename (tmp [0], pvt_split [i - 1], NULL);
- }
-
- if (strchr (tmp [i], '.')) {
- gchar *reduced;
- gchar *freeme;
-
- reduced = mono_path_canonicalize (tmp [i]);
- if (appbaselen == -1)
- appbaselen = strlen (tmp [0]);
-
- if (strncmp (tmp [0], reduced, appbaselen)) {
- g_free (reduced);
- g_free (tmp [i]);
- tmp [i] = g_strdup ("");
- continue;
- }
-
- freeme = tmp [i];
- tmp [i] = reduced;
- g_free (freeme);
- }
- }
-
- if (MONO_HANDLE_GET_BOOL (setup, private_bin_path_probe)) {
- g_free (tmp [0]);
- tmp [0] = g_strdup ("");
- }
-
- MONO_HANDLE_SETVAL (setup, path_changed, MonoBoolean, FALSE);
-exit:
- mono_error_cleanup (error);
- g_strfreev (pvt_split);
- mono_domain_assemblies_unlock (domain);
- HANDLE_FUNCTION_RETURN ();
-}
-
-#ifdef DISABLE_SHADOW_COPY
-gboolean
-mono_is_shadow_copy_enabled (MonoDomain *domain, const gchar *dir_name)
-{
- return FALSE;
-}
-
-char *
-mono_make_shadow_copy (const char *filename, MonoError *error)
-{
- error_init (error);
- return (char *) filename;
-}
-#else
-
-typedef enum {
- SHADOW_COPY_SIBLING_EXT_APPEND,
- SHADOW_COPY_SIBLING_EXT_REPLACE,
-} ShadowCopySiblingExt;
-
-static
-gchar *
-make_sibling_path (const gchar *path, gint pathlen, const char *extension, ShadowCopySiblingExt extopt)
-{
- gchar *result = NULL;
- switch (extopt) {
- case SHADOW_COPY_SIBLING_EXT_APPEND: {
- result = g_strconcat (path, extension, NULL);
- break;
- }
- case SHADOW_COPY_SIBLING_EXT_REPLACE: {
- /* expect path to be a .dll or .exe (or some case insensitive variant) */
- g_assert (pathlen >= 4 && path[pathlen - 4] == '.');
- GString *s = g_string_sized_new (pathlen - 4 + strlen (extension));
- g_string_append_len (s, path, pathlen - 4);
- g_string_append (s, extension);
- result = g_string_free (s, FALSE);
- break;
- }
- default:
- g_assert_not_reached ();
- }
- return result;
-}
-
-static gboolean
-shadow_copy_sibling (const gchar *src_pristine, gint srclen, const char *extension, ShadowCopySiblingExt extopt, const gchar *target_pristine, gint targetlen)
-{
- gchar *file = NULL;
- gunichar2 *orig = NULL;
- gunichar2 *dest = NULL;
- gboolean copy_result = TRUE;
- gchar *target = NULL;
-
- char *src = make_sibling_path (src_pristine, srclen, extension, extopt);
-
- if (IS_PORTABILITY_CASE) {
- file = mono_portability_find_file (src, TRUE);
- if (file == NULL)
- goto exit;
- } else if (!g_file_test (src, G_FILE_TEST_IS_REGULAR))
- goto exit;
-
- orig = g_utf8_to_utf16 (src, strlen (src), NULL, NULL, NULL);
-
- target = make_sibling_path (target_pristine, targetlen, extension, extopt);
-
- dest = g_utf8_to_utf16 (target, strlen (target), NULL, NULL, NULL);
-
- mono_w32file_delete (dest);
-
- gint32 copy_error;
- copy_result = mono_w32file_copy (orig, dest, TRUE, ©_error);
-
- /* Fix for bug #556884 - make sure the files have the correct mode so that they can be
- * overwritten when updated in their original locations. */
- if (copy_result)
- copy_result = mono_w32file_set_attributes (dest, FILE_ATTRIBUTE_NORMAL);
-
-exit:
- g_free (file);
- g_free (orig);
- g_free (dest);
- g_free (src);
- g_free (target);
- return copy_result;
-}
-
-static gint32
-get_cstring_hash (const char *str)
-{
- const char *p;
- gint32 h = 0;
-
- if (!str || !str [0])
- return 0;
-
- gsize const len = strlen (str);
- p = str;
- for (gsize i = 0; i < len; i++) {
- h = (h << 5) - h + *p;
- p++;
- }
-
- return h;
-}
-
-/*
- * Returned memory is malloc'd. Called must free it
- */
-static char *
-get_shadow_assembly_location_base (MonoDomain *domain, MonoError *error)
-{
- MonoAppDomainSetup *setup;
- char *cache_path = NULL;
- char *appname = NULL;
- char *userdir = NULL;
- char *location;
-
- error_init (error);
-
- setup = domain->setup;
- if (setup->cache_path != NULL && setup->application_name != NULL) {
- cache_path = mono_string_to_utf8_checked_internal (setup->cache_path, error);
- return_val_if_nok (error, NULL);
-
-#ifndef TARGET_WIN32
- {
- gint i;
- for (i = strlen (cache_path) - 1; i >= 0; i--)
- if (cache_path [i] == '\\')
- cache_path [i] = '/';
- }
-#endif
-
- appname = mono_string_to_utf8_checked_internal (setup->application_name, error);
- if (!mono_error_ok (error)) {
- g_free (cache_path);
- return NULL;
- }
-
- location = g_build_filename (cache_path, appname, "assembly", "shadow", NULL);
- } else {
- userdir = g_strdup_printf ("%s-mono-cachepath", g_get_user_name ());
- location = g_build_filename (g_get_tmp_dir (), userdir, "assembly", "shadow", NULL);
- }
- g_free (appname);
- g_free (cache_path);
- g_free (userdir);
- return location;
-}
-
-static char *
-get_shadow_assembly_location (const char *filename, MonoError *error)
-{
- gint32 hash = 0, hash2 = 0;
- char name_hash [9];
- char path_hash [30];
- char *bname = g_path_get_basename (filename);
- char *dirname = g_path_get_dirname (filename);
- char *location, *tmploc;
- MonoDomain *domain = mono_domain_get ();
-
- error_init (error);
-
- hash = get_cstring_hash (bname);
- hash2 = get_cstring_hash (dirname);
- g_snprintf (name_hash, sizeof (name_hash), "%08x", hash);
- g_snprintf (path_hash, sizeof (path_hash), "%08x_%08x_%08x", hash ^ hash2, hash2, domain->shadow_serial);
- tmploc = get_shadow_assembly_location_base (domain, error);
- if (!mono_error_ok (error)) {
- g_free (bname);
- g_free (dirname);
- return NULL;
- }
-
- location = g_build_filename (tmploc, name_hash, path_hash, bname, NULL);
- g_free (tmploc);
- g_free (bname);
- g_free (dirname);
- return location;
-}
-
-static gboolean
-private_file_needs_copying (const char *src, struct stat *sbuf_src, char *dest)
-{
- struct stat sbuf_dest;
- gchar *stat_src;
- gchar *real_src = mono_portability_find_file (src, TRUE);
-
- if (!real_src)
- stat_src = (gchar*)src;
- else
- stat_src = real_src;
-
- if (stat (stat_src, sbuf_src) == -1) {
- time_t tnow = time (NULL);
-
- if (real_src)
- g_free (real_src);
-
- memset (sbuf_src, 0, sizeof (*sbuf_src));
- sbuf_src->st_mtime = tnow;
- sbuf_src->st_atime = tnow;
- return TRUE;
- }
-
- if (real_src)
- g_free (real_src);
-
- if (stat (dest, &sbuf_dest) == -1)
- return TRUE;
-
- if (sbuf_src->st_size == sbuf_dest.st_size &&
- sbuf_src->st_mtime == sbuf_dest.st_mtime)
- return FALSE;
-
- return TRUE;
-}
-
-static gboolean
-shadow_copy_create_ini (const char *shadow, const char *filename)
-{
- gunichar2 *u16_ini = NULL;
- gboolean result = FALSE;
- guint32 n;
- HANDLE handle = INVALID_HANDLE_VALUE;
- gchar *full_path = NULL;
-
- char *dir_name = g_path_get_dirname (shadow);
- char *ini_file = g_build_filename (dir_name, "__AssemblyInfo__.ini", NULL);
- g_free (dir_name);
- result = g_file_test (ini_file, G_FILE_TEST_IS_REGULAR);
- if (result)
- goto exit;
-
- u16_ini = g_utf8_to_utf16 (ini_file, strlen (ini_file), NULL, NULL, NULL);
- if (!u16_ini)
- goto exit;
-
- handle = mono_w32file_create (u16_ini, GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, CREATE_NEW, FileAttributes_Normal);
- if (handle == INVALID_HANDLE_VALUE)
- goto exit;
-
- full_path = mono_path_resolve_symlinks (filename);
- gint32 win32error;
- win32error = 0;
- result = mono_w32file_write (handle, full_path, strlen (full_path), &n, &win32error);
-exit:
- if (handle != INVALID_HANDLE_VALUE)
- mono_w32file_close (handle);
- g_free (u16_ini);
- g_free (full_path);
- g_free (ini_file);
- return result;
-}
-
-gboolean
-mono_is_shadow_copy_enabled (MonoDomain *domain, const gchar *dir_name)
-{
- ERROR_DECL (error);
- MonoAppDomainSetup *setup;
- gchar *all_dirs = NULL;
- gchar **dir_ptr;
- gchar **directories = NULL;
- gchar *shadow_status_string;
- gchar *base_dir = NULL;
- gboolean shadow_enabled;
- gboolean found = FALSE;
-
- if (domain == NULL)
- goto exit;
-
- setup = domain->setup;
- if (setup == NULL || setup->shadow_copy_files == NULL)
- goto exit;
-
- shadow_status_string = mono_string_to_utf8_checked_internal (setup->shadow_copy_files, error);
- if (!mono_error_ok (error))
- goto exit;
-
- shadow_enabled = !g_ascii_strncasecmp (shadow_status_string, "true", 4);
- g_free (shadow_status_string);
-
- if (!shadow_enabled)
- goto exit;
-
- found = (setup->shadow_copy_directories == NULL);
- if (found)
- goto exit;
-
- /* Is dir_name a shadow_copy destination already? */
- base_dir = get_shadow_assembly_location_base (domain, error);
- if (!mono_error_ok (error))
- goto exit;
-
- found = !!strstr (dir_name, base_dir);
- if (found)
- goto exit;
-
- all_dirs = mono_string_to_utf8_checked_internal (setup->shadow_copy_directories, error);
- if (!mono_error_ok (error))
- goto exit;
-
- directories = g_strsplit (all_dirs, G_SEARCHPATH_SEPARATOR_S, 1000);
- dir_ptr = directories;
- while (!found && *dir_ptr) {
- found = (**dir_ptr != '\0' && !strcmp (*dir_ptr, dir_name));
- dir_ptr++;
- }
-exit:
- mono_error_cleanup (error);
- g_free (base_dir);
- g_strfreev (directories);
- g_free (all_dirs);
- return found;
-}
-
-/*
-This function raises exceptions so it can cause as sorts of nasty stuff if called
-while holding a lock.
-Returns old file name if shadow copy is disabled, new shadow copy file name if successful
-or NULL if source file not found.
-FIXME bubble up the error instead of raising it here
-*/
-char *
-mono_make_shadow_copy (const char *filename, MonoError *oerror)
-{
- ERROR_DECL (error);
- gint filename_len, shadow_len;
- gunichar2 *orig, *dest;
- guint32 attrs;
- char *shadow;
- gboolean copy_result;
- struct stat src_sbuf;
- struct utimbuf utbuf;
- char *dir_name = g_path_get_dirname (filename);
- MonoDomain *domain = mono_domain_get ();
- char *shadow_dir;
- gint32 copy_error;
-
- error_init (oerror);
-
- set_domain_search_path (domain);
-
- if (!mono_is_shadow_copy_enabled (domain, dir_name)) {
- g_free (dir_name);
- return (char *) filename;
- }
-
- /* Is dir_name a shadow_copy destination already? */
- shadow_dir = get_shadow_assembly_location_base (domain, error);
- if (!mono_error_ok (error)) {
- mono_error_cleanup (error);
- g_free (dir_name);
- mono_error_set_execution_engine (oerror, "Failed to create shadow copy (invalid characters in shadow directory name).");
- return NULL;
- }
-
- if (strstr (dir_name, shadow_dir)) {
- g_free (shadow_dir);
- g_free (dir_name);
- return (char *) filename;
- }
- g_free (shadow_dir);
- g_free (dir_name);
-
- shadow = get_shadow_assembly_location (filename, error);
- if (!mono_error_ok (error)) {
- mono_error_cleanup (error);
- mono_error_set_execution_engine (oerror, "Failed to create shadow copy (invalid characters in file name).");
- return NULL;
- }
-
- if (g_ensure_directory_exists (shadow) == FALSE) {
- g_free (shadow);
- mono_error_set_execution_engine (oerror, "Failed to create shadow copy (ensure directory exists).");
- return NULL;
- }
-
- if (!private_file_needs_copying (filename, &src_sbuf, shadow))
- return (char*) shadow;
-
- orig = g_utf8_to_utf16 (filename, strlen (filename), NULL, NULL, NULL);
- dest = g_utf8_to_utf16 (shadow, strlen (shadow), NULL, NULL, NULL);
- mono_w32file_delete (dest);
-
- /* Fix for bug #17066 - make sure we can read the file. if not then don't error but rather
- * let the assembly fail to load. This ensures you can do Type.GetType("NS.T, NonExistantAssembly)
- * and not have it runtime error" */
- attrs = mono_w32file_get_attributes (orig);
- if (attrs == INVALID_FILE_ATTRIBUTES) {
- g_free (shadow);
- return (char *)filename;
- }
-
- copy_result = mono_w32file_copy (orig, dest, TRUE, ©_error);
-
- /* Fix for bug #556884 - make sure the files have the correct mode so that they can be
- * overwritten when updated in their original locations. */
- if (copy_result)
- copy_result = mono_w32file_set_attributes (dest, FILE_ATTRIBUTE_NORMAL);
-
- g_free (dest);
- g_free (orig);
-
- if (copy_result == FALSE) {
- g_free (shadow);
-
- /* Fix for bug #17251 - if file not found try finding assembly by other means (it is not fatal error) */
- if (mono_w32error_get_last() == ERROR_FILE_NOT_FOUND || mono_w32error_get_last() == ERROR_PATH_NOT_FOUND)
- return NULL; /* file not found, shadow copy failed */
-
- mono_error_set_execution_engine (oerror, "Failed to create shadow copy (mono_w32file_copy).");
- return NULL;
- }
-
- /* attempt to copy .mdb, .pdb and .config if they exist */
- filename_len = strlen (filename);
- shadow_len = strlen (shadow);
-
- copy_result = shadow_copy_sibling (filename, filename_len, ".mdb", SHADOW_COPY_SIBLING_EXT_APPEND, shadow, shadow_len);
- if (copy_result)
- copy_result = shadow_copy_sibling (filename, filename_len, ".pdb", SHADOW_COPY_SIBLING_EXT_REPLACE, shadow, shadow_len);
- if (copy_result)
- copy_result = shadow_copy_sibling (filename, filename_len, ".config", SHADOW_COPY_SIBLING_EXT_APPEND, shadow, shadow_len);
-
- if (!copy_result) {
- g_free (shadow);
- mono_error_set_execution_engine (oerror, "Failed to create shadow copy of sibling data (mono_w32file_copy).");
- return NULL;
- }
-
- /* Create a .ini file containing the original assembly location */
- if (!shadow_copy_create_ini (shadow, filename)) {
- g_free (shadow);
- mono_error_set_execution_engine (oerror, "Failed to create shadow copy .ini file.");
- return NULL;
- }
-
- utbuf.actime = src_sbuf.st_atime;
- utbuf.modtime = src_sbuf.st_mtime;
- utime (shadow, &utbuf);
-
- return shadow;
-}
-#endif /* DISABLE_SHADOW_COPY */
-
-/**
- * mono_domain_from_appdomain:
- */
-MonoDomain *
-mono_domain_from_appdomain (MonoAppDomain *appdomain_raw)
-{
- HANDLE_FUNCTION_ENTER ();
- MonoDomain *result;
- MONO_ENTER_GC_UNSAFE;
- MONO_HANDLE_DCL (MonoAppDomain, appdomain);
- result = mono_domain_from_appdomain_handle (appdomain);
- MONO_EXIT_GC_UNSAFE;
- HANDLE_FUNCTION_RETURN_VAL (result);
-}
-
-MonoDomain *
-mono_domain_from_appdomain_handle (MonoAppDomainHandle appdomain)
-{
- HANDLE_FUNCTION_ENTER ();
- MonoDomain *dom = NULL;
- if (MONO_HANDLE_IS_NULL (appdomain))
- goto leave;
-
- if (mono_class_is_transparent_proxy (mono_handle_class (appdomain))) {
- MonoTransparentProxyHandle tp = MONO_HANDLE_CAST (MonoTransparentProxy, appdomain);
- MonoRealProxyHandle rp = MONO_HANDLE_NEW_GET (MonoRealProxy, tp, rp);
-
- dom = mono_domain_get_by_id (MONO_HANDLE_GETVAL (rp, target_domain_id));
- } else
- dom = MONO_HANDLE_GETVAL (appdomain, data);
-
-leave:
- HANDLE_FUNCTION_RETURN_VAL (dom);
-}
-
-
-static gboolean
-try_load_from (MonoAssembly **assembly,
- const gchar *path1, const gchar *path2,
- const gchar *path3, const gchar *path4,
- const MonoAssemblyOpenRequest *req)
-{
- gchar *fullpath;
- gboolean found = FALSE;
-
- *assembly = NULL;
- fullpath = g_build_filename (path1, path2, path3, path4, NULL);
-
- if (IS_PORTABILITY_SET) {
- gchar *new_fullpath = mono_portability_find_file (fullpath, TRUE);
- if (new_fullpath) {
- g_free (fullpath);
- fullpath = new_fullpath;
- found = TRUE;
- }
- } else
- found = g_file_test (fullpath, G_FILE_TEST_IS_REGULAR);
-
- if (found) {
- *assembly = mono_assembly_request_open (fullpath, req, NULL);
- }
-
- g_free (fullpath);
- return (*assembly != NULL);
-}
-
-static MonoAssembly *
-real_load (gchar **search_path, const gchar *culture, const gchar *name, const MonoAssemblyOpenRequest *req)
-{
- MonoAssembly *result = NULL;
- gchar **path;
- gchar *filename;
- const gchar *local_culture;
- gint len;
-
- if (!culture || *culture == '\0') {
- local_culture = "";
- } else {
- local_culture = culture;
- }
-
- filename = g_strconcat (name, ".dll", NULL);
- len = strlen (filename);
-
- for (path = search_path; *path; path++) {
- if (**path == '\0') {
- continue; /* Ignore empty ApplicationBase */
- }
-
- /* See test cases in bug #58992 and bug #57710 */
- /* 1st try: [culture]/[name].dll (culture may be empty) */
- strcpy (filename + len - 4, ".dll");
- if (try_load_from (&result, *path, local_culture, "", filename, req))
- break;
-
- /* 2nd try: [culture]/[name].exe (culture may be empty) */
- strcpy (filename + len - 4, ".exe");
- if (try_load_from (&result, *path, local_culture, "", filename, req))
- break;
-
- /* 3rd try: [culture]/[name]/[name].dll (culture may be empty) */
- strcpy (filename + len - 4, ".dll");
- if (try_load_from (&result, *path, local_culture, name, filename, req))
- break;
-
- /* 4th try: [culture]/[name]/[name].exe (culture may be empty) */
- strcpy (filename + len - 4, ".exe");
- if (try_load_from (&result, *path, local_culture, name, filename, req))
- break;
- }
-
- g_free (filename);
- return result;
-}
-
-/*
- * Try loading the assembly from ApplicationBase and PrivateBinPath
- * and then from assemblies_path if any.
- * LOCKING: This is called from the assembly loading code, which means the caller
- * might hold the loader lock. Thus, this function must not acquire the domain lock.
- */
-static MonoAssembly *
-mono_domain_assembly_preload (MonoAssemblyLoadContext *alc,
- MonoAssemblyName *aname,
- gchar **assemblies_path,
- gboolean refonly,
- gpointer user_data,
- MonoError *error)
-{
- MonoDomain *domain = mono_domain_get ();
- MonoAssembly *result = NULL;
-#ifdef ENABLE_NETCORE
- g_assert (alc);
- g_assert (mono_alc_domain (alc) == domain);
-#endif
-
- set_domain_search_path (domain);
-
- MonoAssemblyCandidatePredicate predicate = NULL;
- void* predicate_ud = NULL;
-#if !defined(DISABLE_DESKTOP_LOADER)
- if (G_LIKELY (mono_loader_get_strict_strong_names ())) {
- predicate = &mono_assembly_candidate_predicate_sn_same_name;
- predicate_ud = aname;
- }
-#endif
- MonoAssemblyOpenRequest req;
- mono_assembly_request_prepare (&req.request, sizeof (req), refonly ? MONO_ASMCTX_REFONLY : MONO_ASMCTX_DEFAULT);
- req.request.alc = alc;
- req.request.predicate = predicate;
- req.request.predicate_ud = predicate_ud;
-
- if (domain->search_path && domain->search_path [0] != NULL) {
- if (mono_trace_is_traced (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY)) {
- mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY, "Domain %s search path is:", domain->friendly_name);
- for (int i = 0; domain->search_path [i]; i++) {
- const char *p = domain->search_path[i];
- mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY, "\tpath[%d] = '%s'", i, p);
- }
- mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY, "End of domain %s search path.", domain->friendly_name);
- }
- result = real_load (domain->search_path, aname->culture, aname->name, &req);
- }
-
- if (result == NULL && assemblies_path && assemblies_path [0] != NULL) {
- result = real_load (assemblies_path, aname->culture, aname->name, &req);
- }
-
- return result;
-}
-
-/**
- * mono_assembly_load_from_assemblies_path:
- *
- * \param assemblies_path directories to search for given assembly name, terminated by NULL
- * \param aname assembly name to look for
- * \param asmctx assembly load context for this load operation
- *
- * Given a NULL-terminated array of paths, look for \c name.ext, \c name, \c
- * culture/name.ext, \c culture/name/name.ext where \c ext is \c dll and \c
- * exe and try to load it in the given assembly load context.
- *
- * \returns A \c MonoAssembly if probing was successful, or NULL otherwise.
- */
-MonoAssembly*
-mono_assembly_load_from_assemblies_path (gchar **assemblies_path, MonoAssemblyName *aname, MonoAssemblyContextKind asmctx)
-{
- MonoAssemblyCandidatePredicate predicate = NULL;
- void* predicate_ud = NULL;
-#if !defined(DISABLE_DESKTOP_LOADER)
- if (G_LIKELY (mono_loader_get_strict_strong_names ())) {
- predicate = &mono_assembly_candidate_predicate_sn_same_name;
- predicate_ud = aname;
- }
-#endif
- MonoAssemblyOpenRequest req;
- mono_assembly_request_prepare (&req.request, sizeof (req), asmctx);
- req.request.predicate = predicate;
- req.request.predicate_ud = predicate_ud;
- MonoAssembly *result = NULL;
- if (assemblies_path && assemblies_path[0] != NULL) {
- result = real_load (assemblies_path, aname->culture, aname->name, &req);
- }
- return result;
-}
-
-/*
- * Check whenever a given assembly was already loaded in the current appdomain.
- */
-static MonoAssembly *
-mono_domain_assembly_search (MonoAssemblyLoadContext *alc, MonoAssembly *requesting,
- MonoAssemblyName *aname,
- gboolean refonly,
- gboolean postload,
- gpointer user_data,
- MonoError *error)
-{
- g_assert (aname != NULL);
- GSList *tmp;
- MonoAssembly *ass;
- const gboolean strong_name = aname->public_key_token[0] != 0;
- /* If it's not a strong name, any version that has the right simple
- * name is good enough to satisfy the request. .NET Framework also
- * ignores case differences in this case. */
- const MonoAssemblyNameEqFlags eq_flags = (MonoAssemblyNameEqFlags)(strong_name ? MONO_ANAME_EQ_IGNORE_CASE :
- (MONO_ANAME_EQ_IGNORE_PUBKEY | MONO_ANAME_EQ_IGNORE_VERSION | MONO_ANAME_EQ_IGNORE_CASE));
-
-// TODO: this is currently broken due to the lack of proper ALC resolution logic and the load hook not using the correct ALC
-#if 0 //def ENABLE_NETCORE
- mono_alc_assemblies_lock (alc);
- for (tmp = alc->loaded_assemblies; tmp; tmp = tmp->next) {
- ass = (MonoAssembly *)tmp->data;
- g_assert (ass != NULL);
- // TODO: Can dynamic assemblies match here for netcore? Also, this ignores case while exact_sn_match does not.
- if (assembly_is_dynamic (ass) || !mono_assembly_names_equal_flags (aname, &ass->aname, eq_flags))
- continue;
-
- mono_alc_assemblies_unlock (alc);
- return ass;
- }
- mono_alc_assemblies_unlock (alc);
-#else
- MonoDomain *domain = mono_domain_get ();
- mono_domain_assemblies_lock (domain);
- for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
- ass = (MonoAssembly *)tmp->data;
- g_assert (ass != NULL);
- /* Dynamic assemblies can't match here in MS.NET */
- gboolean ass_ref_only = mono_asmctx_get_kind (&ass->context) == MONO_ASMCTX_REFONLY;
- if (assembly_is_dynamic (ass) || refonly != ass_ref_only || !mono_assembly_names_equal_flags (aname, &ass->aname, eq_flags))
- continue;
-
- mono_domain_assemblies_unlock (domain);
- return ass;
- }
- mono_domain_assemblies_unlock (domain);
-#endif
-
- return NULL;
-}
-
-#if ENABLE_NETCORE
-MonoReflectionAssemblyHandle
-ves_icall_System_Reflection_Assembly_InternalLoad (MonoStringHandle name_handle, MonoStackCrawlMark *stack_mark, gpointer load_Context, MonoError *error)
-{
- error_init (error);
- MonoDomain *domain = mono_domain_get ();
- MonoAssembly *ass = NULL;
- MonoAssemblyName aname;
- MonoAssemblyByNameRequest req;
- MonoAssemblyContextKind asmctx;
- MonoImageOpenStatus status = MONO_IMAGE_OK;
- gboolean parsed;
- char *name;
-
- MonoAssemblyLoadContext *alc = (MonoAssemblyLoadContext *)load_Context;
- if (!alc)
- alc = mono_domain_default_alc (domain);
- g_assert (alc);
- asmctx = MONO_ASMCTX_DEFAULT;
- mono_assembly_request_prepare (&req.request, sizeof (req), asmctx);
- req.request.alc = alc;
- req.basedir = NULL;
- req.no_postload_search = TRUE;
-
- name = mono_string_handle_to_utf8 (name_handle, error);
- goto_if_nok (error, fail);
- parsed = mono_assembly_name_parse (name, &aname);
- g_free (name);
- if (!parsed)
- goto fail;
-
- ass = mono_assembly_request_byname (&aname, &req, &status);
- if (!ass)
- goto fail;
-
- MonoReflectionAssemblyHandle refass;
- refass = mono_assembly_get_object_handle (domain, ass, error);
- goto_if_nok (error, fail);
- return refass;
-
-fail:
- return MONO_HANDLE_CAST (MonoReflectionAssembly, NULL_HANDLE);
-}
-
-#endif
-
-MonoReflectionAssemblyHandle
-ves_icall_System_Reflection_Assembly_LoadFrom (MonoStringHandle fname, MonoBoolean refOnly, MonoStackCrawlMark *stack_mark, MonoError *error)
-{
- error_init (error);
- MonoDomain *domain = mono_domain_get ();
- char *name, *filename;
- MonoImageOpenStatus status = MONO_IMAGE_OK;
- MonoReflectionAssemblyHandle result = MONO_HANDLE_CAST (MonoReflectionAssembly, NULL_HANDLE);
-
- name = NULL;
-
- if (MONO_HANDLE_IS_NULL (fname)) {
- mono_error_set_argument_null (error, "assemblyFile", "");
- goto leave;
- }
-
- name = filename = mono_string_handle_to_utf8 (fname, error);
- goto_if_nok (error, leave);
-
- MonoAssembly *requesting_assembly;
- requesting_assembly = NULL;
- if (!refOnly)
- requesting_assembly = mono_runtime_get_caller_from_stack_mark (stack_mark);
-
- MonoAssembly *ass;
- MonoAssemblyOpenRequest req;
- mono_assembly_request_prepare (&req.request, sizeof (req), refOnly ? MONO_ASMCTX_REFONLY : MONO_ASMCTX_LOADFROM);
- req.requesting_assembly = requesting_assembly;
- ass = mono_assembly_request_open (filename, &req, &status);
-
- if (!ass) {
- if (status == MONO_IMAGE_IMAGE_INVALID)
- mono_error_set_bad_image_by_name (error, name, "Invalid Image");
- else
- mono_error_set_file_not_found (error, name, "Invalid Image");
- goto leave;
- }
-
- result = mono_assembly_get_object_handle (domain, ass, error);
-
-leave:
- g_free (name);
- return result;
-}
-
-static
-MonoAssembly *
-mono_alc_load_file (MonoAssemblyLoadContext *alc, MonoStringHandle fname, MonoAssembly *executing_assembly, MonoError *error)
-{
- MonoAssembly *ass = NULL;
- HANDLE_FUNCTION_ENTER ();
- char *filename = NULL;
- if (MONO_HANDLE_IS_NULL (fname)) {
- mono_error_set_argument_null (error, "assemblyFile", "");
- goto leave;
- }
-
- filename = mono_string_handle_to_utf8 (fname, error);
- goto_if_nok (error, leave);
-
- if (!g_path_is_absolute (filename)) {
- mono_error_set_argument (error, "assemblyFile", "Absolute path information is required.");
- goto leave;
- }
-
-
- MonoImageOpenStatus status;
- MonoAssemblyOpenRequest req;
- mono_assembly_request_prepare (&req.request, sizeof (req), MONO_ASMCTX_INDIVIDUAL);
- req.requesting_assembly = executing_assembly;
- req.request.alc = alc;
- ass = mono_assembly_request_open (filename, &req, &status);
- if (!ass) {
- if (status == MONO_IMAGE_IMAGE_INVALID)
- mono_error_set_bad_image_by_name (error, filename, "Invalid Image");
- else
- mono_error_set_file_not_found (error, filename, "Invalid Image");
- }
-
-leave:
- g_free (filename);
- HANDLE_FUNCTION_RETURN_VAL (ass);
-}
-
-#ifndef ENABLE_NETCORE
-MonoReflectionAssemblyHandle
-ves_icall_System_Reflection_Assembly_LoadFile_internal (MonoStringHandle fname, MonoStackCrawlMark *stack_mark, MonoError *error)
-{
- MonoDomain *domain = mono_domain_get ();
- MonoReflectionAssemblyHandle result = MONO_HANDLE_CAST (MonoReflectionAssembly, NULL_HANDLE);
- MonoAssembly *executing_assembly;
- executing_assembly = mono_runtime_get_caller_from_stack_mark (stack_mark);
- MonoAssembly *ass = mono_alc_load_file (mono_domain_default_alc (domain), fname, executing_assembly, error);
- goto_if_nok (error, leave);
-
- result = mono_assembly_get_object_handle (domain, ass, error);
-leave:
- return result;
-}
-#else
-MonoReflectionAssemblyHandle
-ves_icall_System_Runtime_Loader_AssemblyLoadContext_InternalLoadFile (gpointer alc_ptr, MonoStringHandle fname, MonoStackCrawlMark *stack_mark, MonoError *error)
-{
- MonoDomain *domain = mono_domain_get ();
- MonoReflectionAssemblyHandle result = MONO_HANDLE_CAST (MonoReflectionAssembly, NULL_HANDLE);
- MonoAssemblyLoadContext *alc = (MonoAssemblyLoadContext *)alc_ptr;
-
- MonoAssembly *executing_assembly;
- executing_assembly = mono_runtime_get_caller_from_stack_mark (stack_mark);
- MonoAssembly *ass = mono_alc_load_file (alc, fname, executing_assembly, error);
- goto_if_nok (error, leave);
-
- result = mono_assembly_get_object_handle (domain, ass, error);
-
-leave:
- return result;
-}
-#endif
-
-static MonoAssembly*
-mono_alc_load_raw_bytes (MonoAssemblyLoadContext *alc, guint8 *raw_assembly, guint32 raw_assembly_len, guint8 *raw_symbol_data, guint32 raw_symbol_len, gboolean refonly, MonoError *error);
-
-#ifdef ENABLE_NETCORE
-MonoReflectionAssemblyHandle
-ves_icall_System_Runtime_Loader_AssemblyLoadContext_InternalLoadFromStream (gpointer native_alc, gpointer raw_assembly_ptr, gint32 raw_assembly_len, gpointer raw_symbols_ptr, gint32 raw_symbols_len, MonoError *error)
-{
- MonoDomain *domain = mono_domain_get ();
- MonoReflectionAssemblyHandle result = MONO_HANDLE_CAST (MonoReflectionAssembly, NULL_HANDLE);
- MonoAssembly *assm = NULL;
- assm = mono_alc_load_raw_bytes ((MonoAssemblyLoadContext *)native_alc, (guint8 *)raw_assembly_ptr, raw_assembly_len, (guint8 *)raw_symbols_ptr, raw_symbols_len, FALSE, error);
- goto_if_nok (error, leave);
-
- result = mono_assembly_get_object_handle (domain, assm, error);
-
-leave:
- return result;
-}
-#else
-MonoReflectionAssemblyHandle
-ves_icall_System_AppDomain_LoadAssemblyRaw (MonoAppDomainHandle ad,
- MonoArrayHandle raw_assembly,
- MonoArrayHandle raw_symbol_store, MonoObjectHandle evidence,
- MonoBoolean refonly,
- MonoError *error)
-{
- MonoAssembly *ass;
- MonoReflectionAssemblyHandle refass = MONO_HANDLE_CAST (MonoReflectionAssembly, NULL_HANDLE);
- MonoDomain *domain = MONO_HANDLE_GETVAL(ad, data);
- guint32 raw_assembly_len = mono_array_handle_length (raw_assembly);
-
- /* Copy the data ourselves to unpin the raw assembly byte array as soon as possible */
- guint8 *assembly_data = (guint8*) g_try_malloc (raw_assembly_len);
- if (!assembly_data) {
- mono_error_set_out_of_memory (error, "Could not allocate %ud bytes to copy raw assembly data", raw_assembly_len);
- return refass;
- }
- uint32_t gchandle;
- mono_byte *raw_data = (mono_byte*) MONO_ARRAY_HANDLE_PIN (raw_assembly, gchar, 0, &gchandle);
- memcpy (assembly_data, raw_data, raw_assembly_len);
- mono_gchandle_free_internal (gchandle); /* unpin */
- MONO_HANDLE_ASSIGN (raw_assembly, NULL_HANDLE); /* don't reference the data anymore */
-
- MonoAssemblyLoadContext *alc = mono_domain_default_alc (domain);
-
- mono_byte *raw_symbol_data = NULL;
- guint32 symbol_len = 0;
- uint32_t symbol_gchandle = 0;
- if (!MONO_HANDLE_IS_NULL (raw_symbol_store)) {
- symbol_len = mono_array_handle_length (raw_symbol_store);
- raw_symbol_data = (mono_byte*) MONO_ARRAY_HANDLE_PIN (raw_symbol_store, mono_byte, 0, &symbol_gchandle);
- }
-
- ass = mono_alc_load_raw_bytes (alc, assembly_data, raw_assembly_len, raw_symbol_data, symbol_len, refonly, error);
- mono_gchandle_free_internal (symbol_gchandle);
- goto_if_nok (error, leave);
-
- refass = mono_assembly_get_object_handle (domain, ass, error);
- if (!MONO_HANDLE_IS_NULL (refass))
- MONO_HANDLE_SET (refass, evidence, evidence);
-
-leave:
- return refass;
-}
-#endif /* ENABLE_NETCORE */
-
-static MonoAssembly*
-mono_alc_load_raw_bytes (MonoAssemblyLoadContext *alc, guint8 *assembly_data, guint32 raw_assembly_len, guint8 *raw_symbol_data, guint32 raw_symbol_len, gboolean refonly, MonoError *error)
-{
- MonoAssembly *ass = NULL;
- MonoImageOpenStatus status;
- MonoImage *image = mono_image_open_from_data_internal (alc, (char*)assembly_data, raw_assembly_len, FALSE, NULL, refonly, FALSE, NULL);
-
- if (!image) {
- mono_error_set_bad_image_by_name (error, "In memory assembly", "0x%p", assembly_data);
- return ass;
- }
-
- if (raw_symbol_data)
- mono_debug_open_image_from_memory (image, raw_symbol_data, raw_symbol_len);
-
- MonoAssembly* redirected_asm = NULL;
- MonoImageOpenStatus new_status = MONO_IMAGE_OK;
- if ((redirected_asm = mono_assembly_binding_applies_to_image (image, &new_status))) {
- mono_image_close (image);
- image = redirected_asm->image;
- mono_image_addref (image); /* so that mono_image close, below, has something to do */
- } else if (new_status != MONO_IMAGE_OK) {
- mono_image_close (image);
- mono_error_set_bad_image_by_name (error, "In Memory assembly", "0x%p was assembly binding redirected to another assembly that failed to load", assembly_data);
- return ass;
- }
-
- MonoAssemblyLoadRequest req;
- mono_assembly_request_prepare (&req, sizeof (req), refonly? MONO_ASMCTX_REFONLY : MONO_ASMCTX_INDIVIDUAL);
- req.alc = alc;
- ass = mono_assembly_request_load_from (image, "", &req, &status);
-
- if (!ass) {
- mono_image_close (image);
- mono_error_set_bad_image_by_name (error, "In Memory assembly", "0x%p", assembly_data);
- return ass;
- }
-
- /* Clear the reference added by mono_image_open_from_data_internal above */
- mono_image_close (image);
-
- return ass;
-}
-
-MonoReflectionAssemblyHandle
-ves_icall_System_AppDomain_LoadAssembly (MonoAppDomainHandle ad, MonoStringHandle assRef, MonoObjectHandle evidence, MonoBoolean refOnly, MonoStackCrawlMark *stack_mark, MonoError *error)
-{
- MonoDomain *domain = MONO_HANDLE_GETVAL (ad, data);
- MonoImageOpenStatus status = MONO_IMAGE_OK;
- MonoAssembly *ass;
- MonoAssemblyName aname;
- gchar *name = NULL;
- gboolean parsed;
-
- g_assert (!MONO_HANDLE_IS_NULL (assRef));
-
- name = mono_string_handle_to_utf8 (assRef, error);
- goto_if_nok (error, fail);
- parsed = mono_assembly_name_parse (name, &aname);
- g_free (name);
-
- if (!parsed) {
- MonoReflectionAssemblyHandle refass = MONO_HANDLE_CAST (MonoReflectionAssembly, NULL_HANDLE);
- /* This is a parse error... */
- if (!refOnly) {
- MonoAssembly *assm = mono_try_assembly_resolve_handle (domain, assRef, NULL, refOnly, error);
- goto_if_nok (error, fail);
- if (assm) {
- refass = mono_assembly_get_object_handle (domain, assm, error);
- goto_if_nok (error, fail);
- }
- }
- return refass;
- }
-
- MonoAssemblyContextKind asmctx;
- asmctx = refOnly ? MONO_ASMCTX_REFONLY : MONO_ASMCTX_DEFAULT;
- const char *basedir;
- basedir = NULL;
- if (!refOnly) {
- /* Determine if the current assembly is in LoadFrom context.
- * If it is, we must include the executing assembly's basedir
- * when probing for the given assembly name, and also load the
- * requested assembly in LoadFrom context.
- */
- MonoAssembly *executing_assembly = mono_runtime_get_caller_from_stack_mark (stack_mark);
- if (executing_assembly && mono_asmctx_get_kind (&executing_assembly->context) == MONO_ASMCTX_LOADFROM) {
- asmctx = MONO_ASMCTX_LOADFROM;
- basedir = executing_assembly->basedir;
- }
- }
-
-
- MonoAssemblyByNameRequest req;
- mono_assembly_request_prepare (&req.request, sizeof (req), asmctx);
- req.basedir = basedir;
- req.no_postload_search = TRUE;
- ass = mono_assembly_request_byname (&aname, &req, &status);
- mono_assembly_name_free (&aname);
-
- if (!ass) {
- /* MS.NET doesn't seem to call the assembly resolve handler for refonly assemblies */
- if (!refOnly) {
- ass = mono_try_assembly_resolve_handle (domain, assRef, NULL, refOnly, error);
- goto_if_nok (error, fail);
- }
- if (!ass)
- goto fail;
- }
-
- g_assert (ass);
- MonoReflectionAssemblyHandle refass;
- refass = mono_assembly_get_object_handle (domain, ass, error);
- goto_if_nok (error, fail);
-
- MONO_HANDLE_SET (refass, evidence, evidence);
-
- return refass;
-fail:
- return MONO_HANDLE_CAST (MonoReflectionAssembly, NULL_HANDLE);
-}
-
-void
-ves_icall_System_AppDomain_InternalUnload (gint32 domain_id, MonoError *error)
-{
- MonoDomain * domain = mono_domain_get_by_id (domain_id);
-
- if (NULL == domain) {
- mono_error_set_execution_engine (error, "Failed to unload domain, domain id not found");
- return;
- }
-
- if (domain == mono_get_root_domain ()) {
- mono_error_set_generic_error (error, "System", "CannotUnloadAppDomainException", "The default appdomain can not be unloaded.");
- return;
- }
-
- /*
- * Unloading seems to cause problems when running NUnit/NAnt, hence
- * this workaround.
- */
- if (g_hasenv ("MONO_NO_UNLOAD"))
- return;
-
- MonoException *exc = NULL;
- mono_domain_try_unload (domain, (MonoObject**)&exc);
- if (exc)
- mono_error_set_exception_instance (error, exc);
-}
-
-MonoBoolean
-ves_icall_System_AppDomain_InternalIsFinalizingForUnload (gint32 domain_id, MonoError *error)
-{
- MonoDomain *domain = mono_domain_get_by_id (domain_id);
-
- if (!domain)
- return TRUE;
-
- return mono_domain_is_unloading (domain);
-}
-
-void
-ves_icall_System_AppDomain_DoUnhandledException (MonoAppDomainHandle ad, MonoExceptionHandle exc, MonoError *error)
-{
- mono_unhandled_exception_checked (MONO_HANDLE_CAST (MonoObject, exc), error);
- mono_error_assert_ok (error);
-}
-
-gint32
-ves_icall_System_AppDomain_ExecuteAssembly (MonoAppDomainHandle ad,
- MonoReflectionAssemblyHandle refass, MonoArrayHandle args,
- MonoError *error)
-{
- MonoImage *image;
- MonoMethod *method;
-
- g_assert (!MONO_HANDLE_IS_NULL (refass));
- MonoAssembly *assembly = MONO_HANDLE_GETVAL (refass, assembly);
- image = assembly->image;
- g_assert (image);
-
- method = mono_get_method_checked (image, mono_image_get_entry_point (image), NULL, NULL, error);
-
- if (!method)
- g_error ("No entry point method found in %s due to %s", image->name, mono_error_get_message (error));
-
- if (MONO_HANDLE_IS_NULL (args)) {
- MonoDomain *domain = MONO_HANDLE_GETVAL (ad, data);
- MONO_HANDLE_ASSIGN (args , mono_array_new_handle (domain, mono_defaults.string_class, 0, error));
- mono_error_assert_ok (error);
- }
-
- int res = mono_runtime_exec_main_checked (method, MONO_HANDLE_RAW (args), error);
- return res;
-}
-
-MonoAppDomainHandle
-ves_icall_System_AppDomain_InternalSetDomain (MonoAppDomainHandle ad, MonoError* error)
-{
- error_init (error);
- MonoDomain *old_domain = mono_domain_get ();
-
- if (!mono_domain_set_fast (MONO_HANDLE_GETVAL (ad, data), FALSE)) {
- mono_error_set_appdomain_unloaded (error);
- return MONO_HANDLE_CAST (MonoAppDomain, NULL_HANDLE);
- }
-
- return MONO_HANDLE_NEW (MonoAppDomain, old_domain->domain);
-}
-
-MonoAppDomainHandle
-ves_icall_System_AppDomain_InternalSetDomainByID (gint32 domainid, MonoError *error)
-{
- MonoDomain *current_domain = mono_domain_get ();
- MonoDomain *domain = mono_domain_get_by_id (domainid);
-
- if (!domain || !mono_domain_set_fast (domain, FALSE)) {
- mono_error_set_appdomain_unloaded (error);
- return MONO_HANDLE_CAST (MonoAppDomain, NULL_HANDLE);
- }
-
- return MONO_HANDLE_NEW (MonoAppDomain, current_domain->domain);
-}
-
-void
-ves_icall_System_AppDomain_InternalPushDomainRef (MonoAppDomainHandle ad, MonoError *error)
-{
- error_init (error);
- mono_thread_push_appdomain_ref (MONO_HANDLE_GETVAL (ad, data));
-}
-
-void
-ves_icall_System_AppDomain_InternalPushDomainRefByID (gint32 domain_id, MonoError *error)
-{
- error_init (error);
- MonoDomain *domain = mono_domain_get_by_id (domain_id);
-
- if (!domain) {
- /*
- * Raise an exception to prevent the managed code from executing a pop
- * later.
- */
- mono_error_set_appdomain_unloaded (error);
- return;
- }
-
- mono_thread_push_appdomain_ref (domain);
-}
-
-void
-ves_icall_System_AppDomain_InternalPopDomainRef (MonoError *error)
-{
- error_init (error);
- mono_thread_pop_appdomain_ref ();
-}
-
-MonoAppContextHandle
-ves_icall_System_AppDomain_InternalGetContext (MonoError *error)
-{
- error_init (error);
- return mono_context_get_handle ();
-}
-
-MonoAppContextHandle
-ves_icall_System_AppDomain_InternalGetDefaultContext (MonoError *error)
-{
- error_init (error);
- return MONO_HANDLE_NEW (MonoAppContext, mono_domain_get ()->default_context);
-}
-
-MonoAppContextHandle
-ves_icall_System_AppDomain_InternalSetContext (MonoAppContextHandle mc, MonoError *error)
-{
- error_init (error);
- MonoAppContextHandle old_context = mono_context_get_handle ();
-
- mono_context_set_handle (mc);
-
- return old_context;
-}
-
-MonoStringHandle
-ves_icall_System_AppDomain_InternalGetProcessGuid (MonoStringHandle newguid, MonoError *error)
-{
- error_init (error);
- MonoDomain* mono_root_domain = mono_get_root_domain ();
- mono_domain_lock (mono_root_domain);
- if (process_guid_set) {
- mono_domain_unlock (mono_root_domain);
- return mono_string_new_utf16_handle (mono_domain_get (), process_guid, sizeof(process_guid)/2, error);
- }
- uint32_t gchandle = mono_gchandle_from_handle (MONO_HANDLE_CAST (MonoObject, newguid), TRUE);
- memcpy (process_guid, mono_string_chars_internal (MONO_HANDLE_RAW (newguid)), sizeof(process_guid));
- mono_gchandle_free_internal (gchandle);
- process_guid_set = TRUE;
- mono_domain_unlock (mono_root_domain);
- return newguid;
-}
-
-/**
- * mono_domain_is_unloading:
- */
-gboolean
-mono_domain_is_unloading (MonoDomain *domain)
-{
- if (domain->state == MONO_APPDOMAIN_UNLOADING || domain->state == MONO_APPDOMAIN_UNLOADED)
- return TRUE;
- else
- return FALSE;
-}
-
-static void
-clear_cached_vtable (MonoVTable *vtable)
-{
- MonoClass *klass = vtable->klass;
- MonoDomain *domain = vtable->domain;
- MonoClassRuntimeInfo *runtime_info;
- void *data;
-
- runtime_info = m_class_get_runtime_info (klass);
- if (runtime_info && runtime_info->max_domain >= domain->domain_id)
- runtime_info->domain_vtables [domain->domain_id] = NULL;
- if (m_class_has_static_refs (klass) && (data = mono_vtable_get_static_field_data (vtable)))
- mono_gc_free_fixed (data);
-}
-
-static G_GNUC_UNUSED void
-zero_static_data (MonoVTable *vtable)
-{
- MonoClass *klass = vtable->klass;
- void *data;
-
- if (m_class_has_static_refs (klass) && (data = mono_vtable_get_static_field_data (vtable)))
- mono_gc_bzero_aligned (data, mono_class_data_size (klass));
-}
-
-typedef struct unload_data {
- gboolean done;
- MonoDomain *domain;
- char *failure_reason;
- gint32 refcount;
-} unload_data;
-
-static void
-unload_data_unref (unload_data *data)
-{
- if (!data)
- return;
- gint32 count;
- do {
- mono_atomic_load_acquire (count, gint32, &data->refcount);
- g_assert (count >= 1 && count <= 2);
- if (count == 1) {
- g_free (data);
- return;
- }
- } while (mono_atomic_cas_i32 (&data->refcount, count - 1, count) != count);
-}
-
-static void
-deregister_reflection_info_roots_from_list (MonoImage *image)
-{
- GSList *list = image->reflection_info_unregister_classes;
-
- while (list) {
- MonoClass *klass = (MonoClass *)list->data;
-
- mono_class_free_ref_info (klass);
-
- list = list->next;
- }
-
- image->reflection_info_unregister_classes = NULL;
-}
-
-static void
-deregister_reflection_info_roots (MonoDomain *domain)
-{
- GSList *list;
-
- mono_domain_assemblies_lock (domain);
- for (list = domain->domain_assemblies; list; list = list->next) {
- MonoAssembly *assembly = (MonoAssembly *)list->data;
- MonoImage *image = assembly->image;
- int i;
-
- /*
- * No need to take the image lock here since dynamic images are appdomain bound and
- * at this point the mutator is gone. Taking the image lock here would mean
- * promoting it from a simple lock to a complex lock, which we better avoid if
- * possible.
- */
- if (image_is_dynamic (image))
- deregister_reflection_info_roots_from_list (image);
-
- for (i = 0; i < image->module_count; ++i) {
- MonoImage *module = image->modules [i];
- if (module && image_is_dynamic (module))
- deregister_reflection_info_roots_from_list (module);
- }
- }
- mono_domain_assemblies_unlock (domain);
-}
-
-static gsize WINAPI
-unload_thread_main (void *arg)
-{
- ERROR_DECL (error);
- unload_data *data = (unload_data*)arg;
- MonoDomain *domain = data->domain;
- MonoInternalThread *internal;
- int i;
- gsize result = 1; // failure
-
- internal = mono_thread_internal_current ();
-
- MonoString *thread_name_str = mono_string_new_checked (mono_domain_get (), "Domain unloader", error);
- if (is_ok (error))
- mono_thread_set_name_internal (internal, thread_name_str, MonoSetThreadNameFlag_Permanent, error);
- if (!is_ok (error)) {
- data->failure_reason = g_strdup (mono_error_get_message (error));
- goto failure;
- }
-
- /*
- * FIXME: Abort our parent thread last, so we can return a failure
- * indication if aborting times out.
- */
- if (!mono_threads_abort_appdomain_threads (domain, -1)) {
- data->failure_reason = g_strdup_printf ("Aborting of threads in domain %s timed out.", domain->friendly_name);
- goto failure;
- }
-
- if (!mono_threadpool_remove_domain_jobs (domain, -1)) {
- data->failure_reason = g_strdup_printf ("Cleanup of threadpool jobs of domain %s timed out.", domain->friendly_name);
- goto failure;
- }
-
- /* Finalize all finalizable objects in the doomed appdomain */
- if (!mono_domain_finalize (domain, -1)) {
- data->failure_reason = g_strdup_printf ("Finalization of domain %s timed out.", domain->friendly_name);
- goto failure;
- }
-
- /* Clear references to our vtables in class->runtime_info.
- * We also hold the loader lock because we're going to change
- * class->runtime_info.
- */
-
- mono_loader_lock (); //FIXME why do we need the loader lock here?
- mono_domain_lock (domain);
- /*
- * We need to make sure that we don't have any remsets
- * pointing into static data of the to-be-freed domain because
- * at the next collections they would be invalid. So what we
- * do is we first zero all static data and then do a minor
- * collection. Because all references in the static data will
- * now be null we won't do any unnecessary copies and after
- * the collection there won't be any more remsets.
- */
- for (i = 0; i < domain->class_vtable_array->len; ++i)
- zero_static_data ((MonoVTable *)g_ptr_array_index (domain->class_vtable_array, i));
- mono_gc_collect (0);
- for (i = 0; i < domain->class_vtable_array->len; ++i)
- clear_cached_vtable ((MonoVTable *)g_ptr_array_index (domain->class_vtable_array, i));
- deregister_reflection_info_roots (domain);
-
- mono_assembly_cleanup_domain_bindings (domain->domain_id);
-
- mono_domain_unlock (domain);
- mono_loader_unlock ();
-
- domain->state = MONO_APPDOMAIN_UNLOADED;
-
- /* printf ("UNLOADED %s.\n", domain->friendly_name); */
-
- /* remove from the handle table the items related to this domain */
- mono_gchandle_free_domain (domain);
-
- mono_domain_free (domain, FALSE);
-
- mono_gc_collect (mono_gc_max_generation ());
-
- result = 0; // success
-exit:
- mono_error_cleanup (error);
- mono_atomic_store_release (&data->done, TRUE);
- unload_data_unref (data);
- return result;
-
-failure:
- result = 1;
- goto exit;
-}
-
-/**
- * mono_domain_unload:
- * \param domain The domain to unload
- *
- * Unloads an appdomain. Follows the process outlined in the comment
- * for \c mono_domain_try_unload.
- */
-void
-mono_domain_unload (MonoDomain *domain)
-{
- MONO_ENTER_GC_UNSAFE;
- MonoObject *exc = NULL;
- mono_domain_try_unload (domain, &exc);
- MONO_EXIT_GC_UNSAFE;
-}
-
-static MonoThreadInfoWaitRet
-guarded_wait (MonoThreadHandle *thread_handle, guint32 timeout, gboolean alertable)
-{
- MonoThreadInfoWaitRet result;
-
- MONO_ENTER_GC_SAFE;
- result = mono_thread_info_wait_one_handle (thread_handle, timeout, alertable);
- MONO_EXIT_GC_SAFE;
-
- return result;
-}
-
-/**
- * mono_domain_unload:
- * \param domain The domain to unload
- * \param exc Exception information
- *
- * Unloads an appdomain. Follows the process outlined in:
- * http://blogs.gotdotnet.com/cbrumme
- *
- * If doing things the 'right' way is too hard or complex, we do it the
- * 'simple' way, which means do everything needed to avoid crashes and
- * memory leaks, but not much else.
- *
- * It is required to pass a valid reference to the exc argument, upon return
- * from this function *exc will be set to the exception thrown, if any.
- *
- * If this method is not called from an icall (embedded scenario for instance),
- * it must not be called with any managed frames on the stack, since the unload
- * process could end up trying to abort the current thread.
- */
-void
-mono_domain_try_unload (MonoDomain *domain, MonoObject **exc)
-{
- HANDLE_FUNCTION_ENTER ();
- ERROR_DECL (error);
- MonoThreadHandle *thread_handle = NULL;
- MonoAppDomainState prev_state;
- MonoMethod *method;
- unload_data *thread_data = NULL;
- MonoInternalThreadHandle internal;
- MonoDomain *caller_domain = mono_domain_get ();
-
- /* printf ("UNLOAD STARTING FOR %s (%p) IN THREAD 0x%x.\n", domain->friendly_name, domain, mono_native_thread_id_get ()); */
-
- /* Atomically change our state to UNLOADING */
- prev_state = (MonoAppDomainState)mono_atomic_cas_i32 ((gint32*)&domain->state,
- MONO_APPDOMAIN_UNLOADING_START,
- MONO_APPDOMAIN_CREATED);
- if (prev_state != MONO_APPDOMAIN_CREATED) {
- switch (prev_state) {
- case MONO_APPDOMAIN_UNLOADING_START:
- case MONO_APPDOMAIN_UNLOADING:
- *exc = (MonoObject *) mono_get_exception_cannot_unload_appdomain ("Appdomain is already being unloaded.");
- goto exit;
- case MONO_APPDOMAIN_UNLOADED:
- *exc = (MonoObject *) mono_get_exception_cannot_unload_appdomain ("Appdomain is already unloaded.");
- goto exit;
- default:
- g_warning ("Invalid appdomain state %d", prev_state);
- g_assert_not_reached ();
- }
- }
-
- mono_domain_set_fast (domain, FALSE);
- /* Notify OnDomainUnload listeners */
- method = mono_class_get_method_from_name_checked (domain->domain->mbr.obj.vtable->klass, "DoDomainUnload", -1, 0, error);
- g_assert (method);
-
- mono_runtime_try_invoke (method, domain->domain, NULL, exc, error);
-
- if (!mono_error_ok (error)) {
- if (*exc)
- mono_error_cleanup (error);
- else
- *exc = (MonoObject*)mono_error_convert_to_exception (error);
- }
-
- if (*exc) {
- /* Roll back the state change */
- domain->state = MONO_APPDOMAIN_CREATED;
- mono_domain_set_fast (caller_domain, FALSE);
- goto exit;
- }
- mono_domain_set_fast (caller_domain, FALSE);
-
- thread_data = g_new0 (unload_data, 1);
- thread_data->domain = domain;
- thread_data->failure_reason = NULL;
- thread_data->done = FALSE;
- thread_data->refcount = 2; /*Must be 2: unload thread + initiator */
-
- /*The managed callback finished successfully, now we start tearing down the appdomain*/
- domain->state = MONO_APPDOMAIN_UNLOADING;
- /*
- * First we create a separate thread for unloading, since
- * we might have to abort some threads, including the current one.
- *
- * Have to attach to the runtime so shutdown can wait for this thread.
- *
- * Force it to be attached to avoid racing during shutdown.
- */
- internal = mono_thread_create_internal_handle (mono_get_root_domain (), unload_thread_main, thread_data, MONO_THREAD_CREATE_FLAGS_FORCE_CREATE, error);
- mono_error_assert_ok (error);
-
- thread_handle = mono_threads_open_thread_handle (MONO_HANDLE_GETVAL (internal, handle));
-
- /* Wait for the thread */
- while (!thread_data->done && guarded_wait (thread_handle, MONO_INFINITE_WAIT, TRUE) == MONO_THREAD_INFO_WAIT_RET_ALERTED) {
- if (mono_thread_internal_has_appdomain_ref (mono_thread_internal_current (), domain) && (mono_thread_interruption_requested ())) {
- /* The unload thread tries to abort us */
- /* The icall wrapper will execute the abort */
- goto exit;
- }
- }
-
- if (thread_data->failure_reason) {
- /* Roll back the state change */
- domain->state = MONO_APPDOMAIN_CREATED;
-
- g_warning ("%s", thread_data->failure_reason);
-
- *exc = (MonoObject *) mono_get_exception_cannot_unload_appdomain (thread_data->failure_reason);
-
- g_free (thread_data->failure_reason);
- thread_data->failure_reason = NULL;
- }
-
-exit:
- mono_threads_close_thread_handle (thread_handle);
- unload_data_unref (thread_data);
- HANDLE_FUNCTION_RETURN ();
-}
-
-#ifdef ENABLE_NETCORE
-
-/* Remember properties so they can be be installed in AppContext during runtime init */
-void
-mono_runtime_register_appctx_properties (int nprops, const char **keys, const char **values)
-{
- n_appctx_props = nprops;
- appctx_keys = g_new0 (char*, nprops);
- appctx_values = g_new0 (char*, nprops);
-
- for (int i = 0; i < nprops; ++i) {
- appctx_keys [i] = g_strdup (keys [i]);
- appctx_values [i] = g_strdup (values [i]);
- }
-}
-
-static GENERATE_GET_CLASS_WITH_CACHE (appctx, "System", "AppContext")
-
-/* Install properties into AppContext */
-void
-mono_runtime_install_appctx_properties (void)
-{
- ERROR_DECL (error);
- gpointer args [3];
-
- MonoMethod *setup = mono_class_get_method_from_name_checked (mono_class_get_appctx_class (), "Setup", 3, 0, error);
- g_assert (setup);
-
- // FIXME: TRUSTED_PLATFORM_ASSEMBLIES is very large
-
- /* internal static unsafe void Setup(char** pNames, char** pValues, int count) */
- args [0] = appctx_keys;
- args [1] = appctx_values;
- args [2] = &n_appctx_props;
-
- mono_runtime_invoke_checked (setup, NULL, args, error);
- mono_error_assert_ok (error);
-
- /* No longer needed */
- for (int i = 0; i < n_appctx_props; ++i) {
- g_free (appctx_keys [i]);
- g_free (appctx_values [i]);
- }
- g_free (appctx_keys);
- g_free (appctx_values);
- appctx_keys = NULL;
- appctx_values = NULL;
-}
-
-#endif
-
diff --git a/mono/metadata/appdomain.c.REMOVED.git-id b/mono/metadata/appdomain.c.REMOVED.git-id
new file mode 100644
index 0000000000..f2dc147292
--- /dev/null
+++ b/mono/metadata/appdomain.c.REMOVED.git-id
@@ -0,0 +1 @@
+afe43a069e7f09e89af052299b2672e80db09bf5
\ No newline at end of file
diff --git a/mono/metadata/appdomain.h b/mono/metadata/appdomain.h
index fc82e198b1..ab260646e9 100644
--- a/mono/metadata/appdomain.h
+++ b/mono/metadata/appdomain.h
@@ -49,7 +49,7 @@ mono_runtime_cleanup (MonoDomain *domain);
MONO_API void
mono_install_runtime_cleanup (MonoDomainFunc func);
-MONO_API void
+MONO_API MONO_RT_EXTERNAL_ONLY void
mono_runtime_quit (void);
MONO_API void
diff --git a/mono/metadata/assembly-internals.h b/mono/metadata/assembly-internals.h
index 75702c8331..96e7da3013 100644
--- a/mono/metadata/assembly-internals.h
+++ b/mono/metadata/assembly-internals.h
@@ -47,7 +47,7 @@ mono_assembly_get_assemblyref_checked (MonoImage *image, int index, MonoAssembly
MONO_API MonoImage* mono_assembly_load_module_checked (MonoAssembly *assembly, uint32_t idx, MonoError *error);
-MonoAssembly* mono_assembly_load_with_partial_name_internal (const char *name, MonoImageOpenStatus *status);
+MonoAssembly* mono_assembly_load_with_partial_name_internal (const char *name, MonoAssemblyLoadContext *alc, MonoImageOpenStatus *status);
typedef gboolean (*MonoAssemblyAsmCtxFromPathFunc) (const char *absfname, MonoAssembly *requesting_assembly, gpointer user_data, MonoAssemblyContextKind *out_asmctx);
@@ -56,12 +56,20 @@ void mono_install_assembly_asmctx_from_path_hook (MonoAssemblyAsmCtxFromPathFunc
typedef MonoAssembly * (*MonoAssemblyPreLoadFuncV2) (MonoAssemblyLoadContext *alc, MonoAssemblyName *aname, char **assemblies_path, gboolean refonly, gpointer user_data, MonoError *error);
-void mono_install_assembly_preload_hook_v2 (MonoAssemblyPreLoadFuncV2 func, void *user_data, gboolean refonly);
+void mono_install_assembly_preload_hook_v2 (MonoAssemblyPreLoadFuncV2 func, gpointer user_data, gboolean refonly);
typedef MonoAssembly * (*MonoAssemblySearchFuncV2) (MonoAssemblyLoadContext *alc, MonoAssembly *requesting, MonoAssemblyName *aname, gboolean refonly, gboolean postload, gpointer user_data, MonoError *error);
void
-mono_install_assembly_search_hook_v2 (MonoAssemblySearchFuncV2 func, void *user_data, gboolean refonly, gboolean postload);
+mono_install_assembly_search_hook_v2 (MonoAssemblySearchFuncV2 func, gpointer user_data, gboolean refonly, gboolean postload);
+
+typedef void (*MonoAssemblyLoadFuncV2) (MonoAssemblyLoadContext *alc, MonoAssembly *assembly, gpointer user_data, MonoError *error);
+
+void
+mono_install_assembly_load_hook_v2 (MonoAssemblyLoadFuncV2 func, gpointer user_data);
+
+void
+mono_assembly_invoke_load_hook_internal (MonoAssemblyLoadContext *alc, MonoAssembly *ass);
/* If predicate returns true assembly should be loaded, if false ignore it. */
typedef gboolean (*MonoAssemblyCandidatePredicate)(MonoAssembly *, gpointer);
@@ -94,9 +102,17 @@ typedef struct MonoAssemblyByNameRequest {
/* FIXME: predicate unused? */
} MonoAssemblyByNameRequest;
-void mono_assembly_request_prepare (MonoAssemblyLoadRequest *req,
- size_t req_size,
- MonoAssemblyContextKind asmctx);
+void mono_assembly_request_prepare_load (MonoAssemblyLoadRequest *req,
+ MonoAssemblyContextKind asmctx,
+ MonoAssemblyLoadContext *alc);
+
+void mono_assembly_request_prepare_open (MonoAssemblyOpenRequest *req,
+ MonoAssemblyContextKind asmctx,
+ MonoAssemblyLoadContext *alc);
+
+void mono_assembly_request_prepare_byname (MonoAssemblyByNameRequest *req,
+ MonoAssemblyContextKind asmctx,
+ MonoAssemblyLoadContext *alc);
MonoAssembly* mono_assembly_request_open (const char *filename,
const MonoAssemblyOpenRequest *req,
@@ -119,7 +135,7 @@ gboolean
mono_assembly_candidate_predicate_sn_same_name (MonoAssembly *candidate, gpointer wanted_name);
MonoAssembly*
-mono_assembly_binding_applies_to_image (MonoImage* image, MonoImageOpenStatus *status);
+mono_assembly_binding_applies_to_image (MonoAssemblyLoadContext *alc, MonoImage* image, MonoImageOpenStatus *status);
MonoAssembly*
mono_assembly_load_from_assemblies_path (gchar **assemblies_path, MonoAssemblyName *aname, MonoAssemblyContextKind asmctx);
diff --git a/mono/metadata/assembly-load-context.c b/mono/metadata/assembly-load-context.c
index e33ba7f615..1370de2845 100644
--- a/mono/metadata/assembly-load-context.c
+++ b/mono/metadata/assembly-load-context.c
@@ -1,18 +1,17 @@
#include "config.h"
+#include "mono/utils/mono-compiler.h"
+
+#ifdef ENABLE_NETCORE // MonoAssemblyLoadContext support only in netcore Mono
+
#include "mono/metadata/assembly.h"
#include "mono/metadata/domain-internals.h"
+#include "mono/metadata/exception-internals.h"
#include "mono/metadata/icall-decl.h"
#include "mono/metadata/loader-internals.h"
#include "mono/metadata/loaded-images-internals.h"
#include "mono/utils/mono-error-internals.h"
#include "mono/utils/mono-logger-internals.h"
-#ifdef ENABLE_NETCORE
-/* MonoAssemblyLoadContext support only in netcore Mono */
-
-static
-GENERATE_GET_CLASS_WITH_CACHE_DECL (assembly_load_context);
-
GENERATE_GET_CLASS_WITH_CACHE (assembly_load_context, "System.Runtime.Loader", "AssemblyLoadContext");
void
@@ -39,8 +38,8 @@ mono_alc_cleanup (MonoAssemblyLoadContext *alc)
* be less than optimal on netcore, but its removal is too likely to cause issues for now.
* 2. An ALC will have been removed from the domain before cleanup.
*/
- GSList *tmp;
- MonoDomain *domain = alc->domain;
+ //GSList *tmp;
+ //MonoDomain *domain = alc->domain;
/*
* Missing steps:
@@ -107,6 +106,37 @@ ves_icall_System_Runtime_Loader_AssemblyLoadContext_GetLoadContextForAssembly (M
return GUINT_TO_POINTER (alc->gchandle);
}
+gpointer
+ves_icall_System_Runtime_Loader_AssemblyLoadContext_InternalLoadUnmanagedDllFromPath (MonoStringHandle fname, MonoError *error)
+{
+ gpointer res = NULL;
+ MonoDl *lib = NULL;
+ char *filename = NULL;
+ char *local_error = NULL;
+
+ g_assert (!MONO_HANDLE_IS_NULL (fname)); // should have already been checked in managed, so we assert
+
+ filename = mono_string_handle_to_utf8 (fname, error);
+ goto_if_nok (error, exit);
+
+ g_assert (g_path_is_absolute (filename)); // again, checked in managed
+
+ lib = mono_dl_open (filename, MONO_DL_LAZY, &local_error);
+
+ if (lib == NULL) {
+ mono_error_set_file_not_found (error, filename, "%s", local_error);
+ goto exit;
+ }
+
+ res = lib->handle;
+
+exit:
+ g_free (lib);
+ g_free (filename);
+ g_free (local_error);
+ return res;
+}
+
gboolean
mono_alc_is_default (MonoAssemblyLoadContext *alc)
{
@@ -118,16 +148,21 @@ invoke_resolve_method (MonoMethod *resolve_method, MonoAssemblyLoadContext *alc,
{
MonoAssembly *result = NULL;
char* aname_str = NULL;
+
+ if (mono_runtime_get_no_exec ())
+ return NULL;
+
HANDLE_FUNCTION_ENTER ();
aname_str = mono_stringify_assembly_name (aname);
- MonoStringHandle aname_obj = mono_string_new_handle (mono_domain_get (), aname_str, error);
+ MonoStringHandle aname_obj = mono_string_new_handle (mono_alc_domain (alc), aname_str, error);
goto_if_nok (error, leave);
MonoReflectionAssemblyHandle assm;
- gpointer args[2];
- args [0] = GUINT_TO_POINTER (alc->gchandle);
+ gpointer gchandle = GUINT_TO_POINTER (alc->gchandle);
+ gpointer args [2];
+ args [0] = &gchandle;
args [1] = MONO_HANDLE_RAW (aname_obj);
assm = MONO_HANDLE_CAST (MonoReflectionAssembly, mono_runtime_try_invoke_handle (resolve_method, NULL_HANDLE, args, error));
goto_if_nok (error, leave);
@@ -239,6 +274,6 @@ mono_alc_invoke_resolve_using_resolve_satellite_nofail (MonoAssemblyLoadContext
return result;
}
-
-
#endif /* ENABLE_NETCORE */
+
+MONO_EMPTY_SOURCE_FILE (assembly_load_context)
diff --git a/mono/metadata/assembly.c.REMOVED.git-id b/mono/metadata/assembly.c.REMOVED.git-id
index dad339fa84..46bc1ac87b 100644
--- a/mono/metadata/assembly.c.REMOVED.git-id
+++ b/mono/metadata/assembly.c.REMOVED.git-id
@@ -1 +1 @@
-043019526d24994448309d8e0df36f0de6c1d013
\ No newline at end of file
+fc7656937a997d785ce49d5ed636027ccaa5a649
\ No newline at end of file
diff --git a/mono/metadata/assembly.h b/mono/metadata/assembly.h
index d0e4a3d7fa..272e4fc710 100644
--- a/mono/metadata/assembly.h
+++ b/mono/metadata/assembly.h
@@ -63,7 +63,8 @@ MONO_API char* mono_stringify_assembly_name (MonoAssemblyName *aname);
/* Installs a function which is called each time a new assembly is loaded. */
typedef void (*MonoAssemblyLoadFunc) (MonoAssembly *assembly, void* user_data);
-MONO_API void mono_install_assembly_load_hook (MonoAssemblyLoadFunc func, void* user_data);
+MONO_API MONO_RT_EXTERNAL_ONLY void
+mono_install_assembly_load_hook (MonoAssemblyLoadFunc func, void* user_data);
/*
* Installs a new function which is used to search the list of loaded
@@ -98,12 +99,13 @@ typedef MonoAssembly * (*MonoAssemblyPreLoadFunc) (MonoAssemblyName *aname,
char **assemblies_path,
void* user_data);
-MONO_API void mono_install_assembly_preload_hook (MonoAssemblyPreLoadFunc func,
- void* user_data);
-MONO_API void mono_install_assembly_refonly_preload_hook (MonoAssemblyPreLoadFunc func,
- void* user_data);
+MONO_API MONO_RT_EXTERNAL_ONLY
+void mono_install_assembly_preload_hook (MonoAssemblyPreLoadFunc func, void* user_data);
+MONO_API MONO_RT_EXTERNAL_ONLY
+void mono_install_assembly_refonly_preload_hook (MonoAssemblyPreLoadFunc func, void* user_data);
-MONO_API void mono_assembly_invoke_load_hook (MonoAssembly *ass);
+MONO_API MONO_RT_EXTERNAL_ONLY void
+mono_assembly_invoke_load_hook (MonoAssembly *ass);
MONO_API MonoAssemblyName* mono_assembly_name_new (const char *name);
MONO_API const char* mono_assembly_name_get_name (MonoAssemblyName *aname);
diff --git a/mono/metadata/attach.c b/mono/metadata/attach.c
index 45fdc3634f..72d994dea3 100644
--- a/mono/metadata/attach.c
+++ b/mono/metadata/attach.c
@@ -97,7 +97,7 @@ static char *server_uri;
static MonoThreadHandle *receiver_thread_handle;
-static gboolean stop_receiver_thread;
+static volatile gboolean stop_receiver_thread;
static gboolean needs_to_start, started;
@@ -110,30 +110,26 @@ static void transport_start_receive (void);
/*
* Functions to decode protocol data
*/
-static inline int
-decode_byte (guint8 *buf, guint8 **endbuf, guint8 *limit)
+static int
+decode_byte (guint8 const *buf, guint8 const **endbuf, guint8 const *limit)
{
*endbuf = buf + 1;
g_assert (*endbuf <= limit);
return buf [0];
}
-static inline int
-decode_int (guint8 *buf, guint8 **endbuf, guint8 *limit)
+static int
+decode_int (const guint8 *buf)
{
- *endbuf = buf + 4;
- g_assert (*endbuf <= limit);
-
return (((int)buf [0]) << 0) | (((int)buf [1]) << 8) | (((int)buf [2]) << 16) | (((int)buf [3]) << 24);
}
-static char*
-decode_string_value (guint8 *buf, guint8 **endbuf, guint8 *limit)
+static const char*
+decode_string_value (guint8 const *buf, guint8 const **endbuf, guint8 const *limit)
{
int type;
- gint32 length;
- guint8 *p = buf;
- char *s;
+ gint32 length;
+ guint8 const *p = buf;
type = decode_byte (p, &p, limit);
if (type == PRIM_TYPE_NULL) {
@@ -154,12 +150,10 @@ decode_string_value (guint8 *buf, guint8 **endbuf, guint8 *limit)
g_assert (length < (1 << 16));
- s = (char *)g_malloc (length + 1);
+ const char *s = (const char*)p;
+ p += length + 1;
- g_assert (p + length <= limit);
- memcpy (s, p, length);
- s [length] = '\0';
- p += length;
+ g_assert (p <= limit);
*endbuf = p;
@@ -265,24 +259,27 @@ mono_attach_cleanup (void)
}
static int
-mono_attach_load_agent (MonoDomain *domain, char *agent, char *args, MonoObject **exc)
+mono_attach_load_agent (MonoDomain *domain, const char *agent, const char *args)
{
+ HANDLE_FUNCTION_ENTER ();
+
ERROR_DECL (error);
MonoAssembly *agent_assembly;
MonoImage *image;
MonoMethod *method;
guint32 entry;
- MonoArray *main_args;
+ MonoArrayHandle main_args;
gpointer pa [1];
MonoImageOpenStatus open_status;
+ int result = 0;
MonoAssemblyOpenRequest req;
- mono_assembly_request_prepare (&req.request, sizeof (req), MONO_ASMCTX_DEFAULT);
+ mono_assembly_request_prepare_open (&req, MONO_ASMCTX_DEFAULT, mono_domain_default_alc (mono_domain_get ()));
agent_assembly = mono_assembly_request_open (agent, &req, &open_status);
if (!agent_assembly) {
fprintf (stderr, "Cannot open agent assembly '%s': %s.\n", agent, mono_image_strerror (open_status));
- g_free (agent);
- return 2;
+ result = 2;
+ goto exit;
}
/*
@@ -293,51 +290,47 @@ mono_attach_load_agent (MonoDomain *domain, char *agent, char *args, MonoObject
entry = mono_image_get_entry_point (image);
if (!entry) {
g_print ("Assembly '%s' doesn't have an entry point.\n", mono_image_get_filename (image));
- g_free (agent);
- return 1;
+ result = 1;
+ goto exit;
}
method = mono_get_method_checked (image, entry, NULL, NULL, error);
if (method == NULL){
g_print ("The entry point method of assembly '%s' could not be loaded due to %s\n", agent, mono_error_get_message (error));
- mono_error_cleanup (error);
- g_free (agent);
- return 1;
+ result = 1;
+ goto exit;
}
-
- main_args = (MonoArray*)mono_array_new_checked (domain, mono_defaults.string_class, (args == NULL) ? 0 : 1, error);
- if (main_args == NULL) {
+ main_args = mono_array_new_handle (domain, mono_defaults.string_class, (args == NULL) ? 0 : 1, error);
+ if (MONO_HANDLE_IS_NULL (main_args)) {
g_print ("Could not allocate main method args due to %s\n", mono_error_get_message (error));
- mono_error_cleanup (error);
- g_free (agent);
- return 1;
+ result = 1;
+ goto exit;
}
if (args) {
- MonoString *args_str = mono_string_new_checked (domain, args, error);
+ MonoStringHandle args_str = mono_string_new_handle (domain, args, error);
if (!is_ok (error)) {
g_print ("Could not allocate main method arg string due to %s\n", mono_error_get_message (error));
- mono_error_cleanup (error);
- g_free (agent);
- return 1;
+ result = 1;
+ goto exit;
}
- mono_array_set_internal (main_args, MonoString*, 0, args_str);
+ MONO_HANDLE_ARRAY_SETREF (main_args, 0, args_str);
}
-
- pa [0] = main_args;
- mono_runtime_try_invoke (method, NULL, pa, exc, error);
+ pa [0] = MONO_HANDLE_RAW (main_args);
+ MonoObject *exc;
+ mono_runtime_try_invoke (method, NULL, pa, &exc, error);
if (!is_ok (error)) {
g_print ("The entry point method of assembly '%s' could not be executed due to %s\n", agent, mono_error_get_message (error));
- mono_error_cleanup (error);
- g_free (agent);
- return 1;
+ result = 1;
+ goto exit;
}
- g_free (agent);
-
- return 0;
+ result = 0;
+exit:
+ mono_error_cleanup (error);
+ HANDLE_FUNCTION_RETURN_VAL (result);
}
/*
@@ -503,18 +496,10 @@ transport_start_receive (void)
static gsize WINAPI
receiver_thread (void *arg)
{
- ERROR_DECL (error);
- int res, content_len;
- guint8 buffer [256];
- guint8 *p, *p_end;
- MonoObject *exc;
- MonoInternalThread *internal;
+ MonoInternalThread *internal = mono_thread_internal_current ();
+
+ mono_thread_set_name_constant_ignore_error (internal, "Attach receiver", MonoSetThreadNameFlag_Permanent);
- internal = mono_thread_internal_current ();
- MonoString *attach_str = mono_string_new_checked (mono_domain_get (), "Attach receiver", error);
- mono_error_assert_ok (error);
- mono_thread_set_name_internal (internal, attach_str, MonoSetThreadNameFlag_Permanent, error);
- mono_error_assert_ok (error);
/* Ask the runtime to not abort this thread */
//internal->flags |= MONO_THREAD_FLAG_DONT_MANAGE;
/* Ask the runtime to not wait for this thread */
@@ -530,12 +515,13 @@ receiver_thread (void *arg)
printf ("attach: Connected.\n");
+ guint8* body = NULL;
+
while (TRUE) {
- char *cmd, *agent_name, *agent_args;
- guint8 *body;
+ guint8 buffer [6];
/* Read Header */
- res = read (conn_fd, buffer, 6);
+ int res = read (conn_fd, buffer, 6);
if (res == -1 && errno == EINTR)
continue;
@@ -546,7 +532,7 @@ receiver_thread (void *arg)
if (res != 6)
break;
- if ((strncmp ((char*)buffer, "MONO", 4) != 0) || buffer [4] != 1 || buffer [5] != 0) {
+ if (memcmp (buffer, "MONO", 4) != 0 || buffer [4] != 1 || buffer [5] != 0) {
fprintf (stderr, "attach: message from server has unknown header.\n");
break;
}
@@ -556,34 +542,39 @@ receiver_thread (void *arg)
if (res != 4)
break;
- p = buffer;
- p_end = p + 8;
-
- content_len = decode_int (p, &p, p_end);
+ const int content_len = decode_int (buffer);
/* Read message body */
body = (guint8 *)g_malloc (content_len);
res = read (conn_fd, body, content_len);
-
- p = body;
- p_end = body + content_len;
+ if (res != content_len)
+ break;
- cmd = decode_string_value (p, &p, p_end);
+ guint8 const * p = body;
+ guint8 const * const p_end = body + content_len;
+
+ char const * const cmd = decode_string_value (p, &p, p_end);
if (cmd == NULL)
break;
- g_assert (!strcmp (cmd, "attach"));
- agent_name = decode_string_value (p, &p, p_end);
- agent_args = decode_string_value (p, &p, p_end);
+ // 10: 7:attach\0 + one byte each for the types of cmd, name, args.
+ g_assert (content_len >= 10 && !memcmp (cmd, "attach", 7));
+
+ char const * const agent_name = decode_string_value (p, &p, p_end);
+ char const * const agent_args = decode_string_value (p, &p, p_end);
printf ("attach: Loading agent '%s'.\n", agent_name);
- mono_attach_load_agent (mono_domain_get (), agent_name, agent_args, &exc);
+ mono_attach_load_agent (mono_domain_get (), agent_name, agent_args);
g_free (body);
+ body = NULL;
// FIXME: Send back a result
}
+ g_free (body);
+ body = NULL;
+
close (conn_fd);
conn_fd = 0;
diff --git a/mono/metadata/boehm-gc.c b/mono/metadata/boehm-gc.c
index 8414e24e23..2e8a69b875 100644
--- a/mono/metadata/boehm-gc.c
+++ b/mono/metadata/boehm-gc.c
@@ -900,13 +900,13 @@ mono_gc_wbarrier_set_arrayref_internal (MonoArray *arr, gpointer slot_ptr, MonoO
}
void
-mono_gc_wbarrier_arrayref_copy_internal (gpointer dest_ptr, gpointer src_ptr, int count)
+mono_gc_wbarrier_arrayref_copy_internal (gpointer dest_ptr, gconstpointer src_ptr, int count)
{
mono_gc_memmove_aligned (dest_ptr, src_ptr, count * sizeof (gpointer));
}
void
-mono_gc_wbarrier_generic_store_internal (gpointer ptr, MonoObject* value)
+mono_gc_wbarrier_generic_store_internal (void volatile* ptr, MonoObject* value)
{
*(void**)ptr = value;
}
@@ -923,7 +923,7 @@ mono_gc_wbarrier_generic_nostore_internal (gpointer ptr)
}
void
-mono_gc_wbarrier_value_copy_internal (gpointer dest, gpointer src, int count, MonoClass *klass)
+mono_gc_wbarrier_value_copy_internal (gpointer dest, gconstpointer src, int count, MonoClass *klass)
{
mono_gc_memmove_atomic (dest, src, count * mono_class_value_size (klass, NULL));
}
@@ -959,371 +959,9 @@ mono_gc_get_restart_signal (void)
}
#if defined(USE_COMPILER_TLS) && defined(__linux__) && (defined(__i386__) || defined(__x86_64__))
-extern __thread void* GC_thread_tls;
-#include "metadata-internals.h"
-
-static int
-shift_amount (int v)
-{
- int i = 0;
- while (!(v & (1 << i)))
- i++;
- return i;
-}
-
-enum {
- ATYPE_FREEPTR,
- ATYPE_FREEPTR_FOR_BOX,
- ATYPE_NORMAL,
- ATYPE_GCJ,
- ATYPE_STRING,
- ATYPE_NUM
-};
-
-static MonoMethod*
-create_allocator (int atype, int tls_key, gboolean slowpath)
-{
- int index_var, bytes_var, my_fl_var, my_entry_var;
- guint32 no_freelist_branch, not_small_enough_branch = 0;
- guint32 size_overflow_branch = 0;
- MonoMethodBuilder *mb;
- MonoMethod *res;
- MonoMethodSignature *csig;
- const char *name = NULL;
- WrapperInfo *info;
-
- g_assert_not_reached ();
-
- if (atype == ATYPE_FREEPTR) {
- name = slowpath ? "SlowAllocPtrfree" : "AllocPtrfree";
- } else if (atype == ATYPE_FREEPTR_FOR_BOX) {
- name = slowpath ? "SlowAllocPtrfreeBox" : "AllocPtrfreeBox";
- } else if (atype == ATYPE_NORMAL) {
- name = slowpath ? "SlowAlloc" : "Alloc";
- } else if (atype == ATYPE_GCJ) {
- name = slowpath ? "SlowAllocGcj" : "AllocGcj";
- } else if (atype == ATYPE_STRING) {
- name = slowpath ? "SlowAllocString" : "AllocString";
- } else {
- g_assert_not_reached ();
- }
-
- csig = mono_metadata_signature_alloc (mono_defaults.corlib, 2);
-
- if (atype == ATYPE_STRING) {
- csig->ret = m_class_get_byval_arg (mono_defaults.string_class);
- csig->params [0] = mono_get_int_type ();
- csig->params [1] = mono_get_int32_type ();
- } else {
- csig->ret = mono_get_object_type ();
- csig->params [0] = mono_get_int_type ();
- csig->params [1] = mono_get_int32_type ();
- }
-
- mb = mono_mb_new (mono_defaults.object_class, name, MONO_WRAPPER_ALLOC);
-
- if (slowpath)
- goto always_slowpath;
-
- bytes_var = mono_mb_add_local (mb, mono_get_int32_type ());
- if (atype == ATYPE_STRING) {
- /* a string alloator method takes the args: (vtable, len) */
- /* bytes = (offsetof (MonoString, chars) + ((len + 1) * 2)); */
- mono_mb_emit_ldarg (mb, 1);
- mono_mb_emit_icon (mb, 1);
- mono_mb_emit_byte (mb, MONO_CEE_ADD);
- mono_mb_emit_icon (mb, 1);
- mono_mb_emit_byte (mb, MONO_CEE_SHL);
- // sizeof (MonoString) might include padding
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoString, chars));
- mono_mb_emit_byte (mb, MONO_CEE_ADD);
- mono_mb_emit_stloc (mb, bytes_var);
- } else {
- mono_mb_emit_ldarg (mb, 1);
- mono_mb_emit_stloc (mb, bytes_var);
- }
-
- /* this is needed for strings/arrays only as the other big types are never allocated with this method */
- if (atype == ATYPE_STRING) {
- /* check for size */
- /* if (!SMALL_ENOUGH (bytes)) jump slow_path;*/
- mono_mb_emit_ldloc (mb, bytes_var);
- mono_mb_emit_icon (mb, (NFREELISTS-1) * GRANULARITY);
- not_small_enough_branch = mono_mb_emit_short_branch (mb, MONO_CEE_BGT_UN_S);
- /* check for overflow */
- mono_mb_emit_ldloc (mb, bytes_var);
- mono_mb_emit_icon (mb, sizeof (MonoString));
- size_overflow_branch = mono_mb_emit_short_branch (mb, MONO_CEE_BLE_UN_S);
- }
-
- /* int index = INDEX_FROM_BYTES(bytes); */
- index_var = mono_mb_add_local (mb, mono_get_int32_type ());
-
- mono_mb_emit_ldloc (mb, bytes_var);
- mono_mb_emit_icon (mb, GRANULARITY - 1);
- mono_mb_emit_byte (mb, MONO_CEE_ADD);
- mono_mb_emit_icon (mb, shift_amount (GRANULARITY));
- mono_mb_emit_byte (mb, MONO_CEE_SHR_UN);
- mono_mb_emit_icon (mb, shift_amount (sizeof (gpointer)));
- mono_mb_emit_byte (mb, MONO_CEE_SHL);
- /* index var is already adjusted into bytes */
- mono_mb_emit_stloc (mb, index_var);
-
- my_fl_var = mono_mb_add_local (mb, mono_get_int_type ());
- my_entry_var = mono_mb_add_local (mb, mono_get_int_type ());
- /* my_fl = ((GC_thread)tsd) -> ptrfree_freelists + index; */
- mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
- mono_mb_emit_byte (mb, 0x0D); /* CEE_MONO_TLS */
- mono_mb_emit_i4 (mb, tls_key);
- if (atype == ATYPE_FREEPTR || atype == ATYPE_FREEPTR_FOR_BOX || atype == ATYPE_STRING)
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (struct GC_Thread_Rep, tlfs)
- + G_STRUCT_OFFSET (struct thread_local_freelists,
- ptrfree_freelists));
- else if (atype == ATYPE_NORMAL)
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (struct GC_Thread_Rep, tlfs)
- + G_STRUCT_OFFSET (struct thread_local_freelists,
- normal_freelists));
- else if (atype == ATYPE_GCJ)
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (struct GC_Thread_Rep, tlfs)
- + G_STRUCT_OFFSET (struct thread_local_freelists,
- gcj_freelists));
- else
- g_assert_not_reached ();
- mono_mb_emit_byte (mb, MONO_CEE_ADD);
- mono_mb_emit_ldloc (mb, index_var);
- mono_mb_emit_byte (mb, MONO_CEE_ADD);
- mono_mb_emit_stloc (mb, my_fl_var);
-
- /* my_entry = *my_fl; */
- mono_mb_emit_ldloc (mb, my_fl_var);
- mono_mb_emit_byte (mb, MONO_CEE_LDIND_I);
- mono_mb_emit_stloc (mb, my_entry_var);
-
- /* if (EXPECT((word)my_entry >= HBLKSIZE, 1)) { */
- mono_mb_emit_ldloc (mb, my_entry_var);
- mono_mb_emit_icon (mb, HBLKSIZE);
- no_freelist_branch = mono_mb_emit_short_branch (mb, MONO_CEE_BLT_UN_S);
-
- /* ptr_t next = obj_link(my_entry); *my_fl = next; */
- mono_mb_emit_ldloc (mb, my_fl_var);
- mono_mb_emit_ldloc (mb, my_entry_var);
- mono_mb_emit_byte (mb, MONO_CEE_LDIND_I);
- mono_mb_emit_byte (mb, MONO_CEE_STIND_I);
-
- /* set the vtable and clear the words in the object */
- mono_mb_emit_ldloc (mb, my_entry_var);
- mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_byte (mb, MONO_CEE_STIND_I);
-
- if (atype == ATYPE_FREEPTR) {
- int start_var, end_var, start_loop;
- /* end = my_entry + bytes; start = my_entry + sizeof (gpointer);
- */
- start_var = mono_mb_add_local (mb, mono_get_int_type ());
- end_var = mono_mb_add_local (mb, mono_get_int_type ());
- mono_mb_emit_ldloc (mb, my_entry_var);
- mono_mb_emit_ldloc (mb, bytes_var);
- mono_mb_emit_byte (mb, MONO_CEE_ADD);
- mono_mb_emit_stloc (mb, end_var);
- mono_mb_emit_ldloc (mb, my_entry_var);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoObject, synchronisation));
- mono_mb_emit_byte (mb, MONO_CEE_ADD);
- mono_mb_emit_stloc (mb, start_var);
- /*
- * do {
- * *start++ = NULL;
- * } while (start < end);
- */
- start_loop = mono_mb_get_label (mb);
- mono_mb_emit_ldloc (mb, start_var);
- mono_mb_emit_icon (mb, 0);
- mono_mb_emit_byte (mb, MONO_CEE_STIND_I);
- mono_mb_emit_ldloc (mb, start_var);
- mono_mb_emit_icon (mb, sizeof (gpointer));
- mono_mb_emit_byte (mb, MONO_CEE_ADD);
- mono_mb_emit_stloc (mb, start_var);
-
- mono_mb_emit_ldloc (mb, start_var);
- mono_mb_emit_ldloc (mb, end_var);
- mono_mb_emit_byte (mb, MONO_CEE_BLT_UN_S);
- mono_mb_emit_byte (mb, start_loop - (mono_mb_get_label (mb) + 1));
- } else if (atype == ATYPE_FREEPTR_FOR_BOX || atype == ATYPE_STRING) {
- /* need to clear just the sync pointer */
- mono_mb_emit_ldloc (mb, my_entry_var);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoObject, synchronisation));
- mono_mb_emit_byte (mb, MONO_CEE_ADD);
- mono_mb_emit_icon (mb, 0);
- mono_mb_emit_byte (mb, MONO_CEE_STIND_I);
- }
-
- if (atype == ATYPE_STRING) {
- /* need to set length and clear the last char */
- /* s->length = len; */
- mono_mb_emit_ldloc (mb, my_entry_var);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoString, length));
- mono_mb_emit_byte (mb, MONO_CEE_ADD);
- mono_mb_emit_ldarg (mb, 1);
- mono_mb_emit_byte (mb, MONO_CEE_STIND_I4);
- /* s->chars [len] = 0; */
- mono_mb_emit_ldloc (mb, my_entry_var);
- mono_mb_emit_ldloc (mb, bytes_var);
- mono_mb_emit_icon (mb, 2);
- mono_mb_emit_byte (mb, MONO_CEE_SUB);
- mono_mb_emit_byte (mb, MONO_CEE_ADD);
- mono_mb_emit_icon (mb, 0);
- mono_mb_emit_byte (mb, MONO_CEE_STIND_I2);
- }
-
- /* return my_entry; */
- mono_mb_emit_ldloc (mb, my_entry_var);
- mono_mb_emit_byte (mb, MONO_CEE_RET);
-
- mono_mb_patch_short_branch (mb, no_freelist_branch);
- if (not_small_enough_branch > 0)
- mono_mb_patch_short_branch (mb, not_small_enough_branch);
- if (size_overflow_branch > 0)
- mono_mb_patch_short_branch (mb, size_overflow_branch);
-
- /* the slow path: we just call back into the runtime */
- always_slowpath:
- if (atype == ATYPE_STRING) {
- mono_mb_emit_ldarg (mb, 1);
- mono_mb_emit_icall (mb, ves_icall_string_alloc);
- } else {
- mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_icall (mb, ves_icall_object_new_specific);
- }
-
- mono_mb_emit_byte (mb, MONO_CEE_RET);
-
- info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_NONE);
- info->d.alloc.gc_name = "boehm";
- info->d.alloc.alloc_type = atype;
- mb->init_locals = FALSE;
-
- res = mono_mb_create (mb, csig, 8, info);
- mono_mb_free (mb);
-
- return res;
-}
-
-static MonoMethod* alloc_method_cache [ATYPE_NUM];
-static MonoMethod* slowpath_alloc_method_cache [ATYPE_NUM];
-
-gboolean
-mono_gc_is_critical_method (MonoMethod *method)
-{
- int i;
-
- for (i = 0; i < ATYPE_NUM; ++i)
- if (method == alloc_method_cache [i] || method == slowpath_alloc_method_cache [i])
- return TRUE;
-
- return FALSE;
-}
-
-/*
- * If possible, generate a managed method that can quickly allocate objects in class
- * @klass. The method will typically have an thread-local inline allocation sequence.
- * The signature of the called method is:
- * object allocate (MonoVTable *vtable)
- * The thread local alloc logic is taken from libgc/pthread_support.c.
- */
-MonoMethod*
-mono_gc_get_managed_allocator (MonoClass *klass, gboolean for_box, gboolean known_instance_size)
-{
- int atype;
-
- /*
- * Tls implementation changed, we jump to tls native getters/setters.
- * Is boehm managed allocator ok with this ? Do we even care ?
- */
- return NULL;
-
- if (!SMALL_ENOUGH (m_class_get_instance_size (klass)))
- return NULL;
- if (mono_class_has_finalizer (klass) || mono_class_is_marshalbyref (klass))
- return NULL;
- if (G_UNLIKELY (mono_profiler_allocations_enabled ()))
- return NULL;
- if (m_class_get_rank (klass))
- return NULL;
- if (mono_class_is_open_constructed_type (m_class_get_byval_arg (klass)))
- return NULL;
- if (m_class_get_byval_arg (klass)->type == MONO_TYPE_STRING) {
- atype = ATYPE_STRING;
- } else if (!known_instance_size) {
- return NULL;
- } else if (!m_class_has_references (klass)) {
- if (for_box)
- atype = ATYPE_FREEPTR_FOR_BOX;
- else
- atype = ATYPE_FREEPTR;
- } else {
- return NULL;
- /*
- * disabled because we currently do a runtime choice anyway, to
- * deal with multiple appdomains.
- if (vtable->gc_descr != GC_NO_DESCRIPTOR)
- atype = ATYPE_GCJ;
- else
- atype = ATYPE_NORMAL;
- */
- }
- return mono_gc_get_managed_allocator_by_type (atype, MANAGED_ALLOCATOR_REGULAR);
-}
-
-MonoMethod*
-mono_gc_get_managed_array_allocator (MonoClass *klass)
-{
- return NULL;
-}
-
-/**
- * mono_gc_get_managed_allocator_by_type:
- *
- * Return a managed allocator method corresponding to allocator type ATYPE.
- */
-MonoMethod*
-mono_gc_get_managed_allocator_by_type (int atype, ManagedAllocatorVariant variant)
-{
- MonoMethod *res;
- gboolean slowpath = variant != MANAGED_ALLOCATOR_REGULAR;
- MonoMethod **cache = slowpath ? slowpath_alloc_method_cache : alloc_method_cache;
-
- return NULL;
-
- res = cache [atype];
- if (res)
- return res;
-
- res = create_allocator (atype, -1, slowpath);
- mono_os_mutex_lock (&mono_gc_lock);
- if (cache [atype]) {
- mono_free_method (res);
- res = cache [atype];
- } else {
- mono_memory_barrier ();
- cache [atype] = res;
- }
- mono_os_mutex_unlock (&mono_gc_lock);
- return res;
-}
-
-guint32
-mono_gc_get_managed_allocator_types (void)
-{
- return ATYPE_NUM;
-}
-
-MonoMethod*
-mono_gc_get_write_barrier (void)
-{
- g_assert_not_reached ();
- return NULL;
-}
-
-#else
+// Look at history around late August 2019 if this is to be restored.
+// The code was effectively dead, not merely deleted to avoid maintaining it.
+#endif
gboolean
mono_gc_is_critical_method (MonoMethod *method)
@@ -1362,8 +1000,6 @@ mono_gc_get_write_barrier (void)
return NULL;
}
-#endif
-
MonoMethod*
mono_gc_get_specific_write_barrier (gboolean is_concurrent)
{
@@ -1683,17 +1319,17 @@ mono_gc_register_finalizer_callbacks (MonoGCFinalizerCallbacks *callbacks)
#define BITMAP_SIZE (sizeof (*((HandleData *)NULL)->bitmap) * CHAR_BIT)
-static inline gboolean
+static gboolean
slot_occupied (HandleData *handles, guint slot) {
return handles->bitmap [slot / BITMAP_SIZE] & (1 << (slot % BITMAP_SIZE));
}
-static inline void
+static void
vacate_slot (HandleData *handles, guint slot) {
handles->bitmap [slot / BITMAP_SIZE] &= ~(1 << (slot % BITMAP_SIZE));
}
-static inline void
+static void
occupy_slot (HandleData *handles, guint slot) {
handles->bitmap [slot / BITMAP_SIZE] |= 1 << (slot % BITMAP_SIZE);
}
@@ -2067,6 +1703,12 @@ mono_gchandle_free_domain (MonoDomain *domain)
}
+guint64
+mono_gc_get_total_allocated_bytes (MonoBoolean precise)
+{
+ return 0;
+}
+
void
mono_gc_register_obj_with_weak_fields (void *obj)
{
diff --git a/mono/metadata/class-init.c.REMOVED.git-id b/mono/metadata/class-init.c.REMOVED.git-id
index bdfb2484c8..30e59d402d 100644
--- a/mono/metadata/class-init.c.REMOVED.git-id
+++ b/mono/metadata/class-init.c.REMOVED.git-id
@@ -1 +1 @@
-67b63637354afae46a56b66701bd8da931814203
\ No newline at end of file
+cc50f15e04f6001df2502d66eb15a3d1d685a735
\ No newline at end of file
diff --git a/mono/metadata/class-internals.h b/mono/metadata/class-internals.h
index 586940e0e7..a07a13ffba 100644
--- a/mono/metadata/class-internals.h
+++ b/mono/metadata/class-internals.h
@@ -14,6 +14,7 @@
#include "mono/utils/mono-compiler.h"
#include "mono/utils/mono-error.h"
#include "mono/sgen/gc-internal-agnostic.h"
+#include "mono/utils/mono-error-internals.h"
#define MONO_CLASS_IS_ARRAY(c) (m_class_get_rank (c))
@@ -23,6 +24,7 @@
extern gboolean mono_print_vtable;
extern gboolean mono_align_small_structs;
+extern gint32 mono_simd_register_size;
typedef struct _MonoMethodWrapper MonoMethodWrapper;
typedef struct _MonoMethodInflated MonoMethodInflated;
@@ -846,10 +848,34 @@ MONO_PROFILER_API MonoGenericContext*
mono_class_get_context (MonoClass *klass);
MONO_PROFILER_API MonoMethodSignature*
-mono_method_signature_checked (MonoMethod *m, MonoError *err);
+mono_method_signature_checked_slow (MonoMethod *m, MonoError *err);
MONO_PROFILER_API MonoMethodSignature*
-mono_method_signature_internal (MonoMethod *m);
+mono_method_signature_internal_slow (MonoMethod *m);
+
+/**
+ * mono_method_signature_checked:
+ *
+ * Return the signature of the method M. On failure, returns NULL, and ERR is set.
+ */
+static inline MonoMethodSignature*
+mono_method_signature_checked (MonoMethod *m, MonoError *error)
+{
+ error_init (error);
+ MonoMethodSignature* sig = m->signature;
+ return sig ? sig : mono_method_signature_checked_slow (m, error);
+}
+
+/**
+ * mono_method_signature_internal:
+ * \returns the signature of the method \p m. On failure, returns NULL.
+ */
+static inline MonoMethodSignature*
+mono_method_signature_internal (MonoMethod *m)
+{
+ MonoMethodSignature* sig = m->signature;
+ return sig ? sig : mono_method_signature_internal_slow (m);
+}
MonoGenericContext*
mono_method_get_context_general (MonoMethod *method, gboolean uninflated);
@@ -1023,6 +1049,11 @@ GENERATE_TRY_GET_CLASS_WITH_CACHE_DECL (appdomain_unloaded_exception)
GENERATE_GET_CLASS_WITH_CACHE_DECL (valuetype)
GENERATE_TRY_GET_CLASS_WITH_CACHE_DECL(handleref)
+
+#ifdef ENABLE_NETCORE
+GENERATE_GET_CLASS_WITH_CACHE_DECL (assembly_load_context)
+#endif
+
/* If you need a MonoType, use one of the mono_get_*_type () functions in class-inlines.h */
extern MonoDefaults mono_defaults;
diff --git a/mono/metadata/class.c.REMOVED.git-id b/mono/metadata/class.c.REMOVED.git-id
index 25ef2799c1..77095b3e37 100644
--- a/mono/metadata/class.c.REMOVED.git-id
+++ b/mono/metadata/class.c.REMOVED.git-id
@@ -1 +1 @@
-1252e71887f2acd94cdb180b7c4cd92de9c8fef7
\ No newline at end of file
+dda0dfb0056182f5373def220522145ee38c43e7
\ No newline at end of file
diff --git a/mono/metadata/cominterop.c.REMOVED.git-id b/mono/metadata/cominterop.c.REMOVED.git-id
index 654755d5dd..469da5d2f1 100644
--- a/mono/metadata/cominterop.c.REMOVED.git-id
+++ b/mono/metadata/cominterop.c.REMOVED.git-id
@@ -1 +1 @@
-bd2b87531f5229d7fce6c1bfa11d486502ad5e1a
\ No newline at end of file
+20f61293e61a78ef7bdba3de480886d23e8f9ffe
\ No newline at end of file
diff --git a/mono/metadata/console-unix.c b/mono/metadata/console-unix.c
index 9e3bbdb54d..cc9e543ff3 100644
--- a/mono/metadata/console-unix.c
+++ b/mono/metadata/console-unix.c
@@ -36,6 +36,11 @@
#include
#include
#include
+#include
+#include
+#include "icall-decl.h"
+
+#ifndef ENABLE_NETCORE
/* On solaris, curses.h must come before both termios.h and term.h */
#ifdef HAVE_CURSES_H
@@ -56,10 +61,6 @@
# include
#endif
-#include
-#include
-#include "icall-decl.h"
-
static gboolean setup_finished;
static gboolean atexit_called;
@@ -77,10 +78,8 @@ static struct termios mono_attr;
/* static void console_restore_signal_handlers (void); */
static void console_set_signal_handlers (void);
-
static GENERATE_TRY_GET_CLASS_WITH_CACHE (console, "System", "Console");
-
void
mono_console_init (void)
{
@@ -511,3 +510,17 @@ ves_icall_System_ConsoleDriver_TtySetup (MonoStringHandle keypad, MonoStringHand
return TRUE;
}
+
+#else /* ENABLE_NETCORE */
+
+void
+mono_console_init (void)
+{
+}
+
+void
+mono_console_handle_async_ops (void)
+{
+}
+
+#endif
diff --git a/mono/metadata/coree.c b/mono/metadata/coree.c
index cf32c19099..cee0560162 100644
--- a/mono/metadata/coree.c
+++ b/mono/metadata/coree.c
@@ -80,6 +80,7 @@ BOOL STDMETHODCALLTYPE _CorDllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpRes
MonoImage* image;
gchar* file_name;
gchar* error;
+ MonoAssemblyLoadContext *alc = mono_domain_default_alc (mono_get_root_domain ());
switch (dwReason)
{
@@ -89,7 +90,7 @@ BOOL STDMETHODCALLTYPE _CorDllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpRes
file_name = mono_get_module_file_name (hInst);
if (mono_get_root_domain ()) {
- image = mono_image_open_from_module_handle (mono_domain_default_alc (mono_get_root_domain ()), hInst, mono_path_resolve_symlinks (file_name), TRUE, NULL);
+ image = mono_image_open_from_module_handle (alc, hInst, mono_path_resolve_symlinks (file_name), TRUE, NULL);
} else {
init_from_coree = TRUE;
mono_runtime_load (file_name, NULL);
@@ -97,7 +98,7 @@ BOOL STDMETHODCALLTYPE _CorDllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpRes
if (error) {
g_free (error);
g_free (file_name);
- mono_runtime_quit ();
+ mono_runtime_quit_internal ();
return FALSE;
}
@@ -122,7 +123,7 @@ BOOL STDMETHODCALLTYPE _CorDllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpRes
*/
if (image->tables [MONO_TABLE_ASSEMBLY].rows && image->image_info->cli_cli_header.ch_vtable_fixups.rva) {
MonoAssemblyOpenRequest req;
- mono_assembly_request_prepare (&req.request, sizeof (req), MONO_ASMCTX_DEFAULT);
+ mono_assembly_request_prepare_open (&req, MONO_ASMCTX_DEFAULT, alc);
assembly = mono_assembly_request_open (file_name, &req, NULL);
}
@@ -133,7 +134,7 @@ BOOL STDMETHODCALLTYPE _CorDllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpRes
/* The process is terminating. */
return TRUE;
file_name = mono_get_module_file_name (hInst);
- image = mono_image_loaded_internal (mono_domain_default_alc (mono_get_root_domain ()), file_name, FALSE);
+ image = mono_image_loaded_internal (alc, file_name, FALSE);
if (image)
mono_image_close (image);
@@ -171,18 +172,18 @@ __int32 STDMETHODCALLTYPE _CorExeMain(void)
g_free (corlib_version_error);
g_free (file_name);
MessageBox (NULL, L"Corlib not in sync with this runtime.", NULL, MB_ICONERROR);
- mono_runtime_quit ();
+ mono_runtime_quit_internal ();
ExitProcess (1);
}
MonoAssemblyOpenRequest req;
- mono_assembly_request_prepare (&req.request, sizeof (req), MONO_ASMCTX_DEFAULT);
+ mono_assembly_request_prepare_open (&req, MONO_ASMCTX_DEFAULT, mono_domain_default_alc (mono_get_root_domain ()));
assembly = mono_assembly_request_open (file_name, &req, NULL);
mono_close_exe_image ();
if (!assembly) {
g_free (file_name);
MessageBox (NULL, L"Cannot open assembly.", NULL, MB_ICONERROR);
- mono_runtime_quit ();
+ mono_runtime_quit_internal ();
ExitProcess (1);
}
@@ -191,7 +192,7 @@ __int32 STDMETHODCALLTYPE _CorExeMain(void)
if (!entry) {
g_free (file_name);
MessageBox (NULL, L"Assembly doesn't have an entry point.", NULL, MB_ICONERROR);
- mono_runtime_quit ();
+ mono_runtime_quit_internal ();
ExitProcess (1);
}
@@ -200,7 +201,7 @@ __int32 STDMETHODCALLTYPE _CorExeMain(void)
g_free (file_name);
mono_error_cleanup (error); /* FIXME don't swallow the error */
MessageBox (NULL, L"The entry point method could not be loaded.", NULL, MB_ICONERROR);
- mono_runtime_quit ();
+ mono_runtime_quit_internal ();
ExitProcess (1);
}
@@ -213,9 +214,9 @@ __int32 STDMETHODCALLTYPE _CorExeMain(void)
mono_runtime_run_main_checked (method, argc, argv, error);
mono_error_raise_exception_deprecated (error); /* OK, triggers unhandled exn handler */
- mono_thread_manage ();
+ mono_thread_manage_internal ();
- mono_runtime_quit ();
+ mono_runtime_quit_internal ();
/* return does not terminate the process. */
ExitProcess (mono_environment_exitcode_get ());
@@ -230,7 +231,7 @@ void STDMETHODCALLTYPE CorExitProcess(int exitCode)
if (mono_get_root_domain () && !mono_runtime_is_shutting_down ()) {
mono_runtime_set_shutting_down ();
mono_thread_suspend_all_other_threads ();
- mono_runtime_quit ();
+ mono_runtime_quit_internal ();
}
#endif
ExitProcess (exitCode);
diff --git a/mono/metadata/custom-attrs-internals.h b/mono/metadata/custom-attrs-internals.h
index 21e36df2da..c55ece8a0b 100644
--- a/mono/metadata/custom-attrs-internals.h
+++ b/mono/metadata/custom-attrs-internals.h
@@ -26,6 +26,9 @@ mono_assembly_is_weak_field (MonoImage *image, guint32 field_idx);
void
mono_assembly_init_weak_fields (MonoImage *image);
+void
+mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *method, const guchar *data, guint32 len, MonoArrayHandleOut typed_args_out, MonoArrayHandleOut named_args_out, CattrNamedArg **named_arg_info, MonoError *error);
+
void
mono_reflection_create_custom_attr_data_args_noalloc (MonoImage *image, MonoMethod *method, const guchar *data, guint32 len,
gpointer **typed_args_out, gpointer **named_args_out, int *num_named_args,
diff --git a/mono/metadata/custom-attrs.c b/mono/metadata/custom-attrs.c
index 8e613078ae..5e125c69d5 100644
--- a/mono/metadata/custom-attrs.c
+++ b/mono/metadata/custom-attrs.c
@@ -25,6 +25,7 @@
#include "mono/metadata/tabledefs.h"
#include "mono/metadata/tokentype.h"
#include "mono/metadata/verify-internals.h"
+#include "mono/metadata/icall-decl.h"
#include "mono/utils/checked-build.h"
#define CHECK_ADD4_OVERFLOW_UN(a, b) ((guint32)(0xFFFFFFFFU) - (guint32)(b) < (guint32)(a))
@@ -1014,7 +1015,7 @@ create_custom_attr_into_array (MonoImage *image, MonoMethod *method, const gucha
* NAMED_ARG_INFO will contain information about the named arguments.
*/
void
-mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *method, const guchar *data, guint32 len, MonoArray **typed_args_out, MonoArray **named_args_out, CattrNamedArg **named_arg_info, MonoError *error)
+mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *method, const guchar *data, guint32 len, MonoArrayHandleOut typed_args_h, MonoArrayHandleOut named_args_h, CattrNamedArg **named_arg_info, MonoError *error)
{
MonoArray *typed_args, *named_args;
MonoClass *attrklass;
@@ -1025,8 +1026,8 @@ mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *meth
guint32 i, j, num_named;
CattrNamedArg *arginfo = NULL;
- *typed_args_out = NULL;
- *named_args_out = NULL;
+ MONO_HANDLE_ASSIGN_RAW (typed_args_h, NULL);
+ MONO_HANDLE_ASSIGN_RAW (named_args_h, NULL);
*named_arg_info = NULL;
typed_args = NULL;
@@ -1051,6 +1052,7 @@ mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *meth
*/
typed_args = mono_array_new_checked (domain, mono_get_object_class (), mono_method_signature_internal (method)->param_count, error);
return_if_nok (error);
+ MONO_HANDLE_ASSIGN_RAW (typed_args_h, typed_args);
for (i = 0; i < mono_method_signature_internal (method)->param_count; ++i) {
MonoObject *obj;
@@ -1068,6 +1070,7 @@ mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *meth
num_named = read16 (named);
named_args = mono_array_new_checked (domain, mono_get_object_class (), num_named, error);
return_if_nok (error);
+ MONO_HANDLE_ASSIGN_RAW (named_args_h, named_args);
named += 2;
attrklass = method->klass;
@@ -1159,8 +1162,6 @@ mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *meth
g_free (name);
}
- *typed_args_out = typed_args;
- *named_args_out = named_args;
return;
fail:
mono_error_set_generic_error (error, "System.Reflection", "CustomAttributeFormatException", "Binary format of the specified custom attribute was invalid.");
@@ -1322,26 +1323,30 @@ fail:
*named_arg_info = NULL;
}
-static gboolean
-reflection_resolve_custom_attribute_data (MonoReflectionMethod *ref_method, MonoReflectionAssembly *assembly, gpointer data, guint32 len, MonoArray **ctor_args, MonoArray **named_args_out, MonoError *error)
+void
+ves_icall_System_Reflection_CustomAttributeData_ResolveArgumentsInternal (MonoReflectionMethodHandle ref_method_h, MonoReflectionAssemblyHandle assembly_h,
+ gpointer data, guint32 len,
+ MonoArrayHandleOut ctor_args_h, MonoArrayHandleOut named_args_h,
+ MonoError *error)
{
MonoDomain *domain;
MonoArray *typed_args, *named_args;
MonoImage *image;
MonoMethod *method;
CattrNamedArg *arginfo = NULL;
+ MonoReflectionMethod *ref_method = MONO_HANDLE_RAW (ref_method_h);
+ MonoReflectionAssembly *assembly = MONO_HANDLE_RAW (assembly_h);
+ MonoMethodSignature *sig;
+ MonoObjectHandle obj_h, namedarg_h, typedarg_h, minfo_h;
int i;
- error_init (error);
-
- *ctor_args = NULL;
- *named_args_out = NULL;
-
- typed_args = NULL;
- named_args = NULL;
-
if (len == 0)
- return TRUE;
+ return;
+
+ obj_h = MONO_HANDLE_NEW (MonoObject, NULL);
+ namedarg_h = MONO_HANDLE_NEW (MonoObject, NULL);
+ typedarg_h = MONO_HANDLE_NEW (MonoObject, NULL);
+ minfo_h = MONO_HANDLE_NEW (MonoObject, NULL);
image = assembly->assembly->image;
method = ref_method->method;
@@ -1352,30 +1357,38 @@ reflection_resolve_custom_attribute_data (MonoReflectionMethod *ref_method, Mono
goto leave;
}
- mono_reflection_create_custom_attr_data_args (image, method, (const guchar *)data, len, &typed_args, &named_args, &arginfo, error);
+ // FIXME: Handles
+ mono_reflection_create_custom_attr_data_args (image, method, (const guchar *)data, len, ctor_args_h, named_args_h, &arginfo, error);
goto_if_nok (error, leave);
+ typed_args = MONO_HANDLE_RAW (ctor_args_h);
+ named_args = MONO_HANDLE_RAW (named_args_h);
if (!typed_args || !named_args)
goto leave;
- for (i = 0; i < mono_method_signature_internal (method)->param_count; ++i) {
- MonoObject *obj = mono_array_get_internal (typed_args, MonoObject*, i);
+ sig = mono_method_signature_internal (method);
+ for (i = 0; i < sig->param_count; ++i) {
+ MonoObject *obj;
MonoObject *typedarg;
MonoType *t;
+ obj = mono_array_get_internal (typed_args, MonoObject*, i);
+ MONO_HANDLE_ASSIGN_RAW (obj_h, obj);
+
t = mono_method_signature_internal (method)->params [i];
if (t->type == MONO_TYPE_OBJECT && obj)
t = m_class_get_byval_arg (obj->vtable->klass);
typedarg = create_cattr_typed_arg (t, obj, error);
-
goto_if_nok (error, leave);
mono_array_setref_internal (typed_args, i, typedarg);
}
for (i = 0; i < mono_array_length_internal (named_args); ++i) {
- MonoObject *obj = mono_array_get_internal (named_args, MonoObject*, i);
+ MonoObject *obj;
MonoObject *namedarg, *minfo;
+ obj = mono_array_get_internal (named_args, MonoObject*, i);
+ MONO_HANDLE_ASSIGN_RAW (obj_h, obj);
if (arginfo [i].prop) {
minfo = (MonoObject*)mono_property_get_object_checked (domain, arginfo [i].prop->parent, arginfo [i].prop, error);
if (!minfo)
@@ -1384,33 +1397,25 @@ reflection_resolve_custom_attribute_data (MonoReflectionMethod *ref_method, Mono
minfo = (MonoObject*)mono_field_get_object_checked (domain, NULL, arginfo [i].field, error);
goto_if_nok (error, leave);
}
+ MONO_HANDLE_ASSIGN_RAW (minfo_h, minfo);
#if ENABLE_NETCORE
namedarg = create_cattr_named_arg (minfo, obj, error);
+ MONO_HANDLE_ASSIGN_RAW (namedarg_h, namedarg);
#else
MonoObject* typedarg = create_cattr_typed_arg (arginfo [i].type, obj, error);
+ MONO_HANDLE_ASSIGN_RAW (typedarg_h, typedarg);
goto_if_nok (error, leave);
namedarg = create_cattr_named_arg (minfo, typedarg, error);
+ MONO_HANDLE_ASSIGN_RAW (namedarg_h, namedarg);
#endif
goto_if_nok (error, leave);
mono_array_setref_internal (named_args, i, namedarg);
}
- *ctor_args = typed_args;
- *named_args_out = named_args;
-
leave:
g_free (arginfo);
- return mono_error_ok (error);
-}
-
-void
-ves_icall_System_Reflection_CustomAttributeData_ResolveArgumentsInternal (MonoReflectionMethod *ref_method, MonoReflectionAssembly *assembly, gpointer data, guint32 len, MonoArray **ctor_args, MonoArray **named_args)
-{
- ERROR_DECL (error);
- (void) reflection_resolve_custom_attribute_data (ref_method, assembly, data, len, ctor_args, named_args, error);
- mono_error_set_pending_exception (error);
}
static MonoClass*
@@ -2289,8 +2294,6 @@ mono_reflection_get_custom_attrs_data_checked (MonoObjectHandle obj, MonoError *
MonoArrayHandle result = MONO_HANDLE_NEW (MonoArray, NULL);
MonoCustomAttrInfo *cinfo;
- error_init (error);
-
cinfo = mono_reflection_get_custom_attrs_info_checked (obj, error);
goto_if_nok (error, leave);
if (cinfo) {
diff --git a/mono/metadata/debug-mono-ppdb.c b/mono/metadata/debug-mono-ppdb.c
index 13c3ebfa97..7d3dbda2ad 100644
--- a/mono/metadata/debug-mono-ppdb.c
+++ b/mono/metadata/debug-mono-ppdb.c
@@ -159,7 +159,7 @@ mono_ppdb_load_file (MonoImage *image, const guint8 *raw_contents, int size)
gint32 pe_timestamp;
guint8 *ppdb_data = NULL;
guint8 *to_free = NULL;
- int ppdb_size, ppdb_compressed_size;
+ int ppdb_size = 0, ppdb_compressed_size = 0;
if (image->tables [MONO_TABLE_DOCUMENT].rows) {
/* Embedded ppdb */
diff --git a/mono/metadata/domain-internals.h b/mono/metadata/domain-internals.h
index d92a35a4b7..544554b172 100644
--- a/mono/metadata/domain-internals.h
+++ b/mono/metadata/domain-internals.h
@@ -507,6 +507,9 @@ typedef void (*MonoFreeDomainFunc) (MonoDomain *domain);
void
mono_install_free_domain_hook (MonoFreeDomainFunc func);
+void
+mono_runtime_quit_internal (void);
+
void
mono_cleanup (void);
@@ -639,7 +642,7 @@ MonoImage *mono_assembly_open_from_bundle (MonoAssemblyLoadContext *alc,
gboolean refonly);
MonoAssembly *
-mono_try_assembly_resolve (MonoDomain *domain, const char *fname, MonoAssembly *requesting, gboolean refonly, MonoError *error);
+mono_try_assembly_resolve (MonoAssemblyLoadContext *alc, const char *fname, MonoAssembly *requesting, gboolean refonly, MonoError *error);
MonoAssembly *
mono_domain_assembly_postload_search (MonoAssemblyLoadContext *alc, MonoAssembly *requesting, MonoAssemblyName *aname, gboolean refonly, gboolean postload, gpointer user_data, MonoError *error);
diff --git a/mono/metadata/domain.c b/mono/metadata/domain.c
index 35794914f4..0b50926b9e 100644
--- a/mono/metadata/domain.c
+++ b/mono/metadata/domain.c
@@ -614,7 +614,7 @@ mono_init_internal (const char *filename, const char *exe_filename, const char *
if ((status != MONO_IMAGE_OK) || (ass == NULL)) {
switch (status){
case MONO_IMAGE_ERROR_ERRNO: {
- char *corlib_file = g_build_filename (mono_assembly_getrootdir (), "mono", current_runtime->framework_version, "mscorlib.dll", NULL);
+ char *corlib_file = g_build_filename (mono_assembly_getrootdir (), "mono", current_runtime->framework_version, "mscorlib.dll", (const char*)NULL);
g_print ("The assembly mscorlib.dll was not found or could not be loaded.\n");
g_print ("It should have been installed in the `%s' directory.\n", corlib_file);
g_free (corlib_file);
@@ -1059,8 +1059,7 @@ mono_domain_assembly_open_internal (MonoDomain *domain, MonoAssemblyLoadContext
#endif
MonoAssemblyOpenRequest req;
- mono_assembly_request_prepare (&req.request, sizeof (req), MONO_ASMCTX_DEFAULT);
- req.request.alc = alc;
+ mono_assembly_request_prepare_open (&req, MONO_ASMCTX_DEFAULT, alc);
if (domain != mono_domain_get ()) {
current = mono_domain_get ();
@@ -1850,7 +1849,7 @@ app_config_parse (const char *exe_filename)
text = g_strdup (bundled_config);
len = strlen (text);
} else {
- config_filename = g_strconcat (exe_filename, ".config", NULL);
+ config_filename = g_strconcat (exe_filename, ".config", (const char*)NULL);
if (!g_file_get_contents (config_filename, &text, &len, NULL)) {
g_free (config_filename);
diff --git a/mono/metadata/dynamic-image.c b/mono/metadata/dynamic-image.c
index 9ba6ca6da6..3b149cfe0c 100644
--- a/mono/metadata/dynamic-image.c
+++ b/mono/metadata/dynamic-image.c
@@ -33,13 +33,13 @@
static GPtrArray *dynamic_images;
static mono_mutex_t dynamic_images_mutex;
-static inline void
+static void
dynamic_images_lock (void)
{
mono_os_mutex_lock (&dynamic_images_mutex);
}
-static inline void
+static void
dynamic_images_unlock (void)
{
mono_os_mutex_unlock (&dynamic_images_mutex);
@@ -122,7 +122,7 @@ mono_find_dynamic_image_owner (void *ptr)
return owner;
}
-static inline void
+static void
dynamic_image_lock (MonoDynamicImage *image)
{
MONO_ENTER_GC_SAFE;
@@ -130,7 +130,7 @@ dynamic_image_lock (MonoDynamicImage *image)
MONO_EXIT_GC_SAFE;
}
-static inline void
+static void
dynamic_image_unlock (MonoDynamicImage *image)
{
mono_image_unlock ((MonoImage*)image);
diff --git a/mono/metadata/environment.c b/mono/metadata/environment.c
index 7b6ec01d66..f0a5ae8229 100644
--- a/mono/metadata/environment.c
+++ b/mono/metadata/environment.c
@@ -45,6 +45,7 @@ mono_environment_exitcode_set (gint32 value)
exitcode=value;
}
+#ifndef ENABLE_NETCORE
/* note: we better manipulate the string in managed code (easier and safer) */
MonoStringHandle
ves_icall_System_Environment_GetOSVersionString (MonoError *error)
@@ -89,4 +90,4 @@ ves_icall_System_Environment_GetOSVersionString (MonoError *error)
#endif
return mono_string_new_handle (mono_domain_get (), "0.0.0.0", error);
}
-
+#endif
diff --git a/mono/metadata/exception.c b/mono/metadata/exception.c
index 38fb92823e..48f96bff7e 100644
--- a/mono/metadata/exception.c
+++ b/mono/metadata/exception.c
@@ -1506,6 +1506,6 @@ mono_error_convert_to_exception_handle (MonoError *error)
{
//FIXMEcoop mono_error_convert_to_exception is raw pointer
// The "optimization" here is important to significantly reduce handle usage.
- return mono_error_ok (error) ? MONO_HANDLE_CAST (MonoException, NULL_HANDLE)
+ return is_ok (error) ? MONO_HANDLE_CAST (MonoException, NULL_HANDLE)
: MONO_HANDLE_NEW (MonoException, mono_error_convert_to_exception (error));
}
diff --git a/mono/metadata/external-only.c b/mono/metadata/external-only.c
index 290db63535..1ecbd5d950 100644
--- a/mono/metadata/external-only.c
+++ b/mono/metadata/external-only.c
@@ -19,6 +19,9 @@
#include "class-init.h"
#include "marshal.h"
#include "object.h"
+#include "external-only.h"
+#include "threads.h"
+#include "threads-types.h"
/**
* mono_gchandle_new:
@@ -107,6 +110,11 @@ mono_gchandle_free (uint32_t gchandle)
/**
* mono_gc_wbarrier_set_field:
+ * \param obj object containing the destination field
+ * \param field_ptr address of field inside the object
+ * \param value reference to the object to be stored
+ * Stores an object reference inside another object, executing a write barrier
+ * if needed.
*/
void
mono_gc_wbarrier_set_field (MonoObject *obj, void* field_ptr, MonoObject* value)
@@ -116,6 +124,11 @@ mono_gc_wbarrier_set_field (MonoObject *obj, void* field_ptr, MonoObject* value)
/**
* mono_gc_wbarrier_set_arrayref:
+ * \param arr array containing the destination slot
+ * \param slot_ptr address of slot inside the array
+ * \param value reference to the object to be stored
+ * Stores an object reference inside an array of objects, executing a write
+ * barrier if needed.
*/
void
mono_gc_wbarrier_set_arrayref (MonoArray *arr, void* slot_ptr, MonoObject* value)
@@ -123,14 +136,26 @@ mono_gc_wbarrier_set_arrayref (MonoArray *arr, void* slot_ptr, MonoObject* value
MONO_EXTERNAL_ONLY_GC_UNSAFE_VOID (mono_gc_wbarrier_set_arrayref_internal (arr, slot_ptr, value));
}
+/**
+ * mono_gc_wbarrier_arrayref_copy:
+ * \param dest_ptr destination slot address
+ * \param src_ptr source slot address
+ * \param count number of references to copy
+ * Copies \p count references from one array to another, executing a write
+ * barrier if needed.
+ */
void
-mono_gc_wbarrier_arrayref_copy (void* dest_ptr, void* src_ptr, int count)
+mono_gc_wbarrier_arrayref_copy (void* dest_ptr, /*const*/ void* src_ptr, int count)
{
MONO_EXTERNAL_ONLY_GC_UNSAFE_VOID (mono_gc_wbarrier_arrayref_copy_internal (dest_ptr, src_ptr, count));
}
/**
* mono_gc_wbarrier_generic_store:
+ * \param ptr address of field
+ * \param obj object to store
+ * Stores the \p value object inside the field represented by \p ptr,
+ * executing a write barrier if needed.
*/
void
mono_gc_wbarrier_generic_store (void* ptr, MonoObject* value)
@@ -139,7 +164,7 @@ mono_gc_wbarrier_generic_store (void* ptr, MonoObject* value)
}
/**
- * mono_gc_wbarrier_generic_store_atomic_internal:
+ * mono_gc_wbarrier_generic_store_atomic:
* Same as \c mono_gc_wbarrier_generic_store but performs the store
* as an atomic operation with release semantics.
*/
@@ -149,12 +174,26 @@ mono_gc_wbarrier_generic_store_atomic (void *ptr, MonoObject *value)
MONO_EXTERNAL_ONLY_GC_UNSAFE_VOID (mono_gc_wbarrier_generic_store_atomic_internal (ptr, value));
}
+/**
+ * mono_gc_wbarrier_generic_nostore:
+ * Executes a write barrier for an address, informing the GC that
+ * the reference stored at that address has been changed.
+ */
void
mono_gc_wbarrier_generic_nostore (void* ptr)
{
MONO_EXTERNAL_ONLY_GC_UNSAFE_VOID (mono_gc_wbarrier_generic_nostore_internal (ptr));
}
+/**
+ * mono_gc_wbarrier_object_copy:
+ * \param dest destination address
+ * \param src source address
+ * \param count number of elements to copy
+ * \param klass type of elements to copy
+ * Copies \p count elements of type \p klass from \p src address to
+ * \dest address, executing any necessary write barriers.
+ */
void
mono_gc_wbarrier_value_copy (void* dest, /*const*/ void* src, int count, MonoClass *klass)
{
@@ -163,8 +202,10 @@ mono_gc_wbarrier_value_copy (void* dest, /*const*/ void* src, int count, MonoCla
/**
* mono_gc_wbarrier_object_copy:
- *
- * Write barrier to call when \p obj is the result of a clone or copy of an object.
+ * \param obj destination object
+ * \param src source object
+ * Copies contents of \p src to \p obj, executing any necessary write
+ * barriers.
*/
void
mono_gc_wbarrier_object_copy (MonoObject* obj, MonoObject *src)
@@ -284,3 +325,14 @@ mono_domain_set (MonoDomain *domain, gboolean force)
MONO_EXTERNAL_ONLY_GC_UNSAFE_VOID (mono_domain_set_internal_with_options (domain, TRUE));
return TRUE;
}
+
+/**
+ * mono_thread_manage:
+ *
+ */
+void
+mono_thread_manage (void)
+{
+ MONO_EXTERNAL_ONLY_GC_UNSAFE_VOID (mono_thread_manage_internal ());
+}
+
diff --git a/mono/metadata/gc-internals.h b/mono/metadata/gc-internals.h
index 9adc971020..a305259b9f 100644
--- a/mono/metadata/gc-internals.h
+++ b/mono/metadata/gc-internals.h
@@ -313,6 +313,8 @@ int mono_gc_get_los_limit (void);
guint64 mono_gc_get_allocated_bytes_for_current_thread (void);
+guint64 mono_gc_get_total_allocated_bytes (MonoBoolean precise);
+
guint8* mono_gc_get_card_table (int *shift_bits, gpointer *card_mask);
guint8* mono_gc_get_target_card_table (int *shift_bits, target_mgreg_t *card_mask);
gboolean mono_gc_card_table_nursery_check (void);
diff --git a/mono/metadata/gc.c b/mono/metadata/gc.c
index 09b588b30f..dcdb6822b5 100644
--- a/mono/metadata/gc.c
+++ b/mono/metadata/gc.c
@@ -114,7 +114,7 @@ typedef struct {
MonoCoopMutex *mutex;
} BreakCoopAlertableWaitUD;
-static inline void
+static void
break_coop_alertable_wait (gpointer user_data)
{
BreakCoopAlertableWaitUD *ud = (BreakCoopAlertableWaitUD*)user_data;
@@ -132,7 +132,7 @@ break_coop_alertable_wait (gpointer user_data)
* Wait on COND/MUTEX. If ALERTABLE is non-null, the wait can be interrupted.
* In that case, *ALERTABLE will be set to TRUE, and 0 is returned.
*/
-static inline gint
+static gint
coop_cond_timedwait_alertable (MonoCoopCond *cond, MonoCoopMutex *mutex, guint32 timeout_ms, gboolean *alertable)
{
BreakCoopAlertableWaitUD *ud;
@@ -943,13 +943,9 @@ mono_runtime_do_background_work (void)
static gsize WINAPI
finalizer_thread (gpointer unused)
{
- ERROR_DECL (error);
gboolean wait = TRUE;
- MonoString *finalizer = mono_string_new_checked (mono_get_root_domain (), "Finalizer", error);
- mono_error_assert_ok (error);
- mono_thread_set_name_internal (mono_thread_internal_current (), finalizer, MonoSetThreadNameFlag_None, error);
- mono_error_assert_ok (error);
+ mono_thread_set_name_constant_ignore_error (mono_thread_internal_current (), "Finalizer", MonoSetThreadNameFlag_None);
/* Register a hazard free queue pump callback */
mono_hazard_pointer_install_free_queue_size_callback (hazard_free_queue_is_too_big);
diff --git a/mono/metadata/handle-decl.h b/mono/metadata/handle-decl.h
index a6085bed86..931824cf5f 100644
--- a/mono/metadata/handle-decl.h
+++ b/mono/metadata/handle-decl.h
@@ -67,6 +67,7 @@ Handle macros/functions
MONO_IF_CPLUSPLUS ( \
MONO_ALWAYS_INLINE \
TYPE * GetRaw () const { return __raw ? *__raw : NULL; } \
+ TYPE * volatile * Ref () { g_assert (__raw); return __raw; } \
) \
TYPE * volatile *__raw; \
} TYPED_HANDLE_NAME (TYPE), \
diff --git a/mono/metadata/handle.c b/mono/metadata/handle.c
index eff56a62b1..a06ebab57e 100644
--- a/mono/metadata/handle.c
+++ b/mono/metadata/handle.c
@@ -62,12 +62,6 @@ Combine: MonoDefaults, GENERATE_GET_CLASS_WITH_CACHE, TYPED_HANDLE_DECL and frie
* chunk should be updated before an object is written into the
* handle, and chunks to be scanned (between bottom and top) should
* always be valid.
- *
- * Note that the handle stack is scanned PRECISELY (see
- * sgen_client_scan_thread_data ()). That means there should not be
- * stale objects scanned. So when we manipulate the size of a chunk,
- * we must ensure that the newly scannable slot is either null or
- * points to a valid value.
*/
static HandleStack*
@@ -94,8 +88,6 @@ free_handle_chunk (HandleChunk *chunk)
g_free (chunk);
}
-const MonoObjectHandle mono_null_value_handle = { 0 };
-
#define THIS_IS_AN_OK_NUMBER_OF_HANDLES 100
static HandleChunkElem*
@@ -171,12 +163,16 @@ mono_handle_new (MonoObject *obj, MonoThreadInfo *info, const char *owner)
#endif
{
info = info ? info : mono_thread_info_current ();
+
HandleStack *handles = info->handle_stack;
HandleChunk *top = handles->top;
#ifdef MONO_HANDLE_TRACK_SP
mono_handle_chunk_leak_check (handles);
#endif
+ // FIXME: Since we scan the handle stack inprecisely, some of the
+ // membars could be removed
+
retry:
if (G_LIKELY (top->size < OBJECTS_PER_HANDLES_CHUNK)) {
int idx = top->size;
@@ -319,14 +315,11 @@ mono_handle_stack_scan (HandleStack *stack, GcScanFunc func, gpointer gc_data, g
check_handle_stack_monotonic (stack);
/*
- We're called twice - on the imprecise pass we do nothing.
- Interior pointers are retained in managed frames.
- On the precise pass, we scan all the objects where the handles point to the start of
- the object.
-
- Note that if we're running, we know the world is stopped.
- */
- if (!precise)
+ * We're called twice, on the precise pass we do nothing.
+ * On the inprecise pass, we pin the objects pointed to by the handles.
+ * Note that if we're running, we know the world is stopped.
+ */
+ if (precise)
return;
HandleChunk *cur = stack->bottom;
@@ -345,9 +338,11 @@ mono_handle_stack_scan (HandleStack *stack, GcScanFunc func, gpointer gc_data, g
}
}
-void
+MonoThreadInfo*
mono_stack_mark_record_size (MonoThreadInfo *info, HandleStackMark *stackmark, const char *func_name)
{
+ info = info ? info : mono_thread_info_current ();
+
HandleStack *handles = info->handle_stack;
HandleChunk *cur = stackmark->chunk;
int size = -stackmark->size; //discard the starting point of the stack
@@ -360,6 +355,8 @@ mono_stack_mark_record_size (MonoThreadInfo *info, HandleStackMark *stackmark, c
if (size > THIS_IS_AN_OK_NUMBER_OF_HANDLES)
g_warning ("%s USED %d handles\n", func_name, size);
+
+ return info;
}
/*
diff --git a/mono/metadata/handle.h b/mono/metadata/handle.h
index 8fbe79aed9..1e6dea997f 100644
--- a/mono/metadata/handle.h
+++ b/mono/metadata/handle.h
@@ -134,7 +134,7 @@ gboolean mono_handle_stack_is_empty (HandleStack *stack);
HandleStack* mono_handle_stack_alloc (void);
void mono_handle_stack_free (HandleStack *handlestack);
MonoRawHandle mono_stack_mark_pop_value (MonoThreadInfo *info, HandleStackMark *stackmark, MonoRawHandle value);
-void mono_stack_mark_record_size (MonoThreadInfo *info, HandleStackMark *stackmark, const char *func_name);
+MonoThreadInfo* mono_stack_mark_record_size (MonoThreadInfo *info, HandleStackMark *stackmark, const char *func_name);
void mono_handle_stack_free_domain (HandleStack *stack, MonoDomain *domain);
#ifdef MONO_HANDLE_TRACK_SP
@@ -187,17 +187,18 @@ Icall macros
#define CLEAR_ICALL_COMMON \
mono_error_set_pending_exception (error);
+// FIXME There should be fast and slow versions of this, i.e. with and without local variable.
#define SETUP_ICALL_FRAME \
HandleStackMark __mark; \
- mono_stack_mark_init (mono_thread_info_current_var, &__mark);
+ mono_stack_mark_init (mono_thread_info_current_var ? mono_thread_info_current_var : mono_thread_info_current (), &__mark);
+// FIXME This should be one function call since it is not fully inlined.
#define CLEAR_ICALL_FRAME \
- mono_stack_mark_record_size (mono_thread_info_current_var, &__mark, __FUNCTION__); \
- mono_stack_mark_pop (mono_thread_info_current_var, &__mark);
+ mono_stack_mark_pop (mono_stack_mark_record_size (mono_thread_info_current_var, &__mark, __FUNCTION__), &__mark);
+// FIXME This should be one function call since it is not fully inlined.
#define CLEAR_ICALL_FRAME_VALUE(RESULT, HANDLE) \
- mono_stack_mark_record_size (mono_thread_info_current_var, &__mark, __FUNCTION__); \
- (RESULT) = g_cast (mono_stack_mark_pop_value (mono_thread_info_current_var, &__mark, (HANDLE)));
+ (RESULT) = g_cast (mono_stack_mark_pop_value (mono_stack_mark_record_size (mono_thread_info_current_var, &__mark, __FUNCTION__), &__mark, (HANDLE)));
#define HANDLE_FUNCTION_ENTER() do { \
MONO_DISABLE_WARNING(4459) /* declaration of 'identifier' hides global declaration */ \
@@ -210,12 +211,31 @@ Icall macros
CLEAR_ICALL_FRAME; \
} while (0)
-#define HANDLE_LOOP_PREPARE \
+// Do not do this often, but icall state can be manually managed.
+//
+// SETUP_ICALL_FUNCTION
+// loop { // Does not have to be a loop.
+// SETUP_ICALL_FRAME
+// ..
+// CLEAR_ICALL_FRAME
+// }
+//
+// As with HANDLE_FUNCTION_RETURN, you must not
+// skip CLEAR_ICALL_FRAME -- no break, continue, return, or goto (goto label at CLEAR_ICALL_FRAME is idiom).
+//
+#define SETUP_ICALL_FUNCTION \
MONO_DISABLE_WARNING(4459) /* declaration of 'identifier' hides global declaration */ \
/* There are deliberately locals and a constant NULL global with this same name. */ \
MonoThreadInfo *mono_thread_info_current_var = mono_thread_info_current () \
MONO_RESTORE_WARNING
+// A common use of manual icall frame management is for loop.
+// It can also be used for conditionality, where only some paths
+// through a function allocate handles and frame teardown does
+// coincide with function return. For example: emit_invoke_call.
+//
+#define HANDLE_LOOP_PREPARE SETUP_ICALL_FUNCTION
+
// Return a non-pointer or non-managed pointer, e.g. gboolean.
// VAL should be a local variable or at least not use handles in the current frame.
// i.e. it is "val", not "expr".
@@ -322,6 +342,10 @@ typedef struct _MonoTypeofCastHelper *MonoTypeofCastHelper; // a pointer type un
#define MONO_TYPEOF_CAST(typeexpr, expr) ((__typeof__ (typeexpr))(expr))
#endif
+/*
+ * Create handle for the object OBJECT.
+ * The handle will keep the object alive and pinned.
+ */
#ifndef MONO_HANDLE_TRACK_OWNER
#define MONO_HANDLE_NEW(type, object) \
@@ -335,6 +359,12 @@ typedef struct _MonoTypeofCastHelper *MonoTypeofCastHelper; // a pointer type un
#endif
#define MONO_HANDLE_CAST(type, value) (MONO_HANDLE_CAST_FOR (type) ((value).__raw))
+
+/*
+ * Return the raw object reference stored in the handle.
+ * The objref is valid while the handle is alive and
+ * points to it.
+ */
#ifdef __cplusplus
#define MONO_HANDLE_RAW(handle) ((handle).GetRaw())
#else
@@ -515,13 +545,41 @@ Constant handles may be initialized to it, but non-constant
handles must be NEW'ed. Uses of these are suspicious and should
be reviewed and probably changed FIXME.
*/
-extern const MonoObjectHandle mono_null_value_handle;
-#define NULL_HANDLE mono_null_value_handle
+#define NULL_HANDLE (mono_null_value_handle ())
#define NULL_HANDLE_INIT { 0 }
+static inline MonoObjectHandle
+mono_null_value_handle (void)
+{
+ MonoObjectHandle result = NULL_HANDLE_INIT;
+ return result;
+}
#define NULL_HANDLE_STRING (MONO_HANDLE_CAST (MonoString, NULL_HANDLE))
#define NULL_HANDLE_ARRAY (MONO_HANDLE_CAST (MonoArray, NULL_HANDLE))
#define NULL_HANDLE_STRING_BUILDER (MONO_HANDLE_CAST (MonoStringBuilder, NULL_HANDLE))
+#if __cplusplus
+
+// Use this to convert a THandle to a raw T** such as for a ref or out parameter, without
+// copying back and forth through an intermediate. The handle must already be allocated,
+// such as icall marshaling does for out and ref parameters.
+#define MONO_HANDLE_REF(h) (h.Ref ())
+
+#else
+
+static inline void volatile*
+mono_handle_ref (void volatile* p)
+{
+ g_assert (p);
+ return p;
+}
+
+// Use this to convert a THandle to a raw T** such as for a ref or out parameter, without
+// copying back and forth through an intermediate. The handle must already be allocated,
+// such as icall marshaling does for out and ref parameters.
+#define MONO_HANDLE_REF(handle) (MONO_TYPEOF_CAST ((handle).__raw, mono_handle_ref ((handle).__raw)))
+
+#endif
+
static inline MonoObjectHandle
mono_handle_assign_raw (MonoObjectHandleOut dest, void *src)
{
@@ -550,7 +608,7 @@ mono_handle_array_getref (MonoObjectHandleOut dest, MonoArrayHandle array, uintp
#define mono_handle_class(o) MONO_HANDLE_SUPPRESS (mono_object_class (MONO_HANDLE_RAW (MONO_HANDLE_UNSUPPRESS (o))))
-#define mono_handle_vtable(o) MONO_HANDLE_SUPPRESS (MONO_HANDLE_RAW (MONO_HANDLE_UNSUPPRESS (o))->vtable)
+#define mono_handle_vtable(o) MONO_HANDLE_GETVAL (o, vtable)
/* Local handles to global GC handles and back */
diff --git a/mono/metadata/icall-decl.h b/mono/metadata/icall-decl.h
index f667d64437..e3a38a1f1f 100644
--- a/mono/metadata/icall-decl.h
+++ b/mono/metadata/icall-decl.h
@@ -19,7 +19,6 @@
#include "marshal.h"
#include "monitor.h"
#include "mono-perfcounters.h"
-#include "mono-route.h"
#include "object-forward.h"
#include "object-internals.h"
#include "rand.h"
@@ -83,11 +82,6 @@ ICALL_EXPORT MonoBoolean ves_icall_System_IO_DriveInfo_GetDiskFreeSpace (const g
ICALL_EXPORT MonoBoolean ves_icall_System_Reflection_AssemblyName_ParseAssemblyName (const char*, MonoAssemblyName*, MonoBoolean*, MonoBoolean* is_token_defined_arg);
ICALL_EXPORT MonoBoolean ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_SufficientExecutionStack (void);
ICALL_EXPORT MonoBoolean ves_icall_System_Threading_Thread_YieldInternal (void);
-ICALL_EXPORT MonoObject* ves_icall_InternalExecute (MonoReflectionMethod*, MonoObject*, MonoArray*, MonoArray**);
-ICALL_EXPORT MonoObject* ves_icall_InternalInvoke (MonoReflectionMethod*, MonoObject*, MonoArray*, MonoException**);
-ICALL_EXPORT MonoObject* ves_icall_RuntimeFieldInfo_GetRawConstantValue (MonoReflectionField* rfield);
-ICALL_EXPORT MonoObject* ves_icall_RuntimeFieldInfo_GetValueInternal (MonoReflectionField* field, MonoObject* obj);
-ICALL_EXPORT MonoObject* ves_icall_property_info_get_default_value (MonoReflectionProperty*);
ICALL_EXPORT void ves_icall_System_ArgIterator_Setup (MonoArgIterator*, char*, char*);
ICALL_EXPORT MonoType* ves_icall_System_ArgIterator_IntGetNextArgType (MonoArgIterator*);
ICALL_EXPORT void ves_icall_System_ArgIterator_IntGetNextArg (MonoArgIterator*, MonoTypedRef*);
@@ -210,4 +204,6 @@ ICALL_EXPORT gint32 ves_icall_System_Net_NetworkInformation_LinuxNetworkChange_R
ICALL_EXPORT gpointer ves_icall_System_Net_NetworkInformation_LinuxNetworkChange_CloseNLSocket (gpointer sock);
#endif
+ICALL_EXPORT MonoBoolean ves_icall_Mono_TlsProviderFactory_IsBtlsSupported (void);
+
#endif // __MONO_METADATA_ICALL_H__
diff --git a/mono/metadata/icall-def.h.REMOVED.git-id b/mono/metadata/icall-def.h.REMOVED.git-id
index eae9e08379..325f554328 100644
--- a/mono/metadata/icall-def.h.REMOVED.git-id
+++ b/mono/metadata/icall-def.h.REMOVED.git-id
@@ -1 +1 @@
-7eb1e0b2d6cd10984359448c4cae86145e4f3d42
\ No newline at end of file
+48b5bd54d07522e790ce6dda6c0940a7941e33bf
\ No newline at end of file
diff --git a/mono/metadata/icall-table.c b/mono/metadata/icall-table.c
index 1bffd3fe0b..f019858ae7 100644
--- a/mono/metadata/icall-table.c
+++ b/mono/metadata/icall-table.c
@@ -302,7 +302,7 @@ mono_lookup_icall_symbol_internal (gpointer func)
// Initialize with identity mapping. One line is easier to step over.
for (T i = 0; i < N; ++i) functions_sorted [i] = i;
- qsort (functions_sorted, N, sizeof (T), mono_qsort_icall_function_compare_indirect);
+ mono_qsort (functions_sorted, N, sizeof (T), mono_qsort_icall_function_compare_indirect);
gpointer old = mono_atomic_cas_ptr ((gpointer*)&static_functions_sorted, functions_sorted, NULL);
if (old)
diff --git a/mono/metadata/icall-table.h b/mono/metadata/icall-table.h
index e9d2283a89..acc38723c9 100644
--- a/mono/metadata/icall-table.h
+++ b/mono/metadata/icall-table.h
@@ -47,7 +47,10 @@ typedef int *int_ptr;
typedef int **int_ptr_ref;
typedef guint8 **guint8_ptr_ref;
typedef GPtrArray *GPtrArray_ptr;
+// HANDLE is not used just to avoid duplicate typedef warnings with some compilers.
+// gpointer == void* == HANDLE == FILE_HANDLE == PROCESS_HANDLE.
typedef gpointer PROCESS_HANDLE;
+typedef gpointer FILE_HANDLE;
typedef MonoAssemblyName *MonoAssemblyName_ptr;
typedef MonoBoolean *MonoBoolean_ptr;
typedef MonoClass *MonoClass_ptr;
@@ -90,16 +93,18 @@ typedef MonoW32ProcessInfo *MonoW32ProcessInfo_ref;
// Maybe do this in TYPED_HANDLE_DECL.
typedef MonoArray MonoArrayOut;
typedef MonoArray MonoArrayInOut;
+typedef MonoArrayHandle MonoArrayOutHandle;
+typedef MonoArrayHandle MonoArrayInOutHandle;
+typedef MonoException MonoExceptionOut;
+typedef MonoExceptionHandle MonoExceptionOutHandle;
typedef MonoObject MonoObjectOut;
typedef MonoObject MonoObjectInOut;
typedef MonoObjectHandle MonoObjectOutHandle;
typedef MonoObjectHandle MonoObjectInOutHandle;
-typedef MonoArrayHandle MonoArrayOutHandle;
-typedef MonoArrayHandle MonoArrayInOutHandle;
-typedef MonoString MonoStringOut;
-typedef MonoStringHandle MonoStringOutHandle;
typedef MonoReflectionModule MonoReflectionModuleOut;
typedef MonoReflectionModuleHandle MonoReflectionModuleOutHandle;
+typedef MonoString MonoStringOut;
+typedef MonoStringHandle MonoStringOutHandle;
// How the arguments and return value of an icall should be wrapped.
// The names and meanings are from marshal-ilgen.c.
@@ -171,8 +176,11 @@ typedef MonoReflectionModuleHandle MonoReflectionModuleOutHandle;
#define MONO_HANDLE_TYPE_WRAP_guint8_ptr_ref ICALL_HANDLES_WRAP_VALUETYPE_REF
#define MONO_HANDLE_TYPE_WRAP_MonoResolveTokenError_ref ICALL_HANDLES_WRAP_VALUETYPE_REF
+// HANDLE is not used just to avoid duplicate typedef warnings with some compilers.
+// gpointer == void* == HANDLE == FILE_HANDLE == PROCESS_HANDLE.
#define MONO_HANDLE_TYPE_WRAP_char_ptr ICALL_HANDLES_WRAP_NONE
#define MONO_HANDLE_TYPE_WRAP_const_char_ptr ICALL_HANDLES_WRAP_NONE
+#define MONO_HANDLE_TYPE_WRAP_FILE_HANDLE ICALL_HANDLES_WRAP_NONE
#define MONO_HANDLE_TYPE_WRAP_MonoClass_ptr ICALL_HANDLES_WRAP_NONE
#define MONO_HANDLE_TYPE_WRAP_MonoEvent_ptr ICALL_HANDLES_WRAP_NONE
#define MONO_HANDLE_TYPE_WRAP_MonoGenericParamInfo_ptr ICALL_HANDLES_WRAP_NONE
@@ -182,27 +190,29 @@ typedef MonoReflectionModuleHandle MonoReflectionModuleOutHandle;
#define MONO_HANDLE_TYPE_WRAP_MonoStackCrawlMark_ptr ICALL_HANDLES_WRAP_NONE
#define MONO_HANDLE_TYPE_WRAP_gint32_ptr ICALL_HANDLES_WRAP_NONE
#define MONO_HANDLE_TYPE_WRAP_gpointer_ptr ICALL_HANDLES_WRAP_NONE
-#define MONO_HANDLE_TYPE_WRAP_PROCESS_HANDLE ICALL_HANDLES_WRAP_NONE
+#define MONO_HANDLE_TYPE_WRAP_PROCESS_HANDLE ICALL_HANDLES_WRAP_NONE
// Please keep this sorted (grep ICALL_HANDLES_WRAP_OBJ$ | sort)
#define MONO_HANDLE_TYPE_WRAP_MonoAppContext ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoAppDomain ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoAppDomainSetup ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoArray ICALL_HANDLES_WRAP_OBJ
+#define MONO_HANDLE_TYPE_WRAP_MonoAsyncResult ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoCalendarData ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoComInteropProxy ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoComObject ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoCultureData ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoCultureInfo ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoDelegate ICALL_HANDLES_WRAP_OBJ
-#define MONO_HANDLE_TYPE_WRAP_MonoReflectionDynamicMethod ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoException ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoInternalThread ICALL_HANDLES_WRAP_OBJ
+#define MONO_HANDLE_TYPE_WRAP_MonoIOSelectorJob ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoObject ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoManifestResourceInfo ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoMulticastDelegate ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoReflectionAssembly ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoReflectionAssemblyBuilder ICALL_HANDLES_WRAP_OBJ
+#define MONO_HANDLE_TYPE_WRAP_MonoReflectionDynamicMethod ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoReflectionEvent ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoReflectionMonoEvent ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoReflectionField ICALL_HANDLES_WRAP_OBJ
@@ -223,6 +233,7 @@ typedef MonoReflectionModuleHandle MonoReflectionModuleOutHandle;
#define MONO_HANDLE_TYPE_WRAP_MonoTransparentProxy ICALL_HANDLES_WRAP_OBJ
#define MONO_HANDLE_TYPE_WRAP_MonoW32ProcessStartInfo ICALL_HANDLES_WRAP_OBJ
+#define MONO_HANDLE_TYPE_WRAP_MonoExceptionOut ICALL_HANDLES_WRAP_OBJ_OUT
#define MONO_HANDLE_TYPE_WRAP_MonoObjectOut ICALL_HANDLES_WRAP_OBJ_OUT
#define MONO_HANDLE_TYPE_WRAP_MonoStringOut ICALL_HANDLES_WRAP_OBJ_OUT
#define MONO_HANDLE_TYPE_WRAP_MonoArrayOut ICALL_HANDLES_WRAP_OBJ_OUT
diff --git a/mono/metadata/icall.c.REMOVED.git-id b/mono/metadata/icall.c.REMOVED.git-id
index a5388a0015..7fe971bac9 100644
--- a/mono/metadata/icall.c.REMOVED.git-id
+++ b/mono/metadata/icall.c.REMOVED.git-id
@@ -1 +1 @@
-acdecb311a252beab6c5bd5bd74400af5a63b675
\ No newline at end of file
+7f5957aa9f7af2309900b0d456b8e286d9659ed0
\ No newline at end of file
diff --git a/mono/metadata/image.c b/mono/metadata/image.c
index 0d653265cd..9e05d37ce8 100644
--- a/mono/metadata/image.c
+++ b/mono/metadata/image.c
@@ -685,14 +685,6 @@ load_modules (MonoImage *image)
MonoImage*
mono_image_load_module_checked (MonoImage *image, int idx, MonoError *error)
{
- MonoTableInfo *t;
- MonoTableInfo *file_table;
- int i;
- char *base_dir;
- gboolean refonly = image->ref_only;
- GList *list_iter, *valid_modules = NULL;
- MonoImageOpenStatus status;
-
error_init (error);
if ((image->module_count == 0) || (idx > image->module_count || idx <= 0))
@@ -704,6 +696,13 @@ mono_image_load_module_checked (MonoImage *image, int idx, MonoError *error)
/* SRE still uses image->modules, but they are not loaded from files, so the rest of this function is dead code for netcore */
g_assert_not_reached ();
#else
+ MonoTableInfo *t;
+ MonoTableInfo *file_table;
+ int i;
+ char *base_dir;
+ gboolean refonly = image->ref_only;
+ GList *list_iter, *valid_modules = NULL;
+ MonoImageOpenStatus status;
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY, "Loading module %d of %s (%s)", idx, image->assembly ? image->assembly->aname.name : "some assembly", image->name);
@@ -738,7 +737,7 @@ mono_image_load_module_checked (MonoImage *image, int idx, MonoError *error)
if (valid) {
MonoAssemblyLoadContext *alc = mono_image_get_alc (image);
MonoLoadedImages *li = mono_image_get_loaded_images_for_modules (image);
- module_ref = g_build_filename (base_dir, name, NULL);
+ module_ref = g_build_filename (base_dir, name, (const char*)NULL);
MonoImage *moduleImage = mono_image_open_a_lot_parameterized (li, alc, module_ref, &status, refonly, FALSE, NULL);
if (moduleImage) {
if (!assign_assembly_parent_for_netmodule (moduleImage, image, error)) {
@@ -1336,15 +1335,12 @@ do_mono_image_load (MonoImage *image, MonoImageOpenStatus *status,
gboolean care_about_cli, gboolean care_about_pecoff)
{
ERROR_DECL (error);
- MonoCLIImageInfo *iinfo;
GSList *l;
MONO_PROFILER_RAISE (image_loading, (image));
mono_image_init (image);
- iinfo = image->image_info;
-
if (!image->metadata_only) {
for (l = image_loaders; l; l = l->next) {
MonoImageLoader *loader = (MonoImageLoader *)l->data;
@@ -1831,6 +1827,7 @@ mono_image_open_from_data_internal (MonoAssemblyLoadContext *alc, char *data, gu
image->storage = storage;
mono_image_init_raw_data (image, storage);
image->name = (name == NULL) ? g_strdup_printf ("data-%p", datac) : g_strdup(name);
+ image->filename = name ? g_strdup (name) : NULL;
iinfo = g_new0 (MonoCLIImageInfo, 1);
image->image_info = iinfo;
image->ref_only = refonly;
@@ -1930,6 +1927,7 @@ mono_image_open_from_module_handle (MonoAssemblyLoadContext *alc, HMODULE module
iinfo = g_new0 (MonoCLIImageInfo, 1);
image->image_info = iinfo;
image->name = fname;
+ image->filename = g_strdup (image->name);
image->ref_count = has_entry_point ? 0 : 1;
#ifdef ENABLE_NETCORE
image->alc = alc;
@@ -2275,7 +2273,7 @@ mono_dynamic_stream_reset (MonoDynamicStream* stream)
}
}
-static inline void
+static void
free_hash (GHashTable *hash)
{
if (hash)
@@ -2808,7 +2806,7 @@ mono_image_load_file_for_image_checked (MonoImage *image, int fileidx, MonoError
fname_id = mono_metadata_decode_row_col (t, fileidx - 1, MONO_FILE_NAME);
fname = mono_metadata_string_heap (image, fname_id);
base_dir = g_path_get_dirname (image->name);
- name = g_build_filename (base_dir, fname, NULL);
+ name = g_build_filename (base_dir, fname, (const char*)NULL);
res = mono_image_open (name, NULL);
if (!res)
goto done;
diff --git a/mono/metadata/jit-icall-reg.h b/mono/metadata/jit-icall-reg.h
index 4bc81d14de..91c0ce6f48 100644
--- a/mono/metadata/jit-icall-reg.h
+++ b/mono/metadata/jit-icall-reg.h
@@ -125,6 +125,8 @@ MONO_JIT_ICALL (cominterop_get_function_pointer) \
MONO_JIT_ICALL (cominterop_get_interface) \
MONO_JIT_ICALL (cominterop_get_method_interface) \
MONO_JIT_ICALL (cominterop_object_is_rcw) \
+MONO_JIT_ICALL (cominterop_restore_domain) \
+MONO_JIT_ICALL (cominterop_set_ccw_object_domain) \
MONO_JIT_ICALL (cominterop_type_from_handle) \
MONO_JIT_ICALL (g_free) \
MONO_JIT_ICALL (interp_to_native_trampoline) \
diff --git a/mono/metadata/loader-internals.h b/mono/metadata/loader-internals.h
index d240f6a365..9d61ed4245 100644
--- a/mono/metadata/loader-internals.h
+++ b/mono/metadata/loader-internals.h
@@ -6,6 +6,7 @@
#define _MONO_METADATA_LOADER_INTERNALS_H_
#include
+#include
#include
#include
#include
@@ -48,12 +49,6 @@ mono_alc_assemblies_lock (MonoAssemblyLoadContext *alc);
void
mono_alc_assemblies_unlock (MonoAssemblyLoadContext *alc);
-static inline MonoDomain *
-mono_alc_domain (MonoAssemblyLoadContext *alc)
-{
- return alc->domain;
-}
-
gboolean
mono_alc_is_default (MonoAssemblyLoadContext *alc);
@@ -68,6 +63,16 @@ mono_alc_invoke_resolve_using_resolve_satellite_nofail (MonoAssemblyLoadContext
#endif /* ENABLE_NETCORE */
+static inline MonoDomain *
+mono_alc_domain (MonoAssemblyLoadContext *alc)
+{
+#ifdef ENABLE_NETCORE
+ return alc->domain;
+#else
+ return mono_domain_get ();
+#endif
+}
+
MonoLoadedImages *
mono_alc_get_loaded_images (MonoAssemblyLoadContext *alc);
diff --git a/mono/metadata/loader.c b/mono/metadata/loader.c
index 1d6624bfe4..baf724180f 100644
--- a/mono/metadata/loader.c
+++ b/mono/metadata/loader.c
@@ -405,11 +405,11 @@ find_method_in_class (MonoClass *klass, const char *name, const char *qname, con
continue;
method = mono_get_method_checked (klass_image, MONO_TOKEN_METHOD_DEF | (first_idx + i + 1), klass, NULL, error);
- if (!mono_error_ok (error)) //bail out if we hit a loader error
+ if (!is_ok (error)) //bail out if we hit a loader error
return NULL;
if (method) {
other_sig = mono_method_signature_checked (method, error);
- if (!mono_error_ok (error)) //bail out if we hit a loader error
+ if (!is_ok (error)) //bail out if we hit a loader error
return NULL;
if (other_sig && (sig->call_convention != MONO_CALL_VARARG) && mono_metadata_signature_equal (sig, other_sig))
return method;
@@ -445,7 +445,7 @@ find_method_in_class (MonoClass *klass, const char *name, const char *qname, con
(name && !strcmp (m->name, name))))
continue;
msig = mono_method_signature_checked (m, error);
- if (!mono_error_ok (error)) //bail out if we hit a loader error
+ if (!is_ok (error)) //bail out if we hit a loader error
return NULL;
if (!msig)
@@ -480,10 +480,10 @@ find_method (MonoClass *in_class, MonoClass *ic, const char* name, MonoMethodSig
if (ic) {
class_name = mono_type_get_name_full (m_class_get_byval_arg (ic), MONO_TYPE_NAME_FORMAT_IL);
- qname = g_strconcat (class_name, ".", name, NULL);
+ qname = g_strconcat (class_name, ".", name, (const char*)NULL);
const char *ic_name_space = m_class_get_name_space (ic);
if (ic_name_space && ic_name_space [0])
- fqname = g_strconcat (ic_name_space, ".", class_name, ".", name, NULL);
+ fqname = g_strconcat (ic_name_space, ".", class_name, ".", name, (const char*)NULL);
else
fqname = NULL;
} else
@@ -492,7 +492,7 @@ find_method (MonoClass *in_class, MonoClass *ic, const char* name, MonoMethodSig
while (in_class) {
g_assert (from_class);
result = find_method_in_class (in_class, name, qname, fqname, sig, from_class, error);
- if (result || !mono_error_ok (error))
+ if (result || !is_ok (error))
goto out;
if (name [0] == '.' && (!strcmp (name, ".ctor") || !strcmp (name, ".cctor")))
@@ -517,10 +517,10 @@ find_method (MonoClass *in_class, MonoClass *ic, const char* name, MonoMethodSig
char *ic_qname, *ic_fqname, *ic_class_name;
ic_class_name = mono_type_get_name_full (m_class_get_byval_arg (in_ic), MONO_TYPE_NAME_FORMAT_IL);
- ic_qname = g_strconcat (ic_class_name, ".", name, NULL);
+ ic_qname = g_strconcat (ic_class_name, ".", name, (const char*)NULL);
const char *in_ic_name_space = m_class_get_name_space (in_ic);
if (in_ic_name_space && in_ic_name_space [0])
- ic_fqname = g_strconcat (in_ic_name_space, ".", ic_class_name, ".", name, NULL);
+ ic_fqname = g_strconcat (in_ic_name_space, ".", ic_class_name, ".", name, (const char*)NULL);
else
ic_fqname = NULL;
@@ -528,7 +528,7 @@ find_method (MonoClass *in_class, MonoClass *ic, const char* name, MonoMethodSig
g_free (ic_class_name);
g_free (ic_fqname);
g_free (ic_qname);
- if (result || !mono_error_ok (error))
+ if (result || !is_ok (error))
goto out;
}
@@ -541,7 +541,7 @@ find_method (MonoClass *in_class, MonoClass *ic, const char* name, MonoMethodSig
result = find_method_in_class (mono_defaults.object_class, name, qname, fqname, sig, mono_defaults.object_class, error);
//we did not find the method
- if (!result && mono_error_ok (error))
+ if (!result && is_ok (error))
mono_error_set_method_missing (error, initial_class, name, sig, NULL);
out:
@@ -566,12 +566,12 @@ inflate_generic_signature_checked (MonoImage *image, MonoMethodSignature *sig, M
res->param_count = sig->param_count;
res->sentinelpos = -1;
res->ret = mono_class_inflate_generic_type_checked (sig->ret, context, error);
- if (!mono_error_ok (error))
+ if (!is_ok (error))
goto fail;
is_open = mono_class_is_open_constructed_type (res->ret);
for (i = 0; i < sig->param_count; ++i) {
res->params [i] = mono_class_inflate_generic_type_checked (sig->params [i], context, error);
- if (!mono_error_ok (error))
+ if (!is_ok (error))
goto fail;
if (!is_open)
@@ -609,7 +609,7 @@ mono_inflate_generic_signature (MonoMethodSignature *sig, MonoGenericContext *co
MonoMethodSignature *res, *cached;
res = inflate_generic_signature_checked (NULL, sig, context, error);
- if (!mono_error_ok (error))
+ if (!is_ok (error))
return NULL;
cached = mono_metadata_get_inflated_signature (res, context);
if (cached != res)
@@ -738,7 +738,7 @@ mono_method_get_signature_checked (MonoMethod *method, MonoImage *image, guint32
/* This signature is not owned by a MonoMethod, so need to cache */
sig = inflate_generic_signature_checked (image, sig, context, error);
- if (!mono_error_ok (error))
+ if (!is_ok (error))
return NULL;
cached = mono_metadata_get_inflated_signature (sig, context);
@@ -749,7 +749,7 @@ mono_method_get_signature_checked (MonoMethod *method, MonoImage *image, guint32
sig = cached;
}
- g_assert (mono_error_ok (error));
+ g_assert (is_ok (error));
return sig;
}
@@ -893,13 +893,13 @@ method_from_memberref (MonoImage *image, guint32 idx, MonoGenericContext *typesp
goto fail;
}
- if (!method && mono_error_ok (error))
+ if (!method && is_ok (error))
mono_error_set_method_missing (error, klass, mname, sig, "Failed to load due to unknown reasons");
return method;
fail:
- g_assert (!mono_error_ok (error));
+ g_assert (!is_ok (error));
return NULL;
}
@@ -936,7 +936,7 @@ method_from_methodspec (MonoImage *image, MonoGenericContext *context, guint32 i
if (context && inst->is_open) {
inst = mono_metadata_inflate_generic_inst (inst, context, error);
- if (!mono_error_ok (error))
+ if (!is_ok (error))
return NULL;
}
@@ -1768,23 +1768,23 @@ pinvoke_probe_for_symbol (MonoDl *module, MonoMethodPInvoke *piinfo, const char
case PINVOKE_ATTRIBUTE_CHAR_SET_UNICODE:
/* Try the mangled name first */
if (mangle_charset == 0)
- mangled_name = g_strconcat (import, "W", NULL);
+ mangled_name = g_strconcat (import, "W", (const char*)NULL);
break;
case PINVOKE_ATTRIBUTE_CHAR_SET_AUTO:
#ifdef HOST_WIN32
if (mangle_charset == 0)
- mangled_name = g_strconcat (import, "W", NULL);
+ mangled_name = g_strconcat (import, "W", (const char*)NULL);
#else
/* Try the mangled name last */
if (mangle_charset == 1)
- mangled_name = g_strconcat (import, "A", NULL);
+ mangled_name = g_strconcat (import, "A", (const char*)NULL);
#endif
break;
case PINVOKE_ATTRIBUTE_CHAR_SET_ANSI:
default:
/* Try the mangled name last */
if (mangle_charset == 1)
- mangled_name = g_strconcat (import, "A", NULL);
+ mangled_name = g_strconcat (import, "A", (const char*)NULL);
break;
}
@@ -2194,6 +2194,9 @@ mono_get_method_constrained_checked (MonoImage *image, guint32 token, MonoClass
void
mono_free_method (MonoMethod *method)
{
+ if (!method)
+ return;
+
MONO_PROFILER_RAISE (method_free, (method));
/* FIXME: This hack will go away when the profiler will support freeing methods */
@@ -2670,12 +2673,13 @@ mono_loader_unlock_if_inited (void)
}
/**
- * mono_method_signature_checked:
+ * mono_method_signature_checked_slow:
*
* Return the signature of the method M. On failure, returns NULL, and ERR is set.
+ * Call mono_method_signature_checked instead.
*/
MonoMethodSignature*
-mono_method_signature_checked (MonoMethod *m, MonoError *error)
+mono_method_signature_checked_slow (MonoMethod *m, MonoError *error)
{
int idx;
MonoImage* img;
@@ -2699,7 +2703,7 @@ mono_method_signature_checked (MonoMethod *m, MonoError *error)
/* the lock is recursive */
signature = mono_method_signature_internal (imethod->declaring);
signature = inflate_generic_signature_checked (m_class_get_image (imethod->declaring->klass), signature, mono_method_get_context (m), error);
- if (!mono_error_ok (error))
+ if (!is_ok (error))
return NULL;
mono_atomic_fetch_add_i32 (&inflated_signatures_size, mono_metadata_signature_size (signature));
@@ -2829,11 +2833,12 @@ mono_method_signature_checked (MonoMethod *m, MonoError *error)
}
/**
- * mono_method_signature_internal:
+ * mono_method_signature_internal_slow:
* \returns the signature of the method \p m. On failure, returns NULL.
+ * Call mono_method_signature_internal instead.
*/
MonoMethodSignature*
-mono_method_signature_internal (MonoMethod *m)
+mono_method_signature_internal_slow (MonoMethod *m)
{
ERROR_DECL (error);
MonoMethodSignature *sig = mono_method_signature_checked (m, error);
diff --git a/mono/metadata/marshal-ilgen.c.REMOVED.git-id b/mono/metadata/marshal-ilgen.c.REMOVED.git-id
index 794b05a37e..34d6a3ecc5 100644
--- a/mono/metadata/marshal-ilgen.c.REMOVED.git-id
+++ b/mono/metadata/marshal-ilgen.c.REMOVED.git-id
@@ -1 +1 @@
-ea90d87c4867a8666ada8acae9f8d44ef95a18b8
\ No newline at end of file
+e8516be2d4507b0bdff989d4bedc9c9f83f8b660
\ No newline at end of file
diff --git a/mono/metadata/marshal.c.REMOVED.git-id b/mono/metadata/marshal.c.REMOVED.git-id
index 4fb0d59b4d..5195c96e9a 100644
--- a/mono/metadata/marshal.c.REMOVED.git-id
+++ b/mono/metadata/marshal.c.REMOVED.git-id
@@ -1 +1 @@
-34722314579cbef967dc0d8a9c48fe7612688b62
\ No newline at end of file
+e6c326dbe7faf987800aa406b538ed08f344b5ad
\ No newline at end of file
diff --git a/mono/metadata/marshal.h b/mono/metadata/marshal.h
index dbfc07d17c..f19be3994d 100644
--- a/mono/metadata/marshal.h
+++ b/mono/metadata/marshal.h
@@ -131,7 +131,8 @@ typedef enum {
WRAPPER_SUBTYPE_GSHAREDVT_OUT_SIG,
WRAPPER_SUBTYPE_INTERP_IN,
WRAPPER_SUBTYPE_INTERP_LMF,
- WRAPPER_SUBTYPE_AOT_INIT
+ WRAPPER_SUBTYPE_AOT_INIT,
+ WRAPPER_SUBTYPE_LLVM_FUNC
} WrapperSubtype;
typedef struct {
@@ -224,6 +225,17 @@ typedef struct {
MonoAotInitSubtype subtype;
} AOTInitWrapperInfo;
+typedef enum {
+ LLVM_FUNC_WRAPPER_GC_POLL = 0
+} MonoLLVMFuncWrapperSubtype;
+
+typedef struct {
+ // We emit this code when we init the module,
+ // and later match up the native code with this method
+ // using the name.
+ MonoLLVMFuncWrapperSubtype subtype;
+} LLVMFuncWrapperInfo;
+
/*
* This structure contains additional information to uniquely identify a given wrapper
* method. It can be retrieved by mono_marshal_get_wrapper_info () for certain types
@@ -270,6 +282,8 @@ typedef struct {
InterpInWrapperInfo interp_in;
/* AOT_INIT */
AOTInitWrapperInfo aot_init;
+ /* LLVM_FUNC */
+ LLVMFuncWrapperInfo llvm_func;
} d;
} WrapperInfo;
@@ -441,6 +455,9 @@ mono_marshal_get_aot_init_wrapper (MonoAotInitSubtype subtype) MONO_LLVM_INTERNA
const char *
mono_marshal_get_aot_init_wrapper_name (MonoAotInitSubtype subtype) MONO_LLVM_INTERNAL;
+MonoMethod *
+mono_marshal_get_llvm_func_wrapper (MonoLLVMFuncWrapperSubtype subtype) MONO_LLVM_INTERNAL;
+
MonoMethod *
mono_marshal_get_native_wrapper (MonoMethod *method, gboolean check_exceptions, gboolean aot);
@@ -583,6 +600,10 @@ ICALL_EXPORT
guint32
ves_icall_System_Runtime_InteropServices_Marshal_GetLastWin32Error (void);
+ICALL_EXPORT
+void
+ves_icall_System_Runtime_InteropServices_Marshal_SetLastWin32Error (guint32 err);
+
ICALL_EXPORT
mono_bstr
ves_icall_System_Runtime_InteropServices_Marshal_BufferToBSTR (const gunichar2 *ptr, int len);
diff --git a/mono/metadata/metadata-internals.h b/mono/metadata/metadata-internals.h
index 840a6f8fdd..b033439c43 100644
--- a/mono/metadata/metadata-internals.h
+++ b/mono/metadata/metadata-internals.h
@@ -1184,9 +1184,26 @@ m_image_has_entry_point (MonoImage *image)
{
return image->storage ? image->storage->has_entry_point : FALSE;
}
-
#endif
+static inline const char *
+m_image_get_name (MonoImage *image)
+{
+ return image->name;
+}
+
+static inline const char *
+m_image_get_filename (MonoImage *image)
+{
+ return image->filename;
+}
+
+static inline const char *
+m_image_get_assembly_name (MonoImage *image)
+{
+ return image->assembly_name;
+}
+
static inline
MonoAssemblyLoadContext *
mono_image_get_alc (MonoImage *image)
@@ -1205,4 +1222,71 @@ mono_assembly_get_alc (MonoAssembly *assm)
return mono_image_get_alc (assm->image);
}
+/**
+ * mono_type_get_type_internal:
+ * \param type the \c MonoType operated on
+ * \returns the IL type value for \p type. This is one of the \c MonoTypeEnum
+ * enum members like \c MONO_TYPE_I4 or \c MONO_TYPE_STRING.
+ */
+static inline int
+mono_type_get_type_internal (MonoType *type)
+{
+ return type->type;
+}
+
+/**
+ * mono_type_get_signature:
+ * \param type the \c MonoType operated on
+ * It is only valid to call this function if \p type is a \c MONO_TYPE_FNPTR .
+ * \returns the \c MonoMethodSignature pointer that describes the signature
+ * of the function pointer \p type represents.
+ */
+static inline MonoMethodSignature*
+mono_type_get_signature_internal (MonoType *type)
+{
+ g_assert (type->type == MONO_TYPE_FNPTR);
+ return type->data.method;
+}
+
+/**
+ * mono_type_is_byref_internal:
+ * \param type the \c MonoType operated on
+ * \returns TRUE if \p type represents a type passed by reference,
+ * FALSE otherwise.
+ */
+static inline mono_bool
+mono_type_is_byref_internal (MonoType *type)
+{
+ return type->byref;
+}
+
+/**
+ * mono_type_get_class_internal:
+ * \param type the \c MonoType operated on
+ * It is only valid to call this function if \p type is a \c MONO_TYPE_CLASS or a
+ * \c MONO_TYPE_VALUETYPE . For more general functionality, use \c mono_class_from_mono_type_internal,
+ * instead.
+ * \returns the \c MonoClass pointer that describes the class that \p type represents.
+ */
+static inline MonoClass*
+mono_type_get_class_internal (MonoType *type)
+{
+ /* FIXME: review the runtime users before adding the assert here */
+ return type->data.klass;
+}
+
+/**
+ * mono_type_get_array_type_internal:
+ * \param type the \c MonoType operated on
+ * It is only valid to call this function if \p type is a \c MONO_TYPE_ARRAY .
+ * \returns a \c MonoArrayType struct describing the array type that \p type
+ * represents. The info includes details such as rank, array element type
+ * and the sizes and bounds of multidimensional arrays.
+ */
+static inline MonoArrayType*
+mono_type_get_array_type_internal (MonoType *type)
+{
+ return type->data.array;
+}
+
#endif /* __MONO_METADATA_INTERNALS_H__ */
diff --git a/mono/metadata/metadata-verify.c.REMOVED.git-id b/mono/metadata/metadata-verify.c.REMOVED.git-id
index 119f12326d..6751f6211c 100644
--- a/mono/metadata/metadata-verify.c.REMOVED.git-id
+++ b/mono/metadata/metadata-verify.c.REMOVED.git-id
@@ -1 +1 @@
-33fd435e147b5d88898cbd57fcd6b6662f549581
\ No newline at end of file
+eaa22e104ab56fffa436f746b74698386702e7f3
\ No newline at end of file
diff --git a/mono/metadata/metadata.c.REMOVED.git-id b/mono/metadata/metadata.c.REMOVED.git-id
index 79603af246..b0967ee7e7 100644
--- a/mono/metadata/metadata.c.REMOVED.git-id
+++ b/mono/metadata/metadata.c.REMOVED.git-id
@@ -1 +1 @@
-9f0c68953288205a96686e305f6f1068b4730cf1
\ No newline at end of file
+ecc4414cc92dc2f53d51365c34f4ae2e99f1c90e
\ No newline at end of file
diff --git a/mono/metadata/metadata.h b/mono/metadata/metadata.h
index 643cf4444b..f6646d6be2 100644
--- a/mono/metadata/metadata.h
+++ b/mono/metadata/metadata.h
@@ -337,18 +337,18 @@ typedef enum {
MONO_PARSE_FIELD
} MonoParseTypeMode;
-MONO_API mono_bool
+MONO_API MONO_RT_EXTERNAL_ONLY mono_bool
mono_type_is_byref (MonoType *type);
-MONO_API int
+MONO_API MONO_RT_EXTERNAL_ONLY int
mono_type_get_type (MonoType *type);
/* For MONO_TYPE_FNPTR */
-MONO_API MonoMethodSignature*
+MONO_API MONO_RT_EXTERNAL_ONLY MonoMethodSignature*
mono_type_get_signature (MonoType *type);
/* For MONO_TYPE_CLASS, VALUETYPE */
-MONO_API MonoClass*
+MONO_API MONO_RT_EXTERNAL_ONLY MonoClass*
mono_type_get_class (MonoType *type);
MONO_API MonoArrayType*
diff --git a/mono/metadata/monitor.c b/mono/metadata/monitor.c
index 8f0bcc1b93..f807b31c11 100644
--- a/mono/metadata/monitor.c
+++ b/mono/metadata/monitor.c
@@ -34,6 +34,7 @@
#include
#include
#include "external-only.h"
+#include "icall-decl.h"
/*
* Pull the list of opcodes
@@ -90,19 +91,19 @@ static int array_size = 16;
/* MonoThreadsSync status helpers */
-static inline guint32
+static guint32
mon_status_get_owner (guint32 status)
{
return status & OWNER_MASK;
}
-static inline guint32
+static guint32
mon_status_set_owner (guint32 status, guint32 owner)
{
return (status & ENTRY_COUNT_MASK) | owner;
}
-static inline gint32
+static gint32
mon_status_get_entry_count (guint32 status)
{
gint32 entry_count = (gint32)((status & ENTRY_COUNT_MASK) >> ENTRY_COUNT_SHIFT);
@@ -110,13 +111,13 @@ mon_status_get_entry_count (guint32 status)
return entry_count - zero;
}
-static inline guint32
+static guint32
mon_status_init_entry_count (guint32 status)
{
return (status & OWNER_MASK) | ENTRY_COUNT_ZERO;
}
-static inline guint32
+static guint32
mon_status_add_entry_count (guint32 status, int val)
{
if (val > 0)
@@ -125,7 +126,7 @@ mon_status_add_entry_count (guint32 status, int val)
return status - ((-val) << ENTRY_COUNT_SHIFT);
}
-static inline gboolean
+static gboolean
mon_status_have_waiters (guint32 status)
{
return status & ENTRY_COUNT_WAITERS;
@@ -133,26 +134,26 @@ mon_status_have_waiters (guint32 status)
/* LockWord helpers */
-static inline MonoThreadsSync*
+static MonoThreadsSync*
lock_word_get_inflated_lock (LockWord lw)
{
lw.lock_word &= (~LOCK_WORD_STATUS_MASK);
return lw.sync;
}
-static inline gboolean
+static gboolean
lock_word_is_inflated (LockWord lw)
{
return lw.lock_word & LOCK_WORD_INFLATED;
}
-static inline gboolean
+static gboolean
lock_word_has_hash (LockWord lw)
{
return lw.lock_word & LOCK_WORD_HAS_HASH;
}
-static inline LockWord
+static LockWord
lock_word_set_has_hash (LockWord lw)
{
LockWord nlw;
@@ -160,26 +161,26 @@ lock_word_set_has_hash (LockWord lw)
return nlw;
}
-static inline gboolean
+static gboolean
lock_word_is_free (LockWord lw)
{
return !lw.lock_word;
}
-static inline gboolean
+static gboolean
lock_word_is_flat (LockWord lw)
{
/* Return whether the lock is flat or free */
return (lw.lock_word & LOCK_WORD_STATUS_MASK) == LOCK_WORD_FLAT;
}
-static inline gint32
+static gint32
lock_word_get_hash (LockWord lw)
{
return (gint32) (lw.lock_word >> LOCK_WORD_HASH_SHIFT);
}
-static inline gint32
+static gint32
lock_word_get_nest (LockWord lw)
{
if (lock_word_is_free (lw))
@@ -188,39 +189,39 @@ lock_word_get_nest (LockWord lw)
return ((lw.lock_word & LOCK_WORD_NEST_MASK) >> LOCK_WORD_NEST_SHIFT) + 1;
}
-static inline gboolean
+static gboolean
lock_word_is_nested (LockWord lw)
{
return lw.lock_word & LOCK_WORD_NEST_MASK;
}
-static inline gboolean
+static gboolean
lock_word_is_max_nest (LockWord lw)
{
return (lw.lock_word & LOCK_WORD_NEST_MASK) == LOCK_WORD_NEST_MASK;
}
-static inline LockWord
+static LockWord
lock_word_increment_nest (LockWord lw)
{
lw.lock_word += 1 << LOCK_WORD_NEST_SHIFT;
return lw;
}
-static inline LockWord
+static LockWord
lock_word_decrement_nest (LockWord lw)
{
lw.lock_word -= 1 << LOCK_WORD_NEST_SHIFT;
return lw;
}
-static inline gint32
+static gint32
lock_word_get_owner (LockWord lw)
{
return lw.lock_word >> LOCK_WORD_OWNER_SHIFT;
}
-static inline LockWord
+static LockWord
lock_word_new_thin_hash (gint32 hash)
{
LockWord lw;
@@ -229,7 +230,7 @@ lock_word_new_thin_hash (gint32 hash)
return lw;
}
-static inline LockWord
+static LockWord
lock_word_new_inflated (MonoThreadsSync *mon)
{
LockWord lw;
@@ -238,7 +239,7 @@ lock_word_new_inflated (MonoThreadsSync *mon)
return lw;
}
-static inline LockWord
+static LockWord
lock_word_new_flat (gint32 owner)
{
LockWord lw;
@@ -561,6 +562,7 @@ int
mono_object_hash_internal (MonoObject* obj)
{
#ifdef HAVE_MOVING_COLLECTOR
+
LockWord lw;
unsigned int hash;
if (!obj)
@@ -619,13 +621,22 @@ mono_object_hash_internal (MonoObject* obj)
mono_memory_write_barrier ();
obj->synchronisation = lw.sync;
return hash;
+
#else
+
/*
* Wang's address-based hash function:
* http://www.concentric.net/~Ttwang/tech/addrhash.htm
*/
return (GPOINTER_TO_UINT (obj) >> MONO_OBJECT_ALIGNMENT_SHIFT) * 2654435761u;
#endif
+
+}
+
+int
+mono_object_hash_icall (MonoObjectHandle obj, MonoError* error)
+{
+ return mono_object_hash_internal (MONO_HANDLE_RAW (obj));
}
/*
@@ -637,6 +648,7 @@ mono_object_hash_internal (MonoObject* obj)
int
mono_object_hash (MonoObject* obj)
{
+ // FIXME slow?
MONO_EXTERNAL_ONLY (int, mono_object_hash_internal (obj));
}
@@ -782,7 +794,7 @@ signal_monitor (gpointer mon_untyped)
/* If allow_interruption==TRUE, the method will be interrupted if abort or suspend
* is requested. In this case it returns -1.
*/
-static inline gint32
+static gint32
mono_monitor_try_enter_inflated (MonoObject *obj, guint32 ms, gboolean allow_interruption, guint32 id)
{
LockWord lw;
@@ -969,7 +981,7 @@ retry_contended:
* If allow_interruption == TRUE, the method will be interrupted if abort or suspend
* is requested. In this case it returns -1.
*/
-static inline gint32
+static gint32
mono_monitor_try_enter_internal (MonoObject *obj, guint32 ms, gboolean allow_interruption)
{
LockWord lw;
@@ -1062,6 +1074,7 @@ mono_monitor_enter_internal (MonoObject *obj)
gboolean
mono_monitor_enter (MonoObject *obj)
{
+ // FIXME slow?
MONO_EXTERNAL_ONLY (gboolean, mono_monitor_enter_internal (obj));
}
@@ -1117,6 +1130,12 @@ mono_monitor_exit_internal (MonoObject *obj)
mono_monitor_exit_flat (obj, lw);
}
+void
+mono_monitor_exit_icall (MonoObjectHandle obj, MonoError* error)
+{
+ mono_monitor_exit_internal (MONO_HANDLE_RAW (obj));
+}
+
/**
* mono_monitor_exit:
*/
@@ -1159,24 +1178,38 @@ mono_monitor_threads_sync_members_offset (int *status_offset, int *nest_offset)
*nest_offset = ENCODE_OFF_SIZE (MONO_STRUCT_OFFSET (MonoThreadsSync, nest), sizeof (ts.nest));
}
-void
-ves_icall_System_Threading_Monitor_Monitor_try_enter_with_atomic_var (MonoObject *obj, guint32 ms, MonoBoolean *lockTaken)
+static void
+mono_monitor_try_enter_with_atomic_var (MonoObject *obj, guint32 ms, MonoBoolean *lockTaken, MonoError* error)
{
+ // The use of error here is unusual, but expedient, and easy enough to understand.
+ // Maybe clean it up later.
+
gint32 res;
gboolean allow_interruption = TRUE;
+
if (G_UNLIKELY (!obj)) {
- ERROR_DECL (error);
- mono_error_set_argument_null (error, "obj", "");
- mono_error_set_pending_exception (error);
+ if (error) {
+ mono_error_set_argument_null (error, "obj", "");
+ } else {
+ ERROR_DECL (error);
+ mono_error_set_argument_null (error, "obj", "");
+ mono_error_set_pending_exception (error);
+ }
return;
}
+
do {
res = mono_monitor_try_enter_internal (obj, ms, allow_interruption);
/*This means we got interrupted during the wait and didn't got the monitor.*/
if (res == -1) {
MonoException *exc = mono_thread_interruption_checkpoint ();
if (exc) {
- mono_set_pending_exception (exc);
+ if (error) { // implies icall and coop handle frame -- a little gross
+ MONO_HANDLE_NEW (MonoException, exc);
+ mono_error_set_exception_instance (error, exc);
+ } else {
+ mono_set_pending_exception (exc);
+ }
return;
} else {
//we detected a pending interruption but it turned out to be a false positive, we ignore it from now on (this feels like a hack, right?, threads.c should give us less confusing directions)
@@ -1184,10 +1217,17 @@ ves_icall_System_Threading_Monitor_Monitor_try_enter_with_atomic_var (MonoObject
}
}
} while (res == -1);
+
/*It's safe to do it from here since interruption would happen only on the wrapper.*/
*lockTaken = res == 1;
}
+void
+ves_icall_System_Threading_Monitor_Monitor_try_enter_with_atomic_var (MonoObjectHandle obj, guint32 ms, MonoBoolean* lockTaken, MonoError* error)
+{
+ mono_monitor_try_enter_with_atomic_var (MONO_HANDLE_RAW (obj), ms, lockTaken, error);
+}
+
/**
* mono_monitor_enter_v4:
*/
@@ -1195,7 +1235,7 @@ void
mono_monitor_enter_v4 (MonoObject *obj, char *lock_taken)
{
g_static_assert (sizeof (MonoBoolean) == 1);
- mono_monitor_enter_v4_internal (obj, (MonoBoolean*)lock_taken);
+ mono_monitor_enter_v4_internal (obj, (MonoBoolean*)lock_taken);
}
/* Called from JITted code */
@@ -1208,8 +1248,7 @@ mono_monitor_enter_v4_internal (MonoObject *obj, MonoBoolean *lock_taken)
mono_error_set_pending_exception (error);
return;
}
-
- ves_icall_System_Threading_Monitor_Monitor_try_enter_with_atomic_var (obj, MONO_INFINITE_WAIT, lock_taken);
+ mono_monitor_try_enter_with_atomic_var (obj, MONO_INFINITE_WAIT, lock_taken, NULL);
}
/*
@@ -1223,18 +1262,19 @@ mono_monitor_enter_v4_internal (MonoObject *obj, MonoBoolean *lock_taken)
guint32
mono_monitor_enter_v4_fast (MonoObject *obj, MonoBoolean *lock_taken)
{
- if (*lock_taken == 1)
+ if (*lock_taken == 1 || G_UNLIKELY (!obj))
return FALSE;
- if (G_UNLIKELY (!obj))
- return FALSE;
- gint32 res = mono_monitor_try_enter_internal (obj, 0, TRUE);
- *lock_taken = res == 1;
- return res == 1;
+
+ gboolean const res = mono_monitor_try_enter_internal (obj, 0, TRUE) == 1;
+ *lock_taken = (MonoBoolean)res;
+ return (guint32)res;
}
MonoBoolean
-ves_icall_System_Threading_Monitor_Monitor_test_owner (MonoObject *obj)
+ves_icall_System_Threading_Monitor_Monitor_test_owner (MonoObjectHandle obj_handle, MonoError* error)
{
+ MonoObject* const obj = MONO_HANDLE_RAW (obj_handle);
+
LockWord lw;
LOCK_DEBUG (g_message ("%s: Testing if %p is owned by thread %d", __func__, obj, mono_thread_info_get_small_id()));
@@ -1247,12 +1287,14 @@ ves_icall_System_Threading_Monitor_Monitor_test_owner (MonoObject *obj)
return mon_status_get_owner (lock_word_get_inflated_lock (lw)->status) == mono_thread_info_get_small_id ();
}
- return(FALSE);
+ return FALSE;
}
MonoBoolean
-ves_icall_System_Threading_Monitor_Monitor_test_synchronised (MonoObject *obj)
+ves_icall_System_Threading_Monitor_Monitor_test_synchronised (MonoObjectHandle obj_handle, MonoError* error)
{
+ MonoObject* const obj = MONO_HANDLE_RAW (obj_handle);
+
LockWord lw;
LOCK_DEBUG (g_message("%s: (%d) Testing if %p is owned by any thread", __func__, mono_thread_info_get_small_id (), obj));
@@ -1307,20 +1349,22 @@ mono_monitor_pulse (MonoObject *obj, const char *func, gboolean all)
}
void
-ves_icall_System_Threading_Monitor_Monitor_pulse (MonoObject *obj)
+ves_icall_System_Threading_Monitor_Monitor_pulse (MonoObjectHandle obj, MonoError* error)
{
- mono_monitor_pulse (obj, __func__, FALSE);
+ mono_monitor_pulse (MONO_HANDLE_RAW (obj), __func__, FALSE);
}
void
-ves_icall_System_Threading_Monitor_Monitor_pulse_all (MonoObject *obj)
+ves_icall_System_Threading_Monitor_Monitor_pulse_all (MonoObjectHandle obj, MonoError* error)
{
- mono_monitor_pulse (obj, __func__, TRUE);
+ mono_monitor_pulse (MONO_HANDLE_RAW (obj), __func__, TRUE);
}
MonoBoolean
-ves_icall_System_Threading_Monitor_Monitor_wait (MonoObject *obj, guint32 ms)
+ves_icall_System_Threading_Monitor_Monitor_wait (MonoObjectHandle obj_handle, guint32 ms, MonoError* error)
{
+ MonoObject* const obj = MONO_HANDLE_RAW (obj_handle);
+
LockWord lw;
MonoThreadsSync *mon;
HANDLE event;
@@ -1434,7 +1478,19 @@ ves_icall_System_Threading_Monitor_Monitor_wait (MonoObject *obj, guint32 ms)
}
void
-ves_icall_System_Threading_Monitor_Monitor_Enter (MonoObject *obj)
+ves_icall_System_Threading_Monitor_Monitor_Enter (MonoObjectHandle obj, MonoError* error)
{
- mono_monitor_enter_internal (obj);
+ mono_monitor_enter_internal (MONO_HANDLE_RAW (obj));
}
+
+#if ENABLE_NETCORE
+gint64
+ves_icall_System_Threading_Monitor_Monitor_LockContentionCount (void)
+{
+#ifndef DISABLE_PERFCOUNTERS
+ return mono_perfcounters->thread_contentions;
+#else
+ return 0;
+#endif
+}
+#endif
\ No newline at end of file
diff --git a/mono/metadata/monitor.h b/mono/metadata/monitor.h
index 76322c41d9..8646a58c03 100644
--- a/mono/metadata/monitor.h
+++ b/mono/metadata/monitor.h
@@ -126,32 +126,10 @@ mono_monitor_threads_sync_members_offset (int *status_offset, int *nest_offset);
#define MONO_THREADS_SYNC_MEMBER_OFFSET(o) ((o)>>8)
#define MONO_THREADS_SYNC_MEMBER_SIZE(o) ((o)&0xff)
+#if ENABLE_NETCORE
ICALL_EXPORT
-MonoBoolean
-ves_icall_System_Threading_Monitor_Monitor_test_owner (MonoObject *obj);
-
-ICALL_EXPORT
-MonoBoolean
-ves_icall_System_Threading_Monitor_Monitor_test_synchronised (MonoObject *obj);
-
-ICALL_EXPORT
-void
-ves_icall_System_Threading_Monitor_Monitor_pulse (MonoObject *obj);
-
-ICALL_EXPORT
-void
-ves_icall_System_Threading_Monitor_Monitor_pulse_all (MonoObject *obj);
-
-ICALL_EXPORT
-MonoBoolean
-ves_icall_System_Threading_Monitor_Monitor_wait (MonoObject *obj, guint32 ms);
-
-ICALL_EXPORT
-void
-ves_icall_System_Threading_Monitor_Monitor_try_enter_with_atomic_var (MonoObject *obj, guint32 ms, MonoBoolean *lockTaken);
-
-ICALL_EXPORT
-void
-ves_icall_System_Threading_Monitor_Monitor_Enter (MonoObject *obj);
+gint64
+ves_icall_System_Threading_Monitor_Monitor_LockContentionCount (void);
+#endif
#endif /* _MONO_METADATA_MONITOR_H_ */
diff --git a/mono/metadata/mono-basic-block.c b/mono/metadata/mono-basic-block.c
index a19d445fe8..6dd0a679fe 100644
--- a/mono/metadata/mono-basic-block.c
+++ b/mono/metadata/mono-basic-block.c
@@ -543,11 +543,11 @@ mono_basic_block_split (MonoMethod *method, MonoError *error, MonoMethodHeader *
root = bb;
bb_formation_il_pass (start, end, bb, &root, method, error);
- if (!mono_error_ok (error))
+ if (!is_ok (error))
goto fail;
bb_formation_eh_pass (header, bb, &root, method, error);
- if (!mono_error_ok (error))
+ if (!is_ok (error))
goto fail;
bb_liveness (bb);
diff --git a/mono/metadata/mono-conc-hash.c b/mono/metadata/mono-conc-hash.c
index cd13110d31..f0bdcc4002 100644
--- a/mono/metadata/mono-conc-hash.c
+++ b/mono/metadata/mono-conc-hash.c
@@ -108,7 +108,7 @@ mix_hash (int hash)
}
-static inline void
+static void
set_key (conc_table *table, int slot, gpointer key)
{
gpointer *key_addr = &table->keys [slot];
@@ -118,7 +118,7 @@ set_key (conc_table *table, int slot, gpointer key)
*key_addr = key;
}
-static inline void
+static void
set_key_to_tombstone (conc_table *table, int slot)
{
gpointer *key_addr = &table->keys [slot];
@@ -128,7 +128,7 @@ set_key_to_tombstone (conc_table *table, int slot)
*key_addr = PTR_TOMBSTONE;
}
-static inline void
+static void
set_value (conc_table *table, int slot, gpointer value)
{
gpointer *value_addr = &table->values [slot];
diff --git a/mono/metadata/mono-config.c b/mono/metadata/mono-config.c
index 287fa2afc0..aa9e554aea 100644
--- a/mono/metadata/mono-config.c
+++ b/mono/metadata/mono-config.c
@@ -637,13 +637,13 @@ mono_config_for_assembly_internal (MonoImage *assembly)
}
for (i = 0; (aname = get_assembly_filename (assembly, i)) != NULL; ++i) {
- cfg = g_build_filename (cfg_dir, "mono", "assemblies", aname, cfg_name, NULL);
+ cfg = g_build_filename (cfg_dir, "mono", "assemblies", aname, cfg_name, (const char*)NULL);
got_it += mono_config_parse_file_with_context (&state, cfg);
g_free (cfg);
#ifdef TARGET_WIN32
const char *home = g_get_home_dir ();
- cfg = g_build_filename (home, ".mono", "assemblies", aname, cfg_name, NULL);
+ cfg = g_build_filename (home, ".mono", "assemblies", aname, cfg_name, (const char*)NULL);
got_it += mono_config_parse_file_with_context (&state, cfg);
g_free (cfg);
#endif
@@ -676,14 +676,14 @@ mono_config_parse (const char *filename)
const char *cfg_dir = mono_get_config_dir ();
if (cfg_dir) {
- char *mono_cfg = g_build_filename (cfg_dir, "mono", "config", (const char *)NULL);
+ char *mono_cfg = g_build_filename (cfg_dir, "mono", "config", (const char*)NULL);
mono_config_parse_file (mono_cfg);
g_free (mono_cfg);
}
#if !defined(TARGET_WIN32)
home = g_get_home_dir ();
- char *user_cfg = g_strconcat (home, G_DIR_SEPARATOR_S, ".mono/config", (const char *)NULL);
+ char *user_cfg = g_strconcat (home, G_DIR_SEPARATOR_S, ".mono/config", (const char*)NULL);
mono_config_parse_file (user_cfg);
g_free (user_cfg);
#endif
diff --git a/mono/metadata/mono-debug.c b/mono/metadata/mono-debug.c
index 295afda66b..da69c5ab33 100644
--- a/mono/metadata/mono-debug.c
+++ b/mono/metadata/mono-debug.c
@@ -66,11 +66,11 @@ static gboolean is_attached = FALSE;
static MonoDebugHandle *mono_debug_open_image (MonoImage *image, const guint8 *raw_contents, int size);
static MonoDebugHandle *mono_debug_get_image (MonoImage *image);
-static void add_assembly (MonoAssembly *assembly, gpointer user_data);
+static void add_assembly (MonoAssemblyLoadContext *alc, MonoAssembly *assembly, gpointer user_data, MonoError *error);
static MonoDebugHandle *open_symfile_from_bundle (MonoImage *image);
-static inline DebugDomainInfo*
+static DebugDomainInfo*
get_domain_info (MonoDomain *domain)
{
g_assert (domain->debug_info);
@@ -114,7 +114,7 @@ mono_debug_init (MonoDebugFormat format)
mono_debug_handles = g_hash_table_new_full
(NULL, NULL, NULL, (GDestroyNotify) free_debug_handle);
- mono_install_assembly_load_hook (add_assembly, NULL);
+ mono_install_assembly_load_hook_v2 (add_assembly, NULL);
mono_debugger_unlock ();
}
@@ -245,7 +245,7 @@ mono_debug_open_image (MonoImage *image, const guint8 *raw_contents, int size)
}
static void
-add_assembly (MonoAssembly *assembly, gpointer user_data)
+add_assembly (MonoAssemblyLoadContext *alc, MonoAssembly *assembly, gpointer user_data, MonoError *error)
{
MonoDebugHandle *handle;
MonoImage *image;
@@ -351,7 +351,7 @@ mono_debug_image_has_debug_info (MonoImage *image)
return data.found;
}
-static inline void
+static void
write_leb128 (guint32 value, guint8 *ptr, guint8 **rptr)
{
do {
@@ -365,7 +365,7 @@ write_leb128 (guint32 value, guint8 *ptr, guint8 **rptr)
*rptr = ptr;
}
-static inline void
+static void
write_sleb128 (gint32 value, guint8 *ptr, guint8 **rptr)
{
gboolean more = 1;
@@ -526,7 +526,7 @@ mono_debug_add_delegate_trampoline (gpointer code, int size)
{
}
-static inline guint32
+static guint32
read_leb128 (guint8 *ptr, guint8 **rptr)
{
guint32 result = 0, shift = 0;
@@ -544,7 +544,7 @@ read_leb128 (guint8 *ptr, guint8 **rptr)
return result;
}
-static inline gint32
+static gint32
read_sleb128 (guint8 *ptr, guint8 **rptr)
{
gint32 result = 0;
diff --git a/mono/metadata/mono-endian.h b/mono/metadata/mono-endian.h
index 8704dc5959..6fdd09cc7c 100644
--- a/mono/metadata/mono-endian.h
+++ b/mono/metadata/mono-endian.h
@@ -20,43 +20,9 @@ typedef union {
#if defined(__s390x__)
-#define read16(x) s390x_read16(*(guint16 *)(x))
-#define read32(x) s390x_read32(*(guint32 *)(x))
-#define read64(x) s390x_read64(*(guint64 *)(x))
-
-static __inline__ guint16
-s390x_read16(guint16 x)
-{
- guint16 ret;
-
- __asm__ (" lrvr %0,%1\n"
- " sra %0,16\n"
- : "=r" (ret) : "r" (x));
-
- return(ret);
-}
-
-static __inline__ guint32
-s390x_read32(guint32 x)
-{
- guint32 ret;
-
- __asm__ (" lrvr %0,%1\n"
- : "=r" (ret) : "r" (x));
-
- return(ret);
-}
-
-static __inline__ guint64
-s390x_read64(guint64 x)
-{
- guint64 ret;
-
- __asm__ (" lrvgr %0,%1\n"
- : "=r" (ret) : "r" (x));
-
- return(ret);
-}
+#define read16(x) __builtin_bswap16(*((guint16 *)(x)))
+#define read32(x) __builtin_bswap32(*((guint32 *)(x)))
+#define read64(x) __builtin_bswap64(*((guint64 *)(x)))
#else
diff --git a/mono/metadata/mono-gc.h b/mono/metadata/mono-gc.h
index 247e32eaab..86111ac345 100644
--- a/mono/metadata/mono-gc.h
+++ b/mono/metadata/mono-gc.h
@@ -96,6 +96,10 @@ typedef enum {
* Roots in the ephemeron arrays. This is a pseudo-root.
*/
MONO_ROOT_SOURCE_EPHEMERON = 15,
+ /**
+ * Roots in the toggleref arrays. This is a pseudo-root.
+ */
+ MONO_ROOT_SOURCE_TOGGLEREF = 16,
} MonoGCRootSource;
typedef enum {
diff --git a/mono/metadata/mono-hash.c b/mono/metadata/mono-hash.c
index 0323f012c4..8fa9d26dcf 100644
--- a/mono/metadata/mono-hash.c
+++ b/mono/metadata/mono-hash.c
@@ -91,7 +91,7 @@ calc_prime (int x)
/* We triple the table size at rehash time, similar with previous implementation */
#define HASH_TABLE_RESIZE_RATIO 3
-static inline void mono_g_hash_table_key_store (MonoGHashTable *hash, int slot, MonoObject* key)
+static void mono_g_hash_table_key_store (MonoGHashTable *hash, int slot, MonoObject* key)
{
MonoObject **key_addr = &hash->keys [slot];
if (hash->gc_type & MONO_HASH_KEY_GC)
@@ -100,7 +100,7 @@ static inline void mono_g_hash_table_key_store (MonoGHashTable *hash, int slot,
*key_addr = key;
}
-static inline void mono_g_hash_table_value_store (MonoGHashTable *hash, int slot, MonoObject* value)
+static void mono_g_hash_table_value_store (MonoGHashTable *hash, int slot, MonoObject* value)
{
MonoObject **value_addr = &hash->values [slot];
if (hash->gc_type & MONO_HASH_VALUE_GC)
@@ -110,7 +110,7 @@ static inline void mono_g_hash_table_value_store (MonoGHashTable *hash, int slot
}
/* Returns position of key or of an empty slot for it */
-static inline int mono_g_hash_table_find_slot (MonoGHashTable *hash, const MonoObject *key)
+static int mono_g_hash_table_find_slot (MonoGHashTable *hash, const MonoObject *key)
{
guint start = ((*hash->hash_func) (key)) % hash->table_size;
guint i = start;
diff --git a/mono/metadata/mono-perfcounters.c b/mono/metadata/mono-perfcounters.c
index 2970e083dc..569f2cbcb9 100644
--- a/mono/metadata/mono-perfcounters.c
+++ b/mono/metadata/mono-perfcounters.c
@@ -1946,6 +1946,8 @@ mono_perfcounter_foreach (PerfCounterEnumCallback cb, gpointer data)
#else
+#ifndef ENABLE_NETCORE
+
void*
mono_perfcounter_get_impl (const gunichar2 *category, gint32 category_length,
const gunichar2 *counter, gint32 counter_length,
@@ -2025,4 +2027,12 @@ mono_perfcounter_instance_names (const gunichar2 *category, gint32 category_leng
g_assert_not_reached ();
}
+#endif /* ENABLE_NETCORE */
+
+void
+mono_perfcounter_foreach (PerfCounterEnumCallback cb, gpointer data)
+{
+ g_assert_not_reached ();
+}
+
#endif
diff --git a/mono/metadata/mono-ptr-array.h b/mono/metadata/mono-ptr-array.h
index 70694eff8f..b0c612258a 100644
--- a/mono/metadata/mono-ptr-array.h
+++ b/mono/metadata/mono-ptr-array.h
@@ -60,7 +60,7 @@ typedef struct {
} while (0)
#define mono_ptr_array_sort(ARRAY, COMPARE_FUNC) do { \
- qsort ((ARRAY).data, (ARRAY).size, sizeof (gpointer), (COMPARE_FUNC)); \
+ mono_qsort ((ARRAY).data, (ARRAY).size, sizeof (gpointer), (COMPARE_FUNC)); \
} while (0)
#define mono_ptr_array_set(ARRAY, IDX, VALUE) do { \
diff --git a/mono/metadata/mono-route.c b/mono/metadata/mono-route.c
index defd245c59..e07991be24 100644
--- a/mono/metadata/mono-route.c
+++ b/mono/metadata/mono-route.c
@@ -7,12 +7,12 @@
* Ben Woods (woodsb02@gmail.com)
*/
-#include
+#include "config.h"
-#include
-#include
+#ifndef ENABLE_NETCORE
+#if HOST_DARWIN || HOST_BSD
-#if defined(HOST_DARWIN) || defined(HOST_BSD)
+#include
#include
#include