|
83 | 83 | import com.oracle.graal.python.builtins.objects.cext.capi.CExtNodes.ToSulongNode;
|
84 | 84 | import com.oracle.graal.python.builtins.objects.cext.capi.CExtNodes.TransformExceptionToNativeNode;
|
85 | 85 | import com.oracle.graal.python.builtins.objects.cext.capi.DynamicObjectNativeWrapper.PrimitiveNativeWrapper;
|
86 |
| -import com.oracle.graal.python.builtins.objects.cext.capi.ExternalFunctionNodes.CheckPrimitiveFunctionResultNode; |
87 | 86 | import com.oracle.graal.python.builtins.objects.dict.DictBuiltins.ItemsNode;
|
88 | 87 | import com.oracle.graal.python.builtins.objects.dict.DictBuiltins.KeysNode;
|
89 | 88 | import com.oracle.graal.python.builtins.objects.dict.DictBuiltins.ValuesNode;
|
|
117 | 116 | import com.oracle.graal.python.nodes.subscript.SliceLiteralNode;
|
118 | 117 | import com.oracle.graal.python.nodes.truffle.PythonTypes;
|
119 | 118 | import com.oracle.graal.python.runtime.ExecutionContext.IndirectCallContext;
|
120 |
| -import com.oracle.graal.python.runtime.PythonContext; |
121 | 119 | import com.oracle.graal.python.runtime.exception.PException;
|
122 | 120 | import com.oracle.truffle.api.CompilerDirectives;
|
123 | 121 | import com.oracle.truffle.api.dsl.Cached;
|
@@ -945,11 +943,8 @@ static boolean check(Object object,
|
945 | 943 | static Object doNative(VirtualFrame frame, Object object,
|
946 | 944 | @Cached ToSulongNode toSulongNode,
|
947 | 945 | @Cached PCallCapiFunction callCapiFunction,
|
948 |
| - @Cached CheckPrimitiveFunctionResultNode checkFunctionResultNode, |
949 | 946 | @Cached TransformExceptionToNativeNode transformExceptionToNativeNode) {
|
950 |
| - Object result = callCapiFunction.call(FUN_PY_TRUFFLE_PY_SEQUENCE_CHECK, toSulongNode.execute(object)); |
951 |
| - checkFunctionResultNode.execute(PythonContext.get(callCapiFunction), FUN_PY_TRUFFLE_PY_SEQUENCE_CHECK.getName(), result); |
952 |
| - return result; |
| 947 | + return callCapiFunction.call(FUN_PY_TRUFFLE_PY_SEQUENCE_CHECK, toSulongNode.execute(object)); |
953 | 948 | }
|
954 | 949 | }
|
955 | 950 |
|
@@ -1004,13 +999,10 @@ static Object doSequence(VirtualFrame frame, Object obj,
|
1004 | 999 | Object doNative(VirtualFrame frame, Object obj,
|
1005 | 1000 | @Cached ToSulongNode toSulongNode,
|
1006 | 1001 | @Cached PCallCapiFunction callCapiFunction,
|
1007 |
| - @Cached CheckPrimitiveFunctionResultNode checkFunctionResultNode, |
1008 | 1002 | @Cached TransformExceptionToNativeNode transformExceptionToNativeNode) {
|
1009 | 1003 | Object state = IndirectCallContext.enter(frame, this);
|
1010 | 1004 | try {
|
1011 |
| - Object result = callCapiFunction.call(FUN_PY_TRUFFLE_PY_SEQUENCE_SIZE, toSulongNode.execute(obj)); |
1012 |
| - checkFunctionResultNode.execute(PythonContext.get(callCapiFunction), FUN_PY_TRUFFLE_PY_SEQUENCE_SIZE.getName(), result); |
1013 |
| - return result; |
| 1005 | + return callCapiFunction.call(FUN_PY_TRUFFLE_PY_SEQUENCE_SIZE, toSulongNode.execute(obj)); |
1014 | 1006 | } catch (PException e) {
|
1015 | 1007 | transformExceptionToNativeNode.execute(frame, e);
|
1016 | 1008 | return -1;
|
@@ -1079,13 +1071,10 @@ Object size(VirtualFrame frame, Object obj,
|
1079 | 1071 | @Cached ToSulongNode toSulongNode,
|
1080 | 1072 | @Cached AsPythonObjectNode asPythonObjectNode,
|
1081 | 1073 | @Cached PCallCapiFunction callCapiFunction,
|
1082 |
| - @Cached CheckPrimitiveFunctionResultNode checkFunctionResultNode, |
1083 | 1074 | @Cached TransformExceptionToNativeNode transformExceptionToNativeNode) {
|
1084 | 1075 | Object state = IndirectCallContext.enter(frame, this);
|
1085 | 1076 | try {
|
1086 |
| - Object result = callCapiFunction.call(FUN_PY_TRUFFLE_PY_OBJECT_SIZE, toSulongNode.execute(obj)); |
1087 |
| - checkFunctionResultNode.execute(PythonContext.get(callCapiFunction), FUN_PY_TRUFFLE_PY_OBJECT_SIZE.getName(), result); |
1088 |
| - return result; |
| 1077 | + return callCapiFunction.call(FUN_PY_TRUFFLE_PY_OBJECT_SIZE, toSulongNode.execute(obj)); |
1089 | 1078 | } catch (PException e) {
|
1090 | 1079 | transformExceptionToNativeNode.execute(frame, e);
|
1091 | 1080 | return -1;
|
@@ -1213,11 +1202,8 @@ static boolean doPythonObject(Object object,
|
1213 | 1202 | static Object doNative(VirtualFrame frame, Object obj,
|
1214 | 1203 | @Cached ToSulongNode toSulongNode,
|
1215 | 1204 | @Cached PCallCapiFunction callCapiFunction,
|
1216 |
| - @Cached CheckPrimitiveFunctionResultNode checkFunctionResultNode, |
1217 | 1205 | @Cached TransformExceptionToNativeNode transformExceptionToNativeNode) {
|
1218 |
| - Object result = callCapiFunction.call(FUN_PY_TRUFFLE_PY_MAPPING_CHECK, toSulongNode.execute(obj)); |
1219 |
| - checkFunctionResultNode.execute(PythonContext.get(callCapiFunction), FUN_PY_TRUFFLE_PY_MAPPING_CHECK.getName(), result); |
1220 |
| - return result; |
| 1206 | + return callCapiFunction.call(FUN_PY_TRUFFLE_PY_MAPPING_CHECK, toSulongNode.execute(obj)); |
1221 | 1207 | }
|
1222 | 1208 | }
|
1223 | 1209 |
|
@@ -1247,12 +1233,9 @@ static int doMapping(VirtualFrame frame, Object obj,
|
1247 | 1233 | static Object doNative(VirtualFrame frame, Object obj,
|
1248 | 1234 | @Cached ToSulongNode toSulongNode,
|
1249 | 1235 | @Cached PCallCapiFunction callCapiFunction,
|
1250 |
| - @Cached CheckPrimitiveFunctionResultNode checkFunctionResultNode, |
1251 | 1236 | @Cached TransformExceptionToNativeNode transformExceptionToNativeNode) {
|
1252 | 1237 | try {
|
1253 |
| - Object result = callCapiFunction.call(FUN_PY_TRUFFLE_PY_MAPPING_SIZE, toSulongNode.execute(obj)); |
1254 |
| - checkFunctionResultNode.execute(PythonContext.get(callCapiFunction), FUN_PY_TRUFFLE_PY_MAPPING_SIZE.getName(), result); |
1255 |
| - return result; |
| 1238 | + return callCapiFunction.call(FUN_PY_TRUFFLE_PY_MAPPING_SIZE, toSulongNode.execute(obj)); |
1256 | 1239 | } catch (PException e) {
|
1257 | 1240 | transformExceptionToNativeNode.execute(frame, e);
|
1258 | 1241 | return -1;
|
|
0 commit comments