mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[debugger-dfa] Remove repeating values from jdiValueMap
GitOrigin-RevId: 10a0fcc7a289a994693ef77ef957008008a0eee8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
40cc02ba8e
commit
55933d65d3
+9
-10
@@ -161,16 +161,15 @@ public class DebuggerDfaRunner {
|
||||
Set<VariableDescriptor> descriptors = StreamEx.of(flow.getInstructions()).flatCollection(inst -> inst.getRequiredDescriptors(factory))
|
||||
.toSet();
|
||||
Map<Value, List<DfaVariableValue>> myMap = new HashMap<>();
|
||||
for (DfaValue dfaValue : factory.getValues().toArray(DfaValue.EMPTY_ARRAY)) {
|
||||
StreamEx<DfaVariableValue> stream = StreamEx.of(descriptors)
|
||||
.map(desc -> desc.createValue(factory, dfaValue))
|
||||
.append(dfaValue)
|
||||
.select(DfaVariableValue.class);
|
||||
for (DfaVariableValue dfaVar : stream) {
|
||||
Value jdiValue = resolveJdiValue(provider, anchor, proxy, dfaVar);
|
||||
if (jdiValue != null) {
|
||||
myMap.computeIfAbsent(jdiValue, v -> new ArrayList<>()).add(dfaVar);
|
||||
}
|
||||
StreamEx<DfaVariableValue> stream =
|
||||
StreamEx.of(factory.getValues().toArray(DfaValue.EMPTY_ARRAY))
|
||||
.flatMap(dfaValue -> StreamEx.of(descriptors).map(desc -> desc.createValue(factory, dfaValue)).append(dfaValue))
|
||||
.select(DfaVariableValue.class)
|
||||
.distinct();
|
||||
for (DfaVariableValue dfaVar : stream) {
|
||||
Value jdiValue = resolveJdiValue(provider, anchor, proxy, dfaVar);
|
||||
if (jdiValue != null) {
|
||||
myMap.computeIfAbsent(jdiValue, v -> new ArrayList<>()).add(dfaVar);
|
||||
}
|
||||
}
|
||||
return myMap;
|
||||
|
||||
Reference in New Issue
Block a user