Skip to content
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

Faster isNotEmpty on collections #34751

wants to merge 1 commit into from
Changes from all commits
File filter

Filter by extension

Filter by extension

Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -4121,7 +4121,7 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
InterfaceType mixinSupertype = mixinElement.supertype;
if (mixinSupertype != null) {
if (!mixinSupertype.isObject ||
!mixinElement.isMixinApplication && mixinElement.mixins.length != 0) {
!mixinElement.isMixinApplication && mixinElement.mixins.isNotEmpty) {
@@ -73,7 +73,7 @@ class NsmEmitter extends CodeEmitterHelper {
int type, List argNames, Selector selector, jsAst.Name internalName) {
if (!generateTrivialNsmHandlers) return false;
// Check for named arguments.
if (argNames.length != 0) return false;
if (argNames.isNotEmpty) return false;
if (selector.typeArgumentCount > 0) return false;
// Check for unexpected name (this doesn't really happen).
if (internalName is GetterName) return type == 1;
@@ -2597,7 +2597,7 @@ class KernelSsaGraphBuilder extends ir.Visitor
new SubGraph(defaultCase, defaultCase)));
assert(caseHandlers.length == joinBlock.predecessors.length);
if (caseHandlers.length != 0) {
if (caseHandlers.isNotEmpty) {
if (caseHandlers.length == 1) {