Every string literal is to end in a NUL on both backends, and a literal crosses to C uncopied
This commit is contained in:
parent
96b7ffb654
commit
764c5d4561
3
TODO.org
3
TODO.org
@ -1120,7 +1120,8 @@ The module links and runs. What is not proved is a collection running while a li
|
||||
instance of a dyn-holding struct sits in a frame of a body that module delivered.
|
||||
For the next sweep rather than for a lane.
|
||||
|
||||
** TODO A sliced string loses the trailing NUL
|
||||
** NEXT A sliced string loses the trailing NUL
|
||||
Decided 2026-09-25: both backends emit a NUL after every string literal, and a declare-c wrapper passes a literal argument to C without the copy it makes for any other string. A string is still pointer and length; no slice is promised a NUL. Rules out a NUL guarantee on every string.
|
||||
The x86 backend emits a NUL after every string constant and the LLVM one does not,
|
||||
so a =declare-c= wrapper leaning on the courtesy is already backend-dependent as
|
||||
well as slice-dependent. The contract is pointer and length, and nothing promised
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user