diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-05-19 17:07:25 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-05-19 17:07:25 -0400 |
commit | f7de68fe80850c4058eb2c1f123ca0dad54abe9b (patch) | |
tree | 7f33c0260179c29f6fdba75624a0e8ccccd9ab85 | |
parent | 25dcae82c9bc52326ee282b4b73c25387789cf0c (diff) |
removed a few unused functions
-rw-r--r-- | cgen.c | 7 | ||||
-rw-r--r-- | copy.c | 2 |
2 files changed, 2 insertions, 7 deletions
@@ -128,13 +128,6 @@ static bool cgen_fn_is_direct(CGenerator *g, Declaration *d) { return (!g->block || g->block->kind == BLOCK_NMS) && (d->flags & DECL_IS_CONST) && (d->flags & DECL_HAS_EXPR) && d->expr.kind == EXPR_FN && arr_len(d->idents) == 1; } -static bool fn_has_instances(FnExpr *f) { - if (f->flags & FN_EXPR_FOREIGN) return false; - if (fn_has_any_const_params(f)) return true; - if (!arr_len(f->params)) return false; - return type_is_builtin(&arr_last(f->params).type, BUILTIN_VARARGS); -} - static bool cgen_uses_ptr(Type *t) { assert(t->flags & TYPE_IS_RESOLVED); switch (t->kind) { @@ -77,6 +77,7 @@ static void copy_val(Allocator *a, Value *out, Value in, Type *t) { } } +#if 0 static void copy_val_full(Copier *c, Value *out, Value in, Type *t) { if (type_is_builtin(t, BUILTIN_TYPE)) { Type *new_type = allocr_malloc(c->allocr, sizeof *new_type); @@ -86,6 +87,7 @@ static void copy_val_full(Copier *c, Value *out, Value in, Type *t) { copy_val(c->allocr, out, in, t); } } +#endif static void copy_struct(Copier *c, StructDef *out, StructDef *in) { *out = *in; |