📚 Phase 12.5 最適化戦略 & Phase 15 セルフホスティング計画
Phase 12.5: MIR15最適化戦略 - コンパイラ丸投げ作戦 - optimization-strategy.txt: 詳細戦略(MIR側は軽量、コンパイラに丸投げ) - implementation-examples.md: 具体的な実装例 - debug-safety-comparison.md: 現在のDebugBox vs ChatGPT5提案の比較分析 Phase 15: Nyashセルフホスティング - 究極の目標 - self-hosting-plan.txt: 内蔵Craneliftによる実現計画 - technical-details.md: CompilerBox設計とブートストラップ手順 - README.md: セルフホスティングのビジョン 重要な知見: - LLVM統合完了済み(Phase 11)だが依存が重すぎる - Craneliftが現実的な選択肢(3-5MB vs LLVM 50-100MB) - 「コンパイラもBox、すべてがBox」の夢へ MASTERロードマップ更新済み
This commit is contained in:
@ -1546,6 +1546,40 @@ impl MirBuilder {
|
||||
self.emit_instruction(MirInstruction::Const { dst: void_id, value: ConstValue::Void })?;
|
||||
return Ok(void_id);
|
||||
},
|
||||
("task", "currentToken") => {
|
||||
let result_id = self.value_gen.next();
|
||||
self.emit_instruction(MirInstruction::ExternCall {
|
||||
dst: Some(result_id),
|
||||
iface_name: "env.task".to_string(),
|
||||
method_name: "currentToken".to_string(),
|
||||
args: arg_values,
|
||||
effects: EffectMask::READ,
|
||||
})?;
|
||||
return Ok(result_id);
|
||||
},
|
||||
("task", "cancelCurrent") => {
|
||||
self.emit_instruction(MirInstruction::ExternCall {
|
||||
dst: None,
|
||||
iface_name: "env.task".to_string(),
|
||||
method_name: "cancelCurrent".to_string(),
|
||||
args: arg_values,
|
||||
effects: EffectMask::IO,
|
||||
})?;
|
||||
let void_id = self.value_gen.next();
|
||||
self.emit_instruction(MirInstruction::Const { dst: void_id, value: ConstValue::Void })?;
|
||||
return Ok(void_id);
|
||||
},
|
||||
("future", "delay") => {
|
||||
let result_id = self.value_gen.next();
|
||||
self.emit_instruction(MirInstruction::ExternCall {
|
||||
dst: Some(result_id),
|
||||
iface_name: "env.future".to_string(),
|
||||
method_name: "delay".to_string(),
|
||||
args: arg_values,
|
||||
effects: EffectMask::READ.add(Effect::Io),
|
||||
})?;
|
||||
return Ok(result_id);
|
||||
},
|
||||
("console", "readLine") => {
|
||||
// env.console.readLine() → ExternCall returning string
|
||||
let result_id = self.value_gen.next();
|
||||
|
||||
Reference in New Issue
Block a user