implementing-goto-continuations:JavaScript中“ goto”的选项

时间:2021-04-11 11:02:14
【文件属性】:
文件名称:implementing-goto-continuations:JavaScript中“ goto”的选项
文件大小:4KB
文件格式:ZIP
更新时间:2021-04-11 11:02:14
goto continuation-passing-style continuations JavaScript 实施goto延续 三种goto 转到函数内的行或标签。 转到其他函数(然后在内部执行)。 转到暂停的函数(然后在内部对其执行)。 例子 1.使用行号goto ./2-goto-via-command-stack.js const s = useContinuation ( ) const { setGoto , setStop , state , push } = s . next ( [ false , false ] ) . value push ( "state.a = 3" ) s . next ( [ true , false ] ) // a = 3 push ( "state.a += .5" ) s . next ( [ true , false ] ) // a = 3.5 setGoto ( 1 ) s . next ( [ true , false ] )
【文件预览】:
implementing-goto-continuations-main
----6-fn-goto-via-jit-pointers.js(426B)
----5-goto-via-pointers.js(558B)
----3-label-goto-via-yield-callbacks.js(889B)
----README.md(1KB)
----4-goto-via-yield-variables.js(1KB)
----2-line-goto-via-command-stack.js(917B)

网友评论