refactor(ffi-linkage): Phase 9.1a — rename collision-free linkage identifiers
Mechanical src/ rename of the linkage-family identifiers whose extern_* target is collision-free: callForeign→callExtern, marshalForeignArg→marshalExternArg, dedupeForeignSymbol→dedupeExternSymbol, foreign_name_map→extern_name_map, is_foreign_c_api→is_extern_c_api. Snapshot-neutral (internal only); suite green (646 corpus / 444 unit, 0 failed). Deferred (need per-site analysis — target name already exists): is_foreign↔is_extern (38 existing), foreign_lib/foreign_name↔extern_lib/extern_name (15/16 existing), foreign_expr (still built by c_import.zig auto-synthesis). Runtime-class family (ForeignClassDecl etc. → Runtime*, Decision 5) is Phase 9.2.
This commit is contained in:
@@ -364,7 +364,7 @@ pub const Lowering = struct {
|
||||
/// Null / absent for the comptime `..$args` pack (no constraint).
|
||||
pack_constraint: ?std.StringHashMap([]const u8) = null,
|
||||
struct_const_map: std.StringHashMap(StructConstInfo), // "Struct.CONST" → value info
|
||||
foreign_name_map: std.StringHashMap([]const u8), // sx name → C name for #foreign renames
|
||||
extern_name_map: std.StringHashMap([]const u8), // sx name → C name for #foreign renames
|
||||
target_config: ?@import("../target.zig").TargetConfig = null, // compilation target (for inline if)
|
||||
comptime_constants: std.StringHashMap(ComptimeValue), // compile-time known constants (e.g. OS, ARCH)
|
||||
diagnostics: ?*errors.DiagnosticList = null, // error reporting with source locations
|
||||
@@ -524,7 +524,7 @@ pub const Lowering = struct {
|
||||
.param_impl_map = std.StringHashMap(std.ArrayList(ParamImplEntry)).init(module.alloc),
|
||||
.param_impl_pack_map = std.StringHashMap(std.ArrayList(PackParamImplEntry)).init(module.alloc),
|
||||
.struct_const_map = std.StringHashMap(StructConstInfo).init(module.alloc),
|
||||
.foreign_name_map = std.StringHashMap([]const u8).init(module.alloc),
|
||||
.extern_name_map = std.StringHashMap([]const u8).init(module.alloc),
|
||||
.comptime_constants = std.StringHashMap(ComptimeValue).init(module.alloc),
|
||||
.xx_reentrancy = std.AutoHashMap(u64, void).init(module.alloc),
|
||||
.inferred_error_sets = std.StringHashMap([]const u32).init(module.alloc),
|
||||
@@ -1820,7 +1820,7 @@ pub const Lowering = struct {
|
||||
pub const lowerCall = lower_call.lowerCall;
|
||||
pub const diagnoseMissingContext = lower_call.diagnoseMissingContext;
|
||||
pub const allocViaContext = lower_call.allocViaContext;
|
||||
pub const callForeign = lower_call.callForeign;
|
||||
pub const callExtern = lower_call.callExtern;
|
||||
pub const prependCtxIfNeeded = lower_call.prependCtxIfNeeded;
|
||||
pub const resolveFuncByName = lower_call.resolveFuncByName;
|
||||
pub const resolveBuiltin = lower_call.resolveBuiltin;
|
||||
@@ -1920,7 +1920,7 @@ pub const Lowering = struct {
|
||||
pub const findTaggedVariant = lower_expr.findTaggedVariant;
|
||||
pub const emitBadVariant = lower_expr.emitBadVariant;
|
||||
pub const emitBadEnumVariant = lower_expr.emitBadEnumVariant;
|
||||
pub const dedupeForeignSymbol = lower_decl.dedupeForeignSymbol;
|
||||
pub const dedupeExternSymbol = lower_decl.dedupeExternSymbol;
|
||||
pub const resolveVariantValue = lower_expr.resolveVariantValue;
|
||||
pub const resolveVariantIndex = lower_expr.resolveVariantIndex;
|
||||
pub const lowerArrayLiteral = lower_expr.lowerArrayLiteral;
|
||||
|
||||
Reference in New Issue
Block a user