ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcl-core
tcl-core
[TCLCORE] Safe Base update
by Andreas Kupries other posts by this author
Nov 5 2009 1:04PM messages near this date
[TCLCORE] zlib push - corrupted | [TCLCORE] Tcl/Tk 8.5.8 Release Candidates
I sliced and diced my big blob of a patch to SafeBase I had sitting on my disk, 
updated it to work for head, and committed the slices now. Each change should 
be easy to read and understand (*), and SafeBase should be easier to maintain 
now as well, and more efficient too.

Below is the ChangeLog entry. Each (.) is a slice, committed separately. Each 
slice passed the full Tcl testsuite.

Anybody wishing to review see

	http://tcl.cvs.sourceforge.net/viewvc/tcl/tcl/library/safe.tcl?view=log

and start at revision 1.20. Anybody wishing to test and play with it, just get 
CVS Head.

	* library/safe.tcl: A series of patches which bring the SafeBase
	up to date with code guidelines, Tcl's features, also eliminating
	a number of inefficiencies along the way.
	(1) Changed all procedure names to be fully qualified.
	(2) Moved the procedures out of the namespace eval. Kept their
	locations. IOW, broke the namespace eval apart into small sections
	not covering the procedure definitions.
	(3) Reindented the code. Just lots of whitespace
	changes. Functionality unchanged.
	(4) Moved the multiple namespace eval's around. Command export at
	the top, everything else (var decls, argument parsing setup) at
	the bottom.
	(5) Moved the argument parsing setup into a procedure called when
	the code is loaded. Easier management of temporary data.
	(6) Replaced several uses of 'Set' with calls to the new procedure
	'InterpState' and direct access to the per-slave state array.
	(7) Replaced the remaining uses of 'Set' and others outside of the
	path/token handling, and deleted a number of procedures related to
	state array access which are not used any longer.
	(8) Converted the path token system to cache normalized paths and
	path <->  token conversions. Removed more procedures not used any
	longer. Removed the test cases 4.3 and 4.4 from safe.test. They
	were testing the now deleted command "InterpStateName".
	(9) Changed the log command setup so that logging is compiled out
	completely when disabled (default).
	(10) Misc. cleanup. Inlined IsInterp into CheckInterp, its only
	user. Consistent 'return -code error' for error reporting. Updated
	to use modern features (lassign, in/ni, dicts). The latter are
	used to keep a reverse path ->  token map and quicker check of
	existence.
	(11) Fixed bug 2854929. Recurse into all subdirs under all TM root
	dirs and put them on the access path.

(*) Modulo slice (3), which is just big gob of whitespace changes due to 
re-indenting the whole file (compare 'diff -u' vs 'diff -wu' results).

-- 
Sincerely,
     Andreas Kupries <andreas@[...].com> 
     Developer @    <http://www.activestate.com/> 

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved