add missed change
This commit is contained in:
parent
4a8eca579e
commit
35fcde7d69
|
@ -660,13 +660,13 @@ function getCachedPredictionContext(context, contextCache, visited) {
|
||||||
if (context.isEmpty()) {
|
if (context.isEmpty()) {
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
var existing = visited[context.hashCode()] || null;
|
var existing = visited.get(context) || null;
|
||||||
if (existing !== null) {
|
if (existing !== null) {
|
||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
existing = contextCache.get(context);
|
existing = contextCache.get(context);
|
||||||
if (existing !== null) {
|
if (existing !== null) {
|
||||||
visited[context.hashCode()] = existing;
|
visited.put(context, existing);
|
||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
var changed = false;
|
var changed = false;
|
||||||
|
@ -686,7 +686,7 @@ function getCachedPredictionContext(context, contextCache, visited) {
|
||||||
}
|
}
|
||||||
if (!changed) {
|
if (!changed) {
|
||||||
contextCache.add(context);
|
contextCache.add(context);
|
||||||
visited[context.hashCode()] = context;
|
visited.put(context, context);
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
var updated = null;
|
var updated = null;
|
||||||
|
@ -699,8 +699,8 @@ function getCachedPredictionContext(context, contextCache, visited) {
|
||||||
updated = new ArrayPredictionContext(parents, context.returnStates);
|
updated = new ArrayPredictionContext(parents, context.returnStates);
|
||||||
}
|
}
|
||||||
contextCache.add(updated);
|
contextCache.add(updated);
|
||||||
visited[updated.hashCode()] = updated;
|
visited.put(updated, updated);
|
||||||
visited[context.hashCode()] = updated;
|
visited.put(context, updated);
|
||||||
|
|
||||||
return updated;
|
return updated;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue