]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/constants/generic/ParameterStackItem.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / constants / generic / ParameterStackItem.java
diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/constants/generic/ParameterStackItem.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/constants/generic/ParameterStackItem.java
new file mode 100644 (file)
index 0000000..35c6ba0
--- /dev/null
@@ -0,0 +1,25 @@
+package org.simantics.scl.compiler.constants.generic;\r
+\r
+import org.simantics.scl.compiler.internal.codegen.references.Val;\r
+import org.simantics.scl.compiler.internal.codegen.utils.MethodBuilder;\r
+import org.simantics.scl.compiler.types.Type;\r
+\r
+public class ParameterStackItem implements StackItem {\r
+\r
+    int id;\r
+    Type type;\r
+    \r
+    public ParameterStackItem(int id, Type type) {\r
+        this.id = id;\r
+        this.type = type;\r
+    }\r
+\r
+    @Override\r
+    public void push(MethodBuilder mb, Val[] parameters) {\r
+        mb.push(parameters[id], type);\r
+    }\r
\r
+    @Override\r
+    public void prepare(MethodBuilder mb) {\r
+    }\r
+}\r