mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 08:48:29 +00:00
Improve Python tree-shaking
This commit is contained in:
parent
5bb2275788
commit
4f41f2184d
169 changed files with 4182 additions and 2411 deletions
16
libc/testlib/fastrandomstring.h
Normal file
16
libc/testlib/fastrandomstring.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_TESTLIB_FASTRANDOMSTRING_H_
|
||||
#define COSMOPOLITAN_LIBC_TESTLIB_FASTRANDOMSTRING_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
static inline const char *FastRandomString(void) {
|
||||
static unsigned long t;
|
||||
static union {
|
||||
unsigned long x;
|
||||
char b[sizeof(unsigned long)];
|
||||
} u;
|
||||
u.x = (t = (t * 0xdeaadead) + 0xdeaadead) & 0x7e7e7e7e7e7e7e;
|
||||
return u.b;
|
||||
}
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_TESTLIB_FASTRANDOMSTRING_H_ */
|
|
@ -21,6 +21,7 @@ LIBC_TESTLIB_A_HDRS = \
|
|||
libc/testlib/bench.h \
|
||||
libc/testlib/blocktronics.h \
|
||||
libc/testlib/ezbench.h \
|
||||
libc/testlib/fastrandomstring.h \
|
||||
libc/testlib/hyperion.h \
|
||||
libc/testlib/moby.h \
|
||||
libc/testlib/testlib.h
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue