f03cdfcc40
This avoids copies here and there throughout the pipeline - ie `copyString` and friends can often be avoided when moving things into and out of futures Annoyingly, one has to sprinkle the codebase liberally with `sink` and `move` for the pipeline to work well - sink stuff _generally_ works better in orc/arc Looking at nim 1.6/refc, sink + local variable + move generates the best code: msg directly: ```nim T1_ = (*colonenv_).msg1; (*colonenv_).msg1 = copyStringRC1(msg); ``` local copy without move: ```nim T60_ = (*colonenv_).localCopy1; (*colonenv_).localCopy1 = copyStringRC1(msg); ``` local copy with move: ```nim asgnRef((void**) (&(*colonenv_).localCopy1), msg); ``` Annoyingly, sink is also broken for refc+literals as it tries to changes the refcount of the literal as part of the move (which shouldn't be happening, but here we are), so we have to use a hack to find literals and avoid moving them. |
||
---|---|---|
.. | ||
asyncengine.nim | ||
asyncfutures.nim | ||
asyncmacro.nim | ||
errors.nim | ||
raisesfutures.nim |