Skip to content

Commit 24567c5

Browse files
authored
Merge pull request #109 from dave-bartolomeo/dave/Call
C++: `Invoke` -> `Call`
2 parents f88dc37 + 6e0fe92 commit 24567c5

File tree

11 files changed

+312
-312
lines changed

11 files changed

+312
-312
lines changed

cpp/ql/src/semmle/code/cpp/ir/internal/Instruction.qll

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module InstructionSanity {
3636
opcode instanceof Opcode::ReturnValue and tag instanceof ReturnValueOperand or
3737
opcode instanceof Opcode::ThrowValue and tag instanceof ExceptionOperand or
3838
opcode instanceof Opcode::UnmodeledUse and tag instanceof UnmodeledUseOperand or
39-
opcode instanceof Opcode::Invoke and tag instanceof CallTargetOperand
39+
opcode instanceof Opcode::Call and tag instanceof CallTargetOperand
4040
)
4141
)
4242
}
@@ -54,7 +54,7 @@ module InstructionSanity {
5454
query predicate unexpectedOperand(Instruction instr, OperandTag tag) {
5555
exists(instr.getOperand(tag)) and
5656
not expectsOperand(instr, tag) and
57-
not (instr instanceof InvokeInstruction and tag instanceof ArgumentOperand) and
57+
not (instr instanceof CallInstruction and tag instanceof ArgumentOperand) and
5858
not (instr instanceof BuiltInInstruction and tag instanceof PositionalArgumentOperand) and
5959
not (instr instanceof PhiInstruction and tag instanceof PhiOperand)
6060
}
@@ -987,9 +987,9 @@ class SwitchInstruction extends Instruction {
987987
}
988988
}
989989

