diff --git a/cl/_testdata/print/out.ll b/cl/_testdata/print/out.ll index 747740a6f..237596986 100644 --- a/cl/_testdata/print/out.ll +++ b/cl/_testdata/print/out.ll @@ -5,8 +5,8 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } %main.stringStruct = type { ptr, i64 } %main.slice = type { ptr, i64, i64 } -%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr } +%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } @"main.init$guard" = global i1 false, align 1 @main.minhexdigits = global i64 0, align 8 @@ -144,373 +144,293 @@ _llgo_0: call void @main.prinfsub(double 1.001000e+02) call void @main.printnl() %6 = load ptr, ptr @_llgo_float32, align 8 - %7 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %6, i32 0, i32 6 - %8 = load i8, ptr %7, align 1 - %9 = or i8 %8, 32 - store i8 %9, ptr %7, align 1 - %10 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %11 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %10, i32 0, i32 0 - store ptr %6, ptr %11, align 8 - %12 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %10, i32 0, i32 1 - store ptr inttoptr (i32 1315859240 to ptr), ptr %12, align 8 - %13 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %10, align 8 - call void @main.printany(%"github.com/goplus/llgo/internal/runtime.eface" %13) + %7 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %8 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %7, i32 0, i32 0 + store ptr %6, ptr %8, align 8 + %9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %7, i32 0, i32 1 + store ptr inttoptr (i32 1315859240 to ptr), ptr %9, align 8 + %10 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %7, align 8 + call void @main.printany(%"github.com/goplus/llgo/internal/runtime.eface" %10) call void @main.printnl() - %14 = load ptr, ptr @_llgo_float64, align 8 - %15 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %14, i32 0, i32 6 - %16 = load i8, ptr %15, align 1 - %17 = or i8 %16, 32 - store i8 %17, ptr %15, align 1 - %18 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %19 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %18, i32 0, i32 0 - store ptr %14, ptr %19, align 8 - %20 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %18, i32 0, i32 1 - store ptr inttoptr (i64 4746175415993761792 to ptr), ptr %20, align 8 - %21 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %18, align 8 - call void @main.printany(%"github.com/goplus/llgo/internal/runtime.eface" %21) + %11 = load ptr, ptr @_llgo_float64, align 8 + %12 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %13 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %12, i32 0, i32 0 + store ptr %11, ptr %13, align 8 + %14 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %12, i32 0, i32 1 + store ptr inttoptr (i64 4746175415993761792 to ptr), ptr %14, align 8 + %15 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %12, align 8 + call void @main.printany(%"github.com/goplus/llgo/internal/runtime.eface" %15) call void @main.printnl() br i1 true, label %_llgo_3, label %_llgo_2 _llgo_1: ; preds = %_llgo_3 - %22 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 32) - %23 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %22, i64 0 - %24 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %25 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %24, i32 0, i32 0 - store ptr @2, ptr %25, align 8 - %26 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %24, i32 0, i32 1 - store i64 10, ptr %26, align 4 - %27 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %24, align 8 - %28 = load ptr, ptr @_llgo_string, align 8 - %29 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %27, ptr %29, align 8 + %16 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 32) + %17 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %16, i64 0 + %18 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %19 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %18, i32 0, i32 0 + store ptr @2, ptr %19, align 8 + %20 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %18, i32 0, i32 1 + store i64 10, ptr %20, align 4 + %21 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %18, align 8 + %22 = load ptr, ptr @_llgo_string, align 8 + %23 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %21, ptr %23, align 8 + %24 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %25 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %24, i32 0, i32 0 + store ptr %22, ptr %25, align 8 + %26 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %24, i32 0, i32 1 + store ptr %23, ptr %26, align 8 + %27 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %24, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %27, ptr %17, align 8 + %28 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %16, i64 1 + %29 = load ptr, ptr @_llgo_bool, align 8 %30 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 %31 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %30, i32 0, i32 0 - store ptr %28, ptr %31, align 8 + store ptr %29, ptr %31, align 8 %32 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %30, i32 0, i32 1 - store ptr %29, ptr %32, align 8 + store ptr inttoptr (i64 -1 to ptr), ptr %32, align 8 %33 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %30, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %33, ptr %23, align 8 - %34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %22, i64 1 - %35 = load ptr, ptr @_llgo_bool, align 8 - %36 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %35, i32 0, i32 6 - %37 = load i8, ptr %36, align 1 - %38 = or i8 %37, 32 - store i8 %38, ptr %36, align 1 - %39 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %40 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %39, i32 0, i32 0 - store ptr %35, ptr %40, align 8 - %41 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %39, i32 0, i32 1 - store ptr inttoptr (i64 -1 to ptr), ptr %41, align 8 - %42 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %39, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %42, ptr %34, align 8 - %43 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %44 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %43, i32 0, i32 0 - store ptr %22, ptr %44, align 8 - %45 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %43, i32 0, i32 1 - store i64 2, ptr %45, align 4 - %46 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %43, i32 0, i32 2 - store i64 2, ptr %46, align 4 - %47 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %43, align 8 - call void @main.println(%"github.com/goplus/llgo/internal/runtime.Slice" %47) + store %"github.com/goplus/llgo/internal/runtime.eface" %33, ptr %28, align 8 + %34 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %35 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %34, i32 0, i32 0 + store ptr %16, ptr %35, align 8 + %36 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %34, i32 0, i32 1 + store i64 2, ptr %36, align 4 + %37 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %34, i32 0, i32 2 + store i64 2, ptr %37, align 4 + %38 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %34, align 8 + call void @main.println(%"github.com/goplus/llgo/internal/runtime.Slice" %38) br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_3, %_llgo_0 - %48 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 48) - %49 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %48, i64 0 - %50 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %51 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %50, i32 0, i32 0 - store ptr @3, ptr %51, align 8 - %52 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %50, i32 0, i32 1 - store i64 8, ptr %52, align 4 - %53 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %50, align 8 - %54 = load ptr, ptr @_llgo_string, align 8 - %55 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %53, ptr %55, align 8 - %56 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %57 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %56, i32 0, i32 0 - store ptr %54, ptr %57, align 8 - %58 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %56, i32 0, i32 1 - store ptr %55, ptr %58, align 8 - %59 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %56, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %59, ptr %49, align 8 - %60 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %48, i64 1 - %61 = load ptr, ptr @_llgo_bool, align 8 - %62 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %61, i32 0, i32 6 - %63 = load i8, ptr %62, align 1 - %64 = or i8 %63, 32 - store i8 %64, ptr %62, align 1 - %65 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %66 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %65, i32 0, i32 0 - store ptr %61, ptr %66, align 8 - %67 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %65, i32 0, i32 1 - store ptr inttoptr (i64 -1 to ptr), ptr %67, align 8 - %68 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %65, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %68, ptr %60, align 8 - %69 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %48, i64 2 + %39 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 48) + %40 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %39, i64 0 + %41 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %42 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %41, i32 0, i32 0 + store ptr @3, ptr %42, align 8 + %43 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %41, i32 0, i32 1 + store i64 8, ptr %43, align 4 + %44 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %41, align 8 + %45 = load ptr, ptr @_llgo_string, align 8 + %46 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %44, ptr %46, align 8 + %47 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %48 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %47, i32 0, i32 0 + store ptr %45, ptr %48, align 8 + %49 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %47, i32 0, i32 1 + store ptr %46, ptr %49, align 8 + %50 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %47, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %50, ptr %40, align 8 + %51 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %39, i64 1 + %52 = load ptr, ptr @_llgo_bool, align 8 + %53 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %54 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %53, i32 0, i32 0 + store ptr %52, ptr %54, align 8 + %55 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %53, i32 0, i32 1 + store ptr inttoptr (i64 -1 to ptr), ptr %55, align 8 + %56 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %53, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %56, ptr %51, align 8 + %57 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %39, i64 2 + %58 = load ptr, ptr @_llgo_bool, align 8 + %59 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %60 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %59, i32 0, i32 0 + store ptr %58, ptr %60, align 8 + %61 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %59, i32 0, i32 1 + store ptr inttoptr (i64 -1 to ptr), ptr %61, align 8 + %62 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %59, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %62, ptr %57, align 8 + %63 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %64 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %63, i32 0, i32 0 + store ptr %39, ptr %64, align 8 + %65 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %63, i32 0, i32 1 + store i64 3, ptr %65, align 4 + %66 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %63, i32 0, i32 2 + store i64 3, ptr %66, align 4 + %67 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %63, align 8 + call void @main.println(%"github.com/goplus/llgo/internal/runtime.Slice" %67) + %68 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 256) + %69 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i64 0 %70 = load ptr, ptr @_llgo_bool, align 8 - %71 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %70, i32 0, i32 6 - %72 = load i8, ptr %71, align 1 - %73 = or i8 %72, 32 - store i8 %73, ptr %71, align 1 - %74 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %75 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %74, i32 0, i32 0 - store ptr %70, ptr %75, align 8 - %76 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %74, i32 0, i32 1 - store ptr inttoptr (i64 -1 to ptr), ptr %76, align 8 - %77 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %74, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %77, ptr %69, align 8 - %78 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %79 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %78, i32 0, i32 0 - store ptr %48, ptr %79, align 8 - %80 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %78, i32 0, i32 1 - store i64 3, ptr %80, align 4 - %81 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %78, i32 0, i32 2 - store i64 3, ptr %81, align 4 - %82 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %78, align 8 - call void @main.println(%"github.com/goplus/llgo/internal/runtime.Slice" %82) - %83 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 256) - %84 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i64 0 - %85 = load ptr, ptr @_llgo_bool, align 8 - %86 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %85, i32 0, i32 6 - %87 = load i8, ptr %86, align 1 - %88 = or i8 %87, 32 - store i8 %88, ptr %86, align 1 + %71 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %72 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %71, i32 0, i32 0 + store ptr %70, ptr %72, align 8 + %73 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %71, i32 0, i32 1 + store ptr inttoptr (i64 -1 to ptr), ptr %73, align 8 + %74 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %71, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %74, ptr %69, align 8 + %75 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i64 1 + %76 = load ptr, ptr @_llgo_bool, align 8 + %77 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %78 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %77, i32 0, i32 0 + store ptr %76, ptr %78, align 8 + %79 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %77, i32 0, i32 1 + store ptr null, ptr %79, align 8 + %80 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %77, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %80, ptr %75, align 8 + %81 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i64 2 + %82 = load ptr, ptr @_llgo_int32, align 8 + %83 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %84 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i32 0, i32 0 + store ptr %82, ptr %84, align 8 + %85 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i32 0, i32 1 + store ptr inttoptr (i64 97 to ptr), ptr %85, align 8 + %86 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %86, ptr %81, align 8 + %87 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i64 3 + %88 = load ptr, ptr @_llgo_int32, align 8 %89 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 %90 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %89, i32 0, i32 0 - store ptr %85, ptr %90, align 8 + store ptr %88, ptr %90, align 8 %91 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %89, i32 0, i32 1 - store ptr inttoptr (i64 -1 to ptr), ptr %91, align 8 + store ptr inttoptr (i64 65 to ptr), ptr %91, align 8 %92 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %89, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %92, ptr %84, align 8 - %93 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i64 1 - %94 = load ptr, ptr @_llgo_bool, align 8 - %95 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %94, i32 0, i32 6 - %96 = load i8, ptr %95, align 1 - %97 = or i8 %96, 32 - store i8 %97, ptr %95, align 1 - %98 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %99 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %98, i32 0, i32 0 - store ptr %94, ptr %99, align 8 - %100 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %98, i32 0, i32 1 - store ptr null, ptr %100, align 8 - %101 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %98, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %101, ptr %93, align 8 - %102 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i64 2 - %103 = load ptr, ptr @_llgo_int32, align 8 - %104 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %103, i32 0, i32 6 - %105 = load i8, ptr %104, align 1 - %106 = or i8 %105, 32 - store i8 %106, ptr %104, align 1 + store %"github.com/goplus/llgo/internal/runtime.eface" %92, ptr %87, align 8 + %93 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i64 4 + %94 = load ptr, ptr @_llgo_int32, align 8 + %95 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %96 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %95, i32 0, i32 0 + store ptr %94, ptr %96, align 8 + %97 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %95, i32 0, i32 1 + store ptr inttoptr (i64 20013 to ptr), ptr %97, align 8 + %98 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %95, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %98, ptr %93, align 8 + %99 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i64 5 + %100 = load ptr, ptr @_llgo_int8, align 8 + %101 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %102 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %101, i32 0, i32 0 + store ptr %100, ptr %102, align 8 + %103 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %101, i32 0, i32 1 + store ptr inttoptr (i64 1 to ptr), ptr %103, align 8 + %104 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %101, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %104, ptr %99, align 8 + %105 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i64 6 + %106 = load ptr, ptr @_llgo_int16, align 8 %107 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 %108 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %107, i32 0, i32 0 - store ptr %103, ptr %108, align 8 + store ptr %106, ptr %108, align 8 %109 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %107, i32 0, i32 1 - store ptr inttoptr (i64 97 to ptr), ptr %109, align 8 + store ptr inttoptr (i64 2 to ptr), ptr %109, align 8 %110 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %107, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %110, ptr %102, align 8 - %111 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i64 3 + store %"github.com/goplus/llgo/internal/runtime.eface" %110, ptr %105, align 8 + %111 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i64 7 %112 = load ptr, ptr @_llgo_int32, align 8 - %113 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %112, i32 0, i32 6 - %114 = load i8, ptr %113, align 1 - %115 = or i8 %114, 32 - store i8 %115, ptr %113, align 1 - %116 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %117 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %116, i32 0, i32 0 - store ptr %112, ptr %117, align 8 - %118 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %116, i32 0, i32 1 - store ptr inttoptr (i64 65 to ptr), ptr %118, align 8 - %119 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %116, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %119, ptr %111, align 8 - %120 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i64 4 - %121 = load ptr, ptr @_llgo_int32, align 8 - %122 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %121, i32 0, i32 6 - %123 = load i8, ptr %122, align 1 - %124 = or i8 %123, 32 - store i8 %124, ptr %122, align 1 + %113 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %114 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %113, i32 0, i32 0 + store ptr %112, ptr %114, align 8 + %115 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %113, i32 0, i32 1 + store ptr inttoptr (i64 3 to ptr), ptr %115, align 8 + %116 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %113, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %116, ptr %111, align 8 + %117 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i64 8 + %118 = load ptr, ptr @_llgo_int64, align 8 + %119 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %120 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %119, i32 0, i32 0 + store ptr %118, ptr %120, align 8 + %121 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %119, i32 0, i32 1 + store ptr inttoptr (i64 4 to ptr), ptr %121, align 8 + %122 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %119, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %122, ptr %117, align 8 + %123 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i64 9 + %124 = load ptr, ptr @_llgo_int, align 8 %125 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 %126 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %125, i32 0, i32 0 - store ptr %121, ptr %126, align 8 + store ptr %124, ptr %126, align 8 %127 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %125, i32 0, i32 1 - store ptr inttoptr (i64 20013 to ptr), ptr %127, align 8 + store ptr inttoptr (i64 5 to ptr), ptr %127, align 8 %128 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %125, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %128, ptr %120, align 8 - %129 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i64 5 - %130 = load ptr, ptr @_llgo_int8, align 8 - %131 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %130, i32 0, i32 6 - %132 = load i8, ptr %131, align 1 - %133 = or i8 %132, 32 - store i8 %133, ptr %131, align 1 - %134 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %135 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %134, i32 0, i32 0 - store ptr %130, ptr %135, align 8 - %136 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %134, i32 0, i32 1 - store ptr inttoptr (i64 1 to ptr), ptr %136, align 8 - %137 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %134, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %137, ptr %129, align 8 - %138 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i64 6 - %139 = load ptr, ptr @_llgo_int16, align 8 - %140 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %139, i32 0, i32 6 - %141 = load i8, ptr %140, align 1 - %142 = or i8 %141, 32 - store i8 %142, ptr %140, align 1 + store %"github.com/goplus/llgo/internal/runtime.eface" %128, ptr %123, align 8 + %129 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i64 10 + %130 = load ptr, ptr @_llgo_uint8, align 8 + %131 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %132 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %131, i32 0, i32 0 + store ptr %130, ptr %132, align 8 + %133 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %131, i32 0, i32 1 + store ptr inttoptr (i64 1 to ptr), ptr %133, align 8 + %134 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %131, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %134, ptr %129, align 8 + %135 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i64 11 + %136 = load ptr, ptr @_llgo_uint16, align 8 + %137 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %138 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %137, i32 0, i32 0 + store ptr %136, ptr %138, align 8 + %139 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %137, i32 0, i32 1 + store ptr inttoptr (i64 2 to ptr), ptr %139, align 8 + %140 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %137, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %140, ptr %135, align 8 + %141 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i64 12 + %142 = load ptr, ptr @_llgo_uint32, align 8 %143 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 %144 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %143, i32 0, i32 0 - store ptr %139, ptr %144, align 8 + store ptr %142, ptr %144, align 8 %145 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %143, i32 0, i32 1 - store ptr inttoptr (i64 2 to ptr), ptr %145, align 8 + store ptr inttoptr (i64 3 to ptr), ptr %145, align 8 %146 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %143, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %146, ptr %138, align 8 - %147 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i64 7 - %148 = load ptr, ptr @_llgo_int32, align 8 - %149 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %148, i32 0, i32 6 - %150 = load i8, ptr %149, align 1 - %151 = or i8 %150, 32 - store i8 %151, ptr %149, align 1 - %152 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %153 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %152, i32 0, i32 0 - store ptr %148, ptr %153, align 8 - %154 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %152, i32 0, i32 1 - store ptr inttoptr (i64 3 to ptr), ptr %154, align 8 - %155 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %152, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %155, ptr %147, align 8 - %156 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i64 8 - %157 = load ptr, ptr @_llgo_int64, align 8 - %158 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %157, i32 0, i32 6 - %159 = load i8, ptr %158, align 1 - %160 = or i8 %159, 32 - store i8 %160, ptr %158, align 1 - %161 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %162 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %161, i32 0, i32 0 - store ptr %157, ptr %162, align 8 - %163 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %161, i32 0, i32 1 - store ptr inttoptr (i64 4 to ptr), ptr %163, align 8 - %164 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %161, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %164, ptr %156, align 8 - %165 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i64 9 - %166 = load ptr, ptr @_llgo_int, align 8 - %167 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %166, i32 0, i32 6 - %168 = load i8, ptr %167, align 1 - %169 = or i8 %168, 32 - store i8 %169, ptr %167, align 1 - %170 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %171 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %170, i32 0, i32 0 - store ptr %166, ptr %171, align 8 - %172 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %170, i32 0, i32 1 - store ptr inttoptr (i64 5 to ptr), ptr %172, align 8 - %173 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %170, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %173, ptr %165, align 8 - %174 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i64 10 - %175 = load ptr, ptr @_llgo_uint8, align 8 - %176 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %175, i32 0, i32 6 - %177 = load i8, ptr %176, align 1 - %178 = or i8 %177, 32 - store i8 %178, ptr %176, align 1 + store %"github.com/goplus/llgo/internal/runtime.eface" %146, ptr %141, align 8 + %147 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i64 13 + %148 = load ptr, ptr @_llgo_uint64, align 8 + %149 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %150 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %149, i32 0, i32 0 + store ptr %148, ptr %150, align 8 + %151 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %149, i32 0, i32 1 + store ptr inttoptr (i64 4 to ptr), ptr %151, align 8 + %152 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %149, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %152, ptr %147, align 8 + %153 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i64 14 + %154 = load ptr, ptr @_llgo_uintptr, align 8 + %155 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %156 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %155, i32 0, i32 0 + store ptr %154, ptr %156, align 8 + %157 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %155, i32 0, i32 1 + store ptr inttoptr (i64 5 to ptr), ptr %157, align 8 + %158 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %155, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %158, ptr %153, align 8 + %159 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i64 15 + %160 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %161 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %160, i32 0, i32 0 + store ptr @1, ptr %161, align 8 + %162 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %160, i32 0, i32 1 + store i64 4, ptr %162, align 4 + %163 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %160, align 8 + %164 = load ptr, ptr @_llgo_string, align 8 + %165 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %163, ptr %165, align 8 + %166 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %167 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %166, i32 0, i32 0 + store ptr %164, ptr %167, align 8 + %168 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %166, i32 0, i32 1 + store ptr %165, ptr %168, align 8 + %169 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %166, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %169, ptr %159, align 8 + %170 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %171 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %170, i32 0, i32 0 + store ptr %68, ptr %171, align 8 + %172 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %170, i32 0, i32 1 + store i64 16, ptr %172, align 4 + %173 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %170, i32 0, i32 2 + store i64 16, ptr %173, align 4 + %174 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %170, align 8 + call void @main.println(%"github.com/goplus/llgo/internal/runtime.Slice" %174) + %175 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16) + %176 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %175, i64 0 + %177 = load ptr, ptr @_llgo_complex128, align 8 + %178 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store { double, double } { double 1.000000e+00, double 2.000000e+00 }, ptr %178, align 8 %179 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 %180 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %179, i32 0, i32 0 - store ptr %175, ptr %180, align 8 + store ptr %177, ptr %180, align 8 %181 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %179, i32 0, i32 1 - store ptr inttoptr (i64 1 to ptr), ptr %181, align 8 + store ptr %178, ptr %181, align 8 %182 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %179, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %182, ptr %174, align 8 - %183 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i64 11 - %184 = load ptr, ptr @_llgo_uint16, align 8 - %185 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %184, i32 0, i32 6 - %186 = load i8, ptr %185, align 1 - %187 = or i8 %186, 32 - store i8 %187, ptr %185, align 1 - %188 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %189 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %188, i32 0, i32 0 - store ptr %184, ptr %189, align 8 - %190 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %188, i32 0, i32 1 - store ptr inttoptr (i64 2 to ptr), ptr %190, align 8 - %191 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %188, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %191, ptr %183, align 8 - %192 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i64 12 - %193 = load ptr, ptr @_llgo_uint32, align 8 - %194 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %193, i32 0, i32 6 - %195 = load i8, ptr %194, align 1 - %196 = or i8 %195, 32 - store i8 %196, ptr %194, align 1 - %197 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %198 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %197, i32 0, i32 0 - store ptr %193, ptr %198, align 8 - %199 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %197, i32 0, i32 1 - store ptr inttoptr (i64 3 to ptr), ptr %199, align 8 - %200 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %197, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %200, ptr %192, align 8 - %201 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i64 13 - %202 = load ptr, ptr @_llgo_uint64, align 8 - %203 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %202, i32 0, i32 6 - %204 = load i8, ptr %203, align 1 - %205 = or i8 %204, 32 - store i8 %205, ptr %203, align 1 - %206 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %207 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %206, i32 0, i32 0 - store ptr %202, ptr %207, align 8 - %208 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %206, i32 0, i32 1 - store ptr inttoptr (i64 4 to ptr), ptr %208, align 8 - %209 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %206, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %209, ptr %201, align 8 - %210 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i64 14 - %211 = load ptr, ptr @_llgo_uintptr, align 8 - %212 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %211, i32 0, i32 6 - %213 = load i8, ptr %212, align 1 - %214 = or i8 %213, 32 - store i8 %214, ptr %212, align 1 - %215 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %216 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %215, i32 0, i32 0 - store ptr %211, ptr %216, align 8 - %217 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %215, i32 0, i32 1 - store ptr inttoptr (i64 5 to ptr), ptr %217, align 8 - %218 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %215, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %218, ptr %210, align 8 - %219 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i64 15 - %220 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %221 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %220, i32 0, i32 0 - store ptr @1, ptr %221, align 8 - %222 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %220, i32 0, i32 1 - store i64 4, ptr %222, align 4 - %223 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %220, align 8 - %224 = load ptr, ptr @_llgo_string, align 8 - %225 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %223, ptr %225, align 8 - %226 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %227 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %226, i32 0, i32 0 - store ptr %224, ptr %227, align 8 - %228 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %226, i32 0, i32 1 - store ptr %225, ptr %228, align 8 - %229 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %226, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %229, ptr %219, align 8 - %230 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %231 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %230, i32 0, i32 0 - store ptr %83, ptr %231, align 8 - %232 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %230, i32 0, i32 1 - store i64 16, ptr %232, align 4 - %233 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %230, i32 0, i32 2 - store i64 16, ptr %233, align 4 - %234 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %230, align 8 - call void @main.println(%"github.com/goplus/llgo/internal/runtime.Slice" %234) - %235 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16) - %236 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %235, i64 0 - %237 = load ptr, ptr @_llgo_complex128, align 8 - %238 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store { double, double } { double 1.000000e+00, double 2.000000e+00 }, ptr %238, align 8 - %239 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %240 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %239, i32 0, i32 0 - store ptr %237, ptr %240, align 8 - %241 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %239, i32 0, i32 1 - store ptr %238, ptr %241, align 8 - %242 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %239, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %242, ptr %236, align 8 - %243 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %244 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %243, i32 0, i32 0 - store ptr %235, ptr %244, align 8 - %245 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %243, i32 0, i32 1 - store i64 1, ptr %245, align 4 - %246 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %243, i32 0, i32 2 - store i64 1, ptr %246, align 4 - %247 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %243, align 8 - call void @main.println(%"github.com/goplus/llgo/internal/runtime.Slice" %247) + store %"github.com/goplus/llgo/internal/runtime.eface" %182, ptr %176, align 8 + %183 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %184 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %183, i32 0, i32 0 + store ptr %175, ptr %184, align 8 + %185 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %183, i32 0, i32 1 + store i64 1, ptr %185, align 4 + %186 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %183, i32 0, i32 2 + store i64 1, ptr %186, align 4 + %187 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %183, align 8 + call void @main.println(%"github.com/goplus/llgo/internal/runtime.Slice" %187) ret i32 0 _llgo_3: ; preds = %_llgo_0 diff --git a/cl/_testdata/vargs/out.ll b/cl/_testdata/vargs/out.ll index 6a1c1ef60..f5cfbdfac 100644 --- a/cl/_testdata/vargs/out.ll +++ b/cl/_testdata/vargs/out.ll @@ -2,9 +2,9 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr } -%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } -%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 } +%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } +%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } @"main.init$guard" = global i1 false, align 1 @__llgo_argc = global i32 0, align 4 @@ -37,52 +37,40 @@ _llgo_0: %2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 48) %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %2, i64 0 %4 = load ptr, ptr @_llgo_int, align 8 - %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %4, i32 0, i32 6 - %6 = load i8, ptr %5, align 1 - %7 = or i8 %6, 32 - store i8 %7, ptr %5, align 1 - %8 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %8, i32 0, i32 0 - store ptr %4, ptr %9, align 8 - %10 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %8, i32 0, i32 1 - store ptr inttoptr (i64 1 to ptr), ptr %10, align 8 - %11 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %8, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %11, ptr %3, align 8 - %12 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %2, i64 1 - %13 = load ptr, ptr @_llgo_int, align 8 - %14 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %13, i32 0, i32 6 - %15 = load i8, ptr %14, align 1 - %16 = or i8 %15, 32 - store i8 %16, ptr %14, align 1 + %5 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %5, i32 0, i32 0 + store ptr %4, ptr %6, align 8 + %7 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %5, i32 0, i32 1 + store ptr inttoptr (i64 1 to ptr), ptr %7, align 8 + %8 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %5, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %8, ptr %3, align 8 + %9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %2, i64 1 + %10 = load ptr, ptr @_llgo_int, align 8 + %11 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %12 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %11, i32 0, i32 0 + store ptr %10, ptr %12, align 8 + %13 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %11, i32 0, i32 1 + store ptr inttoptr (i64 2 to ptr), ptr %13, align 8 + %14 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %11, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %14, ptr %9, align 8 + %15 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %2, i64 2 + %16 = load ptr, ptr @_llgo_int, align 8 %17 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 %18 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %17, i32 0, i32 0 - store ptr %13, ptr %18, align 8 + store ptr %16, ptr %18, align 8 %19 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %17, i32 0, i32 1 - store ptr inttoptr (i64 2 to ptr), ptr %19, align 8 + store ptr inttoptr (i64 3 to ptr), ptr %19, align 8 %20 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %17, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %20, ptr %12, align 8 - %21 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %2, i64 2 - %22 = load ptr, ptr @_llgo_int, align 8 - %23 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %22, i32 0, i32 6 - %24 = load i8, ptr %23, align 1 - %25 = or i8 %24, 32 - store i8 %25, ptr %23, align 1 - %26 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %27 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %26, i32 0, i32 0 - store ptr %22, ptr %27, align 8 - %28 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %26, i32 0, i32 1 - store ptr inttoptr (i64 3 to ptr), ptr %28, align 8 - %29 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %26, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %29, ptr %21, align 8 - %30 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %31 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %30, i32 0, i32 0 - store ptr %2, ptr %31, align 8 - %32 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %30, i32 0, i32 1 - store i64 3, ptr %32, align 4 - %33 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %30, i32 0, i32 2 - store i64 3, ptr %33, align 4 - %34 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %30, align 8 - call void @main.test(%"github.com/goplus/llgo/internal/runtime.Slice" %34) + store %"github.com/goplus/llgo/internal/runtime.eface" %20, ptr %15, align 8 + %21 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %22 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %21, i32 0, i32 0 + store ptr %2, ptr %22, align 8 + %23 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %21, i32 0, i32 1 + store i64 3, ptr %23, align 4 + %24 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %21, i32 0, i32 2 + store i64 3, ptr %24, align 4 + %25 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %21, align 8 + call void @main.test(%"github.com/goplus/llgo/internal/runtime.Slice" %25) ret i32 0 } diff --git a/cl/_testgo/equal/out.ll b/cl/_testgo/equal/out.ll index dd36ede06..f38f3efc3 100644 --- a/cl/_testgo/equal/out.ll +++ b/cl/_testgo/equal/out.ll @@ -4,9 +4,9 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr } %main.T = type { i64, i64, %"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.eface" } -%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 } %main.N = type {} +%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 } @"main.init$guard" = global i1 false, align 1 @@ -187,140 +187,132 @@ _llgo_0: %9 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %6, align 8 store %"github.com/goplus/llgo/internal/runtime.String" %9, ptr %4, align 8 %10 = load ptr, ptr @_llgo_int, align 8 - %11 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %10, i32 0, i32 6 - %12 = load i8, ptr %11, align 1 - %13 = or i8 %12, 32 - store i8 %13, ptr %11, align 1 - %14 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %15 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %14, i32 0, i32 0 - store ptr %10, ptr %15, align 8 - %16 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %14, i32 0, i32 1 - store ptr inttoptr (i64 1 to ptr), ptr %16, align 8 - %17 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %14, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %17, ptr %5, align 8 - %18 = alloca %main.T, align 8 - %19 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %18, i64 48) - %20 = getelementptr inbounds %main.T, ptr %19, i32 0, i32 0 - %21 = getelementptr inbounds %main.T, ptr %19, i32 0, i32 1 - %22 = getelementptr inbounds %main.T, ptr %19, i32 0, i32 2 - %23 = getelementptr inbounds %main.T, ptr %19, i32 0, i32 3 - store i64 10, ptr %20, align 4 - store i64 20, ptr %21, align 4 - %24 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %25 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %24, i32 0, i32 0 - store ptr @1, ptr %25, align 8 - %26 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %24, i32 0, i32 1 - store i64 5, ptr %26, align 4 - %27 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %24, align 8 - store %"github.com/goplus/llgo/internal/runtime.String" %27, ptr %22, align 8 - %28 = load ptr, ptr @_llgo_int, align 8 - %29 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %28, i32 0, i32 6 - %30 = load i8, ptr %29, align 1 - %31 = or i8 %30, 32 - store i8 %31, ptr %29, align 1 - %32 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %33 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %32, i32 0, i32 0 - store ptr %28, ptr %33, align 8 - %34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %32, i32 0, i32 1 - store ptr inttoptr (i64 1 to ptr), ptr %34, align 8 - %35 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %32, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %35, ptr %23, align 8 - %36 = alloca %main.T, align 8 - %37 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %36, i64 48) - %38 = getelementptr inbounds %main.T, ptr %37, i32 0, i32 0 - %39 = getelementptr inbounds %main.T, ptr %37, i32 0, i32 1 - %40 = getelementptr inbounds %main.T, ptr %37, i32 0, i32 2 - %41 = getelementptr inbounds %main.T, ptr %37, i32 0, i32 3 - store i64 10, ptr %38, align 4 - store i64 20, ptr %39, align 4 - %42 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %43 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %42, i32 0, i32 0 - store ptr @1, ptr %43, align 8 - %44 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %42, i32 0, i32 1 - store i64 5, ptr %44, align 4 - %45 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %42, align 8 - store %"github.com/goplus/llgo/internal/runtime.String" %45, ptr %40, align 8 - %46 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %47 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %46, i32 0, i32 0 - store ptr @2, ptr %47, align 8 - %48 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %46, i32 0, i32 1 - store i64 2, ptr %48, align 4 - %49 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %46, align 8 - %50 = load ptr, ptr @_llgo_string, align 8 - %51 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %49, ptr %51, align 8 - %52 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %53 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %52, i32 0, i32 0 - store ptr %50, ptr %53, align 8 - %54 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %52, i32 0, i32 1 - store ptr %51, ptr %54, align 8 - %55 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %52, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %55, ptr %41, align 8 + %11 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %12 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %11, i32 0, i32 0 + store ptr %10, ptr %12, align 8 + %13 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %11, i32 0, i32 1 + store ptr inttoptr (i64 1 to ptr), ptr %13, align 8 + %14 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %11, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %14, ptr %5, align 8 + %15 = alloca %main.T, align 8 + %16 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %15, i64 48) + %17 = getelementptr inbounds %main.T, ptr %16, i32 0, i32 0 + %18 = getelementptr inbounds %main.T, ptr %16, i32 0, i32 1 + %19 = getelementptr inbounds %main.T, ptr %16, i32 0, i32 2 + %20 = getelementptr inbounds %main.T, ptr %16, i32 0, i32 3 + store i64 10, ptr %17, align 4 + store i64 20, ptr %18, align 4 + %21 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %22 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %21, i32 0, i32 0 + store ptr @1, ptr %22, align 8 + %23 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %21, i32 0, i32 1 + store i64 5, ptr %23, align 4 + %24 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %21, align 8 + store %"github.com/goplus/llgo/internal/runtime.String" %24, ptr %19, align 8 + %25 = load ptr, ptr @_llgo_int, align 8 + %26 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %27 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %26, i32 0, i32 0 + store ptr %25, ptr %27, align 8 + %28 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %26, i32 0, i32 1 + store ptr inttoptr (i64 1 to ptr), ptr %28, align 8 + %29 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %26, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %29, ptr %20, align 8 + %30 = alloca %main.T, align 8 + %31 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %30, i64 48) + %32 = getelementptr inbounds %main.T, ptr %31, i32 0, i32 0 + %33 = getelementptr inbounds %main.T, ptr %31, i32 0, i32 1 + %34 = getelementptr inbounds %main.T, ptr %31, i32 0, i32 2 + %35 = getelementptr inbounds %main.T, ptr %31, i32 0, i32 3 + store i64 10, ptr %32, align 4 + store i64 20, ptr %33, align 4 + %36 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %37 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %36, i32 0, i32 0 + store ptr @1, ptr %37, align 8 + %38 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %36, i32 0, i32 1 + store i64 5, ptr %38, align 4 + %39 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %36, align 8 + store %"github.com/goplus/llgo/internal/runtime.String" %39, ptr %34, align 8 + %40 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %41 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %40, i32 0, i32 0 + store ptr @2, ptr %41, align 8 + %42 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %40, i32 0, i32 1 + store i64 2, ptr %42, align 4 + %43 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %40, align 8 + %44 = load ptr, ptr @_llgo_string, align 8 + %45 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %43, ptr %45, align 8 + %46 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %47 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %46, i32 0, i32 0 + store ptr %44, ptr %47, align 8 + %48 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %46, i32 0, i32 1 + store ptr %45, ptr %48, align 8 + %49 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %46, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %49, ptr %35, align 8 call void @main.assert(i1 true) - %56 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer) - %57 = and i1 true, %56 - %58 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" zeroinitializer, %"github.com/goplus/llgo/internal/runtime.eface" zeroinitializer) - %59 = and i1 %57, %58 - call void @main.assert(i1 %59) - %60 = load %main.T, ptr %1, align 8 - %61 = load %main.T, ptr %19, align 8 - %62 = extractvalue %main.T %60, 0 - %63 = extractvalue %main.T %61, 0 - %64 = icmp eq i64 %62, %63 - %65 = and i1 true, %64 - %66 = extractvalue %main.T %60, 1 - %67 = extractvalue %main.T %61, 1 - %68 = icmp eq i64 %66, %67 - %69 = and i1 %65, %68 - %70 = extractvalue %main.T %60, 2 - %71 = extractvalue %main.T %61, 2 - %72 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %70, %"github.com/goplus/llgo/internal/runtime.String" %71) - %73 = and i1 %69, %72 - %74 = extractvalue %main.T %60, 3 - %75 = extractvalue %main.T %61, 3 - %76 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %74, %"github.com/goplus/llgo/internal/runtime.eface" %75) - %77 = and i1 %73, %76 - call void @main.assert(i1 %77) - %78 = load %main.T, ptr %1, align 8 - %79 = load %main.T, ptr %37, align 8 - %80 = extractvalue %main.T %78, 0 - %81 = extractvalue %main.T %79, 0 - %82 = icmp eq i64 %80, %81 - %83 = and i1 true, %82 - %84 = extractvalue %main.T %78, 1 - %85 = extractvalue %main.T %79, 1 - %86 = icmp eq i64 %84, %85 - %87 = and i1 %83, %86 - %88 = extractvalue %main.T %78, 2 - %89 = extractvalue %main.T %79, 2 - %90 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %88, %"github.com/goplus/llgo/internal/runtime.String" %89) - %91 = and i1 %87, %90 - %92 = extractvalue %main.T %78, 3 - %93 = extractvalue %main.T %79, 3 - %94 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %92, %"github.com/goplus/llgo/internal/runtime.eface" %93) - %95 = and i1 %91, %94 - %96 = xor i1 %95, true - call void @main.assert(i1 %96) - %97 = load %main.T, ptr %19, align 8 - %98 = load %main.T, ptr %37, align 8 - %99 = extractvalue %main.T %97, 0 - %100 = extractvalue %main.T %98, 0 - %101 = icmp eq i64 %99, %100 - %102 = and i1 true, %101 - %103 = extractvalue %main.T %97, 1 - %104 = extractvalue %main.T %98, 1 - %105 = icmp eq i64 %103, %104 - %106 = and i1 %102, %105 - %107 = extractvalue %main.T %97, 2 - %108 = extractvalue %main.T %98, 2 - %109 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %107, %"github.com/goplus/llgo/internal/runtime.String" %108) - %110 = and i1 %106, %109 - %111 = extractvalue %main.T %97, 3 - %112 = extractvalue %main.T %98, 3 - %113 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %111, %"github.com/goplus/llgo/internal/runtime.eface" %112) - %114 = and i1 %110, %113 - %115 = xor i1 %114, true - call void @main.assert(i1 %115) + %50 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer) + %51 = and i1 true, %50 + %52 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" zeroinitializer, %"github.com/goplus/llgo/internal/runtime.eface" zeroinitializer) + %53 = and i1 %51, %52 + call void @main.assert(i1 %53) + %54 = load %main.T, ptr %1, align 8 + %55 = load %main.T, ptr %16, align 8 + %56 = extractvalue %main.T %54, 0 + %57 = extractvalue %main.T %55, 0 + %58 = icmp eq i64 %56, %57 + %59 = and i1 true, %58 + %60 = extractvalue %main.T %54, 1 + %61 = extractvalue %main.T %55, 1 + %62 = icmp eq i64 %60, %61 + %63 = and i1 %59, %62 + %64 = extractvalue %main.T %54, 2 + %65 = extractvalue %main.T %55, 2 + %66 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %64, %"github.com/goplus/llgo/internal/runtime.String" %65) + %67 = and i1 %63, %66 + %68 = extractvalue %main.T %54, 3 + %69 = extractvalue %main.T %55, 3 + %70 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %68, %"github.com/goplus/llgo/internal/runtime.eface" %69) + %71 = and i1 %67, %70 + call void @main.assert(i1 %71) + %72 = load %main.T, ptr %1, align 8 + %73 = load %main.T, ptr %31, align 8 + %74 = extractvalue %main.T %72, 0 + %75 = extractvalue %main.T %73, 0 + %76 = icmp eq i64 %74, %75 + %77 = and i1 true, %76 + %78 = extractvalue %main.T %72, 1 + %79 = extractvalue %main.T %73, 1 + %80 = icmp eq i64 %78, %79 + %81 = and i1 %77, %80 + %82 = extractvalue %main.T %72, 2 + %83 = extractvalue %main.T %73, 2 + %84 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %82, %"github.com/goplus/llgo/internal/runtime.String" %83) + %85 = and i1 %81, %84 + %86 = extractvalue %main.T %72, 3 + %87 = extractvalue %main.T %73, 3 + %88 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %86, %"github.com/goplus/llgo/internal/runtime.eface" %87) + %89 = and i1 %85, %88 + %90 = xor i1 %89, true + call void @main.assert(i1 %90) + %91 = load %main.T, ptr %16, align 8 + %92 = load %main.T, ptr %31, align 8 + %93 = extractvalue %main.T %91, 0 + %94 = extractvalue %main.T %92, 0 + %95 = icmp eq i64 %93, %94 + %96 = and i1 true, %95 + %97 = extractvalue %main.T %91, 1 + %98 = extractvalue %main.T %92, 1 + %99 = icmp eq i64 %97, %98 + %100 = and i1 %96, %99 + %101 = extractvalue %main.T %91, 2 + %102 = extractvalue %main.T %92, 2 + %103 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %101, %"github.com/goplus/llgo/internal/runtime.String" %102) + %104 = and i1 %100, %103 + %105 = extractvalue %main.T %91, 3 + %106 = extractvalue %main.T %92, 3 + %107 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %105, %"github.com/goplus/llgo/internal/runtime.eface" %106) + %108 = and i1 %104, %107 + %109 = xor i1 %108, true + call void @main.assert(i1 %109) ret void } @@ -362,181 +354,165 @@ _llgo_0: define void @"main.init#5"() { _llgo_0: %0 = load ptr, ptr @_llgo_int, align 8 - %1 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %0, i32 0, i32 6 - %2 = load i8, ptr %1, align 1 - %3 = or i8 %2, 32 - store i8 %3, ptr %1, align 1 - %4 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %4, i32 0, i32 0 - store ptr %0, ptr %5, align 8 - %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %4, i32 0, i32 1 - store ptr inttoptr (i64 100 to ptr), ptr %6, align 8 - %7 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %4, align 8 - %8 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 - %9 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - store {} zeroinitializer, ptr %9, align 1 - %10 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %11 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %10, i32 0, i32 0 - store ptr %8, ptr %11, align 8 - %12 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %10, i32 0, i32 1 - store ptr %9, ptr %12, align 8 - %13 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %10, align 8 - %14 = alloca %main.T, align 8 - %15 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %14, i64 48) - %16 = getelementptr inbounds %main.T, ptr %15, i32 0, i32 0 - %17 = getelementptr inbounds %main.T, ptr %15, i32 0, i32 1 - %18 = getelementptr inbounds %main.T, ptr %15, i32 0, i32 2 - %19 = getelementptr inbounds %main.T, ptr %15, i32 0, i32 3 - store i64 10, ptr %16, align 4 - store i64 20, ptr %17, align 4 - %20 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %21 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %20, i32 0, i32 0 - store ptr @1, ptr %21, align 8 - %22 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %20, i32 0, i32 1 - store i64 5, ptr %22, align 4 - %23 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %20, align 8 - store %"github.com/goplus/llgo/internal/runtime.String" %23, ptr %18, align 8 - %24 = load ptr, ptr @_llgo_int, align 8 - %25 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %24, i32 0, i32 6 - %26 = load i8, ptr %25, align 1 - %27 = or i8 %26, 32 - store i8 %27, ptr %25, align 1 - %28 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %29 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %28, i32 0, i32 0 - store ptr %24, ptr %29, align 8 - %30 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %28, i32 0, i32 1 - store ptr inttoptr (i64 1 to ptr), ptr %30, align 8 - %31 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %28, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %31, ptr %19, align 8 - %32 = load %main.T, ptr %15, align 8 - %33 = load ptr, ptr @_llgo_main.T, align 8 - %34 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) - store %main.T %32, ptr %34, align 8 - %35 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %36 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %35, i32 0, i32 0 - store ptr %33, ptr %36, align 8 - %37 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %35, i32 0, i32 1 - store ptr %34, ptr %37, align 8 - %38 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %35, align 8 - %39 = alloca %main.T, align 8 - %40 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %39, i64 48) - %41 = getelementptr inbounds %main.T, ptr %40, i32 0, i32 0 - %42 = getelementptr inbounds %main.T, ptr %40, i32 0, i32 1 - %43 = getelementptr inbounds %main.T, ptr %40, i32 0, i32 2 - %44 = getelementptr inbounds %main.T, ptr %40, i32 0, i32 3 - store i64 10, ptr %41, align 4 - store i64 20, ptr %42, align 4 - %45 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %46 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %45, i32 0, i32 0 - store ptr @1, ptr %46, align 8 - %47 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %45, i32 0, i32 1 - store i64 5, ptr %47, align 4 - %48 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %45, align 8 - store %"github.com/goplus/llgo/internal/runtime.String" %48, ptr %43, align 8 - %49 = load ptr, ptr @_llgo_int, align 8 - %50 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %49, i32 0, i32 6 - %51 = load i8, ptr %50, align 1 - %52 = or i8 %51, 32 - store i8 %52, ptr %50, align 1 - %53 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %54 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %53, i32 0, i32 0 - store ptr %49, ptr %54, align 8 - %55 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %53, i32 0, i32 1 - store ptr inttoptr (i64 1 to ptr), ptr %55, align 8 - %56 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %53, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %56, ptr %44, align 8 - %57 = alloca %main.T, align 8 - %58 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %57, i64 48) - %59 = getelementptr inbounds %main.T, ptr %58, i32 0, i32 0 - %60 = getelementptr inbounds %main.T, ptr %58, i32 0, i32 1 - %61 = getelementptr inbounds %main.T, ptr %58, i32 0, i32 2 - %62 = getelementptr inbounds %main.T, ptr %58, i32 0, i32 3 - store i64 10, ptr %59, align 4 - store i64 20, ptr %60, align 4 - %63 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %64 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %63, i32 0, i32 0 - store ptr @1, ptr %64, align 8 - %65 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %63, i32 0, i32 1 - store i64 5, ptr %65, align 4 - %66 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %63, align 8 - store %"github.com/goplus/llgo/internal/runtime.String" %66, ptr %61, align 8 - %67 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %68 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %67, i32 0, i32 0 - store ptr @2, ptr %68, align 8 - %69 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %67, i32 0, i32 1 - store i64 2, ptr %69, align 4 - %70 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %67, align 8 - %71 = load ptr, ptr @_llgo_string, align 8 - %72 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %70, ptr %72, align 8 - %73 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %74 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %73, i32 0, i32 0 - store ptr %71, ptr %74, align 8 - %75 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %73, i32 0, i32 1 - store ptr %72, ptr %75, align 8 - %76 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %73, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %76, ptr %62, align 8 - %77 = load ptr, ptr @_llgo_int, align 8 - %78 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %77, i32 0, i32 6 - %79 = load i8, ptr %78, align 1 - %80 = or i8 %79, 32 - store i8 %80, ptr %78, align 1 - %81 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %82 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %81, i32 0, i32 0 - store ptr %77, ptr %82, align 8 - %83 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %81, i32 0, i32 1 - store ptr inttoptr (i64 100 to ptr), ptr %83, align 8 - %84 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %81, align 8 - %85 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %7, %"github.com/goplus/llgo/internal/runtime.eface" %84) - call void @main.assert(i1 %85) - %86 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 - %87 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - store {} zeroinitializer, ptr %87, align 1 - %88 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %89 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %88, i32 0, i32 0 - store ptr %86, ptr %89, align 8 - %90 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %88, i32 0, i32 1 - store ptr %87, ptr %90, align 8 - %91 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %88, align 8 - %92 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %13, %"github.com/goplus/llgo/internal/runtime.eface" %91) - call void @main.assert(i1 %92) - %93 = load ptr, ptr @_llgo_main.N, align 8 - %94 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - store %main.N zeroinitializer, ptr %94, align 1 - %95 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %96 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %95, i32 0, i32 0 - store ptr %93, ptr %96, align 8 - %97 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %95, i32 0, i32 1 - store ptr %94, ptr %97, align 8 - %98 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %95, align 8 - %99 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %13, %"github.com/goplus/llgo/internal/runtime.eface" %98) - %100 = xor i1 %99, true - call void @main.assert(i1 %100) - %101 = load %main.T, ptr %40, align 8 - %102 = load ptr, ptr @_llgo_main.T, align 8 - %103 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) - store %main.T %101, ptr %103, align 8 - %104 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %105 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %104, i32 0, i32 0 - store ptr %102, ptr %105, align 8 - %106 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %104, i32 0, i32 1 - store ptr %103, ptr %106, align 8 - %107 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %104, align 8 - %108 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %38, %"github.com/goplus/llgo/internal/runtime.eface" %107) - call void @main.assert(i1 %108) - %109 = load %main.T, ptr %58, align 8 - %110 = load ptr, ptr @_llgo_main.T, align 8 - %111 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) - store %main.T %109, ptr %111, align 8 - %112 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %113 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %112, i32 0, i32 0 - store ptr %110, ptr %113, align 8 - %114 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %112, i32 0, i32 1 - store ptr %111, ptr %114, align 8 - %115 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %112, align 8 - %116 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %38, %"github.com/goplus/llgo/internal/runtime.eface" %115) - %117 = xor i1 %116, true - call void @main.assert(i1 %117) + %1 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %2 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %1, i32 0, i32 0 + store ptr %0, ptr %2, align 8 + %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %1, i32 0, i32 1 + store ptr inttoptr (i64 100 to ptr), ptr %3, align 8 + %4 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %1, align 8 + %5 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 + %6 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + store {} zeroinitializer, ptr %6, align 1 + %7 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %8 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %7, i32 0, i32 0 + store ptr %5, ptr %8, align 8 + %9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %7, i32 0, i32 1 + store ptr %6, ptr %9, align 8 + %10 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %7, align 8 + %11 = alloca %main.T, align 8 + %12 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %11, i64 48) + %13 = getelementptr inbounds %main.T, ptr %12, i32 0, i32 0 + %14 = getelementptr inbounds %main.T, ptr %12, i32 0, i32 1 + %15 = getelementptr inbounds %main.T, ptr %12, i32 0, i32 2 + %16 = getelementptr inbounds %main.T, ptr %12, i32 0, i32 3 + store i64 10, ptr %13, align 4 + store i64 20, ptr %14, align 4 + %17 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %18 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %17, i32 0, i32 0 + store ptr @1, ptr %18, align 8 + %19 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %17, i32 0, i32 1 + store i64 5, ptr %19, align 4 + %20 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %17, align 8 + store %"github.com/goplus/llgo/internal/runtime.String" %20, ptr %15, align 8 + %21 = load ptr, ptr @_llgo_int, align 8 + %22 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %23 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %22, i32 0, i32 0 + store ptr %21, ptr %23, align 8 + %24 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %22, i32 0, i32 1 + store ptr inttoptr (i64 1 to ptr), ptr %24, align 8 + %25 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %22, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %25, ptr %16, align 8 + %26 = load %main.T, ptr %12, align 8 + %27 = load ptr, ptr @_llgo_main.T, align 8 + %28 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) + store %main.T %26, ptr %28, align 8 + %29 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %30 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %29, i32 0, i32 0 + store ptr %27, ptr %30, align 8 + %31 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %29, i32 0, i32 1 + store ptr %28, ptr %31, align 8 + %32 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %29, align 8 + %33 = alloca %main.T, align 8 + %34 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %33, i64 48) + %35 = getelementptr inbounds %main.T, ptr %34, i32 0, i32 0 + %36 = getelementptr inbounds %main.T, ptr %34, i32 0, i32 1 + %37 = getelementptr inbounds %main.T, ptr %34, i32 0, i32 2 + %38 = getelementptr inbounds %main.T, ptr %34, i32 0, i32 3 + store i64 10, ptr %35, align 4 + store i64 20, ptr %36, align 4 + %39 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %40 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %39, i32 0, i32 0 + store ptr @1, ptr %40, align 8 + %41 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %39, i32 0, i32 1 + store i64 5, ptr %41, align 4 + %42 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %39, align 8 + store %"github.com/goplus/llgo/internal/runtime.String" %42, ptr %37, align 8 + %43 = load ptr, ptr @_llgo_int, align 8 + %44 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %45 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %44, i32 0, i32 0 + store ptr %43, ptr %45, align 8 + %46 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %44, i32 0, i32 1 + store ptr inttoptr (i64 1 to ptr), ptr %46, align 8 + %47 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %44, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %47, ptr %38, align 8 + %48 = alloca %main.T, align 8 + %49 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %48, i64 48) + %50 = getelementptr inbounds %main.T, ptr %49, i32 0, i32 0 + %51 = getelementptr inbounds %main.T, ptr %49, i32 0, i32 1 + %52 = getelementptr inbounds %main.T, ptr %49, i32 0, i32 2 + %53 = getelementptr inbounds %main.T, ptr %49, i32 0, i32 3 + store i64 10, ptr %50, align 4 + store i64 20, ptr %51, align 4 + %54 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %55 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %54, i32 0, i32 0 + store ptr @1, ptr %55, align 8 + %56 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %54, i32 0, i32 1 + store i64 5, ptr %56, align 4 + %57 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %54, align 8 + store %"github.com/goplus/llgo/internal/runtime.String" %57, ptr %52, align 8 + %58 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %59 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %58, i32 0, i32 0 + store ptr @2, ptr %59, align 8 + %60 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %58, i32 0, i32 1 + store i64 2, ptr %60, align 4 + %61 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %58, align 8 + %62 = load ptr, ptr @_llgo_string, align 8 + %63 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %61, ptr %63, align 8 + %64 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %65 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %64, i32 0, i32 0 + store ptr %62, ptr %65, align 8 + %66 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %64, i32 0, i32 1 + store ptr %63, ptr %66, align 8 + %67 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %64, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %67, ptr %53, align 8 + %68 = load ptr, ptr @_llgo_int, align 8 + %69 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %70 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %69, i32 0, i32 0 + store ptr %68, ptr %70, align 8 + %71 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %69, i32 0, i32 1 + store ptr inttoptr (i64 100 to ptr), ptr %71, align 8 + %72 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %69, align 8 + %73 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %4, %"github.com/goplus/llgo/internal/runtime.eface" %72) + call void @main.assert(i1 %73) + %74 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 + %75 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + store {} zeroinitializer, ptr %75, align 1 + %76 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %77 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %76, i32 0, i32 0 + store ptr %74, ptr %77, align 8 + %78 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %76, i32 0, i32 1 + store ptr %75, ptr %78, align 8 + %79 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %76, align 8 + %80 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %10, %"github.com/goplus/llgo/internal/runtime.eface" %79) + call void @main.assert(i1 %80) + %81 = load ptr, ptr @_llgo_main.N, align 8 + %82 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + store %main.N zeroinitializer, ptr %82, align 1 + %83 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %84 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i32 0, i32 0 + store ptr %81, ptr %84, align 8 + %85 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i32 0, i32 1 + store ptr %82, ptr %85, align 8 + %86 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, align 8 + %87 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %10, %"github.com/goplus/llgo/internal/runtime.eface" %86) + %88 = xor i1 %87, true + call void @main.assert(i1 %88) + %89 = load %main.T, ptr %34, align 8 + %90 = load ptr, ptr @_llgo_main.T, align 8 + %91 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) + store %main.T %89, ptr %91, align 8 + %92 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %93 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %92, i32 0, i32 0 + store ptr %90, ptr %93, align 8 + %94 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %92, i32 0, i32 1 + store ptr %91, ptr %94, align 8 + %95 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %92, align 8 + %96 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %32, %"github.com/goplus/llgo/internal/runtime.eface" %95) + call void @main.assert(i1 %96) + %97 = load %main.T, ptr %49, align 8 + %98 = load ptr, ptr @_llgo_main.T, align 8 + %99 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) + store %main.T %97, ptr %99, align 8 + %100 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %101 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %100, i32 0, i32 0 + store ptr %98, ptr %101, align 8 + %102 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %100, i32 0, i32 1 + store ptr %99, ptr %102, align 8 + %103 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %100, align 8 + %104 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %32, %"github.com/goplus/llgo/internal/runtime.eface" %103) + %105 = xor i1 %104, true + call void @main.assert(i1 %105) ret void } diff --git a/cl/_testgo/errors/out.ll b/cl/_testgo/errors/out.ll index 9aaab61e0..aa4ad95ae 100644 --- a/cl/_testgo/errors/out.ll +++ b/cl/_testgo/errors/out.ll @@ -10,7 +10,6 @@ source_filename = "main" %"github.com/goplus/llgo/internal/abi.Imethod" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr } @"main.init$guard" = global i1 false, align 1 -@"*_llgo_main.errorString" = global ptr null, align 8 @_llgo_main.errorString = global ptr null, align 8 @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = global ptr null, align 8 @_llgo_string = linkonce global ptr null, align 8 @@ -19,6 +18,7 @@ source_filename = "main" @2 = private unnamed_addr constant [5 x i8] c"Error", align 1 @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null, align 8 @3 = private unnamed_addr constant [11 x i8] c"errorString", align 1 +@"*_llgo_main.errorString" = global ptr null, align 8 @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU" = linkonce global ptr null, align 8 @__llgo_argc = global i32 0, align 4 @__llgo_argv = global ptr null, align 8 diff --git a/cl/_testgo/ifaceprom/out.ll b/cl/_testgo/ifaceprom/out.ll index dbdfef0e9..b284f78fd 100644 --- a/cl/_testgo/ifaceprom/out.ll +++ b/cl/_testgo/ifaceprom/out.ll @@ -5,9 +5,9 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.iface" = type { ptr, ptr } %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } %main.impl = type {} -%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 } +%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr } %"github.com/goplus/llgo/internal/abi.Imethod" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 } @@ -204,422 +204,406 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %27 = load ptr, ptr @_llgo_int, align 8 - %28 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %27, i32 0, i32 6 - %29 = load i8, ptr %28, align 1 - %30 = or i8 %29, 32 - store i8 %30, ptr %28, align 1 - %31 = inttoptr i64 %25 to ptr - %32 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %33 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %32, i32 0, i32 0 - store ptr %27, ptr %33, align 8 - %34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %32, i32 0, i32 1 - store ptr %31, ptr %34, align 8 - %35 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %32, align 8 - call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %35) + %28 = inttoptr i64 %25 to ptr + %29 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %30 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %29, i32 0, i32 0 + store ptr %27, ptr %30, align 8 + %31 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %29, i32 0, i32 1 + store ptr %28, ptr %31, align 8 + %32 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %29, align 8 + call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %32) unreachable _llgo_2: ; preds = %_llgo_0 - %36 = load %main.S, ptr %3, align 8 - %37 = extractvalue %main.S %36, 0 - %38 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %37) - %39 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %37, 0 - %40 = getelementptr ptr, ptr %39, i64 3 - %41 = load ptr, ptr %40, align 8 - %42 = alloca { ptr, ptr }, align 8 - %43 = getelementptr inbounds { ptr, ptr }, ptr %42, i32 0, i32 0 - store ptr %41, ptr %43, align 8 - %44 = getelementptr inbounds { ptr, ptr }, ptr %42, i32 0, i32 1 - store ptr %38, ptr %44, align 8 - %45 = load { ptr, ptr }, ptr %42, align 8 - %46 = extractvalue { ptr, ptr } %45, 1 - %47 = extractvalue { ptr, ptr } %45, 0 - %48 = call i64 %47(ptr %46) - %49 = icmp ne i64 %48, 1 - br i1 %49, label %_llgo_3, label %_llgo_4 + %33 = load %main.S, ptr %3, align 8 + %34 = extractvalue %main.S %33, 0 + %35 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %34) + %36 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %34, 0 + %37 = getelementptr ptr, ptr %36, i64 3 + %38 = load ptr, ptr %37, align 8 + %39 = alloca { ptr, ptr }, align 8 + %40 = getelementptr inbounds { ptr, ptr }, ptr %39, i32 0, i32 0 + store ptr %38, ptr %40, align 8 + %41 = getelementptr inbounds { ptr, ptr }, ptr %39, i32 0, i32 1 + store ptr %35, ptr %41, align 8 + %42 = load { ptr, ptr }, ptr %39, align 8 + %43 = extractvalue { ptr, ptr } %42, 1 + %44 = extractvalue { ptr, ptr } %42, 0 + %45 = call i64 %44(ptr %43) + %46 = icmp ne i64 %45, 1 + br i1 %46, label %_llgo_3, label %_llgo_4 _llgo_3: ; preds = %_llgo_2 - %50 = load ptr, ptr @_llgo_int, align 8 - %51 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %50, i32 0, i32 6 - %52 = load i8, ptr %51, align 1 - %53 = or i8 %52, 32 - store i8 %53, ptr %51, align 1 - %54 = inttoptr i64 %48 to ptr - %55 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %56 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %55, i32 0, i32 0 - store ptr %50, ptr %56, align 8 - %57 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %55, i32 0, i32 1 - store ptr %54, ptr %57, align 8 - %58 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %55, align 8 - call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %58) + %47 = load ptr, ptr @_llgo_int, align 8 + %48 = inttoptr i64 %45 to ptr + %49 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %50 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %49, i32 0, i32 0 + store ptr %47, ptr %50, align 8 + %51 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %49, i32 0, i32 1 + store ptr %48, ptr %51, align 8 + %52 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %49, align 8 + call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %52) unreachable _llgo_4: ; preds = %_llgo_2 - %59 = getelementptr inbounds %main.S, ptr %3, i32 0, i32 0 - %60 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %59, align 8 - %61 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %60) - %62 = load ptr, ptr @_llgo_main.I, align 8 - %63 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %62, ptr %61) - br i1 %63, label %_llgo_17, label %_llgo_18 + %53 = getelementptr inbounds %main.S, ptr %3, i32 0, i32 0 + %54 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %53, align 8 + %55 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %54) + %56 = load ptr, ptr @_llgo_main.I, align 8 + %57 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %56, ptr %55) + br i1 %57, label %_llgo_17, label %_llgo_18 _llgo_5: ; preds = %_llgo_17 - %64 = load ptr, ptr @_llgo_int, align 8 - %65 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %64, i32 0, i32 6 - %66 = load i8, ptr %65, align 1 - %67 = or i8 %66, 32 - store i8 %67, ptr %65, align 1 - %68 = inttoptr i64 %178 to ptr - %69 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %70 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %69, i32 0, i32 0 - store ptr %64, ptr %70, align 8 - %71 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %69, i32 0, i32 1 - store ptr %68, ptr %71, align 8 - %72 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %69, align 8 - call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %72) + %58 = load ptr, ptr @_llgo_int, align 8 + %59 = inttoptr i64 %166 to ptr + %60 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %61 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %60, i32 0, i32 0 + store ptr %58, ptr %61, align 8 + %62 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %60, i32 0, i32 1 + store ptr %59, ptr %62, align 8 + %63 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %60, align 8 + call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %63) unreachable _llgo_6: ; preds = %_llgo_17 - %73 = load %main.S, ptr %3, align 8 - %74 = extractvalue %main.S %73, 0 - %75 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %74) - %76 = load ptr, ptr @_llgo_main.I, align 8 - %77 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %76, ptr %75) - br i1 %77, label %_llgo_19, label %_llgo_20 + %64 = load %main.S, ptr %3, align 8 + %65 = extractvalue %main.S %64, 0 + %66 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %65) + %67 = load ptr, ptr @_llgo_main.I, align 8 + %68 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %67, ptr %66) + br i1 %68, label %_llgo_19, label %_llgo_20 _llgo_7: ; preds = %_llgo_19 - %78 = load ptr, ptr @_llgo_int, align 8 - %79 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %78, i32 0, i32 6 - %80 = load i8, ptr %79, align 1 - %81 = or i8 %80, 32 - store i8 %81, ptr %79, align 1 - %82 = inttoptr i64 %205 to ptr - %83 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %84 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i32 0, i32 0 - store ptr %78, ptr %84, align 8 - %85 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i32 0, i32 1 - store ptr %82, ptr %85, align 8 - %86 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, align 8 - call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %86) + %69 = load ptr, ptr @_llgo_int, align 8 + %70 = inttoptr i64 %193 to ptr + %71 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %72 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %71, i32 0, i32 0 + store ptr %69, ptr %72, align 8 + %73 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %71, i32 0, i32 1 + store ptr %70, ptr %73, align 8 + %74 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %71, align 8 + call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %74) unreachable _llgo_8: ; preds = %_llgo_19 - %87 = getelementptr inbounds %main.S, ptr %3, i32 0, i32 0 - %88 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %87, align 8 - %89 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %88) - %90 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %88, 0 - %91 = getelementptr ptr, ptr %90, i64 4 - %92 = load ptr, ptr %91, align 8 - %93 = alloca { ptr, ptr }, align 8 - %94 = getelementptr inbounds { ptr, ptr }, ptr %93, i32 0, i32 0 - store ptr %92, ptr %94, align 8 - %95 = getelementptr inbounds { ptr, ptr }, ptr %93, i32 0, i32 1 - store ptr %89, ptr %95, align 8 - %96 = load { ptr, ptr }, ptr %93, align 8 - %97 = extractvalue { ptr, ptr } %96, 1 - %98 = extractvalue { ptr, ptr } %96, 0 - %99 = call %"github.com/goplus/llgo/internal/runtime.String" %98(ptr %97) - %100 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %101 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %100, i32 0, i32 0 - store ptr @0, ptr %101, align 8 - %102 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %100, i32 0, i32 1 - store i64 3, ptr %102, align 4 - %103 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %100, align 8 - %104 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %99, %"github.com/goplus/llgo/internal/runtime.String" %103) - %105 = xor i1 %104, true - br i1 %105, label %_llgo_9, label %_llgo_10 + %75 = getelementptr inbounds %main.S, ptr %3, i32 0, i32 0 + %76 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %75, align 8 + %77 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %76) + %78 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %76, 0 + %79 = getelementptr ptr, ptr %78, i64 4 + %80 = load ptr, ptr %79, align 8 + %81 = alloca { ptr, ptr }, align 8 + %82 = getelementptr inbounds { ptr, ptr }, ptr %81, i32 0, i32 0 + store ptr %80, ptr %82, align 8 + %83 = getelementptr inbounds { ptr, ptr }, ptr %81, i32 0, i32 1 + store ptr %77, ptr %83, align 8 + %84 = load { ptr, ptr }, ptr %81, align 8 + %85 = extractvalue { ptr, ptr } %84, 1 + %86 = extractvalue { ptr, ptr } %84, 0 + %87 = call %"github.com/goplus/llgo/internal/runtime.String" %86(ptr %85) + %88 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %89 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %88, i32 0, i32 0 + store ptr @0, ptr %89, align 8 + %90 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %88, i32 0, i32 1 + store i64 3, ptr %90, align 4 + %91 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %88, align 8 + %92 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %87, %"github.com/goplus/llgo/internal/runtime.String" %91) + %93 = xor i1 %92, true + br i1 %93, label %_llgo_9, label %_llgo_10 _llgo_9: ; preds = %_llgo_8 - %106 = load ptr, ptr @_llgo_string, align 8 - %107 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %99, ptr %107, align 8 - %108 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %109 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %108, i32 0, i32 0 - store ptr %106, ptr %109, align 8 - %110 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %108, i32 0, i32 1 - store ptr %107, ptr %110, align 8 - %111 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %108, align 8 - call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %111) + %94 = load ptr, ptr @_llgo_string, align 8 + %95 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %87, ptr %95, align 8 + %96 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %97 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %96, i32 0, i32 0 + store ptr %94, ptr %97, align 8 + %98 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %96, i32 0, i32 1 + store ptr %95, ptr %98, align 8 + %99 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %96, align 8 + call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %99) unreachable _llgo_10: ; preds = %_llgo_8 - %112 = load %main.S, ptr %3, align 8 - %113 = extractvalue %main.S %112, 0 - %114 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %113) - %115 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %113, 0 - %116 = getelementptr ptr, ptr %115, i64 4 - %117 = load ptr, ptr %116, align 8 - %118 = alloca { ptr, ptr }, align 8 - %119 = getelementptr inbounds { ptr, ptr }, ptr %118, i32 0, i32 0 - store ptr %117, ptr %119, align 8 - %120 = getelementptr inbounds { ptr, ptr }, ptr %118, i32 0, i32 1 - store ptr %114, ptr %120, align 8 - %121 = load { ptr, ptr }, ptr %118, align 8 - %122 = extractvalue { ptr, ptr } %121, 1 - %123 = extractvalue { ptr, ptr } %121, 0 - %124 = call %"github.com/goplus/llgo/internal/runtime.String" %123(ptr %122) - %125 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %126 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %125, i32 0, i32 0 - store ptr @0, ptr %126, align 8 - %127 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %125, i32 0, i32 1 - store i64 3, ptr %127, align 4 - %128 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %125, align 8 - %129 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %124, %"github.com/goplus/llgo/internal/runtime.String" %128) - %130 = xor i1 %129, true - br i1 %130, label %_llgo_11, label %_llgo_12 + %100 = load %main.S, ptr %3, align 8 + %101 = extractvalue %main.S %100, 0 + %102 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %101) + %103 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %101, 0 + %104 = getelementptr ptr, ptr %103, i64 4 + %105 = load ptr, ptr %104, align 8 + %106 = alloca { ptr, ptr }, align 8 + %107 = getelementptr inbounds { ptr, ptr }, ptr %106, i32 0, i32 0 + store ptr %105, ptr %107, align 8 + %108 = getelementptr inbounds { ptr, ptr }, ptr %106, i32 0, i32 1 + store ptr %102, ptr %108, align 8 + %109 = load { ptr, ptr }, ptr %106, align 8 + %110 = extractvalue { ptr, ptr } %109, 1 + %111 = extractvalue { ptr, ptr } %109, 0 + %112 = call %"github.com/goplus/llgo/internal/runtime.String" %111(ptr %110) + %113 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %114 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %113, i32 0, i32 0 + store ptr @0, ptr %114, align 8 + %115 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %113, i32 0, i32 1 + store i64 3, ptr %115, align 4 + %116 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %113, align 8 + %117 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %112, %"github.com/goplus/llgo/internal/runtime.String" %116) + %118 = xor i1 %117, true + br i1 %118, label %_llgo_11, label %_llgo_12 _llgo_11: ; preds = %_llgo_10 - %131 = load ptr, ptr @_llgo_string, align 8 - %132 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %124, ptr %132, align 8 - %133 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %134 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %133, i32 0, i32 0 - store ptr %131, ptr %134, align 8 - %135 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %133, i32 0, i32 1 - store ptr %132, ptr %135, align 8 - %136 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %133, align 8 - call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %136) + %119 = load ptr, ptr @_llgo_string, align 8 + %120 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %112, ptr %120, align 8 + %121 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %122 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %121, i32 0, i32 0 + store ptr %119, ptr %122, align 8 + %123 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %121, i32 0, i32 1 + store ptr %120, ptr %123, align 8 + %124 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %121, align 8 + call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %124) unreachable _llgo_12: ; preds = %_llgo_10 - %137 = getelementptr inbounds %main.S, ptr %3, i32 0, i32 0 - %138 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %137, align 8 - %139 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %138) - %140 = load ptr, ptr @_llgo_main.I, align 8 - %141 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %140, ptr %139) - br i1 %141, label %_llgo_21, label %_llgo_22 + %125 = getelementptr inbounds %main.S, ptr %3, i32 0, i32 0 + %126 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %125, align 8 + %127 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %126) + %128 = load ptr, ptr @_llgo_main.I, align 8 + %129 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %128, ptr %127) + br i1 %129, label %_llgo_21, label %_llgo_22 _llgo_13: ; preds = %_llgo_21 - %142 = load ptr, ptr @_llgo_string, align 8 - %143 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %232, ptr %143, align 8 - %144 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %145 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %144, i32 0, i32 0 - store ptr %142, ptr %145, align 8 - %146 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %144, i32 0, i32 1 - store ptr %143, ptr %146, align 8 - %147 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %144, align 8 - call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %147) + %130 = load ptr, ptr @_llgo_string, align 8 + %131 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %220, ptr %131, align 8 + %132 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %133 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %132, i32 0, i32 0 + store ptr %130, ptr %133, align 8 + %134 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %132, i32 0, i32 1 + store ptr %131, ptr %134, align 8 + %135 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %132, align 8 + call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %135) unreachable _llgo_14: ; preds = %_llgo_21 - %148 = load %main.S, ptr %3, align 8 - %149 = extractvalue %main.S %148, 0 - %150 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %149) - %151 = load ptr, ptr @_llgo_main.I, align 8 - %152 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %151, ptr %150) - br i1 %152, label %_llgo_23, label %_llgo_24 + %136 = load %main.S, ptr %3, align 8 + %137 = extractvalue %main.S %136, 0 + %138 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %137) + %139 = load ptr, ptr @_llgo_main.I, align 8 + %140 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %139, ptr %138) + br i1 %140, label %_llgo_23, label %_llgo_24 _llgo_15: ; preds = %_llgo_23 - %153 = load ptr, ptr @_llgo_string, align 8 - %154 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %264, ptr %154, align 8 - %155 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %156 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %155, i32 0, i32 0 - store ptr %153, ptr %156, align 8 - %157 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %155, i32 0, i32 1 - store ptr %154, ptr %157, align 8 - %158 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %155, align 8 - call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %158) + %141 = load ptr, ptr @_llgo_string, align 8 + %142 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %252, ptr %142, align 8 + %143 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %144 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %143, i32 0, i32 0 + store ptr %141, ptr %144, align 8 + %145 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %143, i32 0, i32 1 + store ptr %142, ptr %145, align 8 + %146 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %143, align 8 + call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %146) unreachable _llgo_16: ; preds = %_llgo_23 - %159 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %160 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %159, i32 0, i32 0 - store ptr @8, ptr %160, align 8 - %161 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %159, i32 0, i32 1 - store i64 4, ptr %161, align 4 - %162 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %159, align 8 - call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %162) + %147 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %148 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %147, i32 0, i32 0 + store ptr @8, ptr %148, align 8 + %149 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %147, i32 0, i32 1 + store i64 4, ptr %149, align 4 + %150 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %147, align 8 + call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %150) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10) ret i32 0 _llgo_17: ; preds = %_llgo_4 - %163 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %60, 1 - %164 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8 - %165 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %164, ptr %61) - %166 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 - %167 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %166, i32 0, i32 0 - store ptr %165, ptr %167, align 8 - %168 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %166, i32 0, i32 1 - store ptr %163, ptr %168, align 8 - %169 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %166, align 8 - %170 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - %171 = getelementptr inbounds { %"github.com/goplus/llgo/internal/runtime.iface" }, ptr %170, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.iface" %60, ptr %171, align 8 - %172 = alloca { ptr, ptr }, align 8 - %173 = getelementptr inbounds { ptr, ptr }, ptr %172, i32 0, i32 0 - store ptr @"main.one$bound", ptr %173, align 8 - %174 = getelementptr inbounds { ptr, ptr }, ptr %172, i32 0, i32 1 - store ptr %170, ptr %174, align 8 - %175 = load { ptr, ptr }, ptr %172, align 8 - %176 = extractvalue { ptr, ptr } %175, 1 - %177 = extractvalue { ptr, ptr } %175, 0 - %178 = call i64 %177(ptr %176) - %179 = icmp ne i64 %178, 1 - br i1 %179, label %_llgo_5, label %_llgo_6 + %151 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %54, 1 + %152 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8 + %153 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %152, ptr %55) + %154 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 + %155 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %154, i32 0, i32 0 + store ptr %153, ptr %155, align 8 + %156 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %154, i32 0, i32 1 + store ptr %151, ptr %156, align 8 + %157 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %154, align 8 + %158 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + %159 = getelementptr inbounds { %"github.com/goplus/llgo/internal/runtime.iface" }, ptr %158, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.iface" %54, ptr %159, align 8 + %160 = alloca { ptr, ptr }, align 8 + %161 = getelementptr inbounds { ptr, ptr }, ptr %160, i32 0, i32 0 + store ptr @"main.one$bound", ptr %161, align 8 + %162 = getelementptr inbounds { ptr, ptr }, ptr %160, i32 0, i32 1 + store ptr %158, ptr %162, align 8 + %163 = load { ptr, ptr }, ptr %160, align 8 + %164 = extractvalue { ptr, ptr } %163, 1 + %165 = extractvalue { ptr, ptr } %163, 0 + %166 = call i64 %165(ptr %164) + %167 = icmp ne i64 %166, 1 + br i1 %167, label %_llgo_5, label %_llgo_6 _llgo_18: ; preds = %_llgo_4 - %180 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %181 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %180, i32 0, i32 0 - store ptr @7, ptr %181, align 8 - %182 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %180, i32 0, i32 1 - store i64 21, ptr %182, align 4 - %183 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %180, align 8 - %184 = load ptr, ptr @_llgo_string, align 8 - %185 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %183, ptr %185, align 8 - %186 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %187 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %186, i32 0, i32 0 - store ptr %184, ptr %187, align 8 - %188 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %186, i32 0, i32 1 - store ptr %185, ptr %188, align 8 - %189 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %186, align 8 - call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %189) + %168 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %169 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %168, i32 0, i32 0 + store ptr @7, ptr %169, align 8 + %170 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %168, i32 0, i32 1 + store i64 21, ptr %170, align 4 + %171 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %168, align 8 + %172 = load ptr, ptr @_llgo_string, align 8 + %173 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %171, ptr %173, align 8 + %174 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %175 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %174, i32 0, i32 0 + store ptr %172, ptr %175, align 8 + %176 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %174, i32 0, i32 1 + store ptr %173, ptr %176, align 8 + %177 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %174, align 8 + call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %177) unreachable _llgo_19: ; preds = %_llgo_6 - %190 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %74, 1 - %191 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8 - %192 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %191, ptr %75) - %193 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 - %194 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %193, i32 0, i32 0 - store ptr %192, ptr %194, align 8 - %195 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %193, i32 0, i32 1 - store ptr %190, ptr %195, align 8 - %196 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %193, align 8 - %197 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - %198 = getelementptr inbounds { %"github.com/goplus/llgo/internal/runtime.iface" }, ptr %197, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.iface" %74, ptr %198, align 8 - %199 = alloca { ptr, ptr }, align 8 - %200 = getelementptr inbounds { ptr, ptr }, ptr %199, i32 0, i32 0 - store ptr @"main.one$bound", ptr %200, align 8 - %201 = getelementptr inbounds { ptr, ptr }, ptr %199, i32 0, i32 1 - store ptr %197, ptr %201, align 8 - %202 = load { ptr, ptr }, ptr %199, align 8 - %203 = extractvalue { ptr, ptr } %202, 1 - %204 = extractvalue { ptr, ptr } %202, 0 - %205 = call i64 %204(ptr %203) - %206 = icmp ne i64 %205, 1 - br i1 %206, label %_llgo_7, label %_llgo_8 + %178 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %65, 1 + %179 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8 + %180 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %179, ptr %66) + %181 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 + %182 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %181, i32 0, i32 0 + store ptr %180, ptr %182, align 8 + %183 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %181, i32 0, i32 1 + store ptr %178, ptr %183, align 8 + %184 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %181, align 8 + %185 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + %186 = getelementptr inbounds { %"github.com/goplus/llgo/internal/runtime.iface" }, ptr %185, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.iface" %65, ptr %186, align 8 + %187 = alloca { ptr, ptr }, align 8 + %188 = getelementptr inbounds { ptr, ptr }, ptr %187, i32 0, i32 0 + store ptr @"main.one$bound", ptr %188, align 8 + %189 = getelementptr inbounds { ptr, ptr }, ptr %187, i32 0, i32 1 + store ptr %185, ptr %189, align 8 + %190 = load { ptr, ptr }, ptr %187, align 8 + %191 = extractvalue { ptr, ptr } %190, 1 + %192 = extractvalue { ptr, ptr } %190, 0 + %193 = call i64 %192(ptr %191) + %194 = icmp ne i64 %193, 1 + br i1 %194, label %_llgo_7, label %_llgo_8 _llgo_20: ; preds = %_llgo_6 - %207 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %208 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %207, i32 0, i32 0 - store ptr @7, ptr %208, align 8 - %209 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %207, i32 0, i32 1 - store i64 21, ptr %209, align 4 - %210 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %207, align 8 - %211 = load ptr, ptr @_llgo_string, align 8 - %212 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %210, ptr %212, align 8 - %213 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %214 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %213, i32 0, i32 0 - store ptr %211, ptr %214, align 8 - %215 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %213, i32 0, i32 1 - store ptr %212, ptr %215, align 8 - %216 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %213, align 8 - call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %216) + %195 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %196 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %195, i32 0, i32 0 + store ptr @7, ptr %196, align 8 + %197 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %195, i32 0, i32 1 + store i64 21, ptr %197, align 4 + %198 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %195, align 8 + %199 = load ptr, ptr @_llgo_string, align 8 + %200 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %198, ptr %200, align 8 + %201 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %202 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %201, i32 0, i32 0 + store ptr %199, ptr %202, align 8 + %203 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %201, i32 0, i32 1 + store ptr %200, ptr %203, align 8 + %204 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %201, align 8 + call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %204) unreachable _llgo_21: ; preds = %_llgo_12 - %217 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %138, 1 - %218 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8 - %219 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %218, ptr %139) - %220 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 - %221 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %220, i32 0, i32 0 - store ptr %219, ptr %221, align 8 - %222 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %220, i32 0, i32 1 - store ptr %217, ptr %222, align 8 - %223 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %220, align 8 - %224 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - %225 = getelementptr inbounds { %"github.com/goplus/llgo/internal/runtime.iface" }, ptr %224, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.iface" %138, ptr %225, align 8 - %226 = alloca { ptr, ptr }, align 8 - %227 = getelementptr inbounds { ptr, ptr }, ptr %226, i32 0, i32 0 - store ptr @"main.two$bound", ptr %227, align 8 - %228 = getelementptr inbounds { ptr, ptr }, ptr %226, i32 0, i32 1 - store ptr %224, ptr %228, align 8 - %229 = load { ptr, ptr }, ptr %226, align 8 - %230 = extractvalue { ptr, ptr } %229, 1 - %231 = extractvalue { ptr, ptr } %229, 0 - %232 = call %"github.com/goplus/llgo/internal/runtime.String" %231(ptr %230) - %233 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %234 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %233, i32 0, i32 0 - store ptr @0, ptr %234, align 8 - %235 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %233, i32 0, i32 1 - store i64 3, ptr %235, align 4 - %236 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %233, align 8 - %237 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %232, %"github.com/goplus/llgo/internal/runtime.String" %236) - %238 = xor i1 %237, true - br i1 %238, label %_llgo_13, label %_llgo_14 + %205 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %126, 1 + %206 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8 + %207 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %206, ptr %127) + %208 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 + %209 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %208, i32 0, i32 0 + store ptr %207, ptr %209, align 8 + %210 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %208, i32 0, i32 1 + store ptr %205, ptr %210, align 8 + %211 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %208, align 8 + %212 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + %213 = getelementptr inbounds { %"github.com/goplus/llgo/internal/runtime.iface" }, ptr %212, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.iface" %126, ptr %213, align 8 + %214 = alloca { ptr, ptr }, align 8 + %215 = getelementptr inbounds { ptr, ptr }, ptr %214, i32 0, i32 0 + store ptr @"main.two$bound", ptr %215, align 8 + %216 = getelementptr inbounds { ptr, ptr }, ptr %214, i32 0, i32 1 + store ptr %212, ptr %216, align 8 + %217 = load { ptr, ptr }, ptr %214, align 8 + %218 = extractvalue { ptr, ptr } %217, 1 + %219 = extractvalue { ptr, ptr } %217, 0 + %220 = call %"github.com/goplus/llgo/internal/runtime.String" %219(ptr %218) + %221 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %222 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %221, i32 0, i32 0 + store ptr @0, ptr %222, align 8 + %223 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %221, i32 0, i32 1 + store i64 3, ptr %223, align 4 + %224 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %221, align 8 + %225 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %220, %"github.com/goplus/llgo/internal/runtime.String" %224) + %226 = xor i1 %225, true + br i1 %226, label %_llgo_13, label %_llgo_14 _llgo_22: ; preds = %_llgo_12 - %239 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %240 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %239, i32 0, i32 0 - store ptr @7, ptr %240, align 8 - %241 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %239, i32 0, i32 1 - store i64 21, ptr %241, align 4 - %242 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %239, align 8 - %243 = load ptr, ptr @_llgo_string, align 8 - %244 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %242, ptr %244, align 8 - %245 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %246 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %245, i32 0, i32 0 - store ptr %243, ptr %246, align 8 - %247 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %245, i32 0, i32 1 - store ptr %244, ptr %247, align 8 - %248 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %245, align 8 - call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %248) + %227 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %228 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %227, i32 0, i32 0 + store ptr @7, ptr %228, align 8 + %229 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %227, i32 0, i32 1 + store i64 21, ptr %229, align 4 + %230 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %227, align 8 + %231 = load ptr, ptr @_llgo_string, align 8 + %232 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %230, ptr %232, align 8 + %233 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %234 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %233, i32 0, i32 0 + store ptr %231, ptr %234, align 8 + %235 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %233, i32 0, i32 1 + store ptr %232, ptr %235, align 8 + %236 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %233, align 8 + call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %236) unreachable _llgo_23: ; preds = %_llgo_14 - %249 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %149, 1 - %250 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8 - %251 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %250, ptr %150) - %252 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 - %253 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %252, i32 0, i32 0 - store ptr %251, ptr %253, align 8 - %254 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %252, i32 0, i32 1 - store ptr %249, ptr %254, align 8 - %255 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %252, align 8 - %256 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - %257 = getelementptr inbounds { %"github.com/goplus/llgo/internal/runtime.iface" }, ptr %256, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.iface" %149, ptr %257, align 8 - %258 = alloca { ptr, ptr }, align 8 - %259 = getelementptr inbounds { ptr, ptr }, ptr %258, i32 0, i32 0 - store ptr @"main.two$bound", ptr %259, align 8 - %260 = getelementptr inbounds { ptr, ptr }, ptr %258, i32 0, i32 1 - store ptr %256, ptr %260, align 8 - %261 = load { ptr, ptr }, ptr %258, align 8 - %262 = extractvalue { ptr, ptr } %261, 1 - %263 = extractvalue { ptr, ptr } %261, 0 - %264 = call %"github.com/goplus/llgo/internal/runtime.String" %263(ptr %262) - %265 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %266 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %265, i32 0, i32 0 - store ptr @0, ptr %266, align 8 - %267 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %265, i32 0, i32 1 - store i64 3, ptr %267, align 4 - %268 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %265, align 8 - %269 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %264, %"github.com/goplus/llgo/internal/runtime.String" %268) - %270 = xor i1 %269, true - br i1 %270, label %_llgo_15, label %_llgo_16 + %237 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %137, 1 + %238 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8 + %239 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %238, ptr %138) + %240 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 + %241 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %240, i32 0, i32 0 + store ptr %239, ptr %241, align 8 + %242 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %240, i32 0, i32 1 + store ptr %237, ptr %242, align 8 + %243 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %240, align 8 + %244 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + %245 = getelementptr inbounds { %"github.com/goplus/llgo/internal/runtime.iface" }, ptr %244, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.iface" %137, ptr %245, align 8 + %246 = alloca { ptr, ptr }, align 8 + %247 = getelementptr inbounds { ptr, ptr }, ptr %246, i32 0, i32 0 + store ptr @"main.two$bound", ptr %247, align 8 + %248 = getelementptr inbounds { ptr, ptr }, ptr %246, i32 0, i32 1 + store ptr %244, ptr %248, align 8 + %249 = load { ptr, ptr }, ptr %246, align 8 + %250 = extractvalue { ptr, ptr } %249, 1 + %251 = extractvalue { ptr, ptr } %249, 0 + %252 = call %"github.com/goplus/llgo/internal/runtime.String" %251(ptr %250) + %253 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %254 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %253, i32 0, i32 0 + store ptr @0, ptr %254, align 8 + %255 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %253, i32 0, i32 1 + store i64 3, ptr %255, align 4 + %256 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %253, align 8 + %257 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %252, %"github.com/goplus/llgo/internal/runtime.String" %256) + %258 = xor i1 %257, true + br i1 %258, label %_llgo_15, label %_llgo_16 _llgo_24: ; preds = %_llgo_14 - %271 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %272 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %271, i32 0, i32 0 - store ptr @7, ptr %272, align 8 - %273 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %271, i32 0, i32 1 - store i64 21, ptr %273, align 4 - %274 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %271, align 8 - %275 = load ptr, ptr @_llgo_string, align 8 - %276 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %274, ptr %276, align 8 - %277 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %278 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %277, i32 0, i32 0 - store ptr %275, ptr %278, align 8 - %279 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %277, i32 0, i32 1 - store ptr %276, ptr %279, align 8 - %280 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %277, align 8 - call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %280) + %259 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %260 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %259, i32 0, i32 0 + store ptr @7, ptr %260, align 8 + %261 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %259, i32 0, i32 1 + store i64 21, ptr %261, align 4 + %262 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %259, align 8 + %263 = load ptr, ptr @_llgo_string, align 8 + %264 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %262, ptr %264, align 8 + %265 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %266 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %265, i32 0, i32 0 + store ptr %263, ptr %266, align 8 + %267 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %265, i32 0, i32 1 + store ptr %264, ptr %267, align 8 + %268 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %265, align 8 + call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %268) unreachable } diff --git a/cl/_testgo/interface/out.ll b/cl/_testgo/interface/out.ll index 6c164964b..ae1bf505f 100644 --- a/cl/_testgo/interface/out.ll +++ b/cl/_testgo/interface/out.ll @@ -13,10 +13,8 @@ source_filename = "main" @"main.init$guard" = global i1 false, align 1 @__llgo_argc = global i32 0, align 4 @__llgo_argv = global ptr null, align 8 -@"*_llgo_main.Game1" = linkonce global ptr null, align 8 @_llgo_main.Game1 = linkonce global ptr null, align 8 @"_llgo_struct$cJmCzeVn0orHWafCrTGAnbbAF46F2A4Fms4bJBm8ITI" = linkonce global ptr null, align 8 -@"*_llgo_github.com/goplus/llgo/cl/internal/foo.Game" = linkonce global ptr null, align 8 @"_llgo_github.com/goplus/llgo/cl/internal/foo.Game" = linkonce global ptr null, align 8 @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [4 x i8] c"main", align 1 @@ -26,11 +24,13 @@ source_filename = "main" @3 = private unnamed_addr constant [47 x i8] c"github.com/goplus/llgo/cl/internal/foo.initGame", align 1 @4 = private unnamed_addr constant [38 x i8] c"github.com/goplus/llgo/cl/internal/foo", align 1 @5 = private unnamed_addr constant [4 x i8] c"Game", align 1 +@"*_llgo_github.com/goplus/llgo/cl/internal/foo.Game" = linkonce global ptr null, align 8 @6 = private unnamed_addr constant [5 x i8] c"Game1", align 1 -@"*_llgo_main.Game2" = linkonce global ptr null, align 8 +@"*_llgo_main.Game1" = linkonce global ptr null, align 8 @_llgo_main.Game2 = linkonce global ptr null, align 8 @7 = private unnamed_addr constant [13 x i8] c"main.initGame", align 1 @8 = private unnamed_addr constant [5 x i8] c"Game2", align 1 +@"*_llgo_main.Game2" = linkonce global ptr null, align 8 @"_llgo_github.com/goplus/llgo/cl/internal/foo.Gamer" = linkonce global ptr null, align 8 @9 = private unnamed_addr constant [44 x i8] c"github.com/goplus/llgo/cl/internal/foo.Gamer", align 1 @"main.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg" = global ptr null, align 8 @@ -258,6 +258,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %2 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 2, i64 2) + call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %2) store ptr %2, ptr @_llgo_main.Game1, align 8 br label %_llgo_2 @@ -446,6 +447,7 @@ _llgo_13: ; preds = %_llgo_12 store i64 1, ptr %102, align 4 %103 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %99, align 8 %104 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %96, i64 8, %"github.com/goplus/llgo/internal/runtime.Slice" %103) + call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %104) store ptr %104, ptr @"_llgo_struct$cJmCzeVn0orHWafCrTGAnbbAF46F2A4Fms4bJBm8ITI", align 8 br label %_llgo_14 @@ -467,267 +469,290 @@ _llgo_15: ; preds = %_llgo_14 %113 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %111, i32 0, i32 1 store ptr %110, ptr %113, align 8 %114 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %111, i32 0, i32 2 - store ptr @"github.com/goplus/llgo/cl/internal/foo.(*Game).Load", ptr %114, align 8 + store ptr @"main.(*Game1).Load", ptr %114, align 8 %115 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %111, i32 0, i32 3 - store ptr @"github.com/goplus/llgo/cl/internal/foo.(*Game).Load", ptr %115, align 8 + store ptr @"main.(*Game1).Load", ptr %115, align 8 %116 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %111, align 8 - %117 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %118 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %117, i32 0, i32 0 - store ptr @2, ptr %118, align 8 - %119 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %117, i32 0, i32 1 - store i64 8, ptr %119, align 4 - %120 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %117, align 8 - %121 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %122 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %121, i32 0, i32 0 - store ptr @3, ptr %122, align 8 - %123 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %121, i32 0, i32 1 - store i64 47, ptr %123, align 4 - %124 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %121, align 8 - %125 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %126 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %127 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %126, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %124, ptr %127, align 8 - %128 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %126, i32 0, i32 1 - store ptr %125, ptr %128, align 8 - %129 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %126, i32 0, i32 2 - store ptr @"github.com/goplus/llgo/cl/internal/foo.(*Game).initGame", ptr %129, align 8 - %130 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %126, i32 0, i32 3 - store ptr @"github.com/goplus/llgo/cl/internal/foo.(*Game).initGame", ptr %130, align 8 - %131 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %126, align 8 - %132 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80) - %133 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %132, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %116, ptr %133, align 8 - %134 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %132, i64 1 - store %"github.com/goplus/llgo/internal/abi.Method" %131, ptr %134, align 8 - %135 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %136 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %135, i32 0, i32 0 - store ptr %132, ptr %136, align 8 - %137 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %135, i32 0, i32 1 - store i64 2, ptr %137, align 4 - %138 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %135, i32 0, i32 2 - store i64 2, ptr %138, align 4 - %139 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %135, align 8 - %140 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %141 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %140, i32 0, i32 0 - store ptr @0, ptr %141, align 8 - %142 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %140, i32 0, i32 1 - store i64 4, ptr %142, align 4 - %143 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %140, align 8 - %144 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %145 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %144, i32 0, i32 0 - store ptr @6, ptr %145, align 8 - %146 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %144, i32 0, i32 1 - store i64 5, ptr %146, align 4 - %147 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %144, align 8 - call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %2, %"github.com/goplus/llgo/internal/runtime.String" %143, %"github.com/goplus/llgo/internal/runtime.String" %147, ptr %105, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %139) + %117 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %118 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %117, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %109, ptr %118, align 8 + %119 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %117, i32 0, i32 1 + store ptr %110, ptr %119, align 8 + %120 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %117, i32 0, i32 2 + store ptr @"main.(*Game1).Load", ptr %120, align 8 + %121 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %117, i32 0, i32 3 + store ptr @main.Game1.Load, ptr %121, align 8 + %122 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %117, align 8 + %123 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %124 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %123, i32 0, i32 0 + store ptr @2, ptr %124, align 8 + %125 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %123, i32 0, i32 1 + store i64 8, ptr %125, align 4 + %126 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %123, align 8 + %127 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %128 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %127, i32 0, i32 0 + store ptr @3, ptr %128, align 8 + %129 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %127, i32 0, i32 1 + store i64 47, ptr %129, align 4 + %130 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %127, align 8 + %131 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + %132 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %133 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %132, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %130, ptr %133, align 8 + %134 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %132, i32 0, i32 1 + store ptr %131, ptr %134, align 8 + %135 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %132, i32 0, i32 2 + store ptr @"github.com/goplus/llgo/cl/internal/foo.(*Game).initGame", ptr %135, align 8 + %136 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %132, i32 0, i32 3 + store ptr @"github.com/goplus/llgo/cl/internal/foo.(*Game).initGame", ptr %136, align 8 + %137 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %132, align 8 + %138 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) + %139 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %138, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %122, ptr %139, align 8 + %140 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %141 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %140, i32 0, i32 0 + store ptr %138, ptr %141, align 8 + %142 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %140, i32 0, i32 1 + store i64 1, ptr %142, align 4 + %143 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %140, i32 0, i32 2 + store i64 1, ptr %143, align 4 + %144 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %140, align 8 + %145 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80) + %146 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %145, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %116, ptr %146, align 8 + %147 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %145, i64 1 + store %"github.com/goplus/llgo/internal/abi.Method" %137, ptr %147, align 8 + %148 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %149 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %148, i32 0, i32 0 + store ptr %145, ptr %149, align 8 + %150 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %148, i32 0, i32 1 + store i64 2, ptr %150, align 4 + %151 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %148, i32 0, i32 2 + store i64 2, ptr %151, align 4 + %152 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %148, align 8 + %153 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %154 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %153, i32 0, i32 0 + store ptr @0, ptr %154, align 8 + %155 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %153, i32 0, i32 1 + store i64 4, ptr %155, align 4 + %156 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %153, align 8 + %157 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %158 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %157, i32 0, i32 0 + store ptr @6, ptr %158, align 8 + %159 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %157, i32 0, i32 1 + store i64 5, ptr %159, align 4 + %160 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %157, align 8 + call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %2, %"github.com/goplus/llgo/internal/runtime.String" %156, %"github.com/goplus/llgo/internal/runtime.String" %160, ptr %105, %"github.com/goplus/llgo/internal/runtime.Slice" %144, %"github.com/goplus/llgo/internal/runtime.Slice" %152) br label %_llgo_16 _llgo_16: ; preds = %_llgo_15, %_llgo_14 - %148 = load ptr, ptr @_llgo_main.Game1, align 8 - %149 = load ptr, ptr @"*_llgo_main.Game1", align 8 - %150 = icmp eq ptr %149, null - br i1 %150, label %_llgo_17, label %_llgo_18 + %161 = load ptr, ptr @_llgo_main.Game1, align 8 + %162 = load ptr, ptr @"*_llgo_main.Game1", align 8 + %163 = icmp eq ptr %162, null + br i1 %163, label %_llgo_17, label %_llgo_18 _llgo_17: ; preds = %_llgo_16 - %151 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %148) - store ptr %151, ptr @"*_llgo_main.Game1", align 8 + %164 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %161) + store ptr %164, ptr @"*_llgo_main.Game1", align 8 br label %_llgo_18 _llgo_18: ; preds = %_llgo_17, %_llgo_16 - %152 = load ptr, ptr @_llgo_main.Game2, align 8 - %153 = icmp eq ptr %152, null - br i1 %153, label %_llgo_19, label %_llgo_20 + %165 = load ptr, ptr @_llgo_main.Game2, align 8 + %166 = icmp eq ptr %165, null + br i1 %166, label %_llgo_19, label %_llgo_20 _llgo_19: ; preds = %_llgo_18 - %154 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 1) - store ptr %154, ptr @_llgo_main.Game2, align 8 + %167 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 1) + store ptr %167, ptr @_llgo_main.Game2, align 8 br label %_llgo_20 _llgo_20: ; preds = %_llgo_19, %_llgo_18 - %155 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 - br i1 %153, label %_llgo_21, label %_llgo_22 + %168 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 + br i1 %166, label %_llgo_21, label %_llgo_22 _llgo_21: ; preds = %_llgo_20 - %156 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %157 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %156, i32 0, i32 0 - store ptr @2, ptr %157, align 8 - %158 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %156, i32 0, i32 1 - store i64 8, ptr %158, align 4 - %159 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %156, align 8 - %160 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %161 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %160, i32 0, i32 0 - store ptr @7, ptr %161, align 8 - %162 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %160, i32 0, i32 1 - store i64 13, ptr %162, align 4 - %163 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %160, align 8 - %164 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %165 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %166 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %165, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %163, ptr %166, align 8 - %167 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %165, i32 0, i32 1 - store ptr %164, ptr %167, align 8 - %168 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %165, i32 0, i32 2 - store ptr @"main.(*Game2).initGame", ptr %168, align 8 - %169 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %165, i32 0, i32 3 - store ptr @"main.(*Game2).initGame", ptr %169, align 8 - %170 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %165, align 8 - %171 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) - %172 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %171, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %170, ptr %172, align 8 - %173 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %174 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %173, i32 0, i32 0 - store ptr %171, ptr %174, align 8 - %175 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %173, i32 0, i32 1 - store i64 1, ptr %175, align 4 - %176 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %173, i32 0, i32 2 - store i64 1, ptr %176, align 4 - %177 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %173, align 8 - %178 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %179 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %178, i32 0, i32 0 - store ptr @0, ptr %179, align 8 - %180 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %178, i32 0, i32 1 - store i64 4, ptr %180, align 4 - %181 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %178, align 8 - %182 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %183 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %182, i32 0, i32 0 - store ptr @8, ptr %183, align 8 - %184 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %182, i32 0, i32 1 - store i64 5, ptr %184, align 4 - %185 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %182, align 8 - call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %154, %"github.com/goplus/llgo/internal/runtime.String" %181, %"github.com/goplus/llgo/internal/runtime.String" %185, ptr %155, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %177) + %169 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %170 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %169, i32 0, i32 0 + store ptr @2, ptr %170, align 8 + %171 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %169, i32 0, i32 1 + store i64 8, ptr %171, align 4 + %172 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %169, align 8 + %173 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %174 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %173, i32 0, i32 0 + store ptr @7, ptr %174, align 8 + %175 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %173, i32 0, i32 1 + store i64 13, ptr %175, align 4 + %176 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %173, align 8 + %177 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + %178 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %179 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %178, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %176, ptr %179, align 8 + %180 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %178, i32 0, i32 1 + store ptr %177, ptr %180, align 8 + %181 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %178, i32 0, i32 2 + store ptr @"main.(*Game2).initGame", ptr %181, align 8 + %182 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %178, i32 0, i32 3 + store ptr @"main.(*Game2).initGame", ptr %182, align 8 + %183 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %178, align 8 + %184 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) + %185 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %184, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %183, ptr %185, align 8 + %186 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %187 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %186, i32 0, i32 0 + store ptr %184, ptr %187, align 8 + %188 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %186, i32 0, i32 1 + store i64 1, ptr %188, align 4 + %189 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %186, i32 0, i32 2 + store i64 1, ptr %189, align 4 + %190 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %186, align 8 + %191 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %192 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %191, i32 0, i32 0 + store ptr @0, ptr %192, align 8 + %193 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %191, i32 0, i32 1 + store i64 4, ptr %193, align 4 + %194 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %191, align 8 + %195 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %196 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %195, i32 0, i32 0 + store ptr @8, ptr %196, align 8 + %197 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %195, i32 0, i32 1 + store i64 5, ptr %197, align 4 + %198 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %195, align 8 + call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %167, %"github.com/goplus/llgo/internal/runtime.String" %194, %"github.com/goplus/llgo/internal/runtime.String" %198, ptr %168, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %190) br label %_llgo_22 _llgo_22: ; preds = %_llgo_21, %_llgo_20 - %186 = load ptr, ptr @_llgo_main.Game2, align 8 - %187 = load ptr, ptr @"*_llgo_main.Game2", align 8 - %188 = icmp eq ptr %187, null - br i1 %188, label %_llgo_23, label %_llgo_24 + %199 = load ptr, ptr @_llgo_main.Game2, align 8 + %200 = load ptr, ptr @"*_llgo_main.Game2", align 8 + %201 = icmp eq ptr %200, null + br i1 %201, label %_llgo_23, label %_llgo_24 _llgo_23: ; preds = %_llgo_22 - %189 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %186) - store ptr %189, ptr @"*_llgo_main.Game2", align 8 + %202 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %199) + store ptr %202, ptr @"*_llgo_main.Game2", align 8 br label %_llgo_24 _llgo_24: ; preds = %_llgo_23, %_llgo_22 - %190 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %191 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %192 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/internal/foo.Gamer", align 8 - %193 = icmp eq ptr %192, null - br i1 %193, label %_llgo_25, label %_llgo_26 + %203 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + %204 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + %205 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/internal/foo.Gamer", align 8 + %206 = icmp eq ptr %205, null + br i1 %206, label %_llgo_25, label %_llgo_26 _llgo_25: ; preds = %_llgo_24 - %194 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %195 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %194, i32 0, i32 0 - store ptr @1, ptr %195, align 8 - %196 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %194, i32 0, i32 1 - store i64 4, ptr %196, align 4 - %197 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %194, align 8 - %198 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %199 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %198, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %197, ptr %199, align 8 - %200 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %198, i32 0, i32 1 - store ptr %190, ptr %200, align 8 - %201 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %198, align 8 - %202 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %203 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %202, i32 0, i32 0 - store ptr @3, ptr %203, align 8 - %204 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %202, i32 0, i32 1 - store i64 47, ptr %204, align 4 - %205 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %202, align 8 - %206 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %207 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %206, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %205, ptr %207, align 8 - %208 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %206, i32 0, i32 1 - store ptr %191, ptr %208, align 8 - %209 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %206, align 8 - %210 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) - %211 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %210, i64 0 - store %"github.com/goplus/llgo/internal/abi.Imethod" %201, ptr %211, align 8 - %212 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %210, i64 1 - store %"github.com/goplus/llgo/internal/abi.Imethod" %209, ptr %212, align 8 - %213 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %214 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %213, i32 0, i32 0 - store ptr %210, ptr %214, align 8 - %215 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %213, i32 0, i32 1 - store i64 2, ptr %215, align 4 - %216 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %213, i32 0, i32 2 - store i64 2, ptr %216, align 4 - %217 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %213, align 8 - %218 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %219 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %218, i32 0, i32 0 - store ptr @4, ptr %219, align 8 - %220 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %218, i32 0, i32 1 - store i64 38, ptr %220, align 4 - %221 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %218, align 8 - %222 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %223 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %222, i32 0, i32 0 - store ptr @9, ptr %223, align 8 - %224 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %222, i32 0, i32 1 - store i64 44, ptr %224, align 4 - %225 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %222, align 8 - %226 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %221, %"github.com/goplus/llgo/internal/runtime.String" %225, %"github.com/goplus/llgo/internal/runtime.Slice" %217) - store ptr %226, ptr @"_llgo_github.com/goplus/llgo/cl/internal/foo.Gamer", align 8 + %207 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %208 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %207, i32 0, i32 0 + store ptr @1, ptr %208, align 8 + %209 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %207, i32 0, i32 1 + store i64 4, ptr %209, align 4 + %210 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %207, align 8 + %211 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %212 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %211, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %210, ptr %212, align 8 + %213 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %211, i32 0, i32 1 + store ptr %203, ptr %213, align 8 + %214 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %211, align 8 + %215 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %216 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %215, i32 0, i32 0 + store ptr @3, ptr %216, align 8 + %217 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %215, i32 0, i32 1 + store i64 47, ptr %217, align 4 + %218 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %215, align 8 + %219 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %220 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %219, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %218, ptr %220, align 8 + %221 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %219, i32 0, i32 1 + store ptr %204, ptr %221, align 8 + %222 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %219, align 8 + %223 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) + %224 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %223, i64 0 + store %"github.com/goplus/llgo/internal/abi.Imethod" %214, ptr %224, align 8 + %225 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %223, i64 1 + store %"github.com/goplus/llgo/internal/abi.Imethod" %222, ptr %225, align 8 + %226 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %227 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %226, i32 0, i32 0 + store ptr %223, ptr %227, align 8 + %228 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %226, i32 0, i32 1 + store i64 2, ptr %228, align 4 + %229 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %226, i32 0, i32 2 + store i64 2, ptr %229, align 4 + %230 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %226, align 8 + %231 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %232 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %231, i32 0, i32 0 + store ptr @4, ptr %232, align 8 + %233 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %231, i32 0, i32 1 + store i64 38, ptr %233, align 4 + %234 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %231, align 8 + %235 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %236 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %235, i32 0, i32 0 + store ptr @9, ptr %236, align 8 + %237 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %235, i32 0, i32 1 + store i64 44, ptr %237, align 4 + %238 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %235, align 8 + %239 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %234, %"github.com/goplus/llgo/internal/runtime.String" %238, %"github.com/goplus/llgo/internal/runtime.Slice" %230) + store ptr %239, ptr @"_llgo_github.com/goplus/llgo/cl/internal/foo.Gamer", align 8 br label %_llgo_26 _llgo_26: ; preds = %_llgo_25, %_llgo_24 - %227 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %228 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %229 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %230 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %229, i32 0, i32 0 - store ptr @1, ptr %230, align 8 - %231 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %229, i32 0, i32 1 - store i64 4, ptr %231, align 4 - %232 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %229, align 8 - %233 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %234 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %233, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %232, ptr %234, align 8 - %235 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %233, i32 0, i32 1 - store ptr %227, ptr %235, align 8 - %236 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %233, align 8 - %237 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %238 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %237, i32 0, i32 0 - store ptr @3, ptr %238, align 8 - %239 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %237, i32 0, i32 1 - store i64 47, ptr %239, align 4 - %240 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %237, align 8 - %241 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %242 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %241, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %240, ptr %242, align 8 - %243 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %241, i32 0, i32 1 - store ptr %228, ptr %243, align 8 - %244 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %241, align 8 - %245 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) - %246 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %245, i64 0 - store %"github.com/goplus/llgo/internal/abi.Imethod" %236, ptr %246, align 8 - %247 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %245, i64 1 - store %"github.com/goplus/llgo/internal/abi.Imethod" %244, ptr %247, align 8 - %248 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %249 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %248, i32 0, i32 0 - store ptr %245, ptr %249, align 8 - %250 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %248, i32 0, i32 1 - store i64 2, ptr %250, align 4 - %251 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %248, i32 0, i32 2 - store i64 2, ptr %251, align 4 - %252 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %248, align 8 - %253 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %254 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %253, i32 0, i32 0 - store ptr @0, ptr %254, align 8 - %255 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %253, i32 0, i32 1 - store i64 4, ptr %255, align 4 - %256 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %253, align 8 - %257 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %258 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %257, i32 0, i32 0 - store ptr null, ptr %258, align 8 - %259 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %257, i32 0, i32 1 - store i64 0, ptr %259, align 4 - %260 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %257, align 8 - %261 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %256, %"github.com/goplus/llgo/internal/runtime.String" %260, %"github.com/goplus/llgo/internal/runtime.Slice" %252) - store ptr %261, ptr @"main.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8 + %240 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + %241 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + %242 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %243 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %242, i32 0, i32 0 + store ptr @1, ptr %243, align 8 + %244 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %242, i32 0, i32 1 + store i64 4, ptr %244, align 4 + %245 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %242, align 8 + %246 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %247 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %246, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %245, ptr %247, align 8 + %248 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %246, i32 0, i32 1 + store ptr %240, ptr %248, align 8 + %249 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %246, align 8 + %250 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %251 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %250, i32 0, i32 0 + store ptr @3, ptr %251, align 8 + %252 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %250, i32 0, i32 1 + store i64 47, ptr %252, align 4 + %253 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %250, align 8 + %254 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %255 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %254, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %253, ptr %255, align 8 + %256 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %254, i32 0, i32 1 + store ptr %241, ptr %256, align 8 + %257 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %254, align 8 + %258 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) + %259 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %258, i64 0 + store %"github.com/goplus/llgo/internal/abi.Imethod" %249, ptr %259, align 8 + %260 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %258, i64 1 + store %"github.com/goplus/llgo/internal/abi.Imethod" %257, ptr %260, align 8 + %261 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %262 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %261, i32 0, i32 0 + store ptr %258, ptr %262, align 8 + %263 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %261, i32 0, i32 1 + store i64 2, ptr %263, align 4 + %264 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %261, i32 0, i32 2 + store i64 2, ptr %264, align 4 + %265 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %261, align 8 + %266 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %267 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %266, i32 0, i32 0 + store ptr @0, ptr %267, align 8 + %268 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %266, i32 0, i32 1 + store i64 4, ptr %268, align 4 + %269 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %266, align 8 + %270 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %271 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %270, i32 0, i32 0 + store ptr null, ptr %271, align 8 + %272 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %270, i32 0, i32 1 + store i64 0, ptr %272, align 4 + %273 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %270, align 8 + %274 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %269, %"github.com/goplus/llgo/internal/runtime.String" %273, %"github.com/goplus/llgo/internal/runtime.Slice" %265) + store ptr %274, ptr @"main.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8 ret void } declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64) +declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr) + declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice") declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1) diff --git a/cl/_testgo/invoke/out.ll b/cl/_testgo/invoke/out.ll index 8101ab07c..7230e3179 100644 --- a/cl/_testgo/invoke/out.ll +++ b/cl/_testgo/invoke/out.ll @@ -4,10 +4,10 @@ source_filename = "main" %main.T = type { %"github.com/goplus/llgo/internal/runtime.String" } %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/internal/runtime.iface" = type { ptr, ptr } -%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 } %"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 } +%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr } %"github.com/goplus/llgo/internal/abi.Imethod" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr } @@ -39,10 +39,10 @@ source_filename = "main" @_llgo_float64 = linkonce global ptr null, align 8 @11 = private unnamed_addr constant [2 x i8] c"T2", align 1 @"*_llgo_main.T2" = linkonce global ptr null, align 8 -@"*_llgo_main.T3" = linkonce global ptr null, align 8 @_llgo_main.T3 = linkonce global ptr null, align 8 @_llgo_int8 = linkonce global ptr null, align 8 @12 = private unnamed_addr constant [2 x i8] c"T3", align 1 +@"*_llgo_main.T3" = linkonce global ptr null, align 8 @"_llgo_iface$jwmSdgh1zvY_TDIgLzCkvkbiyrdwl9N806DH0JGcyMI" = linkonce global ptr null, align 8 @13 = private unnamed_addr constant [5 x i8] c"world", align 1 @_llgo_main.I = linkonce global ptr null, align 8 @@ -223,223 +223,215 @@ _llgo_0: call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" %26) %27 = load i64, ptr %8, align 4 %28 = load ptr, ptr @_llgo_main.T1, align 8 - %29 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %28, i32 0, i32 6 - %30 = load i8, ptr %29, align 1 - %31 = or i8 %30, 32 - store i8 %31, ptr %29, align 1 - %32 = inttoptr i64 %27 to ptr - %33 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %34 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %33, ptr %28) - %35 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 - %36 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %35, i32 0, i32 0 - store ptr %34, ptr %36, align 8 - %37 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %35, i32 0, i32 1 - store ptr %32, ptr %37, align 8 - %38 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %35, align 8 - call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" %38) - %39 = load ptr, ptr @"*_llgo_main.T1", align 8 - %40 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %41 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %40, ptr %39) - %42 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 - %43 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %42, i32 0, i32 0 - store ptr %41, ptr %43, align 8 - %44 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %42, i32 0, i32 1 - store ptr %8, ptr %44, align 8 - %45 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %42, align 8 - call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" %45) - %46 = load double, ptr %9, align 8 - %47 = load ptr, ptr @_llgo_main.T2, align 8 - %48 = bitcast double %46 to i64 - %49 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %47, i32 0, i32 6 - %50 = load i8, ptr %49, align 1 - %51 = or i8 %50, 32 - store i8 %51, ptr %49, align 1 - %52 = inttoptr i64 %48 to ptr - %53 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %54 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %53, ptr %47) - %55 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 - %56 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %55, i32 0, i32 0 - store ptr %54, ptr %56, align 8 - %57 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %55, i32 0, i32 1 - store ptr %52, ptr %57, align 8 - %58 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %55, align 8 - call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" %58) - %59 = load ptr, ptr @"*_llgo_main.T2", align 8 - %60 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %61 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %60, ptr %59) - %62 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 - %63 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %62, i32 0, i32 0 - store ptr %61, ptr %63, align 8 - %64 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %62, i32 0, i32 1 - store ptr %9, ptr %64, align 8 - %65 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %62, align 8 - call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" %65) - %66 = load ptr, ptr @"*_llgo_main.T3", align 8 - %67 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %68 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %67, ptr %66) - %69 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 - %70 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %69, i32 0, i32 0 - store ptr %68, ptr %70, align 8 - %71 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %69, i32 0, i32 1 - store ptr %10, ptr %71, align 8 - %72 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %69, align 8 - call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" %72) - %73 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" zeroinitializer) - %74 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %75 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %74, ptr %73) - %76 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 - %77 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %76, i32 0, i32 0 - store ptr %75, ptr %77, align 8 - %78 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %76, i32 0, i32 1 - store ptr null, ptr %78, align 8 - %79 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %76, align 8 - call void @"github.com/goplus/llgo/internal/runtime.PrintIface"(%"github.com/goplus/llgo/internal/runtime.iface" %79) + %29 = inttoptr i64 %27 to ptr + %30 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 + %31 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %30, ptr %28) + %32 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 + %33 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %32, i32 0, i32 0 + store ptr %31, ptr %33, align 8 + %34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %32, i32 0, i32 1 + store ptr %29, ptr %34, align 8 + %35 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %32, align 8 + call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" %35) + %36 = load ptr, ptr @"*_llgo_main.T1", align 8 + %37 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 + %38 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %37, ptr %36) + %39 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 + %40 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %39, i32 0, i32 0 + store ptr %38, ptr %40, align 8 + %41 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %39, i32 0, i32 1 + store ptr %8, ptr %41, align 8 + %42 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %39, align 8 + call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" %42) + %43 = load double, ptr %9, align 8 + %44 = load ptr, ptr @_llgo_main.T2, align 8 + %45 = bitcast double %43 to i64 + %46 = inttoptr i64 %45 to ptr + %47 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 + %48 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %47, ptr %44) + %49 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 + %50 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %49, i32 0, i32 0 + store ptr %48, ptr %50, align 8 + %51 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %49, i32 0, i32 1 + store ptr %46, ptr %51, align 8 + %52 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %49, align 8 + call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" %52) + %53 = load ptr, ptr @"*_llgo_main.T2", align 8 + %54 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 + %55 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %54, ptr %53) + %56 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 + %57 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %56, i32 0, i32 0 + store ptr %55, ptr %57, align 8 + %58 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %56, i32 0, i32 1 + store ptr %9, ptr %58, align 8 + %59 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %56, align 8 + call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" %59) + %60 = load ptr, ptr @"*_llgo_main.T3", align 8 + %61 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 + %62 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %61, ptr %60) + %63 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 + %64 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %63, i32 0, i32 0 + store ptr %62, ptr %64, align 8 + %65 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %63, i32 0, i32 1 + store ptr %10, ptr %65, align 8 + %66 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %63, align 8 + call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" %66) + %67 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" zeroinitializer) + %68 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 + %69 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %68, ptr %67) + %70 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 + %71 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %70, i32 0, i32 0 + store ptr %69, ptr %71, align 8 + %72 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %70, i32 0, i32 1 + store ptr null, ptr %72, align 8 + %73 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %70, align 8 + call void @"github.com/goplus/llgo/internal/runtime.PrintIface"(%"github.com/goplus/llgo/internal/runtime.iface" %73) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) call void @"github.com/goplus/llgo/internal/runtime.PrintIface"(%"github.com/goplus/llgo/internal/runtime.iface" zeroinitializer) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10) - %80 = load ptr, ptr @"*_llgo_main.T", align 8 - %81 = load ptr, ptr @"_llgo_iface$jwmSdgh1zvY_TDIgLzCkvkbiyrdwl9N806DH0JGcyMI", align 8 - %82 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %81, ptr %80) - %83 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 - %84 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %83, i32 0, i32 0 - store ptr %82, ptr %84, align 8 - %85 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %83, i32 0, i32 1 - store ptr %2, ptr %85, align 8 - %86 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %83, align 8 - %87 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %86) - %88 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %86, 1 - %89 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %90 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %89, ptr %87) - %91 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 - %92 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %91, i32 0, i32 0 - store ptr %90, ptr %92, align 8 - %93 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %91, i32 0, i32 1 - store ptr %88, ptr %93, align 8 - %94 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %91, align 8 - call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" %94) - %95 = alloca %main.T, align 8 - %96 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %95, i64 16) - %97 = getelementptr inbounds %main.T, ptr %96, i32 0, i32 0 - %98 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %99 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %98, i32 0, i32 0 - store ptr @13, ptr %99, align 8 - %100 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %98, i32 0, i32 1 - store i64 5, ptr %100, align 4 - %101 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %98, align 8 - store %"github.com/goplus/llgo/internal/runtime.String" %101, ptr %97, align 8 - %102 = load %main.T, ptr %96, align 8 - %103 = load ptr, ptr @_llgo_main.T, align 8 - %104 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %main.T %102, ptr %104, align 8 - %105 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %106 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %105, i32 0, i32 0 - store ptr %103, ptr %106, align 8 - %107 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %105, i32 0, i32 1 - store ptr %104, ptr %107, align 8 - %108 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %105, align 8 - %109 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %108, 0 - %110 = load ptr, ptr @_llgo_main.I, align 8 - %111 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %110, ptr %109) - br i1 %111, label %_llgo_1, label %_llgo_2 + %74 = load ptr, ptr @"*_llgo_main.T", align 8 + %75 = load ptr, ptr @"_llgo_iface$jwmSdgh1zvY_TDIgLzCkvkbiyrdwl9N806DH0JGcyMI", align 8 + %76 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %75, ptr %74) + %77 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 + %78 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %77, i32 0, i32 0 + store ptr %76, ptr %78, align 8 + %79 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %77, i32 0, i32 1 + store ptr %2, ptr %79, align 8 + %80 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %77, align 8 + %81 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %80) + %82 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %80, 1 + %83 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 + %84 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %83, ptr %81) + %85 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 + %86 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %85, i32 0, i32 0 + store ptr %84, ptr %86, align 8 + %87 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %85, i32 0, i32 1 + store ptr %82, ptr %87, align 8 + %88 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %85, align 8 + call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" %88) + %89 = alloca %main.T, align 8 + %90 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %89, i64 16) + %91 = getelementptr inbounds %main.T, ptr %90, i32 0, i32 0 + %92 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %93 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %92, i32 0, i32 0 + store ptr @13, ptr %93, align 8 + %94 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %92, i32 0, i32 1 + store i64 5, ptr %94, align 4 + %95 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %92, align 8 + store %"github.com/goplus/llgo/internal/runtime.String" %95, ptr %91, align 8 + %96 = load %main.T, ptr %90, align 8 + %97 = load ptr, ptr @_llgo_main.T, align 8 + %98 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %main.T %96, ptr %98, align 8 + %99 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %100 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %99, i32 0, i32 0 + store ptr %97, ptr %100, align 8 + %101 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %99, i32 0, i32 1 + store ptr %98, ptr %101, align 8 + %102 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %99, align 8 + %103 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %102, 0 + %104 = load ptr, ptr @_llgo_main.I, align 8 + %105 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %104, ptr %103) + br i1 %105, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - %112 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %108, 1 - %113 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %114 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %113, ptr %109) - %115 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 - %116 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %115, i32 0, i32 0 - store ptr %114, ptr %116, align 8 - %117 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %115, i32 0, i32 1 - store ptr %112, ptr %117, align 8 - %118 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %115, align 8 - call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" %118) - %119 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %108, 0 - %120 = load ptr, ptr @_llgo_any, align 8 - %121 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %120, ptr %119) - br i1 %121, label %_llgo_3, label %_llgo_4 + %106 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %102, 1 + %107 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 + %108 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %107, ptr %103) + %109 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 + %110 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %109, i32 0, i32 0 + store ptr %108, ptr %110, align 8 + %111 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %109, i32 0, i32 1 + store ptr %106, ptr %111, align 8 + %112 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %109, align 8 + call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" %112) + %113 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %102, 0 + %114 = load ptr, ptr @_llgo_any, align 8 + %115 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %114, ptr %113) + br i1 %115, label %_llgo_3, label %_llgo_4 _llgo_2: ; preds = %_llgo_0 - %122 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %123 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %122, i32 0, i32 0 - store ptr @15, ptr %123, align 8 - %124 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %122, i32 0, i32 1 - store i64 21, ptr %124, align 4 - %125 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %122, align 8 - %126 = load ptr, ptr @_llgo_string, align 8 - %127 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %125, ptr %127, align 8 - %128 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %129 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %128, i32 0, i32 0 - store ptr %126, ptr %129, align 8 - %130 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %128, i32 0, i32 1 - store ptr %127, ptr %130, align 8 - %131 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %128, align 8 - call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %131) + %116 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %117 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %116, i32 0, i32 0 + store ptr @15, ptr %117, align 8 + %118 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %116, i32 0, i32 1 + store i64 21, ptr %118, align 4 + %119 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %116, align 8 + %120 = load ptr, ptr @_llgo_string, align 8 + %121 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %119, ptr %121, align 8 + %122 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %123 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %122, i32 0, i32 0 + store ptr %120, ptr %123, align 8 + %124 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %122, i32 0, i32 1 + store ptr %121, ptr %124, align 8 + %125 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %122, align 8 + call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %125) unreachable _llgo_3: ; preds = %_llgo_1 - %132 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %108, 1 - %133 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %134 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %133, i32 0, i32 0 - store ptr %119, ptr %134, align 8 - %135 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %133, i32 0, i32 1 - store ptr %132, ptr %135, align 8 - %136 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %133, align 8 - %137 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %136, 0 - %138 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %139 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %138, ptr %137) - br i1 %139, label %_llgo_5, label %_llgo_6 + %126 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %102, 1 + %127 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %128 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %127, i32 0, i32 0 + store ptr %113, ptr %128, align 8 + %129 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %127, i32 0, i32 1 + store ptr %126, ptr %129, align 8 + %130 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %127, align 8 + %131 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %130, 0 + %132 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 + %133 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %132, ptr %131) + br i1 %133, label %_llgo_5, label %_llgo_6 _llgo_4: ; preds = %_llgo_1 - %140 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %141 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %140, i32 0, i32 0 - store ptr @15, ptr %141, align 8 - %142 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %140, i32 0, i32 1 - store i64 21, ptr %142, align 4 - %143 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %140, align 8 - %144 = load ptr, ptr @_llgo_string, align 8 - %145 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %143, ptr %145, align 8 - %146 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %147 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %146, i32 0, i32 0 - store ptr %144, ptr %147, align 8 - %148 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %146, i32 0, i32 1 - store ptr %145, ptr %148, align 8 - %149 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %146, align 8 - call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %149) + %134 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %135 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %134, i32 0, i32 0 + store ptr @15, ptr %135, align 8 + %136 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %134, i32 0, i32 1 + store i64 21, ptr %136, align 4 + %137 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %134, align 8 + %138 = load ptr, ptr @_llgo_string, align 8 + %139 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %137, ptr %139, align 8 + %140 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %141 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %140, i32 0, i32 0 + store ptr %138, ptr %141, align 8 + %142 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %140, i32 0, i32 1 + store ptr %139, ptr %142, align 8 + %143 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %140, align 8 + call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %143) unreachable _llgo_5: ; preds = %_llgo_3 - %150 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %136, 1 - %151 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %152 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %151, ptr %137) - %153 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 - %154 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %153, i32 0, i32 0 - store ptr %152, ptr %154, align 8 - %155 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %153, i32 0, i32 1 - store ptr %150, ptr %155, align 8 - %156 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %153, align 8 - call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" %156) + %144 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %130, 1 + %145 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 + %146 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %145, ptr %131) + %147 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8 + %148 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %147, i32 0, i32 0 + store ptr %146, ptr %148, align 8 + %149 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %147, i32 0, i32 1 + store ptr %144, ptr %149, align 8 + %150 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %147, align 8 + call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" %150) call void @main.invoke(%"github.com/goplus/llgo/internal/runtime.iface" zeroinitializer) ret i32 0 _llgo_6: ; preds = %_llgo_3 - %157 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %158 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %157, i32 0, i32 0 - store ptr @15, ptr %158, align 8 - %159 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %157, i32 0, i32 1 - store i64 21, ptr %159, align 4 - %160 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %157, align 8 - %161 = load ptr, ptr @_llgo_string, align 8 - %162 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %160, ptr %162, align 8 - %163 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %164 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %163, i32 0, i32 0 - store ptr %161, ptr %164, align 8 - %165 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %163, i32 0, i32 1 - store ptr %162, ptr %165, align 8 - %166 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %163, align 8 - call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %166) + %151 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %152 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %151, i32 0, i32 0 + store ptr @15, ptr %152, align 8 + %153 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %151, i32 0, i32 1 + store i64 21, ptr %153, align 4 + %154 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %151, align 8 + %155 = load ptr, ptr @_llgo_string, align 8 + %156 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %154, ptr %156, align 8 + %157 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %158 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %157, i32 0, i32 0 + store ptr %155, ptr %158, align 8 + %159 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %157, i32 0, i32 1 + store ptr %156, ptr %159, align 8 + %160 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %157, align 8 + call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %160) unreachable } diff --git a/cl/_testgo/reader/out.ll b/cl/_testgo/reader/out.ll index eb947bdff..cadcb745e 100644 --- a/cl/_testgo/reader/out.ll +++ b/cl/_testgo/reader/out.ll @@ -21,8 +21,8 @@ source_filename = "main" @"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk" = linkonce global ptr null, align 8 @_llgo_main.Writer = linkonce global ptr null, align 8 @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY" = linkonce global ptr null, align 8 -@"[]_llgo_byte" = linkonce global ptr null, align 8 @_llgo_byte = linkonce global ptr null, align 8 +@"[]_llgo_byte" = linkonce global ptr null, align 8 @_llgo_int = linkonce global ptr null, align 8 @_llgo_error = linkonce global ptr null, align 8 @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null, align 8 @@ -58,7 +58,6 @@ source_filename = "main" @__llgo_argc = global i32 0, align 4 @__llgo_argv = global ptr null, align 8 @17 = private unnamed_addr constant [11 x i8] c"hello world", align 1 -@"*_llgo_main.stringReader" = global ptr null, align 8 @_llgo_main.stringReader = global ptr null, align 8 @"main.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk" = global ptr null, align 8 @18 = private unnamed_addr constant [1 x i8] c"s", align 1 @@ -80,11 +79,12 @@ source_filename = "main" @27 = private unnamed_addr constant [10 x i8] c"UnreadByte", align 1 @28 = private unnamed_addr constant [10 x i8] c"UnreadRune", align 1 @29 = private unnamed_addr constant [12 x i8] c"stringReader", align 1 +@"*_llgo_main.stringReader" = global ptr null, align 8 @"_llgo_iface$OFO8Us9n8ajWCabGedeuoJ-Za2zAMk4Jh0FunAcUCFE" = linkonce global ptr null, align 8 -@"*_llgo_main.errorString" = global ptr null, align 8 @_llgo_main.errorString = global ptr null, align 8 @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = global ptr null, align 8 @30 = private unnamed_addr constant [11 x i8] c"errorString", align 1 +@"*_llgo_main.errorString" = global ptr null, align 8 @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU" = linkonce global ptr null, align 8 @31 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1 @32 = private unnamed_addr constant [37 x i8] c"stringsReader.ReadAt: negative offset", align 1 diff --git a/cl/_testgo/strucintf/out.ll b/cl/_testgo/strucintf/out.ll index 198f3c969..6a90e6a59 100644 --- a/cl/_testgo/strucintf/out.ll +++ b/cl/_testgo/strucintf/out.ll @@ -2,8 +2,8 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr } -%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } +%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 } %"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 } @@ -29,18 +29,14 @@ _llgo_0: %3 = load { i64 }, ptr %1, align 4 %4 = load ptr, ptr @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 %5 = extractvalue { i64 } %3, 0 - %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %4, i32 0, i32 6 - %7 = load i8, ptr %6, align 1 - %8 = or i8 %7, 32 - store i8 %8, ptr %6, align 1 - %9 = inttoptr i64 %5 to ptr - %10 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %11 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %10, i32 0, i32 0 - store ptr %4, ptr %11, align 8 - %12 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %10, i32 0, i32 1 - store ptr %9, ptr %12, align 8 - %13 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %10, align 8 - ret %"github.com/goplus/llgo/internal/runtime.eface" %13 + %6 = inttoptr i64 %5 to ptr + %7 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %8 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %7, i32 0, i32 0 + store ptr %4, ptr %8, align 8 + %9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %7, i32 0, i32 1 + store ptr %6, ptr %9, align 8 + %10 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %7, align 8 + ret %"github.com/goplus/llgo/internal/runtime.eface" %10 } define void @main.init() { diff --git a/cl/_testgo/struczero/out.ll b/cl/_testgo/struczero/out.ll index d48e942dd..ca8c3181a 100644 --- a/cl/_testgo/struczero/out.ll +++ b/cl/_testgo/struczero/out.ll @@ -13,8 +13,8 @@ source_filename = "main" @"main.init$guard" = global i1 false, align 1 @"_llgo_github.com/goplus/llgo/cl/internal/foo.Foo" = linkonce global ptr null, align 8 @"main.struct$qQwZyFy_4JRalRxVVsVD8R09X5t58tWjTrtJPtHbEjs" = global ptr null, align 8 -@"*_llgo_byte" = linkonce global ptr null, align 8 @_llgo_byte = linkonce global ptr null, align 8 +@"*_llgo_byte" = linkonce global ptr null, align 8 @_llgo_float32 = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [2 x i8] c"pb", align 1 @1 = private unnamed_addr constant [1 x i8] c"F", align 1 diff --git a/cl/_testrt/any/out.ll b/cl/_testrt/any/out.ll index cd1ba8736..5238081f1 100644 --- a/cl/_testrt/any/out.ll +++ b/cl/_testrt/any/out.ll @@ -6,8 +6,8 @@ source_filename = "main" %"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } @"main.init$guard" = global i1 false, align 1 -@"*_llgo_int8" = linkonce global ptr null, align 8 @_llgo_int8 = linkonce global ptr null, align 8 +@"*_llgo_int8" = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1 @_llgo_string = linkonce global ptr null, align 8 @_llgo_int = linkonce global ptr null, align 8 @@ -109,18 +109,14 @@ _llgo_0: %6 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %3, align 8 %7 = call ptr @main.hi(%"github.com/goplus/llgo/internal/runtime.eface" %6) %8 = load ptr, ptr @_llgo_int, align 8 - %9 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %8, i32 0, i32 6 - %10 = load i8, ptr %9, align 1 - %11 = or i8 %10, 32 - store i8 %11, ptr %9, align 1 - %12 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %13 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %12, i32 0, i32 0 - store ptr %8, ptr %13, align 8 - %14 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %12, i32 0, i32 1 - store ptr inttoptr (i64 100 to ptr), ptr %14, align 8 - %15 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %12, align 8 - %16 = call i64 @main.incVal(%"github.com/goplus/llgo/internal/runtime.eface" %15) - %17 = call i32 (ptr, ...) @printf(ptr @1, ptr %7, i64 %16) + %9 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %10 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %9, i32 0, i32 0 + store ptr %8, ptr %10, align 8 + %11 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %9, i32 0, i32 1 + store ptr inttoptr (i64 100 to ptr), ptr %11, align 8 + %12 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %9, align 8 + %13 = call i64 @main.incVal(%"github.com/goplus/llgo/internal/runtime.eface" %12) + %14 = call i32 (ptr, ...) @printf(ptr @1, ptr %7, i64 %13) ret i32 0 } diff --git a/cl/_testrt/builtin/out.ll b/cl/_testrt/builtin/out.ll index b5a085974..824c5cd16 100644 --- a/cl/_testrt/builtin/out.ll +++ b/cl/_testrt/builtin/out.ll @@ -3,8 +3,8 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } -%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr } +%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } @main.a = global i64 0, align 8 @main.b = global i64 0, align 8 @@ -310,19 +310,15 @@ _llgo_0: call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10) %123 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16) %124 = load ptr, ptr @_llgo_int, align 8 - %125 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %124, i32 0, i32 6 - %126 = load i8, ptr %125, align 1 - %127 = or i8 %126, 32 - store i8 %127, ptr %125, align 1 - %128 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %129 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %128, i32 0, i32 0 - store ptr %124, ptr %129, align 8 - %130 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %128, i32 0, i32 1 - store ptr inttoptr (i64 100 to ptr), ptr %130, align 8 - %131 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %128, align 8 - store %"github.com/goplus/llgo/internal/runtime.eface" %131, ptr %123, align 8 - %132 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %123, align 8 - %133 = ptrtoint ptr %123 to i64 + %125 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %126 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %125, i32 0, i32 0 + store ptr %124, ptr %126, align 8 + %127 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %125, i32 0, i32 1 + store ptr inttoptr (i64 100 to ptr), ptr %127, align 8 + %128 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %125, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %128, ptr %123, align 8 + %129 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %123, align 8 + %130 = ptrtoint ptr %123 to i64 call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 true) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 0) @@ -339,282 +335,282 @@ _llgo_0: call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double 1.005000e+02) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/internal/runtime.PrintEface"(%"github.com/goplus/llgo/internal/runtime.eface" %132) + call void @"github.com/goplus/llgo/internal/runtime.PrintEface"(%"github.com/goplus/llgo/internal/runtime.eface" %129) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %123) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %133) + call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %130) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10) - %134 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 3) - %135 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8) - %136 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %137 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %136, i32 0, i32 0 - store ptr %134, ptr %137, align 8 - %138 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %136, i32 0, i32 1 - store i64 3, ptr %138, align 4 - %139 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %136, i32 0, i32 2 - store i64 3, ptr %139, align 4 - %140 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %136, align 8 - %141 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %122, 0 - %142 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %122, 1 - %143 = call i64 @"github.com/goplus/llgo/internal/runtime.SliceCopy"(%"github.com/goplus/llgo/internal/runtime.Slice" %140, ptr %141, i64 %142, i64 1) - store i64 %143, ptr %135, align 4 - %144 = load i64, ptr %135, align 4 - %145 = getelementptr inbounds i8, ptr %134, i64 0 - %146 = load i8, ptr %145, align 1 - %147 = getelementptr inbounds i8, ptr %134, i64 1 - %148 = load i8, ptr %147, align 1 - %149 = getelementptr inbounds i8, ptr %134, i64 2 - %150 = load i8, ptr %149, align 1 - call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %144) - call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - %151 = zext i8 %146 to i64 - call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %151) - call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - %152 = zext i8 %148 to i64 - call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %152) - call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - %153 = zext i8 %150 to i64 - call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %153) + %131 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 3) + %132 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8) + %133 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %134 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %133, i32 0, i32 0 + store ptr %131, ptr %134, align 8 + %135 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %133, i32 0, i32 1 + store i64 3, ptr %135, align 4 + %136 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %133, i32 0, i32 2 + store i64 3, ptr %136, align 4 + %137 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %133, align 8 + %138 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %122, 0 + %139 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %122, 1 + %140 = call i64 @"github.com/goplus/llgo/internal/runtime.SliceCopy"(%"github.com/goplus/llgo/internal/runtime.Slice" %137, ptr %138, i64 %139, i64 1) + store i64 %140, ptr %132, align 4 + %141 = load i64, ptr %132, align 4 + %142 = getelementptr inbounds i8, ptr %131, i64 0 + %143 = load i8, ptr %142, align 1 + %144 = getelementptr inbounds i8, ptr %131, i64 1 + %145 = load i8, ptr %144, align 1 + %146 = getelementptr inbounds i8, ptr %131, i64 2 + %147 = load i8, ptr %146, align 1 + call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %141) + call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) + %148 = zext i8 %143 to i64 + call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %148) + call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) + %149 = zext i8 %145 to i64 + call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %149) + call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) + %150 = zext i8 %147 to i64 + call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %150) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10) - %154 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %134, i64 1, i64 3, i64 1, i64 3, i64 3) - %155 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %156 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %155, i32 0, i32 0 - store ptr @2, ptr %156, align 8 - %157 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %155, i32 0, i32 1 - store i64 4, ptr %157, align 4 - %158 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %155, align 8 - %159 = extractvalue %"github.com/goplus/llgo/internal/runtime.String" %158, 0 - %160 = extractvalue %"github.com/goplus/llgo/internal/runtime.String" %158, 1 - %161 = call i64 @"github.com/goplus/llgo/internal/runtime.SliceCopy"(%"github.com/goplus/llgo/internal/runtime.Slice" %154, ptr %159, i64 %160, i64 1) - store i64 %161, ptr %135, align 4 - %162 = load i64, ptr %135, align 4 - %163 = getelementptr inbounds i8, ptr %134, i64 0 - %164 = load i8, ptr %163, align 1 - %165 = getelementptr inbounds i8, ptr %134, i64 1 - %166 = load i8, ptr %165, align 1 - %167 = getelementptr inbounds i8, ptr %134, i64 2 - %168 = load i8, ptr %167, align 1 - call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %162) - call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - %169 = zext i8 %164 to i64 - call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %169) - call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - %170 = zext i8 %166 to i64 - call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %170) - call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - %171 = zext i8 %168 to i64 - call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %171) + %151 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %131, i64 1, i64 3, i64 1, i64 3, i64 3) + %152 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %153 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %152, i32 0, i32 0 + store ptr @2, ptr %153, align 8 + %154 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %152, i32 0, i32 1 + store i64 4, ptr %154, align 4 + %155 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %152, align 8 + %156 = extractvalue %"github.com/goplus/llgo/internal/runtime.String" %155, 0 + %157 = extractvalue %"github.com/goplus/llgo/internal/runtime.String" %155, 1 + %158 = call i64 @"github.com/goplus/llgo/internal/runtime.SliceCopy"(%"github.com/goplus/llgo/internal/runtime.Slice" %151, ptr %156, i64 %157, i64 1) + store i64 %158, ptr %132, align 4 + %159 = load i64, ptr %132, align 4 + %160 = getelementptr inbounds i8, ptr %131, i64 0 + %161 = load i8, ptr %160, align 1 + %162 = getelementptr inbounds i8, ptr %131, i64 1 + %163 = load i8, ptr %162, align 1 + %164 = getelementptr inbounds i8, ptr %131, i64 2 + %165 = load i8, ptr %164, align 1 + call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %159) + call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) + %166 = zext i8 %161 to i64 + call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %166) + call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) + %167 = zext i8 %163 to i64 + call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %167) + call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) + %168 = zext i8 %165 to i64 + call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %168) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10) - %172 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) - %173 = getelementptr inbounds { ptr }, ptr %172, i32 0, i32 0 - store ptr %135, ptr %173, align 8 - %174 = alloca { ptr, ptr }, align 8 - %175 = getelementptr inbounds { ptr, ptr }, ptr %174, i32 0, i32 0 - store ptr @"main.main$2", ptr %175, align 8 - %176 = getelementptr inbounds { ptr, ptr }, ptr %174, i32 0, i32 1 - store ptr %172, ptr %176, align 8 - %177 = load { ptr, ptr }, ptr %174, align 8 + %169 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) + %170 = getelementptr inbounds { ptr }, ptr %169, i32 0, i32 0 + store ptr %132, ptr %170, align 8 + %171 = alloca { ptr, ptr }, align 8 + %172 = getelementptr inbounds { ptr, ptr }, ptr %171, i32 0, i32 0 + store ptr @"main.main$2", ptr %172, align 8 + %173 = getelementptr inbounds { ptr, ptr }, ptr %171, i32 0, i32 1 + store ptr %169, ptr %173, align 8 + %174 = load { ptr, ptr }, ptr %171, align 8 call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr @main.demo) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr @main.demo) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr @"main.main$1") call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - %178 = extractvalue { ptr, ptr } %177, 0 - call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %178) + %175 = extractvalue { ptr, ptr } %174, 0 + call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %175) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10) - %179 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %180 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %179, i32 0, i32 0 - store ptr @3, ptr %180, align 8 - %181 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %179, i32 0, i32 1 - store i64 7, ptr %181, align 4 - %182 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %179, align 8 - %183 = call ptr @"github.com/goplus/llgo/internal/runtime.NewStringIter"(%"github.com/goplus/llgo/internal/runtime.String" %182) + %176 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %177 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %176, i32 0, i32 0 + store ptr @3, ptr %177, align 8 + %178 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %176, i32 0, i32 1 + store i64 7, ptr %178, align 4 + %179 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %176, align 8 + %180 = call ptr @"github.com/goplus/llgo/internal/runtime.NewStringIter"(%"github.com/goplus/llgo/internal/runtime.String" %179) br label %_llgo_1 _llgo_1: ; preds = %_llgo_2, %_llgo_0 - %184 = call { i1, i64, i32 } @"github.com/goplus/llgo/internal/runtime.StringIterNext"(ptr %183) - %185 = extractvalue { i1, i64, i32 } %184, 0 - br i1 %185, label %_llgo_2, label %_llgo_3 + %181 = call { i1, i64, i32 } @"github.com/goplus/llgo/internal/runtime.StringIterNext"(ptr %180) + %182 = extractvalue { i1, i64, i32 } %181, 0 + br i1 %182, label %_llgo_2, label %_llgo_3 _llgo_2: ; preds = %_llgo_1 - %186 = extractvalue { i1, i64, i32 } %184, 1 - %187 = extractvalue { i1, i64, i32 } %184, 2 - call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %186) + %183 = extractvalue { i1, i64, i32 } %181, 1 + %184 = extractvalue { i1, i64, i32 } %181, 2 + call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %183) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - %188 = sext i32 %187 to i64 - call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %188) + %185 = sext i32 %184 to i64 + call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %185) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10) br label %_llgo_1 _llgo_3: ; preds = %_llgo_1 - %189 = call double @main.Inf(i64 1) - %190 = call double @main.Inf(i64 -1) - %191 = call double @main.NaN() - %192 = call double @main.NaN() - %193 = call i1 @main.IsNaN(double %192) - %194 = call i1 @main.IsNaN(double 1.000000e+00) - call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %189) + %186 = call double @main.Inf(i64 1) + %187 = call double @main.Inf(i64 -1) + %188 = call double @main.NaN() + %189 = call double @main.NaN() + %190 = call i1 @main.IsNaN(double %189) + %191 = call i1 @main.IsNaN(double 1.000000e+00) + call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %186) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %190) + call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %187) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %191) + call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %188) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %193) + call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %190) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %194) + call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %191) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10) - %195 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %196 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %195, i32 0, i32 0 - store ptr @3, ptr %196, align 8 - %197 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %195, i32 0, i32 1 - store i64 7, ptr %197, align 4 - %198 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %195, align 8 - %199 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/internal/runtime.String" %198) - %200 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %201 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %200, i32 0, i32 0 - store ptr @3, ptr %201, align 8 - %202 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %200, i32 0, i32 1 - store i64 7, ptr %202, align 4 - %203 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %200, align 8 - %204 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.StringToRunes"(%"github.com/goplus/llgo/internal/runtime.String" %203) - call void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice" %199) - call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice" %204) + %192 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %193 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %192, i32 0, i32 0 + store ptr @3, ptr %193, align 8 + %194 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %192, i32 0, i32 1 + store i64 7, ptr %194, align 4 + %195 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %192, align 8 + %196 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/internal/runtime.String" %195) + %197 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %198 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %197, i32 0, i32 0 + store ptr @3, ptr %198, align 8 + %199 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %197, i32 0, i32 1 + store i64 7, ptr %199, align 4 + %200 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %197, align 8 + %201 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.StringToRunes"(%"github.com/goplus/llgo/internal/runtime.String" %200) + call void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice" %196) + call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) + call void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice" %201) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10) - %205 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringFromBytes"(%"github.com/goplus/llgo/internal/runtime.Slice" %199) - %206 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringFromRunes"(%"github.com/goplus/llgo/internal/runtime.Slice" %204) - %207 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %199, 0 - %208 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %199, 1 - %209 = icmp sge i64 3, %208 - call void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1 %209) - %210 = getelementptr inbounds i8, ptr %207, i64 3 - %211 = load i8, ptr %210, align 1 - %212 = sext i8 %211 to i32 - %213 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringFromRune"(i32 %212) - %214 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %204, 0 - %215 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %204, 1 - %216 = icmp sge i64 0, %215 - call void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1 %216) - %217 = getelementptr inbounds i32, ptr %214, i64 0 - %218 = load i32, ptr %217, align 4 - %219 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringFromRune"(i32 %218) - call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %205) - call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %206) - call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %213) - call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %219) + %202 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringFromBytes"(%"github.com/goplus/llgo/internal/runtime.Slice" %196) + %203 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringFromRunes"(%"github.com/goplus/llgo/internal/runtime.Slice" %201) + %204 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %196, 0 + %205 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %196, 1 + %206 = icmp sge i64 3, %205 + call void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1 %206) + %207 = getelementptr inbounds i8, ptr %204, i64 3 + %208 = load i8, ptr %207, align 1 + %209 = sext i8 %208 to i32 + %210 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringFromRune"(i32 %209) + %211 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %201, 0 + %212 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %201, 1 + %213 = icmp sge i64 0, %212 + call void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1 %213) + %214 = getelementptr inbounds i32, ptr %211, i64 0 + %215 = load i32, ptr %214, align 4 + %216 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringFromRune"(i32 %215) + call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %202) + call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) + call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %203) + call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) + call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %210) + call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) + call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %216) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10) - %220 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %221 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %220, i32 0, i32 0 - store ptr @4, ptr %221, align 8 - %222 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %220, i32 0, i32 1 - store i64 3, ptr %222, align 4 - %223 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %220, align 8 - %224 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %225 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %224, i32 0, i32 0 - store ptr @4, ptr %225, align 8 - %226 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %224, i32 0, i32 1 - store i64 3, ptr %226, align 4 - %227 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %224, align 8 - %228 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %223, %"github.com/goplus/llgo/internal/runtime.String" %227) - %229 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %230 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %229, i32 0, i32 0 - store ptr @4, ptr %230, align 8 - %231 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %229, i32 0, i32 1 - store i64 3, ptr %231, align 4 - %232 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %229, align 8 - %233 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %234 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %233, i32 0, i32 0 - store ptr @5, ptr %234, align 8 - %235 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %233, i32 0, i32 1 - store i64 3, ptr %235, align 4 - %236 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %233, align 8 - %237 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %232, %"github.com/goplus/llgo/internal/runtime.String" %236) - %238 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %239 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %238, i32 0, i32 0 - store ptr @4, ptr %239, align 8 - %240 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %238, i32 0, i32 1 - store i64 3, ptr %240, align 4 - %241 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %238, align 8 - %242 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %243 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %242, i32 0, i32 0 - store ptr @5, ptr %243, align 8 - %244 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %242, i32 0, i32 1 - store i64 3, ptr %244, align 4 - %245 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %242, align 8 - %246 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %241, %"github.com/goplus/llgo/internal/runtime.String" %245) - %247 = xor i1 %246, true - %248 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %249 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %248, i32 0, i32 0 - store ptr @4, ptr %249, align 8 - %250 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %248, i32 0, i32 1 - store i64 3, ptr %250, align 4 - %251 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %248, align 8 - %252 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %253 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %252, i32 0, i32 0 - store ptr @5, ptr %253, align 8 - %254 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %252, i32 0, i32 1 - store i64 3, ptr %254, align 4 - %255 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %252, align 8 - %256 = call i1 @"github.com/goplus/llgo/internal/runtime.StringLess"(%"github.com/goplus/llgo/internal/runtime.String" %251, %"github.com/goplus/llgo/internal/runtime.String" %255) - %257 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %258 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %257, i32 0, i32 0 - store ptr @4, ptr %258, align 8 - %259 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %257, i32 0, i32 1 - store i64 3, ptr %259, align 4 - %260 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %257, align 8 - %261 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %262 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %261, i32 0, i32 0 - store ptr @5, ptr %262, align 8 - %263 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %261, i32 0, i32 1 - store i64 3, ptr %263, align 4 - %264 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %261, align 8 - %265 = call i1 @"github.com/goplus/llgo/internal/runtime.StringLess"(%"github.com/goplus/llgo/internal/runtime.String" %264, %"github.com/goplus/llgo/internal/runtime.String" %260) - %266 = xor i1 %265, true - %267 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %268 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %267, i32 0, i32 0 - store ptr @4, ptr %268, align 8 - %269 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %267, i32 0, i32 1 - store i64 3, ptr %269, align 4 - %270 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %267, align 8 - %271 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %272 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %271, i32 0, i32 0 - store ptr @5, ptr %272, align 8 - %273 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %271, i32 0, i32 1 - store i64 3, ptr %273, align 4 - %274 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %271, align 8 - %275 = call i1 @"github.com/goplus/llgo/internal/runtime.StringLess"(%"github.com/goplus/llgo/internal/runtime.String" %274, %"github.com/goplus/llgo/internal/runtime.String" %270) - %276 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %277 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %276, i32 0, i32 0 - store ptr @4, ptr %277, align 8 - %278 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %276, i32 0, i32 1 - store i64 3, ptr %278, align 4 - %279 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %276, align 8 - %280 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %281 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %280, i32 0, i32 0 - store ptr @5, ptr %281, align 8 - %282 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %280, i32 0, i32 1 - store i64 3, ptr %282, align 4 - %283 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %280, align 8 - %284 = call i1 @"github.com/goplus/llgo/internal/runtime.StringLess"(%"github.com/goplus/llgo/internal/runtime.String" %279, %"github.com/goplus/llgo/internal/runtime.String" %283) - %285 = xor i1 %284, true - call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %228) - call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %237) - call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %247) - call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %256) - call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %266) - call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %275) - call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %285) + %217 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %218 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %217, i32 0, i32 0 + store ptr @4, ptr %218, align 8 + %219 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %217, i32 0, i32 1 + store i64 3, ptr %219, align 4 + %220 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %217, align 8 + %221 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %222 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %221, i32 0, i32 0 + store ptr @4, ptr %222, align 8 + %223 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %221, i32 0, i32 1 + store i64 3, ptr %223, align 4 + %224 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %221, align 8 + %225 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %220, %"github.com/goplus/llgo/internal/runtime.String" %224) + %226 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %227 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %226, i32 0, i32 0 + store ptr @4, ptr %227, align 8 + %228 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %226, i32 0, i32 1 + store i64 3, ptr %228, align 4 + %229 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %226, align 8 + %230 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %231 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %230, i32 0, i32 0 + store ptr @5, ptr %231, align 8 + %232 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %230, i32 0, i32 1 + store i64 3, ptr %232, align 4 + %233 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %230, align 8 + %234 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %229, %"github.com/goplus/llgo/internal/runtime.String" %233) + %235 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %236 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %235, i32 0, i32 0 + store ptr @4, ptr %236, align 8 + %237 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %235, i32 0, i32 1 + store i64 3, ptr %237, align 4 + %238 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %235, align 8 + %239 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %240 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %239, i32 0, i32 0 + store ptr @5, ptr %240, align 8 + %241 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %239, i32 0, i32 1 + store i64 3, ptr %241, align 4 + %242 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %239, align 8 + %243 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %238, %"github.com/goplus/llgo/internal/runtime.String" %242) + %244 = xor i1 %243, true + %245 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %246 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %245, i32 0, i32 0 + store ptr @4, ptr %246, align 8 + %247 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %245, i32 0, i32 1 + store i64 3, ptr %247, align 4 + %248 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %245, align 8 + %249 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %250 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %249, i32 0, i32 0 + store ptr @5, ptr %250, align 8 + %251 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %249, i32 0, i32 1 + store i64 3, ptr %251, align 4 + %252 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %249, align 8 + %253 = call i1 @"github.com/goplus/llgo/internal/runtime.StringLess"(%"github.com/goplus/llgo/internal/runtime.String" %248, %"github.com/goplus/llgo/internal/runtime.String" %252) + %254 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %255 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %254, i32 0, i32 0 + store ptr @4, ptr %255, align 8 + %256 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %254, i32 0, i32 1 + store i64 3, ptr %256, align 4 + %257 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %254, align 8 + %258 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %259 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %258, i32 0, i32 0 + store ptr @5, ptr %259, align 8 + %260 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %258, i32 0, i32 1 + store i64 3, ptr %260, align 4 + %261 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %258, align 8 + %262 = call i1 @"github.com/goplus/llgo/internal/runtime.StringLess"(%"github.com/goplus/llgo/internal/runtime.String" %261, %"github.com/goplus/llgo/internal/runtime.String" %257) + %263 = xor i1 %262, true + %264 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %265 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %264, i32 0, i32 0 + store ptr @4, ptr %265, align 8 + %266 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %264, i32 0, i32 1 + store i64 3, ptr %266, align 4 + %267 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %264, align 8 + %268 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %269 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %268, i32 0, i32 0 + store ptr @5, ptr %269, align 8 + %270 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %268, i32 0, i32 1 + store i64 3, ptr %270, align 4 + %271 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %268, align 8 + %272 = call i1 @"github.com/goplus/llgo/internal/runtime.StringLess"(%"github.com/goplus/llgo/internal/runtime.String" %271, %"github.com/goplus/llgo/internal/runtime.String" %267) + %273 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %274 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %273, i32 0, i32 0 + store ptr @4, ptr %274, align 8 + %275 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %273, i32 0, i32 1 + store i64 3, ptr %275, align 4 + %276 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %273, align 8 + %277 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %278 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %277, i32 0, i32 0 + store ptr @5, ptr %278, align 8 + %279 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %277, i32 0, i32 1 + store i64 3, ptr %279, align 4 + %280 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %277, align 8 + %281 = call i1 @"github.com/goplus/llgo/internal/runtime.StringLess"(%"github.com/goplus/llgo/internal/runtime.String" %276, %"github.com/goplus/llgo/internal/runtime.String" %280) + %282 = xor i1 %281, true + call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %225) + call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) + call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %234) + call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) + call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %244) + call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) + call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %253) + call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) + call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %263) + call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) + call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %272) + call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32) + call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %282) call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10) ret i32 0 } diff --git a/cl/_testrt/eface/out.ll b/cl/_testrt/eface/out.ll index 461edfa9a..3348ae2d3 100644 --- a/cl/_testrt/eface/out.ll +++ b/cl/_testrt/eface/out.ll @@ -206,260 +206,204 @@ _llgo_0: call void @"github.com/goplus/llgo/internal/runtime.init"() call void @main.init() %2 = load ptr, ptr @_llgo_bool, align 8 - %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %2, i32 0, i32 6 - %4 = load i8, ptr %3, align 1 - %5 = or i8 %4, 32 - store i8 %5, ptr %3, align 1 - %6 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %7 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %6, i32 0, i32 0 - store ptr %2, ptr %7, align 8 - %8 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %6, i32 0, i32 1 - store ptr inttoptr (i64 -1 to ptr), ptr %8, align 8 - %9 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %6, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %9) - %10 = load ptr, ptr @_llgo_int, align 8 - %11 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %10, i32 0, i32 6 - %12 = load i8, ptr %11, align 1 - %13 = or i8 %12, 32 - store i8 %13, ptr %11, align 1 - %14 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %15 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %14, i32 0, i32 0 - store ptr %10, ptr %15, align 8 - %16 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %14, i32 0, i32 1 - store ptr null, ptr %16, align 8 - %17 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %14, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %17) - %18 = load ptr, ptr @_llgo_int8, align 8 - %19 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %18, i32 0, i32 6 - %20 = load i8, ptr %19, align 1 - %21 = or i8 %20, 32 - store i8 %21, ptr %19, align 1 - %22 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %23 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %22, i32 0, i32 0 - store ptr %18, ptr %23, align 8 - %24 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %22, i32 0, i32 1 - store ptr null, ptr %24, align 8 - %25 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %22, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %25) - %26 = load ptr, ptr @_llgo_int16, align 8 - %27 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %26, i32 0, i32 6 - %28 = load i8, ptr %27, align 1 - %29 = or i8 %28, 32 - store i8 %29, ptr %27, align 1 - %30 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %31 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %30, i32 0, i32 0 - store ptr %26, ptr %31, align 8 - %32 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %30, i32 0, i32 1 - store ptr null, ptr %32, align 8 - %33 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %30, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %33) - %34 = load ptr, ptr @_llgo_int32, align 8 - %35 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %34, i32 0, i32 6 - %36 = load i8, ptr %35, align 1 - %37 = or i8 %36, 32 - store i8 %37, ptr %35, align 1 + %3 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %4 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %3, i32 0, i32 0 + store ptr %2, ptr %4, align 8 + %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %3, i32 0, i32 1 + store ptr inttoptr (i64 -1 to ptr), ptr %5, align 8 + %6 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %3, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %6) + %7 = load ptr, ptr @_llgo_int, align 8 + %8 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %8, i32 0, i32 0 + store ptr %7, ptr %9, align 8 + %10 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %8, i32 0, i32 1 + store ptr null, ptr %10, align 8 + %11 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %8, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %11) + %12 = load ptr, ptr @_llgo_int8, align 8 + %13 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %14 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %13, i32 0, i32 0 + store ptr %12, ptr %14, align 8 + %15 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %13, i32 0, i32 1 + store ptr null, ptr %15, align 8 + %16 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %13, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %16) + %17 = load ptr, ptr @_llgo_int16, align 8 + %18 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %19 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %18, i32 0, i32 0 + store ptr %17, ptr %19, align 8 + %20 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %18, i32 0, i32 1 + store ptr null, ptr %20, align 8 + %21 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %18, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %21) + %22 = load ptr, ptr @_llgo_int32, align 8 + %23 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %24 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %23, i32 0, i32 0 + store ptr %22, ptr %24, align 8 + %25 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %23, i32 0, i32 1 + store ptr null, ptr %25, align 8 + %26 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %23, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %26) + %27 = load ptr, ptr @_llgo_int64, align 8 + %28 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %29 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %28, i32 0, i32 0 + store ptr %27, ptr %29, align 8 + %30 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %28, i32 0, i32 1 + store ptr null, ptr %30, align 8 + %31 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %28, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %31) + %32 = load ptr, ptr @_llgo_uint, align 8 + %33 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %33, i32 0, i32 0 + store ptr %32, ptr %34, align 8 + %35 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %33, i32 0, i32 1 + store ptr null, ptr %35, align 8 + %36 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %33, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %36) + %37 = load ptr, ptr @_llgo_uint8, align 8 %38 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 %39 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %38, i32 0, i32 0 - store ptr %34, ptr %39, align 8 + store ptr %37, ptr %39, align 8 %40 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %38, i32 0, i32 1 store ptr null, ptr %40, align 8 %41 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %38, align 8 call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %41) - %42 = load ptr, ptr @_llgo_int64, align 8 - %43 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %42, i32 0, i32 6 - %44 = load i8, ptr %43, align 1 - %45 = or i8 %44, 32 - store i8 %45, ptr %43, align 1 - %46 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %47 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %46, i32 0, i32 0 - store ptr %42, ptr %47, align 8 - %48 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %46, i32 0, i32 1 - store ptr null, ptr %48, align 8 - %49 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %46, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %49) - %50 = load ptr, ptr @_llgo_uint, align 8 - %51 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %50, i32 0, i32 6 - %52 = load i8, ptr %51, align 1 - %53 = or i8 %52, 32 - store i8 %53, ptr %51, align 1 - %54 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %55 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %54, i32 0, i32 0 - store ptr %50, ptr %55, align 8 - %56 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %54, i32 0, i32 1 - store ptr null, ptr %56, align 8 - %57 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %54, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %57) - %58 = load ptr, ptr @_llgo_uint8, align 8 - %59 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %58, i32 0, i32 6 - %60 = load i8, ptr %59, align 1 - %61 = or i8 %60, 32 - store i8 %61, ptr %59, align 1 - %62 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %63 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %62, i32 0, i32 0 - store ptr %58, ptr %63, align 8 - %64 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %62, i32 0, i32 1 - store ptr null, ptr %64, align 8 - %65 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %62, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %65) - %66 = load ptr, ptr @_llgo_uint16, align 8 - %67 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %66, i32 0, i32 6 - %68 = load i8, ptr %67, align 1 - %69 = or i8 %68, 32 - store i8 %69, ptr %67, align 1 - %70 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %71 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %70, i32 0, i32 0 - store ptr %66, ptr %71, align 8 - %72 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %70, i32 0, i32 1 - store ptr null, ptr %72, align 8 - %73 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %70, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %73) - %74 = load ptr, ptr @_llgo_uint32, align 8 - %75 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %74, i32 0, i32 6 - %76 = load i8, ptr %75, align 1 - %77 = or i8 %76, 32 - store i8 %77, ptr %75, align 1 - %78 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %79 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %78, i32 0, i32 0 - store ptr %74, ptr %79, align 8 - %80 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %78, i32 0, i32 1 - store ptr null, ptr %80, align 8 - %81 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %78, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %81) - %82 = load ptr, ptr @_llgo_uint64, align 8 - %83 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %82, i32 0, i32 6 - %84 = load i8, ptr %83, align 1 - %85 = or i8 %84, 32 - store i8 %85, ptr %83, align 1 - %86 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %87 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %86, i32 0, i32 0 - store ptr %82, ptr %87, align 8 - %88 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %86, i32 0, i32 1 - store ptr null, ptr %88, align 8 - %89 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %86, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %89) - %90 = load ptr, ptr @_llgo_uintptr, align 8 - %91 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %90, i32 0, i32 6 - %92 = load i8, ptr %91, align 1 - %93 = or i8 %92, 32 - store i8 %93, ptr %91, align 1 - %94 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %95 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %94, i32 0, i32 0 - store ptr %90, ptr %95, align 8 - %96 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %94, i32 0, i32 1 - store ptr null, ptr %96, align 8 - %97 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %94, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %97) - %98 = load ptr, ptr @_llgo_float32, align 8 - %99 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %98, i32 0, i32 6 - %100 = load i8, ptr %99, align 1 - %101 = or i8 %100, 32 - store i8 %101, ptr %99, align 1 - %102 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %103 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %102, i32 0, i32 0 - store ptr %98, ptr %103, align 8 - %104 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %102, i32 0, i32 1 - store ptr null, ptr %104, align 8 - %105 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %102, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %105) - %106 = load ptr, ptr @_llgo_float64, align 8 - %107 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %106, i32 0, i32 6 - %108 = load i8, ptr %107, align 1 - %109 = or i8 %108, 32 - store i8 %109, ptr %107, align 1 - %110 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %111 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %110, i32 0, i32 0 - store ptr %106, ptr %111, align 8 - %112 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %110, i32 0, i32 1 - store ptr null, ptr %112, align 8 - %113 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %110, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %113) - %114 = load ptr, ptr @"[10]_llgo_int", align 8 - %115 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80) - store [10 x i64] zeroinitializer, ptr %115, align 4 - %116 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %117 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %116, i32 0, i32 0 - store ptr %114, ptr %117, align 8 - %118 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %116, i32 0, i32 1 - store ptr %115, ptr %118, align 8 - %119 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %116, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %119) - %120 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %121 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %122 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %121, i32 0, i32 0 - store ptr %120, ptr %122, align 8 - %123 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %121, i32 0, i32 1 - store ptr @"main.main$1", ptr %123, align 8 - %124 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %121, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %124) - %125 = load ptr, ptr @"*_llgo_int", align 8 - %126 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %127 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %126, i32 0, i32 0 - store ptr %125, ptr %127, align 8 - %128 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %126, i32 0, i32 1 - store ptr null, ptr %128, align 8 - %129 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %126, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %129) - %130 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 0) - %131 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %132 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %131, i32 0, i32 0 - store ptr %130, ptr %132, align 8 - %133 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %131, i32 0, i32 1 - store i64 0, ptr %133, align 4 - %134 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %131, i32 0, i32 2 - store i64 0, ptr %134, align 4 - %135 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %131, align 8 - %136 = load ptr, ptr @"[]_llgo_int", align 8 - %137 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) - store %"github.com/goplus/llgo/internal/runtime.Slice" %135, ptr %137, align 8 - %138 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %139 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %138, i32 0, i32 0 - store ptr %136, ptr %139, align 8 - %140 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %138, i32 0, i32 1 - store ptr %137, ptr %140, align 8 - %141 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %138, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %141) - %142 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %143 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %142, i32 0, i32 0 - store ptr @3, ptr %143, align 8 - %144 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %142, i32 0, i32 1 - store i64 5, ptr %144, align 4 - %145 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %142, align 8 - %146 = load ptr, ptr @_llgo_string, align 8 - %147 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %145, ptr %147, align 8 - %148 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %149 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %148, i32 0, i32 0 - store ptr %146, ptr %149, align 8 - %150 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %148, i32 0, i32 1 - store ptr %147, ptr %150, align 8 - %151 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %148, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %151) - %152 = load ptr, ptr @"main.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM", align 8 - %153 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) - store { i8, i64, i64 } zeroinitializer, ptr %153, align 4 - %154 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %155 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %154, i32 0, i32 0 - store ptr %152, ptr %155, align 8 - %156 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %154, i32 0, i32 1 - store ptr %153, ptr %156, align 8 - %157 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %154, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %157) - %158 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %159 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %158, i32 0, i32 0 - store ptr null, ptr %159, align 8 - %160 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %158, i32 0, i32 1 - store i64 0, ptr %160, align 4 - %161 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %158, align 8 - %162 = load ptr, ptr @_llgo_main.T, align 8 - %163 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/internal/runtime.String" %161, ptr %163, align 8 - %164 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 - %165 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %164, i32 0, i32 0 - store ptr %162, ptr %165, align 8 - %166 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %164, i32 0, i32 1 - store ptr %163, ptr %166, align 8 - %167 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %164, align 8 - call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %167) + %42 = load ptr, ptr @_llgo_uint16, align 8 + %43 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %44 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %43, i32 0, i32 0 + store ptr %42, ptr %44, align 8 + %45 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %43, i32 0, i32 1 + store ptr null, ptr %45, align 8 + %46 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %43, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %46) + %47 = load ptr, ptr @_llgo_uint32, align 8 + %48 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %49 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %48, i32 0, i32 0 + store ptr %47, ptr %49, align 8 + %50 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %48, i32 0, i32 1 + store ptr null, ptr %50, align 8 + %51 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %48, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %51) + %52 = load ptr, ptr @_llgo_uint64, align 8 + %53 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %54 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %53, i32 0, i32 0 + store ptr %52, ptr %54, align 8 + %55 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %53, i32 0, i32 1 + store ptr null, ptr %55, align 8 + %56 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %53, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %56) + %57 = load ptr, ptr @_llgo_uintptr, align 8 + %58 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %59 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %58, i32 0, i32 0 + store ptr %57, ptr %59, align 8 + %60 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %58, i32 0, i32 1 + store ptr null, ptr %60, align 8 + %61 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %58, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %61) + %62 = load ptr, ptr @_llgo_float32, align 8 + %63 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %64 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %63, i32 0, i32 0 + store ptr %62, ptr %64, align 8 + %65 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %63, i32 0, i32 1 + store ptr null, ptr %65, align 8 + %66 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %63, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %66) + %67 = load ptr, ptr @_llgo_float64, align 8 + %68 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %69 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i32 0, i32 0 + store ptr %67, ptr %69, align 8 + %70 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i32 0, i32 1 + store ptr null, ptr %70, align 8 + %71 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %71) + %72 = load ptr, ptr @"[10]_llgo_int", align 8 + %73 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80) + store [10 x i64] zeroinitializer, ptr %73, align 4 + %74 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %75 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %74, i32 0, i32 0 + store ptr %72, ptr %75, align 8 + %76 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %74, i32 0, i32 1 + store ptr %73, ptr %76, align 8 + %77 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %74, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %77) + %78 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + %79 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %80 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %79, i32 0, i32 0 + store ptr %78, ptr %80, align 8 + %81 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %79, i32 0, i32 1 + store ptr @"main.main$1", ptr %81, align 8 + %82 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %79, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %82) + %83 = load ptr, ptr @"*_llgo_int", align 8 + %84 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %85 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %84, i32 0, i32 0 + store ptr %83, ptr %85, align 8 + %86 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %84, i32 0, i32 1 + store ptr null, ptr %86, align 8 + %87 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %84, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %87) + %88 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 0) + %89 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %90 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %89, i32 0, i32 0 + store ptr %88, ptr %90, align 8 + %91 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %89, i32 0, i32 1 + store i64 0, ptr %91, align 4 + %92 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %89, i32 0, i32 2 + store i64 0, ptr %92, align 4 + %93 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %89, align 8 + %94 = load ptr, ptr @"[]_llgo_int", align 8 + %95 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) + store %"github.com/goplus/llgo/internal/runtime.Slice" %93, ptr %95, align 8 + %96 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %97 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %96, i32 0, i32 0 + store ptr %94, ptr %97, align 8 + %98 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %96, i32 0, i32 1 + store ptr %95, ptr %98, align 8 + %99 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %96, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %99) + %100 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %101 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %100, i32 0, i32 0 + store ptr @3, ptr %101, align 8 + %102 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %100, i32 0, i32 1 + store i64 5, ptr %102, align 4 + %103 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %100, align 8 + %104 = load ptr, ptr @_llgo_string, align 8 + %105 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %103, ptr %105, align 8 + %106 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %107 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %106, i32 0, i32 0 + store ptr %104, ptr %107, align 8 + %108 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %106, i32 0, i32 1 + store ptr %105, ptr %108, align 8 + %109 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %106, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %109) + %110 = load ptr, ptr @"main.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM", align 8 + %111 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) + store { i8, i64, i64 } zeroinitializer, ptr %111, align 4 + %112 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %113 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %112, i32 0, i32 0 + store ptr %110, ptr %113, align 8 + %114 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %112, i32 0, i32 1 + store ptr %111, ptr %114, align 8 + %115 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %112, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %115) + %116 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %117 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %116, i32 0, i32 0 + store ptr null, ptr %117, align 8 + %118 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %116, i32 0, i32 1 + store i64 0, ptr %118, align 4 + %119 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %116, align 8 + %120 = load ptr, ptr @_llgo_main.T, align 8 + %121 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %119, ptr %121, align 8 + %122 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %123 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %122, i32 0, i32 0 + store ptr %120, ptr %123, align 8 + %124 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %122, i32 0, i32 1 + store ptr %121, ptr %124, align 8 + %125 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %122, align 8 + call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %125) ret i32 0 } diff --git a/internal/lib/internal/reflectlite/value.go b/internal/lib/internal/reflectlite/value.go index bc12cb00a..d986048a8 100644 --- a/internal/lib/internal/reflectlite/value.go +++ b/internal/lib/internal/reflectlite/value.go @@ -8,6 +8,7 @@ import ( "unsafe" "github.com/goplus/llgo/internal/abi" + _ "github.com/goplus/llgo/internal/runtime" ) // Value is the reflection interface to a Go value. diff --git a/internal/runtime/z_face.go b/internal/runtime/z_face.go index 71ad78896..bc04fb621 100644 --- a/internal/runtime/z_face.go +++ b/internal/runtime/z_face.go @@ -287,6 +287,10 @@ func IfacePtrData(i iface) unsafe.Pointer { return i.data } +func SetDirectIface(t *abi.Type) { + t.Kind_ |= abi.KindDirectIface +} + // Implements reports whether the type V implements the interface type T. func Implements(T, V *abi.Type) bool { if V == nil { diff --git a/ssa/abitype.go b/ssa/abitype.go index 8bc51af94..59b6c6743 100644 --- a/ssa/abitype.go +++ b/ssa/abitype.go @@ -118,12 +118,11 @@ func (b Builder) abiMethods(t *types.Named) (ret, pret int) { } // Method{name string, typ *FuncType, ifn, tfn abi.Text} -func (b Builder) abiMethodOf(m types.Object, mSig *types.Signature /*, bg Background = InGo */) (mthd, ptrMthd Expr) { +func (b Builder) abiMethodOf(mPkg *types.Package, mName string, mSig *types.Signature /*, bg Background = InGo */) (mthd, ptrMthd Expr) { prog := b.Prog - mPkg, mName := m.Pkg(), m.Name() name := b.Str(mName).impl if !token.IsExported(mName) { - name = b.Str(abi.FullName(mPkg, m.Name())).impl + name = b.Str(abi.FullName(mPkg, mName)).impl } abiSigGo := types.NewSignatureType(nil, nil, nil, mSig.Params(), mSig.Results(), mSig.Variadic()) abiSig := prog.FuncDecl(abiSigGo, InGo).raw.Type @@ -215,12 +214,19 @@ func (b Builder) abiInitNamed(ret Expr, t *types.Named) func() Expr { var mthds []Expr var ptrMthds = make([]Expr, 0, n) for i := 0; i < n; i++ { + var mPkg *types.Package + var mSig *types.Signature m := mset[i] - sig := m.Obj().(*types.Func).Type().(*types.Signature) - if _, ok := sig.Recv().Type().Underlying().(*types.Interface); ok { - sig = m.Type().(*types.Signature) + obj := m.Obj() + mName := obj.Name() + if token.IsExported(mName) { + mPkg = t.Obj().Pkg() + mSig = m.Type().(*types.Signature) + } else { + mPkg = obj.Pkg() + mSig = obj.Type().(*types.Signature) } - mthd, ptrMthd := b.abiMethodOf(m.Obj(), sig) + mthd, ptrMthd := b.abiMethodOf(mPkg, mName, mSig) if !mthd.IsNil() { mthds = append(mthds, mthd) } @@ -312,12 +318,19 @@ func (p Package) abiTypeInit(g Global, t types.Type, pub bool) { } vexpr := tabi() prog := p.Prog - kind, _, _ := abi.DataKindOf(t, 0, prog.is32Bits) - if kind == abi.Integer || kind == abi.BitCast { + kind, _, lvl := abi.DataKindOf(t, 0, prog.is32Bits) + switch kind { + case abi.Integer, abi.BitCast: // abi.Type.Kind_ |= abi.KindDirectIface const kindDirectIface = 1 << 5 pkind := b.FieldAddr(vexpr, 6) b.Store(pkind, b.BinOp(token.OR, b.Load(pkind), Expr{prog.IntVal(kindDirectIface, prog.Byte()).impl, prog.Byte()})) + case abi.Pointer: + if lvl > 0 { + b.InlineCall(b.Pkg.rtFunc("SetDirectIface"), vexpr) + } + } + if kind == abi.Integer || kind == abi.BitCast || (kind == abi.Pointer && lvl > 0) { } b.Store(expr, vexpr) if pub { @@ -348,6 +361,19 @@ func (p Package) abiTypeInit(g Global, t types.Type, pub bool) { // abiType returns the abi type of the specified type. func (b Builder) abiType(t types.Type) Expr { + switch e := t.(type) { + case *types.Pointer: + b.loadAbiType(e.Elem()) + case *types.Slice: + b.loadAbiType(e.Elem()) + case *types.Array: + b.loadAbiType(e.Elem()) + } + g := b.loadAbiType(t) + return b.Load(g.Expr) +} + +func (b Builder) loadAbiType(t types.Type) Global { pkg := b.Pkg name, pub := pkg.abi.TypeName(t) g := pkg.VarOf(name) @@ -360,7 +386,7 @@ func (b Builder) abiType(t types.Type) Expr { } pkg.abiTypeInit(g, t, pub) } - return b.Load(g.Expr) + return g } // ----------------------------------------------------------------------------- diff --git a/ssa/interface.go b/ssa/interface.go index e0cb95ee4..0519742d2 100644 --- a/ssa/interface.go +++ b/ssa/interface.go @@ -126,16 +126,10 @@ func (b Builder) MakeInterface(tinter Type, x Expr) (ret Expr) { default: panic("todo") } - // abi.Type.Kind_ |= abi.KindDirectIface - pkind := b.FieldAddr(tabi, 6) - b.Store(pkind, b.BinOp(token.OR, b.Load(pkind), Expr{prog.IntVal(kindDirectIface, prog.Byte()).impl, prog.Byte()})) data := llvm.CreateIntToPtr(b.impl, u, prog.tyVoidPtr()) return Expr{b.unsafeInterface(rawIntf, tabi, data), tinter} } -// abi.KindDirectIface -const kindDirectIface = 1 << 5 - func (b Builder) valFromData(typ Type, data llvm.Value) Expr { prog := b.Prog kind, real, lvl := abi.DataKindOf(typ.raw.Type, 0, prog.is32Bits)