File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/expression Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 44
44
import com .oracle .truffle .api .dsl .ImportStatic ;
45
45
import com .oracle .truffle .api .dsl .Specialization ;
46
46
import com .oracle .truffle .api .frame .VirtualFrame ;
47
+ import com .oracle .truffle .api .instrumentation .GenerateWrapper ;
48
+ import com .oracle .truffle .api .instrumentation .ProbeNode ;
47
49
import com .oracle .truffle .api .interop .Message ;
48
50
import com .oracle .truffle .api .interop .TruffleObject ;
49
51
52
+ @ GenerateWrapper
50
53
public abstract class CastToBooleanNode extends UnaryOpNode {
51
54
protected final IsBuiltinClassProfile isBuiltinClassProfile = IsBuiltinClassProfile .create ();
52
55
56
+ @ Override
57
+ public WrapperNode createWrapper (ProbeNode probe ) {
58
+ return new CastToBooleanNodeWrapper (this , probe );
59
+ }
60
+
53
61
public static CastToBooleanNode createIfTrueNode () {
54
62
return YesNodeGen .create (null );
55
63
}
@@ -71,7 +79,9 @@ public static CastToBooleanNode createIfFalseNode(ExpressionNode operand) {
71
79
@ Override
72
80
public abstract boolean executeBoolean (VirtualFrame frame );
73
81
74
- public abstract boolean executeWith (Object value );
82
+ public final boolean executeWith (Object value ) {
83
+ return executeBoolean (null , value );
84
+ }
75
85
76
86
@ ImportStatic (Message .class )
77
87
public abstract static class YesNode extends CastToBooleanNode {
You can’t perform that action at this time.
0 commit comments