Phase 11.9: 統一文法アーキテクチャ作業中 - MIR builder分割とJIT lower整理

- MIR builder: stmts/exprs/typeingモジュール分割による整理
- JIT lower: core/ops_ext.rs追加(外部呼び出し系の分離)
- 統一文法エンジン基盤構築中(grammar/unified-grammar.toml対応)
- ChatGPT5協調作業: M1完了、M2作業中

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Moe Charm
2025-09-03 01:37:38 +09:00
parent d52779dc10
commit 59b8cb3ace
14 changed files with 747 additions and 660 deletions

39
src/mir/builder/stmts.rs Normal file
View File

@ -0,0 +1,39 @@
use super::{MirInstruction, EffectMask, Effect, ConstValue, ValueId};
use crate::ast::ASTNode;
impl super::MirBuilder {
pub(super) fn build_print_statement(&mut self, expression: ASTNode) -> Result<ValueId, String> {
self.build_print_statement_legacy(expression)
}
pub(super) fn build_block(&mut self, statements: Vec<ASTNode>) -> Result<ValueId, String> {
self.build_block_legacy(statements)
}
pub(super) fn build_if_statement(&mut self, condition: ASTNode, then_branch: ASTNode, else_branch: Option<ASTNode>) -> Result<ValueId, String> {
self.build_if_statement_legacy(condition, then_branch, else_branch)
}
pub(super) fn build_loop_statement(&mut self, condition: ASTNode, body: Vec<ASTNode>) -> Result<ValueId, String> {
self.build_loop_statement_legacy(condition, body)
}
pub(super) fn build_try_catch_statement(&mut self, try_body: Vec<ASTNode>, catch_clauses: Vec<crate::ast::CatchClause>, finally_body: Option<Vec<ASTNode>>) -> Result<ValueId, String> {
self.build_try_catch_statement_legacy(try_body, catch_clauses, finally_body)
}
pub(super) fn build_throw_statement(&mut self, expression: ASTNode) -> Result<ValueId, String> {
self.build_throw_statement_legacy(expression)
}
pub(super) fn build_local_statement(&mut self, variables: Vec<String>, initial_values: Vec<Option<Box<ASTNode>>>) -> Result<ValueId, String> {
self.build_local_statement_legacy(variables, initial_values)
}
pub(super) fn build_return_statement(&mut self, value: Option<Box<ASTNode>>) -> Result<ValueId, String> {
self.build_return_statement_legacy(value)
}
pub(super) fn build_nowait_statement(&mut self, variable: String, expression: ASTNode) -> Result<ValueId, String> {
self.build_nowait_statement_legacy(variable, expression)
}
pub(super) fn build_await_expression(&mut self, expression: ASTNode) -> Result<ValueId, String> {
self.build_await_expression_legacy(expression)
}
pub(super) fn build_me_expression(&mut self) -> Result<ValueId, String> {
self.build_me_expression_legacy()
}
}