feat: 跨模块可重赋导出活读

This commit is contained in:
2026-09-18 00:46:06 +00:00
parent 1855775956
commit 3de0f8a6cb
10 changed files with 447 additions and 44 deletions
+7 -1
View File
@@ -4,7 +4,7 @@ use std::sync::Arc;
use oxide_kernel::kernel::{KernelCore, KernelSession};
use oxide_types::mem::Epoch;
use oxide_types::object::{JsObject, PropAttributes};
use oxide_types::object::{Cell, JsObject, PropAttributes};
use oxide_types::value::JsValue;
use super::Vm;
@@ -161,6 +161,12 @@ impl oxide_runtime_api::VmHost for Vm {
.and_then(|m| m.function_name.clone())
.unwrap_or_default()
}
fn module_frame_cell(&self, cell_idx: u32) -> Option<*mut Cell> {
self.cell_stack
.last()
.and_then(|cells| cells.get(cell_idx as usize).copied())
.filter(|p| !p.is_null())
}
fn create_dynamic_function(&mut self, params: &[String], body: &str) -> Result<JsValue, String> {
self.create_dynamic_function(params, body)
}