File tree Expand file tree Collapse file tree 2 files changed +3
-21
lines changed Expand file tree Collapse file tree 2 files changed +3
-21
lines changed Original file line number Diff line number Diff line change @@ -67,8 +67,7 @@ bool syntactic_difft::operator()()
67
67
continue ;
68
68
}
69
69
70
- if (it->second .body .instructions .size () !=
71
- f_it->second .body .instructions .size ())
70
+ if (!it->second .body .equal (f_it->second .body ))
72
71
{
73
72
modified_functions.insert (it->first );
74
73
continue ;
@@ -82,22 +81,7 @@ bool syntactic_difft::operator()()
82
81
i_it2!=f_it->second .body .instructions .end ();
83
82
++i_it1, ++i_it2)
84
83
{
85
- long jump_difference1 = 0 ;
86
- if (!i_it1->targets .empty ())
87
- {
88
- jump_difference1 =
89
- i_it1->get_target ()->location_number - i_it1->location_number ;
90
- }
91
- long jump_difference2 = 0 ;
92
- if (!i_it2->targets .empty ())
93
- {
94
- jump_difference2 =
95
- i_it2->get_target ()->location_number - i_it2->location_number ;
96
- }
97
- if (
98
- i_it1->code != i_it2->code || i_it1->function != i_it2->function ||
99
- i_it1->type != i_it2->type || i_it1->guard != i_it2->guard ||
100
- jump_difference1 != jump_difference2)
84
+ if (i_it1->function != i_it2->function )
101
85
{
102
86
modified_functions.insert (it->first );
103
87
break ;
Original file line number Diff line number Diff line change @@ -393,9 +393,7 @@ bool unified_difft::instructions_equal(
393
393
const goto_programt::instructiont &ins1,
394
394
const goto_programt::instructiont &ins2)
395
395
{
396
- return ins1.code == ins2.code && ins1.function == ins2.function &&
397
- ins1.type == ins2.type && ins1.guard == ins2.guard &&
398
- ins1.targets .size () == ins2.targets .size () &&
396
+ return ins1.equal (ins2) && ins1.function == ins2.function &&
399
397
(ins1.targets .empty () ||
400
398
instructions_equal (*ins1.get_target (), *ins2.get_target ()));
401
399
}
You can’t perform that action at this time.
0 commit comments