@@ -360,7 +360,7 @@ Recursive component calls are technically possible using either host powers (as
360360mentioned above) or via a parent component lowering a child component's export
361361to a ` funcref ` and then recursively calling this ` funcref ` from a lifted parent
362362function passed as an import to the child. However, for the time being, both
363- cases are prevent via trap for several reasons:
363+ cases are prevented via trap for several reasons:
364364* automatic [ backpressure] would otherwise deadlock in unpredictable and
365365 surprising ways;
366366* by default, most code does not expect [ recursive reentrance] and will break
@@ -384,9 +384,9 @@ def call_might_be_recursive(caller: Supertask, callee_inst: ComponentInstance):
384384 return (caller.inst.is_reflexive_ancestor_of(callee_inst) or
385385 callee_inst.is_reflexive_ancestor_of(caller.inst))
386386```
387- The first case covers host-to-component calls (when ` caller.inst ` is ` None ` ).
388- By testing the intersection ( ` & ` ) of all caller's reflexive anecestor sets, the
389- following case is considered recursive:
387+ The first case (where ` caller.inst ` is ` None ` ) covers host-to-component calls .
388+ By testing whether any of the callers' reflexive anecestor sets intersect the
389+ callee's ancestor set, the following case is considered recursive:
390390```
391391 +-------+
392392 | A |<-.
@@ -405,10 +405,10 @@ while `A` does not appear as the `inst` of any `Supertask` on this stack,
405405` A ` is being reentered. This ensures that child components are kept an
406406encapsulated detail of the parent.
407407
408- The second case covers component-to-component calls by conservatively rejecting
409- any call from a component to its anecestor or descendant (thereby preventing any
410- possible recursion via ancestor ` funcref ` ). Thus, while the following
411- sibling-to-sibling component call is allowed:
408+ The second case (where ` caller.inst ` is not ` None ` ) covers component-to-
409+ component calls by conservatively rejecting any call from a component to its
410+ anecestor or descendant (thereby preventing any possible recursion via ancestor
411+ ` funcref ` ). Thus, the following sibling-to-sibling component call is allowed:
412412```
413413 +----------------+
414414 | P |
@@ -417,7 +417,7 @@ host-->| C1 |->| C2 | |
417417 | +----+ +----+ |
418418 +----------------+
419419```
420- the following child-to-parent and parent-to-child calls are disallowed:
420+ while the following child-to-parent and parent-to-child calls are disallowed:
421421```
422422 +----------+ +----------+
423423 | +---+ | | +---+ |
0 commit comments