From: Jérémie Astor Date: Fri, 7 May 2021 10:45:14 +0000 (+0200) Subject: :art: Use specific uint types X-Git-Tag: nightly~686 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=7e1dc16acd8290fdfb3fd178605f7fad5898ae8b;p=gwion.git :art: Use specific uint types --- diff --git a/include/array.h b/include/array.h index 6fe233a4..68e5bc63 100644 --- a/include/array.h +++ b/include/array.h @@ -16,7 +16,7 @@ typedef struct ArrayInfo_ { m_int* idx; // for object array size_t length; // array init } d; - uint is_obj; + bool is_obj; } ArrayInfo; ANN Type check_array_access(const Env env, const Array_Sub array); diff --git a/include/emit.h b/include/emit.h index bd6b762c..cda0a13e 100644 --- a/include/emit.h +++ b/include/emit.h @@ -24,9 +24,9 @@ struct EmitterInfo_ { char *escape; VM_Code (*emit_code)(const Emitter); VM_Code code; - uint memoize; - uint unroll; - uint line; + uint16_t memoize; + uint16_t unroll; + uint16_t line; bool debug; }; diff --git a/include/env/env.h b/include/env/env.h index 8ff18c12..60ac4523 100644 --- a/include/env/env.h +++ b/include/env/env.h @@ -11,9 +11,9 @@ struct Env_Scope_ { struct Vector_ conts; struct Vector_ known_ctx; struct Match_ *match; - struct Vector_ effects; // a vector of Effect[] - uint depth; - bool in_try; + struct Vector_ effects; + uint16_t depth; + bool in_try; }; typedef struct Env_ { diff --git a/include/gwi.h b/include/gwi.h index ac9c2905..3fe25e96 100644 --- a/include/gwi.h +++ b/include/gwi.h @@ -21,7 +21,7 @@ struct Gwi_ { #ifdef GWION_DOC Lint *lint; #endif - uint tmpls; + uint8_t tmpls; }; #include "import/internals.h" diff --git a/include/import/checker.h b/include/import/checker.h index 1b400298..29024ebd 100644 --- a/include/import/checker.h +++ b/include/import/checker.h @@ -30,7 +30,7 @@ typedef struct ImportCK { // name_checker ? Type_Decl *td; // typedef ID_List curr;// enum }; - uint variadic; + bool variadic; enum importck_type type; ae_flag flag; // ???? } ImportCK; diff --git a/include/ugen.h b/include/ugen.h index feda9adb..305be4f7 100644 --- a/include/ugen.h +++ b/include/ugen.h @@ -7,14 +7,14 @@ typedef void (*f_tick)(const UGen ug) ANN; struct ugen_net_ { struct Vector_ from; struct Vector_ to; - uint size; + uint16_t size; }; struct ugen_multi_ { M_Object* channel; - uint n_in; - uint n_out; - uint n_chan; + uint8_t n_in; + uint8_t n_out; + uint8_t n_chan; }; struct ugen_gen { @@ -34,9 +34,9 @@ struct UGen_ { UGen ref; } module; m_float in, out; - uint op; - uint multi; - uint done; + uint8_t op; + bool multi; + bool done; }; #define TICK(a) __attribute__((hot)) ANN inline void a(const UGen u)