use of com.jetbrains.python.codeInsight.dataflow.scope.impl.ScopeImpl in project intellij-community by JetBrains.
the class ControlFlowCache method getScope.
@NotNull
public static Scope getScope(@NotNull ScopeOwner element) {
SoftReference<Scope> ref = element.getUserData(SCOPE_KEY);
Scope scope = SoftReference.dereference(ref);
if (scope == null) {
scope = new ScopeImpl(element);
element.putUserData(SCOPE_KEY, new SoftReference<>(scope));
}
return scope;
}