@@ -3208,9 +3208,13 @@ class TranslatedBuiltInOperation extends TranslatedNonConstantExpr {
3208
3208
3209
3209
final override Instruction getResult ( ) { result = this .getInstruction ( OnlyInstructionTag ( ) ) }
3210
3210
3211
+ private TranslatedElement getRankedChild ( int rnk ) {
3212
+ result = rank [ rnk + 1 ] ( int id , TranslatedElement te | te = this .getChild ( id ) | te order by id )
3213
+ }
3214
+
3211
3215
final override Instruction getFirstInstruction ( EdgeKind kind ) {
3212
- if exists ( this .getChild ( 0 ) )
3213
- then result = this .getChild ( 0 ) .getFirstInstruction ( kind )
3216
+ if exists ( this .getRankedChild ( 0 ) )
3217
+ then result = this .getRankedChild ( 0 ) .getFirstInstruction ( kind )
3214
3218
else (
3215
3219
kind instanceof GotoEdge and result = this .getInstruction ( OnlyInstructionTag ( ) )
3216
3220
)
@@ -3230,11 +3234,11 @@ class TranslatedBuiltInOperation extends TranslatedNonConstantExpr {
3230
3234
}
3231
3235
3232
3236
final override Instruction getChildSuccessorInternal ( TranslatedElement child , EdgeKind kind ) {
3233
- exists ( int id | child = this .getChild ( id ) |
3234
- result = this .getChild ( id + 1 ) .getFirstInstruction ( kind )
3237
+ exists ( int id | child = this .getRankedChild ( id ) |
3238
+ result = this .getRankedChild ( id + 1 ) .getFirstInstruction ( kind )
3235
3239
or
3236
3240
kind instanceof GotoEdge and
3237
- not exists ( this .getChild ( id + 1 ) ) and
3241
+ not exists ( this .getRankedChild ( id + 1 ) ) and
3238
3242
result = this .getInstruction ( OnlyInstructionTag ( ) )
3239
3243
)
3240
3244
}
@@ -3249,7 +3253,7 @@ class TranslatedBuiltInOperation extends TranslatedNonConstantExpr {
3249
3253
tag = OnlyInstructionTag ( ) and
3250
3254
exists ( int index |
3251
3255
operandTag = positionalArgumentOperand ( index ) and
3252
- result = this .getChild ( index ) .( TranslatedExpr ) .getResult ( )
3256
+ result = this .getRankedChild ( index ) .( TranslatedExpr ) .getResult ( )
3253
3257
)
3254
3258
}
3255
3259
0 commit comments