Ticket UUID: | 480896 | |||
Title: | duplicated code, wrong level counts | |||
Type: | Bug | Version: | None | |
Submitter: | msofer | Created on: | 2001-11-12 13:07:00 | |
Subsystem: | 47. Bytecode Compiler | Assigned To: | msofer | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2001-11-17 03:01:50 | |
Resolution: | Fixed | Closed By: | msofer | |
Closed on: | 2001-11-16 20:01:50 | |||
Description: |
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. | |||
User Comments: |
msofer added on 2001-11-17 03:01:50:
Logged In: YES user_id=148712 Patch committed. msofer added on 2001-11-13 03:34:30: File Deleted - 13212: msofer added on 2001-11-13 03:13:55: File Added - 13226: levels2.patch msofer added on 2001-11-13 03:13:54: Logged In: YES user_id=148712 levels2.patch fixes the trace behaviour for precompiled bytecodes, avoids unnecessary string copy. msofer added on 2001-11-12 21:22:04: File Deleted - 13206: msofer added on 2001-11-12 21:22:03: File Added - 13212: levels1.patch Logged In: YES user_id=148712 Oops; removing now unneeded static function CallTraceProcedure in tclExecute.c --> new patch levels1.patch Jeff: do you see any problem with this? msofer added on 2001-11-12 20:07:01: File Added - 13206: levels.patch |
Attachments:
- levels2.patch [download] added by msofer on 2001-11-13 03:13:54. [details]