-package org.simantics.scl.compiler.internal.codegen.types;\r
-\r
-\r
-import org.cojen.classfile.TypeDesc;\r
-import org.simantics.scl.compiler.elaboration.modules.TypeConstructor;\r
-import org.simantics.scl.compiler.types.TCon;\r
-import org.simantics.scl.compiler.types.TVar;\r
-import org.simantics.scl.compiler.types.Type;\r
-import org.simantics.scl.compiler.types.Types;\r
-import org.simantics.scl.compiler.types.kinds.Kinds;\r
-\r
-public class VectorType extends TypeConstructor {\r
- private static final TVar ELEMENT_TYPE = Types.var(Kinds.STAR);\r
- \r
- public VectorType(TCon constructor) {\r
- super(constructor, ELEMENT_TYPE);\r
- }\r
- \r
- @Override\r
- public TypeDesc construct(JavaTypeTranslator translator, Type[] parameters) {\r
- Type parameter = Types.canonical(parameters[0]);\r
- if(parameter instanceof TVar)\r
- return TypeDesc.OBJECT;\r
- else\r
- return translator.toTypeDesc(parameter).toArrayType();\r
- }\r
-\r
-}\r
+package org.simantics.scl.compiler.internal.codegen.types;
+
+
+import org.cojen.classfile.TypeDesc;
+import org.simantics.scl.compiler.elaboration.modules.TypeConstructor;
+import org.simantics.scl.compiler.types.TCon;
+import org.simantics.scl.compiler.types.TVar;
+import org.simantics.scl.compiler.types.Type;
+import org.simantics.scl.compiler.types.Types;
+import org.simantics.scl.compiler.types.kinds.Kinds;
+
+public class VectorType extends TypeConstructor {
+ private static final TVar ELEMENT_TYPE = Types.var(Kinds.STAR);
+
+ public VectorType(TCon constructor) {
+ super(constructor, ELEMENT_TYPE);
+ }
+
+ @Override
+ public TypeDesc construct(JavaTypeTranslator translator, Type[] parameters) {
+ Type parameter = Types.canonical(parameters[0]);
+ if(parameter instanceof TVar)
+ return TypeDesc.OBJECT;
+ else
+ return translator.toTypeDesc(parameter).toArrayType();
+ }
+
+}