bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def __toRDF(self): """ Dump mailing list into a RDF file """
def __toRDF(self): """ Dump mailing list into a RDF file """
452,300
def buildStubs(): global py_types global py_return_types global unknown_types try: f = open(os.path.join(srcPref,"libvirt-api.xml")) data = f.read() (parser, target) = getparser() parser.feed(data) parser.close() except IOError, msg: try: f = open(os.path.join(srcPref,"..","docs","libvirt-api.xml")) data = f.read() (...
def buildStubs(): global py_types global py_return_types global unknown_types try: f = open(os.path.join(srcPref,"libvirt-api.xml")) data = f.read() (parser, target) = getparser() parser.feed(data) parser.close() except IOError, msg: try: f = open(os.path.join(srcPref,"..","docs","libvirt-api.xml")) data = f.read() (...
452,301
def dispatchDomainEventLifecycleCallback(self, dom, event, detail, cbData): """Dispatches events to python user domain event callbacks """ cb = cbData["cb"] opaque = cbData["opaque"]
def dispatchDomainEventLifecycleCallback(self, dom, event, detail, cbData): """Dispatches events to python user domain lifecycle event callbacks """ cb = cbData["cb"] opaque = cbData["opaque"]
452,302
def dispatchDomainEventGenericCallback(self, dom, cbData): """Dispatches events to python user domain event callbacks """ try: cb = cbData["cb"] opaque = cbData["opaque"]
def dispatchDomainEventGenericCallback(self, dom, cbData): """Dispatches events to python user domain generic event callbacks """ try: cb = cbData["cb"] opaque = cbData["opaque"]
452,303
def enum(type, name, value): if not enums.has_key(type): enums[type] = {} enums[type][name] = value
def enum(type, name, value): if not enums.has_key(type): enums[type] = {} enums[type][name] = value
452,304
def buildStubs(): global py_types global py_return_types global unknown_types try: f = open(os.path.join(srcPref,"libvirt-api.xml")) data = f.read() (parser, target) = getparser() parser.feed(data) parser.close() except IOError, msg: try: f = open(os.path.join(srcPref,"..","docs","libvirt-api.xml")) data = f.read() (...
def buildStubs(): global py_types global py_return_types global unknown_types try: f = open(os.path.join(srcPref,"libvirt-api.xml")) data = f.read() (parser, target) = getparser() parser.feed(data) parser.close() except IOError, msg: try: f = open(os.path.join(srcPref,"..","docs","libvirt-api.xml")) data = f.read() (...
452,305
def buildWrappers(): global ctypes global py_types global py_return_types global unknown_types global functions global function_classes global classes_type global classes_list global converter_type global primary_classes global converter_type global classes_ancestor global converter_type global primary_classes global c...
def buildWrappers(): global ctypes global py_types global py_return_types global unknown_types global functions global function_classes global classes_type global classes_list global converter_type global primary_classes global converter_type global classes_ancestor global converter_type global primary_classes global c...
452,306
def dispatchDomainEventIOErrorCallback(self, dom, srcPath, devAlias, action, cbData): """Dispatches events to python user domain IO error event callbacks """ try: cb = cbData["cb"] opaque = cbData["opaque"]
def dispatchDomainEventIOErrorCallback(self, dom, srcPath, devAlias, action, cbData): """Dispatches events to python user domain IO error event callbacks """ try: cb = cbData["cb"] opaque = cbData["opaque"]
452,307
def login (self,server,username,password='',terminal_type='ansi',original_prompt=r"[#$]",login_timeout=10,port=None,auto_prompt_reset=True):
def login (self,server,username,password='',terminal_type='ansi',original_prompt=r"[#$]",login_timeout=10,port=None,auto_prompt_reset=True):
452,308
def __recvall(self, bytes): """__recvall(bytes) -> data Receive EXACTLY the number of bytes requested from the socket. Blocks until the required number of bytes have been received. """ data = "" while len(data) < bytes: d = self.recv(bytes-len(data)) if not d: raise GeneralProxyError("connection closed unexpectedly") d...
def __recvall(self, count): """__recvall(count) -> data Receive EXACTLY the number of bytes requested from the socket. Blocks until the required number of bytes have been received. """ data = "" while len(data) < bytes: d = self.recv(bytes-len(data)) if not d: raise GeneralProxyError("connection closed unexpectedly") d...
452,309
def __recvall(self, bytes): """__recvall(bytes) -> data Receive EXACTLY the number of bytes requested from the socket. Blocks until the required number of bytes have been received. """ data = "" while len(data) < bytes: d = self.recv(bytes-len(data)) if not d: raise GeneralProxyError("connection closed unexpectedly") d...
def __recvall(self, bytes): """__recvall(bytes) -> data Receive EXACTLY the number of bytes requested from the socket. Blocks until the required number of bytes have been received. """ data = bytes("") while len(data) < count: d = self.recv(count-len(data)).decode() if not d: raise GeneralProxyError((0,"connection clos...
452,310
def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setpr...
def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setpr...
452,311
def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setpr...
def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setpr...
452,312
def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setpr...
def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setpr...
452,313
def __negotiatesocks4(self,destaddr,destport): """__negotiatesocks4(self,destaddr,destport) Negotiates a connection through a SOCKS4 server. """ # Check if the destination address provided is an IP address rmtrslv = False try: ipaddr = socket.inet_aton(destaddr) except socket.error: # It's a DNS name. Check where it sh...
def __negotiatesocks4(self,destaddr,destport): """__negotiatesocks4(self,destaddr,destport) Negotiates a connection through a SOCKS4 server. """ # Check if the destination address provided is an IP address rmtrslv = False try: ipaddr = socket.inet_aton(destaddr) except socket.error: # It's a DNS name. Check where it sh...
452,314
def __negotiatesocks4(self,destaddr,destport): """__negotiatesocks4(self,destaddr,destport) Negotiates a connection through a SOCKS4 server. """ # Check if the destination address provided is an IP address rmtrslv = False try: ipaddr = socket.inet_aton(destaddr) except socket.error: # It's a DNS name. Check where it sh...
def __negotiatesocks4(self,destaddr,destport): """__negotiatesocks4(self,destaddr,destport) Negotiates a connection through a SOCKS4 server. """ # Check if the destination address provided is an IP address rmtrslv = False try: ipaddr = socket.inet_aton(destaddr) except socket.error: # It's a DNS name. Check where it sh...
452,315
def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setpr...
def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setpr...
452,316
def write_ch (self, ch):
def write_ch (self, ch):
452,317
def write_ch (self, ch):
def write_ch (self, ch):
452,318
def write_ch (self, ch):
def write_ch (self, ch):
452,319
def write_ch (self, ch):
defwrite_ch(self,ch):
452,320
def __recvall(self, bytes): """__recvall(bytes) -> data Receive EXACTLY the number of bytes requested from the socket. Blocks until the required number of bytes have been received. """ data = "" while len(data) < bytes: data = data + self.recv(bytes-len(data)) return data
def __recvall(self, bytes): """__recvall(bytes) -> data Receive EXACTLY the number of bytes requested from the socket. Blocks until the required number of bytes have been received. """ data = "" while len(data) < bytes: d = self.recv(bytes-len(data)) if not d: raise GeneralProxyError("connection closed unexpectedly") d...
452,321
def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setpr...
def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setpr...
452,322
def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setpr...
def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setpr...
452,323
def sendall(self, bytes): if 'encode' in dir(bytes): bytes = bytes.encode() socket.socket.sendall(self, bytes)
def sendall(self, bytes): if 'encode' in dir(bytes): try: bytes = bytes.encode() except Exception: pass socket.socket.sendall(self, bytes)
452,324
def __recvall(self, count): """__recvall(count) -> data Receive EXACTLY the number of bytes requested from the socket. Blocks until the required number of bytes have been received. """ data = bytes("") while len(data) < count: d = self.recv(count-len(data)).decode() if not d: raise GeneralProxyError((0,"connection clos...
def __recvall(self, count): """__recvall(count) -> data Receive EXACTLY the number of bytes requested from the socket. Blocks until the required number of bytes have been received. """ data = bytes("") while len(data) < count: d = self.recv(count-len(data)).decode() if not d: raise GeneralProxyError((0,"connection clos...
452,325
def sendall(self, bytes): if 'encode' in dir(bytes): try: bytes = bytes.encode() except Exception: pass socket.socket.sendall(self, bytes)
def sendall(self, bytes): if 'encode' in dir(bytes): try: bytes = bytes.encode() except Exception: pass return bytes def __recvall(self, count): """__recvall(count) -> data Receive EXACTLY the number of bytes requested from the socket. Blocks until the required number of bytes have been received. """ data = bytes("") ...
452,326
def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setpr...
def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setpr...
452,327
def __negotiatesocks4(self,destaddr,destport): """__negotiatesocks4(self,destaddr,destport) Negotiates a connection through a SOCKS4 server. """ # Check if the destination address provided is an IP address rmtrslv = False try: ipaddr = socket.inet_aton(destaddr) except socket.error: # It's a DNS name. Check where it sh...
def __negotiatesocks4(self,destaddr,destport): """__negotiatesocks4(self,destaddr,destport) Negotiates a connection through a SOCKS4 server. """ # Check if the destination address provided is an IP address rmtrslv = False try: ipaddr = socket.inet_aton(destaddr) except socket.error: # It's a DNS name. Check where it sh...
452,328
def test_invalid_loop_1(self): ops = """ [p1] guard_isnull(p1) [] # p2 = new_with_vtable(ConstClass(node_vtable)) jump(p2) """ py.test.raises(InvalidLoop, self.optimize_loop, ops, 'Virtual(node_vtable)', None)
def test_invalid_loop_1(self): ops = """ [p1] guard_isnull(p1) [] # p2 = new_with_vtable(ConstClass(node_vtable)) jump(p2) """ py.test.raises(InvalidLoop, self.optimize_loop, ops, 'Virtual(node_vtable)', None)
452,329
def test_invalid_loop_2(self): py.test.skip("this would fail if we had Fixed again in the specnodes") ops = """ [p1] guard_class(p1, ConstClass(node_vtable2)) [] # p2 = new_with_vtable(ConstClass(node_vtable)) escape(p2) # prevent it from staying Virtual jump(p2) """ py.test.raises(InvalidLoop, self.optimize_loop,...
def test_invalid_loop_2(self): ops = """ [p1] guard_class(p1, ConstClass(node_vtable2)) [] # p2 = new_with_vtable(ConstClass(node_vtable)) escape(p2) # prevent it from staying Virtual jump(p2) """ py.test.raises(InvalidLoop, self.optimize_loop, ops, '...', None)
452,330
def test_invalid_loop_2(self): py.test.skip("this would fail if we had Fixed again in the specnodes") ops = """ [p1] guard_class(p1, ConstClass(node_vtable2)) [] # p2 = new_with_vtable(ConstClass(node_vtable)) escape(p2) # prevent it from staying Virtual jump(p2) """ py.test.raises(InvalidLoop, self.optimize_loop,...
def test_invalid_loop_2(self): py.test.skip("this would fail if we had Fixed again in the specnodes") ops = """ [p1] guard_class(p1, ConstClass(node_vtable2)) [] # p2 = new_with_vtable(ConstClass(node_vtable)) escape(p2) # prevent it from staying Virtual jump(p2) """ py.test.raises(InvalidLoop, self.optimize_loop,...
452,331
def test_invalid_loop_3(self): ops = """ [p1] p2 = getfield_gc(p1, descr=nextdescr) guard_isnull(p2) [] # p3 = new_with_vtable(ConstClass(node_vtable)) p4 = new_with_vtable(ConstClass(node_vtable)) setfield_gc(p3, p4, descr=nextdescr) jump(p3) """ py.test.raises(InvalidLoop, self.optimize_loop, ops, 'Virtual(node_vtabl...
def test_invalid_loop_3(self): ops = """ [p1] p2 = getfield_gc(p1, descr=nextdescr) guard_isnull(p2) [] # p3 = new_with_vtable(ConstClass(node_vtable)) p4 = new_with_vtable(ConstClass(node_vtable)) setfield_gc(p3, p4, descr=nextdescr) jump(p3) """ py.test.raises(InvalidLoop, self.optimize_loop, ops, 'Virtual(node_vtabl...
452,332
def _format_float(self, w_float): space = self.space if self._alternate: msg = "alternate form not allowed in float formats" raise OperationError(space.w_ValueError, space.wrap(msg)) tp = self._type if tp == "\0": tp = "g" value = space.float_w(w_float) if tp == "%": tp = "f" value *= 100 if self._precision = -1: self....
def _format_float(self, w_float): space = self.space if self._alternate: msg = "alternate form not allowed in float formats" raise OperationError(space.w_ValueError, space.wrap(msg)) tp = self._type if tp == "\0": tp = "g" value = space.float_w(w_float) if tp == "%": tp = "f" value *= 100 if self._precision == -1: self...
452,333
def collect(self): l = [] for x in testmap: name = x.basename regrtest = self.get(name) if regrtest is not None: #if option.extracttests: # l.append(InterceptedRunModule(name, self, regrtest)) #else: l.append(RunFileExternal(name, parent=self, regrtest=regrtest)) return l
def collect(self): l = [] for x in self.fspath.listdir(): name = x.basename regrtest = self.get(name) if regrtest is not None: #if option.extracttests: # l.append(InterceptedRunModule(name, self, regrtest)) #else: l.append(RunFileExternal(name, parent=self, regrtest=regrtest)) return l
452,334
def collect(self): l = [] for x in testmap: name = x.basename regrtest = self.get(name) if regrtest is not None: #if option.extracttests: # l.append(InterceptedRunModule(name, self, regrtest)) #else: l.append(RunFileExternal(name, parent=self, regrtest=regrtest)) return l
def collect(self): l = [] for x in testmap: name = x.basename regrtest = self.get(name) if regrtest is not None: if bool(we_are_in_modified) ^ regrtest.ismodified(): continue #if option.extracttests: # l.append(InterceptedRunModule(name, self, regrtest)) #else: l.append(RunFileExternal(name, parent=self, regrtest=re...
452,335
def pytest_collect_directory(parent, path): return RegrDirectory(path, parent)
def pytest_collect_directory(parent, path): if path in (modregrtestdir, regrtestdir): return RegrDirectory(path, parent) def pytest_ignore_collect(path): if path.check(file=1): return True
452,336
def chdir_and_unset_pythonpath(new_cwd): old_cwd = new_cwd.chdir() old_pythonpath = os.getenv('PYTHONPATH') os.unsetenv('PYTHONPATH') try: yield finally: old_cwd.chdir() os.putenv('PYTHONPATH', old_pythonpath)
def chdir_and_unset_pythonpath(new_cwd): old_cwd = new_cwd.chdir() old_pythonpath = os.getenv('PYTHONPATH') os.unsetenv('PYTHONPATH') try: yield finally: old_cwd.chdir() if old_pythonpath is not None: os.putenv('PYTHONPATH', old_pythonpath)
452,337
def test_unicode(): assert isinstance(hashlib.new('sha1', u'xxx'), _hashlib.hash)
def test_unicode(): assert isinstance(hashlib.new('sha256', u'xxx'), _hashlib.hash)
452,338
def _prepare_sp_patch_location(self): """Generate NOPs as placeholder to patch the instruction(s) to update the sp according to the number of spilled variables""" l = self.mc.curraddr() for _ in range((self.mc.size_of_gen_load_int+WORD)//WORD): self.mc.MOV_rr(r.r0.value, r.r0.value) return l
def _prepare_sp_patch_location(self): """Generate NOPs as placeholder to patch the instruction(s) to update the sp according to the number of spilled variables""" l = self.mc.curraddr() for _ in range(size//WORD): self.mc.MOV_rr(r.r0.value, r.r0.value) return l
452,339
def gettext(msg): """gettext(msg) -> string Return translation of msg.""" return _gettext(msg)
def gettext(msg): """gettext(msg) -> string Return translation of msg.""" return _gettext(msg)
452,340
def bind_textdomain_codeset(domain, codeset): """bind_textdomain_codeset(domain, codeset) -> string Bind the C library's domain to codeset.""" codeset = _bind_textdomain_codeset(domain, codeset) if codeset: return codeset return None
def bind_textdomain_codeset(domain, codeset): """bind_textdomain_codeset(domain, codeset) -> string Bind the C library's domain to codeset.""" codeset = _bind_textdomain_codeset(domain, codeset) if codeset: return codeset return None
452,341
def bind_textdomain_codeset(domain, codeset): """bind_textdomain_codeset(domain, codeset) -> string Bind the C library's domain to codeset.""" codeset = _bind_textdomain_codeset(domain, codeset) if codeset: return codeset return None
def bind_textdomain_codeset(domain, codeset): """bind_textdomain_codeset(domain, codeset) -> string Bind the C library's domain to codeset.""" codeset = _bind_textdomain_codeset(domain, codeset) if codeset: return codeset return None
452,342
def unpack_float(data,index,size,le): bytes = [ord(b) for b in data[index:index+size]] if len(bytes) != size: raise StructError,"Not enough data to unpack" if max(bytes) == 0: return 0.0 if le == 'big': bytes.reverse() if size == 4: bias = 127 exp = 8 prec = 23 else: bias = 1023 exp = 11 prec = 52 mantissa = long(bytes...
def unpack_float(data,index,size,le): bytes = [ord(b) for b in data[index:index+size]] if len(bytes) != size: raise StructError,"Not enough data to unpack" if max(bytes) == 0: return 0.0 if le == 'big': bytes.reverse() if size == 4: bias = 127 exp = 8 prec = 23 else: bias = 1023 exp = 11 prec = 52 mantissa = long(bytes...
452,343
def pack_float(number, size, le): if size == 4: bias = 127 exp = 8 prec = 23 else: bias = 1023 exp = 11 prec = 52 if isnan(number): sign = 0x80 man, e = 1.5, bias + 1 else: if number < 0: sign = 0x80 number *= -1 elif number == 0.0: return '\x00' * size else: sign = 0x00 if isinf(number): man, e = 1.0, bias + 1 else: ...
def pack_float(x, size, le): unsigned = float_pack(x, size) result = [] if 0.5 <= man and man < 1.0: man *= 2 e -= 1 man -= 1 e += bias power_of_two = 1 << prec mantissa = int(power_of_two * man + 0.5) if mantissa >> prec : mantissa = 0 e += 1 for i in range(size-2): result.append(chr(mantissa & 0xff)) mantissa >>= 8 ...
452,344
def pack_float(number, size, le): if size == 4: bias = 127 exp = 8 prec = 23 else: bias = 1023 exp = 11 prec = 52 if isnan(number): sign = 0x80 man, e = 1.5, bias + 1 else: if number < 0: sign = 0x80 number *= -1 elif number == 0.0: return '\x00' * size else: sign = 0x00 if isinf(number): man, e = 1.0, bias + 1 else: ...
def pack_float(number, size, le): if size == 4: bias = 127 exp = 8 prec = 23 else: bias = 1023 exp = 11 prec = 52 if isnan(number): sign = 0x80 man, e = 1.5, bias + 1 else: if number < 0: sign = 0x80 number *= -1 elif number == 0.0: return '\x00' * size else: sign = 0x00 if isinf(number): man, e = 1.0, bias + 1 else: ...
452,345
def m(self): raise NotImplementedError
def m(self): raise NotImplementedError
452,346
def f(n): if n > 3: o = A() else: o = B() try: o.m() except NotImplementedError: pass return B().m()
def f(n): if n > 3: o = A() else: o = B() try: o.m() except KeyError: assert 0 return B().m()
452,347
def f(n): if n > 3: o = A() else: o = B() try: o.m() except NotImplementedError: pass return B().m()
def f(n): if n > 3: o = A() else: o = B() try: o.m() except NotImplementedError: pass return B().m()
452,348
def PyMember_GetOne(space, obj, w_member): addr = rffi.cast(ADDR, obj) addr += w_member.c_offset member_type = rffi.cast(lltype.Signed, w_member.c_type) for converter in integer_converters: typ, lltyp, _ = converter if typ == member_type: result = rffi.cast(rffi.CArrayPtr(lltyp), addr) w_result = space.wrap(result[0])...
def PyMember_GetOne(space, obj, w_member): addr = rffi.cast(ADDR, obj) addr += w_member.c_offset member_type = rffi.cast(lltype.Signed, w_member.c_type) for converter in integer_converters: typ, lltyp, _ = converter if typ == member_type: result = rffi.cast(rffi.CArrayPtr(lltyp), addr) if lltyp is rffi.FLOAT: w_result...
452,349
def main(n): s = 0 for i in range(n): s += g(n)[i] return s
def main(n): s = 0 for i in range(n): s += g(n)[i] return s
452,350
def main(n): s = 0 for i in range(n): s += g(n)[i] return s
def main(n): s = 0 for i in range(n): s += g(n)[i] return s
452,351
def do_getarrayitem_raw(cpu, _, arraybox, indexbox, arraydescr): array = arraybox.getref_base() index = indexbox.getint() assert not arraydescr.is_array_of_pointers() if arraydescr.is_array_of_floats(): return BoxFloat(cpu.bh_getarrayitem_raw_f(arraydescr, array, index)) else: return BoxInt(cpu.bh_getarrayitem_raw_i(ar...
def do_getarrayitem_raw(cpu, _, arraybox, indexbox, arraydescr): array = arraybox.getint() index = indexbox.getint() assert not arraydescr.is_array_of_pointers() if arraydescr.is_array_of_floats(): return BoxFloat(cpu.bh_getarrayitem_raw_f(arraydescr, array, index)) else: return BoxInt(cpu.bh_getarrayitem_raw_i(arrayde...
452,352
def _gen_path_to_exit_path(self, op, args, regalloc, fcond=c.AL): """ types: \xEE = REF \xEF = INT location: \xFC = stack location \xFD = imm location \xFE = Empty arg """
def _gen_path_to_exit_path(self, op, args, regalloc, fcond=c.AL): """ types: \xEE = REF \xEF = INT location: \xFC = stack location \xFD = imm location \xFE = Empty arg """
452,353
def _patch_sp_offset(self, addr, regalloc): cb = ARMv7InMemoryBuilder(addr, ARMv7InMemoryBuilder.size_of_gen_load_int) if regalloc.frame_manager.frame_depth == 1: return n = (regalloc.frame_manager.frame_depth - 1)*WORD self._adjust_sp(n, cb)
def _patch_sp_offset(self, addr, regalloc): cb = ARMv7InMemoryBuilder(addr, ARMv7InMemoryBuilder.size_of_gen_load_int) if regalloc.frame_manager.frame_depth == 1: return n = (regalloc.frame_manager.frame_depth)*WORD self._adjust_sp(n, cb)
452,354
def f(n): xy = self.setup() xy.inst_x = 10 other = self.setup() other.inst_x = 15 while n > 0: myjitdriver.can_enter_jit(xy=xy, n=n, other=other) myjitdriver.jit_merge_point(xy=xy, n=n, other=other) promote_virtualizable(other, 'inst_x') value = other.inst_x # getfield_gc other.inst_x = value + 1 # setfield...
def f(n): xy = self.setup() xy.inst_x = 10 other = self.setup() other.inst_x = 15 while n > 0: myjitdriver.can_enter_jit(xy=xy, n=n, other=other) myjitdriver.jit_merge_point(xy=xy, n=n, other=other) promote_virtualizable(other, 'inst_x') value = other.inst_x # getfield_gc other.inst_x = value + 1 # setfield...
452,355
def emit_op_int_sub(self, op, regalloc, fcond): # assuming only one argument is constant a0 = op.getarg(0) a1 = op.getarg(1) imm_a0 = isinstance(a0, ConstInt) and (a0.getint() <= 0xFF or -1 * a0.getint() <= 0xFF) imm_a1 = isinstance(a1, ConstInt) and (a1.getint() <= 0xFF or -1 * a1.getint() <= 0xFF) l0 = regalloc.make_...
def emit_op_int_sub(self, op, regalloc, fcond): # assuming only one argument is constant a0 = op.getarg(0) a1 = op.getarg(1) imm_a0 = isinstance(a0, ConstInt) and (a0.getint() <= 0xFF or -1 * a0.getint() <= 0xFF) imm_a1 = isinstance(a1, ConstInt) and (a1.getint() <= 0xFF or -1 * a1.getint() <= 0xFF) l0 = regalloc.make_...
452,356
def emit_op_int_sub(self, op, regalloc, fcond): # assuming only one argument is constant a0 = op.getarg(0) a1 = op.getarg(1) imm_a0 = isinstance(a0, ConstInt) and (a0.getint() <= 0xFF or -1 * a0.getint() <= 0xFF) imm_a1 = isinstance(a1, ConstInt) and (a1.getint() <= 0xFF or -1 * a1.getint() <= 0xFF) l0 = regalloc.make_...
def emit_op_int_sub(self, op, regalloc, fcond): # assuming only one argument is constant a0 = op.getarg(0) a1 = op.getarg(1) boxes = [a0, a1] imm_a0 = self._check_imm_arg(a0) imm_a1 = self._check_imm_arg(a1) if not imm_a0 and imm_a1: l0, box = self._ensure_value_is_boxed(a0, regalloc) l1 = regalloc.make_sure_var_in_reg...
452,357
def emit_op_int_sub(self, op, regalloc, fcond): # assuming only one argument is constant a0 = op.getarg(0) a1 = op.getarg(1) imm_a0 = isinstance(a0, ConstInt) and (a0.getint() <= 0xFF or -1 * a0.getint() <= 0xFF) imm_a1 = isinstance(a1, ConstInt) and (a1.getint() <= 0xFF or -1 * a1.getint() <= 0xFF) l0 = regalloc.make_...
def emit_op_int_sub(self, op, regalloc, fcond): # assuming only one argument is constant a0 = op.getarg(0) a1 = op.getarg(1) imm_a0 = isinstance(a0, ConstInt) and (a0.getint() <= 0xFF or -1 * a0.getint() <= 0xFF) imm_a1 = isinstance(a1, ConstInt) and (a1.getint() <= 0xFF or -1 * a1.getint() <= 0xFF) l0 = regalloc.make_...
452,358
def emit_op_int_sub(self, op, regalloc, fcond): # assuming only one argument is constant a0 = op.getarg(0) a1 = op.getarg(1) imm_a0 = isinstance(a0, ConstInt) and (a0.getint() <= 0xFF or -1 * a0.getint() <= 0xFF) imm_a1 = isinstance(a1, ConstInt) and (a1.getint() <= 0xFF or -1 * a1.getint() <= 0xFF) l0 = regalloc.make_...
def emit_op_int_sub(self, op, regalloc, fcond): # assuming only one argument is constant a0 = op.getarg(0) a1 = op.getarg(1) imm_a0 = isinstance(a0, ConstInt) and (a0.getint() <= 0xFF or -1 * a0.getint() <= 0xFF) imm_a1 = isinstance(a1, ConstInt) and (a1.getint() <= 0xFF or -1 * a1.getint() <= 0xFF) l0 = regalloc.make_...
452,359
def emit_op_int_sub(self, op, regalloc, fcond): # assuming only one argument is constant a0 = op.getarg(0) a1 = op.getarg(1) imm_a0 = isinstance(a0, ConstInt) and (a0.getint() <= 0xFF or -1 * a0.getint() <= 0xFF) imm_a1 = isinstance(a1, ConstInt) and (a1.getint() <= 0xFF or -1 * a1.getint() <= 0xFF) l0 = regalloc.make_...
def emit_op_int_sub(self, op, regalloc, fcond): # assuming only one argument is constant a0 = op.getarg(0) a1 = op.getarg(1) imm_a0 = isinstance(a0, ConstInt) and (a0.getint() <= 0xFF or -1 * a0.getint() <= 0xFF) imm_a1 = isinstance(a1, ConstInt) and (a1.getint() <= 0xFF or -1 * a1.getint() <= 0xFF) l0 = regalloc.make_...
452,360
def emit_op_int_neg(self, op, regalloc, fcond): arg = op.getarg(0) resbox = op.result l0 = regalloc.make_sure_var_in_reg(arg) l1 = regalloc.make_sure_var_in_reg(ConstInt(-1), [arg], imm_fine=False) resloc = regalloc.force_allocate_reg(resbox, [arg]) self.mc.MUL(resloc.value, l0.value, l1.value) regalloc.possibly_free_v...
def emit_op_int_neg(self, op, regalloc, fcond): arg = op.getarg(0) resbox = op.result l0 = regalloc.make_sure_var_in_reg(arg) self.mc.MVN_ri(r.ip.value, imm=~-1) resloc = regalloc.force_allocate_reg(resbox, [arg]) self.mc.MUL(resloc.value, l0.value, l1.value) regalloc.possibly_free_vars([arg, resbox]) return fcond
452,361
def emit_op_int_neg(self, op, regalloc, fcond): arg = op.getarg(0) resbox = op.result l0 = regalloc.make_sure_var_in_reg(arg) l1 = regalloc.make_sure_var_in_reg(ConstInt(-1), [arg], imm_fine=False) resloc = regalloc.force_allocate_reg(resbox, [arg]) self.mc.MUL(resloc.value, l0.value, l1.value) regalloc.possibly_free_v...
def emit_op_int_neg(self, op, regalloc, fcond): arg = op.getarg(0) resbox = op.result l0 = regalloc.make_sure_var_in_reg(arg) l1 = regalloc.make_sure_var_in_reg(ConstInt(-1), [arg], imm_fine=False) resloc = regalloc.force_allocate_reg(resbox, [arg]) self.mc.MUL(resloc.value, l0.value, r.ip.value) regalloc.possibly_free...
452,362
def unwrapper(space, *args): from pypy.module.cpyext.pyobject import Py_DecRef from pypy.module.cpyext.pyobject import make_ref, from_ref from pypy.module.cpyext.pyobject import BorrowedPair newargs = () to_decref = [] assert len(args) == len(api_function.argtypes) for i, (ARG, is_wrapped) in types_names_enum_ui: input...
def unwrapper(space, *args): from pypy.module.cpyext.pyobject import Py_DecRef from pypy.module.cpyext.pyobject import make_ref, from_ref from pypy.module.cpyext.pyobject import BorrowedPair newargs = () to_decref = [] assert len(args) == len(api_function.argtypes) for i, (ARG, is_wrapped) in types_names_enum_ui: input...
452,363
def set_query_functions(self, gc): gc.set_query_functions( self.q_is_varsize, self.q_has_gcptr_in_varsize, self.q_is_gcarrayofgcptr, self.q_finalizer, self.q_offsets_to_gc_pointers, self.q_fixed_size, self.q_varsize_item_sizes, self.q_varsize_offset_to_variable_part, self.q_varsize_offset_to_length, self.q_varsize_offs...
def set_query_functions(self, gc): gc.set_query_functions( self.q_is_varsize, self.q_has_gcptr_in_varsize, self.q_is_gcarrayofgcptr, self.q_finalizer, self.q_offsets_to_gc_pointers, self.q_fixed_size, self.q_varsize_item_sizes, self.q_varsize_offset_to_variable_part, self.q_varsize_offset_to_length, self.q_varsize_offs...
452,364
def f(n): x = X() while n > 0: myjitdriver.can_enter_jit(n=n, x=x) myjitdriver.jit_merge_point(n=n, x=x) x.foo = n n -= 1 if action.get() != 0: break action.set(0) return 42
def f(n): x = X() action.reset_ticker(n) while True: myjitdriver.can_enter_jit(n=n, x=x) myjitdriver.jit_merge_point(n=n, x=x) x.foo = n n -= 1 if action.get() != 0: break action.set(0) return 42
452,365
def f(n): x = X() while n > 0: myjitdriver.can_enter_jit(n=n, x=x) myjitdriver.jit_merge_point(n=n, x=x) x.foo = n n -= 1 if action.get() != 0: break action.set(0) return 42
def f(n): x = X() while n > 0: myjitdriver.can_enter_jit(n=n, x=x) myjitdriver.jit_merge_point(n=n, x=x) x.foo = n n -= 1 if action.decrement_ticker(1) < 0: break action.set(0) return 42
452,366
def f(n): x = X() while n > 0: myjitdriver.can_enter_jit(n=n, x=x) myjitdriver.jit_merge_point(n=n, x=x) x.foo = n n -= 1 if action.get() != 0: break action.set(0) return 42
def f(n): x = X() while n > 0: myjitdriver.can_enter_jit(n=n, x=x) myjitdriver.jit_merge_point(n=n, x=x) x.foo = n n -= 1 if action.get() != 0: break return 42
452,367
def f(n): x = X() while n > 0: myjitdriver.can_enter_jit(n=n, x=x) myjitdriver.jit_merge_point(n=n, x=x) x.foo = n n -= 1 if action.get() != 0: break action.set(0) return 42
def f(n): x = X() while n > 0: myjitdriver.can_enter_jit(n=n, x=x) myjitdriver.jit_merge_point(n=n, x=x) x.foo = n n -= 1 if action.get() != 0: break action.set(0) return 42
452,368
def test_merge_guard_class_guard_value(self): ops = """ [p1, i0, i1, i2, p2] guard_class(p1, ConstClass(node_vtable)) [i0] i3 = int_add(i1, i2) guard_value(p1, ConstPtr(myptr)) [i1] jump(p2, i0, i1, i3, p2) """ expected = """ [p1, i0, i1, i2, p2] guard_value(p1, ConstPtr(myptr)) [i0] i3 = int_add(i1, i2) jump(p2, i0, i...
def test_merge_guard_class_guard_value(self): ops = """ [p1, i0, i1, i2, p2] guard_class(p1, ConstClass(node_vtable)) [i0] i3 = int_add(i1, i2) guard_value(p1, ConstPtr(myptr)) [i1] jump(p2, i0, i1, i3, p2) """ preamble = """ [p1, i0, i1, i2, p2] guard_value(p1, ConstPtr(myptr)) [i0] i3 = int_add(i1, i2) jump(p2, i0, i...
452,369
def test_merge_guard_class_guard_value(self): ops = """ [p1, i0, i1, i2, p2] guard_class(p1, ConstClass(node_vtable)) [i0] i3 = int_add(i1, i2) guard_value(p1, ConstPtr(myptr)) [i1] jump(p2, i0, i1, i3, p2) """ expected = """ [p1, i0, i1, i2, p2] guard_value(p1, ConstPtr(myptr)) [i0] i3 = int_add(i1, i2) jump(p2, i0, i...
def test_merge_guard_class_guard_value(self): ops = """ [p1, i0, i1, i2, p2] guard_class(p1, ConstClass(node_vtable)) [i0] i3 = int_add(i1, i2) guard_value(p1, ConstPtr(myptr)) [i1] jump(p2, i0, i1, i3, p2) """ expected = """ [p1, i0, i1, i2, p2] guard_value(p1, ConstPtr(myptr)) [i0] i3 = int_add(i1, i2) jump(p2, i0, i...
452,370
def pytest_collect_directory(parent, path): return RegrDirectory(path, parent)
def pytest_collect_directory(parent, path): if path.basename == "test": return RegrDirectory(path, parent)
452,371
def create_short_preamble(self, preamble, preambleargs, loop, inputargs, token): #return None # Dissable short_preamble = [] loop_i = preamble_i = 0 while loop_i < len(loop)-1 and preamble_i < len(preamble)-1: if self.sameop(preamble[preamble_i], loop[loop_i]): loop_i += 1 preamble_i += 1 else: short_preamble.append(p...
def create_short_preamble(self, preamble, preambleargs, loop, inputargs, token): #return None # Dissable short_preamble = [] loop_i = preamble_i = 0 while loop_i < len(loop)-1 and preamble_i < len(preamble)-1: if self.sameop(preamble[preamble_i], loop[loop_i]): loop_i += 1 preamble_i += 1 else: short_preamble.append(p...
452,372
def create_short_preamble(self, preamble, preambleargs, loop, inputargs, token): #return None # Dissable short_preamble = [] loop_i = preamble_i = 0 while loop_i < len(loop)-1 and preamble_i < len(preamble)-1: if self.sameop(preamble[preamble_i], loop[loop_i]): loop_i += 1 preamble_i += 1 else: short_preamble.append(p...
def create_short_preamble(self, preamble, preambleargs, loop, inputargs, token): #return None # Dissable short_preamble = [] loop_i = preamble_i = 0 while loop_i < len(loop)-1 and preamble_i < len(preamble)-1: if self.sameop(preamble[preamble_i], loop[loop_i]): loop_i += 1 preamble_i += 1 else: short_preamble.append(p...
452,373
def create_short_preamble(self, preamble, preambleargs, loop, inputargs, token): #return None # Dissable short_preamble = [] loop_i = preamble_i = 0 while loop_i < len(loop)-1 and preamble_i < len(preamble)-1: if self.sameop(preamble[preamble_i], loop[loop_i]): loop_i += 1 preamble_i += 1 else: short_preamble.append(p...
def create_short_preamble(self, preamble, preambleargs, loop, inputargs, token): #return None # Dissable short_preamble = [] loop_i = preamble_i = 0 while loop_i < len(loop)-1 and preamble_i < len(preamble)-1: if self.sameop(preamble[preamble_i], loop[loop_i]): loop_i += 1 preamble_i += 1 else: short_preamble.append(p...
452,374
def postprocess_loop(loop, loops, memo): if loop in memo: return memo.add(loop) if loop is None: return m = re.search("debug_merge_point\('<code object (.*?)> (.*?)'", loop.content) if m is None: name = '?' else: name = m.group(1) + " " + m.group(2) opsno = loop.content.count("\n") lastline = loop.content[loop.content....
def postprocess_loop(loop, loops, memo): if loop in memo: return memo.add(loop) if loop is None: return m = re.search("debug_merge_point\('<code object (.*?)> (.*?)'", loop.content) if m is None: name = '?' else: name = m.group(1) + " " + m.group(2) opsno = loop.content.count("\n") lastline = loop.content[loop.content....
452,375
def task_compile_c(self): """ Compile the generated C code using either makefile or translator/platform """ cbuilder = self.cbuilder kwds = {} if self.standalone: kwds['exe_name'] = self.compute_exe_name().basename cbuilder.compile(**kwds)
def task_compile_c(self): """ Compile the generated C code using either makefile or translator/platform """ cbuilder = self.cbuilder kwds = {} if self.standalone and self.exe_name is not None: kwds['exe_name'] = self.compute_exe_name().basename cbuilder.compile(**kwds)
452,376
def ptr_access_expr(self, baseexpr, index): assert 0 <= index <= sys.maxint, "invalid constant index %r" % (index,) return self.itemindex_access_expr(baseexpr, index)
def ptr_access_expr(self, baseexpr, index, dummy=False): assert 0 <= index <= sys.maxint, "invalid constant index %r" % (index,) return self.itemindex_access_expr(baseexpr, index)
452,377
def ptr_access_expr(self, baseexpr, index): assert 0 <= index <= sys.maxint, "invalid constant index %r" % (index,) return self.itemindex_access_expr(baseexpr, index)
def ptr_access_expr(self, baseexpr, index, dummy=False): assert 0 <= index <= sys.maxint, "invalid constant index %r" % (index,) return self.itemindex_access_expr(baseexpr, index)
452,378
def access_expr(self, baseexpr, index): if not isinstance(index, int): assert index.startswith('item') index = int(index[4:]) if not (0 <= index < self.FIXEDARRAY.length): raise IndexError("refusing to generate a statically out-of-bounds" " array indexing") return '%s[%d]' % (baseexpr, index)
def access_expr(self, baseexpr, index, dummy=False): if not isinstance(index, int): assert index.startswith('item') index = int(index[4:]) if not (0 <= index < self.FIXEDARRAY.length): raise IndexError("refusing to generate a statically out-of-bounds" " array indexing") return '%s[%d]' % (baseexpr, index)
452,379
def array_get_slice_params(self, index): if index.step is not None: raise TypeError("3 arg slices not supported (for no reason)") if index.start is not None: start = index.start if start < 0: start = 0 else: start = 0 if index.stop is not None: stop = index.stop if stop > self._length_: stop = self._length_ else: stop ...
def array_get_slice_params(self, index): if index.step is not None: raise TypeError("3 arg slices not supported (for no reason)") if index.start is not None: start = index.start if check_bounds and start < 0: start = 0 else: start = 0 if index.stop is not None: stop = index.stop if stop > self._length_: stop = self._le...
452,380
def array_get_slice_params(self, index): if index.step is not None: raise TypeError("3 arg slices not supported (for no reason)") if index.start is not None: start = index.start if start < 0: start = 0 else: start = 0 if index.stop is not None: stop = index.stop if stop > self._length_: stop = self._length_ else: stop ...
def array_get_slice_params(self, index): if index.step is not None: raise TypeError("3 arg slices not supported (for no reason)") if index.start is not None: start = index.start if start < 0: start = 0 else: start = 0 if index.stop is not None: stop = index.stop if check_bounds and stop > self._length_: stop = self._le...
452,381
def __init__(self, space, shape, length, address=r_uint(0)): W_DataInstance.__init__(self, space, shape.size * length, address) self.length = length self.shape = shape
def __init__(self, space, shape, length, address=r_uint(0)): memsize = shape.size * length if memsize < 8: memsize = 8 W_DataInstance.__init__(self, space, memsize, address) self.length = length self.shape = shape
452,382
def portal(codeno, frame): i = 0 while 1: driver.jit_merge_point(codeno=codeno, i=i, frame=frame) if i == 1: if frame.j == 0: return portal(2, Frame(frame.j - 1)) elif i == 3: return i += 1 driver.can_enter_jit(codeno=codeno, i=i, frame=frame)
def portal(codeno, frame): i = 1 while 1: driver.jit_merge_point(codeno=codeno, i=i, frame=frame) if i == 1: if frame.j == 0: return portal(2, Frame(frame.j - 1)) elif i == 3: return i += 1 driver.can_enter_jit(codeno=codeno, i=i, frame=frame)
452,383
def portal(codeno, frame): i = 0 while 1: driver.jit_merge_point(codeno=codeno, i=i, frame=frame) if i == 1: if frame.j == 0: return portal(2, Frame(frame.j - 1)) elif i == 3: return i += 1 driver.can_enter_jit(codeno=codeno, i=i, frame=frame)
def portal(codeno, frame): i = 0 while 1: driver.jit_merge_point(codeno=codeno, i=i, frame=frame) if (i >> 1) == 1: if frame.j == 0: return portal(2, Frame(frame.j - 1)) elif i == 3: return i += 1 driver.can_enter_jit(codeno=codeno, i=i, frame=frame)
452,384
def portal(codeno, frame): i = 0 while 1: driver.jit_merge_point(codeno=codeno, i=i, frame=frame) if i == 1: if frame.j == 0: return portal(2, Frame(frame.j - 1)) elif i == 3: return i += 1 driver.can_enter_jit(codeno=codeno, i=i, frame=frame)
def portal(codeno, frame): i = 0 while 1: driver.jit_merge_point(codeno=codeno, i=i, frame=frame) if i == 1: if frame.j == 0: return portal(2, Frame(frame.j - 1)) elif i == 5: return i += 1 driver.can_enter_jit(codeno=codeno, i=i, frame=frame)
452,385
def main(codeno, j): portal(codeno, Frame(j))
def main(codeno, j): portal(codeno, Frame(j))
452,386
def my_ctc(*args): looptoken = original_ctc(*args) trace.append(looptoken) return looptoken
def my_ctc(*args): looptoken = original_ctc(*args) trace.append(looptoken) return looptoken
452,387
def PyMember_GetOne(space, obj, w_member): addr = rffi.cast(ADDR, obj) addr += w_member.c_offset member_type = rffi.cast(lltype.Signed, w_member.c_type) for converter in integer_converters: typ, lltyp, _ = converter if typ == member_type: result = rffi.cast(rffi.CArrayPtr(lltyp), addr) w_result = space.wrap(result[0])...
def PyMember_GetOne(space, obj, w_member): addr = rffi.cast(ADDR, obj) addr += w_member.c_offset member_type = rffi.cast(lltype.Signed, w_member.c_type) for converter in integer_converters: typ, lltyp, _ = converter if typ == member_type: result = rffi.cast(rffi.CArrayPtr(lltyp), addr) if lltyp is rffi.FLOAT: w_result...
452,388
def method_get(self, s_key): assert isinstance(s_key, annmodel.SomeString) return annmodel.SomeInstance(self.valueclassdef, can_be_None=True)
def method_get(self, s_key): assert annmodel.SomeString(can_be_None=True).contains(s_key) return annmodel.SomeInstance(self.valueclassdef, can_be_None=True)
452,389
def call(self, cppthis, args_w): if self.executor is None: raise OperationError(self.space.w_TypeError, self.space.wrap("return type not handled"))
def call(self, cppthis, args_w): if self.executor is None: raise OperationError(self.space.w_TypeError, self.space.wrap("return type not handled"))
452,390
def call(self, cppthis, args_w): if self.executor is None: raise OperationError(self.space.w_TypeError, self.space.wrap("return type not handled"))
def call(self, cppthis, args_w): if self.executor is None: raise OperationError(self.space.w_TypeError, self.space.wrap("return type not handled"))
452,391
def compute_result_annotation(self, **kwds_s): from pypy.annotation import model as annmodel driver = self.instance.im_self keys = kwds_s.keys() keys.sort() expected = ['s_' + name for name in driver.greens + driver.reds if '.' not in name] expected.sort() if keys != expected: raise JitHintError("%s expects the followi...
def compute_result_annotation(self, **kwds_s): from pypy.annotation import model as annmodel driver = self.instance.im_self keys = kwds_s.keys() keys.sort() expected = ['s_' + name for name in driver.greens + driver.reds if '.' not in name] expected.sort() if keys != expected: raise JitHintError("%s expects the followi...
452,392
def annotate_hooks(self, **kwds_s): driver = self.instance.im_self s_jitcell = self.bookkeeper.valueoftype(BaseJitCell) self.annotate_hook(driver.get_jitcell_at, driver.greens, **kwds_s) self.annotate_hook(driver.set_jitcell_at, driver.greens, [s_jitcell], **kwds_s) self.annotate_hook(driver.get_printable_location, dri...
def annotate_hooks(self, **kwds_s): driver = self.instance.im_self s_jitcell = self.bookkeeper.valueoftype(BaseJitCell) self.annotate_hook(driver.get_jitcell_at, driver.greens, **kwds_s) self.annotate_hook(driver.set_jitcell_at, driver.greens, [s_jitcell], **kwds_s) self.annotate_hook(driver.get_printable_location, dri...
452,393
def annotate_hook(self, func, variables, args_s=[], **kwds_s): if func is None: return bk = self.bookkeeper s_func = bk.immutablevalue(func) uniquekey = 'jitdriver.%s' % func.func_name args_s = args_s[:] for name in variables: if '.' not in name: s_arg = kwds_s['s_' + name] else: objname, fieldname = name.split('.') s_...
def annotate_hook(self, func, variables, args_s=[], **kwds_s): if func is None: return True bk = self.bookkeeper s_func = bk.immutablevalue(func) uniquekey = 'jitdriver.%s' % func.func_name args_s = args_s[:] for name in variables: if '.' not in name: s_arg = kwds_s['s_' + name] else: objname, fieldname = name.split('....
452,394
def annotate_hook(self, func, variables, args_s=[], **kwds_s): if func is None: return bk = self.bookkeeper s_func = bk.immutablevalue(func) uniquekey = 'jitdriver.%s' % func.func_name args_s = args_s[:] for name in variables: if '.' not in name: s_arg = kwds_s['s_' + name] else: objname, fieldname = name.split('.') s_...
def annotate_hook(self, func, variables, args_s=[], **kwds_s): if func is None: return bk = self.bookkeeper s_func = bk.immutablevalue(func) uniquekey = 'jitdriver.%s' % func.func_name args_s = args_s[:] for name in variables: if '.' not in name: s_arg = kwds_s['s_' + name] else: objname, fieldname = name.split('.') s_...
452,395
def descr_str(self, space): return space.appexec([self], """(self): if self.end == self.start + 1: return "%r codec can't decode byte 0x%02x in position %d: %s"%( self.encoding, ord(self.object[self.start]), self.start, self.reason) return "%r codec can't decode bytes in position %d-%d: %s" % ( self.encoding, self.star...
def descr_str(self, space): return space.appexec([self], """(self): if self.end == self.start + 1: return "'%s' codec can't decode byte 0x%02x in position %d: %s"%( self.encoding, ord(self.object[self.start]), self.start, self.reason) return "%r codec can't decode bytes in position %d-%d: %s" % ( self.encoding, self.st...
452,396
def descr_str(self, space): return space.appexec([self], """(self): if self.end == self.start + 1: return "%r codec can't decode byte 0x%02x in position %d: %s"%( self.encoding, ord(self.object[self.start]), self.start, self.reason) return "%r codec can't decode bytes in position %d-%d: %s" % ( self.encoding, self.star...
def descr_str(self, space): return space.appexec([self], """(self): if self.end == self.start + 1: return "%r codec can't decode byte 0x%02x in position %d: %s"%( self.encoding, ord(self.object[self.start]), self.start, self.reason) return "'%s' codec can't decode bytes in position %d-%d: %s" % ( self.encoding, self.st...
452,397
def setup_initial_paths(executable, nanos, ignore_environment=False, **extra): # a substituted os if we are translated global os os = nanos # find the full path to the executable, assuming that if there is no '/' # in the provided one then we must look along the $PATH if we_are_translated() and IS_WINDOWS and not execu...
def setup_initial_paths(executable, nanos, ignore_environment=False, **extra): # a substituted os if we are translated global os os = nanos # find the full path to the executable, assuming that if there is no '/' # in the provided one then we must look along the $PATH if we_are_translated() and IS_WINDOWS and not execu...
452,398
def entry_point(executable, argv, nanos): try: cmdline = parse_command_line(argv) except CommandLineError, e: print_error(str(e)) return 2 setup_initial_paths(executable, nanos, **cmdline) return run_command_line(**cmdline)
def entry_point(executable, argv, nanos): try: cmdline = parse_command_line(argv) except CommandLineError, e: print_error(str(e)) return 2 setup_initial_paths(executable, **cmdline) return run_command_line(**cmdline)
452,399