|
2001-09-11
| ||
| 00:21 | • Ticket [451441ffff] tcl::nop - No-op and minimal bytecode status still Close... artifact: 0a13595585 user: msofer | |
| 00:21 | • Add attachment noopProc.patch.final to ticket [451441ffffffffff|451441f... artifact: 0c2ab320b4 user: msofer | |
| 00:21 | • Closed ticket [451441ffff]: tcl::nop - No-op and minimal bytecode plus 7 oth... artifact: 90f40eaed4 user: msofer | |
|
2001-09-06
| ||
| 02:21 | • Ticket [451441ffff]: 1 change artifact: f3ab5867ab user: msofer | |
|
2001-08-18
| ||
| 06:23 | • Add attachment noopProc.patch to ticket [451441ffff] artifact: ec272b7608 user: msofer | |
| 06:23 | • Ticket [451441ffff] tcl::nop - No-op and minimal bytecode status still Open ... artifact: d1f38c105f user: msofer | |
|
2001-08-17
| ||
| 06:20 | • Add attachment nop4.patch to ticket [451441ffff] artifact: 7a7e176371 user: msofer | |
| 06:20 | • Ticket [451441ffff] tcl::nop - No-op and minimal bytecode status still Open ... artifact: 2362390768 user: msofer | |
| 06:20 | • Ticket [451441ffff]: 5 changes artifact: 04843dc49b user: msofer | |
| 00:43 | • Add attachment nop3.patch to ticket [451441ffff] artifact: 9360f72403 user: msofer | |
| 00:43 | • Ticket [451441ffff] tcl::nop - No-op and minimal bytcode status still Open w... artifact: dd5d689c3a user: msofer | |
|
2001-08-16
| ||
| 23:16 | • Ticket [451441ffff]: 4 changes artifact: f751a49bf0 user: dgp | |
| 18:48 | • Ticket [451441ffff]: 4 changes artifact: c4be57044b user: msofer | |
| 18:48 | • Add attachment nop2.patch to ticket [451441ffff] artifact: 4f2540bfc1 user: msofer | |
| 18:48 | • Ticket [451441ffff] tcl::nop - No-op and minimal bytcode status still Open w... artifact: d361e46102 user: msofer | |
| 10:51 | • Ticket [451441ffff]: 4 changes artifact: 05eb0a020e user: dgp | |
| 03:51 | • New ticket [451441ffff]. artifact: fa81f1b530 user: dgp | |
tcl::nop - No-op and minimal bytecode
Closed / Accepted451441ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 25 years ago
Descriptionplain2001-08-16 03:51:55
In the discussions about TIP 53
http://purl.org/tcl/tip/53.html
Miguel Sofer counter-proposed an approach
where Tcl would add a single special
built-in command [tcl::nop], and then the
[assert] functionality (and more!) could
be defined in terms of [tcl::nop] as a
separate package.
Here is a patch Miguel and I have produced
that implements tcl::nop. Try it!
The result of [tcl::nop] is always an empty string.
When bytcode compiled, [tcl::nop] does nothing and its
arguments are not substituted. When not byte-code
compiled (very unusual), [tcl::nop] behaves exactly
like
proc tcl::nop args {}
so its arguments are substituted, but it still does
nothing.
dgpplain2001-08-16 10:51:55
File Added - 9586: nop.patch
msoferplain2001-08-16 18:48:05
Logged In: YES user_id=148712 Fixing a bug (maxStackDepth should be 1, not 0). Sorry ...
msoferplain2001-08-16 18:48:06
File Added - 9600: nop2.patch
dgpplain2001-08-16 23:16:04
File Deleted - 9586:
msoferplain2001-08-17 00:43:33
File Added - 9609: nop3.patch
Logged In: YES
user_id=148712
nop3.patch is a new version that takes a different approach
to argument substitutions:
- if no argument to tcl::nop would require substitutions, it
byte-compiles
- otherwise, it calls the command
This does not break the standard Tcl syntax; tcl::nop does
not work as a comment any longer:
tcl::nop [incr foo]
does cause an increment in foo (and isn´t bcc'ed), whereas
tcl::nop {[incr foo]}
is bcc'ed and doesn't change foo
msoferplain2001-08-17 06:20:34
Logged In: YES user_id=148712 New nop4.patch: standard argument substitution, always byte-compiled, fastest execution.
msoferplain2001-08-17 06:20:35
File Added - 9618: nop4.patch
msoferplain2001-08-18 06:23:32
File Added - 9657: noopProc.patch
Logged In: YES
user_id=148712
Following Brent Welch's excellent suggestion: giving [proc]
the smarts to bytecompile a [noop], instead of defining a
new command -->noopProc.patch
Currently only will be bytecompiled to noop procs of the
form
proc a xxxx yyyy
where the arglist xxxx's string rep contains just spaces and
the word 'args', and the body yyyy's string rep contains
just spaces, tabs or newlines.
I.e,
proc a { args } { }
will be bytecompiled, but
proc b { args } #
will not.
Maybe this ticket should move from "Feature Request" to
"Patch"?
msofer Ticket [451441ffff]: 1 change
[History diff]2001-09-06 02:21:14
msoferplain2001-09-11 00:21:21
Logged In: YES user_id=148712 noopProc.patch.final committed - diff to previous is just in comments and formatting.
msoferplain2001-09-11 00:21:22
File Added - 10605: noopProc.patch.final
Log in (anonymous is fine) to add a comment.
Attachments:
- noopProc.patch.final [download] added by msofer on 2001-09-11 00:21:21. [details]
- noopProc.patch [download] added by msofer on 2001-08-18 06:23:32. [details]
- nop4.patch [download] added by msofer on 2001-08-17 06:20:35. [details]
- nop3.patch [download] added by msofer on 2001-08-17 00:43:33. [details]
- nop2.patch [download] added by msofer on 2001-08-16 18:48:06. [details]