Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 823667b1ce4f582df5f02aa9409e3390f64c290c
Ticket: 465811ffffffffffffffffffffffffffffffffff
Optimize if/while/... during compilation
User & Date: msofer on 2002-02-09 01:17:44
Changes

  1. icomment:
    Logged In: YES 
    user_id=148712
    
    while 1 {...} does compile the efficient version; witness
    
      Source "while 1 break\n"
      Cmds 2, src 14, inst 7, litObjs 1, aux 0, stkDepth 1,
    code/src 11.14
      Code 156 = header 100+inst 7+litObj 4+exc 28+aux 0+cmdMap
    8
      Exception ranges 1, depth 1:
          0: level 1, loop, pc 0-0, continue 0, break 4
      Commands 2:
          1: pc 0-5, src 0-12          2: pc 0-0, src 8-12
      Command 1: "while 1 break"
      Command 2: "break"
        (0) break 
        (1) pop 
        (2) jump1 -2        # pc 0
        (4) push1 0         # ""
        (6) done 
    
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"