Improve Python tree-shaking

This commit is contained in:
Justine Tunney 2021-09-06 19:24:10 -07:00
parent 5bb2275788
commit 4f41f2184d
169 changed files with 4182 additions and 2411 deletions

View file

@ -14,6 +14,7 @@
#include "third_party/python/Include/pyerrors.h"
#include "third_party/python/Include/pymacro.h"
#include "third_party/python/Include/pymem.h"
#include "third_party/python/Include/yoink.h"
/* clang-format off */
#ifdef MODE_DBG
@ -2198,6 +2199,7 @@ _PyObject_DebugDumpAddress(const void *p)
fflush(stderr);
#ifdef USE_TRACEMALLOC
PYTHON_YOINK("_tracemalloc");
_PyMem_DumpTraceback(fileno(stderr), p);
#endif
}

View file

@ -43,6 +43,13 @@
/* clang-format off */
PYTHON_PROVIDE("_string");
PYTHON_PROVIDE("_string.__doc__");
PYTHON_PROVIDE("_string.__loader__");
PYTHON_PROVIDE("_string.__name__");
PYTHON_PROVIDE("_string.__package__");
PYTHON_PROVIDE("_string.__spec__");
PYTHON_PROVIDE("_string.formatter_field_name_split");
PYTHON_PROVIDE("_string.formatter_parser");
/*