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 c82c4e8..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-package net.mograsim.plugin.asm.model;\r
-\r
-public interface AsmElement\r
-{\r
-       // only marker at the moment\r
-}\r
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 cbd2dd5..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-package net.mograsim.plugin.asm.model;\r
-\r
-import java.util.Objects;\r
-\r
-public final class AsmInstruction implements AsmElement\r
-{\r
-       private final AsmOperation operation;\r
-       private final AsmOperands operands;\r
-\r
-       public AsmInstruction(AsmOperation operation, AsmOperands operands)\r
-       {\r
-               this.operation = Objects.requireNonNull(operation);\r
-               this.operands = Objects.requireNonNull(operands);\r
-       }\r
-\r
-       @Override\r
-       public int hashCode()\r
-       {\r
-               return Objects.hash(operands, operation);\r
-       }\r
-\r
-       @Override\r
-       public boolean equals(Object obj)\r
-       {\r
-               if (this == obj)\r
-                       return true;\r
-               if (!(obj instanceof AsmInstruction))\r
-                       return false;\r
-               AsmInstruction other = (AsmInstruction) obj;\r
-               return Objects.equals(operands, other.operands) && Objects.equals(operation, other.operation);\r
-       }\r
-\r
-       @Override\r
-       public String toString()\r
-       {\r
-               return String.format("%s %s", operation, operands).trim();\r
-       }\r
-\r
-}\r
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 f92b3e4..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-package net.mograsim.plugin.asm.model;\r
-\r
-import java.util.Objects;\r
-\r
-public final class AsmLabel implements AsmElement\r
-{\r
-       private final String name;\r
-       private AsmInstruction inst;\r
-\r
-       public AsmLabel(String name)\r
-       {\r
-               this.name = Objects.requireNonNull(name);\r
-       }\r
-\r
-       public String getName()\r
-       {\r
-               return name;\r
-       }\r
-\r
-       public void setInst(AsmInstruction inst)\r
-       {\r
-               if (inst != null)\r
-                       throw new IllegalStateException("Instrution already set for " + name);\r
-               this.inst = inst;\r
-       }\r
-\r
-       @Override\r
-       public String toString()\r
-       {\r
-               return name + ":";\r
-       }\r
-\r
-       @Override\r
-       public int hashCode()\r
-       {\r
-               return Objects.hash(inst, name);\r
-       }\r
-\r
-       @Override\r
-       public boolean equals(Object obj)\r
-       {\r
-               if (this == obj)\r
-                       return true;\r
-               if (!(obj instanceof AsmLabel))\r
-                       return false;\r
-               AsmLabel other = (AsmLabel) obj;\r
-               return Objects.equals(inst, other.inst) && Objects.equals(name, other.name);\r
-       }\r
-}\r
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 7970f17..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-package net.mograsim.plugin.asm.model;\r
-\r
-public interface AsmOperand\r
-{\r
-\r
-}\r
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 c835f59..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-package net.mograsim.plugin.asm.model;\r
-\r
-import java.util.List;\r
-import java.util.Objects;\r
-import java.util.stream.Collectors;\r
-\r
-public final class AsmOperands\r
-{\r
-       private final List<AsmOperand> operands;\r
-\r
-       public AsmOperands(List<AsmOperand> operands)\r
-       {\r
-               this.operands = Objects.requireNonNull(operands);\r
-       }\r
-\r
-       public List<AsmOperand> getOperands()\r
-       {\r
-               return operands;\r
-       }\r
-\r
-       @Override\r
-       public int hashCode()\r
-       {\r
-               return operands.hashCode();\r
-       }\r
-\r
-       @Override\r
-       public boolean equals(Object obj)\r
-       {\r
-               if (this == obj)\r
-                       return true;\r
-               if (!(obj instanceof AsmOperands))\r
-                       return false;\r
-               AsmOperands other = (AsmOperands) obj;\r
-               return operands.equals(other.operands);\r
-       }\r
-\r
-       @Override\r
-       public String toString()\r
-       {\r
-               return operands.stream().map(AsmOperand::toString).collect(Collectors.joining(", "));\r
-       }\r
-}\r
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 1228c16..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-package net.mograsim.plugin.asm.model;\r
-\r
-import java.util.Objects;\r
-\r
-public final class AsmOperation\r
-{\r
-       private final String mnemonic;\r
-\r
-       public AsmOperation(String mnemonic)\r
-       {\r
-               this.mnemonic = Objects.requireNonNull(mnemonic.toLowerCase());\r
-       }\r
-\r
-       public String getMnemonic()\r
-       {\r
-               return mnemonic;\r
-       }\r
-\r
-       @Override\r
-       public String toString()\r
-       {\r
-               return getMnemonic();\r
-       }\r
-\r
-       @Override\r
-       public int hashCode()\r
-       {\r
-               return mnemonic.hashCode();\r
-       }\r
-\r
-       @Override\r
-       public boolean equals(Object obj)\r
-       {\r
-               if (this == obj)\r
-                       return true;\r
-               if (!(obj instanceof AsmOperation))\r
-                       return false;\r
-               AsmOperation other = (AsmOperation) obj;\r
-               return mnemonic.equals(other.mnemonic);\r
-       }\r
-}\r
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 7aeceeb..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-package net.mograsim.plugin.asm.model;\r
-\r
-public class NumericOperand\r
-{\r
-\r
-}\r