Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
iskiselev committed Mar 25, 2016
2 parents c86bcab + 25c1a4d commit 570e6b2
Show file tree
Hide file tree
Showing 14 changed files with 52 additions and 18 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: csharp
solution: JSIL.sln

before_install:
- git submodule update --init --recursive
- wget -P /tmp/ -N https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/jsshell-linux-x86_64.zip
- unzip -d /tmp/js /tmp/jsshell-linux-x86_64.zip
- export PATH=$PATH:/tmp/js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<Project>{984CC812-9470-4A13-AFF9-CC44068D666C}</Project>
<Name>ICSharpCode.Decompiler</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Upstream\ILSpy\Mono.Cecil\Mono.Cecil.csproj">
<ProjectReference Include="..\..\..\Upstream\ILSpy\cecil\Mono.Cecil.csproj">
<Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
<Name>Mono.Cecil</Name>
</ProjectReference>
Expand Down
2 changes: 1 addition & 1 deletion Compiler/Compiler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<Project>{DA03D241-B70C-44D7-A465-3CEB5A9416AE}</Project>
<Name>JSIL</Name>
</ProjectReference>
<ProjectReference Include="..\Upstream\ILSpy\Mono.Cecil\Mono.Cecil.csproj">
<ProjectReference Include="..\Upstream\ILSpy\cecil\Mono.Cecil.csproj">
<Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
<Name>Mono.Cecil</Name>
</ProjectReference>
Expand Down
2 changes: 1 addition & 1 deletion JSIL.Compiler.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>JSIL.Compiler</id>
<version>0.0.20160325.1430</version>
<version>0.0.20160325.1440</version>
<authors>Igor Kiselev</authors>
<description>JSIL compiler</description>
<language>en-US</language>
Expand Down
6 changes: 3 additions & 3 deletions JSIL.sln
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Decompiler", "U
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory", "Upstream\ILSpy\NRefactory\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj", "{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil", "Upstream\ILSpy\Mono.Cecil\Mono.Cecil.csproj", "{D68133BD-1E63-496E-9EDE-4FBDBF77B486}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil", "Upstream\ILSpy\cecil\Mono.Cecil.csproj", "{D68133BD-1E63-496E-9EDE-4FBDBF77B486}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Meta", "Meta\Meta.csproj", "{37C67C73-1F58-49B8-A39E-768AC88C2447}"
EndProject
Expand All @@ -34,11 +34,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleTests", "Tests\SimpleTests.csproj", "{2DBBCB24-54AD-4C66-B7D6-911811CEB186}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil.Pdb", "Upstream\ILSpy\Mono.Cecil\symbols\pdb\Mono.Cecil.Pdb.csproj", "{63E6915C-7EA4-4D76-AB28-0D7191EEA626}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil.Pdb", "Upstream\ILSpy\cecil\symbols\pdb\Mono.Cecil.Pdb.csproj", "{63E6915C-7EA4-4D76-AB28-0D7191EEA626}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Proxies.XNA4", "Proxies\XNA4\Proxies.XNA4.csproj", "{6F32441A-1C9A-4678-8ABC-CBD35ACBD3EC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil.Mdb", "Upstream\ILSpy\Mono.Cecil\symbols\mdb\Mono.Cecil.Mdb.csproj", "{8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil.Mdb", "Upstream\ILSpy\cecil\symbols\mdb\Mono.Cecil.Mdb.csproj", "{8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory.CSharp", "Upstream\ILSpy\NRefactory\ICSharpCode.NRefactory.CSharp\ICSharpCode.NRefactory.CSharp.csproj", "{53DCA265-3C3C-42F9-B647-F72BA678122B}"
EndProject
Expand Down
39 changes: 37 additions & 2 deletions JSIL/CILSupport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ public class AssemblyResolver : BaseAssemblyResolver, IDisposable {
25, 52, 224, 137
};

private readonly object _syncRoot = new object();
private readonly List<string> _directories = new List<string>();

protected readonly Configuration Configuration;
protected readonly AssemblyCache Cache;
protected readonly bool OwnsCache;
Expand All @@ -101,6 +104,34 @@ public void Dispose () {
Cache.Dispose();
}

public new void AddSearchDirectory(string directory)
{
lock (_syncRoot)
{
if (_directories.Contains(directory))
return;
_directories.Add(directory);
base.AddSearchDirectory(directory);
}
}

public new void RemoveSearchDirectory(string directory)
{
lock (_syncRoot)
{
_directories.Remove(directory);
base.RemoveSearchDirectory(directory);
}
}

public new string[] GetSearchDirectories()
{
lock (_syncRoot)
{
return base.GetSearchDirectories();
}
}

public AssemblyNameReference FilterPortableClassLibraryReferences (AssemblyNameReference name) {
// Portable class libraries are pretty shoddily constructed. Who came up with this nonsense?

Expand Down Expand Up @@ -141,8 +172,12 @@ public override AssemblyDefinition Resolve (AssemblyNameReference name, ReaderPa
string redirectedFrom;
actualName = FilterRedirectedReferences(name, out redirectedFrom);

var result = Cache.GetOrCreate(actualName.FullName, (fullName) => {
var assembly = base.Resolve(actualName, parameters);
var result = Cache.GetOrCreate(actualName.FullName, (fullName) =>
{
AssemblyDefinition assembly;
lock (_syncRoot)
assembly = base.Resolve(actualName, parameters);

if (redirectedFrom != null)
Console.Error.WriteLine("// Redirected '{0}' to '{1}'", redirectedFrom, actualName.FullName);

Expand Down
6 changes: 3 additions & 3 deletions JSIL/JSIL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@
<Project>{984CC812-9470-4A13-AFF9-CC44068D666C}</Project>
<Name>ICSharpCode.Decompiler</Name>
</ProjectReference>
<ProjectReference Include="..\Upstream\ILSpy\Mono.Cecil\Mono.Cecil.csproj">
<ProjectReference Include="..\Upstream\ILSpy\cecil\Mono.Cecil.csproj">
<Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
<Name>Mono.Cecil</Name>
</ProjectReference>
<ProjectReference Include="..\Upstream\ILSpy\Mono.Cecil\symbols\mdb\Mono.Cecil.Mdb.csproj">
<ProjectReference Include="..\Upstream\ILSpy\cecil\symbols\mdb\Mono.Cecil.Mdb.csproj">
<Project>{8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}</Project>
<Name>Mono.Cecil.Mdb</Name>
</ProjectReference>
<ProjectReference Include="..\Upstream\ILSpy\Mono.Cecil\symbols\pdb\Mono.Cecil.Pdb.csproj">
<ProjectReference Include="..\Upstream\ILSpy\cecil\symbols\pdb\Mono.Cecil.Pdb.csproj">
<Project>{63E6915C-7EA4-4D76-AB28-0D7191EEA626}</Project>
<Name>Mono.Cecil.Pdb</Name>
</ProjectReference>
Expand Down
1 change: 0 additions & 1 deletion JSIL/MethodSignature.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Collections;
using System.Collections.Concurrent;
using Mono.CSharp;
#pragma warning disable 0420
using System;
using System.Collections.Generic;
Expand Down
1 change: 0 additions & 1 deletion JSIL/TypeUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using JSIL.Ast;
using JSIL.Internal;
using Mono.Cecil;
using Mono.CSharp;
using TypeDefinition = Mono.Cecil.TypeDefinition;

namespace JSIL {
Expand Down
2 changes: 1 addition & 1 deletion Tests.DCE/Tests.DCE.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<Project>{2dbbcb24-54ad-4c66-b7d6-911811ceb185}</Project>
<Name>Tests</Name>
</ProjectReference>
<ProjectReference Include="..\Upstream\ILSpy\Mono.Cecil\Mono.Cecil.csproj">
<ProjectReference Include="..\Upstream\ILSpy\cecil\Mono.Cecil.csproj">
<Project>{d68133bd-1e63-496e-9ede-4fbdbf77b486}</Project>
<Name>Mono.Cecil</Name>
</ProjectReference>
Expand Down
2 changes: 1 addition & 1 deletion Tests/SimpleTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@
<Project>{984CC812-9470-4A13-AFF9-CC44068D666C}</Project>
<Name>ICSharpCode.Decompiler</Name>
</ProjectReference>
<ProjectReference Include="..\Upstream\ILSpy\Mono.Cecil\Mono.Cecil.csproj">
<ProjectReference Include="..\Upstream\ILSpy\cecil\Mono.Cecil.csproj">
<Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
<Name>Mono.Cecil</Name>
</ProjectReference>
Expand Down
2 changes: 1 addition & 1 deletion Tests/Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@
<Project>{984CC812-9470-4A13-AFF9-CC44068D666C}</Project>
<Name>ICSharpCode.Decompiler</Name>
</ProjectReference>
<ProjectReference Include="..\Upstream\ILSpy\Mono.Cecil\Mono.Cecil.csproj">
<ProjectReference Include="..\Upstream\ILSpy\cecil\Mono.Cecil.csproj">
<Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
<Name>Mono.Cecil</Name>
</ProjectReference>
Expand Down
2 changes: 1 addition & 1 deletion Try/Try.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<Project>{12DBCC9A-50FE-43B1-BAD1-8029D4AD60C9}</Project>
<Name>Proxies.4.0</Name>
</ProjectReference>
<ProjectReference Include="..\Upstream\ILSpy\Mono.Cecil\Mono.Cecil.csproj">
<ProjectReference Include="..\Upstream\ILSpy\cecil\Mono.Cecil.csproj">
<Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
<Name>Mono.Cecil</Name>
</ProjectReference>
Expand Down
2 changes: 1 addition & 1 deletion Upstream/ILSpy
Submodule ILSpy updated from 244f5d to 2a9fb7

0 comments on commit 570e6b2

Please sign in to comment.