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

for loop not always inlined properly #276

Open
Gaming32 opened this issue May 5, 2023 · 0 comments
Open

for loop not always inlined properly #276

Gaming32 opened this issue May 5, 2023 · 0 comments
Labels
bug Something isn't working Priority: Medium Medium priority Subsystem: Statement Structure Anything concerning how statements are structured in a method

Comments

@Gaming32
Copy link

Gaming32 commented May 5, 2023

This occurs in Mixin's embedded Gson implementation.

QuiltFlower 1.10.0-20230429.222726-81
TypeAdapter var10;
try {
    Gson.FutureTypeAdapter<T> call = new Gson.FutureTypeAdapter<>();
    threadCalls.put(type, call);
    Iterator i$ = this.factories.iterator();

    TypeAdapter<T> candidate;
    do {
        if (!i$.hasNext()) {
            throw new IllegalArgumentException("GSON cannot handle " + type);
        }

        TypeAdapterFactory factory = (TypeAdapterFactory)i$.next();
        candidate = factory.create(this, type);
    } while (candidate == null);

    call.setDelegate(candidate);
    this.typeTokenCache.put(type, candidate);
    var10 = candidate;
} finally {
    threadCalls.remove(type);
    if (requiresThreadLocalCleanup) {
        this.calls.remove();
    }
}
CFR 0.152
try {
    FutureTypeAdapter<T> call = new FutureTypeAdapter<T>();
    threadCalls.put(type, call);
    for (TypeAdapterFactory factory : this.factories) {
        TypeAdapter<T> candidate = factory.create(this, type);
        if (candidate == null) continue;
        call.setDelegate(candidate);
        this.typeTokenCache.put(type, candidate);
        TypeAdapter<T> typeAdapter = candidate;
        return typeAdapter;
    }
    throw new IllegalArgumentException("GSON cannot handle " + type);
}
finally {
    threadCalls.remove(type);
    if (requiresThreadLocalCleanup) {
        this.calls.remove();
    }
}

JAR download

@jaskarth jaskarth added bug Something isn't working Subsystem: Statement Structure Anything concerning how statements are structured in a method Priority: Medium Medium priority labels May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority: Medium Medium priority Subsystem: Statement Structure Anything concerning how statements are structured in a method
Projects
None yet
Development

No branches or pull requests

2 participants