Skip to content

str.index_of, to_upper, to_lower, replace and repeat are declared in the standard library and their built-ins are deleted (#3483) - #3496

Merged
ehartford merged 2 commits into
mainfrom
builtin-bodies-4
Nov 21, 2026
Merged

ehartford merged 2 commits into
mainfrom
builtin-bodies-4

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Part of #3483 (D110): five more str methods (seven spellings: upper and lower stay beside to_upper and to_lower) are declared in std.string over the runtime calls their built-ins made.

Deleted from the compiler in the same change: their entries in builtin_method_intrinsic and in the name-based return-type table (the second derivation that bit the previous step), three BuiltinSigs rows, the MirIntrinsic and CcBuiltin members, the arms in the LLVM and C code generators, and one mention in the MIR validator. About 150 lines.

Tests: behav_3483_str_transforms_declared (a call, at compile time, as a method value, on a view, in a pipeline); the C-backend tests pass. err_2358_builtin_extra_arg used index_of as its example of a built-in; it now uses byte_at, which still is one.

Ten built-in methods have moved so far (two on List, eight on str).

Battery green; :release-checks green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant