Skip to content

Commit ef5935a

Browse files
committed
Do not use InlinedLoopConditionProfile yet (it is broken on Truffle)
1 parent 34d01b1 commit ef5935a

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/itertools/ZipLongestBuiltins.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
import com.oracle.truffle.api.nodes.Node;
7171
import com.oracle.truffle.api.profiles.ConditionProfile;
7272
import com.oracle.truffle.api.profiles.InlinedConditionProfile;
73-
import com.oracle.truffle.api.profiles.InlinedLoopConditionProfile;
7473
import com.oracle.truffle.api.profiles.LoopConditionProfile;
7574

7675
@CoreFunctions(extendClasses = {PythonBuiltinClassType.PZipLongest})
@@ -106,7 +105,7 @@ Object nextNoFillValue(VirtualFrame frame, PZipLongest self,
106105
/* @Shared */ @Cached IsBuiltinObjectProfile isStopIterationProfile,
107106
/* @Shared */ @Cached InlinedConditionProfile noItProfile,
108107
/* @Shared */ @Cached InlinedConditionProfile noActiveProfile,
109-
/* @Shared */ @Cached InlinedLoopConditionProfile loopProfile) {
108+
/* @Shared */ @Cached LoopConditionProfile loopProfile) {
110109
return next(frame, inliningTarget, self, PNone.NONE, nextNode, isStopIterationProfile, loopProfile, noItProfile, noActiveProfile);
111110
}
112111

@@ -117,16 +116,15 @@ Object next(VirtualFrame frame, PZipLongest self,
117116
/* @Shared */ @Cached IsBuiltinObjectProfile isStopIterationProfile,
118117
/* @Shared */ @Cached InlinedConditionProfile noItProfile,
119118
/* @Shared */ @Cached InlinedConditionProfile noActiveProfile,
120-
/* @Shared */ @Cached InlinedLoopConditionProfile loopProfile) {
119+
/* @Shared */ @Cached LoopConditionProfile loopProfile) {
121120
return next(frame, inliningTarget, self, self.getFillValue(), nextNode, isStopIterationProfile, loopProfile, noItProfile, noActiveProfile);
122121
}
123122

124123
private Object next(VirtualFrame frame, Node inliningTarget, PZipLongest self, Object fillValue, BuiltinFunctions.NextNode nextNode, IsBuiltinObjectProfile isStopIterationProfile,
125-
InlinedLoopConditionProfile loopProfile,
126-
InlinedConditionProfile noItProfile, InlinedConditionProfile noActiveProfile) {
124+
LoopConditionProfile loopProfile, InlinedConditionProfile noItProfile, InlinedConditionProfile noActiveProfile) {
127125
Object[] result = new Object[self.getItTuple().length];
128-
loopProfile.profileCounted(inliningTarget, result.length);
129-
for (int i = 0; loopProfile.inject(inliningTarget, i < result.length); i++) {
126+
loopProfile.profileCounted(result.length);
127+
for (int i = 0; loopProfile.inject(i < result.length); i++) {
130128
Object it = self.getItTuple()[i];
131129
Object item;
132130
if (noItProfile.profile(inliningTarget, it == PNone.NONE)) {

0 commit comments

Comments
 (0)