mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-13 09:27:16 +01:00
514 lines
28 KiB
Java
514 lines
28 KiB
Java
package androidx.compose.runtime;
|
|
|
|
import androidx.collection.MutableObjectIntMap;
|
|
import androidx.collection.MutableScatterMap;
|
|
import androidx.collection.ScatterSet;
|
|
import androidx.compose.runtime.internal.StabilityInferred;
|
|
import com.amazon.alexa.api.compat.model.assistant.subcomponent.AlexaEventBundleKeys;
|
|
import com.amazon.alexa.ra.core.data.fragments.SmartFragmentContent;
|
|
import com.amazon.identity.auth.device.api.MultipleAccountManager;
|
|
import java.util.List;
|
|
import kotlin.Metadata;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function1;
|
|
import kotlin.jvm.functions.Function2;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
import rx.Single$$ExternalSyntheticBUOutline0;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@StabilityInferred(parameters = 0)
|
|
@Metadata(d1 = {"\u0000f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0002\b\u001f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0016\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0001\u0018\u0000 `2\u00020\u00012\u00020\u0002:\u0001`B\u0011\u0012\b\u0010\u0003\u001a\u0004\u0018\u00010\u0004¢\u0006\u0004\b\u0005\u0010\u0006J\u000e\u00106\u001a\u0002052\u0006\u00107\u001a\u000204J\u0010\u00108\u001a\u0002092\b\u0010\u0018\u001a\u0004\u0018\u00010:J\u0006\u0010;\u001a\u000205J\u000e\u0010<\u001a\u0002052\u0006\u0010\u0003\u001a\u00020\u0004J\b\u0010=\u001a\u000205H\u0016J\"\u0010>\u001a\u0002052\u0018\u00102\u001a\u0014\u0012\u0004\u0012\u000204\u0012\u0004\u0012\u00020\u000b\u0012\u0004\u0012\u00020503H\u0016J\u000e\u0010N\u001a\u0002052\u0006\u0010O\u001a\u00020\u000bJ\u0006\u0010P\u001a\u000205J\u000e\u0010Q\u001a\u00020\u00132\u0006\u0010R\u001a\u00020:J\u001c\u0010S\u001a\u0002052\n\u0010R\u001a\u0006\u0012\u0002\b\u00030D2\b\u0010\u0018\u001a\u0004\u0018\u00010:J\u0010\u0010U\u001a\u00020\u00132\b\u0010V\u001a\u0004\u0018\u00010:J*\u0010W\u001a\u00020\u0013*\u0006\u0012\u0002\b\u00030D2\u0018\u0010X\u001a\u0014\u0012\b\u0012\u0006\u0012\u0002\b\u00030D\u0012\u0006\u0012\u0004\u0018\u00010:0CH\u0002J\u0006\u0010Y\u001a\u000205J\u001c\u0010Z\u001a\u0010\u0012\u0004\u0012\u00020\\\u0012\u0004\u0012\u000205\u0018\u00010[2\u0006\u0010O\u001a\u00020\u000bJ\u0011\u0010]\u001a\u00020\u00132\u0006\u0010^\u001a\u00020\u000bH\u0082\bJ\u0019\u0010_\u001a\u0002052\u0006\u0010^\u001a\u00020\u000b2\u0006\u0010\u0018\u001a\u00020\u0013H\u0082\bR\u001c\u0010\u0003\u001a\u0004\u0018\u00010\u0004X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0007\u0010\b\"\u0004\b\t\u0010\u0006R\u000e\u0010\n\u001a\u00020\u000bX\u0082\u000e¢\u0006\u0002\n\u0000R\u001c\u0010\f\u001a\u0004\u0018\u00010\rX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u000e\u0010\u000f\"\u0004\b\u0010\u0010\u0011R\u0011\u0010\u0012\u001a\u00020\u00138F¢\u0006\u0006\u001a\u0004\b\u0014\u0010\u0015R\u0011\u0010\u0016\u001a\u00020\u00138F¢\u0006\u0006\u001a\u0004\b\u0017\u0010\u0015R$\u0010\u0019\u001a\u00020\u00132\u0006\u0010\u0018\u001a\u00020\u00138F@FX\u0086\u000e¢\u0006\f\u001a\u0004\b\u001a\u0010\u0015\"\u0004\b\u001b\u0010\u001cR$\u0010\u001d\u001a\u00020\u00132\u0006\u0010\u0018\u001a\u00020\u00138F@FX\u0086\u000e¢\u0006\f\u001a\u0004\b\u001e\u0010\u0015\"\u0004\b\u001f\u0010\u001cR$\u0010 \u001a\u00020\u00132\u0006\u0010\u0018\u001a\u00020\u00138F@FX\u0086\u000e¢\u0006\f\u001a\u0004\b!\u0010\u0015\"\u0004\b\"\u0010\u001cR$\u0010#\u001a\u00020\u00132\u0006\u0010\u0018\u001a\u00020\u00138F@FX\u0086\u000e¢\u0006\f\u001a\u0004\b$\u0010\u0015\"\u0004\b%\u0010\u001cR$\u0010&\u001a\u00020\u00132\u0006\u0010\u0018\u001a\u00020\u00138F@FX\u0086\u000e¢\u0006\f\u001a\u0004\b'\u0010\u0015\"\u0004\b(\u0010\u001cR$\u0010)\u001a\u00020\u00132\u0006\u0010\u0018\u001a\u00020\u00138F@FX\u0086\u000e¢\u0006\f\u001a\u0004\b*\u0010\u0015\"\u0004\b+\u0010\u001cR$\u0010,\u001a\u00020\u00132\u0006\u0010\u0018\u001a\u00020\u00138F@FX\u0086\u000e¢\u0006\f\u001a\u0004\b-\u0010\u0015\"\u0004\b.\u0010\u001cR$\u0010/\u001a\u00020\u00132\u0006\u0010\u0018\u001a\u00020\u00138F@FX\u0086\u000e¢\u0006\f\u001a\u0004\b0\u0010\u0015\"\u0004\b1\u0010\u001cR\"\u00102\u001a\u0016\u0012\u0004\u0012\u000204\u0012\u0004\u0012\u00020\u000b\u0012\u0004\u0012\u000205\u0018\u000103X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010?\u001a\u00020\u000bX\u0082\u000e¢\u0006\u0002\n\u0000R\u0016\u0010@\u001a\n\u0012\u0004\u0012\u00020:\u0018\u00010AX\u0082\u000e¢\u0006\u0002\n\u0000R\"\u0010B\u001a\u0016\u0012\b\u0012\u0006\u0012\u0002\b\u00030D\u0012\u0006\u0012\u0004\u0018\u00010:\u0018\u00010CX\u0082\u000e¢\u0006\u0002\n\u0000R$\u0010E\u001a\u00020\u00132\u0006\u0010\u0018\u001a\u00020\u00138B@BX\u0082\u000e¢\u0006\f\u001a\u0004\bF\u0010\u0015\"\u0004\bG\u0010\u001cR$\u0010H\u001a\u00020\u00132\u0006\u0010\u0018\u001a\u00020\u00138F@FX\u0086\u000e¢\u0006\f\u001a\u0004\bI\u0010\u0015\"\u0004\bJ\u0010\u001cR$\u0010K\u001a\u00020\u00132\u0006\u0010\u0018\u001a\u00020\u00138@@BX\u0080\u000e¢\u0006\f\u001a\u0004\bL\u0010\u0015\"\u0004\bM\u0010\u001cR\u0011\u0010T\u001a\u00020\u00138F¢\u0006\u0006\u001a\u0004\bT\u0010\u0015¨\u0006a"}, d2 = {"Landroidx/compose/runtime/RecomposeScopeImpl;", "Landroidx/compose/runtime/ScopeUpdateScope;", "Landroidx/compose/runtime/RecomposeScope;", MultipleAccountManager.SessionPackageMappingType.JSON_KEY_SESSION_PACKAGE_MAPPING_OWNER, "Landroidx/compose/runtime/RecomposeScopeOwner;", "<init>", "(Landroidx/compose/runtime/RecomposeScopeOwner;)V", "getOwner$runtime", "()Landroidx/compose/runtime/RecomposeScopeOwner;", "setOwner$runtime", "flags", "", "anchor", "Landroidx/compose/runtime/Anchor;", "getAnchor", "()Landroidx/compose/runtime/Anchor;", "setAnchor", "(Landroidx/compose/runtime/Anchor;)V", "valid", "", "getValid", "()Z", "canRecompose", "getCanRecompose", "value", "used", "getUsed", "setUsed", "(Z)V", "reusing", "getReusing", "setReusing", "resetReusing", "getResetReusing", "setResetReusing", "paused", "getPaused", "setPaused", "resuming", "getResuming", "setResuming", "defaultsInScope", "getDefaultsInScope", "setDefaultsInScope", "defaultsInvalid", "getDefaultsInvalid", "setDefaultsInvalid", "requiresRecompose", "getRequiresRecompose", "setRequiresRecompose", "block", "Lkotlin/Function2;", "Landroidx/compose/runtime/Composer;", "", "compose", "composer", "invalidateForResult", "Landroidx/compose/runtime/InvalidationResult;", "", "release", "adoptedBy", "invalidate", "updateScope", "currentToken", "trackedInstances", "Landroidx/collection/MutableObjectIntMap;", "trackedDependencies", "Landroidx/collection/MutableScatterMap;", "Landroidx/compose/runtime/DerivedState;", "rereading", "getRereading", "setRereading", "forcedRecompose", "getForcedRecompose", "setForcedRecompose", "skipped", "getSkipped$runtime", "setSkipped", "start", "token", "scopeSkipped", "recordRead", AlexaEventBundleKeys.INSTANCE, "recordDerivedStateValue", "isConditional", "isInvalidFor", "instances", "checkDerivedStateChanged", SmartFragmentContent.DEPENDENCIES, "rereadTrackedInstances", "end", "Lkotlin/Function1;", "Landroidx/compose/runtime/Composition;", "getFlag", "flag", "setFlag", "Companion", SmartFragmentContent.RUNTIME}, k = 1, mv = {2, 0, 0}, xi = 48)
|
|
@SourceDebugExtension({"SMAP\nRecomposeScopeImpl.kt\nKotlin\n*S Kotlin\n*F\n+ 1 RecomposeScopeImpl.kt\nandroidx/compose/runtime/RecomposeScopeImpl\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterSet.kt\nandroidx/collection/ScatterSet\n+ 4 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 5 ObjectIntMap.kt\nandroidx/collection/ObjectIntMap\n+ 6 ObjectIntMap.kt\nandroidx/collection/MutableObjectIntMap\n*L\n1#1,442:1\n405#1:443\n409#1,8:444\n405#1:452\n409#1,8:453\n405#1:461\n409#1,8:462\n405#1:470\n409#1,8:471\n405#1:479\n409#1,8:480\n405#1:488\n409#1,8:489\n405#1:497\n409#1,8:498\n405#1:506\n409#1,8:507\n405#1:515\n409#1,8:516\n405#1:524\n409#1,8:525\n405#1:533\n409#1,8:534\n1#2:542\n256#3,2:543\n231#3,3:545\n200#3,7:548\n211#3,3:556\n214#3,9:560\n234#3:569\n258#3:570\n1399#4:555\n1270#4:559\n1399#4:581\n1270#4:585\n1399#4:607\n1270#4:611\n1399#4:630\n1270#4:634\n395#5,4:571\n367#5,6:575\n377#5,3:582\n380#5,9:586\n399#5:595\n423#5:596\n395#5,4:597\n367#5,6:601\n377#5,3:608\n380#5,9:612\n399#5:621\n424#5:622\n367#5,6:624\n377#5,3:631\n380#5,2:635\n383#5,6:641\n775#6:623\n777#6,4:637\n781#6:647\n*S KotlinDebug\n*F\n+ 1 RecomposeScopeImpl.kt\nandroidx/compose/runtime/RecomposeScopeImpl\n*L\n114#1:443\n116#1:444,8\n124#1:452\n126#1:453,8\n134#1:461\n136#1:462,8\n141#1:470\n143#1:471,8\n148#1:479\n150#1:480,8\n160#1:488\n162#1:489,8\n170#1:497\n172#1:498,8\n181#1:506\n183#1:507,8\n248#1:515\n250#1:516,8\n259#1:524\n261#1:525,8\n266#1:533\n268#1:534,8\n339#1:543,2\n339#1:545,3\n339#1:548,7\n339#1:556,3\n339#1:560,9\n339#1:569\n339#1:570\n339#1:555\n339#1:559\n361#1:581\n361#1:585\n381#1:607\n381#1:611\n388#1:630\n388#1:634\n361#1:571,4\n361#1:575,6\n361#1:582,3\n361#1:586,9\n361#1:595\n381#1:596\n381#1:597,4\n381#1:601,6\n381#1:608,3\n381#1:612,9\n381#1:621\n381#1:622\n388#1:624,6\n388#1:631,3\n388#1:635,2\n388#1:641,6\n388#1:623\n388#1:637,4\n388#1:647\n*E\n"})
|
|
/* loaded from: classes13.dex */
|
|
public final class RecomposeScopeImpl implements ScopeUpdateScope, RecomposeScope {
|
|
|
|
@Nullable
|
|
private Anchor anchor;
|
|
|
|
@Nullable
|
|
private Function2<? super Composer, ? super Integer, Unit> block;
|
|
private int currentToken;
|
|
private int flags;
|
|
|
|
@Nullable
|
|
private RecomposeScopeOwner owner;
|
|
|
|
@Nullable
|
|
private MutableScatterMap<DerivedState<?>, Object> trackedDependencies;
|
|
|
|
@Nullable
|
|
private MutableObjectIntMap<Object> trackedInstances;
|
|
|
|
/* renamed from: Companion, reason: from kotlin metadata */
|
|
@NotNull
|
|
public static final Companion INSTANCE = new Companion(null);
|
|
public static final int $stable = 8;
|
|
|
|
public RecomposeScopeImpl(@Nullable RecomposeScopeOwner recomposeScopeOwner) {
|
|
this.owner = recomposeScopeOwner;
|
|
}
|
|
|
|
private final boolean checkDerivedStateChanged(DerivedState<?> derivedState, MutableScatterMap<DerivedState<?>, Object> mutableScatterMap) {
|
|
derivedState.getClass();
|
|
SnapshotMutationPolicy<?> policy = derivedState.getPolicy();
|
|
if (policy == null) {
|
|
policy = SnapshotStateKt.structuralEqualityPolicy();
|
|
}
|
|
return !policy.equivalent(derivedState.getCurrentRecord().getCurrentValue(), mutableScatterMap.get(derivedState));
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public static final Unit end$lambda$9$lambda$8(RecomposeScopeImpl recomposeScopeImpl, int i, MutableObjectIntMap mutableObjectIntMap, Composition composition) {
|
|
int i2;
|
|
if (recomposeScopeImpl.currentToken == i && Intrinsics.areEqual(mutableObjectIntMap, recomposeScopeImpl.trackedInstances) && (composition instanceof CompositionImpl)) {
|
|
long[] jArr = mutableObjectIntMap.metadata;
|
|
int length = jArr.length - 2;
|
|
if (length >= 0) {
|
|
int i3 = 0;
|
|
while (true) {
|
|
long j = jArr[i3];
|
|
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
|
|
int i4 = 8;
|
|
int i5 = 8 - ((~(i3 - length)) >>> 31);
|
|
int i6 = 0;
|
|
while (i6 < i5) {
|
|
if ((255 & j) < 128) {
|
|
int i7 = (i3 << 3) + i6;
|
|
Object obj = mutableObjectIntMap.keys[i7];
|
|
boolean z = mutableObjectIntMap.values[i7] != i;
|
|
if (z) {
|
|
CompositionImpl compositionImpl = (CompositionImpl) composition;
|
|
compositionImpl.removeObservation$runtime(obj, recomposeScopeImpl);
|
|
i2 = i4;
|
|
if (obj instanceof DerivedState) {
|
|
compositionImpl.removeDerivedStateObservation$runtime((DerivedState) obj);
|
|
MutableScatterMap<DerivedState<?>, Object> mutableScatterMap = recomposeScopeImpl.trackedDependencies;
|
|
if (mutableScatterMap != 0) {
|
|
mutableScatterMap.remove(obj);
|
|
}
|
|
}
|
|
} else {
|
|
i2 = i4;
|
|
}
|
|
if (z) {
|
|
mutableObjectIntMap.removeValueAt(i7);
|
|
}
|
|
} else {
|
|
i2 = i4;
|
|
}
|
|
j >>= i2;
|
|
i6++;
|
|
i4 = i2;
|
|
}
|
|
if (i5 != i4) {
|
|
break;
|
|
}
|
|
}
|
|
if (i3 == length) {
|
|
break;
|
|
}
|
|
i3++;
|
|
}
|
|
}
|
|
}
|
|
return Unit.INSTANCE;
|
|
}
|
|
|
|
private final boolean getFlag(int flag) {
|
|
return (this.flags & flag) != 0;
|
|
}
|
|
|
|
private final boolean getRereading() {
|
|
return (this.flags & 32) != 0;
|
|
}
|
|
|
|
private final void setFlag(int flag, boolean value) {
|
|
int i = this.flags;
|
|
this.flags = value ? flag | i : (~flag) & i;
|
|
}
|
|
|
|
private final void setRereading(boolean z) {
|
|
int i = this.flags;
|
|
this.flags = z ? i | 32 : i & (-33);
|
|
}
|
|
|
|
private final void setSkipped(boolean z) {
|
|
int i = this.flags;
|
|
this.flags = z ? i | 16 : i & (-17);
|
|
}
|
|
|
|
public final void adoptedBy(@NotNull RecomposeScopeOwner owner) {
|
|
this.owner = owner;
|
|
}
|
|
|
|
public final void compose(@NotNull Composer composer) {
|
|
Function2<? super Composer, ? super Integer, Unit> function2 = this.block;
|
|
if (function2 != null) {
|
|
function2.invoke(composer, 1);
|
|
} else {
|
|
Single$$ExternalSyntheticBUOutline0.m$2("Invalid restart scope");
|
|
}
|
|
}
|
|
|
|
@Nullable
|
|
public final Function1<Composition, Unit> end(int token) {
|
|
MutableObjectIntMap<Object> mutableObjectIntMap = this.trackedInstances;
|
|
if (mutableObjectIntMap == null || getSkipped$runtime()) {
|
|
return null;
|
|
}
|
|
Object[] objArr = mutableObjectIntMap.keys;
|
|
int[] iArr = mutableObjectIntMap.values;
|
|
long[] jArr = mutableObjectIntMap.metadata;
|
|
int length = jArr.length - 2;
|
|
if (length < 0) {
|
|
return null;
|
|
}
|
|
int i = 0;
|
|
while (true) {
|
|
long j = jArr[i];
|
|
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
|
|
int i2 = 8 - ((~(i - length)) >>> 31);
|
|
for (int i3 = 0; i3 < i2; i3++) {
|
|
if ((255 & j) < 128) {
|
|
int i4 = (i << 3) + i3;
|
|
Object obj = objArr[i4];
|
|
if (iArr[i4] != token) {
|
|
return new RecomposeScopeImpl$$ExternalSyntheticLambda0(this, token, mutableObjectIntMap, 0);
|
|
}
|
|
}
|
|
j >>= 8;
|
|
}
|
|
if (i2 != 8) {
|
|
return null;
|
|
}
|
|
}
|
|
if (i == length) {
|
|
return null;
|
|
}
|
|
i++;
|
|
}
|
|
}
|
|
|
|
@Nullable
|
|
public final Anchor getAnchor() {
|
|
return this.anchor;
|
|
}
|
|
|
|
public final boolean getCanRecompose() {
|
|
return this.block != null;
|
|
}
|
|
|
|
public final boolean getDefaultsInScope() {
|
|
return (this.flags & 2) != 0;
|
|
}
|
|
|
|
public final boolean getDefaultsInvalid() {
|
|
return (this.flags & 4) != 0;
|
|
}
|
|
|
|
public final boolean getForcedRecompose() {
|
|
return (this.flags & 64) != 0;
|
|
}
|
|
|
|
@Nullable
|
|
/* renamed from: getOwner$runtime, reason: from getter */
|
|
public final RecomposeScopeOwner getOwner() {
|
|
return this.owner;
|
|
}
|
|
|
|
public final boolean getPaused() {
|
|
return (this.flags & 256) != 0;
|
|
}
|
|
|
|
public final boolean getRequiresRecompose() {
|
|
return (this.flags & 8) != 0;
|
|
}
|
|
|
|
public final boolean getResetReusing() {
|
|
return (this.flags & 1024) != 0;
|
|
}
|
|
|
|
public final boolean getResuming() {
|
|
return (this.flags & 512) != 0;
|
|
}
|
|
|
|
public final boolean getReusing() {
|
|
return (this.flags & 128) != 0;
|
|
}
|
|
|
|
public final boolean getSkipped$runtime() {
|
|
return (this.flags & 16) != 0;
|
|
}
|
|
|
|
public final boolean getUsed() {
|
|
return (this.flags & 1) != 0;
|
|
}
|
|
|
|
public final boolean getValid() {
|
|
if (this.owner != null) {
|
|
Anchor anchor = this.anchor;
|
|
if (anchor != null ? anchor.getValid() : false) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
@Override // androidx.compose.runtime.RecomposeScope
|
|
public void invalidate() {
|
|
RecomposeScopeOwner recomposeScopeOwner = this.owner;
|
|
if (recomposeScopeOwner != null) {
|
|
recomposeScopeOwner.invalidate(this, null);
|
|
}
|
|
}
|
|
|
|
@NotNull
|
|
public final InvalidationResult invalidateForResult(@Nullable Object value) {
|
|
InvalidationResult invalidate;
|
|
RecomposeScopeOwner recomposeScopeOwner = this.owner;
|
|
return (recomposeScopeOwner == null || (invalidate = recomposeScopeOwner.invalidate(this, value)) == null) ? InvalidationResult.IGNORED : invalidate;
|
|
}
|
|
|
|
public final boolean isConditional() {
|
|
return this.trackedDependencies != null;
|
|
}
|
|
|
|
public final boolean isInvalidFor(@Nullable Object instances) {
|
|
MutableScatterMap<DerivedState<?>, Object> mutableScatterMap;
|
|
if (instances == null || (mutableScatterMap = this.trackedDependencies) == null) {
|
|
return true;
|
|
}
|
|
if (instances instanceof DerivedState) {
|
|
return checkDerivedStateChanged((DerivedState) instances, mutableScatterMap);
|
|
}
|
|
if (!(instances instanceof ScatterSet)) {
|
|
return true;
|
|
}
|
|
ScatterSet scatterSet = (ScatterSet) instances;
|
|
if (scatterSet.isNotEmpty()) {
|
|
Object[] objArr = scatterSet.elements;
|
|
long[] jArr = scatterSet.metadata;
|
|
int length = jArr.length - 2;
|
|
if (length >= 0) {
|
|
int i = 0;
|
|
loop0: while (true) {
|
|
long j = jArr[i];
|
|
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
|
|
int i2 = 8 - ((~(i - length)) >>> 31);
|
|
for (int i3 = 0; i3 < i2; i3++) {
|
|
if ((255 & j) < 128) {
|
|
Object obj = objArr[(i << 3) + i3];
|
|
if (!(obj instanceof DerivedState) || checkDerivedStateChanged((DerivedState) obj, mutableScatterMap)) {
|
|
break loop0;
|
|
}
|
|
}
|
|
j >>= 8;
|
|
}
|
|
if (i2 != 8) {
|
|
break;
|
|
}
|
|
}
|
|
if (i == length) {
|
|
break;
|
|
}
|
|
i++;
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public final void recordDerivedStateValue(@NotNull DerivedState<?> instance, @Nullable Object value) {
|
|
MutableScatterMap<DerivedState<?>, Object> mutableScatterMap = this.trackedDependencies;
|
|
if (mutableScatterMap == null) {
|
|
mutableScatterMap = new MutableScatterMap<>(0, 1, null);
|
|
this.trackedDependencies = mutableScatterMap;
|
|
}
|
|
mutableScatterMap.set(instance, value);
|
|
}
|
|
|
|
public final boolean recordRead(@NotNull Object instance) {
|
|
int i = 0;
|
|
if (getRereading()) {
|
|
return false;
|
|
}
|
|
MutableObjectIntMap<Object> mutableObjectIntMap = this.trackedInstances;
|
|
int i2 = 1;
|
|
if (mutableObjectIntMap == null) {
|
|
mutableObjectIntMap = new MutableObjectIntMap<>(i, i2, null);
|
|
this.trackedInstances = mutableObjectIntMap;
|
|
}
|
|
return mutableObjectIntMap.put(instance, this.currentToken, -1) == this.currentToken;
|
|
}
|
|
|
|
public final void release() {
|
|
RecomposeScopeOwner recomposeScopeOwner = this.owner;
|
|
if (recomposeScopeOwner != null) {
|
|
recomposeScopeOwner.recomposeScopeReleased(this);
|
|
}
|
|
this.owner = null;
|
|
this.trackedInstances = null;
|
|
this.trackedDependencies = null;
|
|
this.block = null;
|
|
}
|
|
|
|
public final void rereadTrackedInstances() {
|
|
MutableObjectIntMap<Object> mutableObjectIntMap;
|
|
RecomposeScopeOwner recomposeScopeOwner = this.owner;
|
|
if (recomposeScopeOwner == null || (mutableObjectIntMap = this.trackedInstances) == null) {
|
|
return;
|
|
}
|
|
setRereading(true);
|
|
try {
|
|
Object[] objArr = mutableObjectIntMap.keys;
|
|
int[] iArr = mutableObjectIntMap.values;
|
|
long[] jArr = mutableObjectIntMap.metadata;
|
|
int length = jArr.length - 2;
|
|
if (length >= 0) {
|
|
int i = 0;
|
|
while (true) {
|
|
long j = jArr[i];
|
|
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
|
|
int i2 = 8 - ((~(i - length)) >>> 31);
|
|
for (int i3 = 0; i3 < i2; i3++) {
|
|
if ((255 & j) < 128) {
|
|
int i4 = (i << 3) + i3;
|
|
Object obj = objArr[i4];
|
|
int i5 = iArr[i4];
|
|
recomposeScopeOwner.recordReadOf(obj);
|
|
}
|
|
j >>= 8;
|
|
}
|
|
if (i2 != 8) {
|
|
break;
|
|
}
|
|
}
|
|
if (i == length) {
|
|
break;
|
|
} else {
|
|
i++;
|
|
}
|
|
}
|
|
}
|
|
} finally {
|
|
setRereading(false);
|
|
}
|
|
}
|
|
|
|
public final void scopeSkipped() {
|
|
if (getReusing()) {
|
|
return;
|
|
}
|
|
setSkipped(true);
|
|
}
|
|
|
|
public final void setAnchor(@Nullable Anchor anchor) {
|
|
this.anchor = anchor;
|
|
}
|
|
|
|
public final void setDefaultsInScope(boolean z) {
|
|
int i = this.flags;
|
|
this.flags = z ? i | 2 : i & (-3);
|
|
}
|
|
|
|
public final void setDefaultsInvalid(boolean z) {
|
|
int i = this.flags;
|
|
this.flags = z ? i | 4 : i & (-5);
|
|
}
|
|
|
|
public final void setForcedRecompose(boolean z) {
|
|
int i = this.flags;
|
|
this.flags = z ? i | 64 : i & (-65);
|
|
}
|
|
|
|
public final void setOwner$runtime(@Nullable RecomposeScopeOwner recomposeScopeOwner) {
|
|
this.owner = recomposeScopeOwner;
|
|
}
|
|
|
|
public final void setPaused(boolean z) {
|
|
int i = this.flags;
|
|
this.flags = z ? i | 256 : i & (-257);
|
|
}
|
|
|
|
public final void setRequiresRecompose(boolean z) {
|
|
int i = this.flags;
|
|
this.flags = z ? i | 8 : i & (-9);
|
|
}
|
|
|
|
public final void setResetReusing(boolean z) {
|
|
int i = this.flags;
|
|
this.flags = z ? i | 1024 : i & (-1025);
|
|
}
|
|
|
|
public final void setResuming(boolean z) {
|
|
int i = this.flags;
|
|
this.flags = z ? i | 512 : i & (-513);
|
|
}
|
|
|
|
public final void setReusing(boolean z) {
|
|
int i = this.flags;
|
|
this.flags = z ? i | 128 : i & (-129);
|
|
}
|
|
|
|
public final void setUsed(boolean z) {
|
|
int i = this.flags;
|
|
this.flags = z ? i | 1 : i & (-2);
|
|
}
|
|
|
|
public final void start(int token) {
|
|
this.currentToken = token;
|
|
setSkipped(false);
|
|
}
|
|
|
|
@Override // androidx.compose.runtime.ScopeUpdateScope
|
|
public void updateScope(@NotNull Function2<? super Composer, ? super Integer, Unit> block) {
|
|
this.block = block;
|
|
}
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003J+\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u00072\f\u0010\b\u001a\b\u0012\u0004\u0012\u00020\n0\t2\u0006\u0010\u000b\u001a\u00020\fH\u0000¢\u0006\u0002\b\rJ#\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\u0006\u001a\u00020\u00102\f\u0010\b\u001a\b\u0012\u0004\u0012\u00020\n0\tH\u0000¢\u0006\u0002\b\u0011¨\u0006\u0012"}, d2 = {"Landroidx/compose/runtime/RecomposeScopeImpl$Companion;", "", "<init>", "()V", "adoptAnchoredScopes", "", "slots", "Landroidx/compose/runtime/SlotWriter;", "anchors", "", "Landroidx/compose/runtime/Anchor;", "newOwner", "Landroidx/compose/runtime/RecomposeScopeOwner;", "adoptAnchoredScopes$runtime", "hasAnchoredRecomposeScopes", "", "Landroidx/compose/runtime/SlotTable;", "hasAnchoredRecomposeScopes$runtime", SmartFragmentContent.RUNTIME}, k = 1, mv = {2, 0, 0}, xi = 48)
|
|
@SourceDebugExtension({"SMAP\nRecomposeScopeImpl.kt\nKotlin\n*S Kotlin\n*F\n+ 1 RecomposeScopeImpl.kt\nandroidx/compose/runtime/RecomposeScopeImpl$Companion\n+ 2 ListUtils.kt\nandroidx/compose/runtime/snapshots/ListUtilsKt\n*L\n1#1,442:1\n34#2,5:443\n91#2:448\n34#2,5:449\n92#2:454\n*S KotlinDebug\n*F\n+ 1 RecomposeScopeImpl.kt\nandroidx/compose/runtime/RecomposeScopeImpl$Companion\n*L\n425#1:443,5\n436#1:448\n436#1:449,5\n436#1:454\n*E\n"})
|
|
public static final class Companion {
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
public final void adoptAnchoredScopes$runtime(@NotNull SlotWriter slots, @NotNull List<Anchor> anchors, @NotNull RecomposeScopeOwner newOwner) {
|
|
List<Anchor> list = anchors;
|
|
if (list.isEmpty()) {
|
|
return;
|
|
}
|
|
int size = list.size();
|
|
for (int i = 0; i < size; i++) {
|
|
Object slot = slots.slot(anchors.get(i), 0);
|
|
RecomposeScopeImpl recomposeScopeImpl = slot instanceof RecomposeScopeImpl ? (RecomposeScopeImpl) slot : null;
|
|
if (recomposeScopeImpl != null) {
|
|
recomposeScopeImpl.adoptedBy(newOwner);
|
|
}
|
|
}
|
|
}
|
|
|
|
public final boolean hasAnchoredRecomposeScopes$runtime(@NotNull SlotTable slots, @NotNull List<Anchor> anchors) {
|
|
List<Anchor> list = anchors;
|
|
if (!list.isEmpty()) {
|
|
int size = list.size();
|
|
for (int i = 0; i < size; i++) {
|
|
Anchor anchor = anchors.get(i);
|
|
if (slots.ownsAnchor(anchor) && (slots.slot$runtime(slots.anchorIndex(anchor), 0) instanceof RecomposeScopeImpl)) {
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
private Companion() {
|
|
}
|
|
}
|
|
}
|