mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
JS: Improve join orders related to getABooleanValue()
This commit is contained in:
@@ -59,6 +59,7 @@ class AbstractValue extends TAbstractValue {
|
|||||||
* Gets the Boolean value some concrete value represented by this
|
* Gets the Boolean value some concrete value represented by this
|
||||||
* abstract value coerces to.
|
* abstract value coerces to.
|
||||||
*/
|
*/
|
||||||
|
pragma[nomagic]
|
||||||
abstract boolean getBooleanValue();
|
abstract boolean getBooleanValue();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -92,10 +92,15 @@ class AnalyzedNode extends DataFlow::Node {
|
|||||||
PrimitiveType getAPrimitiveType() { result = this.getAValue().toPrimitive().getType() }
|
PrimitiveType getAPrimitiveType() { result = this.getAValue().toPrimitive().getType() }
|
||||||
|
|
||||||
/** Gets a Boolean value that this node evaluates to. */
|
/** Gets a Boolean value that this node evaluates to. */
|
||||||
|
bindingset[this]
|
||||||
|
overlay[caller?]
|
||||||
|
pragma[inline_late]
|
||||||
boolean getABooleanValue() { result = this.getAValue().getBooleanValue() }
|
boolean getABooleanValue() { result = this.getAValue().getBooleanValue() }
|
||||||
|
|
||||||
/** Gets the unique Boolean value that this node evaluates to, if any. */
|
/** Gets the unique Boolean value that this node evaluates to, if any. */
|
||||||
boolean getTheBooleanValue() { forex(boolean bv | bv = this.getABooleanValue() | result = bv) }
|
overlay[caller?]
|
||||||
|
pragma[inline]
|
||||||
|
boolean getTheBooleanValue() { result = unique( | | this.getABooleanValue()) }
|
||||||
|
|
||||||
/** Gets the unique type inferred for this node, if any. */
|
/** Gets the unique type inferred for this node, if any. */
|
||||||
InferredType getTheType() { result = unique(InferredType t | t = this.getAType()) }
|
InferredType getTheType() { result = unique(InferredType t | t = this.getAType()) }
|
||||||
|
|||||||
Reference in New Issue
Block a user