diff options
author | t-espave <unknown> | 2011-08-11 16:29:26 -0700 |
---|---|---|
committer | t-espave <unknown> | 2011-08-11 16:29:26 -0700 |
commit | f7f5305b1dafc53d56fc7201a45ae544c65ed7f1 (patch) | |
tree | ae9527e38b1c6388e72e64f95ea0ed341bc18057 /BCT | |
parent | d9f1bb1f95c0d1f32e87528e8c98998489774a3c (diff) | |
parent | 35b22d232b3d2535187ae465255184dcee8ac4d4 (diff) |
Merge
Diffstat (limited to 'BCT')
4 files changed, 62 insertions, 8 deletions
diff --git a/BCT/BytecodeTranslator/Sink.cs b/BCT/BytecodeTranslator/Sink.cs index 1427b836..fee61b75 100644 --- a/BCT/BytecodeTranslator/Sink.cs +++ b/BCT/BytecodeTranslator/Sink.cs @@ -233,6 +233,14 @@ namespace BytecodeTranslator { var key = field.InternedKey;
if (!this.declaredFields.TryGetValue(key, out v)) {
v = this.Heap.CreateFieldVariable(field);
+
+ var isExtern = this.assemblyBeingTranslated != null &&
+ !TypeHelper.GetDefiningUnitReference(field.ContainingType).UnitIdentity.Equals(this.assemblyBeingTranslated.UnitIdentity);
+ if (isExtern) {
+ var attrib = new Bpl.QKeyValue(Bpl.Token.NoToken, "extern", new List<object>(1), null);
+ v.Attributes = attrib;
+ }
+
this.declaredFields.Add(key, v);
this.TranslatedProgram.TopLevelDeclarations.Add(v);
}
@@ -262,6 +270,14 @@ namespace BytecodeTranslator { if (v == null) {
v = this.Heap.CreateEventVariable(e);
+
+ var isExtern = this.assemblyBeingTranslated != null &&
+ !TypeHelper.GetDefiningUnitReference(e.ContainingType).UnitIdentity.Equals(this.assemblyBeingTranslated.UnitIdentity);
+ if (isExtern) {
+ var attrib = new Bpl.QKeyValue(Bpl.Token.NoToken, "extern", new List<object>(1), null);
+ v.Attributes = attrib;
+ }
+
this.TranslatedProgram.TopLevelDeclarations.Add(v);
}
this.declaredEvents.Add(e, v);
diff --git a/BCT/GetMeHere/AssertionInjector/AssertionInjector.csproj b/BCT/GetMeHere/AssertionInjector/AssertionInjector.csproj index 8c958581..3d763c0b 100644 --- a/BCT/GetMeHere/AssertionInjector/AssertionInjector.csproj +++ b/BCT/GetMeHere/AssertionInjector/AssertionInjector.csproj @@ -46,6 +46,44 @@ <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\CCICodeBox\Converters\ILGenerator\ILGenerator.csproj">
+ <Project>{08156C78-403A-4112-AD81-8646AC51CD2F}</Project>
+ <Name>ILGenerator</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\CCICodeBox\CoreObjectModel\MetadataHelper\MetadataHelper.csproj">
+ <Project>{4A34A3C5-6176-49D7-A4C5-B2B671247F8F}</Project>
+ <Name>MetadataHelper</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\CCICodeBox\CoreObjectModel\MetadataModel\MetadataModel.csproj">
+ <Project>{33CAB640-0D03-43DF-81BD-22CDC6C0A597}</Project>
+ <Name>MetadataModel</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\CCICodeBox\CoreObjectModel\MutableMetadataModel\MutableMetadataModel.csproj">
+ <Project>{319E151C-8F33-49E7-81C9-30F02F9BA90A}</Project>
+ <Name>MutableMetadataModel</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\CCICodeBox\CoreObjectModel\SourceModel\SourceModel.csproj">
+ <Project>{4B0054FD-124A-4037-9965-BDB55E6BF389}</Project>
+ <Name>SourceModel</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\CCICodeBox\PDBReaderAndWriter\PdbReader\PdbReader.csproj">
+ <Project>{A6A31B03-7C3D-4DE6-AA73-BE88116BC40A}</Project>
+ <Name>PdbReader</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\CCICodeBox\PDBReaderAndWriter\PdbWriter\PdbWriter.csproj">
+ <Project>{6D83F687-ABB5-40B3-915E-CA53DA0EB7F3}</Project>
+ <Name>PdbWriter</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\CCICodeBox\PEReaderAndWriter\PEReader\PeReader.csproj">
+ <Project>{34B9A0CE-DF18-4CBC-8F7A-90C2B74338D5}</Project>
+ <Name>PeReader</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\CCICodeBox\PEReaderAndWriter\PEWriter\PeWriter.csproj">
+ <Project>{304A8B0B-851B-4AA6-A17D-5F87F39C5E5C}</Project>
+ <Name>PeWriter</Name>
+ </ProjectReference>
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
diff --git a/BCT/RegressionTests/TranslationTest/GeneralHeapInput.txt b/BCT/RegressionTests/TranslationTest/GeneralHeapInput.txt index 0ea68d94..2872a22f 100644 --- a/BCT/RegressionTests/TranslationTest/GeneralHeapInput.txt +++ b/BCT/RegressionTests/TranslationTest/GeneralHeapInput.txt @@ -324,7 +324,7 @@ procedure {:inline 1} System.Windows.Controls.Control.set_IsEnabled$System.Boole implementation System.Windows.Controls.Control.set_IsEnabled$System.Boolean($this: Ref, value$in: bool)
{
- $Exception:=null;
+ $Exception := null;
isControlEnabled[$this] := value$in;
}
@@ -338,7 +338,7 @@ implementation System.Windows.Controls.Control.get_IsEnabled($this: Ref) returns {
var enabledness: bool;
- $Exception:=null;
+ $Exception := null;
enabledness := isControlEnabled[$this];
$result := Box2Ref(Bool2Box(enabledness));
}
@@ -353,7 +353,7 @@ implementation System.Windows.Controls.Primitives.ToggleButton.set_IsChecked$Sys {
var check: bool;
- $Exception:=null;
+ $Exception := null;
check := Box2Bool(Ref2Box(value$in));
isControlChecked[$this] := check;
}
@@ -368,7 +368,7 @@ implementation System.Windows.Controls.Primitives.ToggleButton.get_IsChecked($th {
var isChecked: bool;
- $Exception:=null;
+ $Exception := null;
isChecked := isControlChecked[$this];
$result := Box2Ref(Bool2Box(isChecked));
}
diff --git a/BCT/RegressionTests/TranslationTest/SplitFieldsHeapInput.txt b/BCT/RegressionTests/TranslationTest/SplitFieldsHeapInput.txt index 6c7ba975..074e2ef9 100644 --- a/BCT/RegressionTests/TranslationTest/SplitFieldsHeapInput.txt +++ b/BCT/RegressionTests/TranslationTest/SplitFieldsHeapInput.txt @@ -322,7 +322,7 @@ procedure {:inline 1} System.Windows.Controls.Control.set_IsEnabled$System.Boole implementation System.Windows.Controls.Control.set_IsEnabled$System.Boolean($this: Ref, value$in: bool)
{
- $Exception:=null;
+ $Exception := null;
isControlEnabled[$this] := value$in;
}
@@ -336,7 +336,7 @@ implementation System.Windows.Controls.Control.get_IsEnabled($this: Ref) returns {
var enabledness: bool;
- $Exception:=null;
+ $Exception := null;
enabledness := isControlEnabled[$this];
$result := Box2Ref(Bool2Box(enabledness));
}
@@ -351,7 +351,7 @@ implementation System.Windows.Controls.Primitives.ToggleButton.set_IsChecked$Sys {
var check: bool;
- $Exception:=null;
+ $Exception := null;
check := Box2Bool(Ref2Box(value$in));
isControlChecked[$this] := check;
}
@@ -366,7 +366,7 @@ implementation System.Windows.Controls.Primitives.ToggleButton.get_IsChecked($th {
var isChecked: bool;
- $Exception:=null;
+ $Exception := null;
isChecked := isControlChecked[$this];
$result := Box2Ref(Bool2Box(isChecked));
}
|