Check-in [7a5af13a50]

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

Overview
Comment:Improve commentary
Timelines: family | ancestors | descendants | both | kbk-nre
Files: files | file ages | folders
SHA3-256:7a5af13a507d622c02eadafb39febaae1f43102679eced406c12a70e28541d86
User & Date: kbk 2018-04-25 00:59:18
Context
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
2018-04-25
00:59
Improve commentary check-in: 7a5af13a50 user: kbk tags: kbk-nre
00:47
Streamline returnFromInvoke a tiny bit. check-in: 020581c952 user: kbk tags: kbk-nre
Changes

Changes to codegen/coro.tcl.

39
40
41
42
43
44
45











46
47
48
49
50
51
52
...
102
103
104
105
106
107
108
109






110
111
112
113
114
115
116

oo::define Builder method @coroFunctions {api} {

    ##### Function tcl.coro.runner #####
    #
    # Type signature: x:char** × Interp* × int32 -> int32
    #











    # This function is the main loop of any NRE call. It is the callback
    # from a Tcl_AddCallback call, and its client data is the LLVM coroutine
    # frame. It also carries the result of the last Tcl callout, and that
    # result will be handed off to the next LLVM continuation by storing
    # it in the coroutine promise.

    set f [$m local "tcl.coro.runner" int32<-char**,Interp*,int32 noinline]
................................................................................

	my ret [Const 0 int];	# TCL_OK

    }

    ##### Function: tcl.coro.addCallbackToCoroRunner #####
    #
    # Type signature: Interp* × char* -> void






    #
    # This function invokes Tcl_NRAddCallback to launch a call to
    # coroRunner, with the LLVM coroutine handle given by 'handle'.

    set f [$m local "tcl.coro.addCallbackToCoroRunner" void<-char*]
    params coroHandle
    build {







>
>
>
>
>
>
>
>
>
>
>







 







|
>
>
>
>
>
>







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
...
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

oo::define Builder method @coroFunctions {api} {

    ##### Function tcl.coro.runner #####
    #
    # Type signature: x:char** × Interp* × int32 -> int32
    #
    # Parameters:
    #	ClientData clientDataArray [4] - Client data from the Tcl_NRAddCallback
    #                                    Only clientData[0] is used; it is
    #	                                 the coroutine handle
    #   Tcl_Interp* interp             - Tcl interpreter
    #   int status                     - Tcl status code chained from the
    #                                    last call
    #
    # Results:
    #	Returns TCL_OK.
    #
    # This function is the main loop of any NRE call. It is the callback
    # from a Tcl_AddCallback call, and its client data is the LLVM coroutine
    # frame. It also carries the result of the last Tcl callout, and that
    # result will be handed off to the next LLVM continuation by storing
    # it in the coroutine promise.

    set f [$m local "tcl.coro.runner" int32<-char**,Interp*,int32 noinline]
................................................................................

	my ret [Const 0 int];	# TCL_OK

    }

    ##### Function: tcl.coro.addCallbackToCoroRunner #####
    #
    # Type signature: char* -> void
    #
    # Parameters:
    #	coroHandle - Handle of the coroutine to run to the next suspension
    #
    # Results:
    #	None.
    #
    # This function invokes Tcl_NRAddCallback to launch a call to
    # coroRunner, with the LLVM coroutine handle given by 'handle'.

    set f [$m local "tcl.coro.addCallbackToCoroRunner" void<-char*]
    params coroHandle
    build {