summaryrefslogtreecommitdiff
path: root/BCT/BytecodeTranslator/MetadataTraverser.cs
diff options
context:
space:
mode:
authorGravatar qadeer <qadeer@microsoft.com>2011-04-23 23:32:07 -0700
committerGravatar qadeer <qadeer@microsoft.com>2011-04-23 23:32:07 -0700
commit484aba5e25c9c35eaaa42cb7742591febff9da83 (patch)
tree6bbe5de390b0ff8733f1569c4508b26f38c95b7c /BCT/BytecodeTranslator/MetadataTraverser.cs
parent3266293b8b2ba152bf5f36a0bfe587fc9a47892b (diff)
0. Deleted other heap representations except SplitField and General
1. first cut at implementing structs
Diffstat (limited to 'BCT/BytecodeTranslator/MetadataTraverser.cs')
-rw-r--r--BCT/BytecodeTranslator/MetadataTraverser.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/BCT/BytecodeTranslator/MetadataTraverser.cs b/BCT/BytecodeTranslator/MetadataTraverser.cs
index 71639a5c..bbcc81f5 100644
--- a/BCT/BytecodeTranslator/MetadataTraverser.cs
+++ b/BCT/BytecodeTranslator/MetadataTraverser.cs
@@ -102,7 +102,7 @@ namespace BytecodeTranslator {
if (f.IsStatic) {
Bpl.Expr e;
- var bplType = TranslationHelper.CciTypeToBoogie(f.Type);
+ var bplType = this.sink.CciTypeToBoogie(f.Type);
if (bplType == Bpl.Type.Int) {
e = Bpl.Expr.Literal(0);
e.Type = Bpl.Type.Int;
@@ -181,6 +181,13 @@ namespace BytecodeTranslator {
}
}
+ if (!method.IsStatic && method.ContainingType.ResolvedType.IsStruct) {
+ Bpl.IToken tok = method.Token();
+ stmtTraverser.StmtBuilder.Add(Bpl.Cmd.SimpleAssign(tok,
+ new Bpl.IdentifierExpr(tok, proc.OutParams[0]),
+ new Bpl.IdentifierExpr(tok, proc.InParams[0])));
+ }
+
#endregion
#region For non-deferring ctors and all cctors, initialize all fields to null-equivalent values