Posted to tcl by apn at Wed Dec 16 14:33:38 GMT 2009view raw

  1. set x [list abc \
  2. ghi
  3. pwd]
  4. puts x=$x
  5.  

Comments

Posted by patthoyts at Wed Dec 16 14:37:56 GMT 2009 [text] [code]

pat) 5 % ::tcl::unsupported::disassemble proc t ByteCode 0x0x9d18920, refCt 1, epoch 144, interp 0x0x89483b0 (epoch 144) Source "set x [list abc def\npwd]\n" Cmds 3, src 25, inst 17, litObjs 3, aux 0, stkDepth 2, code/src 0.00 Proc 0x0x989ef28, refCt 1, args 0, compiled locals 1 slot 0, scalar, "x" Commands 3: 1: pc 0-15, src 0-23 2: pc 0-9, src 7-18 3: pc 10-13, src 20-22 Command 1: "set x [list abc def\npwd]" Command 2: "list abc def" (0) push1 0 # "abc" (2) push1 1 # "def" (4) list 2 (9) pop Command 3: "pwd" (10) push1 2 # "pwd" (12) invokeStk1 1 (14) storeScalar1 %v0 # var "x" (16) done