Skip to content

Commit a6c8dbf

Browse files
committed
ObjectHashMap: fix profiles reporting in forEachUntyped
1 parent b7e35c8 commit a6c8dbf

File tree

1 file changed

+3
-3
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/common

1 file changed

+3
-3
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/common/ObjectHashMap.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,14 +241,14 @@ public void setSideEffectingKeysFlag() {
241241

242242
public Object forEachUntyped(ForEachNode<Object> node, Object argIn, LoopConditionProfile loopProfile) {
243243
Object arg = argIn;
244-
for (int i = 0; loopProfile.profile(i < usedHashes); i++) {
244+
loopProfile.profileCounted(usedHashes);
245+
LoopNode.reportLoopCount(node, usedHashes);
246+
for (int i = 0; loopProfile.inject(i < usedHashes); i++) {
245247
Object key = getKey(i);
246248
if (key != null) {
247-
LoopNode.reportLoopCount(node, i);
248249
arg = node.execute(key, arg);
249250
}
250251
}
251-
LoopNode.reportLoopCount(node, usedHashes);
252252
return arg;
253253
}
254254

0 commit comments

Comments
 (0)