Merge pull request #911 from visualfc/reflect.conv
internal/lib/reflect: convertOp
This commit is contained in:
@@ -15,3 +15,15 @@ float llgoToFloat32(long v) {
|
||||
k.v = v;
|
||||
return k.f;
|
||||
}
|
||||
|
||||
long llgoFromFloat64(double v) {
|
||||
castUnion k;
|
||||
k.d = v;
|
||||
return k.v;
|
||||
}
|
||||
|
||||
long llgoFromFloat32(float v) {
|
||||
castUnion k;
|
||||
k.f = v;
|
||||
return k.v;
|
||||
}
|
||||
|
||||
@@ -28,3 +28,9 @@ func ToFloat64(v uintptr) float64
|
||||
|
||||
//go:linkname ToFloat32 C.llgoToFloat32
|
||||
func ToFloat32(v uintptr) float32
|
||||
|
||||
//go:linkname FromFloat64 C.llgoFromFloat64
|
||||
func FromFloat64(v float64) uintptr
|
||||
|
||||
//go:linkname FromFloat32 C.llgoFromFloat32
|
||||
func FromFloat32(v float32) uintptr
|
||||
|
||||
@@ -105,34 +105,26 @@ _llgo_1: ; preds = %_llgo_0
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%3 = load ptr, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8
|
||||
%4 = icmp eq ptr %3, null
|
||||
br i1 %4, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
%6 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 1 }, ptr %5, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56)
|
||||
%8 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %7, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %6, ptr %8, align 8
|
||||
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %7, 0
|
||||
%10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, i64 1, 1
|
||||
%11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10, i64 1, 2
|
||||
%12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %11)
|
||||
store ptr %12, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
%14 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 1 }, ptr %13, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56)
|
||||
%16 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %15, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %14, ptr %16, align 8
|
||||
%17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %15, 0
|
||||
%18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, i64 1, 1
|
||||
%19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %18, i64 1, 2
|
||||
%20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19)
|
||||
store ptr %20, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
|
||||
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
%4 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 1 }, ptr %3, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56)
|
||||
%6 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %5, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %4, ptr %6, align 8
|
||||
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %5, 0
|
||||
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, i64 1, 1
|
||||
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 1, 2
|
||||
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9)
|
||||
store ptr %10, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8
|
||||
%11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
%12 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 1 }, ptr %11, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56)
|
||||
%14 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %13, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %12, ptr %14, align 8
|
||||
%15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %13, 0
|
||||
%16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %15, i64 1, 1
|
||||
%17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %16, i64 1, 2
|
||||
%18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17)
|
||||
store ptr %18, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
|
||||
ret void
|
||||
}
|
||||
|
||||
|
||||
@@ -464,142 +464,126 @@ _llgo_3: ; preds = %_llgo_2
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%6 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%7 = icmp eq ptr %6, null
|
||||
br i1 %7, label %_llgo_5, label %_llgo_6
|
||||
%6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %6, 0
|
||||
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, i64 0, 1
|
||||
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 0, 2
|
||||
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9)
|
||||
store ptr %10, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 1 }, i64 25, i64 48, i64 0, i64 0)
|
||||
%12 = load ptr, ptr @_llgo_main.T, align 8
|
||||
%13 = icmp eq ptr %12, null
|
||||
br i1 %13, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %8, 0
|
||||
%10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, i64 0, 1
|
||||
%11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10, i64 0, 2
|
||||
%12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %11)
|
||||
store ptr %12, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
store ptr %11, ptr @_llgo_main.T, align 8
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
%13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 1 }, i64 25, i64 48, i64 0, i64 0)
|
||||
%14 = load ptr, ptr @_llgo_main.T, align 8
|
||||
%14 = load ptr, ptr @_llgo_any, align 8
|
||||
%15 = icmp eq ptr %14, null
|
||||
br i1 %15, label %_llgo_7, label %_llgo_8
|
||||
|
||||
_llgo_7: ; preds = %_llgo_6
|
||||
store ptr %13, ptr @_llgo_main.T, align 8
|
||||
%16 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %16, 0
|
||||
%18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, i64 0, 1
|
||||
%19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %18, i64 0, 2
|
||||
%20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19)
|
||||
store ptr %20, ptr @_llgo_any, align 8
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_8: ; preds = %_llgo_7, %_llgo_6
|
||||
%16 = load ptr, ptr @_llgo_any, align 8
|
||||
%17 = icmp eq ptr %16, null
|
||||
br i1 %17, label %_llgo_9, label %_llgo_10
|
||||
%21 = load ptr, ptr @_llgo_any, align 8
|
||||
%22 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
%23 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 1 }, ptr %22, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%24 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
%25 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 1 }, ptr %24, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%26 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24)
|
||||
%27 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 1 }, ptr %26, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%28 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %28, 0
|
||||
%30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %29, i64 0, 1
|
||||
%31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %30, i64 0, 2
|
||||
%32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %31)
|
||||
%33 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 1 }, ptr %32, i64 32, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%34 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 224)
|
||||
%35 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %34, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %23, ptr %35, align 8
|
||||
%36 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %34, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %25, ptr %36, align 8
|
||||
%37 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %34, i64 2
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %27, ptr %37, align 8
|
||||
%38 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %34, i64 3
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %33, ptr %38, align 8
|
||||
%39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %34, 0
|
||||
%40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %39, i64 4, 1
|
||||
%41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %40, i64 4, 2
|
||||
%42 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 48, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %41)
|
||||
store ptr %42, ptr @"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk", align 8
|
||||
%43 = load ptr, ptr @"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk", align 8
|
||||
br i1 %13, label %_llgo_9, label %_llgo_10
|
||||
|
||||
_llgo_9: ; preds = %_llgo_8
|
||||
%18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %18, 0
|
||||
%20 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19, i64 0, 1
|
||||
%21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %20, i64 0, 2
|
||||
%22 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %21)
|
||||
store ptr %22, ptr @_llgo_any, align 8
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %11, ptr %43, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer)
|
||||
br label %_llgo_10
|
||||
|
||||
_llgo_10: ; preds = %_llgo_9, %_llgo_8
|
||||
%23 = load ptr, ptr @_llgo_any, align 8
|
||||
%24 = load ptr, ptr @"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk", align 8
|
||||
%25 = icmp eq ptr %24, null
|
||||
br i1 %25, label %_llgo_11, label %_llgo_12
|
||||
%44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 0, i64 0, i64 0)
|
||||
%45 = load ptr, ptr @_llgo_main.N, align 8
|
||||
%46 = icmp eq ptr %45, null
|
||||
br i1 %46, label %_llgo_11, label %_llgo_12
|
||||
|
||||
_llgo_11: ; preds = %_llgo_10
|
||||
%26 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
%27 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 1 }, ptr %26, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%28 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
%29 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 1 }, ptr %28, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24)
|
||||
%31 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 1 }, ptr %30, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%33 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %32, 0
|
||||
%34 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %33, i64 0, 1
|
||||
%35 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %34, i64 0, 2
|
||||
%36 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35)
|
||||
%37 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 1 }, ptr %36, i64 32, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%38 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 224)
|
||||
%39 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %38, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %27, ptr %39, align 8
|
||||
%40 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %38, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %29, ptr %40, align 8
|
||||
%41 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %38, i64 2
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %31, ptr %41, align 8
|
||||
%42 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %38, i64 3
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %37, ptr %42, align 8
|
||||
%43 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %38, 0
|
||||
%44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %43, i64 4, 1
|
||||
%45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %44, i64 4, 2
|
||||
%46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 48, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %45)
|
||||
store ptr %46, ptr @"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk", align 8
|
||||
store ptr %44, ptr @_llgo_main.N, align 8
|
||||
br label %_llgo_12
|
||||
|
||||
_llgo_12: ; preds = %_llgo_11, %_llgo_10
|
||||
%47 = load ptr, ptr @"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk", align 8
|
||||
br i1 %15, label %_llgo_13, label %_llgo_14
|
||||
%47 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br i1 %46, label %_llgo_13, label %_llgo_14
|
||||
|
||||
_llgo_13: ; preds = %_llgo_12
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %13, ptr %47, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %44, ptr %47, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer)
|
||||
br label %_llgo_14
|
||||
|
||||
_llgo_14: ; preds = %_llgo_13, %_llgo_12
|
||||
%48 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 0, i64 0, i64 0)
|
||||
%49 = load ptr, ptr @_llgo_main.N, align 8
|
||||
%50 = icmp eq ptr %49, null
|
||||
br i1 %50, label %_llgo_15, label %_llgo_16
|
||||
%48 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8
|
||||
%49 = icmp eq ptr %48, null
|
||||
br i1 %49, label %_llgo_15, label %_llgo_16
|
||||
|
||||
_llgo_15: ; preds = %_llgo_14
|
||||
store ptr %48, ptr @_llgo_main.N, align 8
|
||||
%50 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
%51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24)
|
||||
%52 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 40)
|
||||
%53 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 8, ptr %52)
|
||||
%54 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 7 }, ptr %53, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%55 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
%56 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 8, ptr %55)
|
||||
%57 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 4 }, ptr %56, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%58 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24)
|
||||
%59 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 8, ptr %58)
|
||||
%60 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 5 }, ptr %59, i64 72, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%61 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 58)
|
||||
%62 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 8 }, ptr %61, i64 200, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%63 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 224)
|
||||
%64 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %63, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %54, ptr %64, align 8
|
||||
%65 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %63, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %57, ptr %65, align 8
|
||||
%66 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %63, i64 2
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %60, ptr %66, align 8
|
||||
%67 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %63, i64 3
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %62, ptr %67, align 8
|
||||
%68 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %63, 0
|
||||
%69 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68, i64 4, 1
|
||||
%70 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %69, i64 4, 2
|
||||
%71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %70)
|
||||
%72 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %50, ptr %51, ptr %71, i64 4)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %72)
|
||||
store ptr %72, ptr @"map[_llgo_int]_llgo_string", align 8
|
||||
br label %_llgo_16
|
||||
|
||||
_llgo_16: ; preds = %_llgo_15, %_llgo_14
|
||||
%51 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br i1 %50, label %_llgo_17, label %_llgo_18
|
||||
|
||||
_llgo_17: ; preds = %_llgo_16
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %48, ptr %51, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer)
|
||||
br label %_llgo_18
|
||||
|
||||
_llgo_18: ; preds = %_llgo_17, %_llgo_16
|
||||
%52 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8
|
||||
%53 = icmp eq ptr %52, null
|
||||
br i1 %53, label %_llgo_19, label %_llgo_20
|
||||
|
||||
_llgo_19: ; preds = %_llgo_18
|
||||
%54 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
%55 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24)
|
||||
%56 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 40)
|
||||
%57 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 8, ptr %56)
|
||||
%58 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 7 }, ptr %57, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%59 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
%60 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 8, ptr %59)
|
||||
%61 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 4 }, ptr %60, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%62 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24)
|
||||
%63 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 8, ptr %62)
|
||||
%64 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 5 }, ptr %63, i64 72, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%65 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 58)
|
||||
%66 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 8 }, ptr %65, i64 200, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%67 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 224)
|
||||
%68 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %67, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %58, ptr %68, align 8
|
||||
%69 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %67, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %61, ptr %69, align 8
|
||||
%70 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %67, i64 2
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %64, ptr %70, align 8
|
||||
%71 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %67, i64 3
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %66, ptr %71, align 8
|
||||
%72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %67, 0
|
||||
%73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %72, i64 4, 1
|
||||
%74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %73, i64 4, 2
|
||||
%75 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %74)
|
||||
%76 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %54, ptr %55, ptr %75, i64 4)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %76)
|
||||
store ptr %76, ptr @"map[_llgo_int]_llgo_string", align 8
|
||||
br label %_llgo_20
|
||||
|
||||
_llgo_20: ; preds = %_llgo_19, %_llgo_18
|
||||
ret void
|
||||
}
|
||||
|
||||
|
||||
@@ -611,95 +611,87 @@ _llgo_17: ; preds = %_llgo_16
|
||||
br label %_llgo_18
|
||||
|
||||
_llgo_18: ; preds = %_llgo_17, %_llgo_16
|
||||
%66 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%67 = icmp eq ptr %66, null
|
||||
br i1 %67, label %_llgo_19, label %_llgo_20
|
||||
%66 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%67 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %66, 0
|
||||
%68 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %67, i64 0, 1
|
||||
%69 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68, i64 0, 2
|
||||
%70 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %69)
|
||||
store ptr %70, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%71 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br i1 %65, label %_llgo_19, label %_llgo_20
|
||||
|
||||
_llgo_19: ; preds = %_llgo_18
|
||||
%68 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%69 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %68, 0
|
||||
%70 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %69, i64 0, 1
|
||||
%71 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %70, i64 0, 2
|
||||
%72 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %71)
|
||||
store ptr %72, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%72 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%73 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %72, 1
|
||||
%74 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %73, ptr @"main.(*C1).f", 2
|
||||
%75 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %74, ptr @"main.(*C1).f", 3
|
||||
%76 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %72, 1
|
||||
%77 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %76, ptr @"main.(*C1).f", 2
|
||||
%78 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %77, ptr @main.C1.f, 3
|
||||
%79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
|
||||
%80 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %79, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %78, ptr %80, align 8
|
||||
%81 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %79, 0
|
||||
%82 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %81, i64 1, 1
|
||||
%83 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %82, i64 1, 2
|
||||
%84 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
|
||||
%85 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %84, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %75, ptr %85, align 8
|
||||
%86 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %84, 0
|
||||
%87 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %86, i64 1, 1
|
||||
%88 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %87, i64 1, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %63, ptr %71, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %83, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %88)
|
||||
br label %_llgo_20
|
||||
|
||||
_llgo_20: ; preds = %_llgo_19, %_llgo_18
|
||||
%73 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br i1 %65, label %_llgo_21, label %_llgo_22
|
||||
%89 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 2 }, i64 25, i64 0, i64 2, i64 2)
|
||||
%90 = load ptr, ptr @_llgo_main.C2, align 8
|
||||
%91 = icmp eq ptr %90, null
|
||||
br i1 %91, label %_llgo_21, label %_llgo_22
|
||||
|
||||
_llgo_21: ; preds = %_llgo_20
|
||||
%74 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%75 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %74, 1
|
||||
%76 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %75, ptr @"main.(*C1).f", 2
|
||||
%77 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %76, ptr @"main.(*C1).f", 3
|
||||
%78 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %74, 1
|
||||
%79 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %78, ptr @"main.(*C1).f", 2
|
||||
%80 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %79, ptr @main.C1.f, 3
|
||||
%81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
|
||||
%82 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %81, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %80, ptr %82, align 8
|
||||
%83 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %81, 0
|
||||
%84 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %83, i64 1, 1
|
||||
%85 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %84, i64 1, 2
|
||||
%86 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
|
||||
%87 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %86, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %77, ptr %87, align 8
|
||||
%88 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %86, 0
|
||||
%89 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %88, i64 1, 1
|
||||
%90 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %89, i64 1, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %63, ptr %73, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %85, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %90)
|
||||
store ptr %89, ptr @_llgo_main.C2, align 8
|
||||
br label %_llgo_22
|
||||
|
||||
_llgo_22: ; preds = %_llgo_21, %_llgo_20
|
||||
%91 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 2 }, i64 25, i64 0, i64 2, i64 2)
|
||||
%92 = load ptr, ptr @_llgo_main.C2, align 8
|
||||
%93 = icmp eq ptr %92, null
|
||||
br i1 %93, label %_llgo_23, label %_llgo_24
|
||||
%92 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br i1 %91, label %_llgo_23, label %_llgo_24
|
||||
|
||||
_llgo_23: ; preds = %_llgo_22
|
||||
store ptr %91, ptr @_llgo_main.C2, align 8
|
||||
%93 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%94 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %93, 1
|
||||
%95 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %94, ptr @"main.(*C2).f", 2
|
||||
%96 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %95, ptr @"main.(*C2).f", 3
|
||||
%97 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %93, 1
|
||||
%98 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %97, ptr @"main.(*C2).f", 2
|
||||
%99 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %98, ptr @main.C2.f, 3
|
||||
%100 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%101 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %100, 1
|
||||
%102 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %101, ptr @"main.(*C2).g", 2
|
||||
%103 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %102, ptr @"main.(*C2).g", 3
|
||||
%104 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %100, 1
|
||||
%105 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %104, ptr @"main.(*C2).g", 2
|
||||
%106 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %105, ptr @main.C2.g, 3
|
||||
%107 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
|
||||
%108 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %107, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %99, ptr %108, align 8
|
||||
%109 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %107, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %106, ptr %109, align 8
|
||||
%110 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %107, 0
|
||||
%111 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %110, i64 2, 1
|
||||
%112 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %111, i64 2, 2
|
||||
%113 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
|
||||
%114 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %113, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %96, ptr %114, align 8
|
||||
%115 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %113, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %103, ptr %115, align 8
|
||||
%116 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %113, 0
|
||||
%117 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %116, i64 2, 1
|
||||
%118 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %117, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %89, ptr %92, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %112, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %118)
|
||||
br label %_llgo_24
|
||||
|
||||
_llgo_24: ; preds = %_llgo_23, %_llgo_22
|
||||
%94 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br i1 %93, label %_llgo_25, label %_llgo_26
|
||||
|
||||
_llgo_25: ; preds = %_llgo_24
|
||||
%95 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%96 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %95, 1
|
||||
%97 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %96, ptr @"main.(*C2).f", 2
|
||||
%98 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %97, ptr @"main.(*C2).f", 3
|
||||
%99 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %95, 1
|
||||
%100 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %99, ptr @"main.(*C2).f", 2
|
||||
%101 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %100, ptr @main.C2.f, 3
|
||||
%102 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%103 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %102, 1
|
||||
%104 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %103, ptr @"main.(*C2).g", 2
|
||||
%105 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %104, ptr @"main.(*C2).g", 3
|
||||
%106 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %102, 1
|
||||
%107 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %106, ptr @"main.(*C2).g", 2
|
||||
%108 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %107, ptr @main.C2.g, 3
|
||||
%109 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
|
||||
%110 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %109, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %101, ptr %110, align 8
|
||||
%111 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %109, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %108, ptr %111, align 8
|
||||
%112 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %109, 0
|
||||
%113 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %112, i64 2, 1
|
||||
%114 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %113, i64 2, 2
|
||||
%115 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
|
||||
%116 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %115, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %98, ptr %116, align 8
|
||||
%117 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %115, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %105, ptr %117, align 8
|
||||
%118 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %115, 0
|
||||
%119 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %118, i64 2, 1
|
||||
%120 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %119, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %91, ptr %94, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %114, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %120)
|
||||
br label %_llgo_26
|
||||
|
||||
_llgo_26: ; preds = %_llgo_25, %_llgo_24
|
||||
ret void
|
||||
}
|
||||
|
||||
|
||||
@@ -439,161 +439,153 @@ define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 4 }, i64 25, i64 0, i64 2, i64 2)
|
||||
store ptr %0, ptr @_llgo_main.impl, align 8
|
||||
%1 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%2 = icmp eq ptr %1, null
|
||||
br i1 %2, label %_llgo_1, label %_llgo_2
|
||||
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %1, 0
|
||||
%3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %2, i64 0, 1
|
||||
%4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %3, i64 0, 2
|
||||
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %4)
|
||||
store ptr %5, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%6 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%7 = load ptr, ptr @_llgo_int, align 8
|
||||
%8 = icmp eq ptr %7, null
|
||||
br i1 %8, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %3, 0
|
||||
%5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %4, i64 0, 1
|
||||
%6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %5, i64 0, 2
|
||||
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6)
|
||||
store ptr %7, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
store ptr %9, ptr @_llgo_int, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%8 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%9 = load ptr, ptr @_llgo_int, align 8
|
||||
%10 = icmp eq ptr %9, null
|
||||
br i1 %10, label %_llgo_3, label %_llgo_4
|
||||
%10 = load ptr, ptr @_llgo_int, align 8
|
||||
%11 = load ptr, ptr @_llgo_int, align 8
|
||||
%12 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%13 = icmp eq ptr %12, null
|
||||
br i1 %13, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
store ptr %11, ptr @_llgo_int, align 8
|
||||
%14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %14, 0
|
||||
%16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %15, i64 0, 1
|
||||
%17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %16, i64 0, 2
|
||||
%18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
|
||||
%19 = getelementptr ptr, ptr %18, i64 0
|
||||
store ptr %11, ptr %19, align 8
|
||||
%20 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %18, 0
|
||||
%21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %20, i64 1, 1
|
||||
%22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %21, i64 1, 2
|
||||
%23 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %22, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %23)
|
||||
store ptr %23, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%12 = load ptr, ptr @_llgo_int, align 8
|
||||
%13 = load ptr, ptr @_llgo_int, align 8
|
||||
%14 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%15 = icmp eq ptr %14, null
|
||||
br i1 %15, label %_llgo_5, label %_llgo_6
|
||||
%24 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%25 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %24, 1
|
||||
%26 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %25, ptr @"main.(*impl).one", 2
|
||||
%27 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %26, ptr @"main.(*impl).one", 3
|
||||
%28 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %24, 1
|
||||
%29 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %28, ptr @"main.(*impl).one", 2
|
||||
%30 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %29, ptr @main.impl.one, 3
|
||||
%31 = load ptr, ptr @_llgo_string, align 8
|
||||
%32 = icmp eq ptr %31, null
|
||||
br i1 %32, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%16 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %16, 0
|
||||
%18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, i64 0, 1
|
||||
%19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %18, i64 0, 2
|
||||
%20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
|
||||
%21 = getelementptr ptr, ptr %20, i64 0
|
||||
store ptr %13, ptr %21, align 8
|
||||
%22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %20, 0
|
||||
%23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %22, i64 1, 1
|
||||
%24 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %23, i64 1, 2
|
||||
%25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %24, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %25)
|
||||
store ptr %25, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%33 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24)
|
||||
store ptr %33, ptr @_llgo_string, align 8
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
%26 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%27 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %26, 1
|
||||
%28 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %27, ptr @"main.(*impl).one", 2
|
||||
%29 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %28, ptr @"main.(*impl).one", 3
|
||||
%30 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %26, 1
|
||||
%31 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %30, ptr @"main.(*impl).one", 2
|
||||
%32 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %31, ptr @main.impl.one, 3
|
||||
%33 = load ptr, ptr @_llgo_string, align 8
|
||||
%34 = icmp eq ptr %33, null
|
||||
br i1 %34, label %_llgo_7, label %_llgo_8
|
||||
%34 = load ptr, ptr @_llgo_string, align 8
|
||||
%35 = load ptr, ptr @_llgo_string, align 8
|
||||
%36 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%37 = icmp eq ptr %36, null
|
||||
br i1 %37, label %_llgo_7, label %_llgo_8
|
||||
|
||||
_llgo_7: ; preds = %_llgo_6
|
||||
%35 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24)
|
||||
store ptr %35, ptr @_llgo_string, align 8
|
||||
%38 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %38, 0
|
||||
%40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %39, i64 0, 1
|
||||
%41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %40, i64 0, 2
|
||||
%42 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
|
||||
%43 = getelementptr ptr, ptr %42, i64 0
|
||||
store ptr %35, ptr %43, align 8
|
||||
%44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %42, 0
|
||||
%45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %44, i64 1, 1
|
||||
%46 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %45, i64 1, 2
|
||||
%47 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %41, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %46, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %47)
|
||||
store ptr %47, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_8: ; preds = %_llgo_7, %_llgo_6
|
||||
%36 = load ptr, ptr @_llgo_string, align 8
|
||||
%37 = load ptr, ptr @_llgo_string, align 8
|
||||
%38 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%39 = icmp eq ptr %38, null
|
||||
br i1 %39, label %_llgo_9, label %_llgo_10
|
||||
%48 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%49 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %48, 1
|
||||
%50 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %49, ptr @"main.(*impl).two", 2
|
||||
%51 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %50, ptr @"main.(*impl).two", 3
|
||||
%52 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %48, 1
|
||||
%53 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %52, ptr @"main.(*impl).two", 2
|
||||
%54 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %53, ptr @main.impl.two, 3
|
||||
%55 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
|
||||
%56 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %55, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %30, ptr %56, align 8
|
||||
%57 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %55, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %54, ptr %57, align 8
|
||||
%58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %55, 0
|
||||
%59 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, i64 2, 1
|
||||
%60 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %59, i64 2, 2
|
||||
%61 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
|
||||
%62 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %61, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %27, ptr %62, align 8
|
||||
%63 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %61, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %51, ptr %63, align 8
|
||||
%64 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %61, 0
|
||||
%65 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %64, i64 2, 1
|
||||
%66 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %65, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %0, ptr %6, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %66)
|
||||
%67 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%68 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%69 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 8 }, ptr undef }, ptr %67, 1
|
||||
%70 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 8 }, ptr undef }, ptr %68, 1
|
||||
%71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
|
||||
%72 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %71, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %69, ptr %72, align 8
|
||||
%73 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %71, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %70, ptr %73, align 8
|
||||
%74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %71, 0
|
||||
%75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %74, i64 2, 1
|
||||
%76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75, i64 2, 2
|
||||
%77 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %76)
|
||||
store ptr %77, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
|
||||
%78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 1 })
|
||||
%79 = load ptr, ptr @_llgo_main.I, align 8
|
||||
%80 = icmp eq ptr %79, null
|
||||
br i1 %80, label %_llgo_9, label %_llgo_10
|
||||
|
||||
_llgo_9: ; preds = %_llgo_8
|
||||
%40 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %40, 0
|
||||
%42 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %41, i64 0, 1
|
||||
%43 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %42, i64 0, 2
|
||||
%44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
|
||||
%45 = getelementptr ptr, ptr %44, i64 0
|
||||
store ptr %37, ptr %45, align 8
|
||||
%46 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %44, 0
|
||||
%47 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %46, i64 1, 1
|
||||
%48 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %47, i64 1, 2
|
||||
%49 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %43, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %48, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %49)
|
||||
store ptr %49, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
store ptr %78, ptr @_llgo_main.I, align 8
|
||||
br label %_llgo_10
|
||||
|
||||
_llgo_10: ; preds = %_llgo_9, %_llgo_8
|
||||
%50 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%51 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %50, 1
|
||||
%52 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %51, ptr @"main.(*impl).two", 2
|
||||
%53 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %52, ptr @"main.(*impl).two", 3
|
||||
%54 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %50, 1
|
||||
%55 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %54, ptr @"main.(*impl).two", 2
|
||||
%56 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %55, ptr @main.impl.two, 3
|
||||
%57 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
|
||||
%58 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %57, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %32, ptr %58, align 8
|
||||
%59 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %57, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %56, ptr %59, align 8
|
||||
%60 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %57, 0
|
||||
%61 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, i64 2, 1
|
||||
%62 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %61, i64 2, 2
|
||||
%63 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
|
||||
%64 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %63, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %29, ptr %64, align 8
|
||||
%65 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %63, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %53, ptr %65, align 8
|
||||
%66 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %63, 0
|
||||
%67 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %66, i64 2, 1
|
||||
%68 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %67, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %0, ptr %8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %62, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68)
|
||||
%69 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%70 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%71 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 8 }, ptr undef }, ptr %69, 1
|
||||
%72 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 8 }, ptr undef }, ptr %70, 1
|
||||
%73 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
|
||||
%74 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %73, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %71, ptr %74, align 8
|
||||
%75 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %73, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %72, ptr %75, align 8
|
||||
%76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %73, 0
|
||||
%77 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %76, i64 2, 1
|
||||
%78 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77, i64 2, 2
|
||||
%79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %78)
|
||||
store ptr %79, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
|
||||
%80 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 1 })
|
||||
%81 = load ptr, ptr @_llgo_main.I, align 8
|
||||
%82 = icmp eq ptr %81, null
|
||||
br i1 %82, label %_llgo_11, label %_llgo_12
|
||||
%81 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%82 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
br i1 %80, label %_llgo_11, label %_llgo_12
|
||||
|
||||
_llgo_11: ; preds = %_llgo_10
|
||||
store ptr %80, ptr @_llgo_main.I, align 8
|
||||
%83 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 8 }, ptr undef }, ptr %81, 1
|
||||
%84 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 8 }, ptr undef }, ptr %82, 1
|
||||
%85 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
|
||||
%86 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %85, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %83, ptr %86, align 8
|
||||
%87 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %85, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %84, ptr %87, align 8
|
||||
%88 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %85, 0
|
||||
%89 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %88, i64 2, 1
|
||||
%90 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %89, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %78, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %90)
|
||||
br label %_llgo_12
|
||||
|
||||
_llgo_12: ; preds = %_llgo_11, %_llgo_10
|
||||
%83 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%84 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
br i1 %82, label %_llgo_13, label %_llgo_14
|
||||
|
||||
_llgo_13: ; preds = %_llgo_12
|
||||
%85 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 8 }, ptr undef }, ptr %83, 1
|
||||
%86 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 8 }, ptr undef }, ptr %84, 1
|
||||
%87 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
|
||||
%88 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %87, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %85, ptr %88, align 8
|
||||
%89 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %87, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %86, ptr %89, align 8
|
||||
%90 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %87, 0
|
||||
%91 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %90, i64 2, 1
|
||||
%92 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %91, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %80, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %92)
|
||||
br label %_llgo_14
|
||||
|
||||
_llgo_14: ; preds = %_llgo_13, %_llgo_12
|
||||
ret void
|
||||
}
|
||||
|
||||
|
||||
@@ -224,225 +224,209 @@ _llgo_3: ; preds = %_llgo_2
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%6 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%7 = icmp eq ptr %6, null
|
||||
br i1 %7, label %_llgo_5, label %_llgo_6
|
||||
%6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %6, 0
|
||||
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, i64 0, 1
|
||||
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 0, 2
|
||||
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9)
|
||||
store ptr %10, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%11 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br i1 %5, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %8, 0
|
||||
%10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, i64 0, 1
|
||||
%11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10, i64 0, 2
|
||||
%12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %11)
|
||||
store ptr %12, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br label %_llgo_6
|
||||
%12 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%13 = icmp eq ptr %12, null
|
||||
br i1 %13, label %_llgo_7, label %_llgo_8
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
%13 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br i1 %5, label %_llgo_7, label %_llgo_8
|
||||
_llgo_6: ; preds = %_llgo_8, %_llgo_4
|
||||
%14 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game", align 8
|
||||
%15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 25, i64 0, i64 0, i64 2)
|
||||
%16 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game", align 8
|
||||
%17 = icmp eq ptr %16, null
|
||||
br i1 %17, label %_llgo_9, label %_llgo_10
|
||||
|
||||
_llgo_7: ; preds = %_llgo_6
|
||||
%14 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%15 = icmp eq ptr %14, null
|
||||
br i1 %15, label %_llgo_9, label %_llgo_10
|
||||
|
||||
_llgo_8: ; preds = %_llgo_10, %_llgo_6
|
||||
%16 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game", align 8
|
||||
%17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 25, i64 0, i64 0, i64 2)
|
||||
%18 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game", align 8
|
||||
%19 = icmp eq ptr %18, null
|
||||
br i1 %19, label %_llgo_11, label %_llgo_12
|
||||
|
||||
_llgo_9: ; preds = %_llgo_7
|
||||
%20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %20, 0
|
||||
%22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %21, i64 0, 1
|
||||
%23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %22, i64 0, 2
|
||||
%24 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%25 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %24, 0
|
||||
%26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %25, i64 0, 1
|
||||
%27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %26, i64 0, 2
|
||||
%28 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %23, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %27, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %28)
|
||||
store ptr %28, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
br label %_llgo_10
|
||||
|
||||
_llgo_10: ; preds = %_llgo_9, %_llgo_7
|
||||
%29 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%30 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %29, 1
|
||||
%31 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %30, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).Load", 2
|
||||
%32 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %31, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).Load", 3
|
||||
%33 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%34 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 57 }, ptr undef, ptr undef, ptr undef }, ptr %33, 1
|
||||
%35 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %34, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame", 2
|
||||
%36 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %35, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame", 3
|
||||
%37 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
|
||||
%38 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %37, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %32, ptr %38, align 8
|
||||
%39 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %37, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %36, ptr %39, align 8
|
||||
%40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %37, 0
|
||||
%41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %40, i64 2, 1
|
||||
%42 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %41, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %3, ptr %13, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %42)
|
||||
_llgo_7: ; preds = %_llgo_5
|
||||
%18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %18, 0
|
||||
%20 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19, i64 0, 1
|
||||
%21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %20, i64 0, 2
|
||||
%22 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %22, 0
|
||||
%24 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %23, i64 0, 1
|
||||
%25 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %24, i64 0, 2
|
||||
%26 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %21, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %25, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %26)
|
||||
store ptr %26, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_11: ; preds = %_llgo_8
|
||||
%43 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %17)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %43)
|
||||
store ptr %43, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game", align 8
|
||||
_llgo_8: ; preds = %_llgo_7, %_llgo_5
|
||||
%27 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%28 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %27, 1
|
||||
%29 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %28, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).Load", 2
|
||||
%30 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %29, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).Load", 3
|
||||
%31 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%32 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 57 }, ptr undef, ptr undef, ptr undef }, ptr %31, 1
|
||||
%33 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %32, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame", 2
|
||||
%34 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %33, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame", 3
|
||||
%35 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
|
||||
%36 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %35, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %30, ptr %36, align 8
|
||||
%37 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %35, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %34, ptr %37, align 8
|
||||
%38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %35, 0
|
||||
%39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %38, i64 2, 1
|
||||
%40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %39, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %3, ptr %11, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %40)
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_9: ; preds = %_llgo_6
|
||||
%41 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %15)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %41)
|
||||
store ptr %41, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game", align 8
|
||||
br label %_llgo_10
|
||||
|
||||
_llgo_10: ; preds = %_llgo_9, %_llgo_6
|
||||
%42 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game", align 8
|
||||
%43 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 25, i64 0, i64 0, i64 2)
|
||||
%44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %43)
|
||||
%45 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, ptr %44, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 true)
|
||||
%46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56)
|
||||
%47 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %46, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %45, ptr %47, align 8
|
||||
%48 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %46, 0
|
||||
%49 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %48, i64 1, 1
|
||||
%50 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %49, i64 1, 2
|
||||
%51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %50)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %51)
|
||||
store ptr %51, ptr @"_llgo_struct$8pZiNl4ZxK-lZr-eyXOGJ2lgSsNDx-SmrHiChs0Nc-o", align 8
|
||||
%52 = load ptr, ptr @"_llgo_struct$8pZiNl4ZxK-lZr-eyXOGJ2lgSsNDx-SmrHiChs0Nc-o", align 8
|
||||
br i1 %2, label %_llgo_11, label %_llgo_12
|
||||
|
||||
_llgo_11: ; preds = %_llgo_10
|
||||
%53 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%54 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %53, 1
|
||||
%55 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %54, ptr @"main.(*Game1).Load", 2
|
||||
%56 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %55, ptr @"main.(*Game1).Load", 3
|
||||
%57 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %53, 1
|
||||
%58 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %57, ptr @"main.(*Game1).Load", 2
|
||||
%59 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %58, ptr @main.Game1.Load, 3
|
||||
%60 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%61 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 57 }, ptr undef, ptr undef, ptr undef }, ptr %60, 1
|
||||
%62 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %61, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame", 2
|
||||
%63 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %62, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame", 3
|
||||
%64 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
|
||||
%65 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %64, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %59, ptr %65, align 8
|
||||
%66 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %64, 0
|
||||
%67 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %66, i64 1, 1
|
||||
%68 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %67, i64 1, 2
|
||||
%69 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
|
||||
%70 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %69, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %56, ptr %70, align 8
|
||||
%71 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %69, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %63, ptr %71, align 8
|
||||
%72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %69, 0
|
||||
%73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %72, i64 2, 1
|
||||
%74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %73, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %0, ptr %52, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %74)
|
||||
br label %_llgo_12
|
||||
|
||||
_llgo_12: ; preds = %_llgo_11, %_llgo_8
|
||||
%44 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game", align 8
|
||||
%45 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 25, i64 0, i64 0, i64 2)
|
||||
%46 = load ptr, ptr @"_llgo_struct$8pZiNl4ZxK-lZr-eyXOGJ2lgSsNDx-SmrHiChs0Nc-o", align 8
|
||||
%47 = icmp eq ptr %46, null
|
||||
br i1 %47, label %_llgo_13, label %_llgo_14
|
||||
_llgo_12: ; preds = %_llgo_11, %_llgo_10
|
||||
%75 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, i64 25, i64 8, i64 2, i64 2)
|
||||
%76 = load ptr, ptr @"*_llgo_main.Game1", align 8
|
||||
%77 = icmp eq ptr %76, null
|
||||
br i1 %77, label %_llgo_13, label %_llgo_14
|
||||
|
||||
_llgo_13: ; preds = %_llgo_12
|
||||
%48 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %45)
|
||||
%49 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, ptr %48, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 true)
|
||||
%50 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56)
|
||||
%51 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %50, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %49, ptr %51, align 8
|
||||
%52 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %50, 0
|
||||
%53 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %52, i64 1, 1
|
||||
%54 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %53, i64 1, 2
|
||||
%55 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %54)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %55)
|
||||
store ptr %55, ptr @"_llgo_struct$8pZiNl4ZxK-lZr-eyXOGJ2lgSsNDx-SmrHiChs0Nc-o", align 8
|
||||
%78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %75)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %78)
|
||||
store ptr %78, ptr @"*_llgo_main.Game1", align 8
|
||||
br label %_llgo_14
|
||||
|
||||
_llgo_14: ; preds = %_llgo_13, %_llgo_12
|
||||
%56 = load ptr, ptr @"_llgo_struct$8pZiNl4ZxK-lZr-eyXOGJ2lgSsNDx-SmrHiChs0Nc-o", align 8
|
||||
br i1 %2, label %_llgo_15, label %_llgo_16
|
||||
%79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 5 }, i64 25, i64 0, i64 0, i64 1)
|
||||
%80 = load ptr, ptr @_llgo_main.Game2, align 8
|
||||
%81 = icmp eq ptr %80, null
|
||||
br i1 %81, label %_llgo_15, label %_llgo_16
|
||||
|
||||
_llgo_15: ; preds = %_llgo_14
|
||||
%57 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%58 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %57, 1
|
||||
%59 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %58, ptr @"main.(*Game1).Load", 2
|
||||
%60 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %59, ptr @"main.(*Game1).Load", 3
|
||||
%61 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %57, 1
|
||||
%62 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %61, ptr @"main.(*Game1).Load", 2
|
||||
%63 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %62, ptr @main.Game1.Load, 3
|
||||
%64 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%65 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 57 }, ptr undef, ptr undef, ptr undef }, ptr %64, 1
|
||||
%66 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %65, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame", 2
|
||||
%67 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %66, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame", 3
|
||||
%68 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
|
||||
%69 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %68, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %63, ptr %69, align 8
|
||||
%70 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %68, 0
|
||||
%71 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %70, i64 1, 1
|
||||
%72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %71, i64 1, 2
|
||||
%73 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
|
||||
%74 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %73, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %60, ptr %74, align 8
|
||||
%75 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %73, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %67, ptr %75, align 8
|
||||
%76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %73, 0
|
||||
%77 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %76, i64 2, 1
|
||||
%78 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %0, ptr %56, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %72, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %78)
|
||||
store ptr %79, ptr @_llgo_main.Game2, align 8
|
||||
br label %_llgo_16
|
||||
|
||||
_llgo_16: ; preds = %_llgo_15, %_llgo_14
|
||||
%79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, i64 25, i64 8, i64 2, i64 2)
|
||||
%80 = load ptr, ptr @"*_llgo_main.Game1", align 8
|
||||
%81 = icmp eq ptr %80, null
|
||||
%82 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br i1 %81, label %_llgo_17, label %_llgo_18
|
||||
|
||||
_llgo_17: ; preds = %_llgo_16
|
||||
%82 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %79)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %82)
|
||||
store ptr %82, ptr @"*_llgo_main.Game1", align 8
|
||||
%83 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%84 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 13 }, ptr undef, ptr undef, ptr undef }, ptr %83, 1
|
||||
%85 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %84, ptr @"main.(*Game2).initGame", 2
|
||||
%86 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %85, ptr @"main.(*Game2).initGame", 3
|
||||
%87 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
|
||||
%88 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %87, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %86, ptr %88, align 8
|
||||
%89 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %87, 0
|
||||
%90 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %89, i64 1, 1
|
||||
%91 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %90, i64 1, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %79, ptr %82, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %91)
|
||||
br label %_llgo_18
|
||||
|
||||
_llgo_18: ; preds = %_llgo_17, %_llgo_16
|
||||
%83 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 5 }, i64 25, i64 0, i64 0, i64 1)
|
||||
%84 = load ptr, ptr @_llgo_main.Game2, align 8
|
||||
%85 = icmp eq ptr %84, null
|
||||
br i1 %85, label %_llgo_19, label %_llgo_20
|
||||
%92 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 5 }, i64 25, i64 0, i64 0, i64 1)
|
||||
%93 = load ptr, ptr @"*_llgo_main.Game2", align 8
|
||||
%94 = icmp eq ptr %93, null
|
||||
br i1 %94, label %_llgo_19, label %_llgo_20
|
||||
|
||||
_llgo_19: ; preds = %_llgo_18
|
||||
store ptr %83, ptr @_llgo_main.Game2, align 8
|
||||
%95 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %92)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %95)
|
||||
store ptr %95, ptr @"*_llgo_main.Game2", align 8
|
||||
br label %_llgo_20
|
||||
|
||||
_llgo_20: ; preds = %_llgo_19, %_llgo_18
|
||||
%86 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br i1 %85, label %_llgo_21, label %_llgo_22
|
||||
%96 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 5 })
|
||||
%97 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Gamer", align 8
|
||||
%98 = icmp eq ptr %97, null
|
||||
br i1 %98, label %_llgo_21, label %_llgo_22
|
||||
|
||||
_llgo_21: ; preds = %_llgo_20
|
||||
%87 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%88 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 13 }, ptr undef, ptr undef, ptr undef }, ptr %87, 1
|
||||
%89 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %88, ptr @"main.(*Game2).initGame", 2
|
||||
%90 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %89, ptr @"main.(*Game2).initGame", 3
|
||||
%91 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
|
||||
%92 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %91, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %90, ptr %92, align 8
|
||||
%93 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %91, 0
|
||||
%94 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %93, i64 1, 1
|
||||
%95 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %94, i64 1, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %83, ptr %86, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %95)
|
||||
store ptr %96, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Gamer", align 8
|
||||
br label %_llgo_22
|
||||
|
||||
_llgo_22: ; preds = %_llgo_21, %_llgo_20
|
||||
%96 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 5 }, i64 25, i64 0, i64 0, i64 1)
|
||||
%97 = load ptr, ptr @"*_llgo_main.Game2", align 8
|
||||
%98 = icmp eq ptr %97, null
|
||||
%99 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%100 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
br i1 %98, label %_llgo_23, label %_llgo_24
|
||||
|
||||
_llgo_23: ; preds = %_llgo_22
|
||||
%99 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %96)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %99)
|
||||
store ptr %99, ptr @"*_llgo_main.Game2", align 8
|
||||
%101 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef }, ptr %99, 1
|
||||
%102 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 57 }, ptr undef }, ptr %100, 1
|
||||
%103 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
|
||||
%104 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %103, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %101, ptr %104, align 8
|
||||
%105 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %103, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %102, ptr %105, align 8
|
||||
%106 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %103, 0
|
||||
%107 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %106, i64 2, 1
|
||||
%108 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %107, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %96, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %108)
|
||||
br label %_llgo_24
|
||||
|
||||
_llgo_24: ; preds = %_llgo_23, %_llgo_22
|
||||
%100 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 5 })
|
||||
%101 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Gamer", align 8
|
||||
%102 = icmp eq ptr %101, null
|
||||
br i1 %102, label %_llgo_25, label %_llgo_26
|
||||
|
||||
_llgo_25: ; preds = %_llgo_24
|
||||
store ptr %100, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Gamer", align 8
|
||||
br label %_llgo_26
|
||||
|
||||
_llgo_26: ; preds = %_llgo_25, %_llgo_24
|
||||
%103 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%104 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
br i1 %102, label %_llgo_27, label %_llgo_28
|
||||
|
||||
_llgo_27: ; preds = %_llgo_26
|
||||
%105 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef }, ptr %103, 1
|
||||
%106 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 57 }, ptr undef }, ptr %104, 1
|
||||
%107 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
|
||||
%108 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %107, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %105, ptr %108, align 8
|
||||
%109 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %107, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %106, ptr %109, align 8
|
||||
%110 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %107, 0
|
||||
%111 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %110, i64 2, 1
|
||||
%112 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %111, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %100, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %112)
|
||||
br label %_llgo_28
|
||||
|
||||
_llgo_28: ; preds = %_llgo_27, %_llgo_26
|
||||
%113 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%114 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%115 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef }, ptr %113, 1
|
||||
%116 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 57 }, ptr undef }, ptr %114, 1
|
||||
%117 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
|
||||
%118 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %117, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %115, ptr %118, align 8
|
||||
%119 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %117, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %116, ptr %119, align 8
|
||||
%120 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %117, 0
|
||||
%121 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %120, i64 2, 1
|
||||
%122 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %121, i64 2, 2
|
||||
%123 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %122)
|
||||
store ptr %123, ptr @"main.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8
|
||||
%109 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%110 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%111 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef }, ptr %109, 1
|
||||
%112 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 57 }, ptr undef }, ptr %110, 1
|
||||
%113 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
|
||||
%114 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %113, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %111, ptr %114, align 8
|
||||
%115 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %113, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %112, ptr %115, align 8
|
||||
%116 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %113, 0
|
||||
%117 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %116, i64 2, 1
|
||||
%118 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %117, i64 2, 2
|
||||
%119 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %118)
|
||||
store ptr %119, ptr @"main.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8
|
||||
ret void
|
||||
}
|
||||
|
||||
|
||||
@@ -1189,541 +1189,533 @@ _llgo_33: ; preds = %_llgo_32
|
||||
_llgo_34: ; preds = %_llgo_33, %_llgo_32
|
||||
%122 = load ptr, ptr @_llgo_main.Reader, align 8
|
||||
%123 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 6 })
|
||||
%124 = load ptr, ptr @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y", align 8
|
||||
%125 = icmp eq ptr %124, null
|
||||
br i1 %125, label %_llgo_35, label %_llgo_36
|
||||
%124 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 6 }, ptr %123, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 true)
|
||||
%125 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56)
|
||||
%126 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %125, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %124, ptr %126, align 8
|
||||
%127 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %125, 0
|
||||
%128 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %127, i64 1, 1
|
||||
%129 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %128, i64 1, 2
|
||||
%130 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %129)
|
||||
store ptr %130, ptr @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y", align 8
|
||||
%131 = load ptr, ptr @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y", align 8
|
||||
%132 = load ptr, ptr @_llgo_error, align 8
|
||||
%133 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
|
||||
%134 = icmp eq ptr %133, null
|
||||
br i1 %134, label %_llgo_35, label %_llgo_36
|
||||
|
||||
_llgo_35: ; preds = %_llgo_34
|
||||
%126 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 6 }, ptr %123, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 true)
|
||||
%127 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56)
|
||||
%128 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %127, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %126, ptr %128, align 8
|
||||
%129 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %127, 0
|
||||
%130 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %129, i64 1, 1
|
||||
%131 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %130, i64 1, 2
|
||||
%132 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %131)
|
||||
store ptr %132, ptr @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y", align 8
|
||||
%135 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%136 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %135, 0
|
||||
%137 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %136, i64 0, 1
|
||||
%138 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %137, i64 0, 2
|
||||
%139 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
|
||||
%140 = getelementptr ptr, ptr %139, i64 0
|
||||
store ptr %132, ptr %140, align 8
|
||||
%141 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %139, 0
|
||||
%142 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %141, i64 1, 1
|
||||
%143 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %142, i64 1, 2
|
||||
%144 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %138, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %143, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %144)
|
||||
store ptr %144, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
|
||||
br label %_llgo_36
|
||||
|
||||
_llgo_36: ; preds = %_llgo_35, %_llgo_34
|
||||
%133 = load ptr, ptr @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y", align 8
|
||||
%134 = load ptr, ptr @_llgo_error, align 8
|
||||
%135 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
|
||||
%136 = icmp eq ptr %135, null
|
||||
br i1 %136, label %_llgo_37, label %_llgo_38
|
||||
%145 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
|
||||
%146 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %145, 1
|
||||
%147 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %146, ptr @"main.(*nopCloserWriterTo).Close", 2
|
||||
%148 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %147, ptr @"main.(*nopCloserWriterTo).Close", 3
|
||||
%149 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %145, 1
|
||||
%150 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %149, ptr @"main.(*nopCloserWriterTo).Close", 2
|
||||
%151 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %150, ptr @main.nopCloserWriterTo.Close, 3
|
||||
%152 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8
|
||||
%153 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %152, 1
|
||||
%154 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %153, ptr @"main.(*nopCloserWriterTo).Read", 2
|
||||
%155 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %154, ptr @"main.(*nopCloserWriterTo).Read", 3
|
||||
%156 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %152, 1
|
||||
%157 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %156, ptr @"main.(*nopCloserWriterTo).Read", 2
|
||||
%158 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %157, ptr @main.nopCloserWriterTo.Read, 3
|
||||
%159 = load ptr, ptr @"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk", align 8
|
||||
%160 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 7 }, ptr undef, ptr undef, ptr undef }, ptr %159, 1
|
||||
%161 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %160, ptr @"main.(*nopCloserWriterTo).WriteTo", 2
|
||||
%162 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %161, ptr @"main.(*nopCloserWriterTo).WriteTo", 3
|
||||
%163 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 7 }, ptr undef, ptr undef, ptr undef }, ptr %159, 1
|
||||
%164 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %163, ptr @"main.(*nopCloserWriterTo).WriteTo", 2
|
||||
%165 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %164, ptr @main.nopCloserWriterTo.WriteTo, 3
|
||||
%166 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 120)
|
||||
%167 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %166, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %151, ptr %167, align 8
|
||||
%168 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %166, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %158, ptr %168, align 8
|
||||
%169 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %166, i64 2
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %165, ptr %169, align 8
|
||||
%170 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %166, 0
|
||||
%171 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %170, i64 3, 1
|
||||
%172 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %171, i64 3, 2
|
||||
%173 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 120)
|
||||
%174 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %173, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %148, ptr %174, align 8
|
||||
%175 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %173, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %155, ptr %175, align 8
|
||||
%176 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %173, i64 2
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %162, ptr %176, align 8
|
||||
%177 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %173, 0
|
||||
%178 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %177, i64 3, 1
|
||||
%179 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %178, i64 3, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %110, ptr %131, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %172, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %179)
|
||||
%180 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
|
||||
%181 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8
|
||||
%182 = load ptr, ptr @"_llgo_iface$L2Ik-AJcd0jsoBw5fQ07pQpfUM-kh78Wn2bOeak6M3I", align 8
|
||||
%183 = icmp eq ptr %182, null
|
||||
br i1 %183, label %_llgo_37, label %_llgo_38
|
||||
|
||||
_llgo_37: ; preds = %_llgo_36
|
||||
%137 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%138 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %137, 0
|
||||
%139 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %138, i64 0, 1
|
||||
%140 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %139, i64 0, 2
|
||||
%141 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
|
||||
%142 = getelementptr ptr, ptr %141, i64 0
|
||||
store ptr %134, ptr %142, align 8
|
||||
%143 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %141, 0
|
||||
%144 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %143, i64 1, 1
|
||||
%145 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %144, i64 1, 2
|
||||
%146 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %140, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %145, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %146)
|
||||
store ptr %146, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
|
||||
%184 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef }, ptr %180, 1
|
||||
%185 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef }, ptr %181, 1
|
||||
%186 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
|
||||
%187 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %186, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %184, ptr %187, align 8
|
||||
%188 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %186, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %185, ptr %188, align 8
|
||||
%189 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %186, 0
|
||||
%190 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %189, i64 2, 1
|
||||
%191 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %190, i64 2, 2
|
||||
%192 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %191)
|
||||
store ptr %192, ptr @"_llgo_iface$L2Ik-AJcd0jsoBw5fQ07pQpfUM-kh78Wn2bOeak6M3I", align 8
|
||||
br label %_llgo_38
|
||||
|
||||
_llgo_38: ; preds = %_llgo_37, %_llgo_36
|
||||
%147 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
|
||||
%148 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %147, 1
|
||||
%149 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %148, ptr @"main.(*nopCloserWriterTo).Close", 2
|
||||
%150 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %149, ptr @"main.(*nopCloserWriterTo).Close", 3
|
||||
%151 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %147, 1
|
||||
%152 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %151, ptr @"main.(*nopCloserWriterTo).Close", 2
|
||||
%153 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %152, ptr @main.nopCloserWriterTo.Close, 3
|
||||
%154 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8
|
||||
%155 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %154, 1
|
||||
%156 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %155, ptr @"main.(*nopCloserWriterTo).Read", 2
|
||||
%157 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %156, ptr @"main.(*nopCloserWriterTo).Read", 3
|
||||
%158 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %154, 1
|
||||
%159 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %158, ptr @"main.(*nopCloserWriterTo).Read", 2
|
||||
%160 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %159, ptr @main.nopCloserWriterTo.Read, 3
|
||||
%161 = load ptr, ptr @"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk", align 8
|
||||
%162 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 7 }, ptr undef, ptr undef, ptr undef }, ptr %161, 1
|
||||
%163 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %162, ptr @"main.(*nopCloserWriterTo).WriteTo", 2
|
||||
%164 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %163, ptr @"main.(*nopCloserWriterTo).WriteTo", 3
|
||||
%165 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 7 }, ptr undef, ptr undef, ptr undef }, ptr %161, 1
|
||||
%166 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %165, ptr @"main.(*nopCloserWriterTo).WriteTo", 2
|
||||
%167 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %166, ptr @main.nopCloserWriterTo.WriteTo, 3
|
||||
%168 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 120)
|
||||
%169 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %168, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %153, ptr %169, align 8
|
||||
%170 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %168, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %160, ptr %170, align 8
|
||||
%171 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %168, i64 2
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %167, ptr %171, align 8
|
||||
%172 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %168, 0
|
||||
%173 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %172, i64 3, 1
|
||||
%174 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %173, i64 3, 2
|
||||
%175 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 120)
|
||||
%176 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %175, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %150, ptr %176, align 8
|
||||
%177 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %175, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %157, ptr %177, align 8
|
||||
%178 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %175, i64 2
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %164, ptr %178, align 8
|
||||
%179 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %175, 0
|
||||
%180 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %179, i64 3, 1
|
||||
%181 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %180, i64 3, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %110, ptr %133, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %174, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %181)
|
||||
%182 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
|
||||
%183 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8
|
||||
%184 = load ptr, ptr @"_llgo_iface$L2Ik-AJcd0jsoBw5fQ07pQpfUM-kh78Wn2bOeak6M3I", align 8
|
||||
%185 = icmp eq ptr %184, null
|
||||
br i1 %185, label %_llgo_39, label %_llgo_40
|
||||
%193 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 9 }, i64 25, i64 16, i64 2, i64 2)
|
||||
store ptr %193, ptr @_llgo_main.nopCloser, align 8
|
||||
%194 = load ptr, ptr @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y", align 8
|
||||
%195 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
|
||||
%196 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %195, 1
|
||||
%197 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %196, ptr @"main.(*nopCloser).Close", 2
|
||||
%198 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %197, ptr @"main.(*nopCloser).Close", 3
|
||||
%199 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %195, 1
|
||||
%200 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %199, ptr @"main.(*nopCloser).Close", 2
|
||||
%201 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %200, ptr @main.nopCloser.Close, 3
|
||||
%202 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8
|
||||
%203 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %202, 1
|
||||
%204 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %203, ptr @"main.(*nopCloser).Read", 2
|
||||
%205 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %204, ptr @"main.(*nopCloser).Read", 3
|
||||
%206 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %202, 1
|
||||
%207 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %206, ptr @"main.(*nopCloser).Read", 2
|
||||
%208 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %207, ptr @main.nopCloser.Read, 3
|
||||
%209 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
|
||||
%210 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %209, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %201, ptr %210, align 8
|
||||
%211 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %209, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %208, ptr %211, align 8
|
||||
%212 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %209, 0
|
||||
%213 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %212, i64 2, 1
|
||||
%214 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %213, i64 2, 2
|
||||
%215 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
|
||||
%216 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %215, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %198, ptr %216, align 8
|
||||
%217 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %215, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %205, ptr %217, align 8
|
||||
%218 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %215, 0
|
||||
%219 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %218, i64 2, 1
|
||||
%220 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %219, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %193, ptr %194, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %214, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %220)
|
||||
%221 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 12 })
|
||||
%222 = load ptr, ptr @_llgo_main.StringWriter, align 8
|
||||
%223 = icmp eq ptr %222, null
|
||||
br i1 %223, label %_llgo_39, label %_llgo_40
|
||||
|
||||
_llgo_39: ; preds = %_llgo_38
|
||||
%186 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef }, ptr %182, 1
|
||||
%187 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef }, ptr %183, 1
|
||||
%188 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
|
||||
%189 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %188, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %186, ptr %189, align 8
|
||||
%190 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %188, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %187, ptr %190, align 8
|
||||
%191 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %188, 0
|
||||
%192 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %191, i64 2, 1
|
||||
%193 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %192, i64 2, 2
|
||||
%194 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %193)
|
||||
store ptr %194, ptr @"_llgo_iface$L2Ik-AJcd0jsoBw5fQ07pQpfUM-kh78Wn2bOeak6M3I", align 8
|
||||
store ptr %221, ptr @_llgo_main.StringWriter, align 8
|
||||
br label %_llgo_40
|
||||
|
||||
_llgo_40: ; preds = %_llgo_39, %_llgo_38
|
||||
%195 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 9 }, i64 25, i64 16, i64 2, i64 2)
|
||||
store ptr %195, ptr @_llgo_main.nopCloser, align 8
|
||||
%196 = load ptr, ptr @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y", align 8
|
||||
%197 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
|
||||
%198 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %197, 1
|
||||
%199 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %198, ptr @"main.(*nopCloser).Close", 2
|
||||
%200 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %199, ptr @"main.(*nopCloser).Close", 3
|
||||
%201 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %197, 1
|
||||
%202 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %201, ptr @"main.(*nopCloser).Close", 2
|
||||
%203 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %202, ptr @main.nopCloser.Close, 3
|
||||
%204 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8
|
||||
%205 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %204, 1
|
||||
%206 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %205, ptr @"main.(*nopCloser).Read", 2
|
||||
%207 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %206, ptr @"main.(*nopCloser).Read", 3
|
||||
%208 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %204, 1
|
||||
%209 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %208, ptr @"main.(*nopCloser).Read", 2
|
||||
%210 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %209, ptr @main.nopCloser.Read, 3
|
||||
%211 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
|
||||
%212 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %211, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %203, ptr %212, align 8
|
||||
%213 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %211, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %210, ptr %213, align 8
|
||||
%214 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %211, 0
|
||||
%215 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %214, i64 2, 1
|
||||
%216 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %215, i64 2, 2
|
||||
%217 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
|
||||
%218 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %217, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %200, ptr %218, align 8
|
||||
%219 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %217, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %207, ptr %219, align 8
|
||||
%220 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %217, 0
|
||||
%221 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %220, i64 2, 1
|
||||
%222 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %221, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %195, ptr %196, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %216, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %222)
|
||||
%223 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 12 })
|
||||
%224 = load ptr, ptr @_llgo_main.StringWriter, align 8
|
||||
%225 = icmp eq ptr %224, null
|
||||
br i1 %225, label %_llgo_41, label %_llgo_42
|
||||
%224 = load ptr, ptr @_llgo_string, align 8
|
||||
%225 = load ptr, ptr @_llgo_int, align 8
|
||||
%226 = load ptr, ptr @_llgo_error, align 8
|
||||
%227 = load ptr, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8
|
||||
%228 = icmp eq ptr %227, null
|
||||
br i1 %228, label %_llgo_41, label %_llgo_42
|
||||
|
||||
_llgo_41: ; preds = %_llgo_40
|
||||
store ptr %223, ptr @_llgo_main.StringWriter, align 8
|
||||
%229 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
|
||||
%230 = getelementptr ptr, ptr %229, i64 0
|
||||
store ptr %224, ptr %230, align 8
|
||||
%231 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %229, 0
|
||||
%232 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %231, i64 1, 1
|
||||
%233 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %232, i64 1, 2
|
||||
%234 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
|
||||
%235 = getelementptr ptr, ptr %234, i64 0
|
||||
store ptr %225, ptr %235, align 8
|
||||
%236 = getelementptr ptr, ptr %234, i64 1
|
||||
store ptr %226, ptr %236, align 8
|
||||
%237 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %234, 0
|
||||
%238 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %237, i64 2, 1
|
||||
%239 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %238, i64 2, 2
|
||||
%240 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %233, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %239, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %240)
|
||||
store ptr %240, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8
|
||||
br label %_llgo_42
|
||||
|
||||
_llgo_42: ; preds = %_llgo_41, %_llgo_40
|
||||
%226 = load ptr, ptr @_llgo_string, align 8
|
||||
%227 = load ptr, ptr @_llgo_int, align 8
|
||||
%228 = load ptr, ptr @_llgo_error, align 8
|
||||
%229 = load ptr, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8
|
||||
%230 = icmp eq ptr %229, null
|
||||
br i1 %230, label %_llgo_43, label %_llgo_44
|
||||
%241 = load ptr, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8
|
||||
br i1 %223, label %_llgo_43, label %_llgo_44
|
||||
|
||||
_llgo_43: ; preds = %_llgo_42
|
||||
%231 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
|
||||
%232 = getelementptr ptr, ptr %231, i64 0
|
||||
store ptr %226, ptr %232, align 8
|
||||
%233 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %231, 0
|
||||
%234 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %233, i64 1, 1
|
||||
%235 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %234, i64 1, 2
|
||||
%236 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
|
||||
%237 = getelementptr ptr, ptr %236, i64 0
|
||||
store ptr %227, ptr %237, align 8
|
||||
%238 = getelementptr ptr, ptr %236, i64 1
|
||||
store ptr %228, ptr %238, align 8
|
||||
%239 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %236, 0
|
||||
%240 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %239, i64 2, 1
|
||||
%241 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %240, i64 2, 2
|
||||
%242 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %235, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %241, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %242)
|
||||
store ptr %242, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8
|
||||
%242 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 11 }, ptr undef }, ptr %241, 1
|
||||
%243 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
|
||||
%244 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %243, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %242, ptr %244, align 8
|
||||
%245 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %243, 0
|
||||
%246 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %245, i64 1, 1
|
||||
%247 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %246, i64 1, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %221, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %247)
|
||||
br label %_llgo_44
|
||||
|
||||
_llgo_44: ; preds = %_llgo_43, %_llgo_42
|
||||
%243 = load ptr, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8
|
||||
br i1 %225, label %_llgo_45, label %_llgo_46
|
||||
%248 = load ptr, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8
|
||||
%249 = load ptr, ptr @"_llgo_iface$Ly4zXiUMEac-hYAMw6b6miJ1JEhGfLyBWyBOhpsRZcU", align 8
|
||||
%250 = icmp eq ptr %249, null
|
||||
br i1 %250, label %_llgo_45, label %_llgo_46
|
||||
|
||||
_llgo_45: ; preds = %_llgo_44
|
||||
%244 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 11 }, ptr undef }, ptr %243, 1
|
||||
%245 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
|
||||
%246 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %245, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %244, ptr %246, align 8
|
||||
%247 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %245, 0
|
||||
%248 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %247, i64 1, 1
|
||||
%249 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %248, i64 1, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %223, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %249)
|
||||
%251 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 11 }, ptr undef }, ptr %248, 1
|
||||
%252 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
|
||||
%253 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %252, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %251, ptr %253, align 8
|
||||
%254 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %252, 0
|
||||
%255 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %254, i64 1, 1
|
||||
%256 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %255, i64 1, 2
|
||||
%257 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %256)
|
||||
store ptr %257, ptr @"_llgo_iface$Ly4zXiUMEac-hYAMw6b6miJ1JEhGfLyBWyBOhpsRZcU", align 8
|
||||
br label %_llgo_46
|
||||
|
||||
_llgo_46: ; preds = %_llgo_45, %_llgo_44
|
||||
%250 = load ptr, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8
|
||||
%251 = load ptr, ptr @"_llgo_iface$Ly4zXiUMEac-hYAMw6b6miJ1JEhGfLyBWyBOhpsRZcU", align 8
|
||||
%252 = icmp eq ptr %251, null
|
||||
br i1 %252, label %_llgo_47, label %_llgo_48
|
||||
%258 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 12 }, i64 25, i64 32, i64 0, i64 10)
|
||||
store ptr %258, ptr @_llgo_main.stringReader, align 8
|
||||
%259 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24)
|
||||
%260 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 1 }, ptr %259, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%261 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 38)
|
||||
%262 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 1 }, ptr %261, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%263 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
%264 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @20, i64 8 }, ptr %263, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%265 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 168)
|
||||
%266 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %265, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %260, ptr %266, align 8
|
||||
%267 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %265, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %262, ptr %267, align 8
|
||||
%268 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %265, i64 2
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %264, ptr %268, align 8
|
||||
%269 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %265, 0
|
||||
%270 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %269, i64 3, 1
|
||||
%271 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %270, i64 3, 2
|
||||
%272 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 32, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %271)
|
||||
store ptr %272, ptr @"main.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk", align 8
|
||||
%273 = load ptr, ptr @"main.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk", align 8
|
||||
%274 = load ptr, ptr @_llgo_int, align 8
|
||||
%275 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%276 = icmp eq ptr %275, null
|
||||
br i1 %276, label %_llgo_47, label %_llgo_48
|
||||
|
||||
_llgo_47: ; preds = %_llgo_46
|
||||
%253 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 11 }, ptr undef }, ptr %250, 1
|
||||
%254 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
|
||||
%255 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %254, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %253, ptr %255, align 8
|
||||
%256 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %254, 0
|
||||
%257 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %256, i64 1, 1
|
||||
%258 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %257, i64 1, 2
|
||||
%259 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %258)
|
||||
store ptr %259, ptr @"_llgo_iface$Ly4zXiUMEac-hYAMw6b6miJ1JEhGfLyBWyBOhpsRZcU", align 8
|
||||
%277 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%278 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %277, 0
|
||||
%279 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %278, i64 0, 1
|
||||
%280 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %279, i64 0, 2
|
||||
%281 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
|
||||
%282 = getelementptr ptr, ptr %281, i64 0
|
||||
store ptr %274, ptr %282, align 8
|
||||
%283 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %281, 0
|
||||
%284 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %283, i64 1, 1
|
||||
%285 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %284, i64 1, 2
|
||||
%286 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %280, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %285, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %286)
|
||||
store ptr %286, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
br label %_llgo_48
|
||||
|
||||
_llgo_48: ; preds = %_llgo_47, %_llgo_46
|
||||
%260 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 12 }, i64 25, i64 32, i64 0, i64 10)
|
||||
store ptr %260, ptr @_llgo_main.stringReader, align 8
|
||||
%261 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24)
|
||||
%262 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 1 }, ptr %261, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%263 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 38)
|
||||
%264 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 1 }, ptr %263, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%265 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
%266 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @20, i64 8 }, ptr %265, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%267 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 168)
|
||||
%268 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %267, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %262, ptr %268, align 8
|
||||
%269 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %267, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %264, ptr %269, align 8
|
||||
%270 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %267, i64 2
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %266, ptr %270, align 8
|
||||
%271 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %267, 0
|
||||
%272 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %271, i64 3, 1
|
||||
%273 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %272, i64 3, 2
|
||||
%274 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 32, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %273)
|
||||
store ptr %274, ptr @"main.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk", align 8
|
||||
%275 = load ptr, ptr @"main.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk", align 8
|
||||
%276 = load ptr, ptr @_llgo_int, align 8
|
||||
%277 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%278 = icmp eq ptr %277, null
|
||||
br i1 %278, label %_llgo_49, label %_llgo_50
|
||||
%287 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%288 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @21, i64 3 }, ptr undef, ptr undef, ptr undef }, ptr %287, 1
|
||||
%289 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %288, ptr @"main.(*stringReader).Len", 2
|
||||
%290 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %289, ptr @"main.(*stringReader).Len", 3
|
||||
%291 = load ptr, ptr @"[]_llgo_byte", align 8
|
||||
%292 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8
|
||||
%293 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %292, 1
|
||||
%294 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %293, ptr @"main.(*stringReader).Read", 2
|
||||
%295 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %294, ptr @"main.(*stringReader).Read", 3
|
||||
%296 = load ptr, ptr @"[]_llgo_byte", align 8
|
||||
%297 = load ptr, ptr @"[]_llgo_byte", align 8
|
||||
%298 = load ptr, ptr @_llgo_int64, align 8
|
||||
%299 = load ptr, ptr @_llgo_int, align 8
|
||||
%300 = load ptr, ptr @_llgo_error, align 8
|
||||
%301 = load ptr, ptr @"_llgo_func$TY5Etv7VBKM_-2um1BDEeQEE2lP06Pt6G54EuKiNC3c", align 8
|
||||
%302 = icmp eq ptr %301, null
|
||||
br i1 %302, label %_llgo_49, label %_llgo_50
|
||||
|
||||
_llgo_49: ; preds = %_llgo_48
|
||||
%279 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%280 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %279, 0
|
||||
%281 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %280, i64 0, 1
|
||||
%282 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %281, i64 0, 2
|
||||
%283 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
|
||||
%284 = getelementptr ptr, ptr %283, i64 0
|
||||
store ptr %276, ptr %284, align 8
|
||||
%285 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %283, 0
|
||||
%286 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %285, i64 1, 1
|
||||
%287 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %286, i64 1, 2
|
||||
%288 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %282, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %287, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %288)
|
||||
store ptr %288, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%303 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
|
||||
%304 = getelementptr ptr, ptr %303, i64 0
|
||||
store ptr %297, ptr %304, align 8
|
||||
%305 = getelementptr ptr, ptr %303, i64 1
|
||||
store ptr %298, ptr %305, align 8
|
||||
%306 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %303, 0
|
||||
%307 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %306, i64 2, 1
|
||||
%308 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %307, i64 2, 2
|
||||
%309 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
|
||||
%310 = getelementptr ptr, ptr %309, i64 0
|
||||
store ptr %299, ptr %310, align 8
|
||||
%311 = getelementptr ptr, ptr %309, i64 1
|
||||
store ptr %300, ptr %311, align 8
|
||||
%312 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %309, 0
|
||||
%313 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %312, i64 2, 1
|
||||
%314 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %313, i64 2, 2
|
||||
%315 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %308, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %314, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %315)
|
||||
store ptr %315, ptr @"_llgo_func$TY5Etv7VBKM_-2um1BDEeQEE2lP06Pt6G54EuKiNC3c", align 8
|
||||
br label %_llgo_50
|
||||
|
||||
_llgo_50: ; preds = %_llgo_49, %_llgo_48
|
||||
%289 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%290 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @21, i64 3 }, ptr undef, ptr undef, ptr undef }, ptr %289, 1
|
||||
%291 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %290, ptr @"main.(*stringReader).Len", 2
|
||||
%292 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %291, ptr @"main.(*stringReader).Len", 3
|
||||
%293 = load ptr, ptr @"[]_llgo_byte", align 8
|
||||
%294 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8
|
||||
%295 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %294, 1
|
||||
%296 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %295, ptr @"main.(*stringReader).Read", 2
|
||||
%297 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %296, ptr @"main.(*stringReader).Read", 3
|
||||
%298 = load ptr, ptr @"[]_llgo_byte", align 8
|
||||
%299 = load ptr, ptr @"[]_llgo_byte", align 8
|
||||
%300 = load ptr, ptr @_llgo_int64, align 8
|
||||
%301 = load ptr, ptr @_llgo_int, align 8
|
||||
%302 = load ptr, ptr @_llgo_error, align 8
|
||||
%303 = load ptr, ptr @"_llgo_func$TY5Etv7VBKM_-2um1BDEeQEE2lP06Pt6G54EuKiNC3c", align 8
|
||||
%304 = icmp eq ptr %303, null
|
||||
br i1 %304, label %_llgo_51, label %_llgo_52
|
||||
%316 = load ptr, ptr @"_llgo_func$TY5Etv7VBKM_-2um1BDEeQEE2lP06Pt6G54EuKiNC3c", align 8
|
||||
%317 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %316, 1
|
||||
%318 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %317, ptr @"main.(*stringReader).ReadAt", 2
|
||||
%319 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %318, ptr @"main.(*stringReader).ReadAt", 3
|
||||
%320 = load ptr, ptr @_llgo_byte, align 8
|
||||
%321 = load ptr, ptr @_llgo_error, align 8
|
||||
%322 = load ptr, ptr @"_llgo_func$6bvVpCcGPUc3z_EmsQTHB0AVT1hP5-NNLVRgm43teCM", align 8
|
||||
%323 = icmp eq ptr %322, null
|
||||
br i1 %323, label %_llgo_51, label %_llgo_52
|
||||
|
||||
_llgo_51: ; preds = %_llgo_50
|
||||
%305 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
|
||||
%306 = getelementptr ptr, ptr %305, i64 0
|
||||
store ptr %299, ptr %306, align 8
|
||||
%307 = getelementptr ptr, ptr %305, i64 1
|
||||
store ptr %300, ptr %307, align 8
|
||||
%308 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %305, 0
|
||||
%309 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %308, i64 2, 1
|
||||
%310 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %309, i64 2, 2
|
||||
%311 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
|
||||
%312 = getelementptr ptr, ptr %311, i64 0
|
||||
store ptr %301, ptr %312, align 8
|
||||
%313 = getelementptr ptr, ptr %311, i64 1
|
||||
store ptr %302, ptr %313, align 8
|
||||
%314 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %311, 0
|
||||
%315 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %314, i64 2, 1
|
||||
%316 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %315, i64 2, 2
|
||||
%317 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %310, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %316, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %317)
|
||||
store ptr %317, ptr @"_llgo_func$TY5Etv7VBKM_-2um1BDEeQEE2lP06Pt6G54EuKiNC3c", align 8
|
||||
%324 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%325 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %324, 0
|
||||
%326 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %325, i64 0, 1
|
||||
%327 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %326, i64 0, 2
|
||||
%328 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
|
||||
%329 = getelementptr ptr, ptr %328, i64 0
|
||||
store ptr %320, ptr %329, align 8
|
||||
%330 = getelementptr ptr, ptr %328, i64 1
|
||||
store ptr %321, ptr %330, align 8
|
||||
%331 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %328, 0
|
||||
%332 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %331, i64 2, 1
|
||||
%333 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %332, i64 2, 2
|
||||
%334 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %327, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %333, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %334)
|
||||
store ptr %334, ptr @"_llgo_func$6bvVpCcGPUc3z_EmsQTHB0AVT1hP5-NNLVRgm43teCM", align 8
|
||||
br label %_llgo_52
|
||||
|
||||
_llgo_52: ; preds = %_llgo_51, %_llgo_50
|
||||
%318 = load ptr, ptr @"_llgo_func$TY5Etv7VBKM_-2um1BDEeQEE2lP06Pt6G54EuKiNC3c", align 8
|
||||
%319 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %318, 1
|
||||
%320 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %319, ptr @"main.(*stringReader).ReadAt", 2
|
||||
%321 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %320, ptr @"main.(*stringReader).ReadAt", 3
|
||||
%322 = load ptr, ptr @_llgo_byte, align 8
|
||||
%323 = load ptr, ptr @_llgo_error, align 8
|
||||
%324 = load ptr, ptr @"_llgo_func$6bvVpCcGPUc3z_EmsQTHB0AVT1hP5-NNLVRgm43teCM", align 8
|
||||
%325 = icmp eq ptr %324, null
|
||||
br i1 %325, label %_llgo_53, label %_llgo_54
|
||||
%335 = load ptr, ptr @"_llgo_func$6bvVpCcGPUc3z_EmsQTHB0AVT1hP5-NNLVRgm43teCM", align 8
|
||||
%336 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @23, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %335, 1
|
||||
%337 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %336, ptr @"main.(*stringReader).ReadByte", 2
|
||||
%338 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %337, ptr @"main.(*stringReader).ReadByte", 3
|
||||
%339 = load ptr, ptr @_llgo_rune, align 8
|
||||
%340 = icmp eq ptr %339, null
|
||||
br i1 %340, label %_llgo_53, label %_llgo_54
|
||||
|
||||
_llgo_53: ; preds = %_llgo_52
|
||||
%326 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%327 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %326, 0
|
||||
%328 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %327, i64 0, 1
|
||||
%329 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %328, i64 0, 2
|
||||
%330 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
|
||||
%331 = getelementptr ptr, ptr %330, i64 0
|
||||
store ptr %322, ptr %331, align 8
|
||||
%332 = getelementptr ptr, ptr %330, i64 1
|
||||
store ptr %323, ptr %332, align 8
|
||||
%333 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %330, 0
|
||||
%334 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %333, i64 2, 1
|
||||
%335 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %334, i64 2, 2
|
||||
%336 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %329, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %335, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %336)
|
||||
store ptr %336, ptr @"_llgo_func$6bvVpCcGPUc3z_EmsQTHB0AVT1hP5-NNLVRgm43teCM", align 8
|
||||
%341 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 37)
|
||||
store ptr %341, ptr @_llgo_rune, align 8
|
||||
br label %_llgo_54
|
||||
|
||||
_llgo_54: ; preds = %_llgo_53, %_llgo_52
|
||||
%337 = load ptr, ptr @"_llgo_func$6bvVpCcGPUc3z_EmsQTHB0AVT1hP5-NNLVRgm43teCM", align 8
|
||||
%338 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @23, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %337, 1
|
||||
%339 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %338, ptr @"main.(*stringReader).ReadByte", 2
|
||||
%340 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %339, ptr @"main.(*stringReader).ReadByte", 3
|
||||
%341 = load ptr, ptr @_llgo_rune, align 8
|
||||
%342 = icmp eq ptr %341, null
|
||||
br i1 %342, label %_llgo_55, label %_llgo_56
|
||||
%342 = load ptr, ptr @_llgo_rune, align 8
|
||||
%343 = load ptr, ptr @_llgo_rune, align 8
|
||||
%344 = load ptr, ptr @_llgo_int, align 8
|
||||
%345 = load ptr, ptr @_llgo_error, align 8
|
||||
%346 = load ptr, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8
|
||||
%347 = icmp eq ptr %346, null
|
||||
br i1 %347, label %_llgo_55, label %_llgo_56
|
||||
|
||||
_llgo_55: ; preds = %_llgo_54
|
||||
%343 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 37)
|
||||
store ptr %343, ptr @_llgo_rune, align 8
|
||||
%348 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%349 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %348, 0
|
||||
%350 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %349, i64 0, 1
|
||||
%351 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %350, i64 0, 2
|
||||
%352 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
|
||||
%353 = getelementptr ptr, ptr %352, i64 0
|
||||
store ptr %343, ptr %353, align 8
|
||||
%354 = getelementptr ptr, ptr %352, i64 1
|
||||
store ptr %344, ptr %354, align 8
|
||||
%355 = getelementptr ptr, ptr %352, i64 2
|
||||
store ptr %345, ptr %355, align 8
|
||||
%356 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %352, 0
|
||||
%357 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %356, i64 3, 1
|
||||
%358 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %357, i64 3, 2
|
||||
%359 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %351, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %358, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %359)
|
||||
store ptr %359, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8
|
||||
br label %_llgo_56
|
||||
|
||||
_llgo_56: ; preds = %_llgo_55, %_llgo_54
|
||||
%344 = load ptr, ptr @_llgo_rune, align 8
|
||||
%345 = load ptr, ptr @_llgo_rune, align 8
|
||||
%346 = load ptr, ptr @_llgo_int, align 8
|
||||
%347 = load ptr, ptr @_llgo_error, align 8
|
||||
%348 = load ptr, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8
|
||||
%349 = icmp eq ptr %348, null
|
||||
br i1 %349, label %_llgo_57, label %_llgo_58
|
||||
%360 = load ptr, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8
|
||||
%361 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @24, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %360, 1
|
||||
%362 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %361, ptr @"main.(*stringReader).ReadRune", 2
|
||||
%363 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %362, ptr @"main.(*stringReader).ReadRune", 3
|
||||
%364 = load ptr, ptr @_llgo_int64, align 8
|
||||
%365 = load ptr, ptr @_llgo_int, align 8
|
||||
%366 = load ptr, ptr @_llgo_int64, align 8
|
||||
%367 = load ptr, ptr @_llgo_error, align 8
|
||||
%368 = load ptr, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8
|
||||
%369 = icmp eq ptr %368, null
|
||||
br i1 %369, label %_llgo_57, label %_llgo_58
|
||||
|
||||
_llgo_57: ; preds = %_llgo_56
|
||||
%350 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%351 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %350, 0
|
||||
%352 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %351, i64 0, 1
|
||||
%353 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %352, i64 0, 2
|
||||
%354 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
|
||||
%355 = getelementptr ptr, ptr %354, i64 0
|
||||
store ptr %345, ptr %355, align 8
|
||||
%356 = getelementptr ptr, ptr %354, i64 1
|
||||
store ptr %346, ptr %356, align 8
|
||||
%357 = getelementptr ptr, ptr %354, i64 2
|
||||
store ptr %347, ptr %357, align 8
|
||||
%358 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %354, 0
|
||||
%359 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %358, i64 3, 1
|
||||
%360 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %359, i64 3, 2
|
||||
%361 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %353, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %360, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %361)
|
||||
store ptr %361, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8
|
||||
%370 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
|
||||
%371 = getelementptr ptr, ptr %370, i64 0
|
||||
store ptr %364, ptr %371, align 8
|
||||
%372 = getelementptr ptr, ptr %370, i64 1
|
||||
store ptr %365, ptr %372, align 8
|
||||
%373 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %370, 0
|
||||
%374 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %373, i64 2, 1
|
||||
%375 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %374, i64 2, 2
|
||||
%376 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
|
||||
%377 = getelementptr ptr, ptr %376, i64 0
|
||||
store ptr %366, ptr %377, align 8
|
||||
%378 = getelementptr ptr, ptr %376, i64 1
|
||||
store ptr %367, ptr %378, align 8
|
||||
%379 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %376, 0
|
||||
%380 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %379, i64 2, 1
|
||||
%381 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %380, i64 2, 2
|
||||
%382 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %375, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %381, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %382)
|
||||
store ptr %382, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8
|
||||
br label %_llgo_58
|
||||
|
||||
_llgo_58: ; preds = %_llgo_57, %_llgo_56
|
||||
%362 = load ptr, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8
|
||||
%363 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @24, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %362, 1
|
||||
%364 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %363, ptr @"main.(*stringReader).ReadRune", 2
|
||||
%365 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %364, ptr @"main.(*stringReader).ReadRune", 3
|
||||
%366 = load ptr, ptr @_llgo_int64, align 8
|
||||
%367 = load ptr, ptr @_llgo_int, align 8
|
||||
%368 = load ptr, ptr @_llgo_int64, align 8
|
||||
%369 = load ptr, ptr @_llgo_error, align 8
|
||||
%370 = load ptr, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8
|
||||
%371 = icmp eq ptr %370, null
|
||||
br i1 %371, label %_llgo_59, label %_llgo_60
|
||||
%383 = load ptr, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8
|
||||
%384 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @25, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %383, 1
|
||||
%385 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %384, ptr @"main.(*stringReader).Seek", 2
|
||||
%386 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %385, ptr @"main.(*stringReader).Seek", 3
|
||||
%387 = load ptr, ptr @_llgo_int64, align 8
|
||||
%388 = load ptr, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8
|
||||
%389 = icmp eq ptr %388, null
|
||||
br i1 %389, label %_llgo_59, label %_llgo_60
|
||||
|
||||
_llgo_59: ; preds = %_llgo_58
|
||||
%372 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
|
||||
%373 = getelementptr ptr, ptr %372, i64 0
|
||||
store ptr %366, ptr %373, align 8
|
||||
%374 = getelementptr ptr, ptr %372, i64 1
|
||||
store ptr %367, ptr %374, align 8
|
||||
%375 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %372, 0
|
||||
%376 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %375, i64 2, 1
|
||||
%377 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %376, i64 2, 2
|
||||
%378 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
|
||||
%379 = getelementptr ptr, ptr %378, i64 0
|
||||
store ptr %368, ptr %379, align 8
|
||||
%380 = getelementptr ptr, ptr %378, i64 1
|
||||
store ptr %369, ptr %380, align 8
|
||||
%381 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %378, 0
|
||||
%382 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %381, i64 2, 1
|
||||
%383 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %382, i64 2, 2
|
||||
%384 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %377, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %383, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %384)
|
||||
store ptr %384, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8
|
||||
%390 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%391 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %390, 0
|
||||
%392 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %391, i64 0, 1
|
||||
%393 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %392, i64 0, 2
|
||||
%394 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
|
||||
%395 = getelementptr ptr, ptr %394, i64 0
|
||||
store ptr %387, ptr %395, align 8
|
||||
%396 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %394, 0
|
||||
%397 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %396, i64 1, 1
|
||||
%398 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %397, i64 1, 2
|
||||
%399 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %393, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %398, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %399)
|
||||
store ptr %399, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8
|
||||
br label %_llgo_60
|
||||
|
||||
_llgo_60: ; preds = %_llgo_59, %_llgo_58
|
||||
%385 = load ptr, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8
|
||||
%386 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @25, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %385, 1
|
||||
%387 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %386, ptr @"main.(*stringReader).Seek", 2
|
||||
%388 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %387, ptr @"main.(*stringReader).Seek", 3
|
||||
%389 = load ptr, ptr @_llgo_int64, align 8
|
||||
%390 = load ptr, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8
|
||||
%391 = icmp eq ptr %390, null
|
||||
br i1 %391, label %_llgo_61, label %_llgo_62
|
||||
%400 = load ptr, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8
|
||||
%401 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @26, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %400, 1
|
||||
%402 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %401, ptr @"main.(*stringReader).Size", 2
|
||||
%403 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %402, ptr @"main.(*stringReader).Size", 3
|
||||
%404 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
|
||||
%405 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @27, i64 10 }, ptr undef, ptr undef, ptr undef }, ptr %404, 1
|
||||
%406 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %405, ptr @"main.(*stringReader).UnreadByte", 2
|
||||
%407 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %406, ptr @"main.(*stringReader).UnreadByte", 3
|
||||
%408 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
|
||||
%409 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @28, i64 10 }, ptr undef, ptr undef, ptr undef }, ptr %408, 1
|
||||
%410 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %409, ptr @"main.(*stringReader).UnreadRune", 2
|
||||
%411 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %410, ptr @"main.(*stringReader).UnreadRune", 3
|
||||
%412 = load ptr, ptr @"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk", align 8
|
||||
%413 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 7 }, ptr undef, ptr undef, ptr undef }, ptr %412, 1
|
||||
%414 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %413, ptr @"main.(*stringReader).WriteTo", 2
|
||||
%415 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %414, ptr @"main.(*stringReader).WriteTo", 3
|
||||
%416 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 400)
|
||||
%417 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %416, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %290, ptr %417, align 8
|
||||
%418 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %416, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %295, ptr %418, align 8
|
||||
%419 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %416, i64 2
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %319, ptr %419, align 8
|
||||
%420 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %416, i64 3
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %338, ptr %420, align 8
|
||||
%421 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %416, i64 4
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %363, ptr %421, align 8
|
||||
%422 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %416, i64 5
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %386, ptr %422, align 8
|
||||
%423 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %416, i64 6
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %403, ptr %423, align 8
|
||||
%424 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %416, i64 7
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %407, ptr %424, align 8
|
||||
%425 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %416, i64 8
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %411, ptr %425, align 8
|
||||
%426 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %416, i64 9
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %415, ptr %426, align 8
|
||||
%427 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %416, 0
|
||||
%428 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %427, i64 10, 1
|
||||
%429 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %428, i64 10, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %258, ptr %273, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %429)
|
||||
%430 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 12 }, i64 25, i64 32, i64 0, i64 10)
|
||||
%431 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %430)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %431)
|
||||
store ptr %431, ptr @"*_llgo_main.stringReader", align 8
|
||||
%432 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8
|
||||
%433 = load ptr, ptr @"_llgo_iface$OFO8Us9n8ajWCabGedeuoJ-Za2zAMk4Jh0FunAcUCFE", align 8
|
||||
%434 = icmp eq ptr %433, null
|
||||
br i1 %434, label %_llgo_61, label %_llgo_62
|
||||
|
||||
_llgo_61: ; preds = %_llgo_60
|
||||
%392 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
|
||||
%393 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %392, 0
|
||||
%394 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %393, i64 0, 1
|
||||
%395 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %394, i64 0, 2
|
||||
%396 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
|
||||
%397 = getelementptr ptr, ptr %396, i64 0
|
||||
store ptr %389, ptr %397, align 8
|
||||
%398 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %396, 0
|
||||
%399 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %398, i64 1, 1
|
||||
%400 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %399, i64 1, 2
|
||||
%401 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %395, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %400, i1 false)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %401)
|
||||
store ptr %401, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8
|
||||
%435 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef }, ptr %432, 1
|
||||
%436 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
|
||||
%437 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %436, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %435, ptr %437, align 8
|
||||
%438 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %436, 0
|
||||
%439 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %438, i64 1, 1
|
||||
%440 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %439, i64 1, 2
|
||||
%441 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %440)
|
||||
store ptr %441, ptr @"_llgo_iface$OFO8Us9n8ajWCabGedeuoJ-Za2zAMk4Jh0FunAcUCFE", align 8
|
||||
br label %_llgo_62
|
||||
|
||||
_llgo_62: ; preds = %_llgo_61, %_llgo_60
|
||||
%402 = load ptr, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8
|
||||
%403 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @26, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %402, 1
|
||||
%404 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %403, ptr @"main.(*stringReader).Size", 2
|
||||
%405 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %404, ptr @"main.(*stringReader).Size", 3
|
||||
%406 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
|
||||
%407 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @27, i64 10 }, ptr undef, ptr undef, ptr undef }, ptr %406, 1
|
||||
%408 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %407, ptr @"main.(*stringReader).UnreadByte", 2
|
||||
%409 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %408, ptr @"main.(*stringReader).UnreadByte", 3
|
||||
%410 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
|
||||
%411 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @28, i64 10 }, ptr undef, ptr undef, ptr undef }, ptr %410, 1
|
||||
%412 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %411, ptr @"main.(*stringReader).UnreadRune", 2
|
||||
%413 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %412, ptr @"main.(*stringReader).UnreadRune", 3
|
||||
%414 = load ptr, ptr @"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk", align 8
|
||||
%415 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 7 }, ptr undef, ptr undef, ptr undef }, ptr %414, 1
|
||||
%416 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %415, ptr @"main.(*stringReader).WriteTo", 2
|
||||
%417 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %416, ptr @"main.(*stringReader).WriteTo", 3
|
||||
%418 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 400)
|
||||
%419 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %292, ptr %419, align 8
|
||||
%420 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 1
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %297, ptr %420, align 8
|
||||
%421 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 2
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %321, ptr %421, align 8
|
||||
%422 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 3
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %340, ptr %422, align 8
|
||||
%423 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 4
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %365, ptr %423, align 8
|
||||
%424 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 5
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %388, ptr %424, align 8
|
||||
%425 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 6
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %405, ptr %425, align 8
|
||||
%426 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 7
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %409, ptr %426, align 8
|
||||
%427 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 8
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %413, ptr %427, align 8
|
||||
%428 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 9
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %417, ptr %428, align 8
|
||||
%429 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %418, 0
|
||||
%430 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %429, i64 10, 1
|
||||
%431 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %430, i64 10, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %260, ptr %275, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %431)
|
||||
%432 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 12 }, i64 25, i64 32, i64 0, i64 10)
|
||||
%433 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %432)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %433)
|
||||
store ptr %433, ptr @"*_llgo_main.stringReader", align 8
|
||||
%434 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8
|
||||
%435 = load ptr, ptr @"_llgo_iface$OFO8Us9n8ajWCabGedeuoJ-Za2zAMk4Jh0FunAcUCFE", align 8
|
||||
%436 = icmp eq ptr %435, null
|
||||
br i1 %436, label %_llgo_63, label %_llgo_64
|
||||
%442 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @29, i64 11 }, i64 25, i64 16, i64 0, i64 1)
|
||||
store ptr %442, ptr @_llgo_main.errorString, align 8
|
||||
%443 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24)
|
||||
%444 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 1 }, ptr %443, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%445 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56)
|
||||
%446 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %445, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %444, ptr %446, align 8
|
||||
%447 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %445, 0
|
||||
%448 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %447, i64 1, 1
|
||||
%449 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %448, i64 1, 2
|
||||
%450 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %449)
|
||||
store ptr %450, ptr @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8
|
||||
%451 = load ptr, ptr @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8
|
||||
%452 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%453 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %452, 1
|
||||
%454 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %453, ptr @"main.(*errorString).Error", 2
|
||||
%455 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %454, ptr @"main.(*errorString).Error", 3
|
||||
%456 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
|
||||
%457 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %456, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %455, ptr %457, align 8
|
||||
%458 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %456, 0
|
||||
%459 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %458, i64 1, 1
|
||||
%460 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %459, i64 1, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %442, ptr %451, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %460)
|
||||
%461 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @29, i64 11 }, i64 25, i64 16, i64 0, i64 1)
|
||||
%462 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %461)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %462)
|
||||
store ptr %462, ptr @"*_llgo_main.errorString", align 8
|
||||
%463 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%464 = load ptr, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8
|
||||
%465 = icmp eq ptr %464, null
|
||||
br i1 %465, label %_llgo_63, label %_llgo_64
|
||||
|
||||
_llgo_63: ; preds = %_llgo_62
|
||||
%437 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef }, ptr %434, 1
|
||||
%438 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
|
||||
%439 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %438, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %437, ptr %439, align 8
|
||||
%440 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %438, 0
|
||||
%441 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %440, i64 1, 1
|
||||
%442 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %441, i64 1, 2
|
||||
%443 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %442)
|
||||
store ptr %443, ptr @"_llgo_iface$OFO8Us9n8ajWCabGedeuoJ-Za2zAMk4Jh0FunAcUCFE", align 8
|
||||
%466 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 5 }, ptr undef }, ptr %463, 1
|
||||
%467 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
|
||||
%468 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %467, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %466, ptr %468, align 8
|
||||
%469 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %467, 0
|
||||
%470 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %469, i64 1, 1
|
||||
%471 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %470, i64 1, 2
|
||||
%472 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %471)
|
||||
store ptr %472, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8
|
||||
br label %_llgo_64
|
||||
|
||||
_llgo_64: ; preds = %_llgo_63, %_llgo_62
|
||||
%444 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @29, i64 11 }, i64 25, i64 16, i64 0, i64 1)
|
||||
store ptr %444, ptr @_llgo_main.errorString, align 8
|
||||
%445 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24)
|
||||
%446 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 1 }, ptr %445, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%447 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56)
|
||||
%448 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %447, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %446, ptr %448, align 8
|
||||
%449 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %447, 0
|
||||
%450 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %449, i64 1, 1
|
||||
%451 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %450, i64 1, 2
|
||||
%452 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %451)
|
||||
store ptr %452, ptr @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8
|
||||
%453 = load ptr, ptr @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8
|
||||
%454 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%455 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %454, 1
|
||||
%456 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %455, ptr @"main.(*errorString).Error", 2
|
||||
%457 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %456, ptr @"main.(*errorString).Error", 3
|
||||
%458 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
|
||||
%459 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %458, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Method" %457, ptr %459, align 8
|
||||
%460 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %458, 0
|
||||
%461 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %460, i64 1, 1
|
||||
%462 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %461, i64 1, 2
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %444, ptr %453, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %462)
|
||||
%463 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @29, i64 11 }, i64 25, i64 16, i64 0, i64 1)
|
||||
%464 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %463)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %464)
|
||||
store ptr %464, ptr @"*_llgo_main.errorString", align 8
|
||||
%465 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%466 = load ptr, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8
|
||||
%467 = icmp eq ptr %466, null
|
||||
br i1 %467, label %_llgo_65, label %_llgo_66
|
||||
|
||||
_llgo_65: ; preds = %_llgo_64
|
||||
%468 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 5 }, ptr undef }, ptr %465, 1
|
||||
%469 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
|
||||
%470 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %469, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.Imethod" %468, ptr %470, align 8
|
||||
%471 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %469, 0
|
||||
%472 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %471, i64 1, 1
|
||||
%473 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %472, i64 1, 2
|
||||
%474 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %473)
|
||||
store ptr %474, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8
|
||||
br label %_llgo_66
|
||||
|
||||
_llgo_66: ; preds = %_llgo_65, %_llgo_64
|
||||
ret void
|
||||
}
|
||||
|
||||
|
||||
748
compiler/cl/_testgo/reflectconv/in.go
Normal file
748
compiler/cl/_testgo/reflectconv/in.go
Normal file
@@ -0,0 +1,748 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"math"
|
||||
"reflect"
|
||||
"strings"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type Value struct {
|
||||
typ_ unsafe.Pointer
|
||||
ptr unsafe.Pointer
|
||||
flag uintptr
|
||||
}
|
||||
|
||||
const flagStickyRO uintptr = 1 << 5
|
||||
|
||||
// MakeRO returns a copy of v with the read-only flag set.
|
||||
func MakeRO(v reflect.Value) reflect.Value {
|
||||
(*Value)(unsafe.Pointer(&v)).flag |= flagStickyRO
|
||||
return v
|
||||
}
|
||||
|
||||
// IsRO reports whether v's read-only flag is set.
|
||||
func IsRO(v reflect.Value) bool {
|
||||
return (*Value)(unsafe.Pointer(&v)).flag&flagStickyRO != 0
|
||||
}
|
||||
|
||||
type testingT struct {
|
||||
}
|
||||
|
||||
func (t *testingT) Errorf(format string, a ...interface{}) {
|
||||
panic(fmt.Sprintf(format, a...))
|
||||
}
|
||||
|
||||
func (t *testingT) Fatalf(format string, a ...interface{}) {
|
||||
panic(fmt.Sprintf(format, a...))
|
||||
}
|
||||
|
||||
func main() {
|
||||
TestConvert(&testingT{})
|
||||
TestConvertPanic(&testingT{})
|
||||
TestConvertSlice2Array(&testingT{})
|
||||
TestConvertNaNs(&testingT{})
|
||||
}
|
||||
|
||||
var V = reflect.ValueOf
|
||||
|
||||
func EmptyInterfaceV(x any) reflect.Value {
|
||||
return V(&x).Elem()
|
||||
}
|
||||
|
||||
func ReaderV(x io.Reader) reflect.Value {
|
||||
return V(&x).Elem()
|
||||
}
|
||||
|
||||
func ReadWriterV(x io.ReadWriter) reflect.Value {
|
||||
return V(&x).Elem()
|
||||
}
|
||||
|
||||
type integer int
|
||||
type T struct {
|
||||
a int
|
||||
b float64
|
||||
c string
|
||||
d *int
|
||||
}
|
||||
|
||||
type Empty struct{}
|
||||
type MyStruct struct {
|
||||
x int `some:"tag"`
|
||||
}
|
||||
type MyStruct1 struct {
|
||||
x struct {
|
||||
int `some:"bar"`
|
||||
}
|
||||
}
|
||||
type MyStruct2 struct {
|
||||
x struct {
|
||||
int `some:"foo"`
|
||||
}
|
||||
}
|
||||
type MyString string
|
||||
type MyBytes []byte
|
||||
type MyBytesArrayPtr0 *[0]byte
|
||||
type MyBytesArrayPtr *[4]byte
|
||||
type MyBytesArray0 [0]byte
|
||||
type MyBytesArray [4]byte
|
||||
type MyRunes []int32
|
||||
type MyFunc func()
|
||||
type MyByte byte
|
||||
|
||||
type IntChan chan int
|
||||
type IntChanRecv <-chan int
|
||||
type IntChanSend chan<- int
|
||||
type BytesChan chan []byte
|
||||
type BytesChanRecv <-chan []byte
|
||||
type BytesChanSend chan<- []byte
|
||||
|
||||
var convertTests = []struct {
|
||||
in reflect.Value
|
||||
out reflect.Value
|
||||
}{
|
||||
// numbers
|
||||
/*
|
||||
Edit .+1,/\*\//-1>cat >/tmp/x.go && go run /tmp/x.go
|
||||
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
var numbers = []string{
|
||||
"int8", "uint8", "int16", "uint16",
|
||||
"int32", "uint32", "int64", "uint64",
|
||||
"int", "uint", "uintptr",
|
||||
"float32", "float64",
|
||||
}
|
||||
|
||||
func main() {
|
||||
// all pairs but in an unusual order,
|
||||
// to emit all the int8, uint8 cases
|
||||
// before n grows too big.
|
||||
n := 1
|
||||
for i, f := range numbers {
|
||||
for _, g := range numbers[i:] {
|
||||
fmt.Printf("\t{V(%s(%d)), V(%s(%d))},\n", f, n, g, n)
|
||||
n++
|
||||
if f != g {
|
||||
fmt.Printf("\t{V(%s(%d)), V(%s(%d))},\n", g, n, f, n)
|
||||
n++
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
{V(int8(1)), V(int8(1))},
|
||||
{V(int8(2)), V(uint8(2))},
|
||||
{V(uint8(3)), V(int8(3))},
|
||||
{V(int8(4)), V(int16(4))},
|
||||
{V(int16(5)), V(int8(5))},
|
||||
{V(int8(6)), V(uint16(6))},
|
||||
{V(uint16(7)), V(int8(7))},
|
||||
{V(int8(8)), V(int32(8))},
|
||||
{V(int32(9)), V(int8(9))},
|
||||
{V(int8(10)), V(uint32(10))},
|
||||
{V(uint32(11)), V(int8(11))},
|
||||
{V(int8(12)), V(int64(12))},
|
||||
{V(int64(13)), V(int8(13))},
|
||||
{V(int8(14)), V(uint64(14))},
|
||||
{V(uint64(15)), V(int8(15))},
|
||||
{V(int8(16)), V(int(16))},
|
||||
{V(int(17)), V(int8(17))},
|
||||
{V(int8(18)), V(uint(18))},
|
||||
{V(uint(19)), V(int8(19))},
|
||||
{V(int8(20)), V(uintptr(20))},
|
||||
{V(uintptr(21)), V(int8(21))},
|
||||
{V(int8(22)), V(float32(22))},
|
||||
{V(float32(23)), V(int8(23))},
|
||||
{V(int8(24)), V(float64(24))},
|
||||
{V(float64(25)), V(int8(25))},
|
||||
{V(uint8(26)), V(uint8(26))},
|
||||
{V(uint8(27)), V(int16(27))},
|
||||
{V(int16(28)), V(uint8(28))},
|
||||
{V(uint8(29)), V(uint16(29))},
|
||||
{V(uint16(30)), V(uint8(30))},
|
||||
{V(uint8(31)), V(int32(31))},
|
||||
{V(int32(32)), V(uint8(32))},
|
||||
{V(uint8(33)), V(uint32(33))},
|
||||
{V(uint32(34)), V(uint8(34))},
|
||||
{V(uint8(35)), V(int64(35))},
|
||||
{V(int64(36)), V(uint8(36))},
|
||||
{V(uint8(37)), V(uint64(37))},
|
||||
{V(uint64(38)), V(uint8(38))},
|
||||
{V(uint8(39)), V(int(39))},
|
||||
{V(int(40)), V(uint8(40))},
|
||||
{V(uint8(41)), V(uint(41))},
|
||||
{V(uint(42)), V(uint8(42))},
|
||||
{V(uint8(43)), V(uintptr(43))},
|
||||
{V(uintptr(44)), V(uint8(44))},
|
||||
{V(uint8(45)), V(float32(45))},
|
||||
{V(float32(46)), V(uint8(46))},
|
||||
{V(uint8(47)), V(float64(47))},
|
||||
{V(float64(48)), V(uint8(48))},
|
||||
{V(int16(49)), V(int16(49))},
|
||||
{V(int16(50)), V(uint16(50))},
|
||||
{V(uint16(51)), V(int16(51))},
|
||||
{V(int16(52)), V(int32(52))},
|
||||
{V(int32(53)), V(int16(53))},
|
||||
{V(int16(54)), V(uint32(54))},
|
||||
{V(uint32(55)), V(int16(55))},
|
||||
{V(int16(56)), V(int64(56))},
|
||||
{V(int64(57)), V(int16(57))},
|
||||
{V(int16(58)), V(uint64(58))},
|
||||
{V(uint64(59)), V(int16(59))},
|
||||
{V(int16(60)), V(int(60))},
|
||||
{V(int(61)), V(int16(61))},
|
||||
{V(int16(62)), V(uint(62))},
|
||||
{V(uint(63)), V(int16(63))},
|
||||
{V(int16(64)), V(uintptr(64))},
|
||||
{V(uintptr(65)), V(int16(65))},
|
||||
{V(int16(66)), V(float32(66))},
|
||||
{V(float32(67)), V(int16(67))},
|
||||
{V(int16(68)), V(float64(68))},
|
||||
{V(float64(69)), V(int16(69))},
|
||||
{V(uint16(70)), V(uint16(70))},
|
||||
{V(uint16(71)), V(int32(71))},
|
||||
{V(int32(72)), V(uint16(72))},
|
||||
{V(uint16(73)), V(uint32(73))},
|
||||
{V(uint32(74)), V(uint16(74))},
|
||||
{V(uint16(75)), V(int64(75))},
|
||||
{V(int64(76)), V(uint16(76))},
|
||||
{V(uint16(77)), V(uint64(77))},
|
||||
{V(uint64(78)), V(uint16(78))},
|
||||
{V(uint16(79)), V(int(79))},
|
||||
{V(int(80)), V(uint16(80))},
|
||||
{V(uint16(81)), V(uint(81))},
|
||||
{V(uint(82)), V(uint16(82))},
|
||||
{V(uint16(83)), V(uintptr(83))},
|
||||
{V(uintptr(84)), V(uint16(84))},
|
||||
{V(uint16(85)), V(float32(85))},
|
||||
{V(float32(86)), V(uint16(86))},
|
||||
{V(uint16(87)), V(float64(87))},
|
||||
{V(float64(88)), V(uint16(88))},
|
||||
{V(int32(89)), V(int32(89))},
|
||||
{V(int32(90)), V(uint32(90))},
|
||||
{V(uint32(91)), V(int32(91))},
|
||||
{V(int32(92)), V(int64(92))},
|
||||
{V(int64(93)), V(int32(93))},
|
||||
{V(int32(94)), V(uint64(94))},
|
||||
{V(uint64(95)), V(int32(95))},
|
||||
{V(int32(96)), V(int(96))},
|
||||
{V(int(97)), V(int32(97))},
|
||||
{V(int32(98)), V(uint(98))},
|
||||
{V(uint(99)), V(int32(99))},
|
||||
{V(int32(100)), V(uintptr(100))},
|
||||
{V(uintptr(101)), V(int32(101))},
|
||||
{V(int32(102)), V(float32(102))},
|
||||
{V(float32(103)), V(int32(103))},
|
||||
{V(int32(104)), V(float64(104))},
|
||||
{V(float64(105)), V(int32(105))},
|
||||
{V(uint32(106)), V(uint32(106))},
|
||||
{V(uint32(107)), V(int64(107))},
|
||||
{V(int64(108)), V(uint32(108))},
|
||||
{V(uint32(109)), V(uint64(109))},
|
||||
{V(uint64(110)), V(uint32(110))},
|
||||
{V(uint32(111)), V(int(111))},
|
||||
{V(int(112)), V(uint32(112))},
|
||||
{V(uint32(113)), V(uint(113))},
|
||||
{V(uint(114)), V(uint32(114))},
|
||||
{V(uint32(115)), V(uintptr(115))},
|
||||
{V(uintptr(116)), V(uint32(116))},
|
||||
{V(uint32(117)), V(float32(117))},
|
||||
{V(float32(118)), V(uint32(118))},
|
||||
{V(uint32(119)), V(float64(119))},
|
||||
{V(float64(120)), V(uint32(120))},
|
||||
{V(int64(121)), V(int64(121))},
|
||||
{V(int64(122)), V(uint64(122))},
|
||||
{V(uint64(123)), V(int64(123))},
|
||||
{V(int64(124)), V(int(124))},
|
||||
{V(int(125)), V(int64(125))},
|
||||
{V(int64(126)), V(uint(126))},
|
||||
{V(uint(127)), V(int64(127))},
|
||||
{V(int64(128)), V(uintptr(128))},
|
||||
{V(uintptr(129)), V(int64(129))},
|
||||
{V(int64(130)), V(float32(130))},
|
||||
{V(float32(131)), V(int64(131))},
|
||||
{V(int64(132)), V(float64(132))},
|
||||
{V(float64(133)), V(int64(133))},
|
||||
{V(uint64(134)), V(uint64(134))},
|
||||
{V(uint64(135)), V(int(135))},
|
||||
{V(int(136)), V(uint64(136))},
|
||||
{V(uint64(137)), V(uint(137))},
|
||||
{V(uint(138)), V(uint64(138))},
|
||||
{V(uint64(139)), V(uintptr(139))},
|
||||
{V(uintptr(140)), V(uint64(140))},
|
||||
{V(uint64(141)), V(float32(141))},
|
||||
{V(float32(142)), V(uint64(142))},
|
||||
{V(uint64(143)), V(float64(143))},
|
||||
{V(float64(144)), V(uint64(144))},
|
||||
{V(int(145)), V(int(145))},
|
||||
{V(int(146)), V(uint(146))},
|
||||
{V(uint(147)), V(int(147))},
|
||||
{V(int(148)), V(uintptr(148))},
|
||||
{V(uintptr(149)), V(int(149))},
|
||||
{V(int(150)), V(float32(150))},
|
||||
{V(float32(151)), V(int(151))},
|
||||
{V(int(152)), V(float64(152))},
|
||||
{V(float64(153)), V(int(153))},
|
||||
{V(uint(154)), V(uint(154))},
|
||||
{V(uint(155)), V(uintptr(155))},
|
||||
{V(uintptr(156)), V(uint(156))},
|
||||
{V(uint(157)), V(float32(157))},
|
||||
{V(float32(158)), V(uint(158))},
|
||||
{V(uint(159)), V(float64(159))},
|
||||
{V(float64(160)), V(uint(160))},
|
||||
{V(uintptr(161)), V(uintptr(161))},
|
||||
{V(uintptr(162)), V(float32(162))},
|
||||
{V(float32(163)), V(uintptr(163))},
|
||||
{V(uintptr(164)), V(float64(164))},
|
||||
{V(float64(165)), V(uintptr(165))},
|
||||
{V(float32(166)), V(float32(166))},
|
||||
{V(float32(167)), V(float64(167))},
|
||||
{V(float64(168)), V(float32(168))},
|
||||
{V(float64(169)), V(float64(169))},
|
||||
|
||||
// truncation
|
||||
{V(float64(1.5)), V(int(1))},
|
||||
|
||||
// complex
|
||||
{V(complex64(1i)), V(complex64(1i))},
|
||||
{V(complex64(2i)), V(complex128(2i))},
|
||||
{V(complex128(3i)), V(complex64(3i))},
|
||||
{V(complex128(4i)), V(complex128(4i))},
|
||||
|
||||
// string
|
||||
{V(string("hello")), V(string("hello"))},
|
||||
{V(string("bytes1")), V([]byte("bytes1"))},
|
||||
{V([]byte("bytes2")), V(string("bytes2"))},
|
||||
{V([]byte("bytes3")), V([]byte("bytes3"))},
|
||||
{V(string("runes♝")), V([]rune("runes♝"))},
|
||||
{V([]rune("runes♕")), V(string("runes♕"))},
|
||||
{V([]rune("runes🙈🙉🙊")), V([]rune("runes🙈🙉🙊"))},
|
||||
{V(int('a')), V(string("a"))},
|
||||
{V(int8('a')), V(string("a"))},
|
||||
{V(int16('a')), V(string("a"))},
|
||||
{V(int32('a')), V(string("a"))},
|
||||
{V(int64('a')), V(string("a"))},
|
||||
{V(uint('a')), V(string("a"))},
|
||||
{V(uint8('a')), V(string("a"))},
|
||||
{V(uint16('a')), V(string("a"))},
|
||||
{V(uint32('a')), V(string("a"))},
|
||||
{V(uint64('a')), V(string("a"))},
|
||||
{V(uintptr('a')), V(string("a"))},
|
||||
{V(int(-1)), V(string("\uFFFD"))},
|
||||
{V(int8(-2)), V(string("\uFFFD"))},
|
||||
{V(int16(-3)), V(string("\uFFFD"))},
|
||||
{V(int32(-4)), V(string("\uFFFD"))},
|
||||
{V(int64(-5)), V(string("\uFFFD"))},
|
||||
{V(int64(-1 << 32)), V(string("\uFFFD"))},
|
||||
{V(int64(1 << 32)), V(string("\uFFFD"))},
|
||||
{V(uint(0x110001)), V(string("\uFFFD"))},
|
||||
{V(uint32(0x110002)), V(string("\uFFFD"))},
|
||||
{V(uint64(0x110003)), V(string("\uFFFD"))},
|
||||
{V(uint64(1 << 32)), V(string("\uFFFD"))},
|
||||
{V(uintptr(0x110004)), V(string("\uFFFD"))},
|
||||
|
||||
// named string
|
||||
{V(MyString("hello")), V(string("hello"))},
|
||||
{V(string("hello")), V(MyString("hello"))},
|
||||
{V(string("hello")), V(string("hello"))},
|
||||
{V(MyString("hello")), V(MyString("hello"))},
|
||||
{V(MyString("bytes1")), V([]byte("bytes1"))},
|
||||
{V([]byte("bytes2")), V(MyString("bytes2"))},
|
||||
{V([]byte("bytes3")), V([]byte("bytes3"))},
|
||||
{V(MyString("runes♝")), V([]rune("runes♝"))},
|
||||
{V([]rune("runes♕")), V(MyString("runes♕"))},
|
||||
{V([]rune("runes🙈🙉🙊")), V([]rune("runes🙈🙉🙊"))},
|
||||
{V([]rune("runes🙈🙉🙊")), V(MyRunes("runes🙈🙉🙊"))},
|
||||
{V(MyRunes("runes🙈🙉🙊")), V([]rune("runes🙈🙉🙊"))},
|
||||
{V(int('a')), V(MyString("a"))},
|
||||
{V(int8('a')), V(MyString("a"))},
|
||||
{V(int16('a')), V(MyString("a"))},
|
||||
{V(int32('a')), V(MyString("a"))},
|
||||
{V(int64('a')), V(MyString("a"))},
|
||||
{V(uint('a')), V(MyString("a"))},
|
||||
{V(uint8('a')), V(MyString("a"))},
|
||||
{V(uint16('a')), V(MyString("a"))},
|
||||
{V(uint32('a')), V(MyString("a"))},
|
||||
{V(uint64('a')), V(MyString("a"))},
|
||||
{V(uintptr('a')), V(MyString("a"))},
|
||||
{V(int(-1)), V(MyString("\uFFFD"))},
|
||||
{V(int8(-2)), V(MyString("\uFFFD"))},
|
||||
{V(int16(-3)), V(MyString("\uFFFD"))},
|
||||
{V(int32(-4)), V(MyString("\uFFFD"))},
|
||||
{V(int64(-5)), V(MyString("\uFFFD"))},
|
||||
{V(uint(0x110001)), V(MyString("\uFFFD"))},
|
||||
{V(uint32(0x110002)), V(MyString("\uFFFD"))},
|
||||
{V(uint64(0x110003)), V(MyString("\uFFFD"))},
|
||||
{V(uintptr(0x110004)), V(MyString("\uFFFD"))},
|
||||
|
||||
// named []byte
|
||||
{V(string("bytes1")), V(MyBytes("bytes1"))},
|
||||
{V(MyBytes("bytes2")), V(string("bytes2"))},
|
||||
{V(MyBytes("bytes3")), V(MyBytes("bytes3"))},
|
||||
{V(MyString("bytes1")), V(MyBytes("bytes1"))},
|
||||
{V(MyBytes("bytes2")), V(MyString("bytes2"))},
|
||||
|
||||
// named []rune
|
||||
{V(string("runes♝")), V(MyRunes("runes♝"))},
|
||||
{V(MyRunes("runes♕")), V(string("runes♕"))},
|
||||
{V(MyRunes("runes🙈🙉🙊")), V(MyRunes("runes🙈🙉🙊"))},
|
||||
{V(MyString("runes♝")), V(MyRunes("runes♝"))},
|
||||
{V(MyRunes("runes♕")), V(MyString("runes♕"))},
|
||||
|
||||
// slice to array
|
||||
{V([]byte(nil)), V([0]byte{})},
|
||||
{V([]byte{}), V([0]byte{})},
|
||||
{V([]byte{1}), V([1]byte{1})},
|
||||
{V([]byte{1, 2}), V([2]byte{1, 2})},
|
||||
{V([]byte{1, 2, 3}), V([3]byte{1, 2, 3})},
|
||||
{V(MyBytes([]byte(nil))), V([0]byte{})},
|
||||
{V(MyBytes{}), V([0]byte{})},
|
||||
{V(MyBytes{1}), V([1]byte{1})},
|
||||
{V(MyBytes{1, 2}), V([2]byte{1, 2})},
|
||||
{V(MyBytes{1, 2, 3}), V([3]byte{1, 2, 3})},
|
||||
{V([]byte(nil)), V(MyBytesArray0{})},
|
||||
{V([]byte{}), V(MyBytesArray0([0]byte{}))},
|
||||
{V([]byte{1, 2, 3, 4}), V(MyBytesArray([4]byte{1, 2, 3, 4}))},
|
||||
{V(MyBytes{}), V(MyBytesArray0([0]byte{}))},
|
||||
{V(MyBytes{5, 6, 7, 8}), V(MyBytesArray([4]byte{5, 6, 7, 8}))},
|
||||
{V([]MyByte{}), V([0]MyByte{})},
|
||||
{V([]MyByte{1, 2}), V([2]MyByte{1, 2})},
|
||||
|
||||
// slice to array pointer
|
||||
{V([]byte(nil)), V((*[0]byte)(nil))},
|
||||
{V([]byte{}), V(new([0]byte))},
|
||||
{V([]byte{7}), V(&[1]byte{7})},
|
||||
{V(MyBytes([]byte(nil))), V((*[0]byte)(nil))},
|
||||
{V(MyBytes([]byte{})), V(new([0]byte))},
|
||||
{V(MyBytes([]byte{9})), V(&[1]byte{9})},
|
||||
{V([]byte(nil)), V(MyBytesArrayPtr0(nil))},
|
||||
{V([]byte{}), V(MyBytesArrayPtr0(new([0]byte)))},
|
||||
{V([]byte{1, 2, 3, 4}), V(MyBytesArrayPtr(&[4]byte{1, 2, 3, 4}))},
|
||||
{V(MyBytes([]byte{})), V(MyBytesArrayPtr0(new([0]byte)))},
|
||||
{V(MyBytes([]byte{5, 6, 7, 8})), V(MyBytesArrayPtr(&[4]byte{5, 6, 7, 8}))},
|
||||
|
||||
{V([]byte(nil)), V((*MyBytesArray0)(nil))},
|
||||
{V([]byte{}), V((*MyBytesArray0)(new([0]byte)))},
|
||||
{V([]byte{1, 2, 3, 4}), V(&MyBytesArray{1, 2, 3, 4})},
|
||||
{V(MyBytes([]byte(nil))), V((*MyBytesArray0)(nil))},
|
||||
{V(MyBytes([]byte{})), V((*MyBytesArray0)(new([0]byte)))},
|
||||
{V(MyBytes([]byte{5, 6, 7, 8})), V(&MyBytesArray{5, 6, 7, 8})},
|
||||
{V(new([0]byte)), V(new(MyBytesArray0))},
|
||||
{V(new(MyBytesArray0)), V(new([0]byte))},
|
||||
{V(MyBytesArrayPtr0(nil)), V((*[0]byte)(nil))},
|
||||
{V((*[0]byte)(nil)), V(MyBytesArrayPtr0(nil))},
|
||||
|
||||
// named types and equal underlying types
|
||||
{V(new(int)), V(new(integer))},
|
||||
{V(new(integer)), V(new(int))},
|
||||
{V(Empty{}), V(struct{}{})},
|
||||
{V(new(Empty)), V(new(struct{}))},
|
||||
{V(struct{}{}), V(Empty{})},
|
||||
{V(new(struct{})), V(new(Empty))},
|
||||
{V(Empty{}), V(Empty{})},
|
||||
{V(MyBytes{}), V([]byte{})},
|
||||
{V([]byte{}), V(MyBytes{})},
|
||||
{V((func())(nil)), V(MyFunc(nil))},
|
||||
{V((MyFunc)(nil)), V((func())(nil))},
|
||||
|
||||
// structs with different tags
|
||||
{V(struct {
|
||||
x int `some:"foo"`
|
||||
}{}), V(struct {
|
||||
x int `some:"bar"`
|
||||
}{})},
|
||||
|
||||
{V(struct {
|
||||
x int `some:"bar"`
|
||||
}{}), V(struct {
|
||||
x int `some:"foo"`
|
||||
}{})},
|
||||
|
||||
{V(MyStruct{}), V(struct {
|
||||
x int `some:"foo"`
|
||||
}{})},
|
||||
|
||||
{V(struct {
|
||||
x int `some:"foo"`
|
||||
}{}), V(MyStruct{})},
|
||||
|
||||
{V(MyStruct{}), V(struct {
|
||||
x int `some:"bar"`
|
||||
}{})},
|
||||
|
||||
{V(struct {
|
||||
x int `some:"bar"`
|
||||
}{}), V(MyStruct{})},
|
||||
|
||||
{V(MyStruct1{}), V(MyStruct2{})},
|
||||
{V(MyStruct2{}), V(MyStruct1{})},
|
||||
|
||||
// can convert *byte and *MyByte
|
||||
{V((*byte)(nil)), V((*MyByte)(nil))},
|
||||
{V((*MyByte)(nil)), V((*byte)(nil))},
|
||||
|
||||
// cannot convert mismatched array sizes
|
||||
{V([2]byte{}), V([2]byte{})},
|
||||
{V([3]byte{}), V([3]byte{})},
|
||||
{V(MyBytesArray0{}), V([0]byte{})},
|
||||
{V([0]byte{}), V(MyBytesArray0{})},
|
||||
|
||||
// cannot convert other instances
|
||||
{V((**byte)(nil)), V((**byte)(nil))},
|
||||
{V((**MyByte)(nil)), V((**MyByte)(nil))},
|
||||
{V((chan byte)(nil)), V((chan byte)(nil))},
|
||||
{V((chan MyByte)(nil)), V((chan MyByte)(nil))},
|
||||
{V(([]byte)(nil)), V(([]byte)(nil))},
|
||||
{V(([]MyByte)(nil)), V(([]MyByte)(nil))},
|
||||
{V((map[int]byte)(nil)), V((map[int]byte)(nil))},
|
||||
{V((map[int]MyByte)(nil)), V((map[int]MyByte)(nil))},
|
||||
{V((map[byte]int)(nil)), V((map[byte]int)(nil))},
|
||||
{V((map[MyByte]int)(nil)), V((map[MyByte]int)(nil))},
|
||||
{V([2]byte{}), V([2]byte{})},
|
||||
{V([2]MyByte{}), V([2]MyByte{})},
|
||||
|
||||
// other
|
||||
{V((***int)(nil)), V((***int)(nil))},
|
||||
{V((***byte)(nil)), V((***byte)(nil))},
|
||||
{V((***int32)(nil)), V((***int32)(nil))},
|
||||
{V((***int64)(nil)), V((***int64)(nil))},
|
||||
{V((chan byte)(nil)), V((chan byte)(nil))},
|
||||
{V((chan MyByte)(nil)), V((chan MyByte)(nil))},
|
||||
{V((map[int]bool)(nil)), V((map[int]bool)(nil))},
|
||||
{V((map[int]byte)(nil)), V((map[int]byte)(nil))},
|
||||
{V((map[uint]bool)(nil)), V((map[uint]bool)(nil))},
|
||||
{V([]uint(nil)), V([]uint(nil))},
|
||||
{V([]int(nil)), V([]int(nil))},
|
||||
{V(new(any)), V(new(any))},
|
||||
{V(new(io.Reader)), V(new(io.Reader))},
|
||||
{V(new(io.Writer)), V(new(io.Writer))},
|
||||
|
||||
// channels
|
||||
{V(IntChan(nil)), V((chan<- int)(nil))},
|
||||
{V(IntChan(nil)), V((<-chan int)(nil))},
|
||||
{V((chan int)(nil)), V(IntChanRecv(nil))},
|
||||
{V((chan int)(nil)), V(IntChanSend(nil))},
|
||||
{V(IntChanRecv(nil)), V((<-chan int)(nil))},
|
||||
{V((<-chan int)(nil)), V(IntChanRecv(nil))},
|
||||
{V(IntChanSend(nil)), V((chan<- int)(nil))},
|
||||
{V((chan<- int)(nil)), V(IntChanSend(nil))},
|
||||
{V(IntChan(nil)), V((chan int)(nil))},
|
||||
{V((chan int)(nil)), V(IntChan(nil))},
|
||||
{V((chan int)(nil)), V((<-chan int)(nil))},
|
||||
{V((chan int)(nil)), V((chan<- int)(nil))},
|
||||
{V(BytesChan(nil)), V((chan<- []byte)(nil))},
|
||||
{V(BytesChan(nil)), V((<-chan []byte)(nil))},
|
||||
{V((chan []byte)(nil)), V(BytesChanRecv(nil))},
|
||||
{V((chan []byte)(nil)), V(BytesChanSend(nil))},
|
||||
{V(BytesChanRecv(nil)), V((<-chan []byte)(nil))},
|
||||
{V((<-chan []byte)(nil)), V(BytesChanRecv(nil))},
|
||||
{V(BytesChanSend(nil)), V((chan<- []byte)(nil))},
|
||||
{V((chan<- []byte)(nil)), V(BytesChanSend(nil))},
|
||||
{V(BytesChan(nil)), V((chan []byte)(nil))},
|
||||
{V((chan []byte)(nil)), V(BytesChan(nil))},
|
||||
{V((chan []byte)(nil)), V((<-chan []byte)(nil))},
|
||||
{V((chan []byte)(nil)), V((chan<- []byte)(nil))},
|
||||
|
||||
// cannot convert other instances (channels)
|
||||
{V(IntChan(nil)), V(IntChan(nil))},
|
||||
{V(IntChanRecv(nil)), V(IntChanRecv(nil))},
|
||||
{V(IntChanSend(nil)), V(IntChanSend(nil))},
|
||||
{V(BytesChan(nil)), V(BytesChan(nil))},
|
||||
{V(BytesChanRecv(nil)), V(BytesChanRecv(nil))},
|
||||
{V(BytesChanSend(nil)), V(BytesChanSend(nil))},
|
||||
|
||||
// interfaces
|
||||
{V(int(1)), EmptyInterfaceV(int(1))},
|
||||
{V(string("hello")), EmptyInterfaceV(string("hello"))},
|
||||
{V(new(bytes.Buffer)), ReaderV(new(bytes.Buffer))},
|
||||
{ReadWriterV(new(bytes.Buffer)), ReaderV(new(bytes.Buffer))},
|
||||
{V(new(bytes.Buffer)), ReadWriterV(new(bytes.Buffer))},
|
||||
}
|
||||
|
||||
func TestConvert(t *testingT) {
|
||||
canConvert := map[[2]reflect.Type]bool{}
|
||||
all := map[reflect.Type]bool{}
|
||||
|
||||
for _, tt := range convertTests {
|
||||
t1 := tt.in.Type()
|
||||
if !t1.ConvertibleTo(t1) {
|
||||
t.Errorf("(%s).ConvertibleTo(%s) = false, want true", t1, t1)
|
||||
continue
|
||||
}
|
||||
|
||||
t2 := tt.out.Type()
|
||||
if !t1.ConvertibleTo(t2) {
|
||||
t.Errorf("(%s).ConvertibleTo(%s) = false, want true", t1, t2)
|
||||
continue
|
||||
}
|
||||
|
||||
all[t1] = true
|
||||
all[t2] = true
|
||||
canConvert[[2]reflect.Type{t1, t2}] = true
|
||||
|
||||
// vout1 represents the in value converted to the in type.
|
||||
v1 := tt.in
|
||||
if !v1.CanConvert(t1) {
|
||||
t.Errorf("ValueOf(%T(%[1]v)).CanConvert(%s) = false, want true", tt.in.Interface(), t1)
|
||||
}
|
||||
vout1 := v1.Convert(t1)
|
||||
out1 := vout1.Interface()
|
||||
if vout1.Type() != tt.in.Type() || !reflect.DeepEqual(out1, tt.in.Interface()) {
|
||||
t.Errorf("ValueOf(%T(%[1]v)).Convert(%s) = %T(%[3]v), want %T(%[4]v)", tt.in.Interface(), t1, out1, tt.in.Interface())
|
||||
}
|
||||
|
||||
// vout2 represents the in value converted to the out type.
|
||||
if !v1.CanConvert(t2) {
|
||||
t.Errorf(" ValueOf(%T(%[1]v)).CanConvert(%s) = false, want true", tt.in.Interface(), t2)
|
||||
}
|
||||
vout2 := v1.Convert(t2)
|
||||
out2 := vout2.Interface()
|
||||
if vout2.Type() != tt.out.Type() || !reflect.DeepEqual(out2, tt.out.Interface()) {
|
||||
t.Errorf("ValueOf(%T(%[1]v)).Convert(%s) = %T(%[3]v), want %T(%[4]v)", tt.in.Interface(), t2, out2, tt.out.Interface())
|
||||
}
|
||||
if got, want := vout2.Kind(), vout2.Type().Kind(); got != want {
|
||||
t.Errorf("ValueOf(%T(%[1]v)).Convert(%s) has internal kind %v want %v", tt.in.Interface(), t1, got, want)
|
||||
}
|
||||
|
||||
// vout3 represents a new value of the out type, set to vout2. This makes
|
||||
// sure the converted value vout2 is really usable as a regular value.
|
||||
vout3 := reflect.New(t2).Elem()
|
||||
vout3.Set(vout2)
|
||||
out3 := vout3.Interface()
|
||||
if vout3.Type() != tt.out.Type() || !reflect.DeepEqual(out3, tt.out.Interface()) {
|
||||
t.Errorf("Set(ValueOf(%T(%[1]v)).Convert(%s)) = %T(%[3]v), want %T(%[4]v)", tt.in.Interface(), t2, out3, tt.out.Interface())
|
||||
}
|
||||
|
||||
if IsRO(v1) {
|
||||
t.Errorf("table entry %v is RO, should not be", v1)
|
||||
}
|
||||
if IsRO(vout1) {
|
||||
t.Errorf("self-conversion output %v is RO, should not be", vout1)
|
||||
}
|
||||
if IsRO(vout2) {
|
||||
t.Errorf("conversion output %v is RO, should not be", vout2)
|
||||
}
|
||||
if IsRO(vout3) {
|
||||
t.Errorf("set(conversion output) %v is RO, should not be", vout3)
|
||||
}
|
||||
if !IsRO(MakeRO(v1).Convert(t1)) {
|
||||
t.Errorf("RO self-conversion output %v is not RO, should be", v1)
|
||||
}
|
||||
if !IsRO(MakeRO(v1).Convert(t2)) {
|
||||
t.Errorf("RO conversion output %v is not RO, should be", v1)
|
||||
}
|
||||
}
|
||||
|
||||
// Assume that of all the types we saw during the tests,
|
||||
// if there wasn't an explicit entry for a conversion between
|
||||
// a pair of types, then it's not to be allowed. This checks for
|
||||
// things like 'int64' converting to '*int'.
|
||||
for t1 := range all {
|
||||
for t2 := range all {
|
||||
expectOK := t1 == t2 || canConvert[[2]reflect.Type{t1, t2}] || t2.Kind() == reflect.Interface && t2.NumMethod() == 0
|
||||
ok := t1.ConvertibleTo(t2)
|
||||
if ok != expectOK {
|
||||
t.Errorf("@(%s).ConvertibleTo(%s) = %v, want %v: %v", t1, t2, ok, expectOK, canConvert[[2]reflect.Type{t1, t2}])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestConvertPanic(t *testingT) {
|
||||
s := make([]byte, 4)
|
||||
p := new([8]byte)
|
||||
v := reflect.ValueOf(s)
|
||||
pt := reflect.TypeOf(p)
|
||||
if !v.Type().ConvertibleTo(pt) {
|
||||
t.Errorf("[]byte should be convertible to *[8]byte")
|
||||
}
|
||||
if v.CanConvert(pt) {
|
||||
t.Errorf("slice with length 4 should not be convertible to *[8]byte")
|
||||
}
|
||||
shouldPanic("reflect: cannot convert slice with length 4 to pointer to array with length 8", func() {
|
||||
_ = v.Convert(pt)
|
||||
})
|
||||
|
||||
if v.CanConvert(pt.Elem()) {
|
||||
t.Errorf("slice with length 4 should not be convertible to [8]byte")
|
||||
}
|
||||
shouldPanic("reflect: cannot convert slice with length 4 to array with length 8", func() {
|
||||
_ = v.Convert(pt.Elem())
|
||||
})
|
||||
}
|
||||
|
||||
func TestConvertSlice2Array(t *testingT) {
|
||||
s := make([]int, 4)
|
||||
p := [4]int{}
|
||||
pt := reflect.TypeOf(p)
|
||||
ov := reflect.ValueOf(s)
|
||||
v := ov.Convert(pt)
|
||||
// Converting a slice to non-empty array needs to return
|
||||
// a non-addressable copy of the original memory.
|
||||
if v.CanAddr() {
|
||||
t.Fatalf("convert slice to non-empty array returns a addressable copy array")
|
||||
}
|
||||
for i := range s {
|
||||
ov.Index(i).Set(reflect.ValueOf(i + 1))
|
||||
}
|
||||
for i := range s {
|
||||
if v.Index(i).Int() != 0 {
|
||||
t.Fatalf("slice (%v) mutation visible in converted result (%v)", ov, v)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var gFloat32 float32
|
||||
|
||||
const snan uint32 = 0x7f800001
|
||||
|
||||
func TestConvertNaNs(t *testingT) {
|
||||
// Test to see if a store followed by a load of a signaling NaN
|
||||
// maintains the signaling bit. (This used to fail on the 387 port.)
|
||||
gFloat32 = math.Float32frombits(snan)
|
||||
// runtime.Gosched() // make sure we don't optimize the store/load away
|
||||
if got := math.Float32bits(gFloat32); got != snan {
|
||||
t.Errorf("store/load of sNaN not faithful, got %x want %x", got, snan)
|
||||
}
|
||||
// Test reflect's conversion between float32s. See issue 36400.
|
||||
type myFloat32 float32
|
||||
x := V(myFloat32(math.Float32frombits(snan)))
|
||||
y := x.Convert(reflect.TypeOf(float32(0)))
|
||||
z := y.Interface().(float32)
|
||||
if got := math.Float32bits(z); got != snan {
|
||||
t.Errorf("signaling nan conversion got %x, want %x", got, snan)
|
||||
}
|
||||
}
|
||||
|
||||
func shouldPanic(expect string, f func()) {
|
||||
defer func() {
|
||||
r := recover()
|
||||
if r == nil {
|
||||
panic("did not panic")
|
||||
}
|
||||
if expect != "" {
|
||||
var s string
|
||||
switch r := r.(type) {
|
||||
case string:
|
||||
s = r
|
||||
case *reflect.ValueError:
|
||||
s = r.Error()
|
||||
default:
|
||||
panic(fmt.Sprintf("panicked with unexpected type %T", r))
|
||||
}
|
||||
if !strings.HasPrefix(s, "reflect") {
|
||||
panic(`panic string does not start with "reflect": ` + s)
|
||||
}
|
||||
if !strings.Contains(s, expect) {
|
||||
panic(`panic string does not contain "` + expect + `": ` + s)
|
||||
}
|
||||
}
|
||||
}()
|
||||
f()
|
||||
}
|
||||
1
compiler/cl/_testgo/reflectconv/out.ll
Normal file
1
compiler/cl/_testgo/reflectconv/out.ll
Normal file
@@ -0,0 +1 @@
|
||||
;
|
||||
@@ -201,24 +201,16 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 1, 2
|
||||
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9)
|
||||
store ptr %10, ptr @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
|
||||
%11 = load ptr, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8
|
||||
%12 = icmp eq ptr %11, null
|
||||
br i1 %12, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
%14 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 1 }, ptr %13, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56)
|
||||
%16 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %15, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %14, ptr %16, align 8
|
||||
%17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %15, 0
|
||||
%18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, i64 1, 1
|
||||
%19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %18, i64 1, 2
|
||||
%20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19)
|
||||
store ptr %20, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
%12 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 1 }, ptr %11, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56)
|
||||
%14 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %13, i64 0
|
||||
store %"github.com/goplus/llgo/runtime/abi.StructField" %12, ptr %14, align 8
|
||||
%15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %13, 0
|
||||
%16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %15, i64 1, 1
|
||||
%17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %16, i64 1, 2
|
||||
%18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17)
|
||||
store ptr %18, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8
|
||||
ret void
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -308,7 +308,7 @@ func (b *Builder) StructName(t *types.Struct) (ret string, pub bool) {
|
||||
if private {
|
||||
return b.Pkg + ".struct$" + hashStr, false
|
||||
}
|
||||
return "_llgo_struct$" + hashStr, true
|
||||
return "_llgo_struct$" + hashStr, false
|
||||
}
|
||||
|
||||
func (b *Builder) structHash(t *types.Struct) (ret []byte, private bool) {
|
||||
|
||||
@@ -15,3 +15,15 @@ float llgoToFloat32(long v) {
|
||||
k.v = v;
|
||||
return k.f;
|
||||
}
|
||||
|
||||
long llgoFromFloat64(double v) {
|
||||
castUnion k;
|
||||
k.d = v;
|
||||
return k.v;
|
||||
}
|
||||
|
||||
long llgoFromFloat32(float v) {
|
||||
castUnion k;
|
||||
k.f = v;
|
||||
return k.v;
|
||||
}
|
||||
|
||||
@@ -28,3 +28,9 @@ func ToFloat64(v uintptr) float64
|
||||
|
||||
//go:linkname ToFloat32 C.llgoToFloat32
|
||||
func ToFloat32(v uintptr) float32
|
||||
|
||||
//go:linkname FromFloat64 C.llgoFromFloat64
|
||||
func FromFloat64(v float64) uintptr
|
||||
|
||||
//go:linkname FromFloat32 C.llgoFromFloat32
|
||||
func FromFloat32(v float32) uintptr
|
||||
|
||||
@@ -64,14 +64,14 @@ func CountString(s string, c byte) (n int) {
|
||||
// Requires 2 <= len(b) <= MaxLen.
|
||||
func Index(a, b []byte) int {
|
||||
for i := 0; i <= len(a)-len(b); i++ {
|
||||
if equal(a[i:i+len(b)], b) {
|
||||
if Equal(a[i:i+len(b)], b) {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
func equal(a, b []byte) bool {
|
||||
func Equal(a, b []byte) bool {
|
||||
if n := len(a); n == len(b) {
|
||||
return c.Memcmp(unsafe.Pointer(unsafe.SliceData(a)), unsafe.Pointer(unsafe.SliceData(b)), uintptr(n)) == 0
|
||||
}
|
||||
|
||||
239
runtime/internal/lib/reflect/deepequal.go
Normal file
239
runtime/internal/lib/reflect/deepequal.go
Normal file
@@ -0,0 +1,239 @@
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Deep equality test via reflection
|
||||
|
||||
package reflect
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/goplus/llgo/runtime/internal/lib/internal/bytealg"
|
||||
)
|
||||
|
||||
// During deepValueEqual, must keep track of checks that are
|
||||
// in progress. The comparison algorithm assumes that all
|
||||
// checks in progress are true when it reencounters them.
|
||||
// Visited comparisons are stored in a map indexed by visit.
|
||||
type visit struct {
|
||||
a1 unsafe.Pointer
|
||||
a2 unsafe.Pointer
|
||||
typ Type
|
||||
}
|
||||
|
||||
// Tests for deep equality using reflected types. The map argument tracks
|
||||
// comparisons that have already been seen, which allows short circuiting on
|
||||
// recursive types.
|
||||
func deepValueEqual(v1, v2 Value, visited map[visit]bool) bool {
|
||||
if !v1.IsValid() || !v2.IsValid() {
|
||||
return v1.IsValid() == v2.IsValid()
|
||||
}
|
||||
if v1.Type() != v2.Type() {
|
||||
return false
|
||||
}
|
||||
|
||||
// We want to avoid putting more in the visited map than we need to.
|
||||
// For any possible reference cycle that might be encountered,
|
||||
// hard(v1, v2) needs to return true for at least one of the types in the cycle,
|
||||
// and it's safe and valid to get Value's internal pointer.
|
||||
hard := func(v1, v2 Value) bool {
|
||||
switch v1.Kind() {
|
||||
case Pointer:
|
||||
if v1.typ().PtrBytes == 0 {
|
||||
// not-in-heap pointers can't be cyclic.
|
||||
// At least, all of our current uses of runtime/internal/sys.NotInHeap
|
||||
// have that property. The runtime ones aren't cyclic (and we don't use
|
||||
// DeepEqual on them anyway), and the cgo-generated ones are
|
||||
// all empty structs.
|
||||
return false
|
||||
}
|
||||
fallthrough
|
||||
case Map, Slice, Interface:
|
||||
// Nil pointers cannot be cyclic. Avoid putting them in the visited map.
|
||||
return !v1.IsNil() && !v2.IsNil()
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
if hard(v1, v2) {
|
||||
// For a Pointer or Map value, we need to check flagIndir,
|
||||
// which we do by calling the pointer method.
|
||||
// For Slice or Interface, flagIndir is always set,
|
||||
// and using v.ptr suffices.
|
||||
ptrval := func(v Value) unsafe.Pointer {
|
||||
switch v.Kind() {
|
||||
case Pointer, Map:
|
||||
return v.pointer()
|
||||
default:
|
||||
return v.ptr
|
||||
}
|
||||
}
|
||||
addr1 := ptrval(v1)
|
||||
addr2 := ptrval(v2)
|
||||
if uintptr(addr1) > uintptr(addr2) {
|
||||
// Canonicalize order to reduce number of entries in visited.
|
||||
// Assumes non-moving garbage collector.
|
||||
addr1, addr2 = addr2, addr1
|
||||
}
|
||||
|
||||
// Short circuit if references are already seen.
|
||||
typ := v1.Type()
|
||||
v := visit{addr1, addr2, typ}
|
||||
if visited[v] {
|
||||
return true
|
||||
}
|
||||
|
||||
// Remember for later.
|
||||
visited[v] = true
|
||||
}
|
||||
|
||||
switch v1.Kind() {
|
||||
case Array:
|
||||
for i := 0; i < v1.Len(); i++ {
|
||||
if !deepValueEqual(v1.Index(i), v2.Index(i), visited) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
case Slice:
|
||||
if v1.IsNil() != v2.IsNil() {
|
||||
return false
|
||||
}
|
||||
if v1.Len() != v2.Len() {
|
||||
return false
|
||||
}
|
||||
if v1.UnsafePointer() == v2.UnsafePointer() {
|
||||
return true
|
||||
}
|
||||
// Special case for []byte, which is common.
|
||||
if v1.Type().Elem().Kind() == Uint8 {
|
||||
return bytealg.Equal(v1.Bytes(), v2.Bytes())
|
||||
}
|
||||
for i := 0; i < v1.Len(); i++ {
|
||||
if !deepValueEqual(v1.Index(i), v2.Index(i), visited) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
case Interface:
|
||||
if v1.IsNil() || v2.IsNil() {
|
||||
return v1.IsNil() == v2.IsNil()
|
||||
}
|
||||
return deepValueEqual(v1.Elem(), v2.Elem(), visited)
|
||||
case Pointer:
|
||||
if v1.UnsafePointer() == v2.UnsafePointer() {
|
||||
return true
|
||||
}
|
||||
return deepValueEqual(v1.Elem(), v2.Elem(), visited)
|
||||
case Struct:
|
||||
for i, n := 0, v1.NumField(); i < n; i++ {
|
||||
if !deepValueEqual(v1.Field(i), v2.Field(i), visited) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
case Map:
|
||||
if v1.IsNil() != v2.IsNil() {
|
||||
return false
|
||||
}
|
||||
if v1.Len() != v2.Len() {
|
||||
return false
|
||||
}
|
||||
if v1.UnsafePointer() == v2.UnsafePointer() {
|
||||
return true
|
||||
}
|
||||
for _, k := range v1.MapKeys() {
|
||||
val1 := v1.MapIndex(k)
|
||||
val2 := v2.MapIndex(k)
|
||||
if !val1.IsValid() || !val2.IsValid() || !deepValueEqual(val1, val2, visited) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
case Func:
|
||||
if v1.IsNil() && v2.IsNil() {
|
||||
return true
|
||||
}
|
||||
// Can't do better than this:
|
||||
return false
|
||||
case Int, Int8, Int16, Int32, Int64:
|
||||
return v1.Int() == v2.Int()
|
||||
case Uint, Uint8, Uint16, Uint32, Uint64, Uintptr:
|
||||
return v1.Uint() == v2.Uint()
|
||||
case String:
|
||||
return v1.String() == v2.String()
|
||||
case Bool:
|
||||
return v1.Bool() == v2.Bool()
|
||||
case Float32, Float64:
|
||||
return v1.Float() == v2.Float()
|
||||
case Complex64, Complex128:
|
||||
return v1.Complex() == v2.Complex()
|
||||
default:
|
||||
// Normal equality suffices
|
||||
return valueInterface(v1, false) == valueInterface(v2, false)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepEqual reports whether x and y are “deeply equal,” defined as follows.
|
||||
// Two values of identical type are deeply equal if one of the following cases applies.
|
||||
// Values of distinct types are never deeply equal.
|
||||
//
|
||||
// Array values are deeply equal when their corresponding elements are deeply equal.
|
||||
//
|
||||
// Struct values are deeply equal if their corresponding fields,
|
||||
// both exported and unexported, are deeply equal.
|
||||
//
|
||||
// Func values are deeply equal if both are nil; otherwise they are not deeply equal.
|
||||
//
|
||||
// Interface values are deeply equal if they hold deeply equal concrete values.
|
||||
//
|
||||
// Map values are deeply equal when all of the following are true:
|
||||
// they are both nil or both non-nil, they have the same length,
|
||||
// and either they are the same map object or their corresponding keys
|
||||
// (matched using Go equality) map to deeply equal values.
|
||||
//
|
||||
// Pointer values are deeply equal if they are equal using Go's == operator
|
||||
// or if they point to deeply equal values.
|
||||
//
|
||||
// Slice values are deeply equal when all of the following are true:
|
||||
// they are both nil or both non-nil, they have the same length,
|
||||
// and either they point to the same initial entry of the same underlying array
|
||||
// (that is, &x[0] == &y[0]) or their corresponding elements (up to length) are deeply equal.
|
||||
// Note that a non-nil empty slice and a nil slice (for example, []byte{} and []byte(nil))
|
||||
// are not deeply equal.
|
||||
//
|
||||
// Other values - numbers, bools, strings, and channels - are deeply equal
|
||||
// if they are equal using Go's == operator.
|
||||
//
|
||||
// In general DeepEqual is a recursive relaxation of Go's == operator.
|
||||
// However, this idea is impossible to implement without some inconsistency.
|
||||
// Specifically, it is possible for a value to be unequal to itself,
|
||||
// either because it is of func type (uncomparable in general)
|
||||
// or because it is a floating-point NaN value (not equal to itself in floating-point comparison),
|
||||
// or because it is an array, struct, or interface containing
|
||||
// such a value.
|
||||
// On the other hand, pointer values are always equal to themselves,
|
||||
// even if they point at or contain such problematic values,
|
||||
// because they compare equal using Go's == operator, and that
|
||||
// is a sufficient condition to be deeply equal, regardless of content.
|
||||
// DeepEqual has been defined so that the same short-cut applies
|
||||
// to slices and maps: if x and y are the same slice or the same map,
|
||||
// they are deeply equal regardless of content.
|
||||
//
|
||||
// As DeepEqual traverses the data values it may find a cycle. The
|
||||
// second and subsequent times that DeepEqual compares two pointer
|
||||
// values that have been compared before, it treats the values as
|
||||
// equal rather than examining the values to which they point.
|
||||
// This ensures that DeepEqual terminates.
|
||||
func DeepEqual(x, y any) bool {
|
||||
if x == nil || y == nil {
|
||||
return x == y
|
||||
}
|
||||
v1 := ValueOf(x)
|
||||
v2 := ValueOf(y)
|
||||
if v1.Type() != v2.Type() {
|
||||
return false
|
||||
}
|
||||
return deepValueEqual(v1, v2, make(map[visit]bool))
|
||||
}
|
||||
@@ -924,13 +924,10 @@ func (t *rtype) AssignableTo(u Type) bool {
|
||||
}
|
||||
|
||||
func (t *rtype) ConvertibleTo(u Type) bool {
|
||||
/*
|
||||
if u == nil {
|
||||
panic("reflect: nil type passed to Type.ConvertibleTo")
|
||||
}
|
||||
return convertOp(u.common(), t.common()) != nil
|
||||
*/
|
||||
panic("todo: reflect.rtype.ConvertibleTo")
|
||||
if u == nil {
|
||||
panic("reflect: nil type passed to Type.ConvertibleTo")
|
||||
}
|
||||
return convertOp(u.common(), t.common()) != nil
|
||||
}
|
||||
|
||||
func (t *rtype) Comparable() bool {
|
||||
@@ -947,14 +944,11 @@ func implements(T, V *abi.Type) bool
|
||||
// https://golang.org/doc/go_spec.html#Assignability
|
||||
// T and V must be both of Chan kind.
|
||||
func specialChannelAssignability(T, V *abi.Type) bool {
|
||||
/*
|
||||
// Special case:
|
||||
// x is a bidirectional channel value, T is a channel type,
|
||||
// x's type V and T have identical element types,
|
||||
// and at least one of V or T is not a defined type.
|
||||
return V.ChanDir() == abi.BothDir && (nameFor(T) == "" || nameFor(V) == "") && haveIdenticalType(T.Elem(), V.Elem(), true)
|
||||
*/
|
||||
panic("todo: reflect.specialChannelAssignability")
|
||||
// Special case:
|
||||
// x is a bidirectional channel value, T is a channel type,
|
||||
// x's type V and T have identical element types,
|
||||
// and at least one of V or T is not a defined type.
|
||||
return V.ChanDir() == abi.BothDir && (nameFor(T) == "" || nameFor(V) == "") && haveIdenticalType(T.Elem(), V.Elem(), true)
|
||||
}
|
||||
|
||||
// directlyAssignable reports whether a value x of type V can be directly
|
||||
|
||||
@@ -28,6 +28,7 @@ import (
|
||||
"github.com/goplus/llgo/runtime/abi"
|
||||
"github.com/goplus/llgo/runtime/internal/clite/bitcast"
|
||||
"github.com/goplus/llgo/runtime/internal/ffi"
|
||||
"github.com/goplus/llgo/runtime/internal/lib/internal/itoa"
|
||||
"github.com/goplus/llgo/runtime/internal/runtime"
|
||||
"github.com/goplus/llgo/runtime/internal/runtime/goarch"
|
||||
)
|
||||
@@ -622,7 +623,7 @@ func (v Value) CanFloat() bool {
|
||||
// It panics if v's Kind is not Float32 or Float64
|
||||
func (v Value) Float() float64 {
|
||||
k := v.kind()
|
||||
if v.flag&flagAddr != 0 {
|
||||
if v.flag&flagIndir != 0 {
|
||||
switch k {
|
||||
case Float32:
|
||||
return float64(*(*float32)(v.ptr))
|
||||
@@ -634,7 +635,11 @@ func (v Value) Float() float64 {
|
||||
case Float32:
|
||||
return float64(bitcast.ToFloat32(uintptr(v.ptr)))
|
||||
case Float64:
|
||||
return bitcast.ToFloat64(uintptr(v.ptr))
|
||||
if is64bit {
|
||||
return bitcast.ToFloat64(uintptr(v.ptr))
|
||||
} else {
|
||||
return *(*float64)(v.ptr)
|
||||
}
|
||||
}
|
||||
}
|
||||
panic(&ValueError{"reflect.Value.Float", v.kind()})
|
||||
@@ -704,7 +709,7 @@ func (v Value) Int() int64 {
|
||||
f := v.flag
|
||||
k := f.kind()
|
||||
p := v.ptr
|
||||
if f&flagAddr != 0 {
|
||||
if f&flagIndir != 0 {
|
||||
switch k {
|
||||
case Int:
|
||||
return int64(*(*int)(p))
|
||||
@@ -717,16 +722,16 @@ func (v Value) Int() int64 {
|
||||
case Int64:
|
||||
return *(*int64)(p)
|
||||
}
|
||||
} else if unsafe.Sizeof(uintptr(0)) == 8 {
|
||||
if k >= Int && k <= Int64 {
|
||||
return int64(uintptr(p))
|
||||
}
|
||||
} else {
|
||||
if k >= Int && k <= Int32 {
|
||||
switch k {
|
||||
case Int, Int8, Int16, Int32:
|
||||
return int64(uintptr(p))
|
||||
}
|
||||
if k == Int64 {
|
||||
return *(*int64)(p)
|
||||
case Int64:
|
||||
if is64bit {
|
||||
return int64(uintptr(p))
|
||||
} else {
|
||||
return *(*int64)(p)
|
||||
}
|
||||
}
|
||||
}
|
||||
panic(&ValueError{"reflect.Value.Int", v.kind()})
|
||||
@@ -1557,7 +1562,7 @@ func (v Value) Uint() uint64 {
|
||||
f := v.flag
|
||||
k := v.kind()
|
||||
p := v.ptr
|
||||
if f&flagAddr != 0 {
|
||||
if f&flagIndir != 0 {
|
||||
switch k {
|
||||
case Uint:
|
||||
return uint64(*(*uint)(p))
|
||||
@@ -1572,16 +1577,16 @@ func (v Value) Uint() uint64 {
|
||||
case Uintptr:
|
||||
return uint64(*(*uintptr)(p))
|
||||
}
|
||||
} else if unsafe.Sizeof(uintptr(0)) == 8 {
|
||||
if k >= Uint && k <= Uintptr {
|
||||
return uint64(uintptr(p))
|
||||
}
|
||||
} else {
|
||||
if k >= Uint && k <= Uint32 {
|
||||
switch k {
|
||||
case Uint, Uint8, Uint16, Uint32:
|
||||
return uint64(uintptr(p))
|
||||
}
|
||||
if k == Uint64 || k == Uintptr {
|
||||
return *(*uint64)(p)
|
||||
case Uint64, Uintptr:
|
||||
if is64bit {
|
||||
return uint64(uintptr(p))
|
||||
} else {
|
||||
return *(*uint64)(p)
|
||||
}
|
||||
}
|
||||
}
|
||||
panic(&ValueError{"reflect.Value.Uint", v.kind()})
|
||||
@@ -1856,6 +1861,48 @@ func (v Value) assignTo(context string, dst *abi.Type, target unsafe.Pointer) Va
|
||||
panic(context + ": value of type " + stringFor(v.typ()) + " is not assignable to type " + stringFor(dst))
|
||||
}
|
||||
|
||||
// Convert returns the value v converted to type t.
|
||||
// If the usual Go conversion rules do not allow conversion
|
||||
// of the value v to type t, or if converting v to type t panics, Convert panics.
|
||||
func (v Value) Convert(t Type) Value {
|
||||
if v.flag&flagMethod != 0 {
|
||||
v = makeMethodValue("Convert", v)
|
||||
}
|
||||
var op func(Value, Type) Value
|
||||
if kind := v.Kind(); kind == Func && kind == t.Kind() {
|
||||
op = convertOp(t.common(), v.Type().common())
|
||||
} else {
|
||||
op = convertOp(t.common(), v.typ())
|
||||
}
|
||||
if op == nil {
|
||||
panic("reflect.Value.Convert: value of type " + stringFor(v.typ()) + " cannot be converted to type " + t.String())
|
||||
}
|
||||
return op(v, t)
|
||||
}
|
||||
|
||||
// CanConvert reports whether the value v can be converted to type t.
|
||||
// If v.CanConvert(t) returns true then v.Convert(t) will not panic.
|
||||
func (v Value) CanConvert(t Type) bool {
|
||||
vt := v.Type()
|
||||
if !vt.ConvertibleTo(t) {
|
||||
return false
|
||||
}
|
||||
// Converting from slice to array or to pointer-to-array can panic
|
||||
// depending on the value.
|
||||
switch {
|
||||
case vt.Kind() == Slice && t.Kind() == Array:
|
||||
if t.Len() > v.Len() {
|
||||
return false
|
||||
}
|
||||
case vt.Kind() == Slice && t.Kind() == Pointer && t.Elem().Kind() == Array:
|
||||
n := t.Elem().Len()
|
||||
if n > v.Len() {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// memmove copies size bytes to dst from src. No write barriers are used.
|
||||
//
|
||||
//go:linkname memmove C.memmove
|
||||
@@ -2166,11 +2213,9 @@ func (v Value) call(op string, in []Value) (out []Value) {
|
||||
tin = append([]*abi.Type{rcvrtype}, ft.In...)
|
||||
tout = ft.Out
|
||||
ioff = 1
|
||||
if v.flag&flagIndir != 0 {
|
||||
args = append(args, v.ptr)
|
||||
} else {
|
||||
args = append(args, unsafe.Pointer(&v.ptr))
|
||||
}
|
||||
var ptr unsafe.Pointer
|
||||
storeRcvr(v, unsafe.Pointer(&ptr))
|
||||
args = append(args, unsafe.Pointer(&ptr))
|
||||
} else {
|
||||
if v.flag&flagIndir != 0 {
|
||||
fn = *(*unsafe.Pointer)(v.ptr)
|
||||
@@ -2267,6 +2312,23 @@ func (v Value) call(op string, in []Value) (out []Value) {
|
||||
return
|
||||
}
|
||||
|
||||
// v is a method receiver. Store at p the word which is used to
|
||||
// encode that receiver at the start of the argument list.
|
||||
// Reflect uses the "interface" calling convention for
|
||||
// methods, which always uses one word to record the receiver.
|
||||
func storeRcvr(v Value, p unsafe.Pointer) {
|
||||
t := v.typ()
|
||||
if t.Kind() == abi.Interface {
|
||||
// the interface data word becomes the receiver word
|
||||
iface := (*nonEmptyInterface)(v.ptr)
|
||||
*(*unsafe.Pointer)(p) = iface.word
|
||||
} else if v.flag&flagIndir != 0 && !ifaceIndir(t) {
|
||||
*(*unsafe.Pointer)(p) = *(*unsafe.Pointer)(v.ptr)
|
||||
} else {
|
||||
*(*unsafe.Pointer)(p) = v.ptr
|
||||
}
|
||||
}
|
||||
|
||||
var stringType = rtypeOf("")
|
||||
|
||||
// MapIndex returns the value associated with key in the map v.
|
||||
@@ -2562,7 +2624,7 @@ func methodReceiver(op string, v Value, methodIndex int) (rcvrtype *abi.Type, t
|
||||
panic("reflect: " + op + " of method on nil interface value")
|
||||
}
|
||||
rcvrtype = iface.itab.typ
|
||||
fn = unsafe.Pointer(&iface.itab.fun[i])
|
||||
fn = unsafe.Pointer(iface.itab.fun[i])
|
||||
t = (*funcType)(unsafe.Pointer(m.Typ_))
|
||||
} else {
|
||||
rcvrtype = v.typ()
|
||||
@@ -2581,6 +2643,340 @@ func methodReceiver(op string, v Value, methodIndex int) (rcvrtype *abi.Type, t
|
||||
return
|
||||
}
|
||||
|
||||
// convertOp returns the function to convert a value of type src
|
||||
// to a value of type dst. If the conversion is illegal, convertOp returns nil.
|
||||
func convertOp(dst, src *abi.Type) func(Value, Type) Value {
|
||||
switch Kind(src.Kind()) {
|
||||
case Int, Int8, Int16, Int32, Int64:
|
||||
switch Kind(dst.Kind()) {
|
||||
case Int, Int8, Int16, Int32, Int64, Uint, Uint8, Uint16, Uint32, Uint64, Uintptr:
|
||||
return cvtInt
|
||||
case Float32, Float64:
|
||||
return cvtIntFloat
|
||||
case String:
|
||||
return cvtIntString
|
||||
}
|
||||
|
||||
case Uint, Uint8, Uint16, Uint32, Uint64, Uintptr:
|
||||
switch Kind(dst.Kind()) {
|
||||
case Int, Int8, Int16, Int32, Int64, Uint, Uint8, Uint16, Uint32, Uint64, Uintptr:
|
||||
return cvtUint
|
||||
case Float32, Float64:
|
||||
return cvtUintFloat
|
||||
case String:
|
||||
return cvtUintString
|
||||
}
|
||||
|
||||
case Float32, Float64:
|
||||
switch Kind(dst.Kind()) {
|
||||
case Int, Int8, Int16, Int32, Int64:
|
||||
return cvtFloatInt
|
||||
case Uint, Uint8, Uint16, Uint32, Uint64, Uintptr:
|
||||
return cvtFloatUint
|
||||
case Float32, Float64:
|
||||
return cvtFloat
|
||||
}
|
||||
|
||||
case Complex64, Complex128:
|
||||
switch Kind(dst.Kind()) {
|
||||
case Complex64, Complex128:
|
||||
return cvtComplex
|
||||
}
|
||||
|
||||
case String:
|
||||
if dst.Kind() == abi.Slice && pkgPathFor(dst.Elem()) == "" {
|
||||
switch Kind(dst.Elem().Kind()) {
|
||||
case Uint8:
|
||||
return cvtStringBytes
|
||||
case Int32:
|
||||
return cvtStringRunes
|
||||
}
|
||||
}
|
||||
|
||||
case Slice:
|
||||
if dst.Kind() == abi.String && pkgPathFor(src.Elem()) == "" {
|
||||
switch Kind(src.Elem().Kind()) {
|
||||
case Uint8:
|
||||
return cvtBytesString
|
||||
case Int32:
|
||||
return cvtRunesString
|
||||
}
|
||||
}
|
||||
// "x is a slice, T is a pointer-to-array type,
|
||||
// and the slice and array types have identical element types."
|
||||
if dst.Kind() == abi.Pointer && dst.Elem().Kind() == abi.Array && src.Elem() == dst.Elem().Elem() {
|
||||
return cvtSliceArrayPtr
|
||||
}
|
||||
// "x is a slice, T is an array type,
|
||||
// and the slice and array types have identical element types."
|
||||
if dst.Kind() == abi.Array && src.Elem() == dst.Elem() {
|
||||
return cvtSliceArray
|
||||
}
|
||||
|
||||
case Chan:
|
||||
if dst.Kind() == abi.Chan && specialChannelAssignability(dst, src) {
|
||||
return cvtDirect
|
||||
}
|
||||
}
|
||||
|
||||
// dst and src have same underlying type.
|
||||
if haveIdenticalUnderlyingType(dst, src, false) {
|
||||
return cvtDirect
|
||||
}
|
||||
|
||||
// dst and src are non-defined pointer types with same underlying base type.
|
||||
if dst.Kind() == abi.Pointer && nameFor(dst) == "" &&
|
||||
src.Kind() == abi.Pointer && nameFor(src) == "" &&
|
||||
haveIdenticalUnderlyingType(elem(dst), elem(src), false) {
|
||||
return cvtDirect
|
||||
}
|
||||
|
||||
if implements(dst, src) {
|
||||
if src.Kind() == abi.Interface {
|
||||
return cvtI2I
|
||||
}
|
||||
return cvtT2I
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// _64bit = true on 64-bit systems, false on 32-bit systems
|
||||
const is64bit = (1 << (^uintptr(0) >> 63) / 2) == 1
|
||||
|
||||
// makeInt returns a Value of type t equal to bits (possibly truncated),
|
||||
// where t is a signed or unsigned int type.
|
||||
func makeInt(f flag, bits uint64, t Type) Value {
|
||||
typ := t.common()
|
||||
var ptr unsafe.Pointer
|
||||
switch typ.Size() {
|
||||
case 1, 2, 4:
|
||||
ptr = unsafe.Pointer(uintptr(bits))
|
||||
case 8:
|
||||
if is64bit {
|
||||
ptr = unsafe.Pointer(uintptr(bits))
|
||||
} else {
|
||||
ptr = unsafe_New(typ)
|
||||
*(*uint64)(ptr) = bits
|
||||
f |= flagIndir
|
||||
}
|
||||
}
|
||||
return Value{typ, ptr, f | flag(typ.Kind())}
|
||||
}
|
||||
|
||||
// makeFloat returns a Value of type t equal to v (possibly truncated to float32),
|
||||
// where t is a float32 or float64 type.
|
||||
func makeFloat(f flag, v float64, t Type) Value {
|
||||
typ := t.common()
|
||||
var ptr unsafe.Pointer
|
||||
switch typ.Size() {
|
||||
case 4:
|
||||
ptr = unsafe.Pointer(bitcast.FromFloat32(float32(v)))
|
||||
case 8:
|
||||
if is64bit {
|
||||
ptr = unsafe.Pointer(bitcast.FromFloat64(v))
|
||||
} else {
|
||||
ptr = unsafe_New(typ)
|
||||
*(*float64)(ptr) = v
|
||||
f |= flagIndir
|
||||
}
|
||||
}
|
||||
return Value{typ, ptr, f | flag(typ.Kind())}
|
||||
}
|
||||
|
||||
// makeFloat32 returns a Value of type t equal to v, where t is a float32 type.
|
||||
func makeFloat32(f flag, ptr unsafe.Pointer, t Type) Value {
|
||||
typ := t.common()
|
||||
return Value{typ, ptr, f | flag(typ.Kind())}
|
||||
}
|
||||
|
||||
// makeComplex returns a Value of type t equal to v (possibly truncated to complex64),
|
||||
// where t is a complex64 or complex128 type.
|
||||
func makeComplex(f flag, v complex128, t Type) Value {
|
||||
typ := t.common()
|
||||
ptr := unsafe_New(typ)
|
||||
switch typ.Size() {
|
||||
case 8:
|
||||
*(*complex64)(ptr) = complex64(v)
|
||||
case 16:
|
||||
*(*complex128)(ptr) = v
|
||||
}
|
||||
return Value{typ, ptr, f | flagIndir | flag(typ.Kind())}
|
||||
}
|
||||
|
||||
func makeString(f flag, v string, t Type) Value {
|
||||
ret := New(t).Elem()
|
||||
ret.SetString(v)
|
||||
ret.flag = ret.flag&^flagAddr | f
|
||||
return ret
|
||||
}
|
||||
|
||||
func makeBytes(f flag, v []byte, t Type) Value {
|
||||
ret := New(t).Elem()
|
||||
ret.SetBytes(v)
|
||||
ret.flag = ret.flag&^flagAddr | f
|
||||
return ret
|
||||
}
|
||||
|
||||
func makeRunes(f flag, v []rune, t Type) Value {
|
||||
ret := New(t).Elem()
|
||||
ret.setRunes(v)
|
||||
ret.flag = ret.flag&^flagAddr | f
|
||||
return ret
|
||||
}
|
||||
|
||||
// These conversion functions are returned by convertOp
|
||||
// for classes of conversions. For example, the first function, cvtInt,
|
||||
// takes any value v of signed int type and returns the value converted
|
||||
// to type t, where t is any signed or unsigned int type.
|
||||
|
||||
// convertOp: intXX -> [u]intXX
|
||||
func cvtInt(v Value, t Type) Value {
|
||||
return makeInt(v.flag.ro(), uint64(v.Int()), t)
|
||||
}
|
||||
|
||||
// convertOp: uintXX -> [u]intXX
|
||||
func cvtUint(v Value, t Type) Value {
|
||||
return makeInt(v.flag.ro(), v.Uint(), t)
|
||||
}
|
||||
|
||||
// convertOp: floatXX -> intXX
|
||||
func cvtFloatInt(v Value, t Type) Value {
|
||||
return makeInt(v.flag.ro(), uint64(int64(v.Float())), t)
|
||||
}
|
||||
|
||||
// convertOp: floatXX -> uintXX
|
||||
func cvtFloatUint(v Value, t Type) Value {
|
||||
return makeInt(v.flag.ro(), uint64(v.Float()), t)
|
||||
}
|
||||
|
||||
// convertOp: intXX -> floatXX
|
||||
func cvtIntFloat(v Value, t Type) Value {
|
||||
return makeFloat(v.flag.ro(), float64(v.Int()), t)
|
||||
}
|
||||
|
||||
// convertOp: uintXX -> floatXX
|
||||
func cvtUintFloat(v Value, t Type) Value {
|
||||
return makeFloat(v.flag.ro(), float64(v.Uint()), t)
|
||||
}
|
||||
|
||||
// convertOp: floatXX -> floatXX
|
||||
func cvtFloat(v Value, t Type) Value {
|
||||
if v.Type().Kind() == Float32 && t.Kind() == Float32 {
|
||||
// Don't do any conversion if both types have underlying type float32.
|
||||
// This avoids converting to float64 and back, which will
|
||||
// convert a signaling NaN to a quiet NaN. See issue 36400.
|
||||
return makeFloat32(v.flag.ro(), v.ptr, t)
|
||||
}
|
||||
return makeFloat(v.flag.ro(), v.Float(), t)
|
||||
}
|
||||
|
||||
// convertOp: complexXX -> complexXX
|
||||
func cvtComplex(v Value, t Type) Value {
|
||||
return makeComplex(v.flag.ro(), v.Complex(), t)
|
||||
}
|
||||
|
||||
// convertOp: intXX -> string
|
||||
func cvtIntString(v Value, t Type) Value {
|
||||
s := "\uFFFD"
|
||||
if x := v.Int(); int64(rune(x)) == x {
|
||||
s = string(rune(x))
|
||||
}
|
||||
return makeString(v.flag.ro(), s, t)
|
||||
}
|
||||
|
||||
// convertOp: uintXX -> string
|
||||
func cvtUintString(v Value, t Type) Value {
|
||||
s := "\uFFFD"
|
||||
if x := v.Uint(); uint64(rune(x)) == x {
|
||||
s = string(rune(x))
|
||||
}
|
||||
return makeString(v.flag.ro(), s, t)
|
||||
}
|
||||
|
||||
// convertOp: []byte -> string
|
||||
func cvtBytesString(v Value, t Type) Value {
|
||||
return makeString(v.flag.ro(), string(v.Bytes()), t)
|
||||
}
|
||||
|
||||
// convertOp: string -> []byte
|
||||
func cvtStringBytes(v Value, t Type) Value {
|
||||
return makeBytes(v.flag.ro(), []byte(v.String()), t)
|
||||
}
|
||||
|
||||
// convertOp: []rune -> string
|
||||
func cvtRunesString(v Value, t Type) Value {
|
||||
return makeString(v.flag.ro(), string(v.runes()), t)
|
||||
}
|
||||
|
||||
// convertOp: string -> []rune
|
||||
func cvtStringRunes(v Value, t Type) Value {
|
||||
return makeRunes(v.flag.ro(), []rune(v.String()), t)
|
||||
}
|
||||
|
||||
// convertOp: []T -> *[N]T
|
||||
func cvtSliceArrayPtr(v Value, t Type) Value {
|
||||
n := t.Elem().Len()
|
||||
if n > v.Len() {
|
||||
panic("reflect: cannot convert slice with length " + itoa.Itoa(v.Len()) + " to pointer to array with length " + itoa.Itoa(n))
|
||||
}
|
||||
h := (*unsafeheaderSlice)(v.ptr)
|
||||
return Value{t.common(), h.Data, v.flag&^(flagIndir|flagAddr|flagKindMask) | flag(Pointer)}
|
||||
}
|
||||
|
||||
// convertOp: []T -> [N]T
|
||||
func cvtSliceArray(v Value, t Type) Value {
|
||||
n := t.Len()
|
||||
if n > v.Len() {
|
||||
panic("reflect: cannot convert slice with length " + itoa.Itoa(v.Len()) + " to array with length " + itoa.Itoa(n))
|
||||
}
|
||||
h := (*unsafeheaderSlice)(v.ptr)
|
||||
typ := t.common()
|
||||
ptr := h.Data
|
||||
c := unsafe_New(typ)
|
||||
typedmemmove(typ, c, ptr)
|
||||
ptr = c
|
||||
|
||||
return Value{typ, ptr, v.flag&^(flagAddr|flagKindMask) | flag(Array)}
|
||||
}
|
||||
|
||||
// convertOp: direct copy
|
||||
func cvtDirect(v Value, typ Type) Value {
|
||||
f := v.flag
|
||||
t := typ.common()
|
||||
ptr := v.ptr
|
||||
if f&flagAddr != 0 {
|
||||
// indirect, mutable word - make a copy
|
||||
c := unsafe_New(t)
|
||||
typedmemmove(t, c, ptr)
|
||||
ptr = c
|
||||
f &^= flagAddr
|
||||
}
|
||||
return Value{t, ptr, v.flag.ro() | f} // v.flag.ro()|f == f?
|
||||
}
|
||||
|
||||
// convertOp: concrete -> interface
|
||||
func cvtT2I(v Value, typ Type) Value {
|
||||
target := unsafe_New(typ.common())
|
||||
x := valueInterface(v, false)
|
||||
if typ.NumMethod() == 0 {
|
||||
*(*any)(target) = x
|
||||
} else {
|
||||
ifaceE2I(typ.common(), x, target)
|
||||
}
|
||||
return Value{typ.common(), target, v.flag.ro() | flagIndir | flag(Interface)}
|
||||
}
|
||||
|
||||
// convertOp: interface -> interface
|
||||
func cvtI2I(v Value, typ Type) Value {
|
||||
if v.IsNil() {
|
||||
ret := Zero(typ)
|
||||
ret.flag |= v.flag.ro()
|
||||
return ret
|
||||
}
|
||||
return cvtT2I(v.Elem(), typ)
|
||||
}
|
||||
|
||||
//go:linkname chancap github.com/goplus/llgo/runtime/internal/runtime.ChanCap
|
||||
func chancap(ch unsafe.Pointer) int
|
||||
|
||||
@@ -2677,6 +3073,5 @@ func MakeMapWithSize(typ Type, n int) Value {
|
||||
return Value{t, m, flag(Map)}
|
||||
}
|
||||
|
||||
func ifaceE2I(t *abi.Type, src any, dst unsafe.Pointer) {
|
||||
panic("todo: reflect.ifaceE2I")
|
||||
}
|
||||
//go:linkname ifaceE2I github.com/goplus/llgo/runtime/internal/runtime.IfaceE2I
|
||||
func ifaceE2I(t *abi.Type, src any, dst unsafe.Pointer)
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/goplus/llgo/runtime/abi"
|
||||
)
|
||||
|
||||
// A boundsError represents an indexing or slicing operation gone wrong.
|
||||
type boundsError struct {
|
||||
x int64
|
||||
@@ -114,3 +120,54 @@ func itoa(buf []byte, val uint64) []byte {
|
||||
func PanicSliceConvert(x int, y int) {
|
||||
panic(boundsError{x: int64(x), signed: true, y: y, code: boundsConvert})
|
||||
}
|
||||
|
||||
// A TypeAssertionError explains a failed type assertion.
|
||||
type TypeAssertionError struct {
|
||||
_interface *_type
|
||||
concrete *_type
|
||||
asserted *_type
|
||||
missingMethod string // one method needed by Interface, missing from Concrete
|
||||
}
|
||||
|
||||
func (*TypeAssertionError) RuntimeError() {}
|
||||
|
||||
func (e *TypeAssertionError) Error() string {
|
||||
inter := "interface"
|
||||
if e._interface != nil {
|
||||
inter = e._interface.String()
|
||||
}
|
||||
as := e.asserted.String()
|
||||
if e.concrete == nil {
|
||||
return "interface conversion: " + inter + " is nil, not " + as
|
||||
}
|
||||
cs := e.concrete.String()
|
||||
if e.missingMethod == "" {
|
||||
msg := "interface conversion: " + inter + " is " + cs + ", not " + as
|
||||
if cs == as {
|
||||
// provide slightly clearer error message
|
||||
if pkgpath(e.concrete) != pkgpath(e.asserted) {
|
||||
msg += " (types from different packages)"
|
||||
} else {
|
||||
msg += " (types from different scopes)"
|
||||
}
|
||||
}
|
||||
return msg
|
||||
}
|
||||
return "interface conversion: " + cs + " is not " + as +
|
||||
": missing method " + e.missingMethod
|
||||
}
|
||||
|
||||
func pkgpath(t *_type) string {
|
||||
if u := t.Uncommon(); u != nil {
|
||||
return u.PkgPath_
|
||||
}
|
||||
switch t.Kind() {
|
||||
case abi.Struct:
|
||||
st := (*structtype)(unsafe.Pointer(t))
|
||||
return st.PkgPath_
|
||||
case abi.Interface:
|
||||
it := (*interfacetype)(unsafe.Pointer(t))
|
||||
return it.PkgPath_
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/goplus/llgo/runtime/abi"
|
||||
c "github.com/goplus/llgo/runtime/internal/clite"
|
||||
"github.com/goplus/llgo/runtime/internal/clite/pthread/sync"
|
||||
)
|
||||
|
||||
type eface struct {
|
||||
@@ -306,11 +307,50 @@ func Interface(pkgPath string, methods []Imethod) *InterfaceType {
|
||||
return ret
|
||||
}
|
||||
|
||||
var itabTable struct {
|
||||
mutex
|
||||
entries []*Itab
|
||||
}
|
||||
|
||||
type mutex sync.Mutex
|
||||
|
||||
func (m *mutex) Lock() {
|
||||
if *(*c.Long)(unsafe.Pointer(m)) == 0 {
|
||||
(*sync.Mutex)(m).Init(nil)
|
||||
}
|
||||
(*sync.Mutex)(m).Lock()
|
||||
}
|
||||
|
||||
func (m *mutex) Unlock() {
|
||||
(*sync.Mutex)(m).Unlock()
|
||||
}
|
||||
|
||||
func findItab(inter *InterfaceType, typ *Type) *Itab {
|
||||
itabTable.Lock()
|
||||
for _, i := range itabTable.entries {
|
||||
if i.inter == inter && i._type == typ {
|
||||
itabTable.Unlock()
|
||||
return i
|
||||
}
|
||||
}
|
||||
itabTable.Unlock()
|
||||
return nil
|
||||
}
|
||||
|
||||
func addItab(i *Itab) {
|
||||
itabTable.Lock()
|
||||
itabTable.entries = append(itabTable.entries, i)
|
||||
itabTable.Unlock()
|
||||
}
|
||||
|
||||
// NewItab returns a new itab.
|
||||
func NewItab(inter *InterfaceType, typ *Type) *Itab {
|
||||
if typ == nil {
|
||||
return nil
|
||||
}
|
||||
if i := findItab(inter, typ); i != nil {
|
||||
return i
|
||||
}
|
||||
n := len(inter.Methods)
|
||||
size := itabHdrSize + uintptr(n)*pointerSize
|
||||
ptr := AllocU(size)
|
||||
@@ -335,6 +375,9 @@ func NewItab(inter *InterfaceType, typ *Type) *Itab {
|
||||
*c.Advance(data, i) = uintptr(fn)
|
||||
}
|
||||
}
|
||||
if ret.fun[0] != 0 {
|
||||
addItab(ret)
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
@@ -632,4 +675,41 @@ func shallowHashTuple(tuple []*Type) uint32 {
|
||||
return hash
|
||||
}
|
||||
|
||||
func assertE2I(inter *interfacetype, t *_type) *itab {
|
||||
if t == nil {
|
||||
// explicit conversions require non-nil interface value.
|
||||
panic(&TypeAssertionError{nil, nil, &inter.Type, ""})
|
||||
}
|
||||
return getitab(inter, t, false)
|
||||
}
|
||||
|
||||
func IfaceE2I(inter *interfacetype, e eface, dst *iface) {
|
||||
*dst = iface{assertE2I(inter, e._type), e.data}
|
||||
}
|
||||
|
||||
func getitab(inter *interfacetype, typ *_type, canfail bool) *itab {
|
||||
if len(inter.Methods) == 0 {
|
||||
panic("internal error - misuse of itab")
|
||||
}
|
||||
|
||||
// easy case
|
||||
if typ.TFlag&abi.TFlagUncommon == 0 {
|
||||
if canfail {
|
||||
return nil
|
||||
}
|
||||
name := inter.Methods[0].Name()
|
||||
panic(&TypeAssertionError{nil, typ, &inter.Type, name})
|
||||
}
|
||||
|
||||
m := NewItab(inter, typ)
|
||||
|
||||
if m.fun[0] != 0 {
|
||||
return m
|
||||
}
|
||||
if canfail {
|
||||
return nil
|
||||
}
|
||||
panic(&TypeAssertionError{concrete: typ, asserted: &inter.Type, missingMethod: ""})
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -235,7 +235,7 @@ func newPointer(elem *Type) *Type {
|
||||
Hash: 9067 + 2*elem.Hash,
|
||||
Align_: pointerAlign,
|
||||
FieldAlign_: pointerAlign,
|
||||
Kind_: uint8(abi.Pointer),
|
||||
Kind_: uint8(abi.Pointer) | abi.KindDirectIface,
|
||||
Equal: memequalptr,
|
||||
TFlag: abi.TFlagRegularMemory,
|
||||
},
|
||||
@@ -255,7 +255,7 @@ func setPointer(ptr *abi.PtrType, elem *Type) {
|
||||
ptr.Hash = uint32(abi.Pointer) // TODO(xsw): hash
|
||||
ptr.Align_ = pointerAlign
|
||||
ptr.FieldAlign_ = pointerAlign
|
||||
ptr.Kind_ = uint8(abi.Pointer)
|
||||
ptr.Kind_ = uint8(abi.Pointer) | abi.KindDirectIface
|
||||
ptr.Equal = memequalptr
|
||||
ptr.Elem = elem
|
||||
ptr.Str_ = elem.Str_
|
||||
|
||||
Reference in New Issue
Block a user