Skip to content

Instantly share code, notes, and snippets.

View StephanEggermont's full-sized avatar

Stephan Eggermont StephanEggermont

View GitHub Profile
@StephanEggermont
StephanEggermont / gist:7598946
Created November 22, 2013 12:11
Pharo now uses slots to describe instance variables. Booleans no longer need to be separate instance variables, several can be mapped to a bit in one instance variable. Printing this in a workspace returns the set of classes having instances with more than one boolean instVar. It doesn't detect lazy initialized ones, or classes with no current i…
|set|
set := IdentitySet new.
Object allSubclasses do: [ :aClass |
|varSize coll nr candidate |
candidate := false.
varSize := aClass instSize.
coll := aClass allInstances.
nr := 10 min: coll size.
(coll first: nr) do: [ :anInstance |
|value nrBoolean|