return size;
}
-ANN static inline m_uint round2szint(const m_uint i) {
- return ((i + (SZ_INT-1)) & ~(SZ_INT-1));
-}
-
ANN static void emit_func_arg_vararg(const Emitter emit, const Exp_Call* exp_call) {
const Instr instr = emit_add_instr(emit, VarargIni);
const Vector kinds = new_vector(emit->gwion->mp);
#include "parse.h"
ANN Type type_decl_resolve(const Env env, const Type_Decl* td) {
- Type t = find_type(env, td->xid);
- CHECK_OO(t)
- CHECK_OO((t = scan_type(env, t, td)))
+ const Type base = find_type(env, td->xid);
+ CHECK_OO(base)
+ const Type t = scan_type(env, base, td);
return !td->array ? t : array_type(env, t, td->array->depth);
}
ANEW ANN static m_str td2str(const Env env, const Type_Decl* td) {
m_uint depth = td->array ? td->array->depth : 0;
- size_t l = id_list_len(td->xid) + depth * 2;
+ const size_t l = id_list_len(td->xid) + depth * 2;
struct td_info info = { td->types, (m_str)xmalloc(l), l, l };
type_path(info.str, td->xid);
while(depth--) { td_add(&info, '['); td_add(&info, ']'); }
return info.str;
}
-#include "vm.h"
-#include "gwion.h"
ANN static inline void* type_unknown(const Env env, const ID_List id) {
char path[id_list_len(id)];
type_path(path, id);