Commit 51ef79f6 authored by Kenton Varda's avatar Kenton Varda

Tweaks.

parent 1e518b92
...@@ -534,6 +534,8 @@ public: ...@@ -534,6 +534,8 @@ public:
void setResults(DynamicStruct::Reader value); void setResults(DynamicStruct::Reader value);
void adoptResults(Orphan<DynamicStruct>&& value); void adoptResults(Orphan<DynamicStruct>&& value);
Orphanage getResultsOrphanage(uint firstSegmentWordSize = 0); Orphanage getResultsOrphanage(uint firstSegmentWordSize = 0);
template <typename SubParams>
kj::Promise<void> tailCall(Request<SubParams, DynamicStruct>&& tailRequest);
void allowAsyncCancellation(); void allowAsyncCancellation();
bool isCanceled(); bool isCanceled();
...@@ -1527,6 +1529,11 @@ inline Orphanage CallContext<DynamicStruct, DynamicStruct>::getResultsOrphanage( ...@@ -1527,6 +1529,11 @@ inline Orphanage CallContext<DynamicStruct, DynamicStruct>::getResultsOrphanage(
uint firstSegmentWordSize) { uint firstSegmentWordSize) {
return Orphanage::getForMessageContaining(hook->getResults(firstSegmentWordSize)); return Orphanage::getForMessageContaining(hook->getResults(firstSegmentWordSize));
} }
template <typename SubParams>
inline kj::Promise<void> CallContext<DynamicStruct, DynamicStruct>::tailCall(
Request<SubParams, DynamicStruct>&& tailRequest) {
return hook->tailCall(kj::mv(tailRequest.hook));
}
inline void CallContext<DynamicStruct, DynamicStruct>::allowAsyncCancellation() { inline void CallContext<DynamicStruct, DynamicStruct>::allowAsyncCancellation() {
hook->allowAsyncCancellation(); hook->allowAsyncCancellation();
} }
......
...@@ -100,7 +100,7 @@ public: ...@@ -100,7 +100,7 @@ public:
return message->message.getRoot<ObjectPointer>(); return message->message.getRoot<ObjectPointer>();
} }
void send() override { void send() override {
//kj::String msg = kj::str(connection.name, ": ", message->message.getRoot<rpc::Message>()); kj::String msg = kj::str(connection.name, ": ", message->message.getRoot<rpc::Message>());
//KJ_DBG(msg); //KJ_DBG(msg);
KJ_IF_MAYBE(p, connection.partner) { KJ_IF_MAYBE(p, connection.partner) {
......
...@@ -45,6 +45,10 @@ public: ...@@ -45,6 +45,10 @@ public:
return Capability::Client(newBrokenCap("No TestExtends implemented.")); return Capability::Client(newBrokenCap("No TestExtends implemented."));
case test::TestSturdyRefObjectId::Tag::TEST_PIPELINE: case test::TestSturdyRefObjectId::Tag::TEST_PIPELINE:
return kj::heap<TestPipelineImpl>(callCount); return kj::heap<TestPipelineImpl>(callCount);
case test::TestSturdyRefObjectId::Tag::TEST_TAIL_CALLEE:
return kj::heap<TestTailCalleeImpl>(callCount);
case test::TestSturdyRefObjectId::Tag::TEST_TAIL_CALLER:
return kj::heap<TestTailCallerImpl>(callCount);
} }
KJ_UNREACHABLE; KJ_UNREACHABLE;
} }
......
...@@ -2465,7 +2465,7 @@ private: ...@@ -2465,7 +2465,7 @@ private:
break; break;
default: default:
KJ_FAIL_REQUIRE("Unknown return type (not answer, exception, or canceled).") { return; } KJ_FAIL_REQUIRE("Unknown 'Return' type.") { return; }
} }
if (question->selfRef == nullptr) { if (question->selfRef == nullptr) {
......
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