From 934260fc2753b6e52aa2103dc2cae3fb8a722f8c Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 1 Apr 2017 23:30:45 +0200 Subject: [PATCH] mini-mes: Workarounds for gc.c. * gc.c (gc_copy)[!__GNUC__]: Avoid by value assignment from array-of struct entry. * scaffold/mini-mes.c (gc_init_cells): Workarounds. --- gc.c | 29 +++++++++++++++++++++ scaffold/mini-mes.c | 62 ++++++++++++++++++++++++++++++++++++--------- 2 files changed, 79 insertions(+), 12 deletions(-) diff --git a/gc.c b/gc.c index 2f197eda..54c2351a 100644 --- a/gc.c +++ b/gc.c @@ -70,12 +70,41 @@ gc_copy (SCM old) ///((internal)) { if (TYPE (old) == TBROKEN_HEART) return g_cells[old].car; SCM new = g_free++; +#if 0 g_news[new] = g_cells[old]; +#else + SCM y = new; + SCM z = old; + SCM zz = TYPE (z); + NTYPE (y) = zz; + zz = CAR (z); + NCAR (y) = zz; + zz = CDR (z); + NCDR (y) = zz; +#endif if (NTYPE (new) == TVECTOR) { NVECTOR (new) = g_free; for (int i=0; i