|
131 | 131 | import com.oracle.graal.python.builtins.objects.method.PBuiltinMethod;
|
132 | 132 | import com.oracle.graal.python.builtins.objects.module.ModuleGetNameNode;
|
133 | 133 | import com.oracle.graal.python.builtins.objects.module.PythonModule;
|
134 |
| -import com.oracle.graal.python.builtins.objects.object.PythonObjectLibrary; |
135 | 134 | import com.oracle.graal.python.builtins.objects.str.NativeCharSequence;
|
136 | 135 | import com.oracle.graal.python.builtins.objects.str.PString;
|
137 | 136 | import com.oracle.graal.python.builtins.objects.type.PythonAbstractClass;
|
@@ -527,12 +526,10 @@ static Object doForeignObject(@SuppressWarnings("unused") CExtContext cextContex
|
527 | 526 |
|
528 | 527 | @Specialization(guards = "isFallback(object, isForeignObjectNode)")
|
529 | 528 | static Object run(@SuppressWarnings("unused") CExtContext cextContext, Object object,
|
530 |
| - @SuppressWarnings("unused") @Cached IsForeignObjectNode isForeignObjectNode, |
531 |
| - @CachedLibrary(limit = "3") PythonObjectLibrary lib) { |
| 529 | + @SuppressWarnings("unused") @Cached IsForeignObjectNode isForeignObjectNode) { |
532 | 530 | assert object != null : "Java 'null' cannot be a Sulong value";
|
533 |
| - Object o = lib.getDelegatedValue(object); |
534 |
| - assert CApiGuards.isNativeWrapper(o) : "unknown object cannot be a Sulong value"; |
535 |
| - return o; |
| 531 | + assert CApiGuards.isNativeWrapper(object) : "unknown object cannot be a Sulong value"; |
| 532 | + return object; |
536 | 533 | }
|
537 | 534 |
|
538 | 535 | protected static PythonClassNativeWrapper wrapNativeClass(PythonManagedClass object) {
|
@@ -796,9 +793,8 @@ static Object doForeignObject(CExtContext cextContext, TruffleObject object,
|
796 | 793 |
|
797 | 794 | @Specialization(guards = "isFallback(object, isForeignObjectNode)")
|
798 | 795 | static Object run(CExtContext cextContext, Object object,
|
799 |
| - @Cached IsForeignObjectNode isForeignObjectNode, |
800 |
| - @CachedLibrary(limit = "3") PythonObjectLibrary lib) { |
801 |
| - return ToSulongNode.run(cextContext, object, isForeignObjectNode, lib); |
| 796 | + @Cached IsForeignObjectNode isForeignObjectNode) { |
| 797 | + return ToSulongNode.run(cextContext, object, isForeignObjectNode); |
802 | 798 | }
|
803 | 799 |
|
804 | 800 | protected static PythonClassNativeWrapper wrapNativeClass(PythonManagedClass object) {
|
@@ -972,9 +968,8 @@ static Object doForeignObject(CExtContext cextContext, TruffleObject object,
|
972 | 968 |
|
973 | 969 | @Specialization(guards = "isFallback(object, isForeignObjectNode)")
|
974 | 970 | static Object run(CExtContext cextContext, Object object,
|
975 |
| - @Cached IsForeignObjectNode isForeignObjectNode, |
976 |
| - @CachedLibrary(limit = "3") PythonObjectLibrary lib) { |
977 |
| - return ToSulongNode.run(cextContext, object, isForeignObjectNode, lib); |
| 971 | + @Cached IsForeignObjectNode isForeignObjectNode) { |
| 972 | + return ToSulongNode.run(cextContext, object, isForeignObjectNode); |
978 | 973 | }
|
979 | 974 |
|
980 | 975 | protected static PythonClassNativeWrapper wrapNativeClass(PythonManagedClass object) {
|
|
0 commit comments