Phase 12 TypeBox統合ABI設計完了: C ABI + Nyash ABI革命的統合
主な成果: - TypeBox(型情報をBoxとして扱う)による統合ABI設計 - C ABI + Nyash ABIの完全統合仕様書作成 - 3大AI専門家(Gemini/Codex/ChatGPT5)による検証済み - ChatGPT5の10個の安全性改善提案を反映 - README.mdのドキュメント更新(全起点から到達可能) MapBox拡張: - string型キーサポート(従来のi64に加えて) - remove/clear/getOr/keysStr/valuesStr/toJson実装 - keys()/values()のランタイムシムサポート(TypeBox待ち) その他の改善: - Phase 11.9(文法統一化)ドキュメント追加 - Phase 16(FoldLang)ドキュメント追加 - 非同期タイムアウトテスト追加 - 各種ビルド警告(未使用import等)は次のリファクタリングで対応予定 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -61,18 +61,27 @@ impl NyashInterpreter {
|
||||
// Main static boxを初期化
|
||||
self.ensure_static_box_initialized("Main")?;
|
||||
|
||||
// Main.main() を呼び出し
|
||||
// Main.main(args?) を呼び出し(引数が1つなら空配列をデフォルト注入)
|
||||
let mut default_args: Vec<ASTNode> = Vec::new();
|
||||
if let Ok(defs) = self.shared.static_box_definitions.read() {
|
||||
if let Some(main_def) = defs.get("Main") {
|
||||
if let Some(m) = main_def.methods.get("main") {
|
||||
if let ASTNode::FunctionDeclaration { params, .. } = m {
|
||||
if params.len() == 1 {
|
||||
default_args.push(ASTNode::New { class: "ArrayBox".to_string(), arguments: vec![], type_arguments: vec![], span: crate::ast::Span::unknown() });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let main_call_ast = ASTNode::MethodCall {
|
||||
object: Box::new(ASTNode::FieldAccess {
|
||||
object: Box::new(ASTNode::Variable {
|
||||
name: "statics".to_string(),
|
||||
span: crate::ast::Span::unknown(),
|
||||
}),
|
||||
object: Box::new(ASTNode::Variable { name: "statics".to_string(), span: crate::ast::Span::unknown() }),
|
||||
field: "Main".to_string(),
|
||||
span: crate::ast::Span::unknown(),
|
||||
}),
|
||||
method: "main".to_string(),
|
||||
arguments: vec![],
|
||||
arguments: default_args,
|
||||
span: crate::ast::Span::unknown(),
|
||||
};
|
||||
|
||||
@ -86,4 +95,3 @@ impl NyashInterpreter {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user