Simon Krajewski

Results 881 comments of Simon Krajewski

Ah nice, thanks! I've added this to gencpp for now. Will have to review all the generator changes at the end anyway. And yes, suspending calls are changed to lose...

I've made some changes to the output I talked about in [this comment](https://github.com/HaxeFoundation/haxe/pull/11554#issuecomment-1943211172). First of all, here's the mandatory dot-graph of the initial transformation: ![graphviz](https://github.com/HaxeFoundation/haxe/assets/634365/67830f9c-f346-449f-9515-a359d7f34c55) The second half of the...

I've been misunderstanding the exception problem this whole time because there were test classes which printed wrong names, which made me think that some instanceof checks were failing. The actual...

After giving it some thought I've come up with a slightly different approach to handling exceptions which I'll write down here before I start implementing it. Working with this as...

Well, that worked: ```haxe function(yield:Yield, _hx_continuation:(Dynamic, Dynamic) -> Void) { var _hx_state = 1; var _hx_stateMachine; _hx_stateMachine = function(_hx_result:Dynamic, _hx_error:Dynamic) { if (_hx_error != null) _hx_state = 12; do (try...

Thanks to @kLabz we now run our server tests using coroutines! For now there's a [custom utest branch](https://github.com/kLabz/utest/tree/coro) which we'll contribute to the main repository once everything has stabilized. This...

At least part of the problem here is that `read_dir` isn't actually a `@:coroutine`, so there's never any suspension. But even with that it's still failing elsewhere.

I think this comes down to us not understanding how `Coroutine.suspend` is actually supposed to work. From the [Kotlin design document](https://github.com/Kotlin/KEEP/blob/master/proposals/coroutines.md#continuation-passing-style): > When suspending function suspends coroutine, it returns a...

Here's a simplified version with some nostalgic trace debugging: ```haxe import sys.thread.Thread; import haxe.coro.Coroutine; import yield.Yield; class CoroDirectory { function new() {} // @:coroutine public static function open():CoroDirectory { //...

> enum SuspensionResult { Suspended; Result(v:T); Error(e:Dynamic); } I had a very similar idea, except that I was thinking we could generalize `_hx_error` to carry this kind of "control state"...