refactor(ffi-linkage): Phase 9.2d — rename foreign_path → runtime_path (coupled .sx↔.zig↔hook)

The JNI/runtime-class path (Decision 5, Runtime* family). Coordinated across the
hook boundary so the BuildOptions accessor + its registered hook string stay in sync:
- src/: RuntimeClassDecl.foreign_path→runtime_path, splitForeignPath→splitRuntimePath,
  foreignPathToJavaName→runtimePathToJavaName, jni_main_foreign_paths→
  jni_main_runtime_paths, hookJniMainForeignPathAt→hookJniMainRuntimePathAt, and the
  hook string 'BuildOptions.jni_main_foreign_path_at'→'…runtime_path_at'.
- library/: build.sx accessor jni_main_foreign_path_at→jni_main_runtime_path_at +
  bundle.sx call sites + the  local var → runtime_path + a comment.
- specs.md: the accessor name + <foreign_path_with_dots> doc refs.
- Regenerated 37 .ir snapshots: every program importing build declares the renamed
  @BuildOptions.jni_main_runtime_path_at hook stub — symbol-name change only (verified
  the .ir diff is ONLY this rename; reverted orthogonal empty-file normalization).
Suite green (646 corpus / 444 unit, 0 failed).
This commit is contained in:
agra
2026-06-15 09:20:30 +03:00
parent a15a868391
commit 8cca3b9dde
53 changed files with 130 additions and 130 deletions

View File

@@ -386,7 +386,7 @@ test "lower: objcDefinedStateStructType collects user-declared fields" {
};
const fcd = ast.RuntimeClassDecl{
.name = "SxFoo",
.foreign_path = "SxFoo",
.runtime_path = "SxFoo",
.runtime = .objc_class,
.members = &members,
.is_extern = false,
@@ -418,7 +418,7 @@ test "lower: objcDefinedStateStructType handles empty field set" {
const fcd = ast.RuntimeClassDecl{
.name = "SxEmpty",
.foreign_path = "SxEmpty",
.runtime_path = "SxEmpty",
.runtime = .objc_class,
.members = &.{},
.is_extern = false,
@@ -450,7 +450,7 @@ test "lower: objcDefinedStateStructType skips non-field members" {
};
const fcd = ast.RuntimeClassDecl{
.name = "SxMixed",
.foreign_path = "SxMixed",
.runtime_path = "SxMixed",
.runtime = .objc_class,
.members = &members,
.is_extern = false,
@@ -478,7 +478,7 @@ test "lower: objcTypeEncodingFromSignature emits @ for Obj-C class pointers" {
const ns_ptr = module.types.ptrTo(ns_struct);
var ns_fcd = ast.RuntimeClassDecl{
.name = "NSString",
.foreign_path = "NSString",
.runtime_path = "NSString",
.runtime = .objc_class,
.members = &.{},
.is_extern = true,
@@ -511,7 +511,7 @@ test "lower: objcTypeEncodingFromSignature unwraps optional to wire type" {
const ns_ptr = module.types.ptrTo(ns_struct);
var ns_fcd = ast.RuntimeClassDecl{
.name = "NSString",
.foreign_path = "NSString",
.runtime_path = "NSString",
.runtime = .objc_class,
.members = &.{},
.is_extern = true,
@@ -680,7 +680,7 @@ test "lower: isObjcClassPointer recognises pointer-to-foreign-Obj-C-class" {
const ns_ptr = module.types.ptrTo(ns_struct);
var ns_fcd = ast.RuntimeClassDecl{
.name = "NSString",
.foreign_path = "NSString",
.runtime_path = "NSString",
.runtime = .objc_class,
.members = &.{},
.is_extern = true,
@@ -696,7 +696,7 @@ test "lower: isObjcClassPointer recognises pointer-to-foreign-Obj-C-class" {
const proto_ptr = module.types.ptrTo(proto_struct);
var proto_fcd = ast.RuntimeClassDecl{
.name = "NSCopying",
.foreign_path = "NSCopying",
.runtime_path = "NSCopying",
.runtime = .objc_protocol,
.members = &.{},
.is_extern = true,
@@ -728,7 +728,7 @@ test "lower: objcPropertyKind defaults + explicit ARC modifiers" {
_ = module.types.intern(.{ .@"struct" = .{ .name = ns_name, .fields = &.{} } });
var ns_fcd = ast.RuntimeClassDecl{
.name = "NSString",
.foreign_path = "NSString",
.runtime_path = "NSString",
.runtime = .objc_class,
.members = &.{},
.is_extern = true,
@@ -753,7 +753,7 @@ test "lower: objcPropertyKind defaults + explicit ARC modifiers" {
_ = module.types.intern(.{ .@"struct" = .{ .name = proto_name, .fields = &.{} } });
var proto_fcd = ast.RuntimeClassDecl{
.name = "NSCoding",
.foreign_path = "NSCoding",
.runtime_path = "NSCoding",
.runtime = .objc_protocol,
.members = &.{},
.is_extern = true,