From 59317a63d7e25749f5d542e3c406c69c73bbc48d Mon Sep 17 00:00:00 2001 From: mikebarnett Date: Wed, 2 Mar 2011 16:52:31 +0000 Subject: 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. --- BCT/BytecodeTranslator/Heap.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'BCT/BytecodeTranslator/Heap.cs') 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; } -- cgit v1.2.3