-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make InvalidEventHandler signature consistent with normal EventHandlers
Summary: This brings two benefits: 1. The unspecialized EventHandler that calls `SM::InvalidEventHandler` can now simply tail call `InvalidEventHandler`. Prior to this diff, the call to `InvalidEventHandler` depended on the `event` non-type template parameter, which meant that _every_ invalid transition would result in a separate instantiation with distinct code in order to set up the event argument. 2. In a future diff, we can leave the default EventHandler unimplemented and SFIANE the instantiation in `getEventHandler`. Before: ``` 45594: f81f0ffe str x30, [sp, #-16]! 45598: aa0103e2 mov x2, x1 4559c: 52800181 mov w1, #0xc // #12 455a0: 97ffa9dc bl 2fd10 <_ZN4fizz6client6detail18handleInvalidEventERKNS0_5StateENS_5EventERNS_5ParamE> ``` After: ``` 0000000000045374 <_ZN4fizz2sm12EventHandlerINS_6client11ClientTypesELNS2_9StateEnumE3ELNS_5EventE12EE6handleERKNS2_5StateES5_RNS_5ParamE>: 45374: f81f0ffe str x30, [sp, #-16]! 45378: 97ffaa68 bl 2fd18 <_ZN4fizz6client6detail18handleInvalidEventERKNS0_5StateENS_5EventERNS_5ParamE> ``` Reviewed By: zalecodez, knekritz Differential Revision: D58147022 fbshipit-source-id: aa7075ad03528234ef0cd1090d5e9e3629076135
- Loading branch information
1 parent
fdb847e
commit dff7dc1
Showing
5 changed files
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters