Bitwise»Episode Guide
Static Assembler, Part 2
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next marker
t / T Toggle theatre / SUPERtheatre mode
V Revert filter to original state Y Select link (requires manual Ctrl-c)

Menu toggling

q Quotes r References f Filter y Link c Credits

In-Menu Movement

a
w
s
d
h j k l


Quotes and References Menus

Enter Jump to timecode

Quotes, References and Credits Menus

o Open URL (in new tab)

Filter Menu

x, Space Toggle category and focus next
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus

Filter and Link Menus

z Toggle filter / linking mode

Credits Menu

Enter Open URL (in new tab)
0:08Recap and set the stage for the day continuing with the static assembler
0:08Recap and set the stage for the day continuing with the static assembler
0:08Recap and set the stage for the day continuing with the static assembler
0:45Review off-stream work on the static assembler, mentioning differences between C and Ion
📖
0:45Review off-stream work on the static assembler, mentioning differences between C and Ion
📖
0:45Review off-stream work on the static assembler, mentioning differences between C and Ion
📖
2:07Magic cookie in the header of a stretchy buffer
📖
2:07Magic cookie in the header of a stretchy buffer
📖
2:07Magic cookie in the header of a stretchy buffer
📖
6:24Continue to review the introduction of the memory arena and interning
📖
6:24Continue to review the introduction of the memory arena and interning
📖
6:24Continue to review the introduction of the memory arena and interning
📖
8:42Review fixes in the type resolver, including support for null-pointer evaluation in ternary expressions, and separating the equality and relational operators1
📖
8:42Review fixes in the type resolver, including support for null-pointer evaluation in ternary expressions, and separating the equality and relational operators1
📖
8:42Review fixes in the type resolver, including support for null-pointer evaluation in ternary expressions, and separating the equality and relational operators1
📖
13:31Highlight the concision of Ion's idiom declaring a variable as an address of a compound literal
🗩
13:31Highlight the concision of Ion's idiom declaring a variable as an address of a compound literal
🗩
13:31Highlight the concision of Ion's idiom declaring a variable as an address of a compound literal
🗩
16:32Start to enable the assembler's lexer to support the interned TOKEN_NAME, similar to Ion's
16:32Start to enable the assembler's lexer to support the interned TOKEN_NAME, similar to Ion's
16:32Start to enable the assembler's lexer to support the interned TOKEN_NAME, similar to Ion's
17:54Enable Ion's compiler to support ranges denoted by "..." for use in switch cases
17:54Enable Ion's compiler to support ranges denoted by "..." for use in switch cases
17:54Enable Ion's compiler to support ranges denoted by "..." for use in switch cases
26:40Introduce get_resolved_val() and set_resolved_val() for "..." range resolution
26:40Introduce get_resolved_val() and set_resolved_val() for "..." range resolution
26:40Introduce get_resolved_val() and set_resolved_val() for "..." range resolution
35:27Step in to set_resolved_val() to see what it produces
🏃
35:27Step in to set_resolved_val() to see what it produces
🏃
35:27Step in to set_resolved_val() to see what it produces
🏃
35:57Postpone "..." range support for now, and resume work on the assembler's lexer, supporting the interned TOKEN_NAME
35:57Postpone "..." range support for now, and resume work on the assembler's lexer, supporting the interned TOKEN_NAME
35:57Postpone "..." range support for now, and resume work on the assembler's lexer, supporting the interned TOKEN_NAME
40:32Run it to see that it correctly interned our strings
🏃
40:32Run it to see that it correctly interned our strings
🏃
40:32Run it to see that it correctly interned our strings
🏃
41:15elavid I thought your map handled zero values fine, but zero keys were the issue. Also, your memcpy lines will cause an overflow if Val and uint64 are actually different sizes on some platform. You were doing something like memcpy(&u64, &val, sizeof(Val));
🗪
41:15elavid I thought your map handled zero values fine, but zero keys were the issue. Also, your memcpy lines will cause an overflow if Val and uint64 are actually different sizes on some platform. You were doing something like memcpy(&u64, &val, sizeof(Val));
🗪
41:15elavid I thought your map handled zero values fine, but zero keys were the issue. Also, your memcpy lines will cause an overflow if Val and uint64 are actually different sizes on some platform. You were doing something like memcpy(&u64, &val, sizeof(Val));
🗪
41:26elavid Yeah, back to my first comment, I'm looking at map_put and map_get and I don't think you're using 0 as a sentinel value for values, only keys, so I don't understand assert(val)
🗪
41:26elavid Yeah, back to my first comment, I'm looking at map_put and map_get and I don't think you're using 0 as a sentinel value for values, only keys, so I don't understand assert(val)
🗪
41:26elavid Yeah, back to my first comment, I'm looking at map_put and map_get and I don't think you're using 0 as a sentinel value for values, only keys, so I don't understand assert(val)
🗪
42:17Fix map_put_uint64() to return if(!val)
42:17Fix map_put_uint64() to return if(!val)
42:17Fix map_put_uint64() to return if(!val)
43:32elavid Okay, I see. You could also have a fancier map_get function that lets you tell if a value was found or not
🗪
43:32elavid Okay, I see. You could also have a fancier map_get function that lets you tell if a value was found or not
🗪
43:32elavid Okay, I see. You could also have a fancier map_get function that lets you tell if a value was found or not
🗪
43:42Make resolve_stmt() convert "..." range operands to type_ullong, and get_resolved_val() catch buffer overflows
43:42Make resolve_stmt() convert "..." range operands to type_ullong, and get_resolved_val() catch buffer overflows
43:42Make resolve_stmt() convert "..." range operands to type_ullong, and get_resolved_val() catch buffer overflows
45:26Enable gen_stmt() to emit all the cases within a given "..." range
45:26Enable gen_stmt() to emit all the cases within a given "..." range
45:26Enable gen_stmt() to emit all the cases within a given "..." range
49:45Use our new "..." syntax in the assembler
49:45Use our new "..." syntax in the assembler
49:45Use our new "..." syntax in the assembler
50:14Run it to see that the "..." range stuff work, and test the interning on strings that only differ by case
🏃
50:14Run it to see that the "..." range stuff work, and test the interning on strings that only differ by case
🏃
50:14Run it to see that the "..." range stuff work, and test the interning on strings that only differ by case
🏃
51:16Make the resolver only allow ranges from low to high
51:16Make the resolver only allow ranges from low to high
51:16Make the resolver only allow ranges from low to high
54:20Enable the lexer to handle comments
54:20Enable the lexer to handle comments
54:20Enable the lexer to handle comments
57:12Run it to see that both the division token and comments are interned correctly
🏃
57:12Run it to see that both the division token and comments are interned correctly
🏃
57:12Run it to see that both the division token and comments are interned correctly
🏃
57:21Review the addition of goto label support in Ion
📖
57:21Review the addition of goto label support in Ion
📖
57:21Review the addition of goto label support in Ion
📖
59:38Make the assembler's next_token() handle \n separately from the other whitespace characters
59:38Make the assembler's next_token() handle \n separately from the other whitespace characters
59:38Make the assembler's next_token() handle \n separately from the other whitespace characters
1:01:54Run it to see our parsed newlines
🏃
1:01:54Run it to see our parsed newlines
🏃
1:01:54Run it to see our parsed newlines
🏃
1:02:17A few words on supporting inclusive "..." case ranges only, and not exclusive ranges
🗩
1:02:17A few words on supporting inclusive "..." case ranges only, and not exclusive ranges
🗩
1:02:17A few words on supporting inclusive "..." case ranges only, and not exclusive ranges
🗩
1:03:11Spec out our line-oriented syntax for the static assembler
🗩
1:03:11Spec out our line-oriented syntax for the static assembler
🗩
1:03:11Spec out our line-oriented syntax for the static assembler
🗩
1:07:56Adapt the token and keyword matching code from lex.c to Ion
1:07:56Adapt the token and keyword matching code from lex.c to Ion
1:07:56Adapt the token and keyword matching code from lex.c to Ion
1:17:48Introduce init_parser() and start on xreg parsing
1:17:48Introduce init_parser() and start on xreg parsing
1:17:48Introduce init_parser() and start on xreg parsing
1:22:04elavid If you're trying to map the interned string "x3" to the integer 3, you could store that in the interned string header. Or maybe "x3" should be a token recognized by the lexer, and you get the register number by masking off some bits
🗪
1:22:04elavid If you're trying to map the interned string "x3" to the integer 3, you could store that in the interned string header. Or maybe "x3" should be a token recognized by the lexer, and you get the register number by masking off some bits
🗪
1:22:04elavid If you're trying to map the interned string "x3" to the integer 3, you could store that in the interned string header. Or maybe "x3" should be a token recognized by the lexer, and you get the register number by masking off some bits
🗪
1:22:47Introduce the notion of KeywordData to treat registers, e.g. xreg, as keywords, stored with their associated register number
1:22:47Introduce the notion of KeywordData to treat registers, e.g. xreg, as keywords, stored with their associated register number
1:22:47Introduce the notion of KeywordData to treat registers, e.g. xreg, as keywords, stored with their associated register number
1:33:11Cut off the stream here
🗩
1:33:11Cut off the stream here
🗩
1:33:11Cut off the stream here
🗩