IRC channel logs
2026-09-20.log
back to list of logs
<ekaitz>i'm converting all our changes in mes to M2 <ekaitz>stikonas: how would you do something as easy as STACK [g_stack++] = X; <ekaitz>Got unsupported size 16 when storing number in register. <ekaitz>i'm finding that array access for setting things doesn't work well <stikonas>but I think siraben needs to finalize PR <ekaitz>array access not being clean is a pain in the balls <ekaitz>i'm doing things like: struct scm **t = STACK + g_stack; *t = x; <ekaitz>it's too late to make this kind of conversion in the first go <stikonas>hmm, why does it think that it's 16 bytes... <stikonas>probably today is too late for me to reason effectively :( <stikonas>I guess need to write some smaller reproducer first <ekaitz>i cannot reproduce it that easily <ekaitz>it complains about the line 13, the STACK [g_stack] = x <ekaitz>if M2-Planet fixes this I'll be very happy <ekaitz>but STACK[g_stack] is a struct scm * <ekaitz>and this usecase appears *everywhere* in mes <stikonas>perhaps it somehow misdetects size to be object size rather than pointer <ekaitz>idk how but the trick we used earlier doesn't work very well either <ekaitz>i'll just go to bed now and forget about it for the moment <ekaitz>(also in the index it doesn't work properly) <stikonas>hmm, switching to void pointers works but that's of course a hack <stikonas>and then we would need to do return ((struct scm *)STACK[0])->car; <stikonas>ok, so we are calling store = store_value(current_target->type->size); form expression function <stikonas>ekaitz: yesterday I found a workaround but it's slightly ugly <ekaitz>stikonas: thank you for looking into it <ekaitz>what I did is to continue using the same constructs Mes used for older versions of M2-Planet <ekaitz>I made it compiler and run right now <ekaitz>the ugly part is i'm using functions to make it readable, and that kills a big chunk of performance :( <stikonas>void pointers might be less ugly than STACK + gstack * M2_PTR_SIZE <stikonas>I think in your example I only had to change stack_push (struct scm *x) to stack_push (void *x) <ekaitz>yeah... but we already have that everywhere <ekaitz>stikonas: i found the problem also happens when you do things like STACK[1] or STACK[2] <ekaitz>but returns some weird value I don't know where it's coming from <stikonas>in the big reproducer it is checking size of scm rather than pointer <stikonas>so it somehow undid one too many indirections <aleksi>I've also had the issue that a[c] only indexes c bytes into the array rather than c*sizeof(a[0]) bytes. <stikonas>aleksi do you remember if that was for lvalue? <aleksi>I should check that, and also check that I was on the newest version of M2-Planet <stikonas>according to git log struct arrays are fairly new addition too <matrix_bridge><wildwestrom> I used a few python scripts and clankers to churn through the IRC logs and come up with a history of the bootstrappable builds project. https://bpa.st/X6IQ <wildwestrom>My bad. I exited the Matrix bridge by mistake. Falling back to Gamja.