990-
class InvokeInstruction extends Instruction {
991-
InvokeInstruction() {
992-
opcode instanceof Opcode::Invoke
990+
class CallInstruction extends Instruction {
991+
CallInstruction() {
992+
opcode instanceof Opcode::Call
993993
}
994994

995995
final Instruction getCallTarget() {

cpp/ql/src/semmle/code/cpp/ir/internal/Opcode.qll

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private newtype TOpcode =
4646
TStringConstant() or
4747
TConditionalBranch() or
4848
TSwitch() or
49-
TInvoke() or
49+
TCall() or
5050
TCatchByType() or
5151
TCatchAny() or
5252
TThrowValue() or
@@ -138,7 +138,7 @@ module Opcode {
138138
class StringConstant extends Opcode, TStringConstant { override final string toString() { result = "StringConstant" } }
139139
class ConditionalBranch extends OpcodeWithCondition, TConditionalBranch { override final string toString() { result = "ConditionalBranch" } }
140140
class Switch extends OpcodeWithCondition, TSwitch { override final string toString() { result = "Switch" } }
141-
class Invoke extends Opcode, TInvoke { override final string toString() { result = "Invoke" } }
141+
class Call extends Opcode, TCall { override final string toString() { result = "Call" } }
142142
class CatchByType extends CatchOpcode, TCatchByType { override final string toString() { result = "CatchByType" } }
143143
class CatchAny extends CatchOpcode, TCatchAny { override final string toString() { result = "CatchAny" } }
144144
class ThrowValue extends ThrowOpcode, MemoryAccessOpcode, TThrowValue { override final string toString() { result = "ThrowValue" } }

cpp/ql/src/semmle/code/cpp/ir/internal/OperandTag.qll

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ UnmodeledUseOperand unmodeledUseOperand() {
202202
}
203203

204204
/**
205-
* The operand representing the target function of an `Invoke` instruction.
205+
* The operand representing the target function of an `Call` instruction.
206206
*/
207207
class CallTargetOperand extends OperandTag, TCallTargetOperand {
208208
override final string toString() {

cpp/ql/src/semmle/code/cpp/ir/internal/TranslatedExpr.qll

+1-1
Original file line numberDiff line numberDiff line change
@@ -1793,7 +1793,7 @@ abstract class TranslatedCall extends TranslatedExpr {
17931793
override predicate hasInstruction(Opcode opcode, InstructionTag tag,
17941794
Type resultType, boolean isGLValue) {
17951795
tag = CallTag() and
1796-
opcode instanceof Opcode::Invoke and
1796+
opcode instanceof Opcode::Call and
17971797
resultType = getCallResultType() and
17981798
isGLValue = false
17991799
}

cpp/ql/src/semmle/code/cpp/ssa/internal/aliased_ssa/Instruction.qll

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module InstructionSanity {
3636
opcode instanceof Opcode::ReturnValue and tag instanceof ReturnValueOperand or
3737
opcode instanceof Opcode::ThrowValue and tag instanceof ExceptionOperand or
3838
opcode instanceof Opcode::UnmodeledUse and tag instanceof UnmodeledUseOperand or
39-
opcode instanceof Opcode::Invoke and tag instanceof CallTargetOperand
39+
opcode instanceof Opcode::Call and tag instanceof CallTargetOperand
4040
)
4141
)
4242
}
@@ -54,7 +54,7 @@ module InstructionSanity {
5454
query predicate unexpectedOperand(Instruction instr, OperandTag tag) {
5555
exists(instr.getOperand(tag)) and
5656
not expectsOperand(instr, tag) and
57-
not (instr instanceof InvokeInstruction and tag instanceof ArgumentOperand) and
57+
not (instr instanceof CallInstruction and tag instanceof ArgumentOperand) and
5858
not (instr instanceof BuiltInInstruction and tag instanceof PositionalArgumentOperand) and
5959
not (instr instanceof PhiInstruction and tag instanceof PhiOperand)
6060
}
@@ -987,9 +987,9 @@ class SwitchInstruction extends Instruction {
987987
}
988988
}
989989

990-
class InvokeInstruction extends Instruction {
991-
InvokeInstruction() {
992-
opcode instanceof Opcode::Invoke
990+
class CallInstruction extends Instruction {
991+
CallInstruction() {
992+
opcode instanceof Opcode::Call
993993
}
994994

995995
final Instruction getCallTarget() {

cpp/ql/src/semmle/code/cpp/ssa/internal/aliased_ssa/OperandTag.qll

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ UnmodeledUseOperand unmodeledUseOperand() {
202202
}
203203

204204
/**
205-
* The operand representing the target function of an `Invoke` instruction.
205+
* The operand representing the target function of an `Call` instruction.
206206
*/
207207
class CallTargetOperand extends OperandTag, TCallTargetOperand {
208208
override final string toString() {

cpp/ql/src/semmle/code/cpp/ssa/internal/ssa/Instruction.qll

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module InstructionSanity {
3636
opcode instanceof Opcode::ReturnValue and tag instanceof ReturnValueOperand or
3737
opcode instanceof Opcode::ThrowValue and tag instanceof ExceptionOperand or
3838
opcode instanceof Opcode::UnmodeledUse and tag instanceof UnmodeledUseOperand or
39-
opcode instanceof Opcode::Invoke and tag instanceof CallTargetOperand
39+
opcode instanceof Opcode::Call and tag instanceof CallTargetOperand
4040
)
4141
)
4242
}
@@ -54,7 +54,7 @@ module InstructionSanity {
5454
query predicate unexpectedOperand(Instruction instr, OperandTag tag) {
5555
exists(instr.getOperand(tag)) and
5656
not expectsOperand(instr, tag) and
57-
not (instr instanceof InvokeInstruction and tag instanceof ArgumentOperand) and
57+
not (instr instanceof CallInstruction and tag instanceof ArgumentOperand) and
5858
not (instr instanceof BuiltInInstruction and tag instanceof PositionalArgumentOperand) and
5959
not (instr instanceof PhiInstruction and tag instanceof PhiOperand)
6060
}
@@ -987,9 +987,9 @@ class SwitchInstruction extends Instruction {
987987
}
988988
}
989989

990-
class InvokeInstruction extends Instruction {
991-
InvokeInstruction() {
992-
opcode instanceof Opcode::Invoke
990+
class CallInstruction extends Instruction {
991+
CallInstruction() {
992+
opcode instanceof Opcode::Call
993993
}
994994

995995
final Instruction getCallTarget() {

cpp/ql/src/semmle/code/cpp/ssa/internal/ssa/OperandTag.qll

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ UnmodeledUseOperand unmodeledUseOperand() {
202202
}
203203

204204
/**
205-
* The operand representing the target function of an `Invoke` instruction.
205+
* The operand representing the target function of an `Call` instruction.
206206
*/
207207
class CallTargetOperand extends OperandTag, TCallTargetOperand {
208208
override final string toString() {

0 commit comments

Comments
 (0)