Check-in [05a6521445]

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

Overview
Comment:Added mrtest as a separately buildable package.
Timelines: family | ancestors | descendants | both | kbk-nre
Files: files | file ages | folders
SHA3-256:05a6521445ef5b1018277f4a3263e121af6864260a3fadff33e69ac10f129dc7
User & Date: dkf 2018-04-28 08:25:56
Context
2018-04-29
17:37
merge trunk check-in: 23f46849a7 user: dkf tags: kbk-nre
2018-04-28
08:25
Added mrtest as a separately buildable package. check-in: 05a6521445 user: dkf tags: kbk-nre
2018-04-27
20:32
Move more 'alloca' instructions to the entry block, before they can mess up coro.begin. Allow NRE procs to return CALLFRAME COROHANDLE, needed for bookkeeping if they both use NRE and reference the callframe. Put in a test case for the CALLFRAME COROHANDLE condition - that case still crashes check-in: 8c6a038bf1 user: kbk tags: notworking, kbk-nre
Changes

Added demos/pkgs/mrtest.tcl.









































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
namespace eval mrtest {
    namespace export calc integer plus minus times quotient fibo rfib
    proc calc {x} {
	switch -exact -- [lindex $x 0] {
	    "i" {
		set result [integer [lindex $x 1]]
	    }
	    "+" {
		set result [plus [lindex $x 1] [lindex $x 2]]
	    }
	    "-" {
		set result [minus [lindex $x 1] [lindex $x 2]]
	    }
	    "*" {
		set result [times [lindex $x 1] [lindex $x 2]]
	    }
	    "/" {
		set result [quotient [lindex $x 1] [lindex $x 2]]
	    }
	    "f" {
		set result [fibo [lindex $x 1]]
	    }
	}
	return $result
    }
    proc integer {x} {
	expr {int($x)}
    }
    proc plus {x y} {
	expr {[calc $x] + [calc $y]}
    }
    proc minus {x y} {
	expr {[calc $x] - [calc $y]}
    }
    proc times {x y} {
	expr {[calc $x] * [calc $y]}
    }
    proc quotient {x y} {
	expr {[calc $x] / [calc $y]}
    }
    proc fibo {x} {
	return [rfib [calc $x]]
    }
    proc rfib {x} {
	if {$x <= 1} {
	    return 1
	} else {
	    return [expr {[rfib [expr {$x - 1}]] + [rfib [expr {$x - 2}]]}]
	}
    }
}
package provide mrtest 0.1

Changes to demos/pkgs/pkgIndex.tcl.

1
2
3
4

package ifneeded cosdemo 0.1 [list source [file join $dir cosdemo.tcl]]
package ifneeded tricky 0.1 [list source [file join $dir trickypkg.tcl]]
package ifneeded bonus 0.1 [list source [file join $dir bonus.tcl]]
package ifneeded wordcount 0.1 [list source [file join $dir wordcount.tcl]]





>
1
2
3
4
5
package ifneeded cosdemo 0.1 [list source [file join $dir cosdemo.tcl]]
package ifneeded tricky 0.1 [list source [file join $dir trickypkg.tcl]]
package ifneeded bonus 0.1 [list source [file join $dir bonus.tcl]]
package ifneeded wordcount 0.1 [list source [file join $dir wordcount.tcl]]
package ifneeded mrtest 0.1 [list source [file join $dir mrtest.tcl]]