Commit 46b2a376 authored by Kenton Varda's avatar Kenton Varda

Fix weird linker issues.

parent e22e5641
......@@ -551,15 +551,11 @@ template <>
class ArrayJoinPromiseNode<void> final: public ArrayJoinPromiseNodeBase {
public:
ArrayJoinPromiseNode(Array<Own<PromiseNode>> promises,
Array<ExceptionOr<_::Void>> resultParts)
: ArrayJoinPromiseNodeBase(
kj::mv(promises), resultParts.begin(), sizeof(ExceptionOr<_::Void>)),
resultParts(kj::mv(resultParts)) {}
Array<ExceptionOr<_::Void>> resultParts);
~ArrayJoinPromiseNode();
protected:
void getNoError(ExceptionOrValue& output) noexcept override {
output.as<_::Void>() = _::Void();
}
void getNoError(ExceptionOrValue& output) noexcept override;
private:
Array<ExceptionOr<_::Void>> resultParts;
......@@ -776,12 +772,6 @@ Promise<Array<T>> joinPromises(Array<Promise<T>>&& promises) {
heapArray<_::ExceptionOr<T>>(promises.size())));
}
inline Promise<void> joinPromises(Array<Promise<void>>&& promises) {
return Promise<void>(false, kj::heap<_::ArrayJoinPromiseNode<void>>(
KJ_MAP(p, promises) { return kj::mv(p.node); },
heapArray<_::ExceptionOr<_::Void>>(promises.size())));
}
// =======================================================================================
namespace _ { // private
......
......@@ -885,6 +885,27 @@ Maybe<Exception> ArrayJoinPromiseNodeBase::Branch::getPart() {
return kj::mv(output.exception);
}
ArrayJoinPromiseNode<void>::ArrayJoinPromiseNode(
Array<Own<PromiseNode>> promises, Array<ExceptionOr<_::Void>> resultParts)
: ArrayJoinPromiseNodeBase(kj::mv(promises), resultParts.begin(), sizeof(ExceptionOr<_::Void>)),
resultParts(kj::mv(resultParts)) {}
ArrayJoinPromiseNode<void>::~ArrayJoinPromiseNode() {}
void ArrayJoinPromiseNode<void>::getNoError(ExceptionOrValue& output) noexcept {
output.as<_::Void>() = _::Void();
}
} // namespace _ (private)
Promise<void> joinPromises(Array<Promise<void>>&& promises) {
return Promise<void>(false, kj::heap<_::ArrayJoinPromiseNode<void>>(
KJ_MAP(p, promises) { return kj::mv(p.node); },
heapArray<_::ExceptionOr<_::Void>>(promises.size())));
}
namespace _ { // (private)
// -------------------------------------------------------------------
EagerPromiseNodeBase::EagerPromiseNodeBase(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment