static Value *emit_cglobal(jl_value_t **args, size_t nargs, jl_codectx_t *ctx) { JL_NARGS(cglobal, 1, 2); jl_value_t *rt=NULL; Value *res; JL_GC_PUSH1(&rt); if (nargs == 2) { JL_TRY { rt = jl_interpret_toplevel_expr_in(ctx->module, args[2], jl_svec_data(ctx->sp), jl_svec_len(ctx->sp)/2); } JL_CATCH { jl_rethrow_with_add("error interpreting cglobal type"); } JL_TYPECHK(cglobal, type, rt); rt = (jl_value_t*)jl_apply_type((jl_value_t*)jl_pointer_type, jl_svec1(rt)); }
static jl_datatype_t* julia_type() { static jl_tvar_t* this_tvar = jl_new_typevar(jl_symbol("T"), (jl_value_t*)jl_bottom_type, (jl_value_t*)jl_any_type); return (jl_datatype_t*)jl_apply_type((jl_value_t*)jl_type_type, jl_svec1(jl_apply_type((jl_value_t*)jl_array_type, jl_svec2(this_tvar, jl_box_long(2))))); }