C++/C#: Sync identical files

This commit is contained in:
Mathias Vorreiter Pedersen
2020-11-21 00:55:07 +01:00
parent f173dc71c0
commit 61bbceb201
4 changed files with 20 additions and 28 deletions

View File

@@ -593,7 +593,7 @@ class InitializeParameterInstruction extends VariableInstruction {
* Holds if this instruction initializes the parameter with index `index`, or
* if `index` is `-1` and this instruction initializes `this`.
*/
final predicate isParameterOrQualifierIndex(int index) {
final predicate hasIndex(int index) {
index >= 0 and index = this.getParameter().getIndex()
or
index = -1 and this.getIRVariable() instanceof IRThisVariable
@@ -617,7 +617,7 @@ class InitializeIndirectionInstruction extends VariableInstruction {
* index `index`, or if `index` is `-1` and this instruction initializes the memory
* pointed to by `this`.
*/
final predicate isParameterOrQualifierIndex(int index) {
final predicate hasIndex(int index) {
index >= 0 and index = this.getParameter().getIndex()
or
index = -1 and this.getIRVariable() instanceof IRThisVariable
@@ -801,7 +801,7 @@ class ReturnIndirectionInstruction extends VariableInstruction {
* Holds if this instruction is the return indirection for the parameter with index `index`, or
* if this instruction is the return indirection for `this` and `index` is `-1`.
*/
final predicate isParameterOrThisIndirection(int index) {
final predicate hasIndex(int index) {
index >= 0 and index = this.getParameter().getIndex()
or
index = -1 and this.isThisIndirection()
@@ -1622,7 +1622,7 @@ class CallInstruction extends Instruction {
* Gets the argument operand at the specified index, or `this` if `index` is `-1`.
*/
pragma[noinline]
final ArgumentOperand getPositionalOrThisArgumentOperand(int index) {
final ArgumentOperand getArgumentOperand(int index) {
index >= 0 and result = getPositionalArgumentOperand(index)
or
index = -1 and result = getThisArgumentOperand()
@@ -1632,9 +1632,7 @@ class CallInstruction extends Instruction {
* Gets the argument at the specified index, or `this` if `index` is `-1`.
*/
pragma[noinline]
final Instruction getPositionalOrThisArgument(int index) {
result = getPositionalOrThisArgumentOperand(index).getDef()
}
final Instruction getArgument(int index) { result = getArgumentOperand(index).getDef() }
/**
* Gets the number of arguments of the call, including the `this` pointer, if any.

View File

@@ -593,7 +593,7 @@ class InitializeParameterInstruction extends VariableInstruction {
* Holds if this instruction initializes the parameter with index `index`, or
* if `index` is `-1` and this instruction initializes `this`.
*/
final predicate isParameterOrQualifierIndex(int index) {
final predicate hasIndex(int index) {
index >= 0 and index = this.getParameter().getIndex()
or
index = -1 and this.getIRVariable() instanceof IRThisVariable
@@ -617,7 +617,7 @@ class InitializeIndirectionInstruction extends VariableInstruction {
* index `index`, or if `index` is `-1` and this instruction initializes the memory
* pointed to by `this`.
*/
final predicate isParameterOrQualifierIndex(int index) {
final predicate hasIndex(int index) {
index >= 0 and index = this.getParameter().getIndex()
or
index = -1 and this.getIRVariable() instanceof IRThisVariable
@@ -801,7 +801,7 @@ class ReturnIndirectionInstruction extends VariableInstruction {
* Holds if this instruction is the return indirection for the parameter with index `index`, or
* if this instruction is the return indirection for `this` and `index` is `-1`.
*/
final predicate isParameterOrThisIndirection(int index) {
final predicate hasIndex(int index) {
index >= 0 and index = this.getParameter().getIndex()
or
index = -1 and this.isThisIndirection()
@@ -1622,7 +1622,7 @@ class CallInstruction extends Instruction {
* Gets the argument operand at the specified index, or `this` if `index` is `-1`.
*/
pragma[noinline]
final ArgumentOperand getPositionalOrThisArgumentOperand(int index) {
final ArgumentOperand getArgumentOperand(int index) {
index >= 0 and result = getPositionalArgumentOperand(index)
or
index = -1 and result = getThisArgumentOperand()
@@ -1632,9 +1632,7 @@ class CallInstruction extends Instruction {
* Gets the argument at the specified index, or `this` if `index` is `-1`.
*/
pragma[noinline]
final Instruction getPositionalOrThisArgument(int index) {
result = getPositionalOrThisArgumentOperand(index).getDef()
}
final Instruction getArgument(int index) { result = getArgumentOperand(index).getDef() }
/**
* Gets the number of arguments of the call, including the `this` pointer, if any.

View File

@@ -593,7 +593,7 @@ class InitializeParameterInstruction extends VariableInstruction {
* Holds if this instruction initializes the parameter with index `index`, or
* if `index` is `-1` and this instruction initializes `this`.
*/
final predicate isParameterOrQualifierIndex(int index) {
final predicate hasIndex(int index) {
index >= 0 and index = this.getParameter().getIndex()
or
index = -1 and this.getIRVariable() instanceof IRThisVariable
@@ -617,7 +617,7 @@ class InitializeIndirectionInstruction extends VariableInstruction {
* index `index`, or if `index` is `-1` and this instruction initializes the memory
* pointed to by `this`.
*/
final predicate isParameterOrQualifierIndex(int index) {
final predicate hasIndex(int index) {
index >= 0 and index = this.getParameter().getIndex()
or
index = -1 and this.getIRVariable() instanceof IRThisVariable
@@ -801,7 +801,7 @@ class ReturnIndirectionInstruction extends VariableInstruction {
* Holds if this instruction is the return indirection for the parameter with index `index`, or
* if this instruction is the return indirection for `this` and `index` is `-1`.
*/
final predicate isParameterOrThisIndirection(int index) {
final predicate hasIndex(int index) {
index >= 0 and index = this.getParameter().getIndex()
or
index = -1 and this.isThisIndirection()
@@ -1622,7 +1622,7 @@ class CallInstruction extends Instruction {
* Gets the argument operand at the specified index, or `this` if `index` is `-1`.
*/
pragma[noinline]
final ArgumentOperand getPositionalOrThisArgumentOperand(int index) {
final ArgumentOperand getArgumentOperand(int index) {
index >= 0 and result = getPositionalArgumentOperand(index)
or
index = -1 and result = getThisArgumentOperand()
@@ -1632,9 +1632,7 @@ class CallInstruction extends Instruction {
* Gets the argument at the specified index, or `this` if `index` is `-1`.
*/
pragma[noinline]
final Instruction getPositionalOrThisArgument(int index) {
result = getPositionalOrThisArgumentOperand(index).getDef()
}
final Instruction getArgument(int index) { result = getArgumentOperand(index).getDef() }
/**
* Gets the number of arguments of the call, including the `this` pointer, if any.

View File

@@ -593,7 +593,7 @@ class InitializeParameterInstruction extends VariableInstruction {
* Holds if this instruction initializes the parameter with index `index`, or
* if `index` is `-1` and this instruction initializes `this`.
*/
final predicate isParameterOrQualifierIndex(int index) {
final predicate hasIndex(int index) {
index >= 0 and index = this.getParameter().getIndex()
or
index = -1 and this.getIRVariable() instanceof IRThisVariable
@@ -617,7 +617,7 @@ class InitializeIndirectionInstruction extends VariableInstruction {
* index `index`, or if `index` is `-1` and this instruction initializes the memory
* pointed to by `this`.
*/
final predicate isParameterOrQualifierIndex(int index) {
final predicate hasIndex(int index) {
index >= 0 and index = this.getParameter().getIndex()
or
index = -1 and this.getIRVariable() instanceof IRThisVariable
@@ -801,7 +801,7 @@ class ReturnIndirectionInstruction extends VariableInstruction {
* Holds if this instruction is the return indirection for the parameter with index `index`, or
* if this instruction is the return indirection for `this` and `index` is `-1`.
*/
final predicate isParameterOrThisIndirection(int index) {
final predicate hasIndex(int index) {
index >= 0 and index = this.getParameter().getIndex()
or
index = -1 and this.isThisIndirection()
@@ -1622,7 +1622,7 @@ class CallInstruction extends Instruction {
* Gets the argument operand at the specified index, or `this` if `index` is `-1`.
*/
pragma[noinline]
final ArgumentOperand getPositionalOrThisArgumentOperand(int index) {
final ArgumentOperand getArgumentOperand(int index) {
index >= 0 and result = getPositionalArgumentOperand(index)
or
index = -1 and result = getThisArgumentOperand()
@@ -1632,9 +1632,7 @@ class CallInstruction extends Instruction {
* Gets the argument at the specified index, or `this` if `index` is `-1`.
*/
pragma[noinline]
final Instruction getPositionalOrThisArgument(int index) {
result = getPositionalOrThisArgumentOperand(index).getDef()
}
final Instruction getArgument(int index) { result = getArgumentOperand(index).getDef() }
/**
* Gets the number of arguments of the call, including the `this` pointer, if any.