<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Even if we don't do coroutines as a user feature in Swift 5, we want to make sure we implement coroutine-esque features (like materializeForSet) with an ABI that we're satisfied with. &nbsp;Joe Groff and I were talking about the low-level structure of that ABI, and I wanted to make sure that it was available for general interest + debate.<div class=""><br class=""></div><div class="">Apologies for the format. &nbsp;We'll write up a proper summary before implementing anything.<div class=""><br class=""></div><div class="">John.</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">3:47 jgroff: Hey, so I heard you were thinking that coroutines might not be necessary for ABI stability.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">3:47 I'd be interested in hearing you out on that.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">3:57 it seems to me like we can get the ABI we want without the language feature. like, if we literally had no time we could in principle accept materializeForSet as is, and quickly hack transition get to materializeForGet</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">3:58 and we can pile on addressor-like one offs for the stdlib to do what it needs to with dictionaries</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">3:59 Ah.&nbsp; Yes, I agree that we could probably make co-routines conform to the materializeForSet ABI if we needed to.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">3:59 generators are maybe a bit more interesting; at minimum though you could use the interface of IteratorProtocol as their abi if we needed to</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">3:59 at least, for consuming generators</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:01 Hmm.&nbsp; Possibly true.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:01 it seems to me like we could also tweak the ABI of our existing interfaces to be what we want for generator coroutines there too</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:02 Which interfaces?</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:02 like, slap an attribute on IteratorProtocol saying "this will always be a one-method protocol that looks like a coroutine"</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:03 Oh, I see, to special-case it in the ABI so that we can get the ideal layout.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:06 Yeah, I guess I don't disagree that on a primitive ABI level we could make future coroutine work conform to whatever ABI we roll with in Swift 5.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:06 yeah, modulo borrowing concerns</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:06 Right, which are significant, of course.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:07 it's a fair question whether doing special-case work to get the ABIs right without the feature saves time over doing the feature properly</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:07 Yeah, that's what I was about to say.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">jordan_rose</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:07 arclite borrowing? “if I am on Swift 5 stdlib then I can reach into Array like this”</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:08 our existing accessor ABI seems to me like it's pretty close to what we want, and we could refine it within the existing model without too much churn</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:08 It feels like we'd end up where we did with addressors, iterating because we realize that we need more and more in the library.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:09 Well, the big thing with accessors is that I think we want to replace a getter with a materializeForGet.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:09 right</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:09 And I'm really hesitant to roll out more stuff on the materializeForSet pattern.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:09 But you're right that we could.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:09 i was trying to say that we don't necessarily need coroutines to do that; we could do compiler-driven mangling of the current source-level property model</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:10 Right, like we do with materializeForSet.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:21 from our previous discussions, i recall two general possible ABIs for accessors—could go with materializeForSet-style returning a callback, or pass down a nested function. we ought to be able to make materializeFor[GS]et work either way today</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:21 independent of languagew ork</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:22 Yeah.&nbsp; I think the callback ABI doesn't work if we need to support accessor usage in other coroutines, though.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:23 yeah, certainly not compiler-inverted ones at least</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:23 Right, obviously it's fine if somehow we can avoid compiler inversion.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:25 Unless you really think there's something promising there, though, I think we need to assume that something more like the current ABI is what we're going to roll with.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:25 i can't think of anything else we could realistically do this year</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:27 Well, if we can base async functions on it, we can do that later.&nbsp; My assumption has been that there's not really anything we can do there at all that wouldn't be extremely invasive.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:27 i.e. it's not just a because-we're-crammed-this-year problem.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:27 Not sure that made any sense; let me rephrase.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:28 i think i get it</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:28 If there's an alternative way to lower async functions that doesn't require compiler inversion, and it's something we can pursue (presumably) next year, then we can assume we'll have that.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:29 And we can base the accessor ABI around that assumption, e.g. by using coroutines.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:29 But I haven't heard anything that makes me think that there's actually a feasible alternative there that we can pursue next year.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:31 Okay.&nbsp; If we accept that coroutines require some sort of control inversion, then we should design what we think that ABI should look like.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:32 well, given infinite time, we could keep a coroutine's stack in some relocatable buffer, and compile async functions to burn a couple context registers to track the base of the buffer and sp relative to it, and keep all "addresses" of stuff on that stack relative. beginAsync allocates the buffer; suspendAsync gives you a refcounted handle to the buffer; pushing onto the stack potentially reallocs</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:32 but i don't think that's realistic</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:34 if anything else we really wouldn't want to malloc a context for every opaque access</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:35 Yeah, so I definitely don't think we can convince the backend to generate code that way.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:35 right</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:35 that would be a year-long llvm project in itself</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:35 Yeah, at least.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:36 We can maybe make something like that the basis of a higher-level lowering, though.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class="">4:37 i.e. that's how you get local memory that persists across a save point.<span style="font-kerning: none" class=""></span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:37 Er, a yield point.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:38 I think we'd probably want to ensure that a coroutine can save a certain amount of state without needing to interact with the runtime.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:39 Just for the benefit of really small coroutines.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:39 something like the caller-provided buffer for materializeForSet?</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:39 Right.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:39 Like maybe the stack always has at least 4 words of free space?</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:40 yeah, it'd be nice to avoid going to the heap if continuations never escape, which would be the common case for accesses and for loops</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:42 And something starting a stack, e.g. calling materializeForSet, can just allocate some fixed amount of space within their own stack and do some cheap initialization, and that's good enough for both the fast path and the slow path.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:43 Maybe… pass down two pointers, a scratch space and a stack context?</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:44 Scratch space is [K x i8*], stack context is some control structure which can just be zero-initialized.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:44 if the caller knows it's going to store the yielded context for later, can it emplace the scratch space in an escapable object?</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:44 what's the stack context for?</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:46 Yeah, we don't necessary even need to promise that the scratch space stay at the same address.&nbsp; If the coroutine needs stable memory, they can allocate it.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:46 so anything stored there would have to be memcpyable?</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:46 makes sense</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:47 I mean, we could go either way on that.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:47 But yeah, I think it might be useful to allow it to be memcpy'ed.&nbsp; Allocate it locally and then move it aside if you need to.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:48 RE: stack context: I was thinking basically a pool of memory, so that repeated requests to allocate could resolve faster.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:49 It's a trade-off, though, because its existence means that the originator needs to clean it up.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:49 Which is presumably a runtime call.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:50 Maybe one that could be elided in a fast path, but still, code size.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:50 If you don't have it, then coroutines need to malloc every time.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:51 (Unless they fit in scratch.)</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:53 did anything come of the alloca-into-caller talk? you could theoretically let the coroutine push as much context as it needs on the stack, and make the caller move it if it needs to</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:53 Another benefit of a scratch space: it could potentially be pre-allocated to the known-right size in the original caller to make the system dynamically allocation-free.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:54 how would you get the known-right size?</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:54 Experimentation.&nbsp; It's not a great solution.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:55 Or just picking a large-enough buffer in the same way that people pick large-enough stack sizes.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:56 Alloca-into-caller still has the problem of requiring the memory to be movable, which gets into that big-LLVM-project space.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:57 Well, okay, maybe less big.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:57 We'd be filling this in some sort of coroutine lowering pass and deciding what to put there.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:58 yeah, seems a bit more tractable</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:58 Maybe tough at the LLVM level.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:58 across a yield point i think you have to reload all your local state out of a state union of some sort in any compiler transform</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:59 I guess we could add annotations.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">4:59 Right.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:01 the state storage type you derive as part of the coroutine transform could be what you alloca-into-caller and leave for the caller to either move for later or immediate restart</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:01 immediately*</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:02 Yeah.&nbsp; So you only have to malloc if you actually need to persist something that has to stay at a fixed address.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:02 yeah</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:03 alternatively, we could also put an ABI cap on the size of the struct, so it always fits into a size the caller can preallocate</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:03 Now I guess you'd potentially be doing quadratic amounts of copying if you had coroutines forwarding to each other.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:03 yeah</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:04 so maybe it's better to let the caller emplace the state</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:05 Yeah.&nbsp; I think we can assume that accessors will usually be shallow (depth 1, overwhelmingly) and that async would need to get copied anyway.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:06 Generators I'm not as sure about.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:07 it seems to me like generators would still primarily be relatively shallow and not escaped</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:07 either because you're digesting the whole thing in a for loop or in some silghtly more complex, but still local, control flow</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:08 Yeah.&nbsp; And relatively shallow probably still means depth=1.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:09 Especially after inlining.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:09 Okay.&nbsp; So… some kind of fixed-size scratch space that can be memcpy'ed by the caller between invocations.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:10 For accessors, ramp function returns value pointer + optional continuation function pointer.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:11 is it better to return an optional pointer, or a pointer to a no-op function?</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:11 Optional?&nbsp; Maybe better for code size to just return a non-optional pointer and… yeah.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:11 Typical time/code size trade-off, I think.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:12 i guess the no-op is always two branches vs one or three with the null check, but the return branch ought to be predictable at least</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:13 Yeah.&nbsp; And the same no-op function can be reused a lot.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:14 For generators, I think ramp + continuation functions return value/address + optional continuation function pointer, with null meaning done + no value.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:17 Async I guess would be the same way.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:17 yeah, generators and async ought to look mostly the same at the implementation level</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">spestov</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:17 I wonder how incredibly painful it would be to try to implement multi-shot continuations with reference counting</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:18 Er, actually, is that true?&nbsp; Maybe async actually just returns void.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:18 an async function is in a sense a generator that yields void</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:18 No, I mean maybe the continuation handled privately.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:18 or, potentially, some context information about what it's waiting on</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:19 ah, you mean, make it the callee's responsibility to schedule the continuation and just return void to the sync context?</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:19 Right.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:20 Like, what would the caller do with the continuation function?</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:20 sure, that might also be nice for retrofitting into async void-returning ABIs if needed</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:21 in the universe of possible designs, maybe async yields a list of event fds back to the caller event loop for queuing, instead of queuing itself</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:21 with chris's proposal though it's up to the callee</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:21 Ah, sure, if you had a universal event system to wait on, that would work.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:22 Just return an event handle + a continuation to notify upon that event.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:22 But yeah, it's hard to retrofit that.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:24 Okay, if async functions schedule themselves, they don't have scratch buffers, either.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:25 Thoughts on scratch size for accessors/generators?&nbsp; I guess they can vary separately.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:26 Generators probably want more scratch space overall by default.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:26 And there's some benefit to that, since it means generators can call accessors.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:26 Maybe 4 pointers and 8 pointers?</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:26 16-byte aligned in both cases, just because.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:27 Or maybe not, maybe just pointer-aligned is fine.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:28 how big is a typical lazy transformer struct</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:28 You mean like a lazy collection?</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:28 yeah</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:29 a closure is two words</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:29 There's going to at least be a transform function, and then I guess the underlying collection.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:29 an array might be one or two words</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:29 Yeah.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:30 8 pointers gives you a collection and three closures, i guess that's ok</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:31 Yeah, or a collection, a closure, and an accessor call.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:31 Hmm, not an accessor call, because you also have to save the continuation.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:33 Other than wanting accessors to fit cleanly within generators, I don't think we need to be stingy here.</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">Joe Groff</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:36 yeah, maybe a bit more space for generators, since it's going to be common to yield an access, and there's more interesting state that could accumulate</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande'; min-height: 15px;" class=""><span style="font-kerning: none" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">rjmccall</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:36 12?&nbsp; 16?</span></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class="">5:36 12 is probably fine.</span></div></div></div><div style="margin: 0px; line-height: normal; font-family: 'Lucida Grande';" class=""><span style="font-kerning: none" class=""><br class=""></span></div></body></html>