blob: c3474af42d62c225d19bd32409adbb168af2b671 [file] [log] [blame]
// Copyright (c) 2021, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.ir.analysis.fieldaccess.state;
import com.android.tools.r8.ir.analysis.value.AbstractValue;
import com.android.tools.r8.ir.analysis.value.AbstractValueFactory;
/** Used to represent the state for fields that have never been assigned in the program. */
public class BottomFieldState extends FieldState {
private static final BottomFieldState INSTANCE = new BottomFieldState();
private BottomFieldState() {}
public static BottomFieldState getInstance() {
return INSTANCE;
}
@Override
public AbstractValue getAbstractValue(AbstractValueFactory abstractValueFactory) {
return abstractValueFactory.createNullValue();
}
@Override
public boolean isBottom() {
return true;
}
}