|
25 | 25 | */
|
26 | 26 | package com.oracle.graal.python.builtins.modules;
|
27 | 27 |
|
| 28 | +import static com.oracle.graal.python.builtins.PythonBuiltinClassType.OverflowError; |
| 29 | +import static com.oracle.graal.python.builtins.PythonBuiltinClassType.TypeError; |
| 30 | +import static com.oracle.graal.python.builtins.PythonBuiltinClassType.ValueError; |
28 | 31 | import static com.oracle.graal.python.nodes.ErrorMessages.S_MUST_BE_S;
|
29 | 32 | import static com.oracle.graal.python.nodes.ErrorMessages.S_EXPECTED_GOT_P;
|
30 | 33 | import static com.oracle.graal.python.nodes.SpecialMethodNames.__COPY__;
|
| 34 | +import static com.oracle.graal.python.nodes.ErrorMessages.ARG_CANNOT_BE_NEGATIVE; |
| 35 | +import static com.oracle.graal.python.nodes.ErrorMessages.EXPECTED_INT_AS_R; |
| 36 | +import static com.oracle.graal.python.nodes.ErrorMessages.ISLICE_WRONG_ARGS; |
| 37 | +import static com.oracle.graal.python.nodes.ErrorMessages.MUST_BE_NON_NEGATIVE; |
| 38 | +import static com.oracle.graal.python.nodes.ErrorMessages.NUMBER_IS_REQUIRED; |
| 39 | +import static com.oracle.graal.python.nodes.ErrorMessages.STEP_FOR_ISLICE_MUST_BE; |
| 40 | +import static com.oracle.graal.python.nodes.ErrorMessages.S_FOR_ISLICE_MUST_BE; |
| 41 | +import static com.oracle.graal.python.nodes.SpecialMethodNames.__FLOAT__; |
| 42 | +import static com.oracle.graal.python.nodes.SpecialMethodNames.__INDEX__; |
| 43 | +import static com.oracle.graal.python.nodes.SpecialMethodNames.__INT__; |
31 | 44 |
|
32 | 45 | import com.oracle.graal.python.annotations.ArgumentClinic;
|
33 | 46 | import com.oracle.graal.python.builtins.Builtin;
|
34 | 47 | import java.util.List;
|
35 | 48 |
|
36 | 49 | import com.oracle.graal.python.builtins.CoreFunctions;
|
37 | 50 | import com.oracle.graal.python.builtins.PythonBuiltinClassType;
|
38 |
| -import static com.oracle.graal.python.builtins.PythonBuiltinClassType.OverflowError; |
39 |
| -import static com.oracle.graal.python.builtins.PythonBuiltinClassType.TypeError; |
40 |
| -import static com.oracle.graal.python.builtins.PythonBuiltinClassType.ValueError; |
41 | 51 | import com.oracle.graal.python.builtins.PythonBuiltins;
|
42 | 52 | import com.oracle.graal.python.builtins.modules.BuiltinFunctions.IterNode;
|
43 | 53 | import com.oracle.graal.python.builtins.objects.PNone;
|
44 | 54 | import com.oracle.graal.python.builtins.objects.function.PKeyword;
|
45 |
| -import com.oracle.graal.python.builtins.objects.itertools.CombinationsBuiltins; |
| 55 | +import com.oracle.graal.python.builtins.objects.iterator.IteratorNodes.ToArrayNode; |
46 | 56 | import com.oracle.graal.python.builtins.objects.itertools.PAccumulate;
|
47 | 57 | import com.oracle.graal.python.builtins.objects.itertools.PChain;
|
48 | 58 | import com.oracle.graal.python.builtins.objects.itertools.PCombinations;
|
|
70 | 80 | import com.oracle.graal.python.lib.PyObjectSizeNode;
|
71 | 81 | import com.oracle.graal.python.lib.PyObjectTypeCheck;
|
72 | 82 | import com.oracle.graal.python.nodes.ErrorMessages;
|
73 |
| -import static com.oracle.graal.python.nodes.ErrorMessages.ARG_CANNOT_BE_NEGATIVE; |
74 |
| -import static com.oracle.graal.python.nodes.ErrorMessages.EXPECTED_INT_AS_R; |
75 |
| -import static com.oracle.graal.python.nodes.ErrorMessages.ISLICE_WRONG_ARGS; |
76 |
| -import static com.oracle.graal.python.nodes.ErrorMessages.MUST_BE_NON_NEGATIVE; |
77 |
| -import static com.oracle.graal.python.nodes.ErrorMessages.NUMBER_IS_REQUIRED; |
78 |
| -import static com.oracle.graal.python.nodes.ErrorMessages.STEP_FOR_ISLICE_MUST_BE; |
79 |
| -import static com.oracle.graal.python.nodes.ErrorMessages.S_FOR_ISLICE_MUST_BE; |
80 |
| -import static com.oracle.graal.python.nodes.SpecialMethodNames.__FLOAT__; |
81 |
| -import static com.oracle.graal.python.nodes.SpecialMethodNames.__INDEX__; |
82 |
| -import static com.oracle.graal.python.nodes.SpecialMethodNames.__INT__; |
83 | 83 | import com.oracle.graal.python.nodes.builtins.ListNodes.FastConstructListNode;
|
84 | 84 | import com.oracle.graal.python.nodes.call.special.CallVarargsMethodNode;
|
85 | 85 | import com.oracle.graal.python.nodes.function.PythonBuiltinBaseNode;
|
@@ -180,7 +180,7 @@ protected ArgumentClinicProvider getArgumentClinic() {
|
180 | 180 | @Specialization(guards = {"isTypeNode.execute(cls)", "r >= 0"})
|
181 | 181 | Object construct(VirtualFrame frame, Object cls, Object iterable, int r,
|
182 | 182 | @SuppressWarnings("unused") @Cached IsTypeNode isTypeNode,
|
183 |
| - @Cached CombinationsBuiltins.IterableToArrayNode toArrayNode, |
| 183 | + @Cached ToArrayNode toArrayNode, |
184 | 184 | @Cached LoopConditionProfile indicesLoopProfile) {
|
185 | 185 | PCombinations self = factory().createCombinations(cls);
|
186 | 186 | self.setPool(toArrayNode.execute(frame, iterable));
|
@@ -230,7 +230,7 @@ protected ArgumentClinicProvider getArgumentClinic() {
|
230 | 230 | @Specialization(guards = {"isTypeNode.execute(cls)", "r >= 0"})
|
231 | 231 | Object construct(VirtualFrame frame, Object cls, Object iterable, int r,
|
232 | 232 | @SuppressWarnings("unused") @Cached IsTypeNode isTypeNode,
|
233 |
| - @Cached CombinationsBuiltins.IterableToArrayNode toArrayNode) { |
| 233 | + @Cached ToArrayNode toArrayNode) { |
234 | 234 | PCombinationsWithReplacement self = factory().createCombinationsWithReplacement(cls);
|
235 | 235 | self.setPool(toArrayNode.execute(frame, iterable));
|
236 | 236 | self.setR(r);
|
|
0 commit comments