mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-25 14:52:28 +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
45
third_party/python/Modules/expat/ascii.h
vendored
45
third_party/python/Modules/expat/ascii.h
vendored
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
|
@ -95,26 +96,26 @@
|
|||
#define ASCII_8 0x38
|
||||
#define ASCII_9 0x39
|
||||
|
||||
#define ASCII_TAB 0x09
|
||||
#define ASCII_SPACE 0x20
|
||||
#define ASCII_EXCL 0x21
|
||||
#define ASCII_QUOT 0x22
|
||||
#define ASCII_AMP 0x26
|
||||
#define ASCII_APOS 0x27
|
||||
#define ASCII_MINUS 0x2D
|
||||
#define ASCII_PERIOD 0x2E
|
||||
#define ASCII_COLON 0x3A
|
||||
#define ASCII_SEMI 0x3B
|
||||
#define ASCII_LT 0x3C
|
||||
#define ASCII_EQUALS 0x3D
|
||||
#define ASCII_GT 0x3E
|
||||
#define ASCII_LSQB 0x5B
|
||||
#define ASCII_RSQB 0x5D
|
||||
#define ASCII_TAB 0x09
|
||||
#define ASCII_SPACE 0x20
|
||||
#define ASCII_EXCL 0x21
|
||||
#define ASCII_QUOT 0x22
|
||||
#define ASCII_AMP 0x26
|
||||
#define ASCII_APOS 0x27
|
||||
#define ASCII_MINUS 0x2D
|
||||
#define ASCII_PERIOD 0x2E
|
||||
#define ASCII_COLON 0x3A
|
||||
#define ASCII_SEMI 0x3B
|
||||
#define ASCII_LT 0x3C
|
||||
#define ASCII_EQUALS 0x3D
|
||||
#define ASCII_GT 0x3E
|
||||
#define ASCII_LSQB 0x5B
|
||||
#define ASCII_RSQB 0x5D
|
||||
#define ASCII_UNDERSCORE 0x5F
|
||||
#define ASCII_LPAREN 0x28
|
||||
#define ASCII_RPAREN 0x29
|
||||
#define ASCII_FF 0x0C
|
||||
#define ASCII_SLASH 0x2F
|
||||
#define ASCII_HASH 0x23
|
||||
#define ASCII_PIPE 0x7C
|
||||
#define ASCII_COMMA 0x2C
|
||||
#define ASCII_LPAREN 0x28
|
||||
#define ASCII_RPAREN 0x29
|
||||
#define ASCII_FF 0x0C
|
||||
#define ASCII_SLASH 0x2F
|
||||
#define ASCII_HASH 0x23
|
||||
#define ASCII_PIPE 0x7C
|
||||
#define ASCII_COMMA 0x2C
|
||||
|
|
1
third_party/python/Modules/expat/asciitab.h
vendored
1
third_party/python/Modules/expat/asciitab.h
vendored
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
|
|
2
third_party/python/Modules/expat/expat.h
vendored
2
third_party/python/Modules/expat/expat.h
vendored
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
|
@ -33,7 +34,6 @@
|
|||
#ifndef Expat_INCLUDED
|
||||
#define Expat_INCLUDED 1
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "expat_external.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
10
third_party/python/Modules/expat/expat_config.h
vendored
10
third_party/python/Modules/expat/expat_config.h
vendored
|
@ -1,19 +1,15 @@
|
|||
/*
|
||||
* Expat configuration for python. This file is not part of the expat
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef EXPAT_CONFIG_H
|
||||
#define EXPAT_CONFIG_H
|
||||
#include "third_party/python/pyconfig.h"
|
||||
|
||||
#include <pyconfig.h>
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#define BYTEORDER 4321
|
||||
#else
|
||||
#define BYTEORDER 1234
|
||||
#endif
|
||||
|
||||
#define XML_NS 1
|
||||
#define XML_DTD 1
|
||||
#define XML_NS 1
|
||||
#define XML_DTD 1
|
||||
#define XML_CONTEXT_BYTES 1024
|
||||
|
||||
#endif /* EXPAT_CONFIG_H */
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
|
|
1
third_party/python/Modules/expat/iasciitab.h
vendored
1
third_party/python/Modules/expat/iasciitab.h
vendored
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
|
|
1
third_party/python/Modules/expat/internal.h
vendored
1
third_party/python/Modules/expat/internal.h
vendored
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/* internal.h
|
||||
|
||||
Internal definitions used by Expat. This is not needed to compile
|
||||
|
|
1
third_party/python/Modules/expat/latin1tab.h
vendored
1
third_party/python/Modules/expat/latin1tab.h
vendored
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
|
|
1
third_party/python/Modules/expat/nametab.h
vendored
1
third_party/python/Modules/expat/nametab.h
vendored
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
|
|
1
third_party/python/Modules/expat/pyexpatns.h
vendored
1
third_party/python/Modules/expat/pyexpatns.h
vendored
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/* Copyright (c) 2005-2006 ActiveState Software Inc.
|
||||
*
|
||||
* Namespace all expat exported symbols to avoid dynamic loading symbol
|
||||
|
|
22
third_party/python/Modules/expat/siphash.h
vendored
22
third_party/python/Modules/expat/siphash.h
vendored
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/* ==========================================================================
|
||||
* siphash.h - SipHash-2-4 in a single header file
|
||||
* --------------------------------------------------------------------------
|
||||
|
@ -95,17 +96,6 @@
|
|||
#ifndef SIPHASH_H
|
||||
#define SIPHASH_H
|
||||
|
||||
#include <stddef.h> /* size_t */
|
||||
|
||||
#if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||
/* For vs2003/7.1 up to vs2008/9.0; _MSC_VER 1600 is vs2010/10.0 */
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#else
|
||||
# include <stdint.h> /* uint64_t uint32_t uint8_t */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Workaround to not require a C++11 compiler for using ULL suffix
|
||||
* if this code is included and compiled as C++; related GCC warning is:
|
||||
|
@ -370,8 +360,7 @@ sip24_valid(void) {
|
|||
for (i = 0; i < sizeof in; ++i) {
|
||||
in[i] = (unsigned char)i;
|
||||
|
||||
if (siphash24(in, i, &k) != SIP_U8TO64_LE(vectors[i]))
|
||||
return 0;
|
||||
if (siphash24(in, i, &k) != SIP_U8TO64_LE(vectors[i])) return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -379,10 +368,9 @@ sip24_valid(void) {
|
|||
|
||||
#ifdef SIPHASH_MAIN
|
||||
|
||||
# include <stdio.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main(void) {
|
||||
int main(void) {
|
||||
const int ok = sip24_valid();
|
||||
|
||||
if (ok)
|
||||
|
@ -390,7 +378,7 @@ main(void) {
|
|||
else
|
||||
puts("FAIL");
|
||||
|
||||
return ! ok;
|
||||
return !ok;
|
||||
} /* main() */
|
||||
|
||||
#endif /* SIPHASH_MAIN */
|
||||
|
|
1
third_party/python/Modules/expat/utf8tab.h
vendored
1
third_party/python/Modules/expat/utf8tab.h
vendored
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
|
|
1
third_party/python/Modules/expat/winconfig.h
vendored
1
third_party/python/Modules/expat/winconfig.h
vendored
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
|
|
5962
third_party/python/Modules/expat/xmlparse.c
vendored
5962
third_party/python/Modules/expat/xmlparse.c
vendored
File diff suppressed because it is too large
Load diff
12
third_party/python/Modules/expat/xmlrole.c
vendored
12
third_party/python/Modules/expat/xmlrole.c
vendored
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
|
@ -30,16 +31,7 @@
|
|||
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
# include "winconfig.h"
|
||||
#else
|
||||
# ifdef HAVE_EXPAT_CONFIG_H
|
||||
# include <expat_config.h>
|
||||
# endif
|
||||
#endif /* ndef _WIN32 */
|
||||
|
||||
#include "expat_config.h"
|
||||
#include "expat_external.h"
|
||||
#include "internal.h"
|
||||
#include "xmlrole.h"
|
||||
|
|
1
third_party/python/Modules/expat/xmlrole.h
vendored
1
third_party/python/Modules/expat/xmlrole.h
vendored
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
|
|
23
third_party/python/Modules/expat/xmltok.c
vendored
23
third_party/python/Modules/expat/xmltok.c
vendored
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
|
@ -30,29 +31,11 @@
|
|||
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.h> /* memcpy */
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER <= 1700)
|
||||
/* for vs2012/11.0/1700 and earlier Visual Studio compilers */
|
||||
# define bool int
|
||||
# define false 0
|
||||
# define true 1
|
||||
#else
|
||||
# include <stdbool.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# include "winconfig.h"
|
||||
#else
|
||||
# ifdef HAVE_EXPAT_CONFIG_H
|
||||
# include <expat_config.h>
|
||||
# endif
|
||||
#endif /* ndef _WIN32 */
|
||||
|
||||
#include "expat_config.h"
|
||||
#include "expat_external.h"
|
||||
#include "internal.h"
|
||||
#include "xmltok.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "nametab.h"
|
||||
|
||||
#ifdef XML_DTD
|
||||
|
|
1
third_party/python/Modules/expat/xmltok.h
vendored
1
third_party/python/Modules/expat/xmltok.h
vendored
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/* This file is included!
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
|
@ -69,5 +70,3 @@ enum {
|
|||
BT_COMMA, /* comma = "," */
|
||||
BT_VERBAR /* vertical bar = "|" */
|
||||
};
|
||||
|
||||
#include <stddef.h>
|
||||
|
|
1
third_party/python/Modules/expat/xmltok_ns.c
vendored
1
third_party/python/Modules/expat/xmltok_ns.c
vendored
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/* This file is included!
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue