Overview
| Artifact ID: | 39db7ef651a74038f3a7c0f7ff55d0aa6172d492 |
|---|---|
| Ticket: | 480896ffffffffffffffffffffffffffffffffff
duplicated code, wrong level counts |
| User & Date: | msofer on 2001-11-12 13:07:00 |
Changes
- assignee changed to: "hobbs"
- cmimetype changed to: "text/plain"
- comment changed to:
The code of the INST_INVOKE instructions tclExecute.c:TclExecuteByteCode) essentially duplicates the code of tclParse.c:EvalObjv. The attached patch removes this duplication by havinf INST_INVOKE actually call the objv evaluation code (renamed to TclEvalObjvInternal andnot static to tclParse.c any longer). While doing this, an inconsistency in the computation of iPtr->numLevels was discovered: * when evaluating a bytecode (INST_INVOKE), a command invocation does not increase the levels. If the command is a proc invocation, the levels are increased while evaluating the body. * when doing a direct evaluation (EvalObjv), a command invocation increases the levels. If the command is a proc, the levels are increased again when evaluating the body. This inconsistency is also corrected in the patch. With it, a command invocation always increases the levels. Proc calls increase the levels just *once* (by decreasing it before evaling the body, and restoring the old value afterwards). The last correction introduced: the error message on too many nested calls is now the same for all possible issuers.
- foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "msofer"
- subsystem changed to: "47. Bytecode Compiler"
- title changed to: "duplicated code, wrong level counts"
- type changed to: "Bug"