microzig icon indicating copy to clipboard operation
microzig copied to clipboard

Update gen.zig to produce just enums

Open taylorh140 opened this issue 1 year ago • 6 comments

Changed the gen.zig to produce just enums instead of packed unions.

taylorh140 avatar Oct 03 '24 16:10 taylorh140

as per @ikskuh's statement. that built-ins remove the need for the packed unions.

taylorh140 avatar Oct 03 '24 16:10 taylorh140

I'm not quite sure where the test are located... yet. Ill find them and get this polished.

taylorh140 avatar Oct 03 '24 17:10 taylorh140

@taylorh140 tests are at the bottom of the file

mattnite avatar Oct 03 '24 18:10 mattnite

Ok, I think I have the changes you requested. I'm not sure why the build is failing though.

I think I have the test cases aligned but. However i can seem to build zig test. I'll have to see if I added that.

taylorh140 avatar Oct 04 '24 01:10 taylorh140

It doesnt look like I added it: regz zig build test gives: image

taylorh140 avatar Oct 04 '24 01:10 taylorh140

@taylorh140 check the generated code, we're failing AST checks. Could be something like a missing curly brace

mattnite avatar Oct 20 '24 13:10 mattnite

@mattnite Hey it looks like the AST problem is better, I missed removing a closing bracket in the extended cases.

I think that the next thing is maybe updating how some of the items use the packed union as it looks like it's causing some issues. I think i wouldn't mind hunting these down if you don't thing it would be too much of a scope creep for the PR.

taylorh140 avatar Oct 21 '24 15:10 taylorh140

@taylorh140 Yup, a low level API has been changed so now all uses of it need to be updated. I care more about commit atomicity than perceived patch complexity, so to me it's not even scope creep, it's an unfinished part of the task you're trying to do.

mattnite avatar Oct 21 '24 15:10 mattnite

Closing because #328 implements this now that the regz rewrite is complete.

mattnite avatar Dec 22 '24 20:12 mattnite