Fold conv package into fmt

Both packages had nearly identical dependency requirements, so merging
them should help reduce the complexity of the build graph.
This commit is contained in:
Justine Tunney 2020-12-09 15:04:54 -08:00
parent 978b7858f9
commit 1fc91f3580
203 changed files with 352 additions and 563 deletions

View file

@ -5,10 +5,10 @@
#include "libc/calls/calls.h"
#include "libc/calls/struct/stat.h"
#include "libc/calls/weirdtypes.h"
#include "libc/conv/conv.h"
#include "libc/conv/itoa.h"
#include "libc/errno.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/fmt.h"
#include "libc/fmt/itoa.h"
#include "libc/limits.h"
#include "libc/log/check.h"
#include "libc/log/log.h"

View file

@ -42,7 +42,6 @@ THIRD_PARTY_CHIBICC_A_DIRECTDEPS = \
LIBC_BITS \
LIBC_CALLS \
LIBC_CALLS_HEFTY \
LIBC_CONV \
LIBC_FMT \
LIBC_LOG \
LIBC_MEM \

View file

@ -1301,18 +1301,6 @@ static void join_adjacent_string_literals(Token *tok) {
tok1 = tok1->next;
continue;
}
#if 0
assert(tok1->ty->base->size == tok2->ty->base->size);
Token *t = copy_token(tok1);
t->ty =
array_of(tok1->ty->base, tok1->ty->array_len + tok2->ty->array_len - 1);
t->str = calloc(1, t->ty->size);
t->next = tok2->next;
memcpy(mempcpy(t->str, tok1->str, tok1->ty->size - tok1->ty->base->size),
tok2->str, tok2->ty->size);
t->len = strlen(t->loc);
*tok1 = *t;
#else
Token *tok2 = tok1->next;
while (tok2->kind == TK_STR) tok2 = tok2->next;
int len = tok1->ty->array_len;
@ -1330,7 +1318,6 @@ static void join_adjacent_string_literals(Token *tok) {
tok1->str = buf;
tok1->next = tok2;
tok1 = tok2;
#endif
}
}