@@ -30,11 +30,6 @@ class GuardCondition extends Expr {
30
30
or
31
31
// no binary operators in the IR
32
32
this .( BinaryLogicalOperation ) .getAnOperand ( ) instanceof GuardCondition
33
- or
34
- // the IR short-circuits if(!x)
35
- // don't produce a guard condition for `y = !x` and other non-short-circuited cases
36
- not exists ( Instruction inst | this .getFullyConverted ( ) = inst .getAst ( ) ) and
37
- exists ( IRGuardCondition ir | this .( NotExpr ) .getOperand ( ) = ir .getAst ( ) )
38
33
}
39
34
40
35
/**
@@ -140,39 +135,6 @@ private class GuardConditionFromBinaryLogicalOperator extends GuardCondition {
140
135
}
141
136
}
142
137
143
- /**
144
- * A `!` operator in the AST that guards one or more basic blocks, and does not have a corresponding
145
- * IR instruction.
146
- */
147
- private class GuardConditionFromShortCircuitNot extends GuardCondition , NotExpr {
148
- GuardConditionFromShortCircuitNot ( ) {
149
- not exists ( Instruction inst | this .getFullyConverted ( ) = inst .getAst ( ) ) and
150
- exists ( IRGuardCondition ir | this .getOperand ( ) = ir .getAst ( ) )
151
- }
152
-
153
- override predicate controls ( BasicBlock controlled , boolean testIsTrue ) {
154
- this .getOperand ( ) .( GuardCondition ) .controls ( controlled , testIsTrue .booleanNot ( ) )
155
- }
156
-
157
- override predicate comparesLt ( Expr left , Expr right , int k , boolean isLessThan , boolean testIsTrue ) {
158
- this .getOperand ( )
159
- .( GuardCondition )
160
- .comparesLt ( left , right , k , isLessThan , testIsTrue .booleanNot ( ) )
161
- }
162
-
163
- override predicate ensuresLt ( Expr left , Expr right , int k , BasicBlock block , boolean isLessThan ) {
164
- this .getOperand ( ) .( GuardCondition ) .ensuresLt ( left , right , k , block , isLessThan .booleanNot ( ) )
165
- }
166
-
167
- override predicate comparesEq ( Expr left , Expr right , int k , boolean areEqual , boolean testIsTrue ) {
168
- this .getOperand ( ) .( GuardCondition ) .comparesEq ( left , right , k , areEqual , testIsTrue .booleanNot ( ) )
169
- }
170
-
171
- override predicate ensuresEq ( Expr left , Expr right , int k , BasicBlock block , boolean areEqual ) {
172
- this .getOperand ( ) .( GuardCondition ) .ensuresEq ( left , right , k , block , areEqual .booleanNot ( ) )
173
- }
174
- }
175
-
176
138
/**
177
139
* A Boolean condition in the AST that guards one or more basic blocks and has a corresponding IR
178
140
* instruction.
0 commit comments