Reduce header complexity

- Remove most __ASSEMBLER__ __LINKER__ ifdefs
- Rename libc/intrin/bits.h to libc/serialize.h
- Block pthread cancelation in fchmodat() polyfill
- Remove `clang-format off` statements in third_party
This commit is contained in:
Justine Tunney 2023-11-28 14:24:28 -08:00
parent 96f979dfc5
commit fa20edc44d
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
3057 changed files with 410 additions and 4398 deletions

View file

@ -30,7 +30,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
/* Check if an object has a generalized numeric property. Return value:
-1 for exception,

View file

@ -33,7 +33,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
/* XXX: remove */
static double js_strtod(const char *p, int radix, BOOL is_float)

View file

@ -33,7 +33,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
/* Should only be used for debug. */
const char *JS_AtomGetStrRT(JSRuntime *rt, char *buf, int buf_size, JSAtom atom)

View file

@ -30,7 +30,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
#ifdef CONFIG_ATOMICS

View file

@ -31,7 +31,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
JSValue JS_NewBigDecimal(JSContext *ctx)
{

View file

@ -31,7 +31,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
JSValue JS_NewBigInt(JSContext *ctx)
{

View file

@ -35,7 +35,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
BOOL js_class_has_bytecode(JSClassID class_id)
{

View file

@ -33,7 +33,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
static const uint16_t func_kind_to_class_id[] = {
[JS_FUNC_NORMAL] = JS_CLASS_BYTECODE_FUNCTION,

View file

@ -32,7 +32,6 @@ Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
void pstrcpy(char *buf, int buf_size, const char *str)
{

View file

@ -1,9 +1,7 @@
#ifndef COSMOPOLITAN_THIRD_PARTY_QUICKJS_CUTILS_H_
#define COSMOPOLITAN_THIRD_PARTY_QUICKJS_CUTILS_H_
#include "libc/intrin/bswap.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/* clang-format off */
/* set if CPU is big endian */
#undef WORDS_BIGENDIAN
@ -258,5 +256,4 @@ void rqsort(void *base, size_t nmemb, size_t size,
/* clang-format on */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_THIRD_PARTY_QUICKJS_CUTILS_H_ */

View file

@ -35,7 +35,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
#if 0
/* OS dependent: return the UTC time in ms since 1970. */

View file

@ -33,7 +33,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
static void *dbuf_default_realloc(void *opaque, void *ptr, size_t size)
{

View file

@ -1,10 +1,8 @@
#ifndef COSMOPOLITAN_THIRD_PARTY_QUICKJS_DIGLET_H_
#define COSMOPOLITAN_THIRD_PARTY_QUICKJS_DIGLET_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
int to_digit(int);
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_THIRD_PARTY_QUICKJS_DIGLET_H_ */

View file

@ -31,7 +31,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
/* XXX: Should take JSValueConst arguments */
BOOL js_strict_eq2(JSContext *ctx, JSValue op1, JSValue op2,

View file

@ -32,7 +32,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
int js_parse_error(JSParseState *s, const char *fmt, ...)
{

View file

@ -30,7 +30,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
JSValue JS_NewBigFloat(JSContext *ctx)
{

View file

@ -31,7 +31,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
void js_trigger_gc(JSRuntime *rt, size_t size)
{

View file

@ -31,7 +31,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
typedef enum JSGeneratorStateEnum {
JS_GENERATOR_STATE_SUSPENDED_START,

View file

@ -4,9 +4,7 @@
#include "third_party/quickjs/libbf.h"
#include "third_party/quickjs/list.h"
#include "third_party/quickjs/quickjs.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/* clang-format off */
#define OPTIMIZE 1
#define SHORT_OPCODES 1
@ -2210,5 +2208,4 @@ static inline void js_async_function_free(JSRuntime *rt, JSAsyncFunctionData *s)
}
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_THIRD_PARTY_QUICKJS_INTERNAL_H_ */

View file

@ -29,7 +29,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
JSValue js_iterator_proto_iterator(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv) {

View file

@ -33,7 +33,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
/* 'c' is the first character. Return JS_ATOM_NULL in case of error */
static JSAtom json_parse_ident(JSParseState *s, const uint8_t **pp, int c)

View file

@ -30,7 +30,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
int get_leb128(uint32_t *pval, const uint8_t *buf, const uint8_t *buf_end)
{

View file

@ -1,11 +1,9 @@
#ifndef COSMOPOLITAN_THIRD_PARTY_QUICKJS_LEB128_H_
#define COSMOPOLITAN_THIRD_PARTY_QUICKJS_LEB128_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
int get_leb128(uint32_t *, const uint8_t *, const uint8_t *);
int get_sleb128(int32_t *, const uint8_t *, const uint8_t *);
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_THIRD_PARTY_QUICKJS_LEB128_H_ */

View file

@ -43,7 +43,6 @@ asm(".include \"libc/disclaimer.inc\"");
/* #undef __AVX2__ */
/* #endif */
/* clang-format off */
/* enable it to check the multiplication result */
//#define USE_MUL_CHECK

View file

@ -2,9 +2,7 @@
#define COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBBF_H_
#include "libc/limits.h"
#include "libc/literal.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/* clang-format off */
#if INTPTR_MAX >= INT64_MAX
#define LIMB_LOG2_BITS 6
@ -513,5 +511,4 @@ int bfdec_normalize_and_round(bfdec_t *r, limb_t prec1, bf_flags_t flags);
/* clang-format on */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBBF_H_ */

View file

@ -22,7 +22,6 @@
* THE SOFTWARE.
*/
/* clang-format off */
#ifdef DEF

View file

@ -37,7 +37,6 @@ Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
/*
TODO:

View file

@ -1,9 +1,7 @@
#ifndef COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBREGEXP_H_
#define COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBREGEXP_H_
#include "third_party/quickjs/libunicode.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/* clang-format off */
#define LRE_BOOL int /* for documentation purposes */
@ -68,5 +66,4 @@ static inline int lre_js_is_ident_next(int c)
/* clang-format on */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBREGEXP_H_ */

View file

@ -1,4 +1,3 @@
/* clang-format off */
/* Compressed unicode tables */
/* Automatically generated file - do not edit */

View file

@ -36,7 +36,6 @@ Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
#include "third_party/quickjs/libunicode-table.inc"

View file

@ -1,9 +1,7 @@
#ifndef COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBUNICODE_H_
#define COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBUNICODE_H_
#include "third_party/quickjs/libunicode.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/* clang-format off */
#define LRE_BOOL int /* for documentation purposes */
@ -102,5 +100,4 @@ int unicode_prop(CharRange *cr, const char *prop_name);
/* clang-format on */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBUNICODE_H_ */

View file

@ -1,8 +1,6 @@
#ifndef COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIST_H_
#define COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIST_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/* clang-format off */
struct list_head {
struct list_head *prev;
@ -75,5 +73,4 @@ static inline int list_empty(struct list_head *el)
/* clang-format on */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIST_H_ */

View file

@ -30,7 +30,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
static JSValue js_map_constructor(JSContext *ctx, JSValueConst new_target,
int argc, JSValueConst *argv, int magic)

View file

@ -31,7 +31,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
/* precondition: a and b are not NaN */
static double js_fmin(double a, double b)

View file

@ -31,7 +31,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
JSValue JS_ThrowTypeErrorRevokedProxy(JSContext *ctx)
{

View file

@ -29,7 +29,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
void js_object_data_finalizer(JSRuntime *rt, JSValue val)
{

View file

@ -33,7 +33,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
static __exception int js_parse_assign_expr(JSParseState *);
static __exception int js_parse_assign_expr2(JSParseState *, int);

View file

@ -29,7 +29,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
JSValue JS_ToPrimitiveFree(JSContext *ctx, JSValue val, int hint)
{

View file

@ -30,7 +30,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
typedef enum JSPromiseStateEnum {
JS_PROMISE_PENDING,

View file

@ -30,7 +30,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
static void js_proxy_finalizer(JSRuntime *rt, JSValue val)
{

View file

@ -45,7 +45,6 @@ Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
extern const uint8_t qjsc_repl[];
extern const uint32_t qjsc_repl_size;

View file

@ -42,7 +42,6 @@ Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
typedef struct {
char *name;

View file

@ -60,7 +60,6 @@ asm(".include \"libc/disclaimer.inc\"");
#define MAXPATH 1024
/* clang-format off */
/* TODO:
- add socket calls

View file

@ -1,9 +1,7 @@
#ifndef COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBC_H_
#define COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBC_H_
#include "third_party/quickjs/quickjs.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/* clang-format off */
JSModuleDef *js_init_module_std(JSContext *ctx, const char *module_name);
JSModuleDef *js_init_module_os(JSContext *ctx, const char *module_name);
@ -26,5 +24,4 @@ void js_std_set_worker_new_context_func(JSContext *(*func)(JSRuntime *rt));
/* clang-format on */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_THIRD_PARTY_QUICKJS_LIBC_H_ */

View file

@ -23,7 +23,6 @@
* THE SOFTWARE.
*/
/* clang-format off */
#ifdef FMT
FMT(none)

View file

@ -54,7 +54,6 @@ Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
static const char js_atom_init[] =
#define DEF(name, str) str "\0"

View file

@ -3,9 +3,7 @@
#include "libc/intrin/likely.h"
#include "libc/math.h"
#include "libc/stdio/stdio.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/* clang-format off */
#if (defined(__GNUC__) || defined(__clang__)) && !defined(__STRICT_ANSI__)
#define __js_printf_like(f, a) __attribute__((__format__(__printf__, f, a)))
@ -1010,5 +1008,4 @@ int JS_SetModuleExportList(JSContext *ctx, JSModuleDef *m,
/* clang-format on */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_THIRD_PARTY_QUICKJS_QUICKJS_H_ */

View file

@ -29,7 +29,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
static JSValue js_reflect_apply(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv)

View file

@ -32,7 +32,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
void js_regexp_finalizer(JSRuntime *rt, JSValue val)
{

View file

@ -43,7 +43,6 @@ Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
/* enable test262 thread support to test SharedArrayBuffer and Atomics */
/* #define CONFIG_AGENT */

View file

@ -31,7 +31,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
int init_shape_hash(JSRuntime *rt)
{

View file

@ -36,7 +36,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
static int memcmp16_8(const uint16_t *src1, const uint8_t *src2, int len)
{

View file

@ -32,7 +32,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
/* It is valid to call string_buffer_end() and all string_buffer functions even
if string_buffer_init() or another string_buffer function returns an error.

View file

@ -31,7 +31,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
/* 'c' is the first character. Return JS_ATOM_NULL in case of error */
static JSAtom parse_ident(JSParseState *s, const uint8_t **pp,

View file

@ -31,7 +31,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
static JSObject *get_typed_array(JSContext *ctx,
JSValueConst this_val,

View file

@ -38,7 +38,6 @@ Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
/* define it to be able to test unicode.c */
//#define USE_TEST

View file

@ -30,7 +30,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
static int string_get_hex(JSString *p, int k, int n) {
int c = 0, h;

View file

@ -31,7 +31,6 @@ QuickJS (MIT License)\\n\
Copyright (c) 2017-2021 Fabrice Bellard\\n\
Copyright (c) 2017-2021 Charlie Gordon\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
/* Compute memory used by various object types */
/* XXX: poor man's approach to handling multiply referenced objects */