Re: [whatwg/streams] Reorganise TransformStream slots and abstract operations (#776)

After recent refactorings there aren't many slots left to move around.

Remaining:
- [[transformer]] should probably move to TransformStreamDefaultSink as described above. There's a mild risk that future byte streams will require it to be moved back, but we can cross that bridge when we come to it.
- [[writableController]] is used by TransformStreamErrorInternal. Will probably need some polymorphic dispatch in future, but in general makes sense to stay on TransformStream.
- [[readableController]]: same as [[writableController]]
- [[transformStreamController]]: naturally stays on TransformStream.
- [[backpressure]] is used by both the Source and the Sink. It seems like a generic enough concept to work for any type of stream, but time will tell.
- [[backpressureChangePromise]]; same as [[backpressure]].
- [[readable]]: used by the TransformStream accessor as well TransformStreamErrorInternal and other places that need to check the current state. The readable.[[state]] is itself generic, so it doesn't look like we'll need any polymorphism here, I see no reason to move it.
- [[writable]] is only used the the TransformStream accessor.

So in the end I think I will move only one slot.

That just leaves some fairly trivial rearrangement of abstract operations to do. In particular the TSDefaultController methods should delegate to TSDefaultController operations for use by other standards.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/776#issuecomment-330474910

Received on Tuesday, 19 September 2017 08:56:28 UTC