diff --git a/pervognsen/bitwise/bitwise/bitwise034.hmml b/pervognsen/bitwise/bitwise/bitwise034.hmml new file mode 100644 index 0000000..57c4d02 --- /dev/null +++ b/pervognsen/bitwise/bitwise/bitwise034.hmml @@ -0,0 +1,37 @@ +[video member=pervognsen stream_platform=twitch project=bitwise title="More Compiler Hacking" vod_platform=youtube id=UvYeis032Ok annotator=Miblo] +[0:00][Recap and set the stage for the day][:speech] +[0:30][Review the newly explicit package namespace semantics, and the current status of anonymous structs / unions][:language :parsing :research] +[3:13][Review the changed implementation of anonymous structs / unions][:language :parsing :research] +[5:09][Demo the shortcoming of the current implementation, regarding incorrect layout of anonymous structs / unions][:language :memory :research] +[6:12][Review bug fix in type_complete_union() regarding struct member alignment][:language :memory :research] +[7:48][Set up to correctly lay out anonymous structs / unions][:language :memory :speech] +[11:41][Dive into enabling our aggregate code to produce correctly aligned anonymous structs / unions][:language :memory] +[31:16][Set up to add some anonymous structs / unions test cases to test1.ion][:language :memory] +[32:13][:Run it and hit our assertion in cdecl_name()][:language :memory] +[32:34][Temporarily skip gen_typeinfos() and introduce test_token()][:language :memory] +[33:24][Step through complete_aggregate() to type_complete_union() to see that they correctly align our test anonymous struct / union][:language :memory :run] +[34:25][Enable complete_aggregate() to push a subaggregate_type][:language :memory] +[35:18][Step through type_complete_struct() to see that it completes our type, but is not inlining the fields into the parent struct][:language :memory :run] +[36:34][Introduce add_type_fields() to inline the fields of anonymous struct / unions into the parent][:language :memory] +[47:52][Test our anonymous struct alignment, to see that it is not correct][:language :memory :programming :run] +[48:56][Fix add_type_fields(), type_complete_struct() and type_complete_union() to correctly offset our fields][:language :memory] +[53:57][Test our anonymous struct field alignment to find that it is not correct][:language :memory :programming :run] +[56:10][Step into type_complete_union() to inspect its data][:language :memory :programming :run] +[56:46][Fix type_complete_union() and type_complete_struct() to align and size our fields after inlining them into the parent][:language :memory] +[58:09][Test it to find that it all works][:language :memory :programming :run] +[59:04][Enable gen_typeinfos() to generate type info for anonymous structs / unions][:"code generation" :language :parsing] +[1:00:23][Check out our generated type info to see that our typeinfo_table\[\] is wrong][:"code generation" :language :research] +[1:01:07][Enable is_excluded_typeinfo() to handle defined and anonymous structs / unions differently][:"code generation" :language :parsing] +[1:01:46][Check out our generated type info to see that our anonymous types don't show up][:"code generation" :language :research] +[1:03:50][Q&A][:speech] +[1:03:58][@xanatos387][So, what is the general plan for the next few weeks? We were working on the simulator for a bit; we still need to create our own HDL as well? Will creating the HDL be the start of the :hardware / FPGA section? How far do we plan to take the simulator in the near term?][:emulation] +[1:08:58][Read through our anonymous struct / union code][:"code generation" :language :research] +[1:09:57][Demo the bug in complete_aggregate() regarding undetected duplicate fields when anonymous structs / unions are in the mix][:"code generation" :language :parsing :run] +[1:10:26][Fix has_duplicate_fields() to handle anonymous types][:"code generation" :language :parsing] +[1:11:44][:Run it to see that it detects duplicate fields across subtypes][:"code generation" :language :parsing] +[1:13:02][Rename subaggregate_type to item_type in complete_type()][:language] +[1:13:20][Glance over the new anonymous struct / union code one more time, to see that it looks reasonable][:"code generation" :language :research] +[1:14:55][@miotatsu][The forth implementation is going to be fun. I've been planning to translate jonesforth to RISC-V :asm on my own series as an early exercise][:language] +[1:16:33][@miotatsu][It seems like a pretty ideal :language to me for bootstrapping more complex things] +[1:17:57][That's it for today][:speech] +[/video] diff --git a/pervognsen/bitwise/bitwise/bitwise035.hmml b/pervognsen/bitwise/bitwise/bitwise035.hmml new file mode 100644 index 0000000..ff6fa9e --- /dev/null +++ b/pervognsen/bitwise/bitwise/bitwise035.hmml @@ -0,0 +1,2 @@ +[video member=pervognsen stream_platform=twitch project=bitwise title="Implementing Forth" vod_platform=youtube id=rlayTh3sjiw annotator=] +[/video] \ No newline at end of file