Python: Get rid of some get...Object methods

This frees `Class.qll`, `Exprs.qll`, and `Function.qll` from the
clutches of points-to. For the somewhat complicated setup with
`getLiteralObject` (an abstract method), I opted for a slightly ugly but
workable solution of just defining a predicate on `ImmutableLiteral`
that inlines each predicate body, special-cased to the specific instance
to which it applies.
This commit is contained in:
Taus
2025-10-30 16:44:25 +00:00
parent 78c33ab55a
commit f0465f441f
8 changed files with 72 additions and 51 deletions

View File

@@ -87,9 +87,6 @@ class Function extends Function_, Scope, AstNode {
/** Gets the metrics for this function */
FunctionMetrics getMetrics() { result = this }
/** Gets the FunctionObject corresponding to this function */
FunctionObject getFunctionObject() { result.getOrigin() = this.getDefinition() }
/**
* Whether this function is a procedure, that is, it has no explicit return statement and always returns None.
* Note that generator and async functions are not procedures as they return generators and coroutines respectively.