Skip to content

Commit 1682314

Browse files
committed
refactor getAPropertyUsedInLoadStore
1 parent 1a42c9f commit 1682314

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

javascript/ql/src/semmle/javascript/dataflow/Configuration.qll

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -821,12 +821,10 @@ private string getAForwardRelevantLoadProperty(DataFlow::Configuration cfg) {
821821
* The properties from this predicate are used as a white-list of properties for load/store steps that should always be considered in the exploratory flow.
822822
*/
823823
private string getAPropertyUsedInLoadStore(DataFlow::Configuration cfg) {
824-
exists(string loadProp | not loadProp = result |
825-
isAdditionalLoadStoreStep(_, _, loadProp, result, cfg)
826-
)
827-
or
828-
exists(string storeProp | not storeProp = result |
829-
isAdditionalLoadStoreStep(_, _, result, storeProp, cfg)
824+
exists(string loadProp, string storeProp |
825+
isAdditionalLoadStoreStep(_, _, loadProp, storeProp, cfg) and
826+
storeProp != loadProp and
827+
result = [storeProp, loadProp]
830828
)
831829
}
832830

@@ -904,7 +902,9 @@ private predicate isRelevant(DataFlow::Node nd, DataFlow::Configuration cfg) {
904902
/**
905903
* Holds if there is backwards data-flow step from `mid` to `nd` under `cfg`.
906904
*/
907-
private predicate isRelevantBackStep(DataFlow::Node mid, DataFlow::Node nd, DataFlow::Configuration cfg) {
905+
private predicate isRelevantBackStep(
906+
DataFlow::Node mid, DataFlow::Node nd, DataFlow::Configuration cfg
907+
) {
908908
isRelevantForward(nd, cfg) and
909909
(
910910
exploratoryFlowStep(nd, mid, cfg) or

0 commit comments

Comments
 (0)