1 define: #LookupSequence &slots: {#source. #parents -> ExtensibleArray new}.
2 "Describes the objects that the VM will consult in order when a method lookup
3 happens. This allows introspection and interactive debugging of lookup issues.
4 It also provides a reference implementation in Slate of the lookup algorithm
5 without being obscured in underlying VM details and optimizations."
7 s@(LookupSequence traits) newOn: obj
8 [(s clone `setting: #{#source. #parents} to: {obj. s parents new}) refresh].
10 obj@(Root traits) lookupSequence
11 [LookupSequence newOn: obj].
13 s@(LookupSequence traits) refresh
16 (s source walker &traversal: DepthFirst &childrenVia:
17 [| :obj | obj restrictsDelegation ifTrue: [obj delegateValues] ifFalse: [#{}]]) >>