mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
[PY-82607] introduce a caching for all computations in PyTypingTypeProvider
GitOrigin-RevId: ad795a4fc2bed8dc7f5276eb18c80a51485dcabf
This commit is contained in:
committed by
intellij-monorepo-bot
parent
98942f9977
commit
447a7d0891
@@ -52,7 +52,8 @@ public sealed class TypeEvalContext {
|
||||
|
||||
protected final Map<PyTypedElement, PyType> myEvaluated = createMap();
|
||||
protected final Map<PyCallable, PyType> myEvaluatedReturn = createMap();
|
||||
|
||||
@ApiStatus.Internal
|
||||
protected final Map<Pair<PyExpression, Object>, PyType> contextTypeCache = createMap();
|
||||
/**
|
||||
* AssumptionContext invariant requires that if type is in the map,
|
||||
* it's dependencies are also in the map, so we can't use softValueMap.
|
||||
@@ -330,6 +331,11 @@ public sealed class TypeEvalContext {
|
||||
return myConstraints.myOrigin;
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public @NotNull Map<Pair<PyExpression, Object>, PyType> getContextTypeCache() {
|
||||
return contextTypeCache;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return context constraints (see {@link TypeEvalConstraints}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user