Overview
| Comment: | Patch 876451: restores performance of [return]. Also allows forms such as [return -code error $msg] to be bytecompiled. * generic/tclInt.h: Factored Tcl_ReturnObjCmd() into two pieces: * generic/tclCmdMZ.c: TclMergeReturnOptions(), which can parse the options to [return], check their validity, and create the corresponding return options dictionary, and TclProcessReturn(), which takes that return options dictionary and performs the [return] operation. * generic/tclCompCmds.c: Rewrote TclCompileReturnCmd() to call TclMergeReturnOptions() at compile time so the return options dictionary is computed at compile time (when it is fully known). The dictionary is pushed on the stack along with the result, and the code and level values are included in the bytecode as operands. Also supports optimized compilation of un-[catch]ed [return]s from procs with default options into the INST_DONE instruction. * generic/tclExecute.c: Rewrote INST_RETURN instruction to retrieve the code and level operands, pop the return options from the stack, and call TclProcessReturn() to perform the [return] operation. * generic/tclCompile.h: New utilities include TclEmitInt4 macro * generic/tclCompile.c: and TclWordKnownAtCompileTime(). |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
8727b42c2ce485832b263a35304846b1 |
| User & Date: | dgp on 2004-01-13 23:15:02.000 |
| Other Links: | manifest | tags |
Context
|
2004-01-13
| ||
| 23:37 | * generic/tclCmdMZ.c (Tcl_SwitchObjCmd): Silence compiler warnings. check-in: b986a19bed user: dgp tags: trunk | |
| 23:15 | Patch 876451: restores performance of [return]. Also allows forms such as [return -... check-in: 8727b42c2c user: dgp tags: trunk | |
| 17:13 | more detail check-in: ea75b3a19d user: dgp tags: trunk | |
Changes
Modified ChangeLog
from [ac51901b21]
to [b91c5add71].
[diff]
Modified generic/tclCmdMZ.c
from [abc760222e]
to [7e1c2e584a].
[diff]
Modified generic/tclCompCmds.c
from [92650cba87]
to [31a22d48b2].
[diff]
Modified generic/tclCompile.c
from [5fff193535]
to [e4235c8880].
[diff]
Modified generic/tclCompile.h
from [91a8689225]
to [d65a3d6635].
[diff]
Modified generic/tclExecute.c
from [6ff7a6184f]
to [e6f2f0401f].
[diff]
Modified generic/tclInt.h
from [797d91e12b]
to [0091898311].
[diff]