Artifact c3eb1f69606d0c81183e8a8239b236fd82979108:
- File modules/struct/stack_tcl.tcl — part of check-in [f28504bbba] at 2010-03-15 17:17:38 on branch trunk — * stack.man: struct::stack bumped to version 1.5. API extensions: * stack.tcl: New methods getr, peekr, trim*. The first two return * stack.test: their results in reversed order. For use in places * stack.testsuite: which need the reverted order. As the regular * stack/m.c: order requires an internal [lreverse], to be undone * stack/m.h: by the caller it is better to simply avoid both * stack/ms.c: [lreverse]s. Similarly, trim* does the trim, without * stack/s.c: returning the trimmed items, for use where they are * stack/s.h: thrown away anyway. ... Further, inlined the peek/pop * stack_tcl.tcl: calls internal to get and trim, allowing * pkgIndex.tcl: simplification of the resulting code, like avoidance of additional argument checks. ... At last, now using 8.5 features when detecting Tcl 8.5+ as our runtime ... I.e. ensembles for the method dispatch instead of doing everything on our own, with eval and uplevel. Result: The speed of the Tcl implementation roughly doubles. * stack.bench: Updated to use the ability to switch between the various implementations. (user: andreas_kupries size: 11857)
A hex dump of this file is not available. Please download the raw binary file and generate a hex dump yourself.