Commit Graph

5 Commits

Author SHA1 Message Date
Kuba Mracek
adeb40f261 SE-0492: Stabilize @_section/@_used into @section/@used
Removes the underscored prefixes from the @_section and @_used attributes, making them public as @section and @used respectively. The SymbolLinkageMarkers experimental feature has been removed as these attributes are now part of the standard language. Implemented expression syntactic checking rules per SE-0492.

Major parts:
- Renamed @_section to @section and @_used to @used
- Removed the SymbolLinkageMarkers experimental feature
- Added parsing support for the old underscored names with deprecation warnings
- Updated all tests and examples to use the new attribute names
- Added syntactic validation for @section to align with SE-0492 (reusing the legality checker by @artemcm)
- Changed @DebugDescription macro to explicitly use a tuple type instead of type inferring it, to comply with the expression syntax rules
- Added a testcase for the various allowed and disallowed syntactic forms, `test/ConstValues/SectionSyntactic.swift`.
2025-10-22 16:05:39 -07:00
Daniel Rodríguez Troitiño
ba68faaed5 [test] Mark tests that use experimental/upcoming features as such
Find all the usages of `--enable-experimental-feature` or
`--enable-upcoming-feature` in the tests and replace some of the
`REQUIRES: asserts` to use `REQUIRES: swift-feature-Foo` instead, which
should correctly apply to depending on the asserts/noasserts mode of the
toolchain for each feature.

Remove some comments that talked about enabling asserts since they don't
apply anymore (but I might had miss some).

All this was done with an automated script, so some formatting weirdness
might happen, but I hope I fixed most of those.

There might be some tests that were `REQUIRES: asserts` that might run
in `noasserts` toolchains now. This will normally be because their
feature went from experimental to upcoming/base and the tests were not
updated.
2024-11-02 11:46:46 -07:00
Yuta Saito
d9b754d9b1 [test] Update test/IRGen/section_wasm.swift for new section flags
529845056b added @_used for the function
and it added "R" flag (WASM_SEG_FLAG_RETAIN) to the section directive.

This patch updates the test to match the new section flags.
2024-05-20 11:50:03 +00:00
Yuta Saito
977b74a254 [wasm][test] Update test/IRGen/section_wasm.swift
To follow up changes in 5f037efee3
2023-10-24 00:07:32 +00:00
Yuta Saito
34359eb6a4 [test][IRGen] Cover WebAssembly specific @_section behaviors
Wasm has quite different asm output than other archs, so added new
separate test file.
2023-10-12 16:17:39 +00:00