| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
* generic/tclProc.c (TclUpdateReturnInfo): storage for the
errorInfo and errorCode values are internal fields, we can set
them at the time of the [return] command, and not have to wait
until the specified number of "-level"s have popped.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TclEvalObjvInternal,Tcl_LogCommandInfo,TclAddObjErrorInfo):
* generic/tclCmdAH.c (Tcl_CatchObjCmd):
* generic/tclEvent.c (BgError,ErrAssocData,Tcl_BackgroundError,
HandleBgErrors,BgErrorDeleteProc):
* generic/tclExecute.c (TclCreateExecEnv,TclDeleteExecEnv):
* generic/tclIOUtil.c (comments only):
* generic/tclInt.h (ExecEnv,Interp, ERR_IN_PROGRESS):
* generic/tclInterp.c ([tclInit]):
* generic/tclMain.c (comments only):
* generic/tclNamesp.c
(Tcl_CreateNamespace,Tcl_DeleteNamespace,TclTeardownNamespace):
* generic/tclProc.c (TclUpdateReturnInfo):
* generic/tclResult.c
(Tcl_ResetResult,TclTransferResult):
* generic/tclTrace.c (CallVarTraces):
Reworked management of the "errorInfo" data of an interp.
That information is now primarily stored in a new private
(Tcl_Obj *) field of the Interp struct, rather than using a
global variable ::errorInfo as the primary storage. The
ERR_IN_PROGRESS flag bit value is no longer required to manage
the value in its new location, and is removed. Variable traces
are established to support compatibility for any code expecting
the ::errorInfo variable to hold the information.
***POTENTIAL INCOMPATIBILITY***
Code that sets traces on the ::errorInfo variable may notice a
difference in timing of the firing of those traces. Code that
uses the value ERR_IN_PROGRESS.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclBinary.c:
* generic/tclCmdAH.c:
* generic/tclCmdIL.c:
* generic/tclCmdMZ.c:
* generic/tclCompExpr.c:
* generic/tclDictObj.c:
* generic/tclEncoding.c:
* generic/tclExecute.c:
* generic/tclFCmd.c:
* generic/tclHistory.c:
* generic/tclIndexObj.c:
* generic/tclInterp.c:
* generic/tclIO.c:
* generic/tclIOCmd.c:
* generic/tclNamesp.c:
* generic/tclObj.c:
* generic/tclPkg.c:
* generic/tclResult.c:
* generic/tclScan.c:
* generic/tclTimer.c:
* generic/tclTrace.c:
* generic/tclUtil.c:
* generic/tclVar.c:
It is a poor practice to directly set or append to the value
of the objResult of an interp, because that value might be
shared, and in that circumstance a Tcl_Panic() will be the
result. Searched for example of this practice and replaced
with safer alternatives, often using the Tcl_AppendResult()
routine that dkf just rehabilitated.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclBinary.c:
* generic/tclCmdAH.c:
* generic/tclCmdIL.c:
* generic/tclCmdMZ.c:
* generic/tclCompExpr.c:
* generic/tclDictObj.c:
* generic/tclEncoding.c:
* generic/tclExecute.c:
* generic/tclFCmd.c:
* generic/tclHistory.c:
* generic/tclIndexObj.c:
* generic/tclInterp.c:
It is a poor practice to directly set or append to the value
of the objResult of an interp, because that value might be
shared, and in that circumstance a Tcl_Panic() will be the
result. Searched for example of this practice and replaced
with safer alternatives, often using the Tcl_AppendResult()
routine that dkf just rehabilitated.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
around them)
|
| |
|
| |
|
|
|
|
|
| |
(NULL implies that and produces a better error message).
Also converted to using Tcl_AppendResult()
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclBinary.c:
* generic/tclCmdAH.c:
* generic/tclCmdIL.c:
* generic/tclCmdMZ.c:
* generic/tclCompExpr.c:
* generic/tclDictObj.c:
It is a poor practice to directly set or append to the value
of the objResult of an interp, because that value might be
shared, and in that circumstance a Tcl_Panic() will be the
result. Searched for example of this practice and replaced
with safer alternatives, often using the Tcl_AppendResult()
routine that dkf just rehabilitated.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclBinary.c:
* generic/tclCmdAH.c:
* generic/tclCmdIL.c:
It is a poor practice to directly set or append to the value
of the objResult of an interp, because that value might be
shared, and in that circumstance a Tcl_Panic() will be the
result. Searched for example of this practice and replaced
with safer alternatives, often using the Tcl_AppendResult()
routine that dkf just rehabilitated.
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclBinary.c:
* generic/tclCmdAH.c:
It is a poor practice to directly set or append to the value
of the objResult of an interp, because that value might be
shared, and in that circumstance a Tcl_Panic() will be the
result. Searched for example of this practice and replaced
with safer alternatives, often using the Tcl_AppendResult()
routine that dkf just rehabilitated.
|
|
|
|
| |
Also change string to stringPtr to avoid potential future C++ problems.
|
|
|
|
|
| |
TclObjInvoke routine toward unification with the rest of the
evaluation stack.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TclEvalObjvInternal,Tcl_LogCommandInfo):
* generic/tclCmdAH.c (Tcl_CatchObjCmd):
* generic/tclEvent.c (BgError,Tcl_BackgroundError,HandleBgErrors):
* generic/tclInt.h (Interp, ERROR_CODE_SET):
* generic/tclNamesp.c
(Tcl_CreateNamespace,Tcl_DeleteNamespace,TclTeardownNamespace):
* generic/tclResult.c
(Tcl_ResetResult,Tcl_SetObjErrorCode,TclTransferResult):
* generic/tclTrace.c (CallVarTraces):
Reworked management of the "errorCode" data of an interp.
That information is now primarily stored in a new private
(Tcl_Obj *) field of the Interp struct, rather than using a
global variable ::errorCode as the primary storage. The
ERROR_CODE_SET flag bit value is no longer required to manage
the value in its new location, and is removed. Variable traces
are established to support compatibility for any code expecting
the ::errorCode variable to hold the information.
|
| |
|
|
|
|
| |
workaround. That bug is now fixed.
|
|
|
|
| |
parser. [Bug 884830]
|
| |
|
|
|
|
|
| |
in a straw poll. Also made T_DODone;T_DONext a non-fatal sequence, leading
to simplified code.
|
|
|
|
| |
as strings every time through. [Patch 1037357]
|
|
|
|
|
|
| |
* generic/tclInt.h (Interp): EXPR_INITIALIZED. It was set during
interp creation and never tested. Whatever purpose it had is in
the past.
|
|
|
|
|
|
|
| |
* generic/tclInt.h (Interp): USE_EVAL_DIRECT. It was used only
* generic/tcLTest.c (TestevalexObjCmd): in the testing command
* tests/parser.test (parse-9.2): [testevalex] and nothing in the
test suite made use of the capability it enabled.
|
|
|
|
|
| |
that get cleared by Tcl_ResetResult() and not more serious things
like DELETED.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclCmdAH.c (Tcl_ErrorObjCmd): of the management of
* generic/tclCmdMZ.c (TclProcessReturn): the errorCode value.
* tests/error.test (error-6.4-9):
* generic/tclNamespace.c (TclTeardownNamespace): Tcl_Obj-ified
* tests/namespace.test (namespace-8.5,6): the save/restore
of ::errorInfo and ::errorCode during global namespace teardown.
Revised the comment to clarify why this is done, and added tests
that will fail if this is not done.
* generic/tclResult.c (TclTransferResult): Added safety
checks so that unexpected undefined ::errorInfo or ::errorCode
will not lead to a segfault.
* generic/tclTrace.c (TclCallVarTraces): Save/restore the flag
* tests/var.test (var-16.1): values that define part of the
interpreter state during variable traces. [Bug 10381021].
|