Interface JitType.SimpleJitType<T extends Types.BPrim<?>,JT extends JitType.SimpleJitType<T,JT>>

Type Parameters:
T - the JVM type for this JIT type
JT - this JIT type (recursive)
All Superinterfaces:
JitType, JitType.LeggedJitType<T,JT>
All Known Implementing Classes:
JitType.DoubleJitType, JitType.FloatJitType, JitType.IntJitType, JitType.LongJitType
Enclosing interface:
JitType

public static interface JitType.SimpleJitType<T extends Types.BPrim<?>,JT extends JitType.SimpleJitType<T,JT>> extends JitType.LeggedJitType<T,JT>
A p-code type that can be represented in a single JVM variable.
  • Method Details

    • forJavaType

      static <T extends Types.BPrim<?>, JT extends JitType.SimpleJitType<T, JT>> JT forJavaType(Class<?> cls)
      Identify the p-code type that is exactly represented by the given JVM type.

      This is used during Direct userop invocation to convert the arguments and return value.

      Parameters:
      cls - the primitive class (not boxed)
      Returns:
      the p-code type
      See Also:
    • bType

      T bType()
      The JVM type of the variable that can represent a p-code variable of this type
      Returns:
      the primitive type (not boxed)
    • asInt

      JitType.SimpleJitType<?,?> asInt()
      Re-apply the integer behavior to this type

      This may be slightly faster than JitTypeBehavior.INTEGER.resolve(this), because each type can pick its int type directly, and integer types can just return this.

      Returns:
      this type as an int
    • ext

      Description copied from interface: JitType
      Extend this p-code type to the p-code type that fills its entire host JVM type.

      This is useful, e.g., when multiplying two int3 values using imul that the result might be an int4 and so may need additional conversion.

      Specified by:
      ext in interface JitType
      Returns:
      the extended type