From 5da13c0983715868089f49ca38855816e5faa3c7 Mon Sep 17 00:00:00 2001 From: Mike Barnett Date: Wed, 3 Aug 2011 13:18:53 -0700 Subject: Increase the name mangling to avoid name clashes in the Boogie program. In IL, members of a type can have the same name. --- BCT/BytecodeTranslator/Program.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'BCT/BytecodeTranslator/Program.cs') diff --git a/BCT/BytecodeTranslator/Program.cs b/BCT/BytecodeTranslator/Program.cs index be363277..18d735af 100644 --- a/BCT/BytecodeTranslator/Program.cs +++ b/BCT/BytecodeTranslator/Program.cs @@ -432,9 +432,10 @@ namespace BytecodeTranslator { for (index = 0; index < dispatchProcOutvars.Length; index++) { outs.Add(Bpl.Expr.Ident(dispatchProcOutvars[index])); } - Bpl.Constant c = sink.FindOrAddDelegateMethodConstant(defn); + Bpl.Constant c = sink.FindOrCreateDelegateMethodConstant(defn); + var procInfo = sink.FindOrCreateProcedure(defn); Bpl.Expr bexpr = Bpl.Expr.Binary(Bpl.BinaryOperator.Opcode.Eq, Bpl.Expr.Ident(method), Bpl.Expr.Ident(c)); - Bpl.CallCmd callCmd = new Bpl.CallCmd(token, c.Name, ins, outs); + Bpl.CallCmd callCmd = new Bpl.CallCmd(token, procInfo.Decl.Name, ins, outs); ifCmd = BuildIfCmd(bexpr, callCmd, ifCmd); } Bpl.StmtListBuilder ifStmtBuilder = new Bpl.StmtListBuilder(); -- cgit v1.2.3