diff options
author | qadeer <qadeer@microsoft.com> | 2011-04-27 14:09:10 -0700 |
---|---|---|
committer | qadeer <qadeer@microsoft.com> | 2011-04-27 14:09:10 -0700 |
commit | d32159a200f36e43d1f88347edf59eab5a57687c (patch) | |
tree | c72f7a254567354f51ded509186429803a10b812 /BCT/BytecodeTranslator/Sink.cs | |
parent | 85f5689fde9df72ea51c28e3c38e6eb4a462f2b6 (diff) |
fixing problems with struct translation
Diffstat (limited to 'BCT/BytecodeTranslator/Sink.cs')
-rw-r--r-- | BCT/BytecodeTranslator/Sink.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BCT/BytecodeTranslator/Sink.cs b/BCT/BytecodeTranslator/Sink.cs index c6fadd5f..9c20f96a 100644 --- a/BCT/BytecodeTranslator/Sink.cs +++ b/BCT/BytecodeTranslator/Sink.cs @@ -103,7 +103,7 @@ namespace BytecodeTranslator { else if (TypeHelper.IsPrimitiveInteger(type))
return Bpl.Type.Int;
else if (type.ResolvedType.IsStruct)
- return new Bpl.MapType(Bpl.Token.NoToken, new Bpl.TypeVariableSeq(), new Bpl.TypeSeq(this.heap.FieldType), this.heap.BoxType);
+ return heap.StructType;
return Bpl.Type.Int; // BUG! This is where we need to return "ref" for a reference type
}
@@ -287,7 +287,7 @@ namespace BytecodeTranslator { if (!method.IsStatic) {
Bpl.Type selfType;
if (method.ContainingType.ResolvedType.IsStruct) {
- selfType = new Bpl.MapType(Bpl.Token.NoToken, new Bpl.TypeVariableSeq(), new Bpl.TypeSeq(Heap.FieldType), Heap.BoxType);
+ selfType = Heap.StructType;
in_count++;
self = new Bpl.Formal(method.Token(), new Bpl.TypedIdent(method.Type.Token(), "thisIn", selfType), true);
out_count++;
|