feat(phase-9.75f-1): Complete FileBox dynamic library implementation
- Implement C ABI plugin system with workspace configuration - Create FileBox plugin with full read/write/exists/toString support - Fix critical memory management issues (double free) with Arc - Add comprehensive test suite for dynamic FileBox functionality - Achieve 98% build time improvement for plugin (2.87s vs 2-3min) - Maintain full backward compatibility with feature flags FileBox now loads dynamically, drastically reducing build times while maintaining all functionality. Next: Math/Time dynamic migration. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -13,6 +13,8 @@ use crate::instance::InstanceBox;
|
||||
use crate::channel_box::ChannelBox;
|
||||
use crate::interpreter::core::{NyashInterpreter, RuntimeError};
|
||||
use crate::interpreter::finalization;
|
||||
#[cfg(feature = "dynamic-file")]
|
||||
use crate::interpreter::plugin_loader::FileBoxProxy;
|
||||
use std::sync::Arc;
|
||||
|
||||
impl NyashInterpreter {
|
||||
@ -258,8 +260,12 @@ impl NyashInterpreter {
|
||||
// FileBoxProxy method calls (動的ライブラリ版)
|
||||
#[cfg(feature = "dynamic-file")]
|
||||
{
|
||||
eprintln!("🔍 DEBUG: Checking if object is FileBoxProxy, type_name: {}", obj_value.type_name());
|
||||
if let Some(file_proxy) = obj_value.as_any().downcast_ref::<crate::interpreter::plugin_loader::FileBoxProxy>() {
|
||||
eprintln!("✅ DEBUG: Object is FileBoxProxy, calling execute_file_proxy_method");
|
||||
return self.execute_file_proxy_method(file_proxy, method, arguments);
|
||||
} else {
|
||||
eprintln!("❌ DEBUG: Object is NOT FileBoxProxy");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user