Skip to content

Commit 94dc19f

Browse files
committed
GeneratorExpressionNode: remove unnecessary slow path profile
1 parent 91b11de commit 94dc19f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/function/GeneratorExpressionNode.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import com.oracle.truffle.api.frame.FrameDescriptor;
3838
import com.oracle.truffle.api.frame.VirtualFrame;
3939
import com.oracle.truffle.api.nodes.RootNode;
40-
import com.oracle.truffle.api.profiles.ConditionProfile;
4140

4241
public final class GeneratorExpressionNode extends ExpressionDefinitionNode {
4342

@@ -54,8 +53,6 @@ public final class GeneratorExpressionNode extends ExpressionDefinitionNode {
5453
@CompilationFinal private boolean isOptimized;
5554
@Child private PNode getIterator;
5655

57-
@CompilationFinal private ConditionProfile iteratorProfile = ConditionProfile.createBinaryProfile();
58-
5956
public GeneratorExpressionNode(String name, RootCallTarget callTarget, PNode getIterator, FrameDescriptor descriptor, DefinitionCellSlots definitionCellSlots,
6057
ExecutionCellSlots executionCellSlots,
6158
int numOfActiveFlags, int numOfGeneratorBlockNode, int numOfGeneratorForNode) {
@@ -125,7 +122,7 @@ public RootNode getFunctionRootNode() {
125122
@Override
126123
public Object execute(VirtualFrame frame) {
127124
Object[] arguments;
128-
if (iteratorProfile.profile(getIterator == null)) {
125+
if (getIterator == null) {
129126
arguments = PArguments.create(0);
130127
} else {
131128
arguments = PArguments.create(1);

0 commit comments

Comments
 (0)