mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
Sema: rename value resolution functions
Having simplified these functions in a previous commit, I felt inclined to refactor their names, which were previously quite inconsistent. There are now 4 "core" functions: * `resolveValue` (previously `resolveMaybeUndefVal`) allows runtime-known and undef values. * `resolveConstValue` (previously `resolveConstMaybeUndefVal`) allows undef but not runtime-known values. * `resolveDefinedValue` (name unchanged) allows runtime-known values but not comptime-known undef. * `resolveConstDefinedValue` (previously `resolveConstValue`) does not allow runtime-known or undef values. You can see the inconsistencies in the old names here - sometimes we specified "maybe undef", and sometimes we went the other way by specifying "defined". With the new names, the most common function, `resolveValue`, has the shortest name and does the most general thing, and is the baseline that the other functions are adding logic to. Some other functions were also renamed: * `resolveMaybeUndefLazyVal` -> `resolveValueResolveLazy` * `resolveMaybeUndefValIntable` -> `resolveValueIntable` * `resolveMaybeUndefValAllowVariables` -> `resolveValueAllowVariables`
This commit is contained in:
parent
7882bdcb7e
commit
67caf68505
517
src/Sema.zig
517
src/Sema.zig
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user