mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Fix Pyston speedups (#281)
We remove (i.e. hide behind a debug ifdef) the recursion checking methods, and the memory hooks and memory allocator methods. ASAN mode has no PYMALLOC, so we need a macro. Fix build break with des.c stack allocation.
This commit is contained in:
parent
2fe8571010
commit
57f0eed382
42 changed files with 260 additions and 63 deletions
8
third_party/python/Lib/test/test_dict.py
vendored
8
third_party/python/Lib/test/test_dict.py
vendored
|
@ -469,6 +469,7 @@ class DictTest(unittest.TestCase):
|
|||
d = {1: BadRepr()}
|
||||
self.assertRaises(Exc, repr, d)
|
||||
|
||||
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
|
||||
def test_repr_deep(self):
|
||||
d = {}
|
||||
for i in range(sys.getrecursionlimit() + 100):
|
||||
|
@ -1221,11 +1222,12 @@ class CAPITest(unittest.TestCase):
|
|||
self.assertEqual(dict_getitem_knownhash(d, 'y', hash('y')), 2)
|
||||
self.assertEqual(dict_getitem_knownhash(d, 'z', hash('z')), 3)
|
||||
|
||||
# # TODO: Did this break? What did this do?
|
||||
# # TODO: Did this break? What did this do?
|
||||
# (likely related to disabling BadInternalCall in #264)
|
||||
# # not a dict
|
||||
# # find the APE compilation mode, run this test in dbg only #
|
||||
# if cosmo.MODE == "dbg":
|
||||
# self.assertRaises(SystemError, dict_getitem_knownhash, [], 1, hash(1))
|
||||
if cosmo.MODE == "dbg":
|
||||
self.assertRaises(SystemError, dict_getitem_knownhash, [], 1, hash(1))
|
||||
|
||||
# key does not exist
|
||||
self.assertRaises(KeyError, dict_getitem_knownhash, {}, 1, hash(1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue