mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
SSA: Improve toString.
This commit is contained in:
@@ -1617,6 +1617,9 @@ module Make<
|
|||||||
|
|
||||||
/** A static single assignment (SSA) definition. */
|
/** A static single assignment (SSA) definition. */
|
||||||
class SsaDefinition extends FinalDefinition {
|
class SsaDefinition extends FinalDefinition {
|
||||||
|
/** Gets a textual representation of this SSA definition. */
|
||||||
|
string toString() { result = super.toString() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the control flow node of this SSA definition.
|
* Gets the control flow node of this SSA definition.
|
||||||
*
|
*
|
||||||
@@ -1708,6 +1711,8 @@ module Make<
|
|||||||
class SsaParameterInit extends SsaExplicitWrite {
|
class SsaParameterInit extends SsaExplicitWrite {
|
||||||
SsaParameterInit() { parameterInit(this, _) }
|
SsaParameterInit() { parameterInit(this, _) }
|
||||||
|
|
||||||
|
override string toString() { result = "SSA param(" + this.getSourceVariable() + ")" }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the parameter that this definition represents. This is equivalent
|
* Gets the parameter that this definition represents. This is equivalent
|
||||||
* to `getDefinition().isParameterInit(result)`
|
* to `getDefinition().isParameterInit(result)`
|
||||||
@@ -1725,6 +1730,8 @@ module Make<
|
|||||||
*/
|
*/
|
||||||
class SsaImplicitWrite extends SsaWriteDefinition {
|
class SsaImplicitWrite extends SsaWriteDefinition {
|
||||||
SsaImplicitWrite() { not explicitWrite(this, _) }
|
SsaImplicitWrite() { not explicitWrite(this, _) }
|
||||||
|
|
||||||
|
override string toString() { result = "SSA implicit def(" + this.getSourceVariable() + ")" }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1734,6 +1741,8 @@ module Make<
|
|||||||
*/
|
*/
|
||||||
class SsaImplicitEntryDefinition extends SsaImplicitWrite {
|
class SsaImplicitEntryDefinition extends SsaImplicitWrite {
|
||||||
SsaImplicitEntryDefinition() { this.definesAt(_, any(EntryBasicBlock bb), -1) }
|
SsaImplicitEntryDefinition() { this.definesAt(_, any(EntryBasicBlock bb), -1) }
|
||||||
|
|
||||||
|
override string toString() { result = "SSA entry def(" + this.getSourceVariable() + ")" }
|
||||||
}
|
}
|
||||||
|
|
||||||
/** An SSA definition that represents an uncertain variable update. */
|
/** An SSA definition that represents an uncertain variable update. */
|
||||||
|
|||||||
Reference in New Issue
Block a user