From 17ad27bfacc5d6ac463c27a5045e0ce37bdd585b Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Tue, 24 May 2011 17:22:29 +0200 Subject: [PATCH] Use AnyCPU config for BamlDecompiler.Plugin. Support 'unbox' opcode in type analysis. --- ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs | 2 ++ ILSpy.sln | 10 +++++----- TestPlugin/TestPlugin.csproj | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs b/ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs index 3c5c47bf6..3667bc895 100644 --- a/ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs +++ b/ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs @@ -681,6 +681,8 @@ namespace ICSharpCode.Decompiler.ILAst case ILCode.Castclass: case ILCode.Unbox_Any: return (TypeReference)expr.Operand; + case ILCode.Unbox: + return new ByReferenceType((TypeReference)expr.Operand); case ILCode.Isinst: { // isinst performs the equivalent of a cast only for reference types; diff --git a/ILSpy.sln b/ILSpy.sln index 747fdd135..e3c407eb5 100644 --- a/ILSpy.sln +++ b/ILSpy.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -# SharpDevelop 4.1.0.7466-alpha +# SharpDevelop 4.0.1.7146 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "doc", "doc", "{F45DB999-7E72-4000-B5AD-3A7B485A0896}" ProjectSection(SolutionItems) = postProject doc\Command Line.txt = doc\Command Line.txt @@ -107,12 +107,12 @@ Global {63E6915C-7EA4-4D76-AB28-0D7191EEA626}.Release|Any CPU.ActiveCfg = net_4_0_Release|Any CPU {63E6915C-7EA4-4D76-AB28-0D7191EEA626}.Release|x86.Build.0 = net_4_0_Debug|Any CPU {63E6915C-7EA4-4D76-AB28-0D7191EEA626}.Release|x86.ActiveCfg = net_4_0_Release|Any CPU - {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|Any CPU.Build.0 = Debug|x86 - {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|Any CPU.ActiveCfg = Debug|x86 + {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|x86.Build.0 = Debug|x86 {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|x86.ActiveCfg = Debug|x86 - {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|Any CPU.Build.0 = Release|x86 - {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|Any CPU.ActiveCfg = Release|x86 + {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|Any CPU.Build.0 = Release|Any CPU + {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|Any CPU.ActiveCfg = Release|Any CPU {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|x86.Build.0 = Release|x86 {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|x86.ActiveCfg = Release|x86 EndGlobalSection diff --git a/TestPlugin/TestPlugin.csproj b/TestPlugin/TestPlugin.csproj index 54fe0e6f8..b0c205ad9 100644 --- a/TestPlugin/TestPlugin.csproj +++ b/TestPlugin/TestPlugin.csproj @@ -29,7 +29,7 @@ False True DEBUG;TRACE - Program + Project bin\Debug\ILSpy.exe