Sylvie
9ab3446d1a
Fix two bugs with RGBASM fixed-point math ( #1388 )
...
- Fixed-point formulas are implemented using IEEE-754 floating-point
internally, which could give infinity or NaN values whose conversion
to fixed-point integer was platform-dependent.
- Formatting fixed-point $8000_0000 (INT32_MIN, -2147483648) was
not putting the negative sign in front.
2024-03-31 12:53:20 -04:00
Rangi42
6b5248f15b
Add a build target for include-what-you-use
2024-03-29 20:49:09 -04:00
Rangi42
eb708ebee5
Rename some variables left from the C parser (e.g. yylval)
2024-03-29 19:42:23 -04:00
Rangi42
cf3e5e15f8
Update the 'ucity' commit used for testing
...
This reduces our need to patch it for compatibility
2024-03-29 14:42:23 -04:00
Sylvie
408a783fd8
Add more RGBLINK tests ( #1386 )
2024-03-29 14:30:32 -04:00
Rangi42
17afe611fd
Update the 'libbet' commit used for testing
...
This reduces our need to patch it for compatibility
2024-03-29 13:35:12 -04:00
Sylvie
996db14ffa
Make test built of 'libbet' reproducible with old Pillow versions ( #1385 )
...
The Python Pillow image library gives different output for
`Image.getcolors()` in version 9 than version 10. This causes
libbet's SGB border to be built differently, giving a different
ROM hash and technically failing the test script.
This patches libbet to only keep the known-good colors. It also
adapts the coverage script to run all the tests, including
building the third-party projects.
2024-03-29 11:59:36 -04:00
Sylvie
7326cc6875
Verify ROM hashes for all CI test projects ( #1384 )
...
Ucity and Libbet build files in a nondeterministic order, which
we have to patch to sort consistently for reproducible builds.
2024-03-28 22:37:33 -04:00
Rangi42
9dac583e45
Patch test projects so they build without deprecated features
...
Also ensure the test scripts pass shellcheck
2024-03-28 17:26:42 -04:00
Rangi42
ccfd3b6af8
Remove documentation of already-removed RGBGFX options
2024-03-28 17:26:42 -04:00
Rangi42
4a4656af1b
Remove the deprecated RGBGFX --output-* options (use --auto-*)
2024-03-28 17:26:42 -04:00
Rangi42
b021090e7f
Remove deprecated -i for --include (use -I)
2024-03-28 17:26:42 -04:00
Rangi42
230b1db438
Remove deprecated DEF-less definitions
2024-03-28 17:26:42 -04:00
Rangi42
14b72222b1
Remove the deprecated -H/-h/-L/-l options
2024-03-28 17:26:42 -04:00
Rangi42
106e516962
Split the .peek() method into its next-char and lookahead cases
2024-03-28 15:37:25 -04:00
Rangi42
6f74e4fb9c
Remove the suboptimal .canPeek() and .peek() methods
2024-03-28 14:49:36 -04:00
Rangi42
83c0634f15
Refactor peekInternal to be a LexerState method
2024-03-28 13:21:28 -04:00
Rangi42
4172d330b9
Refactor BufferedContent and Expansion to have methods
...
Use a buffer size that is a power of two for fast modulus
2024-03-28 12:57:23 -04:00
Rangi42
cf7bdb19b6
Run clang-format 14 on everything
...
Later versions may need some proprties added or changed to not
format closing braces weirdly.
2024-03-28 09:17:27 -04:00
ISSOtm
20b7b591d4
Run clang-format
...
Fix some small style inconsistencies
2024-03-28 01:41:25 +01:00
ISSOtm
d327138cd8
Report as many build errors as possible in CI
...
This allows debugging more problems in a single cycle
2024-03-28 01:37:10 +01:00
ISSOtm
0c0923ac16
Disable some spurious MSVC warnings
...
Not that it will de-clutter our CI logs very much, but eh, you know.
2024-03-28 01:33:21 +01:00
ISSOtm
e5078aba3b
Clean up #includes
...
Remove unused headers, and avoid relying on transitive inclusions
`include-what-you-use` has been very useful for this!
2024-03-28 01:25:38 +01:00
ISSOtm
cae7b5dcf6
Use standard attribute syntax instead of IBM __attribute__
...
Move format attrs to proper standard location
For some reason, GCC 13 is more lax than earlier versions...
2024-03-27 20:01:12 -04:00
Rangi42
506911d7d0
Refactor to avoid redundant obj_CheckAssertions function
2024-03-27 16:19:01 -04:00
Rangi42
dcb4e40388
Use QUOTEDSTRLEN macro instead of sizeof or strlen
2024-03-27 11:50:48 -04:00
Rangi42
912a1504ec
Defer closing of depend file
2024-03-27 11:44:26 -04:00
Rangi42
2ef5e807f8
No more memory leaks!
2024-03-27 11:27:34 -04:00
Rangi42
b6039870e5
Remove now-redundant MmappedContent struct
2024-03-27 11:27:34 -04:00
Rangi42
78801e324c
Group pointer and size as a ContentSpan struct
2024-03-27 11:27:34 -04:00
Rangi42
bf0cabb3ea
Use std::shared_ptr for lexer capture buffers
2024-03-27 11:27:34 -04:00
Sylvie
a68bebf4a2
Use a Defer struct to close files and restore lexer state with RAII ( #1379 )
2024-03-27 10:42:53 -04:00
Rangi42
32db0a0f18
Rename CaptureBody to Capture, and refactor its methods
2024-03-26 12:29:59 -04:00
Rangi42
a167d23d01
Use content-specific destructors for lexer state
...
Also rename `LexerState` content structs from `*LexerState` to `*Content`
2024-03-26 12:29:59 -04:00
Rangi42
8b6ae994b1
Use STR and CAT macros for # and ##
2024-03-25 14:22:43 -04:00
Rangi42
2b44672873
Rename a few variables
2024-03-25 14:22:38 -04:00
Rangi42
3568418c5d
Remove RGBLINK's unimplemented '-s' "smart linking" placeholder flag
2024-03-25 11:36:23 -04:00
Rangi42
cb59119881
Use automatically-allocated std::string_view for macros
2024-03-25 11:33:17 -04:00
Rangi42
d9e5e57e27
Make CaptureBufs be parser values instead of a single static global
2024-03-23 19:44:54 -04:00
Rangi42
e9e8915725
Refactor to keep lexerState and lexerStateEOL static
...
Also run `clang-format` on everything
2024-03-23 19:14:46 -04:00
Sylvie
c075ffb570
Update test project commits ( #1377 )
2024-03-22 17:06:39 -04:00
Sylvie
96c808810f
Remove .simple.err files, since we require Bison 3.0 ( #1373 )
2024-03-22 15:36:32 -04:00
Rangi42
6a5518e0c5
Use RAII to unmap or close the lexer states' files automatically
2024-03-22 14:25:36 -04:00
Rangi42
507439bc25
Refactor macro args to be owned collectively by their fstack contexts
2024-03-22 14:25:36 -04:00
Rangi42
b85c5cde8f
Use std::shared_ptr for MacroArgs
2024-03-22 14:25:36 -04:00
ISSOtm
e255af9e10
Do not limit strings to 255 characters
2024-03-22 14:25:36 -04:00
ISSOtm
9f239f6dcc
Use std::shared_ptr<std::string> for lexed/parsed strings
2024-03-22 14:25:36 -04:00
ISSOtm
412073774c
Refactor string-formatting routines to append to an existing string
2024-03-22 14:25:36 -04:00
ISSOtm
52e8e1f9fc
Simplify \@ handling by using std::shared_ptr<std::string>
...
This has been relocated from macro.cpp to fstack.cpp, since both
MACRO and REPT/FOR nodes have their own unique `\@` values.
2024-03-22 14:25:36 -04:00
Sylvie
04405fb444
Use std::shared_ptr for fstack nodes ( #1371 )
2024-03-22 13:27:21 -04:00