Classes will move and be reworked in the net.mograsim.machine plugin
authorChristian Femers <femers@in.tum.de>
Thu, 11 Jul 2019 19:59:27 +0000 (21:59 +0200)
committerChristian Femers <femers@in.tum.de>
Thu, 11 Jul 2019 19:59:27 +0000 (21:59 +0200)
net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmElement.java [deleted file]
net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmInstruction.java [deleted file]
net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmLabel.java [deleted file]
net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmOperand.java [deleted file]
net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmOperands.java [deleted file]
net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmOperation.java [deleted file]
net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/NumericOperand.java [deleted file]

diff --git a/net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmElement.java b/net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmElement.java
deleted file mode 100644 (file)
index 832984f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-package net.mograsim.plugin.asm.model;
-
-public interface AsmElement
-{
-       // only marker at the moment
-}
diff --git a/net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmInstruction.java b/net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmInstruction.java
deleted file mode 100644 (file)
index 1591e21..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-package net.mograsim.plugin.asm.model;
-
-import java.util.Objects;
-
-public final class AsmInstruction implements AsmElement
-{
-       private final AsmOperation operation;
-       private final AsmOperands operands;
-
-       public AsmInstruction(AsmOperation operation, AsmOperands operands)
-       {
-               this.operation = Objects.requireNonNull(operation);
-               this.operands = Objects.requireNonNull(operands);
-       }
-
-       @Override
-       public int hashCode()
-       {
-               return Objects.hash(operands, operation);
-       }
-
-       @Override
-       public boolean equals(Object obj)
-       {
-               if (this == obj)
-                       return true;
-               if (!(obj instanceof AsmInstruction))
-                       return false;
-               AsmInstruction other = (AsmInstruction) obj;
-               return Objects.equals(operands, other.operands) && Objects.equals(operation, other.operation);
-       }
-
-       @Override
-       public String toString()
-       {
-               return String.format("%s %s", operation, operands).trim();
-       }
-
-}
diff --git a/net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmLabel.java b/net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmLabel.java
deleted file mode 100644 (file)
index eb25f53..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-package net.mograsim.plugin.asm.model;
-
-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);
-       }
-}
diff --git a/net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmOperand.java b/net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmOperand.java
deleted file mode 100644 (file)
index 5c3a202..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-package net.mograsim.plugin.asm.model;
-
-public interface AsmOperand
-{
-
-}
diff --git a/net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmOperands.java b/net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmOperands.java
deleted file mode 100644 (file)
index 8e5b475..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-package net.mograsim.plugin.asm.model;
-
-import java.util.List;
-import java.util.Objects;
-import java.util.stream.Collectors;
-
-public final class AsmOperands
-{
-       private final List<AsmOperand> operands;
-
-       public AsmOperands(List<AsmOperand> operands)
-       {
-               this.operands = Objects.requireNonNull(operands);
-       }
-
-       public List<AsmOperand> getOperands()
-       {
-               return operands;
-       }
-
-       @Override
-       public int hashCode()
-       {
-               return operands.hashCode();
-       }
-
-       @Override
-       public boolean equals(Object obj)
-       {
-               if (this == obj)
-                       return true;
-               if (!(obj instanceof AsmOperands))
-                       return false;
-               AsmOperands other = (AsmOperands) obj;
-               return operands.equals(other.operands);
-       }
-
-       @Override
-       public String toString()
-       {
-               return operands.stream().map(AsmOperand::toString).collect(Collectors.joining(", "));
-       }
-}
diff --git a/net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmOperation.java b/net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/AsmOperation.java
deleted file mode 100644 (file)
index 248fcb1..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-package net.mograsim.plugin.asm.model;
-
-import java.util.Objects;
-
-public final class AsmOperation
-{
-       private final String mnemonic;
-
-       public AsmOperation(String mnemonic)
-       {
-               this.mnemonic = Objects.requireNonNull(mnemonic.toLowerCase());
-       }
-
-       public String getMnemonic()
-       {
-               return mnemonic;
-       }
-
-       @Override
-       public String toString()
-       {
-               return getMnemonic();
-       }
-
-       @Override
-       public int hashCode()
-       {
-               return mnemonic.hashCode();
-       }
-
-       @Override
-       public boolean equals(Object obj)
-       {
-               if (this == obj)
-                       return true;
-               if (!(obj instanceof AsmOperation))
-                       return false;
-               AsmOperation other = (AsmOperation) obj;
-               return mnemonic.equals(other.mnemonic);
-       }
-}
diff --git a/net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/NumericOperand.java b/net.mograsim.plugin.core/src/net/mograsim/plugin/asm/model/NumericOperand.java
deleted file mode 100644 (file)
index 8391067..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-package net.mograsim.plugin.asm.model;
-
-public class NumericOperand
-{
-
-}