duplicated code, wrong level counts
Closed / Fixed480896ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 25 years ago
Descriptionplain2001-11-12 13:07:00
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.
msoferplain2001-11-12 20:07:01
File Added - 13206: levels.patch
msoferplain2001-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?
msoferplain2001-11-12 21:22:04
File Deleted - 13206:
msoferplain2001-11-13 03:13:54
Logged In: YES user_id=148712 levels2.patch fixes the trace behaviour for precompiled bytecodes, avoids unnecessary string copy.
msoferplain2001-11-13 03:13:55
File Added - 13226: levels2.patch
msoferplain2001-11-13 03:34:30
File Deleted - 13212:
msoferplain2001-11-17 03:01:50
Logged In: YES user_id=148712 Patch committed.
Log in (anonymous is fine) to add a comment.
Attachments:
- levels2.patch [download] added by msofer on 2001-11-13 03:13:54. [details]