coroutine icon indicating copy to clipboard operation
coroutine copied to clipboard

Durable coroutines for Go

Results 10 coroutine issues
Sort by recently updated
recently updated
newest added
trafficstars

Fixes: #141 This PR addresses a panic occurring in the `substituteTypeArgs` function within the `types.go` file. The panic is caused by the lack of handling for the `*ast.IndexListExpr` type, resulting...

## Description When I run `examples/scrape`, I am getting the below error: ```shell ➜ scrape git:(perf) ✗ make ./coroc . 2024/02/11 06:42:14.710485 reading, parsing and type-checking 2024/02/11 06:42:15.271370 building SSA...

Go 1.22 has language changes that may affect compilation of durable coroutines, e.g. range over int / func, and changes to loop variable scoping. See: * https://groups.google.com/g/golang-dev/c/4RA8zxQG8uk/m/H-eklpLCAgAJ?pli=1 * https://github.com/golang/go/issues/61405

enhancement

The desugaring pass should be updated to desugar for range loops over strings: ```go var s string for range string { ... } for index := range string { ......

enhancement

Go generates wrappers for method functions when a reference is taken to either a bound or unbound method. The SSA library calls these [bounds](https://github.com/golang/tools/blob/20e1bb71f6c6c5bc95ab42e4af76764bc9ac5108/go/ssa/wrappers.go#L167) and [thunks](https://github.com/golang/tools/blob/20e1bb71f6c6c5bc95ab42e4af76764bc9ac5108/go/ssa/wrappers.go#L236), respectively. Here's a test...

enhancement

It looks like most of the compilation time is spent parsing the code and building the SSA and call graph. A lot of this work is redundant since most of...

enhancement
good first issue
help wanted

The implementation of `coroutine.Yiled` is a call to `coroutine.LoadContext` followed by a call to the `Yield` method on the returned coroutine context. However, the generated coroutine code makes a call...

performance

To support composition of coroutines, serialization of the coroutine context must be shared across all coroutines sharing the same scope. To achieve this, we need the `coroutine.Context` type to implement...

enhancement

We use the [x/tools/go/ssa](https://pkg.go.dev/golang.org/x/tools/go/ssa) package to instantiate generics for us. We collect generic functions and their instances [here](https://github.com/dispatchrun/coroutine/blob/0a629257d427234fd40ea873a0760065df9aba01/compiler/compile.go#L151-L162), and then register type information for the runtime [here](https://github.com/dispatchrun/coroutine/blob/0a629257d427234fd40ea873a0760065df9aba01/compiler/function.go#L280-L297). If a package...

bug

For context, see https://github.com/dispatchrun/dispatch-go/pull/9.

bug