@@ -2132,6 +2132,7 @@ class TranslatedCilCall extends TranslatedCilInstruction, TTranslatedCilCall {
21322132 then v .asSome ( ) = this .getTempVariable ( CallReturnValueTag ( ) )
21332133 else v .isNone ( )
21342134 or
2135+ not exists ( instr .getTarget ( ) ) and
21352136 opcode instanceof Opcode:: ExternalRef and
21362137 tag = CilCallTargetTag ( ) and
21372138 v .asSome ( ) = this .getTempVariable ( CilCallTargetVarTag ( ) )
@@ -2141,6 +2142,7 @@ class TranslatedCilCall extends TranslatedCilInstruction, TTranslatedCilCall {
21412142 instr .hasReturnValue ( ) and
21422143 tag = CallReturnValueTag ( )
21432144 or
2145+ not exists ( instr .getTarget ( ) ) and
21442146 tag = CilCallTargetVarTag ( )
21452147 }
21462148
@@ -2154,19 +2156,23 @@ class TranslatedCilCall extends TranslatedCilInstruction, TTranslatedCilCall {
21542156 getTranslatedCilInstruction ( instr .getABackwardPredecessor ( ) ) .getStackElement ( index ) = result
21552157 )
21562158 or
2159+ not exists ( instr .getTarget ( ) ) and
21572160 operandTag instanceof CallTargetTag and
21582161 result = this .getInstruction ( CilCallTargetTag ( ) ) .getResultVariable ( )
21592162 )
21602163 }
21612164
21622165 override string getExternalName ( InstructionTag tag ) {
2166+ // TODO: Only when external
2167+ not exists ( instr .getTarget ( ) ) and
21632168 tag = CilCallTargetTag ( ) and
21642169 result = instr .getExternalName ( )
21652170 }
21662171
21672172 override Instruction getChildSuccessor ( TranslatedElement child , SuccessorType succType ) { none ( ) }
21682173
21692174 override Instruction getSuccessor ( InstructionTag tag , SuccessorType succType ) {
2175+ not exists ( instr .getTarget ( ) ) and
21702176 tag = CilCallTargetTag ( ) and
21712177 succType instanceof DirectSuccessor and
21722178 result = this .getInstruction ( CilCallTag ( ) )
@@ -2176,13 +2182,21 @@ class TranslatedCilCall extends TranslatedCilInstruction, TTranslatedCilCall {
21762182 result = getTranslatedInstruction ( instr .getASuccessor ( ) ) .getEntry ( )
21772183 }
21782184
2179- override Instruction getEntry ( ) { result = this .getInstruction ( CilCallTargetTag ( ) ) }
2185+ override Instruction getEntry ( ) {
2186+ not exists ( instr .getTarget ( ) ) and
2187+ result = this .getInstruction ( CilCallTargetTag ( ) )
2188+ }
21802189
21812190 override Variable getResultVariable ( ) {
21822191 instr .hasReturnValue ( ) and
21832192 result = this .getTempVariable ( CallReturnValueTag ( ) )
21842193 }
21852194
2195+ override TranslatedFunction getStaticCallTarget ( InstructionTag tag ) {
2196+ tag = CilCallTag ( ) and
2197+ result = getTranslatedFunction ( instr .getTarget ( ) )
2198+ }
2199+
21862200 final override Variable getStackElement ( int i ) {
21872201 if instr .hasReturnValue ( )
21882202 then
0 commit comments