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

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