Claude's declass improvements

This commit is contained in:
2026-09-17 13:00:22 +00:00
parent 1a36873812
commit 183c4e35c9
4 changed files with 204 additions and 55 deletions
+11
View File
@@ -167,6 +167,17 @@ fn walk_block(
None => (),
}
// A field write is a define whose result lands back in the object's own
// value, so later reads of that object see the field. This is what lets
// a chain of writes to one local build a single object type, and it is
// why no later stage needs to know PutField at all.
if instr.op == OpCode::PutField {
out_instr.op = OpCode::DefineField;
out_instr.dsts.push(out_instr.args[1]);
out[instr_idx] = out_instr;
continue;
}
// Handle this instr's pushes
for _ in 0..n_push {
let v = fresh_val();