From 77816ab19ff3e9ca9ca0f6a51320f0c552f76975 Mon Sep 17 00:00:00 2001 From: Moe Charm Date: Fri, 29 Aug 2025 02:26:03 +0900 Subject: [PATCH] =?UTF-8?q?fix(jit):=20=E3=83=AA=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=AF=E3=82=BF=E3=83=AA=E3=83=B3=E3=82=B0=E5=BE=8C=E3=81=AE?= =?UTF-8?q?=E3=83=93=E3=83=AB=E3=83=89=E3=82=A8=E3=83=A9=E3=83=BC=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - extern_thunks.rsへの関数移動に伴うインポート追加 - 存在しない関数名の参照を削除(string_len_h等) - 不要なインポートを削除(CallBoundaryBox, NyashRuntimeBuilder等) - OpEffectのエイリアスを修正(Effect as OpEffect) ChatGPT5さんのリファクタリング作業の続き。ファイルサイズ削減(~1000行)により AI連携が容易になりました。 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/jit/lower/builder.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/jit/lower/builder.rs b/src/jit/lower/builder.rs index a5201fe6..838ac12d 100644 --- a/src/jit/lower/builder.rs +++ b/src/jit/lower/builder.rs @@ -138,14 +138,20 @@ use cranelift_codegen::ir::InstBuilder; #[cfg(feature = "cranelift-jit")] extern "C" fn nyash_host_stub0() -> i64 { 0 } #[cfg(feature = "cranelift-jit")] -use super::extern_thunks::{ nyash_math_sin_f64, nyash_math_cos_f64, nyash_math_abs_f64, nyash_math_min_f64, nyash_math_max_f64, }; -#[cfg(feature = "cranelift-jit")] - -#[cfg(feature = "cranelift-jit")] - -#[cfg(feature = "cranelift-jit")] +use super::extern_thunks::{ + nyash_math_sin_f64, nyash_math_cos_f64, nyash_math_abs_f64, nyash_math_min_f64, nyash_math_max_f64, + nyash_array_len_h, nyash_array_get_h, nyash_array_set_h, nyash_array_push_h, + nyash_array_last_h, nyash_map_size_h, nyash_map_get_h, nyash_map_get_hh, + nyash_map_set_h, nyash_map_has_h, + nyash_string_charcode_at_h, + nyash_any_length_h, nyash_any_is_empty_h, +}; #[cfg(feature = "cranelift-jit")] +use crate::{ + mir::{MirType, Effect as OpEffect, MirFunction}, + jit::events, +}; #[cfg(feature = "cranelift-jit")] extern "C" fn nyash_array_len(arr_param_index: i64) -> i64 {