X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.machine%2Fsrc%2Fnet%2Fmograsim%2Fmachine%2Fisa%2FAsmLabel.java;fp=net.mograsim.machine%2Fsrc%2Fnet%2Fmograsim%2Fmachine%2Fisa%2FAsmLabel.java;h=0000000000000000000000000000000000000000;hb=7d05144c25daa53e60fc9ed9fd503546a86567f8;hp=ddb56582cd9944320e252d1489fe2670fa7643c0;hpb=8bed58cd47f4e53a0a83e066d38864aa6875502f;p=Mograsim.git diff --git a/net.mograsim.machine/src/net/mograsim/machine/isa/AsmLabel.java b/net.mograsim.machine/src/net/mograsim/machine/isa/AsmLabel.java deleted file mode 100644 index ddb56582..00000000 --- a/net.mograsim.machine/src/net/mograsim/machine/isa/AsmLabel.java +++ /dev/null @@ -1,49 +0,0 @@ -package net.mograsim.machine.isa; - -import java.util.Objects; - -public final class AsmLabel implements AsmElement -{ - private final String name; - private AsmInstruction inst; - - public AsmLabel(String name) - { - this.name = Objects.requireNonNull(name); - } - - public String getName() - { - return name; - } - - public void setInst(AsmInstruction inst) - { - if (inst != null) - throw new IllegalStateException("Instrution already set for " + name); - this.inst = inst; - } - - @Override - public String toString() - { - return name + ":"; - } - - @Override - public int hashCode() - { - return Objects.hash(inst, name); - } - - @Override - public boolean equals(Object obj) - { - if (this == obj) - return true; - if (!(obj instanceof AsmLabel)) - return false; - AsmLabel other = (AsmLabel) obj; - return Objects.equals(inst, other.inst) && Objects.equals(name, other.name); - } -}