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:
@@ -704,7 +704,7 @@ fn compileWithTimer(allocator: std.mem.Allocator, io: std.Io, input_path: []cons
|
||||
if (e.build_config.manifest_path == null) e.build_config.manifest_path = merged_config.manifest_path;
|
||||
if (e.build_config.keystore_path == null) e.build_config.keystore_path = merged_config.keystore_path;
|
||||
// `#jni_main` decls flow from the compiler's lowering pass —
|
||||
// pre-rendered Java sources + the foreign_path for each. Build
|
||||
// pre-rendered Java sources + the runtime_path for each. Build
|
||||
// two parallel slices since BuildConfig hooks return strings.
|
||||
const jni_decls = comp.getJniMainEmissions();
|
||||
if (jni_decls.len > 0) {
|
||||
@@ -722,13 +722,13 @@ fn compileWithTimer(allocator: std.mem.Allocator, io: std.Io, input_path: []cons
|
||||
const fps = try allocator.alloc([]const u8, jni_decls.len);
|
||||
const srcs = try allocator.alloc([]const u8, jni_decls.len);
|
||||
for (jni_decls, 0..) |em, idx| {
|
||||
fps[idx] = em.foreign_path;
|
||||
fps[idx] = em.runtime_path;
|
||||
srcs[idx] = if (lib_name) |ln|
|
||||
try sx.ir.jni_java_emit.injectLoadLibrary(allocator, em.java_source, ln)
|
||||
else
|
||||
em.java_source;
|
||||
}
|
||||
e.build_config.jni_main_foreign_paths = fps;
|
||||
e.build_config.jni_main_runtime_paths = fps;
|
||||
e.build_config.jni_main_java_sources = srcs;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user