-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Drop unnecessary usage of ternary operator in JavaScriptCore #57214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop unnecessary usage of ternary operator in JavaScriptCore #57214
Conversation
|
EWS run on previous version of this PR (hash e4f794b) Details |
e4f794b to
37d80a8
Compare
|
EWS run on current version of this PR (hash 37d80a8) Details |
darinadler
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m comfortable with these. They all seem slightly clearer than the ternary.
https://bugs.webkit.org/show_bug.cgi?id=306221 rdar://168876630 Reviewed by Darin Adler. This improves readability and enforces more idiomatic C++ by resorting to equivalent binary boolean operations. * Source/JavaScriptCore/assembler/CPU.cpp: (JSC::isARM64E_FPAC): * Source/JavaScriptCore/bytecode/DeleteByStatus.cpp: (JSC::DeleteByStatus::computeForStubInfoWithoutExitSiteFeedback): * Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::emitGenericEnumeration): * Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp: (JSC::ShortCircuitReadModifyResolveNode::emitBytecode): * Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::handleIntrinsicCall): * Source/JavaScriptCore/parser/Nodes.cpp: (JSC::BlockNode::hasCompletionValue const): (JSC::BlockNode::hasEarlyBreakOrContinue const): (JSC::ScopeNode::hasCompletionValue const): (JSC::ScopeNode::hasEarlyBreakOrContinue const): * Source/JavaScriptCore/parser/Nodes.h: * Source/JavaScriptCore/parser/Parser.cpp: (JSC::Parser<LexerType>::parseFunctionBody): * Source/JavaScriptCore/runtime/Butterfly.h: (JSC::Butterfly::totalSize): * Source/JavaScriptCore/runtime/LiteralParser.cpp: (JSC::requires): (JSC::reviverMode>::parse): * Source/JavaScriptCore/runtime/Options.cpp: (JSC::OptionRange::isInRange const): * Source/JavaScriptCore/runtime/VMManager.h: (JSC::VMManager::isValidVM): Canonical link: https://commits.webkit.org/306188@main
37d80a8 to
c4e25ac
Compare
|
Committed 306188@main (c4e25ac): https://commits.webkit.org/306188@main Reviewed commits have been landed. Closing PR #57214 and removing active labels. |
c4e25ac
37d80a8