Check-in [b0b8f8280b]
Bounty program for improvements to Tcl and certain Tcl packages.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:merge trunk
Timelines: family | ancestors | descendants | both | list-and-dict-types
Files: files | file ages | folders
SHA3-256: b0b8f8280bee76c2797e717925a1fc7a01d3cfca037bb804ce233565e37b95cf
User & Date: dkf 2018-11-29 13:57:22
Context
2018-12-06
21:14
Huge mess of half-converted code, with something horrible inside. Definitely buggy... check-in: 462eec7d43 user: dkf tags: list-and-dict-types
2018-11-29
13:57
merge trunk check-in: b0b8f8280b user: dkf tags: list-and-dict-types
11:34
This is getting somewhere; next up, using actual types we can now assume in code issue check-in: 0ec315adac user: dkf tags: list-and-dict-types
2018-11-27
03:07
Fix bug in finding variable names among the args to 'regexp' check-in: 6311170b65 user: kbk tags: trunk
Changes

Changes to demos/perftest/tester.tcl.

1774
1775
1776
1777
1778
1779
1780








1781
1782
1783
1784
1785
1786
1787
....
2269
2270
2271
2272
2273
2274
2275


2276
2277
2278
2279
2280
2281
2282
....
2455
2456
2457
2458
2459
2460
2461

2462
2463
2464
2465
2466
2467
2468
	set pq 0
	test4a p q
	return $pq
    }

}










namespace eval ::flightawarebench {
    # See https://github.com/flightaware/tclbench/blob/master/math/bench.tcl
    proc degrees_radians {degrees} {
	return [expr {$degrees * 3.14159265358979323846 / 180.0}]
    }
    proc latlongs_to_distance {lat1 lon1 lat2 lon2} {
................................................................................
    {bug-7c599d4029::bug 0x1}
    {linesearch::getAllLines1 2}
    {linesearch::getAllLines2 2}
    # {flightawarebench::test 5 5 2}
    # {flightawarebench::clockscan 5 5 5}
    parseBuiltinsTxt::main



    vartest::check
    vartest::throwcheck
    nsvartest::check
    directtest::check
    directtest::alias
    {directtest::ary3 abc 3 1}
    {directtest::ary4 abc 5}
................................................................................
    comps
    bug-7c599d4029::*
    singleton::*
    linesearch::colinear
    linesearch::sameline
    linesearch::getAllLines1
    linesearch::getAllLines2

    vartest::*
    nsvartest::*
    directtest::*
    upvar0
    upvar0a
    upvartest0::*
    upvartest1::*






>
>
>
>
>
>
>
>







 







>
>







 







>







1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
....
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
....
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
	set pq 0
	test4a p q
	return $pq
    }

}

namespace eval ::regexptest {

    proc matchvar-1 {needle haystack} {
	regexp -indices -- $needle $haystack where
	return $where
    }
}


namespace eval ::flightawarebench {
    # See https://github.com/flightaware/tclbench/blob/master/math/bench.tcl
    proc degrees_radians {degrees} {
	return [expr {$degrees * 3.14159265358979323846 / 180.0}]
    }
    proc latlongs_to_distance {lat1 lon1 lat2 lon2} {
................................................................................
    {bug-7c599d4029::bug 0x1}
    {linesearch::getAllLines1 2}
    {linesearch::getAllLines2 2}
    # {flightawarebench::test 5 5 2}
    # {flightawarebench::clockscan 5 5 5}
    parseBuiltinsTxt::main

    {regexptest::matchvar-1 bra abracadabra}

    vartest::check
    vartest::throwcheck
    nsvartest::check
    directtest::check
    directtest::alias
    {directtest::ary3 abc 3 1}
    {directtest::ary4 abc 5}
................................................................................
    comps
    bug-7c599d4029::*
    singleton::*
    linesearch::colinear
    linesearch::sameline
    linesearch::getAllLines1
    linesearch::getAllLines2
    regexptest::*
    vartest::*
    nsvartest::*
    directtest::*
    upvar0
    upvar0a
    upvartest0::*
    upvartest1::*

Changes to quadcode/builtin_specials.tcl.

109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
    # After the switches come needle and haystack

    incr ind 2

    # Anything remaining on the line must be a match variable

    if {$ind < [llength $q]} {
	return {killable Inf noCallFrame {} pure {}}
    } else {
	return [list writes [expr {3-$ind}]]
    }

}







|







109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
    # After the switches come needle and haystack

    incr ind 2

    # Anything remaining on the line must be a match variable

    if {$ind >= [llength $q]} {
	return {killable Inf noCallFrame {} pure {}}
    } else {
	return [list writes [expr {3-$ind}]]
    }

}

Changes to quadcode/callframe.tcl.

1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
		    if {[lindex $p 0] eq "literal"} {
			dict set written [lindex $p 1] {}
		    } else {
			return {0 {}};
		    }
		}
	    } else {
		set i [expr {-$ind}]
		foreach p [lrange $params [expr {-1 - $ind}] end] {
		    if {[lindex $p 0] eq "literal"} {
			dict set  written [lindex $p 1] {}
		    } else {
			return {0 {}};
		    }
		    incr i
		}
	    }
	}
    }

    if {[dict exists $attrs writesNamed]} {
	foreach nm [dict get $attrs writesNamed] {






<






<







1294
1295
1296
1297
1298
1299
1300

1301
1302
1303
1304
1305
1306

1307
1308
1309
1310
1311
1312
1313
		    if {[lindex $p 0] eq "literal"} {
			dict set written [lindex $p 1] {}
		    } else {
			return {0 {}};
		    }
		}
	    } else {

		foreach p [lrange $params [expr {-1 - $ind}] end] {
		    if {[lindex $p 0] eq "literal"} {
			dict set  written [lindex $p 1] {}
		    } else {
			return {0 {}};
		    }

		}
	    }
	}
    }

    if {[dict exists $attrs writesNamed]} {
	foreach nm [dict get $attrs writesNamed] {