Overview
| Artifact ID: | be6f897507227ca8e566c8a44da41fbff557f3b5 |
|---|---|
| Ticket: | 2251175fffffffffffffffffffffffffffffffff
Expand ({*}), constants, and list syntax |
| User & Date: | ferrieux on 2008-11-12 07:01:28 |
Changes
- icomment:
File Added - 301046: expand1.patch Please find attached a patch implementing Solution (1): delayed collapse. It passes the test suite, including [info frame], since it respects the tying between TIP280-data and the original (ROM) source, while doing the necessary collapse just before use, which is (a) before literal creation in TclCompileScript and (b) before string appendage in TclEvalEx. One word about complexity: I did my best to minimize the impact for the "rest of us" never expanding a literal ;-) For this, I kept the size of the Tcl_Token struct unchanged. Only I exploited the fact (documented in comments in tcl.h) that TCL_TOKEN_* values were actually bits so that class tests can be done easily, that is, by bitwise AND. The funny fact is that nowhere in the core is this actually done, all tests are done with "==". For this patch I had to define a modifier bit in this field, defined only for type TCL_TOKEN_TEXT. So I did change all existing checks "==TCL_TOKEN_TEXT" into "&TCL_TOKEN_TEXT", which allows for graceful ignorance of the modifier everywhere it needs be. I believe the perf impact of this change should be between zero and epsilon ;-) Please review. File Added: expand1.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"