mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Perform build and magnum tuning
Building o//third_party/python now takes 5 seconds on my PC This change works towards modifying Python to use runtime dispatching when appropriate. For example, when loading the magnums in the socket module, it's a good idea to check if the magnum is zero, because that means the local system platform doesn't support it.
This commit is contained in:
parent
ee7e296339
commit
d26d7ae0e4
1028 changed files with 6576 additions and 172777 deletions
|
@ -1,3 +1,5 @@
|
|||
/* clang-format off */
|
||||
/* clang-format off */
|
||||
/* this is sort of a hack. there's at least one place (formatting
|
||||
floats) where some stringlib code takes a different path if it's
|
||||
compiled as unicode. */
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/* stringlib: codec implementations */
|
||||
|
||||
#if !STRINGLIB_IS_UNICODE
|
|
@ -1,7 +1,8 @@
|
|||
/* clang-format off */
|
||||
/* stringlib: count implementation */
|
||||
|
||||
#ifndef STRINGLIB_FASTSEARCH_H
|
||||
#error must include "stringlib/fastsearch.h" before including this module
|
||||
#error must include fastsearch.inc before including this module
|
||||
#endif
|
||||
|
||||
Py_LOCAL_INLINE(Py_ssize_t)
|
|
@ -1,8 +1,9 @@
|
|||
/* clang-format off */
|
||||
#if STRINGLIB_IS_UNICODE
|
||||
# error "ctype.h only compatible with byte-wise strings"
|
||||
#endif
|
||||
|
||||
#include "bytes_methods.h"
|
||||
#include "third_party/python/Include/bytes_methods.h"
|
||||
|
||||
static PyObject*
|
||||
stringlib_isspace(PyObject *self)
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/* Fast unicode equal function optimized for dictobject.c and setobject.c */
|
||||
|
||||
/* Return 1 if two unicode objects are equal, 0 if not.
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/* stringlib: fastsearch implementation */
|
||||
|
||||
#define STRINGLIB_FASTSEARCH_H
|
|
@ -1,7 +1,8 @@
|
|||
/* clang-format off */
|
||||
/* stringlib: find/index implementation */
|
||||
|
||||
#ifndef STRINGLIB_FASTSEARCH_H
|
||||
#error must include "stringlib/fastsearch.h" before including this module
|
||||
#error must include fastsearch.inc before including this module
|
||||
#endif
|
||||
|
||||
Py_LOCAL_INLINE(Py_ssize_t)
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/* Finding the optimal width of unicode characters in a buffer */
|
||||
|
||||
#if !STRINGLIB_IS_UNICODE
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/* stringlib: bytes joining implementation */
|
||||
|
||||
#if STRINGLIB_IS_UNICODE
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/* _PyUnicode_InsertThousandsGrouping() helper functions */
|
||||
|
||||
typedef struct {
|
|
@ -1,7 +1,8 @@
|
|||
/* clang-format off */
|
||||
/* stringlib: partition implementation */
|
||||
|
||||
#ifndef STRINGLIB_FASTSEARCH_H
|
||||
#error must include "stringlib/fastsearch.h" before including this module
|
||||
#error must include fastsearch.inc before including this module
|
||||
#endif
|
||||
|
||||
Py_LOCAL_INLINE(PyObject*)
|
|
@ -1,7 +1,8 @@
|
|||
/* clang-format off */
|
||||
/* stringlib: replace implementation */
|
||||
|
||||
#ifndef STRINGLIB_FASTSEARCH_H
|
||||
#error must include "stringlib/fastsearch.h" before including this module
|
||||
#error must include fastsearch.inc before including this module
|
||||
#endif
|
||||
|
||||
Py_LOCAL_INLINE(void)
|
|
@ -1,7 +1,8 @@
|
|||
/* clang-format off */
|
||||
/* stringlib: split implementation */
|
||||
|
||||
#ifndef STRINGLIB_FASTSEARCH_H
|
||||
#error must include "stringlib/fastsearch.h" before including this module
|
||||
#error must include fastsearch.inc before including this module
|
||||
#endif
|
||||
|
||||
/* Overallocate the initial list to reduce the number of reallocs for small
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
#ifndef STRINGLIB_STRINGDEFS_H
|
||||
#define STRINGLIB_STRINGDEFS_H
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
#if STRINGLIB_IS_UNICODE
|
||||
# error "transmogrify.h only compatible with byte-wise strings"
|
||||
#endif
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/* this is sort of a hack. there's at least one place (formatting
|
||||
floats) where some stringlib code takes a different path if it's
|
||||
compiled as unicode. */
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/* this is sort of a hack. there's at least one place (formatting
|
||||
floats) where some stringlib code takes a different path if it's
|
||||
compiled as unicode. */
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/* this is sort of a hack. there's at least one place (formatting
|
||||
floats) where some stringlib code takes a different path if it's
|
||||
compiled as unicode. */
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
#undef FASTSEARCH
|
||||
#undef STRINGLIB
|
||||
#undef STRINGLIB_SIZEOF_CHAR
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
unicode_format.h -- implementation of str.format().
|
||||
*/
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
#ifndef STRINGLIB_UNICODEDEFS_H
|
||||
#define STRINGLIB_UNICODEDEFS_H
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue