Posted to tcl by miguel at Sat Nov 24 12:37:35 GMT 2007view raw
- % proc moo {} {
- set apa {a {}b c d}
- catch {dict append apa a 5}
- }
- % tcl::unsupported::disassemble proc moo
- ByteCode 0x0x81e9e58, refCt 1, epoch 3, interp 0x0x81854f8 (epoch 3)
- Source "\n set apa {a {}b c d}\n "
- Cmds 3, src 105, inst 47, litObjs 3, aux 0, stkDepth 2, code/src 2.02
- Code 212 = header 104+inst 47+litObj 12+exc 28+aux 0+cmdMap 12
- Proc 0x0x81a9438, refCt 1, args 0, compiled locals 2
- slot 0, scalar, "apa"
- slot 1, scalar, "a"
- Exception ranges 1, depth 1:
- 0: level 0, catch, pc 19-38, catch 44
- Commands 3:
- 1: pc 0-4, src 20-38 2: pc 5-45, src 59-87
- 3: pc 19-38, src 66-86
- Command 1: "set apa {a {}b c d}"
- (0) push1 0 # "a {}b c d"
- (2) storeScalar1 %v0 # var "apa"
- (4) pop
- Command 2: "catch {dict append apa a 5}"
- (5) startCommand +41 1 # next cmd at pc 46
- (14) beginCatch4 0
- Command 3: "dict append apa a 5"
- (19) startCommand +20 1 # next cmd at pc 39
- (28) push1 1 # "5"
- (30) push1 1 # "5"
- (32) concat1 2
- (34) dictAppend %v1 # var "a"
- (39) pop
- (40) push1 2 # "0"
- (42) jump1 +3 # pc 45
- (44) pushReturnCode
- (45) endCatch
- (46) done