feat: Add parallel HTTP server E2E tests and enhance plugin system
- Add e2e_plugin_net_additional.rs with parallel server tests - Fix test to properly handle request objects (no double accept) - Add comprehensive net-plugin documentation - Implement debug tracing for method calls - Enhance plugin lifecycle documentation - Improve error handling in plugin loader - Add leak tracking infrastructure (for future use) - Update language spec with latest plugin features This enhances test coverage for concurrent HTTP servers and improves the overall plugin system documentation and debugging capabilities. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -228,6 +228,9 @@ pub struct NyashInterpreter {
|
||||
/// 共有ランタイム(Boxレジストリ等)
|
||||
#[allow(dead_code)]
|
||||
pub(super) runtime: NyashRuntime,
|
||||
|
||||
/// 現在の文脈で式結果が破棄されるか(must_use警告用)
|
||||
pub(super) discard_context: bool,
|
||||
}
|
||||
|
||||
impl NyashInterpreter {
|
||||
@ -259,6 +262,7 @@ impl NyashInterpreter {
|
||||
invalidated_ids: Arc::new(Mutex::new(HashSet::new())),
|
||||
stdlib: None, // 遅延初期化
|
||||
runtime,
|
||||
discard_context: false,
|
||||
}
|
||||
}
|
||||
|
||||
@ -292,6 +296,7 @@ impl NyashInterpreter {
|
||||
invalidated_ids: Arc::new(Mutex::new(HashSet::new())),
|
||||
stdlib: None,
|
||||
runtime,
|
||||
discard_context: false,
|
||||
}
|
||||
}
|
||||
|
||||
@ -321,6 +326,7 @@ impl NyashInterpreter {
|
||||
invalidated_ids: Arc::new(Mutex::new(HashSet::new())),
|
||||
stdlib: None, // 遅延初期化
|
||||
runtime,
|
||||
discard_context: false,
|
||||
}
|
||||
}
|
||||
|
||||
@ -351,6 +357,7 @@ impl NyashInterpreter {
|
||||
invalidated_ids: Arc::new(Mutex::new(HashSet::new())),
|
||||
stdlib: None,
|
||||
runtime,
|
||||
discard_context: false,
|
||||
}
|
||||
}
|
||||
|
||||
@ -379,8 +386,12 @@ impl NyashInterpreter {
|
||||
ASTNode::Program { statements, .. } => {
|
||||
let mut result: Box<dyn NyashBox> = Box::new(VoidBox::new());
|
||||
|
||||
for statement in statements.iter() {
|
||||
let last = statements.len().saturating_sub(1);
|
||||
for (i, statement) in statements.iter().enumerate() {
|
||||
let prev = self.discard_context;
|
||||
self.discard_context = i != last; // 最終文以外は値が破棄される
|
||||
result = self.execute_statement(statement)?;
|
||||
self.discard_context = prev;
|
||||
|
||||
// 制御フローチェック
|
||||
match &self.control_flow {
|
||||
|
||||
Reference in New Issue
Block a user