summaryrefslogtreecommitdiff
path: root/BCT/BytecodeTranslator/Heap.cs
diff options
context:
space:
mode:
authorGravatar mikebarnett <unknown>2011-03-02 16:52:31 +0000
committerGravatar mikebarnett <unknown>2011-03-02 16:52:31 +0000
commit59317a63d7e25749f5d542e3c406c69c73bbc48d (patch)
treed84e0a0ca60884ca258574fd46bc96fa45e76370 /BCT/BytecodeTranslator/Heap.cs
parent9a63fa89c511abbbb1da91044988136d33241b84 (diff)
Create a static constructor only for types that don't already define one.
Fix a problem in two of the heaps where the AST for "type Type;" wasn't getting created.
Diffstat (limited to 'BCT/BytecodeTranslator/Heap.cs')
-rw-r--r--BCT/BytecodeTranslator/Heap.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/BCT/BytecodeTranslator/Heap.cs b/BCT/BytecodeTranslator/Heap.cs
index 919ab243..4bd086c0 100644
--- a/BCT/BytecodeTranslator/Heap.cs
+++ b/BCT/BytecodeTranslator/Heap.cs
@@ -67,6 +67,9 @@ procedure {:inline 1} Alloc() returns (x: int)
program = null;
string prelude = this.InitialPreludeText + this.DelegateEncodingText;
var b = RepresentationFor.ParsePrelude(prelude, this, out program);
+ if (b) {
+ this.TypeType = new Bpl.CtorType(this.TypeTypeDecl.tok, this.TypeTypeDecl, new Bpl.TypeSeq());
+ }
return b;
}
@@ -305,6 +308,9 @@ procedure {:inline 1} Alloc() returns (x: int)
program = null;
string prelude = this.InitialPreludeText + this.DelegateEncodingText;
var b = RepresentationFor.ParsePrelude(prelude, this, out program);
+ if (b) {
+ this.TypeType = new Bpl.CtorType(this.TypeTypeDecl.tok, this.TypeTypeDecl, new Bpl.TypeSeq());
+ }
return b;
}