@@ -1631,7 +1631,7 @@ public Object check(VirtualFrame frame, Object obj,
1631
1631
@ GenerateNodeFactory
1632
1632
public abstract static class PyBytesConcatNode extends PythonBinaryBuiltinNode {
1633
1633
@ Specialization
1634
- public Object concat (VirtualFrame frame , PBytes original , PBytes newPart ,
1634
+ public Object concat (VirtualFrame frame , PBytes original , Object newPart ,
1635
1635
@ Cached AddNode addNode ,
1636
1636
@ Cached TransformExceptionToNativeNode transformExceptionToNativeNode ,
1637
1637
@ Cached GetNativeNullNode getNativeNullNode ) {
@@ -1643,23 +1643,23 @@ public Object concat(VirtualFrame frame, PBytes original, PBytes newPart,
1643
1643
}
1644
1644
}
1645
1645
1646
- @ Specialization (guards = {"!isPBytes(obj )" , "isBytesSubtype(frame, obj , getClassNode, isSubtypeNode)" })
1647
- public Object concatNative (VirtualFrame frame , @ SuppressWarnings ("unused" ) Object obj ,
1646
+ @ Specialization (guards = {"!isPBytes(original )" , "isBytesSubtype(frame, original , getClassNode, isSubtypeNode)" })
1647
+ public Object concatNative (VirtualFrame frame , @ SuppressWarnings ("unused" ) Object original , @ SuppressWarnings ( "unused" ) Object newPart ,
1648
1648
@ SuppressWarnings ("unused" ) @ Cached GetClassNode getClassNode ,
1649
1649
@ SuppressWarnings ("unused" ) @ Cached IsSubtypeNode isSubtypeNode ,
1650
1650
@ Cached GetNativeNullNode getNativeNullNode ,
1651
1651
@ Cached PRaiseNativeNode raiseNativeNode ) {
1652
1652
return raiseNativeNode .raise (frame , getNativeNullNode .execute (), PythonBuiltinClassType .NotImplementedError , NATIVE_S_SUBTYPES_NOT_IMPLEMENTED , "bytes" );
1653
1653
}
1654
1654
1655
- @ Specialization (guards = {"!isPBytes(obj )" , "!isBytesSubtype(frame, obj , getClassNode, isSubtypeNode)" })
1656
- public Object concat (VirtualFrame frame , Object obj ,
1655
+ @ Specialization (guards = {"!isPBytes(original )" , "!isBytesSubtype(frame, original , getClassNode, isSubtypeNode)" })
1656
+ public Object concat (VirtualFrame frame , Object original , @ SuppressWarnings ( "unused" ) Object newPart ,
1657
1657
@ SuppressWarnings ("unused" ) @ Cached GetClassNode getClassNode ,
1658
1658
@ SuppressWarnings ("unused" ) @ Cached IsSubtypeNode isSubtypeNode ,
1659
1659
@ Cached StrNode strNode ,
1660
1660
@ Cached GetNativeNullNode getNativeNullNode ,
1661
1661
@ Cached PRaiseNativeNode raiseNativeNode ) {
1662
- return raiseNativeNode .raise (frame , getNativeNullNode .execute (), SystemError , BAD_ARG_TO_INTERNAL_FUNC_WAS_S_P , strNode .executeWith (frame , obj ), obj );
1662
+ return raiseNativeNode .raise (frame , getNativeNullNode .execute (), SystemError , BAD_ARG_TO_INTERNAL_FUNC_WAS_S_P , strNode .executeWith (frame , original ), original );
1663
1663
}
1664
1664
1665
1665
protected boolean isBytesSubtype (VirtualFrame frame , Object obj , GetClassNode getClassNode , IsSubtypeNode isSubtypeNode ) {
@@ -1671,7 +1671,7 @@ protected boolean isBytesSubtype(VirtualFrame frame, Object obj, GetClassNode ge
1671
1671
@ GenerateNodeFactory
1672
1672
public abstract static class PyBytesJoinNode extends PythonBinaryBuiltinNode {
1673
1673
@ Specialization
1674
- public Object join (VirtualFrame frame , PBytes original , PBytes newPart ,
1674
+ public Object join (VirtualFrame frame , PBytes original , Object newPart ,
1675
1675
@ Cached JoinNode joinNode ,
1676
1676
@ Cached TransformExceptionToNativeNode transformExceptionToNativeNode ,
1677
1677
@ Cached GetNativeNullNode getNativeNullNode ) {
@@ -1683,23 +1683,23 @@ public Object join(VirtualFrame frame, PBytes original, PBytes newPart,
1683
1683
}
1684
1684
}
1685
1685
1686
- @ Specialization (guards = {"!isPBytes(obj )" , "isBytesSubtype(frame, obj , getClassNode, isSubtypeNode)" })
1687
- public Object joinNative (VirtualFrame frame , @ SuppressWarnings ("unused" ) Object obj ,
1686
+ @ Specialization (guards = {"!isPBytes(original )" , "isBytesSubtype(frame, original , getClassNode, isSubtypeNode)" })
1687
+ public Object joinNative (VirtualFrame frame , @ SuppressWarnings ("unused" ) Object original , @ SuppressWarnings ( "unused" ) Object newPart ,
1688
1688
@ SuppressWarnings ("unused" ) @ Cached GetClassNode getClassNode ,
1689
1689
@ SuppressWarnings ("unused" ) @ Cached IsSubtypeNode isSubtypeNode ,
1690
1690
@ Cached PRaiseNativeNode raiseNativeNode ,
1691
1691
@ Cached GetNativeNullNode getNativeNullNode ) {
1692
1692
return raiseNativeNode .raise (frame , getNativeNullNode .execute (), PythonBuiltinClassType .NotImplementedError , NATIVE_S_SUBTYPES_NOT_IMPLEMENTED , "bytes" );
1693
1693
}
1694
1694
1695
- @ Specialization (guards = {"!isPBytes(obj )" , "!isBytesSubtype(frame, obj , getClassNode, isSubtypeNode)" })
1696
- public Object join (VirtualFrame frame , Object obj ,
1695
+ @ Specialization (guards = {"!isPBytes(original )" , "!isBytesSubtype(frame, original , getClassNode, isSubtypeNode)" })
1696
+ public Object join (VirtualFrame frame , @ SuppressWarnings ( "unused" ) Object original , @ SuppressWarnings ( "unused" ) Object newPart ,
1697
1697
@ SuppressWarnings ("unused" ) @ Cached GetClassNode getClassNode ,
1698
1698
@ SuppressWarnings ("unused" ) @ Cached IsSubtypeNode isSubtypeNode ,
1699
1699
@ Cached StrNode strNode ,
1700
1700
@ Cached PRaiseNativeNode raiseNativeNode ,
1701
1701
@ Cached GetNativeNullNode getNativeNullNode ) {
1702
- return raiseNativeNode .raise (frame , getNativeNullNode .execute (), SystemError , BAD_ARG_TO_INTERNAL_FUNC_WAS_S_P , strNode .executeWith (frame , obj ), obj );
1702
+ return raiseNativeNode .raise (frame , getNativeNullNode .execute (), SystemError , BAD_ARG_TO_INTERNAL_FUNC_WAS_S_P , strNode .executeWith (frame , original ), original );
1703
1703
}
1704
1704
1705
1705
protected boolean isBytesSubtype (VirtualFrame frame , Object obj , GetClassNode getClassNode , IsSubtypeNode isSubtypeNode ) {
0 commit comments