X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Finternal%2Fcodegen%2Ftypes%2FVectorType.java;h=de3469be65f2dd63d4ef32eb4e64923957be40f1;hb=66ced93f835205135a84fea73b2fbb8e9d610f7e;hp=04df8c4011023500e930be6675ce5875c4cbd22e;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/types/VectorType.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/types/VectorType.java index 04df8c401..de3469be6 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/types/VectorType.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/types/VectorType.java @@ -1,28 +1,28 @@ -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(); - } - -} +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(); + } + +}