Find all clones of an object in iolanguage

106 Views Asked by At

Is there a convenient way to get a list of all objects whose prototype is the given object? I'm inspecting slotNames on Object in an attempt to find a method that might do this, but I'm coming up short. It appears one could scan Lobby, but I thought I'd make sure I wasn't missing something more immediate.

1

There are 1 best solutions below

0
On

Naively, you could iterate Collector allObjects and apply a select over that. However, keep in mind that this will linearly scan all objects in the known heap, so it could take some time depending on your heap size.

Collector allObjects select(proto == Foo)
# list(Foo_0x7f81b2946c30)