Skip to content

Commit e779481

Browse files
author
Max Schaefer
committed
JavaScript: Remove AdditionalFeature from ApiGraphs.
I ended up not using it for flow summaries, so at this point it is purely speculative generality. We can reintroduce it later if we need to.
1 parent 924ef6a commit e779481

1 file changed

Lines changed: 1 addition & 32 deletions

File tree

javascript/ql/src/ApiGraphs.qll

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,6 @@ module API {
218218
or
219219
this = Impl::MkCanonicalNameUse(n) and result = "use " + n
220220
)
221-
or
222-
exists(AdditionalFeature a | this = Impl::MkAdditionalFeature(a) and result = a.getId())
223221
}
224222

225223
/**
@@ -259,9 +257,6 @@ module API {
259257
not result = moduleImport(_)
260258
}
261259

262-
/** Gets additional feature `a`. */
263-
Feature additionalNode(AdditionalFeature a) { result = Impl::MkAdditionalFeature(a) }
264-
265260
/**
266261
* An API entry point.
267262
*
@@ -279,23 +274,6 @@ module API {
279274
abstract DataFlow::Node getADef();
280275
}
281276

282-
/**
283-
* A custom feature that is not captured by the standard implementation of API graphs.
284-
*/
285-
abstract class AdditionalFeature extends string {
286-
bindingset[this]
287-
AdditionalFeature() { any() }
288-
289-
/** Gets a feature to which this feature has an edge labeled with `lbl` in the API graph. */
290-
abstract Feature getASuccessor(string lbl);
291-
292-
/** Gets a feature which has an edge labeled with `lbl` to this feature in the API graph. */
293-
abstract Feature getAPredecessor(string lbl);
294-
295-
/** Gets a unique string describing this feature. */
296-
abstract string getId();
297-
}
298-
299277
/**
300278
* Provides the actual implementation of API graphs, cached for performance.
301279
*
@@ -345,8 +323,7 @@ module API {
345323
MkDef(DataFlow::Node nd) { rhs(_, _, nd) } or
346324
MkUse(DataFlow::SourceNode nd) { use(_, _, nd) } or
347325
MkCanonicalNameDef(CanonicalName n) { isDefined(n) } or
348-
MkCanonicalNameUse(CanonicalName n) { isUsed(n) } or
349-
MkAdditionalFeature(AdditionalFeature a)
326+
MkCanonicalNameUse(CanonicalName n) { isUsed(n) }
350327

351328
private predicate hasSemantics(DataFlow::Node nd) { not nd.getTopLevel().isExterns() }
352329

@@ -674,14 +651,6 @@ module API {
674651
lbl = Label::return() and
675652
succ = MkAsyncFuncResult(f)
676653
)
677-
or
678-
exists(AdditionalFeature a |
679-
pred = MkAdditionalFeature(a) and
680-
succ = a.getASuccessor(lbl)
681-
or
682-
pred = a.getAPredecessor(lbl) and
683-
succ = MkAdditionalFeature(a)
684-
)
685654
}
686655

687656
/**

0 commit comments

Comments
 (0)