def emit(builder): v = llvm.ConstNull(self.llvm_type) for i, e in enumerate(elements): llvm_i = _index(builder, const_index(i)) cast_e, _ = cast(e, self.element_type).emit(builder) v = llvm.BuildInsertElement(builder, v, cast_e, llvm_i, "v.init") return v, self
def __call__(self, v): """Nicer equivalent to ``cast(v, Type)``""" from nitrous.lib import cast return cast(v, self)
def x(y): return cast(y, Double)
def int_to_long(a): return cast(a, Byte)
def div_double(a, b): return cast(a, Double) / b
def int_to_long(a): return cast(a, Int)
def div_long(a, b): return a / cast(b, Long)
def int_to_long(a): return cast(a, Long)
def float_to_double(a): return cast(a, Double)
def double_to_float(a): return cast(a, Float)