Posted to tcl by dgp at Mon Mar 07 22:39:13 GMT 2011view raw

  1.  
  2. % proc harness {} {
  3. demo1
  4. demo2
  5. demo3
  6. }
  7. % proc demo1 args { }
  8. % proc demo2 args {\
  9. }
  10. % proc demo3 args \\\n
  11. % tcl::unsupported::disassemble proc harness
  12. ByteCode 0x0x91fd230, refCt 1, epoch 4, interp 0x0x918e768 (epoch 4)
  13. Source "\ndemo1\ndemo2\ndemo3\n"
  14. Cmds 3, src 19, inst 20, litObjs 2, aux 0, stkDepth 1, code/src 0.00
  15. Proc 0x0x91de5b0, refCt 1, args 0, compiled locals 0
  16. Commands 3:
  17. 1: pc 0-2, src 1-5 2: pc 3-14, src 7-11
  18. 3: pc 15-18, src 13-17
  19. Command 1: "demo1"
  20. (0) push1 0 # ""
  21. (2) pop
  22. Command 2: "demo2"
  23. (3) startCommand +11 1 # next cmd at pc 14
  24. (12) push1 0 # ""
  25. (14) pop
  26. Command 3: "demo3"
  27. (15) push1 1 # "demo3"
  28. (17) invokeStk1 1
  29. (19) done
  30.