mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-12 22:19:10 +00:00
Make numerous improvements
- Python static hello world now 1.8mb - Python static fully loaded now 10mb - Python HTTPS client now uses MbedTLS - Python REPL now completes import stmts - Increase stack size for Python for now - Begin synthesizing posixpath and ntpath - Restore Python \N{UNICODE NAME} support - Restore Python NFKD symbol normalization - Add optimized code path for Intel SHA-NI - Get more Python unit tests passing faster - Get Python help() pagination working on NT - Python hashlib now supports MbedTLS PBKDF2 - Make memcpy/memmove/memcmp/bcmp/etc. faster - Add Mersenne Twister and Vigna to LIBC_RAND - Provide privileged __printf() for error code - Fix zipos opendir() so that it reports ENOTDIR - Add basic chmod() implementation for Windows NT - Add Cosmo's best functions to Python cosmo module - Pin function trace indent depth to that of caller - Show memory diagram on invalid access in MODE=dbg - Differentiate stack overflow on crash in MODE=dbg - Add stb_truetype and tools for analyzing font files - Upgrade to UNICODE 13 and reduce its binary footprint - COMPILE.COM now logs resource usage of build commands - Start implementing basic poll() support on bare metal - Set getauxval(AT_EXECFN) to GetModuleFileName() on NT - Add descriptions to strerror() in non-TINY build modes - Add COUNTBRANCH() macro to help with micro-optimizations - Make error / backtrace / asan / memory code more unbreakable - Add fast perfect C implementation of μ-Law and a-Law audio codecs - Make strtol() functions consistent with other libc implementations - Improve Linenoise implementation (see also github.com/jart/bestline) - COMPILE.COM now suppresses stdout/stderr of successful build commands
This commit is contained in:
parent
fa7b4f5bd1
commit
39bf41f4eb
806 changed files with 77494 additions and 63859 deletions
14
third_party/chibicc/as.c
vendored
14
third_party/chibicc/as.c
vendored
|
@ -453,7 +453,7 @@ static bool IsPunctMergeable(int c) {
|
|||
|
||||
static char *PunctToStr(int p, char b[4]) {
|
||||
int c, i, j;
|
||||
memset(b, 0, 4);
|
||||
bzero(b, 4);
|
||||
for (j = 0, i = 2; i >= 0; --i) {
|
||||
if ((c = (p >> (i * 8)) & 0xff)) {
|
||||
b[j++] = c;
|
||||
|
@ -494,7 +494,7 @@ static int AppendSauce(struct As *a, int path, int line) {
|
|||
|
||||
static void AppendExpr(struct As *a) {
|
||||
APPEND(a->exprs);
|
||||
memset(a->exprs.p + a->exprs.n - 1, 0, sizeof(*a->exprs.p));
|
||||
bzero(a->exprs.p + a->exprs.n - 1, sizeof(*a->exprs.p));
|
||||
a->exprs.p[a->exprs.n - 1].tok = a->i;
|
||||
a->exprs.p[a->exprs.n - 1].lhs = -1;
|
||||
a->exprs.p[a->exprs.n - 1].rhs = -1;
|
||||
|
@ -502,17 +502,17 @@ static void AppendExpr(struct As *a) {
|
|||
|
||||
static void AppendThing(struct As *a) {
|
||||
APPEND(a->things);
|
||||
memset(a->things.p + a->things.n - 1, 0, sizeof(*a->things.p));
|
||||
bzero(a->things.p + a->things.n - 1, sizeof(*a->things.p));
|
||||
}
|
||||
|
||||
static void AppendRela(struct As *a) {
|
||||
APPEND(a->relas);
|
||||
memset(a->relas.p + a->relas.n - 1, 0, sizeof(*a->relas.p));
|
||||
bzero(a->relas.p + a->relas.n - 1, sizeof(*a->relas.p));
|
||||
}
|
||||
|
||||
static void AppendSlice(struct As *a) {
|
||||
APPEND(a->slices);
|
||||
memset(a->slices.p + a->slices.n - 1, 0, sizeof(*a->slices.p));
|
||||
bzero(a->slices.p + a->slices.n - 1, sizeof(*a->slices.p));
|
||||
}
|
||||
|
||||
static int AppendSection(struct As *a, int name, int flags, int type) {
|
||||
|
@ -810,7 +810,7 @@ static void Tokenize(struct As *a, int path) {
|
|||
continue;
|
||||
}
|
||||
if (c == '"') {
|
||||
memset(&buf, 0, sizeof(buf));
|
||||
bzero(&buf, sizeof(buf));
|
||||
for (i = 1; (c = p[i++]);) {
|
||||
if (c == '"') break;
|
||||
c = ReadCharLiteral(&buf, c, p, &i);
|
||||
|
@ -1542,7 +1542,7 @@ static void OnLongDouble(struct As *a, int n) {
|
|||
} else {
|
||||
f = GetInt(a);
|
||||
}
|
||||
memset(b, 0, 16);
|
||||
bzero(b, 16);
|
||||
memcpy(b, &f, sizeof(f));
|
||||
EmitData(a, b, n);
|
||||
if (IsSemicolon(a)) break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue