[YARR] Add diagnosis for YarrJIT failures
Created attachment 331905 [details] Patch
Created attachment 331906 [details] Patch
Comment on attachment 331906 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=331906&action=review > Source/JavaScriptCore/yarr/YarrJIT.cpp:3505 > + std::optional<JITFailure> m_shouldFallBack; Perhaps this should be called m_failureReason > Source/JavaScriptCore/yarr/YarrJIT.h:53 > +enum class JITFailure { Perhaps a better name is JITFailureReason? > Source/JavaScriptCore/yarr/YarrJIT.h:85 > + void setFallBack(std::optional<JITFailure> fallBack) { m_fallBack = fallBack; } Perhaps a better name here would be setFallBackWithFailureReason (or something like that), since you failure reason enum is not what you are falling back to, but why you are falling back. I also think this could take a JITFailure (without the optional), since you never seem to call this with nullopt.
Comment on attachment 331906 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=331906&action=review >> Source/JavaScriptCore/yarr/YarrJIT.cpp:3505 >> + std::optional<JITFailure> m_shouldFallBack; > > Perhaps this should be called m_failureReason Sounds nice, fixed. >> Source/JavaScriptCore/yarr/YarrJIT.h:53 >> +enum class JITFailure { > > Perhaps a better name is JITFailureReason? Nice, fixed. >> Source/JavaScriptCore/yarr/YarrJIT.h:85 >> + void setFallBack(std::optional<JITFailure> fallBack) { m_fallBack = fallBack; } > > Perhaps a better name here would be setFallBackWithFailureReason (or something like that), since you failure reason enum is not what you are falling back to, but why you are falling back. I also think this could take a JITFailure (without the optional), since you never seem to call this with nullopt. OK, sounds nice. Fixed.
Committed r227469: <https://trac.webkit.org/changeset/227469>
<rdar://problem/36808871>
Reopening to attach new patch.
Created attachment 332504 [details] Patch
Attachment 332504 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/assembler/LinkBuffer.h:343: Wrong number of spaces before statement. (expected: 9) [whitespace/indent] [4] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 332504 [details] Patch Oops, wrong bug id.