cinera_handmade.network/pervognsen/bitwise/bitwise/bitwise009.hmml

47 lines
4.1 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[video member=pervognsen stream_platform=twitch project=bitwise title="Functions & Statements" vod_platform=youtube id=VRMxHYuW2BY annotator=Miblo]
[0:07][Recap and set the stage for the day, reviewing the code from the previous (extra) stream][:speech]
[1:16][Review the work on resolve_expr_compound(), resolving components of compound literals, and on implementing support for named and index initialisers][:parsing :research]
[9:36][Review the work on integer binary operators, including constant folding][:parsing :research]
[11:19][Review the work on type alignment][:memory :parsing :research]
[14:21][Mention the hope to get to code generation, and determine to finish type-checking and inference for statements][:parsing :speech]
[15:18][Perform some cleanup, renaming the Entity struct to Sym][:parsing]
[17:52][Enable sym_get() to perform a linear search over symbols in nested scopes][:parsing :searching]
[23:17][:Run it to see that the existing stuff still works][:parsing]
[23:43][Introduce sym_push(), sym_enter() and sym_leave(), to operate on symbols within scopes][:parsing]
[27:38][Introduce resolve_func(), sym_var(), resolve_stmt_block(), resolve_stmt() and resolve_cond_expr(), to parse function bodies][:parsing]
[48:55][Explain the logic behind our for-loop :parsing][:speech]
[50:40][Continue to work through our statement cases switch, assign and init in resolve_stmt()][:parsing]
[1:02:28][:Run it to verify we don't crash][:parsing]
[1:02:47][Add a ++ test in resolve_test() and fix a crash bug in the STMT_ASSIGN case in resolve_stmt()][:parsing]
[1:04:24][:Run it to see it doesn't crash][:parsing]
[1:05:02][Add further tests of our new code in resolve_test(), running to see how it works][:parsing :programming :run]
[1:07:38][Hit a "Non-existent name" error][:parsing :run]
[1:07:48][Add a sym_install_type() for "float" in resolve_test()][:parsing]
[1:07:59][:Run it and hit our expected "Return type mismatch" error][:parsing]
[1:08:11][Add further tests, of switch(), in resolve_test(), running to see how it works][:parsing :programming :run]
[1:10:15][Crash in resolve_expected_expr()][:parsing :run]
[1:10:37][Fix the iterator in the STMT_SWITCH case in resolve_stmt()][:parsing]
[1:10:55][:Run it to see that it works][:parsing]
[1:11:03][Add further tests, of while(), in resolve_test(), running to see how it works][:parsing :programming :run]
[1:13:09][Add a type-checking test in resolve_test(), running to see how it works][:parsing :programming :run]
[1:13:53][Note that it pretty much all works, and that statements aren't difficult to type-check][:parsing :speech]
[1:15:19][Enable resolve_stmt() to handle both the presence and absence of a return value, adding a test, and running to see that it works][:parsing :run]
[1:17:32][Q&A][:speech]
[1:17:58][@0b0000000000000][You have duplicate f5 function names][:parsing]
[1:18:00][Fix the func test names in resolve_test()][:parsing]
[1:18:23][@0b0000000000000][Will there be function overloading?][:language]
[1:18:31][@chrisburtbrown][You might have answered this already but can functions contain other functions?][:parsing]
[1:20:00][@nothings2][This is why you use signed ints for everything and fuck size_t's unsignedness]
[1:21:51][@nothings2][Do compound literals require filling out all fields, or are they 0-inited?][:language]
[1:23:32][@recursivechat][Are you making a compiler? Or your own :language?]
[1:25:08][@buzzfizz64][@pervognsen Sorry if I missed it, but are you going to change the syntax of function pointers?][:language]
[1:26:17][@nothings2][@pervognsen I've forgotten the reason why you're writing a :language in the first place. Is there no gcc or clang for RISC-V?][:isa]
[1:27:15][@0b0000000000000][You'll also get a lot of coverage of the :language that way]
[1:27:51][@godling72][@pervognsen Debugger too?]
[1:29:35][@naysayer88][chocotDecent]
[1:29:41][@0b0000000000000][Will you be writing an interpreter for Ion in C?][:language]
[1:31:27][@0b0000000000000][How will you be confident that your Ion compilation is correct?][:language]
[1:33:11][@buzzfizz64][@pervognsen Are you going to do some sort of formal verification at some point?][:language]
[1:34:44][Stop recording][:speech]
[/video]