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