Skip to content
Tcl Source Code View Ticket
Login

View Ticket

direct eval [expr] not NRE safe (Tcl_ExprObj)

Closed / Fixed2823282fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2009-07-17 20:01:43
% coroutine foo apply {{} {set expr expr; $expr {[yield]}}}
cannot yield: C stack busy

I think this also causes trouble in the expression
evaluation portion of direct eval [for] and [while]
commands.
dkfplain2009-07-18 19:29:13
There's no TclNRExpr() API or equivalent, so fixing this requires substantial work. Assigning to person better suited than me to carry this out.
dkf Ticket [2823282fff]: 1 change [History diff]2009-07-18 19:31:43
dgpplain2009-07-19 01:43:56
Patch under construction.
dgpplain2009-07-19 11:15:53
File Added - 335608: 2823282.patch
dgpplain2009-07-19 11:16:32
Needs some more refinement but here's
a first functional patch that fixes the bug.
dgpplain2009-07-25 03:49:20
Here's a cleaned up patch to review.

There are still a couple of TODO's
regarding a more careful audit of where
the interp state should be saved/reset/restored,
but the big picture is right now, and better
commented.

Also missing is docs and the TIP 
for the new public routine
Tcl_NRExprObj().
dgpplain2009-07-25 03:50:18
File Added - 336457: 2823282-1.patch
dgpplain2009-07-25 03:50:27
File Deleted - 335608:
dgpplain2009-07-30 22:54:30
File Added - 337337: 2823282-2.patch
dgpplain2009-07-30 22:54:42
File Deleted - 336457:
dgpplain2009-07-30 22:54:56
Latest patch includes updates to docs.
dgpplain2009-08-12 23:07:32
Patch / TIP 353 committed to HEAD.

Still open while I check on the [for], [while] claims.
dgpplain2009-08-13 00:01:30
allow_comments - 1


Patching up the callers of Tcl_ExprBooleanObj()
is better tracked in Bug 2823276.
Log in (anonymous is fine) to add a comment.

Attachments: