Source

pypy / pypy / rpython / rstr.py

The branch 'remove-globals-in-jit' does not exist.
Diff from to

pypy/rpython/rstr.py

         hop.exception_is_here()
         return hop.gendirectcall(self.ll.ll_str2unicode, v_str)
 
+    def rtype_bytearray(self, hop):
+        if hop.args_s[0].is_constant():
+            # convertion errors occur during annotation, so cannot any more:
+            hop.exception_cannot_occur()
+            return hop.inputconst(hop.r_result, hop.s_result.const)
+        hop.exception_is_here()
+        return hop.gendirectcall(self.ll.ll_str2bytearray,
+                                 hop.inputarg(hop.args_r[0].repr, 0))
+
     def rtype_method_decode(self, hop):
         if not hop.args_s[1].is_constant():
             raise TyperError("encoding must be a constant")