refactor with

This commit is contained in:
2026-05-04 15:43:35 +08:00
parent fca00b04ba
commit b3e6591809
13 changed files with 162 additions and 344 deletions
+6 -8
View File
@@ -98,7 +98,7 @@ impl<'a, Ctx: DisassemblerContext> Disassembler<'a, Ctx> {
self.read_u32();
}
Builtins => {}
ReplBinding | ScopedImportBinding | WithLookup => {
ReplBinding | ScopedImportBinding => {
self.read_u32();
}
}
@@ -426,16 +426,14 @@ impl<'a, Ctx: DisassemblerContext> Disassembler<'a, Ctx> {
let span_id = self.read_u32();
("Assert", format!("text_id={} span={}", raw_idx, span_id))
}
Op::PushWith => {
self.read_operand_data();
("PushWith", String::new())
}
Op::PopWith => ("PopWith", String::new()),
Op::PrepareWith => ("PrepareWith", String::new()),
Op::LookupWith => {
let idx = self.read_u32();
let name = self.ctx.resolve_string(idx);
("LookupWith", format!("{:?}", name))
let n = self.read_u8();
for _ in 0..n {
self.read_operand_data();
}
("LookupWith", format!("sym={:?} n={}", name, n))
}
Op::LoadBuiltins => ("LoadBuiltins", String::new()),