diff --git a/crates/nyash_kernel/src/ffi/lifecycle.rs b/crates/nyash_kernel/src/ffi/lifecycle.rs index 5e3dcc05..d581b8c3 100644 --- a/crates/nyash_kernel/src/ffi/lifecycle.rs +++ b/crates/nyash_kernel/src/ffi/lifecycle.rs @@ -57,18 +57,16 @@ pub extern "C" fn nyrt_handle_release_h(handle: i64) { } // ============================================================================ -// Compatibility shim for existing code +// Legacy name (backward compatibility) // ============================================================================ -/// ny_release_strong: Compatibility shim +/// ny_release_strong: Legacy name (backward compatibility) /// -/// Legacy name for nyrt_handle_release_h. -/// New code should use nyrt_handle_release_h directly. +/// Original name from Phase 287. Kept for backward compatibility with existing +/// LLVM lowering code. Equivalent to nyrt_handle_release_h. /// -/// # Deprecation -/// This function is kept for backward compatibility with existing LLVM lowering. -/// Future phases will migrate callers to nyrt_handle_release_h. +/// New code should prefer nyrt_handle_release_h for clarity. #[no_mangle] -pub extern "C" fn ny_release_strong_shim(handle: i64) { +pub extern "C" fn ny_release_strong(handle: i64) { nyrt_handle_release_h(handle); } diff --git a/crates/nyash_kernel/src/lib.rs b/crates/nyash_kernel/src/lib.rs index c93bcd19..9b1d5d45 100644 --- a/crates/nyash_kernel/src/lib.rs +++ b/crates/nyash_kernel/src/lib.rs @@ -713,17 +713,6 @@ pub extern "C" fn ny_check_safepoint() { nyash_rust::runtime::global_hooks::safepoint_and_poll(); } -// export: ny_release_strong(handle: i64) -> void -// Phase 287: Release strong reference for variable overwrite semantics -#[no_mangle] -pub extern "C" fn ny_release_strong(handle: i64) { - if handle > 0 { - // Drop the handle - this decrements the reference count - // and may trigger deallocation if count reaches zero - nyash_rust::runtime::host_handles::drop_handle(handle as u64); - } -} - #[export_name = "nyash.string.birth_h"] pub extern "C" fn nyash_string_birth_h_export() -> i64 { // Create a new StringBox via unified plugin host; return runtime handle as i64