wip(phase15): AOT修正作業中 - Nyプラグインと標準ライブラリ実装
Phase 15のAOT/ネイティブビルド修正作業を継続中。 ChatGPTによるstd実装とプラグインシステムの改修を含む。 主な変更点: - apps/std/: string.nyashとarray.nyashの標準ライブラリ追加 - apps/smokes/: stdライブラリのスモークテスト追加 - プラグインローダーv2の実装改修 - BoxCallのハンドル管理改善 - JIT hostcall registryの更新 - ビルドスクリプト(build_aot.sh, build_llvm.sh)の調整 まだ修正作業中のため、一部の機能は不完全な状態。 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -199,6 +199,7 @@ impl NyashInterpreter {
|
||||
// Local method on instance
|
||||
if let Some(method_ast) = instance.get_method(method) {
|
||||
if let ASTNode::FunctionDeclaration { params, body, .. } = method_ast.clone() {
|
||||
eprintln!("[dbg] enter instance method {}.{}", instance.class_name, method);
|
||||
// Evaluate args in current context
|
||||
let mut arg_values = Vec::new();
|
||||
for a in arguments {
|
||||
@ -231,6 +232,7 @@ impl NyashInterpreter {
|
||||
}
|
||||
}
|
||||
self.restore_local_vars(saved);
|
||||
eprintln!("[dbg] exit instance method {}.{}", instance.class_name, method);
|
||||
return Some(Ok(result));
|
||||
} else {
|
||||
return Some(Err(RuntimeError::InvalidOperation { message: format!("Method '{}' is not a valid function declaration", method) }));
|
||||
|
||||
@ -234,19 +234,23 @@ impl NyashInterpreter {
|
||||
let is_true = self.is_truthy(&condition_value);
|
||||
|
||||
if is_true {
|
||||
eprintln!("[dbg] if-then enter");
|
||||
for statement in then_body {
|
||||
self.execute_statement(statement)?;
|
||||
if !matches!(self.control_flow, super::ControlFlow::None) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
eprintln!("[dbg] if-then exit");
|
||||
} else if let Some(else_statements) = else_body {
|
||||
eprintln!("[dbg] if-else enter");
|
||||
for statement in else_statements {
|
||||
self.execute_statement(statement)?;
|
||||
if !matches!(self.control_flow, super::ControlFlow::None) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
eprintln!("[dbg] if-else exit");
|
||||
}
|
||||
|
||||
Ok(Box::new(VoidBox::new()))
|
||||
|
||||
Reference in New Issue
Block a user