Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2002-03-08
03:17 • Closed ticket [522849ffff]: TIP #87 reference implementation plus 7 other ch... artifact: 8839966e01 user: dgp
02:55 • Ticket [522849ffff]: 4 changes artifact: 12cf7afcee user: andreas_kupries
2002-03-07
08:17 • Add attachment tip87dgp.patch to ticket [522849ffff] artifact: 0040cb25f4 user: dgp
08:17 • Ticket [522849ffff] TIP #87 reference implementation status still Open with ... artifact: 17e2c64543 user: dgp
2002-03-03
05:53 • Ticket [522849ffff]: 5 changes artifact: d7cd92807c user: hobbs
2002-02-28
00:40 • Add attachment tip87.patch to ticket [522849ffff] artifact: a0496b78e8 user: trier
00:40 • Ticket [522849ffff] TIP #87 reference implementation status still Open with ... artifact: df4f8b5e03 user: trier
2002-02-27
11:31 • Ticket [522849ffff]: 4 changes artifact: b8bde5cd01 user: dgp
02:04 • Ticket [522849ffff]: 4 changes artifact: af6da9775a user: dgp
02:04 • Ticket [522849ffff]: 4 changes artifact: 6fd27ea016 user: dgp
01:58 • Ticket [522849ffff]: 4 changes artifact: fb84a0c8d6 user: trier
01:43 • Ticket [522849ffff]: 4 changes artifact: 6bcd57785c user: trier
01:42 • Ticket [522849ffff]: 4 changes artifact: 25affc5129 user: trier
01:42 • Add attachment tip87.patch to ticket [522849ffff] artifact: a86e82b2b5 user: trier
01:42 • Ticket [522849ffff] TIP #87 reference implementation status still Open with ... artifact: 8d46f16770 user: trier
00:41 • Ticket [522849ffff]: 4 changes artifact: dc3e8727a8 user: dgp
00:37 • Ticket [522849ffff]: 4 changes artifact: 2e3de7c806 user: dgp
00:35 • Ticket [522849ffff]: 4 changes artifact: a42464b102 user: trier
00:29 • Ticket [522849ffff]: 4 changes artifact: 074c257dae user: dgp
00:21 • Ticket [522849ffff]: 4 changes artifact: a3232061b8 user: dgp
2002-02-26
14:21 • Ticket [522849ffff]: 4 changes artifact: 379a1f7e60 user: trier
07:21 • New ticket [522849ffff]. artifact: 7d921a85f8 user: trier

TIP #87 reference implementation

Closed / Accepted522849ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 25 years ago
Descriptionplain2002-02-26 07:21:21
Reference implementation for TIP #87, "Allow Tcl
Access to the Recursion Limit".  Includes tests and
documentation.
trierplain2002-02-26 14:21:22
File Added - 18453: tmptmp
dgpplain2002-02-27 00:21:00
Logged In: YES 
user_id=80530

I see that this implementation "falls back" if the
new limit is less than the current run level in
the interp that's having its limit changed.  It's
not clear to me that's the right thing to do if that
interp is not the interp evaluating the [interp
recursionlimit].

# Assume an evaluation in slave is in the call stack
# somewhere
interp recursionlimit slave 1

Should I really see an error in the current interp?
The limit in the current interp has not been exceeded.
Why should the current interp go on to evaluate the next
command?
dgpplain2002-02-27 00:29:30
Logged In: YES 
user_id=80530


Of course I meant to ask:

Why shouldn't the current interp go on to evaluate the next
command?
trierplain2002-02-27 00:35:12
Logged In: YES 
user_id=372112

Whoops! My mistake. The fallback error should be issued only if the current interp is changing its
own recursion limit. Otherwise, the code should let Tcl_Eval() et al error out naturally.

I'll fix it right away.
dgpplain2002-02-27 00:37:16
Logged In: YES 
user_id=80530

Ah.  OK.  Let's spell out that situation in the TIP
as well, so it's clear what spec folks will be voting on.
dgpplain2002-02-27 00:41:50
Logged In: YES 
user_id=80530

I didn't look with great care, but I didn't see anything
to disable this subcommand in a safe interp.
trierplain2002-02-27 01:42:42
Logged In: YES 
user_id=372112

Very diplomatically put, Don. :-)

Here is a new version of the patch that fixes both oversights.
trierplain2002-02-27 01:42:50
File Added - 18472: tip87.patch
trierplain2002-02-27 01:43:34
Logged In: YES 
user_id=372112

Old patch deleted.
trierplain2002-02-27 01:58:18
Logged In: YES 
user_id=372112

OK, I guess I can't delete it.
dgpplain2002-02-27 02:04:18
File Deleted - 18453:
dgpplain2002-02-27 02:04:53
Logged In: YES 
user_id=80530

that's strange.  oh well, I can.
dgpplain2002-02-27 11:31:19
Logged In: YES 
user_id=80530

Before we integrate this, I'd prefer making calls to
Tcl_IsSafe() rather than directly probing the interp
flags.  I guess that's up to the maintainer though.

It's also Tcl coding convention to have separate
variables for (Tcl_Interp *) and (Interp *) values.

Those are implementation details though.  TIP 87 looks to
be in good shape.  I'll make a last call for comments
tomorrow.
trierplain2002-02-28 00:40:24
File Added - 18531: tip87.patch

Logged In: YES 
user_id=372112

OK, I switched to Tcl_IsSafe(). I wonder why I didn't do that in the first place.

I added an iPtr variable for the (Interp *) type. I'm a bit confused by that, since
in the rest of the generic/tclInterp.c code, the direct use of a typecast from (Tcl_Interp *)
to (Interp *) is more common than an intermediate variable, but it's there now.

Finally, I added tests for recursion limits <= 0 and modified other tests to check
the return value when the newlimit parameter is present.
hobbsplain2002-03-03 05:53:43
Logged In: YES 
user_id=72656

this looks OK to me.  Passing it onto dgp as sponsor.
dgpplain2002-03-07 08:17:58
File Added - 18931: tip87dgp.patch

Logged In: YES 
user_id=80530

Here is a revised patch implementing TIP 87, tip87dgp.patch.

Changes include:
 * Factored out common code in the two OPT_RECLIMIT
   sections into a static function, SlaveRecursionLimit.
 * Added tests for values of newlimit that are too large
   to fit in the C int that Tcl_SetRecursionLimit accepts
   as an argument.
 * Documented that upper limit.
 * Rephrased and reorganized some of the documentation
   changes.
andreas_kupriesplain2002-03-08 02:55:59
Logged In: YES 
user_id=75003

Patching:    Applies cleanly.
Configuring: Ok.
Compilation: Ok.
Testsuite:   Ok. (Passed extended testsuite).

Go.
dgpplain2002-03-08 03:17:10
Logged In: YES 
user_id=80530

commited for 8.4a5/8.4b0
Log in (anonymous is fine) to add a comment.

Attachments: