diff options
author | wuestholz <unknown> | 2014-09-23 11:32:04 +0200 |
---|---|---|
committer | wuestholz <unknown> | 2014-09-23 11:32:04 +0200 |
commit | fb226b8b4b9315a0ad2df1fcd1b4a7f12e118791 (patch) | |
tree | 9245479972ed887b26b013ba4fb6c05862767846 /Source/VCGeneration/VC.cs | |
parent | 2031fb15596b2a114f7b3e0bb85ff838507051a0 (diff) |
Did some refactoring.
Diffstat (limited to 'Source/VCGeneration/VC.cs')
-rw-r--r-- | Source/VCGeneration/VC.cs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Source/VCGeneration/VC.cs b/Source/VCGeneration/VC.cs index 3735388c..758430bd 100644 --- a/Source/VCGeneration/VC.cs +++ b/Source/VCGeneration/VC.cs @@ -2600,7 +2600,7 @@ namespace VC { // where clauses of global variables
lock (program.TopLevelDeclarations)
{
- foreach (var gvar in program.TopLevelDeclarations.OfType<GlobalVariable>())
+ foreach (var gvar in program.GlobalVariables())
{
if (gvar != null && gvar.TypedIdent.WhereExpr != null)
{
@@ -2755,15 +2755,11 @@ namespace VC { {
// Construct the set of inlined procs in the original program
var inlinedProcs = new HashSet<string>();
- foreach (var decl in program.TopLevelDeclarations)
+ foreach (var proc in program.Procedures)
{
- if (decl is Procedure)
- {
- if (!(decl is LoopProcedure))
- {
- var p = decl as Procedure;
- inlinedProcs.Add(p.Name);
- }
+ if (!(proc is LoopProcedure))
+ {
+ inlinedProcs.Add(proc.Name);
}
}
|