Skip to content

Commit

Permalink
dbg
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowone committed Apr 18, 2023
1 parent 87f1798 commit 8952836
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vm/src/builtins/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ impl PyBaseObject {
#[pyslot]
fn slot_init(zelf: PyObjectRef, args: FuncArgs, vm: &VirtualMachine) -> PyResult<()> {
let typ = zelf.class();
eprintln!("called init of {}", zelf.class().name());
if typ.slots.init.load().map_or(0, |f| f as usize)
== vm
.ctx
Expand Down Expand Up @@ -306,6 +307,7 @@ impl PyBaseObject {
if zelf.class().is(vm.ctx.types.object_type) {
return Ok(());
}
eprintln!("{:?}", zelf.class().name());
let init = zelf
.class()
.mro_find_map(|cls| cls.slots.init.load())
Expand Down
1 change: 1 addition & 0 deletions vm/src/types/slot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ impl PyType {
update_slot!(descr_set, descr_set_wrapper);
}
_ if name == identifier!(ctx, __init__) => {
eprintln!("init of {:?}", self.name());
toggle_slot!(init, init_wrapper);
}
_ if name == identifier!(ctx, __new__) => {
Expand Down

0 comments on commit 8952836

Please sign in to comment.