[Newbies] How do i list the execution order of objects inside a method?

David Corking lists at dcorking.com
Fri Jan 25 17:48:38 UTC 2013


I have never tried to do this, but it is interesting.

I think the bytecode represents the execution order, so if your method
is already compiled, you could, for example, send #symbolic to the
CompiledMethod, as the browser does when you select bytecodes:

(Tutorial compiledMethodAt: #tutorial:lesson: ) symbolic  '29 <10> pushTemp: 0
30 <CC> send: new
31 <6A> popIntoTemp: 2
32 <70> self
33 <D1> send: player
34 <12> pushTemp: 2
35 <E0> send: tutorial:
36 <87> pop
37 <70> self
38 <10> pushTemp: 0
39 <12> pushTemp: 2
40 <11> pushTemp: 1
41 <E3> send: indexOfLesson:
42 <F2> send: tutorial:lessonAt:
43 <87> pop
44 <78> returnSelf
'

For a more sophisticated data structure, I suggest digging into the
Debugger or the Compiler docs and sources, but those are areas I have
not explored.

Have fun! David


More information about the Beginners mailing list