fix: PartialFunc

This commit is contained in:
2025-06-22 01:19:16 +08:00
parent 75e8705098
commit 20b5516101
13 changed files with 207 additions and 219 deletions

View File

@@ -30,8 +30,8 @@ impl JITCompile for HasAttr {
impl JITCompile for BinOp {
fn compile<'gc>(&self, ctx: &JITContext<'gc>, func: FunctionValue<'gc>) -> StructValue<'gc> {
use ValueTag::*;
use BinOpKind::*;
use ValueTag::*;
let lhs = self.lhs.compile(ctx, func);
let rhs = self.rhs.compile(ctx, func);
let lhs_tag = ctx.get_tag(lhs);
@@ -165,12 +165,10 @@ impl JITCompile for BinOp {
.build_switch(
tag,
fallback,
&[
(
ctx.helpers.const_int(((Bool as i64) << 8) + Bool as i64),
bool_bool,
),
],
&[(
ctx.helpers.const_int(((Bool as i64) << 8) + Bool as i64),
bool_bool,
)],
)
.unwrap();
ctx.builder.position_at_end(bool_bool);
@@ -189,7 +187,7 @@ impl JITCompile for BinOp {
.unwrap();
ctx.builder.position_at_end(fallback);
}
_ => todo!()
_ => todo!(),
}
ctx.builder.position_at_end(ret);
ctx.builder