[EventDispatcher] Add CompiledEventDispatcher
The listener graph is settled when the container is compiled, but it reaches the dispatcher as work: one addListener() call per listener, each building a closure that then hides which service the listener is. CompiledEventDispatcher takes the same graph as data, the id and the method of each listener in the order they must run in, plus the locator to fetch them from. CompileListenersPass writes that map from the addListener() calls at TYPE_AFTER_REMOVING, so the passes reading those calls still find them, and a decorated dispatcher keeps the calls it forwards. A listener is still fetched only when it is about to run, and anything but dispatching moves the map back into a plain EventDispatcher.
N
Nicolas Grekas committed
2c21773f303dc177f0ada5abb608711f57c04ec0
Parent: 1c2c126