summaryrefslogtreecommitdiff
path: root/BCT/BytecodeTranslator/Program.cs
diff options
context:
space:
mode:
authorGravatar Mike Barnett <mbarnett@microsoft.com>2011-08-03 13:18:53 -0700
committerGravatar Mike Barnett <mbarnett@microsoft.com>2011-08-03 13:18:53 -0700
commit5da13c0983715868089f49ca38855816e5faa3c7 (patch)
treeff03dc95692e68ab0b38dd664f07ef39c3893e3a /BCT/BytecodeTranslator/Program.cs
parentf29c3a7e467c273fe9c4900eb971e6148edcc1d7 (diff)
Increase the name mangling to avoid name clashes in the Boogie program. In IL,
members of a type can have the same name.
Diffstat (limited to 'BCT/BytecodeTranslator/Program.cs')
-rw-r--r--BCT/BytecodeTranslator/Program.cs5
1 files changed, 3 insertions, 2 deletions
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();