From 0c321c8c9869de73d2ae0e210df5b400296ca154 Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 13 Jun 2024 09:40:41 +0800 Subject: [PATCH 1/2] ssa: binop equal(func,slice,array,struct) and buildConstStr --- cl/_testdata/print/out.ll | 244 +-- cl/_testdata/utf8/out.ll | 5 +- cl/_testdata/vargs/out.ll | 16 +- cl/_testgo/equal/in.go | 87 ++ cl/_testgo/equal/out.ll | 821 ++++++++++ cl/_testgo/errors/out.ll | 33 +- cl/_testgo/goroutine/out.ll | 4 +- cl/_testgo/ifaceconv/out.ll | 131 +- cl/_testgo/ifaceprom/out.ll | 574 ++++--- cl/_testgo/interface/out.ll | 83 +- cl/_testgo/invoke/out.ll | 1075 ++++++------- cl/_testgo/reader/out.ll | 2877 +++++++++++++++++------------------ cl/_testgo/strucintf/out.ll | 171 ++- cl/_testgo/struczero/out.ll | 448 +++--- cl/_testrt/allocstr/out.ll | 2 +- cl/_testrt/any/out.ll | 53 +- cl/_testrt/builtin/out.ll | 81 +- cl/_testrt/cast/out.ll | 38 +- cl/_testrt/concat/out.ll | 22 +- cl/_testrt/eface/out.ll | 543 ++++--- cl/_testrt/index/out.ll | 5 +- cl/_testrt/linkname/out.ll | 2 +- cl/_testrt/panic/out.ll | 2 +- internal/runtime/z_face.go | 14 +- ssa/abitype.go | 9 + ssa/expr.go | 81 +- ssa/package.go | 4 +- 27 files changed, 4226 insertions(+), 3199 deletions(-) create mode 100644 cl/_testgo/equal/in.go create mode 100644 cl/_testgo/equal/out.ll diff --git a/cl/_testdata/print/out.ll b/cl/_testdata/print/out.ll index 1744b3f4..b2c17ed3 100644 --- a/cl/_testdata/print/out.ll +++ b/cl/_testdata/print/out.ll @@ -13,13 +13,13 @@ source_filename = "main" @0 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @__llgo_argc = global ptr null @__llgo_argv = global ptr null -@1 = private unnamed_addr constant [5 x i8] c"llgo\00", align 1 +@1 = private unnamed_addr constant [4 x i8] c"llgo", align 1 @_llgo_float32 = linkonce global ptr null @_llgo_float64 = linkonce global ptr null -@2 = private unnamed_addr constant [11 x i8] c"check bool\00", align 1 +@2 = private unnamed_addr constant [10 x i8] c"check bool", align 1 @_llgo_string = linkonce global ptr null @_llgo_bool = linkonce global ptr null -@3 = private unnamed_addr constant [9 x i8] c"check &^\00", align 1 +@3 = private unnamed_addr constant [8 x i8] c"check &^", align 1 @_llgo_int32 = linkonce global ptr null @_llgo_int8 = linkonce global ptr null @_llgo_int16 = linkonce global ptr null @@ -30,18 +30,16 @@ source_filename = "main" @_llgo_uint32 = linkonce global ptr null @_llgo_uint64 = linkonce global ptr null @_llgo_uintptr = linkonce global ptr null -@4 = private unnamed_addr constant [5 x i8] c"llgo\00", align 1 @_llgo_uint = linkonce global ptr null -@5 = private unnamed_addr constant [5 x i8] c"true\00", align 1 -@6 = private unnamed_addr constant [6 x i8] c"false\00", align 1 -@7 = private unnamed_addr constant [4 x i8] c"NaN\00", align 1 -@8 = private unnamed_addr constant [5 x i8] c"+Inf\00", align 1 -@9 = private unnamed_addr constant [5 x i8] c"-Inf\00", align 1 -@10 = private unnamed_addr constant [17 x i8] c"0123456789abcdef\00", align 1 -@11 = private unnamed_addr constant [2 x i8] c"-\00", align 1 -@12 = private unnamed_addr constant [2 x i8] c" \00", align 1 -@13 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 -@14 = private unnamed_addr constant [2 x i8] c" \00", align 1 +@4 = private unnamed_addr constant [4 x i8] c"true", align 1 +@5 = private unnamed_addr constant [5 x i8] c"false", align 1 +@6 = private unnamed_addr constant [3 x i8] c"NaN", align 1 +@7 = private unnamed_addr constant [4 x i8] c"+Inf", align 1 +@8 = private unnamed_addr constant [4 x i8] c"-Inf", align 1 +@9 = private unnamed_addr constant [16 x i8] c"0123456789abcdef", align 1 +@10 = private unnamed_addr constant [1 x i8] c"-", align 1 +@11 = private unnamed_addr constant [1 x i8] c" ", align 1 +@12 = private unnamed_addr constant [1 x i8] c"\0A", align 1 define %"github.com/goplus/llgo/internal/runtime.Slice" @main.bytes(%"github.com/goplus/llgo/internal/runtime.String" %0) { _llgo_0: @@ -444,7 +442,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_3, %219 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %83, i64 15 %220 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %221 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %220, i32 0, i32 0 - store ptr @4, ptr %221, align 8 + store ptr @1, ptr %221, align 8 %222 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %220, i32 0, i32 1 store i64 4, ptr %222, align 4 %223 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %220, align 8 @@ -1056,7 +1054,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %1 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %2 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %1, i32 0, i32 0 - store ptr @5, ptr %2, align 8 + store ptr @4, ptr %2, align 8 %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %1, i32 0, i32 1 store i64 4, ptr %3, align 4 %4 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %1, align 8 @@ -1069,7 +1067,7 @@ _llgo_2: ; preds = %_llgo_3, %_llgo_1 _llgo_3: ; preds = %_llgo_0 %5 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %5, i32 0, i32 0 - store ptr @6, ptr %6, align 8 + store ptr @5, ptr %6, align 8 %7 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %5, i32 0, i32 1 store i64 5, ptr %7, align 4 %8 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %5, align 8 @@ -1085,7 +1083,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %2 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i32 0, i32 0 - store ptr @7, ptr %3, align 8 + store ptr @6, ptr %3, align 8 %4 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i32 0, i32 1 store i64 3, ptr %4, align 4 %5 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %2, align 8 @@ -1095,7 +1093,7 @@ _llgo_1: ; preds = %_llgo_0 _llgo_2: ; preds = %_llgo_7 %6 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %7 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %6, i32 0, i32 0 - store ptr @8, ptr %7, align 8 + store ptr @7, ptr %7, align 8 %8 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %6, i32 0, i32 1 store i64 4, ptr %8, align 4 %9 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %6, align 8 @@ -1110,7 +1108,7 @@ _llgo_3: ; preds = %_llgo_0 _llgo_4: ; preds = %_llgo_10 %12 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %13 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %12, i32 0, i32 0 - store ptr @9, ptr %13, align 8 + store ptr @8, ptr %13, align 8 %14 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %12, i32 0, i32 1 store i64 4, ptr %14, align 4 %15 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %12, align 8 @@ -1296,7 +1294,7 @@ _llgo_1: ; preds = %_llgo_3 %2 = urem i64 %20, 16 %3 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %4 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %3, i32 0, i32 0 - store ptr @10, ptr %4, align 8 + store ptr @9, ptr %4, align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %3, i32 0, i32 1 store i64 16, ptr %5, align 4 %6 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %3, align 8 @@ -1351,7 +1349,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %2 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i32 0, i32 0 - store ptr @11, ptr %3, align 8 + store ptr @10, ptr %3, align 8 %4 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i32 0, i32 1 store i64 1, ptr %4, align 4 %5 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %2, align 8 @@ -1392,7 +1390,7 @@ _llgo_3: ; preds = %_llgo_1 _llgo_4: ; preds = %_llgo_2 %10 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %11 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %10, i32 0, i32 0 - store ptr @12, ptr %11, align 8 + store ptr @11, ptr %11, align 8 %12 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %10, i32 0, i32 1 store i64 1, ptr %12, align 4 %13 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %10, align 8 @@ -1408,7 +1406,7 @@ define void @main.printnl() { _llgo_0: %0 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %1 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %0, i32 0, i32 0 - store ptr @13, ptr %1, align 8 + store ptr @12, ptr %1, align 8 %2 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %0, i32 0, i32 1 store i64 1, ptr %2, align 4 %3 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %0, align 8 @@ -1420,7 +1418,7 @@ define void @main.printsp() { _llgo_0: %0 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %1 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %0, i32 0, i32 0 - store ptr @14, ptr %1, align 8 + store ptr @11, ptr %1, align 8 %2 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %0, i32 0, i32 1 store i64 1, ptr %2, align 4 %3 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %0, align 8 @@ -1505,146 +1503,202 @@ _llgo_1: ; preds = %_llgo_0 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 - %3 = load ptr, ptr @_llgo_float64, align 8 - %4 = icmp eq ptr %3, null - br i1 %4, label %_llgo_3, label %_llgo_4 + %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %2, i32 0, i32 6 + %4 = load i8, ptr %3, align 1 + %5 = or i8 %4, 32 + store i8 %5, ptr %3, align 1 + %6 = load ptr, ptr @_llgo_float64, align 8 + %7 = icmp eq ptr %6, null + br i1 %7, label %_llgo_3, label %_llgo_4 _llgo_3: ; preds = %_llgo_2 - %5 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 14) - store ptr %5, ptr @_llgo_float64, align 8 + %8 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 14) + store ptr %8, ptr @_llgo_float64, align 8 br label %_llgo_4 _llgo_4: ; preds = %_llgo_3, %_llgo_2 - %6 = load ptr, ptr @_llgo_string, align 8 - %7 = icmp eq ptr %6, null - br i1 %7, label %_llgo_5, label %_llgo_6 + %9 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %8, i32 0, i32 6 + %10 = load i8, ptr %9, align 1 + %11 = or i8 %10, 32 + store i8 %11, ptr %9, align 1 + %12 = load ptr, ptr @_llgo_string, 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/internal/runtime.Basic"(i64 24) - store ptr %8, ptr @_llgo_string, align 8 + %14 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24) + store ptr %14, ptr @_llgo_string, align 8 br label %_llgo_6 _llgo_6: ; preds = %_llgo_5, %_llgo_4 - %9 = load ptr, ptr @_llgo_bool, align 8 - %10 = icmp eq ptr %9, null - br i1 %10, label %_llgo_7, label %_llgo_8 + %15 = load ptr, ptr @_llgo_bool, align 8 + %16 = icmp eq ptr %15, null + br i1 %16, label %_llgo_7, label %_llgo_8 _llgo_7: ; preds = %_llgo_6 - %11 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 1) - store ptr %11, ptr @_llgo_bool, align 8 + %17 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 1) + store ptr %17, ptr @_llgo_bool, align 8 br label %_llgo_8 _llgo_8: ; preds = %_llgo_7, %_llgo_6 - %12 = load ptr, ptr @_llgo_int32, align 8 - %13 = icmp eq ptr %12, null - br i1 %13, label %_llgo_9, label %_llgo_10 + %18 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %17, i32 0, i32 6 + %19 = load i8, ptr %18, align 1 + %20 = or i8 %19, 32 + store i8 %20, ptr %18, align 1 + %21 = load ptr, ptr @_llgo_int32, align 8 + %22 = icmp eq ptr %21, null + br i1 %22, label %_llgo_9, label %_llgo_10 _llgo_9: ; preds = %_llgo_8 - %14 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 5) - store ptr %14, ptr @_llgo_int32, align 8 + %23 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 5) + store ptr %23, ptr @_llgo_int32, align 8 br label %_llgo_10 _llgo_10: ; preds = %_llgo_9, %_llgo_8 - %15 = load ptr, ptr @_llgo_int8, align 8 - %16 = icmp eq ptr %15, null - br i1 %16, label %_llgo_11, label %_llgo_12 + %24 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %23, i32 0, i32 6 + %25 = load i8, ptr %24, align 1 + %26 = or i8 %25, 32 + store i8 %26, ptr %24, align 1 + %27 = load ptr, ptr @_llgo_int8, align 8 + %28 = icmp eq ptr %27, null + br i1 %28, label %_llgo_11, label %_llgo_12 _llgo_11: ; preds = %_llgo_10 - %17 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 3) - store ptr %17, ptr @_llgo_int8, align 8 + %29 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 3) + store ptr %29, ptr @_llgo_int8, align 8 br label %_llgo_12 _llgo_12: ; preds = %_llgo_11, %_llgo_10 - %18 = load ptr, ptr @_llgo_int16, align 8 - %19 = icmp eq ptr %18, null - br i1 %19, label %_llgo_13, label %_llgo_14 + %30 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %29, i32 0, i32 6 + %31 = load i8, ptr %30, align 1 + %32 = or i8 %31, 32 + store i8 %32, ptr %30, align 1 + %33 = load ptr, ptr @_llgo_int16, align 8 + %34 = icmp eq ptr %33, null + br i1 %34, label %_llgo_13, label %_llgo_14 _llgo_13: ; preds = %_llgo_12 - %20 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 4) - store ptr %20, ptr @_llgo_int16, align 8 + %35 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 4) + store ptr %35, ptr @_llgo_int16, align 8 br label %_llgo_14 _llgo_14: ; preds = %_llgo_13, %_llgo_12 - %21 = load ptr, ptr @_llgo_int64, align 8 - %22 = icmp eq ptr %21, null - br i1 %22, label %_llgo_15, label %_llgo_16 + %36 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %35, i32 0, i32 6 + %37 = load i8, ptr %36, align 1 + %38 = or i8 %37, 32 + store i8 %38, ptr %36, align 1 + %39 = load ptr, ptr @_llgo_int64, align 8 + %40 = icmp eq ptr %39, null + br i1 %40, label %_llgo_15, label %_llgo_16 _llgo_15: ; preds = %_llgo_14 - %23 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 6) - store ptr %23, ptr @_llgo_int64, align 8 + %41 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 6) + store ptr %41, ptr @_llgo_int64, align 8 br label %_llgo_16 _llgo_16: ; preds = %_llgo_15, %_llgo_14 - %24 = load ptr, ptr @_llgo_int, align 8 - %25 = icmp eq ptr %24, null - br i1 %25, label %_llgo_17, label %_llgo_18 + %42 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %41, i32 0, i32 6 + %43 = load i8, ptr %42, align 1 + %44 = or i8 %43, 32 + store i8 %44, ptr %42, align 1 + %45 = load ptr, ptr @_llgo_int, align 8 + %46 = icmp eq ptr %45, null + br i1 %46, label %_llgo_17, label %_llgo_18 _llgo_17: ; preds = %_llgo_16 - %26 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 2) - store ptr %26, ptr @_llgo_int, align 8 + %47 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 2) + store ptr %47, ptr @_llgo_int, align 8 br label %_llgo_18 _llgo_18: ; preds = %_llgo_17, %_llgo_16 - %27 = load ptr, ptr @_llgo_uint8, align 8 - %28 = icmp eq ptr %27, null - br i1 %28, label %_llgo_19, label %_llgo_20 + %48 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %47, i32 0, i32 6 + %49 = load i8, ptr %48, align 1 + %50 = or i8 %49, 32 + store i8 %50, ptr %48, align 1 + %51 = load ptr, ptr @_llgo_uint8, align 8 + %52 = icmp eq ptr %51, null + br i1 %52, label %_llgo_19, label %_llgo_20 _llgo_19: ; preds = %_llgo_18 - %29 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 8) - store ptr %29, ptr @_llgo_uint8, align 8 + %53 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 8) + store ptr %53, ptr @_llgo_uint8, align 8 br label %_llgo_20 _llgo_20: ; preds = %_llgo_19, %_llgo_18 - %30 = load ptr, ptr @_llgo_uint16, align 8 - %31 = icmp eq ptr %30, null - br i1 %31, label %_llgo_21, label %_llgo_22 + %54 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %53, i32 0, i32 6 + %55 = load i8, ptr %54, align 1 + %56 = or i8 %55, 32 + store i8 %56, ptr %54, align 1 + %57 = load ptr, ptr @_llgo_uint16, align 8 + %58 = icmp eq ptr %57, null + br i1 %58, label %_llgo_21, label %_llgo_22 _llgo_21: ; preds = %_llgo_20 - %32 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 9) - store ptr %32, ptr @_llgo_uint16, align 8 + %59 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 9) + store ptr %59, ptr @_llgo_uint16, align 8 br label %_llgo_22 _llgo_22: ; preds = %_llgo_21, %_llgo_20 - %33 = load ptr, ptr @_llgo_uint32, align 8 - %34 = icmp eq ptr %33, null - br i1 %34, label %_llgo_23, label %_llgo_24 + %60 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %59, i32 0, i32 6 + %61 = load i8, ptr %60, align 1 + %62 = or i8 %61, 32 + store i8 %62, ptr %60, align 1 + %63 = load ptr, ptr @_llgo_uint32, align 8 + %64 = icmp eq ptr %63, null + br i1 %64, label %_llgo_23, label %_llgo_24 _llgo_23: ; preds = %_llgo_22 - %35 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 10) - store ptr %35, ptr @_llgo_uint32, align 8 + %65 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 10) + store ptr %65, ptr @_llgo_uint32, align 8 br label %_llgo_24 _llgo_24: ; preds = %_llgo_23, %_llgo_22 - %36 = load ptr, ptr @_llgo_uint64, align 8 - %37 = icmp eq ptr %36, null - br i1 %37, label %_llgo_25, label %_llgo_26 + %66 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %65, i32 0, i32 6 + %67 = load i8, ptr %66, align 1 + %68 = or i8 %67, 32 + store i8 %68, ptr %66, align 1 + %69 = load ptr, ptr @_llgo_uint64, align 8 + %70 = icmp eq ptr %69, null + br i1 %70, label %_llgo_25, label %_llgo_26 _llgo_25: ; preds = %_llgo_24 - %38 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 11) - store ptr %38, ptr @_llgo_uint64, align 8 + %71 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 11) + store ptr %71, ptr @_llgo_uint64, align 8 br label %_llgo_26 _llgo_26: ; preds = %_llgo_25, %_llgo_24 - %39 = load ptr, ptr @_llgo_uintptr, align 8 - %40 = icmp eq ptr %39, null - br i1 %40, label %_llgo_27, label %_llgo_28 + %72 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %71, i32 0, i32 6 + %73 = load i8, ptr %72, align 1 + %74 = or i8 %73, 32 + store i8 %74, ptr %72, align 1 + %75 = load ptr, ptr @_llgo_uintptr, align 8 + %76 = icmp eq ptr %75, null + br i1 %76, label %_llgo_27, label %_llgo_28 _llgo_27: ; preds = %_llgo_26 - %41 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 12) - store ptr %41, ptr @_llgo_uintptr, align 8 + %77 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 12) + store ptr %77, ptr @_llgo_uintptr, align 8 br label %_llgo_28 _llgo_28: ; preds = %_llgo_27, %_llgo_26 - %42 = load ptr, ptr @_llgo_uint, align 8 - %43 = icmp eq ptr %42, null - br i1 %43, label %_llgo_29, label %_llgo_30 + %78 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %77, i32 0, i32 6 + %79 = load i8, ptr %78, align 1 + %80 = or i8 %79, 32 + store i8 %80, ptr %78, align 1 + %81 = load ptr, ptr @_llgo_uint, align 8 + %82 = icmp eq ptr %81, null + br i1 %82, label %_llgo_29, label %_llgo_30 _llgo_29: ; preds = %_llgo_28 - %44 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 7) - store ptr %44, ptr @_llgo_uint, align 8 + %83 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 7) + store ptr %83, ptr @_llgo_uint, align 8 br label %_llgo_30 _llgo_30: ; preds = %_llgo_29, %_llgo_28 + %84 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %83, i32 0, i32 6 + %85 = load i8, ptr %84, align 1 + %86 = or i8 %85, 32 + store i8 %86, ptr %84, align 1 ret void } diff --git a/cl/_testdata/utf8/out.ll b/cl/_testdata/utf8/out.ll index e24d991d..a8fe27ab 100644 --- a/cl/_testdata/utf8/out.ll +++ b/cl/_testdata/utf8/out.ll @@ -7,8 +7,7 @@ source_filename = "main" @"main.init$guard" = global ptr null @__llgo_argc = global ptr null @__llgo_argv = global ptr null -@0 = private unnamed_addr constant [8 x i8] c"\E4\B8\ADabcd\00", align 1 -@1 = private unnamed_addr constant [8 x i8] c"\E4\B8\ADabcd\00", align 1 +@0 = private unnamed_addr constant [7 x i8] c"\E4\B8\ADabcd", align 1 define i8 @main.index(i8 %0) { _llgo_0: @@ -53,7 +52,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_3 %2 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i32 0, i32 0 - store ptr @1, ptr %3, align 8 + store ptr @0, ptr %3, align 8 %4 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i32 0, i32 1 store i64 7, ptr %4, align 4 %5 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %2, align 8 diff --git a/cl/_testdata/vargs/out.ll b/cl/_testdata/vargs/out.ll index e3e2b1e3..a5623c91 100644 --- a/cl/_testdata/vargs/out.ll +++ b/cl/_testdata/vargs/out.ll @@ -11,7 +11,7 @@ source_filename = "main" @__llgo_argv = global ptr null @_llgo_int = linkonce global ptr null @0 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 -@1 = private unnamed_addr constant [22 x i8] c"type assertion failed\00", align 1 +@1 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1 @_llgo_string = linkonce global ptr null define void @main.init() { @@ -153,13 +153,17 @@ _llgo_1: ; preds = %_llgo_0 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 - %3 = load ptr, ptr @_llgo_string, align 8 - %4 = icmp eq ptr %3, null - br i1 %4, label %_llgo_3, label %_llgo_4 + %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %2, i32 0, i32 6 + %4 = load i8, ptr %3, align 1 + %5 = or i8 %4, 32 + store i8 %5, ptr %3, align 1 + %6 = load ptr, ptr @_llgo_string, align 8 + %7 = icmp eq ptr %6, null + br i1 %7, label %_llgo_3, label %_llgo_4 _llgo_3: ; preds = %_llgo_2 - %5 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24) - store ptr %5, ptr @_llgo_string, align 8 + %8 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24) + store ptr %8, ptr @_llgo_string, align 8 br label %_llgo_4 _llgo_4: ; preds = %_llgo_3, %_llgo_2 diff --git a/cl/_testgo/equal/in.go b/cl/_testgo/equal/in.go new file mode 100644 index 00000000..fdd87293 --- /dev/null +++ b/cl/_testgo/equal/in.go @@ -0,0 +1,87 @@ +package main + +func test() {} + +// func +func init() { + fn1 := test + fn2 := func(i, j int) int { return i + j } + var n int + fn3 := func() { println(n) } + var fn4 func() int + assert(test != nil) + assert(fn1 != nil) + assert(fn2 != nil) + assert(fn3 != nil) + assert(fn4 == nil) +} + +// array +func init() { + assert([0]float64{} == [0]float64{}) + ar1 := [...]int{1, 2, 3} + ar2 := [...]int{1, 2, 3} + assert(ar1 == ar2) + ar2[1] = 1 + assert(ar1 != ar2) +} + +type T struct { + X int + Y int + Z string + V any +} + +type N struct{} + +// struct +func init() { + var n1, n2 N + var t1, t2 T + x := T{10, 20, "hello", 1} + y := T{10, 20, "hello", 1} + z := T{10, 20, "hello", "ok"} + assert(n1 == n2) + assert(t1 == t2) + assert(x == y) + assert(x != z) + assert(y != z) +} + +// slice +func init() { + var a []int + var b = []int{1, 2, 3} + c := make([]int, 2) + d := make([]int, 0, 2) + assert(a == nil) + assert(b != nil) + assert(c != nil) + assert(d != nil) + b = nil + assert(b == nil) +} + +// iface +func init() { + var a any = 100 + var b any = struct{}{} + var c any = T{10, 20, "hello", 1} + x := T{10, 20, "hello", 1} + y := T{10, 20, "hello", "ok"} + assert(a == 100) + assert(b == struct{}{}) + assert(b != N{}) + assert(c == x) + assert(c != y) +} + +func assert(cond bool) { + if !cond { + panic("failed") + } +} + +func main() { +} diff --git a/cl/_testgo/equal/out.ll b/cl/_testgo/equal/out.ll new file mode 100644 index 00000000..afa3ea1d --- /dev/null +++ b/cl/_testgo/equal/out.ll @@ -0,0 +1,821 @@ +; ModuleID = 'main' +source_filename = "main" + +%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } +%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr } +%main.T = type { i64, i64, %"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.eface" } +%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } +%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 } +%main.N = type {} +%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 } + +@"main.init$guard" = global ptr null +@0 = private unnamed_addr constant [6 x i8] c"failed", align 1 +@_llgo_string = linkonce global ptr null +@1 = private unnamed_addr constant [5 x i8] c"hello", align 1 +@_llgo_int = linkonce global ptr null +@2 = private unnamed_addr constant [2 x i8] c"ok", align 1 +@"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null +@3 = private unnamed_addr constant [4 x i8] c"main", align 1 +@_llgo_main.T = linkonce global ptr null +@"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk" = linkonce global ptr null +@_llgo_any = linkonce global ptr null +@4 = private unnamed_addr constant [1 x i8] c"X", align 1 +@5 = private unnamed_addr constant [1 x i8] c"Y", align 1 +@6 = private unnamed_addr constant [1 x i8] c"Z", align 1 +@7 = private unnamed_addr constant [1 x i8] c"V", align 1 +@8 = private unnamed_addr constant [6 x i8] c"main.T", align 1 +@_llgo_main.N = linkonce global ptr null +@9 = private unnamed_addr constant [6 x i8] c"main.N", align 1 +@__llgo_argc = global ptr null +@__llgo_argv = global ptr null + +define void @main.assert(i1 %0) { +_llgo_0: + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + %1 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %2 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %1, i32 0, i32 0 + store ptr @0, ptr %2, align 8 + %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %1, i32 0, i32 1 + store i64 6, ptr %3, align 4 + %4 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %1, align 8 + %5 = load ptr, ptr @_llgo_string, align 8 + %6 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %4, ptr %6, align 8 + %7 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %8 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %7, i32 0, i32 0 + store ptr %5, ptr %8, align 8 + %9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %7, i32 0, i32 1 + store ptr %6, ptr %9, align 8 + %10 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %7, align 8 + call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %10) + unreachable + +_llgo_2: ; preds = %_llgo_0 + ret void +} + +define void @main.init() { +_llgo_0: + %0 = load i1, ptr @"main.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"main.init$guard", align 1 + call void @"main.init$after"() + call void @"main.init#1"() + call void @"main.init#2"() + call void @"main.init#3"() + call void @"main.init#4"() + call void @"main.init#5"() + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"main.init#1"() { +_llgo_0: + %0 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8) + %1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) + %2 = getelementptr inbounds { ptr }, ptr %1, i32 0, i32 0 + store ptr %0, ptr %2, align 8 + %3 = alloca { ptr, ptr }, align 8 + %4 = getelementptr inbounds { ptr, ptr }, ptr %3, i32 0, i32 0 + store ptr @"main.init#1$2", ptr %4, align 8 + %5 = getelementptr inbounds { ptr, ptr }, ptr %3, i32 0, i32 1 + store ptr %1, ptr %5, align 8 + %6 = load { ptr, ptr }, ptr %3, align 8 + call void @main.assert(i1 true) + call void @main.assert(i1 true) + call void @main.assert(i1 true) + %7 = extractvalue { ptr, ptr } %6, 0 + %8 = icmp ne ptr %7, null + call void @main.assert(i1 %8) + call void @main.assert(i1 true) + ret void +} + +define void @"main.init#2"() { +_llgo_0: + call void @main.assert(i1 true) + %0 = alloca [3 x i64], align 8 + %1 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %0, i64 24) + %2 = getelementptr inbounds i64, ptr %1, i64 0 + %3 = getelementptr inbounds i64, ptr %1, i64 1 + %4 = getelementptr inbounds i64, ptr %1, i64 2 + store i64 1, ptr %2, align 4 + store i64 2, ptr %3, align 4 + store i64 3, ptr %4, align 4 + %5 = alloca [3 x i64], align 8 + %6 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %5, i64 24) + %7 = getelementptr inbounds i64, ptr %6, i64 0 + %8 = getelementptr inbounds i64, ptr %6, i64 1 + %9 = getelementptr inbounds i64, ptr %6, i64 2 + store i64 1, ptr %7, align 4 + store i64 2, ptr %8, align 4 + store i64 3, ptr %9, align 4 + %10 = load [3 x i64], ptr %1, align 4 + %11 = load [3 x i64], ptr %6, align 4 + %12 = extractvalue [3 x i64] %10, 0 + %13 = extractvalue [3 x i64] %11, 0 + %14 = icmp eq i64 %12, %13 + %15 = and i1 true, %14 + %16 = extractvalue [3 x i64] %10, 1 + %17 = extractvalue [3 x i64] %11, 1 + %18 = icmp eq i64 %16, %17 + %19 = and i1 %15, %18 + %20 = extractvalue [3 x i64] %10, 2 + %21 = extractvalue [3 x i64] %11, 2 + %22 = icmp eq i64 %20, %21 + %23 = and i1 %19, %22 + call void @main.assert(i1 %23) + %24 = getelementptr inbounds i64, ptr %6, i64 1 + store i64 1, ptr %24, align 4 + %25 = load [3 x i64], ptr %1, align 4 + %26 = load [3 x i64], ptr %6, align 4 + %27 = extractvalue [3 x i64] %25, 0 + %28 = extractvalue [3 x i64] %26, 0 + %29 = icmp eq i64 %27, %28 + %30 = and i1 true, %29 + %31 = extractvalue [3 x i64] %25, 1 + %32 = extractvalue [3 x i64] %26, 1 + %33 = icmp eq i64 %31, %32 + %34 = and i1 %30, %33 + %35 = extractvalue [3 x i64] %25, 2 + %36 = extractvalue [3 x i64] %26, 2 + %37 = icmp eq i64 %35, %36 + %38 = and i1 %34, %37 + %39 = xor i1 %38, true + call void @main.assert(i1 %39) + ret void +} + +define void @"main.init#3"() { +_llgo_0: + %0 = alloca %main.T, align 8 + %1 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %0, i64 48) + %2 = getelementptr inbounds %main.T, ptr %1, i32 0, i32 0 + %3 = getelementptr inbounds %main.T, ptr %1, i32 0, i32 1 + %4 = getelementptr inbounds %main.T, ptr %1, i32 0, i32 2 + %5 = getelementptr inbounds %main.T, ptr %1, i32 0, i32 3 + store i64 10, ptr %2, align 4 + store i64 20, ptr %3, align 4 + %6 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %7 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %6, i32 0, i32 0 + store ptr @1, ptr %7, align 8 + %8 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %6, i32 0, i32 1 + store i64 5, ptr %8, align 4 + %9 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %6, align 8 + store %"github.com/goplus/llgo/internal/runtime.String" %9, ptr %4, align 8 + %10 = load ptr, ptr @_llgo_int, align 8 + %11 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %10, i32 0, i32 6 + %12 = load i8, ptr %11, align 1 + %13 = or i8 %12, 32 + store i8 %13, ptr %11, align 1 + %14 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %15 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %14, i32 0, i32 0 + store ptr %10, ptr %15, align 8 + %16 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %14, i32 0, i32 1 + store ptr inttoptr (i64 1 to ptr), ptr %16, align 8 + %17 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %14, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %17, ptr %5, align 8 + %18 = alloca %main.T, align 8 + %19 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %18, i64 48) + %20 = getelementptr inbounds %main.T, ptr %19, i32 0, i32 0 + %21 = getelementptr inbounds %main.T, ptr %19, i32 0, i32 1 + %22 = getelementptr inbounds %main.T, ptr %19, i32 0, i32 2 + %23 = getelementptr inbounds %main.T, ptr %19, i32 0, i32 3 + store i64 10, ptr %20, align 4 + store i64 20, ptr %21, align 4 + %24 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %25 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %24, i32 0, i32 0 + store ptr @1, ptr %25, align 8 + %26 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %24, i32 0, i32 1 + store i64 5, ptr %26, align 4 + %27 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %24, align 8 + store %"github.com/goplus/llgo/internal/runtime.String" %27, ptr %22, align 8 + %28 = load ptr, ptr @_llgo_int, align 8 + %29 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %28, i32 0, i32 6 + %30 = load i8, ptr %29, align 1 + %31 = or i8 %30, 32 + store i8 %31, ptr %29, align 1 + %32 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %33 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %32, i32 0, i32 0 + store ptr %28, ptr %33, align 8 + %34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %32, i32 0, i32 1 + store ptr inttoptr (i64 1 to ptr), ptr %34, align 8 + %35 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %32, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %35, ptr %23, align 8 + %36 = alloca %main.T, align 8 + %37 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %36, i64 48) + %38 = getelementptr inbounds %main.T, ptr %37, i32 0, i32 0 + %39 = getelementptr inbounds %main.T, ptr %37, i32 0, i32 1 + %40 = getelementptr inbounds %main.T, ptr %37, i32 0, i32 2 + %41 = getelementptr inbounds %main.T, ptr %37, i32 0, i32 3 + store i64 10, ptr %38, align 4 + store i64 20, ptr %39, align 4 + %42 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %43 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %42, i32 0, i32 0 + store ptr @1, ptr %43, align 8 + %44 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %42, i32 0, i32 1 + store i64 5, ptr %44, align 4 + %45 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %42, align 8 + store %"github.com/goplus/llgo/internal/runtime.String" %45, ptr %40, align 8 + %46 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %47 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %46, i32 0, i32 0 + store ptr @2, ptr %47, align 8 + %48 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %46, i32 0, i32 1 + store i64 2, ptr %48, align 4 + %49 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %46, align 8 + %50 = load ptr, ptr @_llgo_string, align 8 + %51 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %49, ptr %51, align 8 + %52 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %53 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %52, i32 0, i32 0 + store ptr %50, ptr %53, align 8 + %54 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %52, i32 0, i32 1 + store ptr %51, ptr %54, align 8 + %55 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %52, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %55, ptr %41, align 8 + call void @main.assert(i1 true) + %56 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer) + %57 = and i1 true, %56 + %58 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" zeroinitializer, %"github.com/goplus/llgo/internal/runtime.eface" zeroinitializer) + %59 = and i1 %57, %58 + call void @main.assert(i1 %59) + %60 = load %main.T, ptr %1, align 8 + %61 = load %main.T, ptr %19, align 8 + %62 = extractvalue %main.T %60, 0 + %63 = extractvalue %main.T %61, 0 + %64 = icmp eq i64 %62, %63 + %65 = and i1 true, %64 + %66 = extractvalue %main.T %60, 1 + %67 = extractvalue %main.T %61, 1 + %68 = icmp eq i64 %66, %67 + %69 = and i1 %65, %68 + %70 = extractvalue %main.T %60, 2 + %71 = extractvalue %main.T %61, 2 + %72 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %70, %"github.com/goplus/llgo/internal/runtime.String" %71) + %73 = and i1 %69, %72 + %74 = extractvalue %main.T %60, 3 + %75 = extractvalue %main.T %61, 3 + %76 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %74, %"github.com/goplus/llgo/internal/runtime.eface" %75) + %77 = and i1 %73, %76 + call void @main.assert(i1 %77) + %78 = load %main.T, ptr %1, align 8 + %79 = load %main.T, ptr %37, align 8 + %80 = extractvalue %main.T %78, 0 + %81 = extractvalue %main.T %79, 0 + %82 = icmp eq i64 %80, %81 + %83 = and i1 true, %82 + %84 = extractvalue %main.T %78, 1 + %85 = extractvalue %main.T %79, 1 + %86 = icmp eq i64 %84, %85 + %87 = and i1 %83, %86 + %88 = extractvalue %main.T %78, 2 + %89 = extractvalue %main.T %79, 2 + %90 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %88, %"github.com/goplus/llgo/internal/runtime.String" %89) + %91 = and i1 %87, %90 + %92 = extractvalue %main.T %78, 3 + %93 = extractvalue %main.T %79, 3 + %94 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %92, %"github.com/goplus/llgo/internal/runtime.eface" %93) + %95 = and i1 %91, %94 + %96 = xor i1 %95, true + call void @main.assert(i1 %96) + %97 = load %main.T, ptr %19, align 8 + %98 = load %main.T, ptr %37, align 8 + %99 = extractvalue %main.T %97, 0 + %100 = extractvalue %main.T %98, 0 + %101 = icmp eq i64 %99, %100 + %102 = and i1 true, %101 + %103 = extractvalue %main.T %97, 1 + %104 = extractvalue %main.T %98, 1 + %105 = icmp eq i64 %103, %104 + %106 = and i1 %102, %105 + %107 = extractvalue %main.T %97, 2 + %108 = extractvalue %main.T %98, 2 + %109 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %107, %"github.com/goplus/llgo/internal/runtime.String" %108) + %110 = and i1 %106, %109 + %111 = extractvalue %main.T %97, 3 + %112 = extractvalue %main.T %98, 3 + %113 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %111, %"github.com/goplus/llgo/internal/runtime.eface" %112) + %114 = and i1 %110, %113 + %115 = xor i1 %114, true + call void @main.assert(i1 %115) + ret void +} + +define void @"main.init#4"() { +_llgo_0: + %0 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 24) + %1 = getelementptr inbounds i64, ptr %0, i64 0 + store i64 1, ptr %1, align 4 + %2 = getelementptr inbounds i64, ptr %0, i64 1 + store i64 2, ptr %2, align 4 + %3 = getelementptr inbounds i64, ptr %0, i64 2 + store i64 3, ptr %3, align 4 + %4 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %4, i32 0, i32 0 + store ptr %0, ptr %5, align 8 + %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %4, i32 0, i32 1 + store i64 3, ptr %6, align 4 + %7 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %4, i32 0, i32 2 + store i64 3, ptr %7, align 4 + %8 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %4, align 8 + %9 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16) + %10 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %9, i64 8, i64 2, i64 0, i64 2, i64 2) + %11 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16) + %12 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %11, i64 8, i64 2, i64 0, i64 0, i64 2) + call void @main.assert(i1 true) + %13 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %8, 0 + %14 = icmp ne ptr %13, null + call void @main.assert(i1 %14) + %15 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %10, 0 + %16 = icmp ne ptr %15, null + call void @main.assert(i1 %16) + %17 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %12, 0 + %18 = icmp ne ptr %17, null + call void @main.assert(i1 %18) + call void @main.assert(i1 true) + ret void +} + +define void @"main.init#5"() { +_llgo_0: + %0 = load ptr, ptr @_llgo_int, align 8 + %1 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %0, i32 0, i32 6 + %2 = load i8, ptr %1, align 1 + %3 = or i8 %2, 32 + store i8 %3, ptr %1, align 1 + %4 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %4, i32 0, i32 0 + store ptr %0, ptr %5, align 8 + %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %4, i32 0, i32 1 + store ptr inttoptr (i64 100 to ptr), ptr %6, align 8 + %7 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %4, align 8 + %8 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 + %9 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + store {} zeroinitializer, ptr %9, align 1 + %10 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %11 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %10, i32 0, i32 0 + store ptr %8, ptr %11, align 8 + %12 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %10, i32 0, i32 1 + store ptr %9, ptr %12, align 8 + %13 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %10, align 8 + %14 = alloca %main.T, align 8 + %15 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %14, i64 48) + %16 = getelementptr inbounds %main.T, ptr %15, i32 0, i32 0 + %17 = getelementptr inbounds %main.T, ptr %15, i32 0, i32 1 + %18 = getelementptr inbounds %main.T, ptr %15, i32 0, i32 2 + %19 = getelementptr inbounds %main.T, ptr %15, i32 0, i32 3 + store i64 10, ptr %16, align 4 + store i64 20, ptr %17, align 4 + %20 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %21 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %20, i32 0, i32 0 + store ptr @1, ptr %21, align 8 + %22 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %20, i32 0, i32 1 + store i64 5, ptr %22, align 4 + %23 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %20, align 8 + store %"github.com/goplus/llgo/internal/runtime.String" %23, ptr %18, align 8 + %24 = load ptr, ptr @_llgo_int, align 8 + %25 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %24, i32 0, i32 6 + %26 = load i8, ptr %25, align 1 + %27 = or i8 %26, 32 + store i8 %27, ptr %25, align 1 + %28 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %29 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %28, i32 0, i32 0 + store ptr %24, ptr %29, align 8 + %30 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %28, i32 0, i32 1 + store ptr inttoptr (i64 1 to ptr), ptr %30, align 8 + %31 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %28, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %31, ptr %19, align 8 + %32 = load %main.T, ptr %15, align 8 + %33 = load ptr, ptr @_llgo_main.T, align 8 + %34 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) + store %main.T %32, ptr %34, align 8 + %35 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %36 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %35, i32 0, i32 0 + store ptr %33, ptr %36, align 8 + %37 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %35, i32 0, i32 1 + store ptr %34, ptr %37, align 8 + %38 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %35, align 8 + %39 = alloca %main.T, align 8 + %40 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %39, i64 48) + %41 = getelementptr inbounds %main.T, ptr %40, i32 0, i32 0 + %42 = getelementptr inbounds %main.T, ptr %40, i32 0, i32 1 + %43 = getelementptr inbounds %main.T, ptr %40, i32 0, i32 2 + %44 = getelementptr inbounds %main.T, ptr %40, i32 0, i32 3 + store i64 10, ptr %41, align 4 + store i64 20, ptr %42, align 4 + %45 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %46 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %45, i32 0, i32 0 + store ptr @1, ptr %46, align 8 + %47 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %45, i32 0, i32 1 + store i64 5, ptr %47, align 4 + %48 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %45, align 8 + store %"github.com/goplus/llgo/internal/runtime.String" %48, ptr %43, align 8 + %49 = load ptr, ptr @_llgo_int, align 8 + %50 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %49, i32 0, i32 6 + %51 = load i8, ptr %50, align 1 + %52 = or i8 %51, 32 + store i8 %52, ptr %50, align 1 + %53 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %54 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %53, i32 0, i32 0 + store ptr %49, ptr %54, align 8 + %55 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %53, i32 0, i32 1 + store ptr inttoptr (i64 1 to ptr), ptr %55, align 8 + %56 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %53, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %56, ptr %44, align 8 + %57 = alloca %main.T, align 8 + %58 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %57, i64 48) + %59 = getelementptr inbounds %main.T, ptr %58, i32 0, i32 0 + %60 = getelementptr inbounds %main.T, ptr %58, i32 0, i32 1 + %61 = getelementptr inbounds %main.T, ptr %58, i32 0, i32 2 + %62 = getelementptr inbounds %main.T, ptr %58, i32 0, i32 3 + store i64 10, ptr %59, align 4 + store i64 20, ptr %60, align 4 + %63 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %64 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %63, i32 0, i32 0 + store ptr @1, ptr %64, align 8 + %65 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %63, i32 0, i32 1 + store i64 5, ptr %65, align 4 + %66 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %63, align 8 + store %"github.com/goplus/llgo/internal/runtime.String" %66, ptr %61, align 8 + %67 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %68 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %67, i32 0, i32 0 + store ptr @2, ptr %68, align 8 + %69 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %67, i32 0, i32 1 + store i64 2, ptr %69, align 4 + %70 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %67, align 8 + %71 = load ptr, ptr @_llgo_string, align 8 + %72 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/internal/runtime.String" %70, ptr %72, align 8 + %73 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %74 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %73, i32 0, i32 0 + store ptr %71, ptr %74, align 8 + %75 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %73, i32 0, i32 1 + store ptr %72, ptr %75, align 8 + %76 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %73, align 8 + store %"github.com/goplus/llgo/internal/runtime.eface" %76, ptr %62, align 8 + %77 = load ptr, ptr @_llgo_int, align 8 + %78 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %77, i32 0, i32 6 + %79 = load i8, ptr %78, align 1 + %80 = or i8 %79, 32 + store i8 %80, ptr %78, align 1 + %81 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %82 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %81, i32 0, i32 0 + store ptr %77, ptr %82, align 8 + %83 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %81, i32 0, i32 1 + store ptr inttoptr (i64 100 to ptr), ptr %83, align 8 + %84 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %81, align 8 + %85 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %7, %"github.com/goplus/llgo/internal/runtime.eface" %84) + call void @main.assert(i1 %85) + %86 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 + %87 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + store {} zeroinitializer, ptr %87, align 1 + %88 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %89 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %88, i32 0, i32 0 + store ptr %86, ptr %89, align 8 + %90 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %88, i32 0, i32 1 + store ptr %87, ptr %90, align 8 + %91 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %88, align 8 + %92 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %13, %"github.com/goplus/llgo/internal/runtime.eface" %91) + call void @main.assert(i1 %92) + %93 = load ptr, ptr @_llgo_main.N, align 8 + %94 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + store %main.N zeroinitializer, ptr %94, align 1 + %95 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %96 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %95, i32 0, i32 0 + store ptr %93, ptr %96, align 8 + %97 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %95, i32 0, i32 1 + store ptr %94, ptr %97, align 8 + %98 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %95, align 8 + %99 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %13, %"github.com/goplus/llgo/internal/runtime.eface" %98) + %100 = xor i1 %99, true + call void @main.assert(i1 %100) + %101 = load %main.T, ptr %40, align 8 + %102 = load ptr, ptr @_llgo_main.T, align 8 + %103 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) + store %main.T %101, ptr %103, align 8 + %104 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %105 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %104, i32 0, i32 0 + store ptr %102, ptr %105, align 8 + %106 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %104, i32 0, i32 1 + store ptr %103, ptr %106, align 8 + %107 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %104, align 8 + %108 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %38, %"github.com/goplus/llgo/internal/runtime.eface" %107) + call void @main.assert(i1 %108) + %109 = load %main.T, ptr %58, align 8 + %110 = load ptr, ptr @_llgo_main.T, align 8 + %111 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) + store %main.T %109, ptr %111, align 8 + %112 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8 + %113 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %112, i32 0, i32 0 + store ptr %110, ptr %113, align 8 + %114 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %112, i32 0, i32 1 + store ptr %111, ptr %114, align 8 + %115 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %112, align 8 + %116 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %38, %"github.com/goplus/llgo/internal/runtime.eface" %115) + %117 = xor i1 %116, true + call void @main.assert(i1 %117) + ret void +} + +define i32 @main(i32 %0, ptr %1) { +_llgo_0: + store i32 %0, ptr @__llgo_argc, align 4 + store ptr %1, ptr @__llgo_argv, align 8 + call void @"github.com/goplus/llgo/internal/runtime.init"() + call void @main.init() + ret i32 0 +} + +define void @main.test() { +_llgo_0: + ret void +} + +define void @"main.init$after"() { +_llgo_0: + %0 = load ptr, ptr @_llgo_string, align 8 + %1 = icmp eq ptr %0, null + br i1 %1, label %_llgo_1, label %_llgo_2 + +_llgo_1: ; preds = %_llgo_0 + %2 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24) + store ptr %2, ptr @_llgo_string, align 8 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + %3 = load ptr, ptr @_llgo_int, 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/internal/runtime.Basic"(i64 2) + store ptr %5, ptr @_llgo_int, align 8 + br label %_llgo_4 + +_llgo_4: ; preds = %_llgo_3, %_llgo_2 + %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %5, i32 0, i32 6 + %7 = load i8, ptr %6, align 1 + %8 = or i8 %7, 32 + store i8 %8, ptr %6, align 1 + %9 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 + %10 = icmp eq ptr %9, null + br i1 %10, label %_llgo_5, label %_llgo_6 + +_llgo_5: ; preds = %_llgo_4 + %11 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %12 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %11, i32 0, i32 0 + store ptr @3, ptr %12, align 8 + %13 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %11, i32 0, i32 1 + store i64 4, ptr %13, align 4 + %14 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %11, align 8 + %15 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + %16 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %17 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %16, i32 0, i32 0 + store ptr %15, ptr %17, align 8 + %18 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %16, i32 0, i32 1 + store i64 0, ptr %18, align 4 + %19 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %16, i32 0, i32 2 + store i64 0, ptr %19, align 4 + %20 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %16, align 8 + %21 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %14, i64 0, %"github.com/goplus/llgo/internal/runtime.Slice" %20) + store ptr %21, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 + br label %_llgo_6 + +_llgo_6: ; preds = %_llgo_5, %_llgo_4 + %22 = load ptr, ptr @_llgo_main.T, align 8 + %23 = icmp eq ptr %22, null + br i1 %23, label %_llgo_7, label %_llgo_8 + +_llgo_7: ; preds = %_llgo_6 + %24 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 0) + store ptr %24, ptr @_llgo_main.T, align 8 + br label %_llgo_8 + +_llgo_8: ; preds = %_llgo_7, %_llgo_6 + %25 = load ptr, ptr @_llgo_int, align 8 + %26 = load ptr, ptr @_llgo_int, align 8 + %27 = load ptr, ptr @_llgo_string, align 8 + %28 = load ptr, ptr @_llgo_any, align 8 + %29 = icmp eq ptr %28, null + br i1 %29, label %_llgo_9, label %_llgo_10 + +_llgo_9: ; preds = %_llgo_8 + %30 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + %31 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %32 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %31, i32 0, i32 0 + store ptr %30, ptr %32, align 8 + %33 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %31, i32 0, i32 1 + store i64 0, ptr %33, align 4 + %34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %31, i32 0, i32 2 + store i64 0, ptr %34, align 4 + %35 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %31, align 8 + %36 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %37 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %36, i32 0, i32 0 + store ptr @3, ptr %37, align 8 + %38 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %36, i32 0, i32 1 + store i64 4, ptr %38, align 4 + %39 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %36, align 8 + %40 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %41 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %40, i32 0, i32 0 + store ptr null, ptr %41, align 8 + %42 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %40, i32 0, i32 1 + store i64 0, ptr %42, align 4 + %43 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %40, align 8 + %44 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %39, %"github.com/goplus/llgo/internal/runtime.String" %43, %"github.com/goplus/llgo/internal/runtime.Slice" %35) + store ptr %44, ptr @_llgo_any, align 8 + br label %_llgo_10 + +_llgo_10: ; preds = %_llgo_9, %_llgo_8 + %45 = load ptr, ptr @_llgo_any, align 8 + %46 = load ptr, ptr @"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk", align 8 + %47 = icmp eq ptr %46, null + br i1 %47, label %_llgo_11, label %_llgo_12 + +_llgo_11: ; preds = %_llgo_10 + %48 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %49 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %48, i32 0, i32 0 + store ptr @4, ptr %49, align 8 + %50 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %48, i32 0, i32 1 + store i64 1, ptr %50, align 4 + %51 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %48, align 8 + %52 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %53 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %52, i32 0, i32 0 + store ptr null, ptr %53, align 8 + %54 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %52, i32 0, i32 1 + store i64 0, ptr %54, align 4 + %55 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %52, align 8 + %56 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %51, ptr %25, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %55, i1 false) + %57 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %58 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %57, i32 0, i32 0 + store ptr @5, ptr %58, align 8 + %59 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %57, i32 0, i32 1 + store i64 1, ptr %59, align 4 + %60 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %57, align 8 + %61 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %62 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %61, i32 0, i32 0 + store ptr null, ptr %62, align 8 + %63 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %61, i32 0, i32 1 + store i64 0, ptr %63, align 4 + %64 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %61, align 8 + %65 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %60, ptr %26, i64 8, %"github.com/goplus/llgo/internal/runtime.String" %64, i1 false) + %66 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %67 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %66, i32 0, i32 0 + store ptr @6, ptr %67, align 8 + %68 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %66, i32 0, i32 1 + store i64 1, ptr %68, align 4 + %69 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %66, align 8 + %70 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %71 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %70, i32 0, i32 0 + store ptr null, ptr %71, align 8 + %72 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %70, i32 0, i32 1 + store i64 0, ptr %72, align 4 + %73 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %70, align 8 + %74 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %69, ptr %27, i64 16, %"github.com/goplus/llgo/internal/runtime.String" %73, i1 false) + %75 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %76 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %75, i32 0, i32 0 + store ptr @7, ptr %76, align 8 + %77 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %75, i32 0, i32 1 + store i64 1, ptr %77, align 4 + %78 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %75, align 8 + %79 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %80 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %79, i32 0, i32 0 + store ptr null, ptr %80, align 8 + %81 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %79, i32 0, i32 1 + store i64 0, ptr %81, align 4 + %82 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %79, align 8 + %83 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %78, ptr %45, i64 32, %"github.com/goplus/llgo/internal/runtime.String" %82, i1 false) + %84 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %85 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %84, i32 0, i32 0 + store ptr @3, ptr %85, align 8 + %86 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %84, i32 0, i32 1 + store i64 4, ptr %86, align 4 + %87 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %84, align 8 + %88 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 224) + %89 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %88, i64 0 + store %"github.com/goplus/llgo/internal/abi.StructField" %56, ptr %89, align 8 + %90 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %88, i64 1 + store %"github.com/goplus/llgo/internal/abi.StructField" %65, ptr %90, align 8 + %91 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %88, i64 2 + store %"github.com/goplus/llgo/internal/abi.StructField" %74, ptr %91, align 8 + %92 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %88, i64 3 + store %"github.com/goplus/llgo/internal/abi.StructField" %83, ptr %92, align 8 + %93 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %94 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %93, i32 0, i32 0 + store ptr %88, ptr %94, align 8 + %95 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %93, i32 0, i32 1 + store i64 4, ptr %95, align 4 + %96 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %93, i32 0, i32 2 + store i64 4, ptr %96, align 4 + %97 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %93, align 8 + %98 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %87, i64 48, %"github.com/goplus/llgo/internal/runtime.Slice" %97) + store ptr %98, ptr @"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk", align 8 + br label %_llgo_12 + +_llgo_12: ; preds = %_llgo_11, %_llgo_10 + %99 = load ptr, ptr @"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk", align 8 + br i1 %23, label %_llgo_13, label %_llgo_14 + +_llgo_13: ; preds = %_llgo_12 + %100 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %101 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %100, i32 0, i32 0 + store ptr @3, ptr %101, align 8 + %102 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %100, i32 0, i32 1 + store i64 4, ptr %102, align 4 + %103 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %100, align 8 + %104 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %105 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %104, i32 0, i32 0 + store ptr @8, ptr %105, align 8 + %106 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %104, i32 0, i32 1 + store i64 6, ptr %106, align 4 + %107 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %104, align 8 + call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %24, %"github.com/goplus/llgo/internal/runtime.String" %103, %"github.com/goplus/llgo/internal/runtime.String" %107, ptr %99, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer) + br label %_llgo_14 + +_llgo_14: ; preds = %_llgo_13, %_llgo_12 + %108 = load ptr, ptr @_llgo_main.N, align 8 + %109 = icmp eq ptr %108, null + br i1 %109, label %_llgo_15, label %_llgo_16 + +_llgo_15: ; preds = %_llgo_14 + %110 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 0) + store ptr %110, ptr @_llgo_main.N, align 8 + br label %_llgo_16 + +_llgo_16: ; preds = %_llgo_15, %_llgo_14 + %111 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 + br i1 %109, label %_llgo_17, label %_llgo_18 + +_llgo_17: ; preds = %_llgo_16 + %112 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %113 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %112, i32 0, i32 0 + store ptr @3, ptr %113, align 8 + %114 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %112, i32 0, i32 1 + store i64 4, ptr %114, align 4 + %115 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %112, align 8 + %116 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %117 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %116, i32 0, i32 0 + store ptr @9, ptr %117, align 8 + %118 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %116, i32 0, i32 1 + store i64 6, ptr %118, align 4 + %119 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %116, align 8 + call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %110, %"github.com/goplus/llgo/internal/runtime.String" %115, %"github.com/goplus/llgo/internal/runtime.String" %119, ptr %111, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer) + br label %_llgo_18 + +_llgo_18: ; preds = %_llgo_17, %_llgo_16 + ret void +} + +declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64) + +declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64) + +declare void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface") + +declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64) + +define void @"main.init#1$2"(ptr %0) { +_llgo_0: + %1 = load { ptr }, ptr %0, align 8 + %2 = extractvalue { ptr } %1, 0 + %3 = load i64, ptr %2, align 4 + call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %3) + call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10) + ret void +} + +define i64 @"main.init#1$1"(i64 %0, i64 %1) { +_llgo_0: + %2 = add i64 %0, %1 + ret i64 %2 +} + +declare ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr, i64) + +declare i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String") + +declare i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface", %"github.com/goplus/llgo/internal/runtime.eface") + +declare %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr, i64, i64, i64, i64, i64) + +declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice") + +declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1) + +declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64) + +declare ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.Slice") + +declare void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr, %"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String", ptr, %"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice") + +declare void @"github.com/goplus/llgo/internal/runtime.init"() + +declare void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64) + +declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8) diff --git a/cl/_testgo/errors/out.ll b/cl/_testgo/errors/out.ll index e85eb16b..7c0762a2 100644 --- a/cl/_testgo/errors/out.ll +++ b/cl/_testgo/errors/out.ll @@ -14,20 +14,15 @@ source_filename = "main" @_llgo_main.errorString = global ptr null @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = global ptr null @_llgo_string = linkonce global ptr null -@0 = private unnamed_addr constant [2 x i8] c"s\00", align 1 -@1 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@2 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@3 = private unnamed_addr constant [6 x i8] c"Error\00", align 1 +@0 = private unnamed_addr constant [1 x i8] c"s", align 1 +@1 = private unnamed_addr constant [4 x i8] c"main", align 1 +@2 = private unnamed_addr constant [5 x i8] c"Error", align 1 @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null -@4 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@5 = private unnamed_addr constant [17 x i8] c"main.errorString\00", align 1 +@3 = private unnamed_addr constant [16 x i8] c"main.errorString", align 1 @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU" = linkonce global ptr null -@6 = private unnamed_addr constant [6 x i8] c"Error\00", align 1 -@7 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@8 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @__llgo_argc = global ptr null @__llgo_argv = global ptr null -@9 = private unnamed_addr constant [9 x i8] c"an error\00", align 1 +@4 = private unnamed_addr constant [8 x i8] c"an error", align 1 define %"github.com/goplus/llgo/internal/runtime.iface" @main.New(%"github.com/goplus/llgo/internal/runtime.String" %0) { _llgo_0: @@ -75,7 +70,7 @@ _llgo_0: call void @main.init() %2 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i32 0, i32 0 - store ptr @9, ptr %3, align 8 + store ptr @4, ptr %3, align 8 %4 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i32 0, i32 1 store i64 8, ptr %4, align 4 %5 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %2, align 8 @@ -125,14 +120,14 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 %8 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %5, align 8 %9 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %10 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %9, i32 0, i32 0 - store ptr @1, ptr %10, align 8 + store ptr null, ptr %10, align 8 %11 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %9, i32 0, i32 1 store i64 0, ptr %11, align 4 %12 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %9, align 8 %13 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %8, ptr %4, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %12, i1 false) %14 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %15 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %14, i32 0, i32 0 - store ptr @2, ptr %15, align 8 + store ptr @1, ptr %15, align 8 %16 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %14, i32 0, i32 1 store i64 4, ptr %16, align 4 %17 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %14, align 8 @@ -152,7 +147,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 %26 = load ptr, ptr @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 %27 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %28 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %27, i32 0, i32 0 - store ptr @3, ptr %28, align 8 + store ptr @2, ptr %28, align 8 %29 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %27, i32 0, i32 1 store i64 5, ptr %29, align 4 %30 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %27, align 8 @@ -211,13 +206,13 @@ _llgo_4: ; preds = %_llgo_3, %_llgo_2 %61 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %57, align 8 %62 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %63 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %62, i32 0, i32 0 - store ptr @4, ptr %63, align 8 + store ptr @1, ptr %63, align 8 %64 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %62, i32 0, i32 1 store i64 4, ptr %64, align 4 %65 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %62, align 8 %66 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %67 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %66, i32 0, i32 0 - store ptr @5, ptr %67, align 8 + store ptr @3, ptr %67, align 8 %68 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %66, i32 0, i32 1 store i64 16, ptr %68, align 4 %69 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %66, align 8 @@ -233,7 +228,7 @@ _llgo_4: ; preds = %_llgo_3, %_llgo_2 _llgo_5: ; preds = %_llgo_4 %75 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %76 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %75, i32 0, i32 0 - store ptr @6, ptr %76, align 8 + store ptr @2, ptr %76, align 8 %77 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %75, i32 0, i32 1 store i64 5, ptr %77, align 4 %78 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %75, align 8 @@ -256,13 +251,13 @@ _llgo_5: ; preds = %_llgo_4 %89 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %85, align 8 %90 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %91 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %90, i32 0, i32 0 - store ptr @7, ptr %91, align 8 + store ptr @1, ptr %91, align 8 %92 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %90, i32 0, i32 1 store i64 4, ptr %92, align 4 %93 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %90, align 8 %94 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %95 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %94, i32 0, i32 0 - store ptr @8, ptr %95, align 8 + store ptr null, ptr %95, align 8 %96 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %94, i32 0, i32 1 store i64 0, ptr %96, align 4 %97 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %94, align 8 diff --git a/cl/_testgo/goroutine/out.ll b/cl/_testgo/goroutine/out.ll index d6486190..3e5142a8 100644 --- a/cl/_testgo/goroutine/out.ll +++ b/cl/_testgo/goroutine/out.ll @@ -6,8 +6,8 @@ source_filename = "main" @"main.init$guard" = global ptr null @__llgo_argc = global ptr null @__llgo_argv = global ptr null -@0 = private unnamed_addr constant [17 x i8] c"Hello, goroutine\00", align 1 -@1 = private unnamed_addr constant [2 x i8] c".\00", align 1 +@0 = private unnamed_addr constant [16 x i8] c"Hello, goroutine", align 1 +@1 = private unnamed_addr constant [1 x i8] c".", align 1 define void @main.init() { _llgo_0: diff --git a/cl/_testgo/ifaceconv/out.ll b/cl/_testgo/ifaceconv/out.ll index 4f4d7d43..d85c6dd2 100644 --- a/cl/_testgo/ifaceconv/out.ll +++ b/cl/_testgo/ifaceconv/out.ll @@ -15,54 +15,37 @@ source_filename = "main" @__llgo_argc = global ptr null @__llgo_argv = global ptr null @_llgo_main.I0 = linkonce global ptr null -@0 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@1 = private unnamed_addr constant [8 x i8] c"main.I0\00", align 1 -@2 = private unnamed_addr constant [22 x i8] c"nil i0.(I0) succeeded\00", align 1 +@0 = private unnamed_addr constant [4 x i8] c"main", align 1 +@1 = private unnamed_addr constant [7 x i8] c"main.I0", align 1 +@2 = private unnamed_addr constant [21 x i8] c"nil i0.(I0) succeeded", align 1 @_llgo_string = linkonce global ptr null @_llgo_main.I1 = linkonce global ptr null @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null -@3 = private unnamed_addr constant [7 x i8] c"main.f\00", align 1 -@4 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@5 = private unnamed_addr constant [8 x i8] c"main.I1\00", align 1 +@3 = private unnamed_addr constant [6 x i8] c"main.f", align 1 +@4 = private unnamed_addr constant [7 x i8] c"main.I1", align 1 @"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4" = global ptr null -@6 = private unnamed_addr constant [7 x i8] c"main.f\00", align 1 -@7 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@8 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@9 = private unnamed_addr constant [22 x i8] c"nil i1.(I1) succeeded\00", align 1 +@5 = private unnamed_addr constant [21 x i8] c"nil i1.(I1) succeeded", align 1 @_llgo_main.I2 = linkonce global ptr null -@10 = private unnamed_addr constant [7 x i8] c"main.f\00", align 1 -@11 = private unnamed_addr constant [7 x i8] c"main.g\00", align 1 -@12 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@13 = private unnamed_addr constant [8 x i8] c"main.I2\00", align 1 +@6 = private unnamed_addr constant [6 x i8] c"main.g", align 1 +@7 = private unnamed_addr constant [7 x i8] c"main.I2", align 1 @"main.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw" = global ptr null -@14 = private unnamed_addr constant [7 x i8] c"main.f\00", align 1 -@15 = private unnamed_addr constant [7 x i8] c"main.g\00", align 1 -@16 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@17 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@18 = private unnamed_addr constant [22 x i8] c"nil i2.(I2) succeeded\00", align 1 +@8 = private unnamed_addr constant [21 x i8] c"nil i2.(I2) succeeded", align 1 @_llgo_main.C1 = linkonce global ptr null @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null -@19 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@20 = private unnamed_addr constant [2 x i8] c"f\00", align 1 -@21 = private unnamed_addr constant [7 x i8] c"main.f\00", align 1 -@22 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@23 = private unnamed_addr constant [8 x i8] c"main.C1\00", align 1 -@24 = private unnamed_addr constant [18 x i8] c"C1 i1.(I0) failed\00", align 1 -@25 = private unnamed_addr constant [18 x i8] c"C1 i1.(I1) failed\00", align 1 -@26 = private unnamed_addr constant [21 x i8] c"C1 i1.(I2) succeeded\00", align 1 +@9 = private unnamed_addr constant [1 x i8] c"f", align 1 +@10 = private unnamed_addr constant [7 x i8] c"main.C1", align 1 +@11 = private unnamed_addr constant [17 x i8] c"C1 i1.(I0) failed", align 1 +@12 = private unnamed_addr constant [17 x i8] c"C1 i1.(I1) failed", align 1 +@13 = private unnamed_addr constant [20 x i8] c"C1 i1.(I2) succeeded", align 1 @_llgo_main.C2 = linkonce global ptr null -@27 = private unnamed_addr constant [2 x i8] c"f\00", align 1 -@28 = private unnamed_addr constant [7 x i8] c"main.f\00", align 1 -@29 = private unnamed_addr constant [2 x i8] c"g\00", align 1 -@30 = private unnamed_addr constant [7 x i8] c"main.g\00", align 1 -@31 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@32 = private unnamed_addr constant [8 x i8] c"main.C2\00", align 1 -@33 = private unnamed_addr constant [18 x i8] c"C2 i1.(I0) failed\00", align 1 -@34 = private unnamed_addr constant [18 x i8] c"C2 i1.(I1) failed\00", align 1 -@35 = private unnamed_addr constant [18 x i8] c"C2 i1.(I2) failed\00", align 1 -@36 = private unnamed_addr constant [18 x i8] c"C1 I0(i1) was nil\00", align 1 -@37 = private unnamed_addr constant [18 x i8] c"C1 I1(i1) was nil\00", align 1 -@38 = private unnamed_addr constant [5 x i8] c"pass\00", align 1 +@14 = private unnamed_addr constant [1 x i8] c"g", align 1 +@15 = private unnamed_addr constant [7 x i8] c"main.C2", align 1 +@16 = private unnamed_addr constant [17 x i8] c"C2 i1.(I0) failed", align 1 +@17 = private unnamed_addr constant [17 x i8] c"C2 i1.(I1) failed", align 1 +@18 = private unnamed_addr constant [17 x i8] c"C2 i1.(I2) failed", align 1 +@19 = private unnamed_addr constant [17 x i8] c"C1 I0(i1) was nil", align 1 +@20 = private unnamed_addr constant [17 x i8] c"C1 I1(i1) was nil", align 1 +@21 = private unnamed_addr constant [4 x i8] c"pass", align 1 define void @main.C1.f(%main.C1 %0) { _llgo_0: @@ -152,7 +135,7 @@ _llgo_2: ; preds = %_llgo_25 _llgo_3: ; preds = %_llgo_28 %17 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %18 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %17, i32 0, i32 0 - store ptr @9, ptr %18, align 8 + store ptr @5, ptr %18, align 8 %19 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %17, i32 0, i32 1 store i64 21, ptr %19, align 4 %20 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %17, align 8 @@ -177,7 +160,7 @@ _llgo_4: ; preds = %_llgo_28 _llgo_5: ; preds = %_llgo_31 %30 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %31 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %30, i32 0, i32 0 - store ptr @18, ptr %31, align 8 + store ptr @8, ptr %31, align 8 %32 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %30, i32 0, i32 1 store i64 21, ptr %32, align 4 %33 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %30, align 8 @@ -236,7 +219,7 @@ _llgo_6: ; preds = %_llgo_31 _llgo_7: ; preds = %_llgo_34 %68 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %69 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %68, i32 0, i32 0 - store ptr @24, ptr %69, align 8 + store ptr @11, ptr %69, align 8 %70 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %68, i32 0, i32 1 store i64 17, ptr %70, align 4 %71 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %68, align 8 @@ -261,7 +244,7 @@ _llgo_8: ; preds = %_llgo_34 _llgo_9: ; preds = %_llgo_37 %81 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %82 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %81, i32 0, i32 0 - store ptr @25, ptr %82, align 8 + store ptr @12, ptr %82, align 8 %83 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %81, i32 0, i32 1 store i64 17, ptr %83, align 4 %84 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %81, align 8 @@ -286,7 +269,7 @@ _llgo_10: ; preds = %_llgo_37 _llgo_11: ; preds = %_llgo_40 %94 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %95 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %94, i32 0, i32 0 - store ptr @26, ptr %95, align 8 + store ptr @13, ptr %95, align 8 %96 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %94, i32 0, i32 1 store i64 20, ptr %96, align 4 %97 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %94, align 8 @@ -322,7 +305,7 @@ _llgo_12: ; preds = %_llgo_40 _llgo_13: ; preds = %_llgo_43 %115 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %116 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %115, i32 0, i32 0 - store ptr @33, ptr %116, align 8 + store ptr @16, ptr %116, align 8 %117 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %115, i32 0, i32 1 store i64 17, ptr %117, align 4 %118 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %115, align 8 @@ -347,7 +330,7 @@ _llgo_14: ; preds = %_llgo_43 _llgo_15: ; preds = %_llgo_46 %128 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %129 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %128, i32 0, i32 0 - store ptr @34, ptr %129, align 8 + store ptr @17, ptr %129, align 8 %130 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %128, i32 0, i32 1 store i64 17, ptr %130, align 4 %131 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %128, align 8 @@ -372,7 +355,7 @@ _llgo_16: ; preds = %_llgo_46 _llgo_17: ; preds = %_llgo_49 %141 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %142 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %141, i32 0, i32 0 - store ptr @35, ptr %142, align 8 + store ptr @18, ptr %142, align 8 %143 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %141, i32 0, i32 1 store i64 17, ptr %143, align 4 %144 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %141, align 8 @@ -414,7 +397,7 @@ _llgo_18: ; preds = %_llgo_49 _llgo_19: ; preds = %_llgo_18 %166 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %167 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %166, i32 0, i32 0 - store ptr @36, ptr %167, align 8 + store ptr @19, ptr %167, align 8 %168 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %166, i32 0, i32 1 store i64 17, ptr %168, align 4 %169 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %166, align 8 @@ -452,7 +435,7 @@ _llgo_20: ; preds = %_llgo_18 _llgo_21: ; preds = %_llgo_20 %188 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %189 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %188, i32 0, i32 0 - store ptr @37, ptr %189, align 8 + store ptr @20, ptr %189, align 8 %190 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %188, i32 0, i32 1 store i64 17, ptr %190, align 4 %191 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %188, align 8 @@ -471,7 +454,7 @@ _llgo_21: ; preds = %_llgo_20 _llgo_22: ; preds = %_llgo_20 %198 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %199 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %198, i32 0, i32 0 - store ptr @38, ptr %199, align 8 + store ptr @21, ptr %199, align 8 %200 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %198, i32 0, i32 1 store i64 4, ptr %200, align 4 %201 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %198, align 8 @@ -872,13 +855,13 @@ _llgo_7: ; preds = %_llgo_6 %52 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %48, align 8 %53 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %54 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %53, i32 0, i32 0 - store ptr @4, ptr %54, align 8 + store ptr @0, ptr %54, align 8 %55 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %53, i32 0, i32 1 store i64 4, ptr %55, align 4 %56 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %53, align 8 %57 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %58 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %57, i32 0, i32 0 - store ptr @5, ptr %58, align 8 + store ptr @4, ptr %58, align 8 %59 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %57, i32 0, i32 1 store i64 7, ptr %59, align 4 %60 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %57, align 8 @@ -890,7 +873,7 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6 %62 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %63 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %64 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %63, i32 0, i32 0 - store ptr @6, ptr %64, align 8 + store ptr @3, ptr %64, align 8 %65 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %63, i32 0, i32 1 store i64 6, ptr %65, align 4 %66 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %63, align 8 @@ -913,13 +896,13 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6 %77 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %73, align 8 %78 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %79 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %78, i32 0, i32 0 - store ptr @7, ptr %79, align 8 + store ptr @0, ptr %79, align 8 %80 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %78, i32 0, i32 1 store i64 4, ptr %80, align 4 %81 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %78, align 8 %82 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %83 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %82, i32 0, i32 0 - store ptr @8, ptr %83, align 8 + store ptr null, ptr %83, align 8 %84 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %82, i32 0, i32 1 store i64 0, ptr %84, align 4 %85 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %82, align 8 @@ -934,7 +917,7 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6 _llgo_9: ; preds = %_llgo_8 %91 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %92 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %91, i32 0, i32 0 - store ptr @10, ptr %92, align 8 + store ptr @3, ptr %92, align 8 %93 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %91, i32 0, i32 1 store i64 6, ptr %93, align 4 %94 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %91, align 8 @@ -946,7 +929,7 @@ _llgo_9: ; preds = %_llgo_8 %98 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %95, align 8 %99 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %100 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %99, i32 0, i32 0 - store ptr @11, ptr %100, align 8 + store ptr @6, ptr %100, align 8 %101 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %99, i32 0, i32 1 store i64 6, ptr %101, align 4 %102 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %99, align 8 @@ -971,13 +954,13 @@ _llgo_9: ; preds = %_llgo_8 %114 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %110, align 8 %115 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %116 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %115, i32 0, i32 0 - store ptr @12, ptr %116, align 8 + store ptr @0, ptr %116, align 8 %117 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %115, i32 0, i32 1 store i64 4, ptr %117, align 4 %118 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %115, align 8 %119 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %120 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %119, i32 0, i32 0 - store ptr @13, ptr %120, align 8 + store ptr @7, ptr %120, align 8 %121 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %119, i32 0, i32 1 store i64 7, ptr %121, align 4 %122 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %119, align 8 @@ -990,7 +973,7 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_8 %125 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %126 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %127 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %126, i32 0, i32 0 - store ptr @14, ptr %127, align 8 + store ptr @3, ptr %127, align 8 %128 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %126, i32 0, i32 1 store i64 6, ptr %128, align 4 %129 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %126, align 8 @@ -1002,7 +985,7 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_8 %133 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %130, align 8 %134 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %135 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %134, i32 0, i32 0 - store ptr @15, ptr %135, align 8 + store ptr @6, ptr %135, align 8 %136 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %134, i32 0, i32 1 store i64 6, ptr %136, align 4 %137 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %134, align 8 @@ -1027,13 +1010,13 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_8 %149 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %145, align 8 %150 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %151 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %150, i32 0, i32 0 - store ptr @16, ptr %151, align 8 + store ptr @0, ptr %151, align 8 %152 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %150, i32 0, i32 1 store i64 4, ptr %152, align 4 %153 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %150, align 8 %154 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %155 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %154, i32 0, i32 0 - store ptr @17, ptr %155, align 8 + store ptr null, ptr %155, align 8 %156 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %154, i32 0, i32 1 store i64 0, ptr %156, align 4 %157 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %154, align 8 @@ -1056,7 +1039,7 @@ _llgo_12: ; preds = %_llgo_11, %_llgo_10 _llgo_13: ; preds = %_llgo_12 %164 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %165 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %164, i32 0, i32 0 - store ptr @19, ptr %165, align 8 + store ptr @0, ptr %165, align 8 %166 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %164, i32 0, i32 1 store i64 4, ptr %166, align 4 %167 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %164, align 8 @@ -1080,13 +1063,13 @@ _llgo_14: ; preds = %_llgo_13, %_llgo_12 _llgo_15: ; preds = %_llgo_14 %176 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %177 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %176, i32 0, i32 0 - store ptr @20, ptr %177, align 8 + store ptr @9, ptr %177, align 8 %178 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %176, i32 0, i32 1 store i64 1, ptr %178, align 4 %179 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %176, align 8 %180 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %181 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %180, i32 0, i32 0 - store ptr @21, ptr %181, align 8 + store ptr @3, ptr %181, align 8 %182 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %180, i32 0, i32 1 store i64 6, ptr %182, align 4 %183 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %180, align 8 @@ -1135,13 +1118,13 @@ _llgo_15: ; preds = %_llgo_14 %210 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %206, align 8 %211 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %212 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %211, i32 0, i32 0 - store ptr @22, ptr %212, align 8 + store ptr @0, ptr %212, align 8 %213 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %211, i32 0, i32 1 store i64 4, ptr %213, align 4 %214 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %211, align 8 %215 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %216 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %215, i32 0, i32 0 - store ptr @23, ptr %216, align 8 + store ptr @10, ptr %216, align 8 %217 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %215, i32 0, i32 1 store i64 7, ptr %217, align 4 %218 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %215, align 8 @@ -1165,13 +1148,13 @@ _llgo_18: ; preds = %_llgo_17, %_llgo_16 _llgo_19: ; preds = %_llgo_18 %223 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %224 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %223, i32 0, i32 0 - store ptr @27, ptr %224, align 8 + store ptr @9, ptr %224, align 8 %225 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %223, i32 0, i32 1 store i64 1, ptr %225, align 4 %226 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %223, align 8 %227 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %228 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %227, i32 0, i32 0 - store ptr @28, ptr %228, align 8 + store ptr @3, ptr %228, align 8 %229 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %227, i32 0, i32 1 store i64 6, ptr %229, align 4 %230 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %227, align 8 @@ -1198,13 +1181,13 @@ _llgo_19: ; preds = %_llgo_18 %243 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %238, align 8 %244 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %245 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %244, i32 0, i32 0 - store ptr @29, ptr %245, align 8 + store ptr @14, ptr %245, align 8 %246 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %244, i32 0, i32 1 store i64 1, ptr %246, align 4 %247 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %244, align 8 %248 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %249 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %248, i32 0, i32 0 - store ptr @30, ptr %249, align 8 + store ptr @6, ptr %249, align 8 %250 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %248, i32 0, i32 1 store i64 6, ptr %250, align 4 %251 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %248, align 8 @@ -1257,13 +1240,13 @@ _llgo_19: ; preds = %_llgo_18 %280 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %276, align 8 %281 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %282 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %281, i32 0, i32 0 - store ptr @31, ptr %282, align 8 + store ptr @0, ptr %282, align 8 %283 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %281, i32 0, i32 1 store i64 4, ptr %283, align 4 %284 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %281, align 8 %285 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %286 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %285, i32 0, i32 0 - store ptr @32, ptr %286, align 8 + store ptr @15, ptr %286, align 8 %287 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %285, i32 0, i32 1 store i64 7, ptr %287, align 4 %288 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %285, align 8 diff --git a/cl/_testgo/ifaceprom/out.ll b/cl/_testgo/ifaceprom/out.ll index a4ca2d09..68bdad92 100644 --- a/cl/_testgo/ifaceprom/out.ll +++ b/cl/_testgo/ifaceprom/out.ll @@ -13,41 +13,25 @@ source_filename = "main" %"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 } @"main.init$guard" = global ptr null -@0 = private unnamed_addr constant [4 x i8] c"two\00", align 1 +@0 = private unnamed_addr constant [3 x i8] c"two", align 1 @__llgo_argc = global ptr null @__llgo_argv = global ptr null @_llgo_main.impl = global ptr null @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null -@1 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@2 = private unnamed_addr constant [4 x i8] c"one\00", align 1 -@3 = private unnamed_addr constant [9 x i8] c"main.one\00", align 1 +@1 = private unnamed_addr constant [4 x i8] c"main", align 1 +@2 = private unnamed_addr constant [3 x i8] c"one", align 1 +@3 = private unnamed_addr constant [8 x i8] c"main.one", align 1 @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA" = linkonce global ptr null @_llgo_int = linkonce global ptr null -@4 = private unnamed_addr constant [4 x i8] c"two\00", align 1 -@5 = private unnamed_addr constant [9 x i8] c"main.two\00", align 1 +@4 = private unnamed_addr constant [8 x i8] c"main.two", align 1 @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null @_llgo_string = linkonce global ptr null -@6 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@7 = private unnamed_addr constant [10 x i8] c"main.impl\00", align 1 +@5 = private unnamed_addr constant [9 x i8] c"main.impl", align 1 @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA" = global ptr null -@8 = private unnamed_addr constant [9 x i8] c"main.one\00", align 1 -@9 = private unnamed_addr constant [9 x i8] c"main.two\00", align 1 -@10 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@11 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @_llgo_main.I = linkonce global ptr null -@12 = private unnamed_addr constant [9 x i8] c"main.one\00", align 1 -@13 = private unnamed_addr constant [9 x i8] c"main.two\00", align 1 -@14 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@15 = private unnamed_addr constant [7 x i8] c"main.I\00", align 1 -@16 = private unnamed_addr constant [22 x i8] c"type assertion failed\00", align 1 -@17 = private unnamed_addr constant [22 x i8] c"type assertion failed\00", align 1 -@18 = private unnamed_addr constant [4 x i8] c"two\00", align 1 -@19 = private unnamed_addr constant [4 x i8] c"two\00", align 1 -@20 = private unnamed_addr constant [22 x i8] c"type assertion failed\00", align 1 -@21 = private unnamed_addr constant [4 x i8] c"two\00", align 1 -@22 = private unnamed_addr constant [22 x i8] c"type assertion failed\00", align 1 -@23 = private unnamed_addr constant [4 x i8] c"two\00", align 1 -@24 = private unnamed_addr constant [5 x i8] c"pass\00", align 1 +@6 = private unnamed_addr constant [6 x i8] c"main.I", align 1 +@7 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1 +@8 = private unnamed_addr constant [4 x i8] c"pass", align 1 define i64 @main.S.one(%main.S %0) { _llgo_0: @@ -335,7 +319,7 @@ _llgo_8: ; preds = %_llgo_19 %99 = call %"github.com/goplus/llgo/internal/runtime.String" %98(ptr %97) %100 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %101 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %100, i32 0, i32 0 - store ptr @18, ptr %101, align 8 + store ptr @0, ptr %101, align 8 %102 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %100, i32 0, i32 1 store i64 3, ptr %102, align 4 %103 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %100, align 8 @@ -374,7 +358,7 @@ _llgo_10: ; preds = %_llgo_8 %124 = call %"github.com/goplus/llgo/internal/runtime.String" %123(ptr %122) %125 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %126 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %125, i32 0, i32 0 - store ptr @19, ptr %126, align 8 + store ptr @0, ptr %126, align 8 %127 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %125, i32 0, i32 1 store i64 3, ptr %127, align 4 %128 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %125, align 8 @@ -440,7 +424,7 @@ _llgo_15: ; preds = %_llgo_23 _llgo_16: ; preds = %_llgo_23 %159 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %160 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %159, i32 0, i32 0 - store ptr @24, ptr %160, align 8 + store ptr @8, ptr %160, align 8 %161 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %159, i32 0, i32 1 store i64 4, ptr %161, align 4 %162 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %159, align 8 @@ -476,7 +460,7 @@ _llgo_17: ; preds = %_llgo_4 _llgo_18: ; preds = %_llgo_4 %180 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %181 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %180, i32 0, i32 0 - store ptr @16, ptr %181, align 8 + store ptr @7, ptr %181, align 8 %182 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %180, i32 0, i32 1 store i64 21, ptr %182, align 4 %183 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %180, align 8 @@ -520,7 +504,7 @@ _llgo_19: ; preds = %_llgo_6 _llgo_20: ; preds = %_llgo_6 %207 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %208 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %207, i32 0, i32 0 - store ptr @17, ptr %208, align 8 + store ptr @7, ptr %208, align 8 %209 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %207, i32 0, i32 1 store i64 21, ptr %209, align 4 %210 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %207, align 8 @@ -560,7 +544,7 @@ _llgo_21: ; preds = %_llgo_12 %232 = call %"github.com/goplus/llgo/internal/runtime.String" %231(ptr %230) %233 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %234 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %233, i32 0, i32 0 - store ptr @21, ptr %234, align 8 + store ptr @0, ptr %234, align 8 %235 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %233, i32 0, i32 1 store i64 3, ptr %235, align 4 %236 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %233, align 8 @@ -571,7 +555,7 @@ _llgo_21: ; preds = %_llgo_12 _llgo_22: ; preds = %_llgo_12 %239 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %240 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %239, i32 0, i32 0 - store ptr @20, ptr %240, align 8 + store ptr @7, ptr %240, align 8 %241 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %239, i32 0, i32 1 store i64 21, ptr %241, align 4 %242 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %239, align 8 @@ -611,7 +595,7 @@ _llgo_23: ; preds = %_llgo_14 %264 = call %"github.com/goplus/llgo/internal/runtime.String" %263(ptr %262) %265 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %266 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %265, i32 0, i32 0 - store ptr @23, ptr %266, align 8 + store ptr @0, ptr %266, align 8 %267 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %265, i32 0, i32 1 store i64 3, ptr %267, align 4 %268 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %265, align 8 @@ -622,7 +606,7 @@ _llgo_23: ; preds = %_llgo_14 _llgo_24: ; preds = %_llgo_14 %271 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %272 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %271, i32 0, i32 0 - store ptr @22, ptr %272, align 8 + store ptr @7, ptr %272, align 8 %273 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %271, i32 0, i32 1 store i64 21, ptr %273, align 4 %274 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %271, align 8 @@ -697,282 +681,286 @@ _llgo_3: ; preds = %_llgo_2 br label %_llgo_4 _llgo_4: ; preds = %_llgo_3, %_llgo_2 - %26 = load ptr, ptr @_llgo_int, align 8 - %27 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %28 = icmp eq ptr %27, null - br i1 %28, label %_llgo_5, label %_llgo_6 + %26 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %25, i32 0, i32 6 + %27 = load i8, ptr %26, align 1 + %28 = or i8 %27, 32 + store i8 %28, ptr %26, align 1 + %29 = load ptr, ptr @_llgo_int, align 8 + %30 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %31 = icmp eq ptr %30, null + br i1 %31, label %_llgo_5, label %_llgo_6 _llgo_5: ; preds = %_llgo_4 - %29 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - %30 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %31 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %30, i32 0, i32 0 - store ptr %29, ptr %31, align 8 - %32 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %30, i32 0, i32 1 - store i64 0, ptr %32, align 4 - %33 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %30, i32 0, i32 2 - store i64 0, ptr %33, align 4 - %34 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %30, align 8 - %35 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) - %36 = getelementptr ptr, ptr %35, i64 0 - store ptr %26, ptr %36, align 8 - %37 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %38 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %37, i32 0, i32 0 - store ptr %35, ptr %38, align 8 - %39 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %37, i32 0, i32 1 - store i64 1, ptr %39, align 4 - %40 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %37, i32 0, i32 2 - store i64 1, ptr %40, align 4 - %41 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %37, align 8 - %42 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %34, %"github.com/goplus/llgo/internal/runtime.Slice" %41, i1 false) - store ptr %42, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %32 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + %33 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %33, i32 0, i32 0 + store ptr %32, ptr %34, align 8 + %35 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %33, i32 0, i32 1 + store i64 0, ptr %35, align 4 + %36 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %33, i32 0, i32 2 + store i64 0, ptr %36, align 4 + %37 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %33, align 8 + %38 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) + %39 = getelementptr ptr, ptr %38, i64 0 + store ptr %29, ptr %39, align 8 + %40 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %41 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %40, i32 0, i32 0 + store ptr %38, ptr %41, align 8 + %42 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %40, i32 0, i32 1 + store i64 1, ptr %42, align 4 + %43 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %40, i32 0, i32 2 + store i64 1, ptr %43, align 4 + %44 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %40, align 8 + %45 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %37, %"github.com/goplus/llgo/internal/runtime.Slice" %44, i1 false) + store ptr %45, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 br label %_llgo_6 _llgo_6: ; preds = %_llgo_5, %_llgo_4 - %43 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %44 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %45 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %44, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %22, ptr %45, align 8 - %46 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %44, i32 0, i32 1 - store ptr %43, ptr %46, align 8 - %47 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %44, i32 0, i32 2 - store ptr @"main.(*impl).one", ptr %47, align 8 - %48 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %44, i32 0, i32 3 - store ptr @"main.(*impl).one", ptr %48, align 8 - %49 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %44, align 8 - %50 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %51 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %50, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %22, ptr %51, align 8 - %52 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %50, i32 0, i32 1 - store ptr %43, ptr %52, align 8 - %53 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %50, i32 0, i32 2 - store ptr @"main.(*impl).one", ptr %53, align 8 - %54 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %50, i32 0, i32 3 - store ptr @main.impl.one, ptr %54, align 8 - %55 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %50, align 8 - %56 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %57 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %56, i32 0, i32 0 - store ptr @4, ptr %57, align 8 - %58 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %56, i32 0, i32 1 - store i64 3, ptr %58, align 4 - %59 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %56, align 8 - %60 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %61 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %60, i32 0, i32 0 - store ptr @5, ptr %61, align 8 - %62 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %60, i32 0, i32 1 - store i64 8, ptr %62, align 4 - %63 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %60, align 8 - %64 = load ptr, ptr @_llgo_string, align 8 - %65 = icmp eq ptr %64, null - br i1 %65, label %_llgo_7, label %_llgo_8 + %46 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %47 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %48 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %47, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %22, ptr %48, align 8 + %49 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %47, i32 0, i32 1 + store ptr %46, ptr %49, align 8 + %50 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %47, i32 0, i32 2 + store ptr @"main.(*impl).one", ptr %50, align 8 + %51 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %47, i32 0, i32 3 + store ptr @"main.(*impl).one", ptr %51, align 8 + %52 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %47, align 8 + %53 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %54 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %53, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %22, ptr %54, align 8 + %55 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %53, i32 0, i32 1 + store ptr %46, ptr %55, align 8 + %56 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %53, i32 0, i32 2 + store ptr @"main.(*impl).one", ptr %56, align 8 + %57 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %53, i32 0, i32 3 + store ptr @main.impl.one, ptr %57, align 8 + %58 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %53, align 8 + %59 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %60 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %59, i32 0, i32 0 + store ptr @0, ptr %60, align 8 + %61 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %59, i32 0, i32 1 + store i64 3, ptr %61, align 4 + %62 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %59, align 8 + %63 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %64 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %63, i32 0, i32 0 + store ptr @4, ptr %64, align 8 + %65 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %63, i32 0, i32 1 + store i64 8, ptr %65, align 4 + %66 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %63, align 8 + %67 = load ptr, ptr @_llgo_string, align 8 + %68 = icmp eq ptr %67, null + br i1 %68, label %_llgo_7, label %_llgo_8 _llgo_7: ; preds = %_llgo_6 - %66 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24) - store ptr %66, ptr @_llgo_string, align 8 + %69 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24) + store ptr %69, ptr @_llgo_string, align 8 br label %_llgo_8 _llgo_8: ; preds = %_llgo_7, %_llgo_6 - %67 = load ptr, ptr @_llgo_string, align 8 - %68 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - %69 = icmp eq ptr %68, null - br i1 %69, label %_llgo_9, label %_llgo_10 + %70 = load ptr, ptr @_llgo_string, align 8 + %71 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 + %72 = icmp eq ptr %71, null + br i1 %72, label %_llgo_9, label %_llgo_10 _llgo_9: ; preds = %_llgo_8 - %70 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - %71 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %72 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %71, i32 0, i32 0 - store ptr %70, ptr %72, align 8 - %73 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %71, i32 0, i32 1 - store i64 0, ptr %73, align 4 - %74 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %71, i32 0, i32 2 - store i64 0, ptr %74, align 4 - %75 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %71, align 8 - %76 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) - %77 = getelementptr ptr, ptr %76, i64 0 - store ptr %67, ptr %77, align 8 - %78 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %79 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %78, i32 0, i32 0 - store ptr %76, ptr %79, align 8 - %80 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %78, i32 0, i32 1 - store i64 1, ptr %80, align 4 - %81 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %78, i32 0, i32 2 - store i64 1, ptr %81, align 4 - %82 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %78, align 8 - %83 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %75, %"github.com/goplus/llgo/internal/runtime.Slice" %82, i1 false) - store ptr %83, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 + %73 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + %74 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %75 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %74, i32 0, i32 0 + store ptr %73, ptr %75, align 8 + %76 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %74, i32 0, i32 1 + store i64 0, ptr %76, align 4 + %77 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %74, i32 0, i32 2 + store i64 0, ptr %77, align 4 + %78 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %74, align 8 + %79 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) + %80 = getelementptr ptr, ptr %79, i64 0 + store ptr %70, ptr %80, align 8 + %81 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %82 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %81, i32 0, i32 0 + store ptr %79, ptr %82, align 8 + %83 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %81, i32 0, i32 1 + store i64 1, ptr %83, align 4 + %84 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %81, i32 0, i32 2 + store i64 1, ptr %84, align 4 + %85 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %81, align 8 + %86 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %78, %"github.com/goplus/llgo/internal/runtime.Slice" %85, i1 false) + store ptr %86, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 br label %_llgo_10 _llgo_10: ; preds = %_llgo_9, %_llgo_8 - %84 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - %85 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %86 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %85, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %63, ptr %86, align 8 - %87 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %85, i32 0, i32 1 - store ptr %84, ptr %87, align 8 - %88 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %85, i32 0, i32 2 - store ptr @"main.(*impl).two", ptr %88, align 8 - %89 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %85, i32 0, i32 3 - store ptr @"main.(*impl).two", ptr %89, align 8 - %90 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %85, align 8 - %91 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %92 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %91, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %63, ptr %92, align 8 - %93 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %91, i32 0, i32 1 - store ptr %84, ptr %93, align 8 - %94 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %91, i32 0, i32 2 - store ptr @"main.(*impl).two", ptr %94, align 8 - %95 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %91, i32 0, i32 3 - store ptr @main.impl.two, ptr %95, align 8 - %96 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %91, align 8 - %97 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80) - %98 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %97, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %55, ptr %98, align 8 - %99 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %97, i64 1 - store %"github.com/goplus/llgo/internal/abi.Method" %96, ptr %99, align 8 - %100 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %101 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %100, i32 0, i32 0 - store ptr %97, ptr %101, align 8 - %102 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %100, i32 0, i32 1 - store i64 2, ptr %102, align 4 - %103 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %100, i32 0, i32 2 - store i64 2, ptr %103, align 4 - %104 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %100, align 8 - %105 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80) - %106 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %105, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %49, ptr %106, align 8 - %107 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %105, i64 1 - store %"github.com/goplus/llgo/internal/abi.Method" %90, ptr %107, align 8 - %108 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %109 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %108, i32 0, i32 0 - store ptr %105, ptr %109, align 8 - %110 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %108, i32 0, i32 1 - store i64 2, ptr %110, align 4 - %111 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %108, i32 0, i32 2 - store i64 2, ptr %111, align 4 - %112 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %108, align 8 - %113 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %114 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %113, i32 0, i32 0 - store ptr @6, ptr %114, align 8 - %115 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %113, i32 0, i32 1 - store i64 4, ptr %115, align 4 - %116 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %113, align 8 - %117 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %118 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %117, i32 0, i32 0 - store ptr @7, ptr %118, align 8 - %119 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %117, i32 0, i32 1 - store i64 9, ptr %119, align 4 - %120 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %117, align 8 - call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %0, %"github.com/goplus/llgo/internal/runtime.String" %116, %"github.com/goplus/llgo/internal/runtime.String" %120, ptr %14, %"github.com/goplus/llgo/internal/runtime.Slice" %104, %"github.com/goplus/llgo/internal/runtime.Slice" %112) - %121 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %122 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - %123 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %124 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %123, i32 0, i32 0 - store ptr @8, ptr %124, align 8 - %125 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %123, i32 0, i32 1 - store i64 8, ptr %125, align 4 - %126 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %123, align 8 - %127 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %128 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %127, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %126, ptr %128, align 8 - %129 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %127, i32 0, i32 1 - store ptr %121, ptr %129, align 8 - %130 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %127, align 8 - %131 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %132 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %131, i32 0, i32 0 - store ptr @9, ptr %132, align 8 - %133 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %131, i32 0, i32 1 - store i64 8, ptr %133, align 4 - %134 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %131, align 8 - %135 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %136 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %135, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %134, ptr %136, align 8 - %137 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %135, i32 0, i32 1 - store ptr %122, ptr %137, align 8 - %138 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %135, align 8 - %139 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) - %140 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %139, i64 0 - store %"github.com/goplus/llgo/internal/abi.Imethod" %130, ptr %140, align 8 - %141 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %139, i64 1 - store %"github.com/goplus/llgo/internal/abi.Imethod" %138, ptr %141, align 8 - %142 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %143 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %142, i32 0, i32 0 - store ptr %139, ptr %143, align 8 - %144 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %142, i32 0, i32 1 - store i64 2, ptr %144, align 4 - %145 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %142, i32 0, i32 2 - store i64 2, ptr %145, align 4 - %146 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %142, align 8 - %147 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %148 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %147, i32 0, i32 0 - store ptr @10, ptr %148, align 8 - %149 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %147, i32 0, i32 1 - store i64 4, ptr %149, align 4 - %150 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %147, align 8 - %151 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %152 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %151, i32 0, i32 0 - store ptr @11, ptr %152, align 8 - %153 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %151, i32 0, i32 1 - store i64 0, ptr %153, align 4 - %154 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %151, align 8 - %155 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %150, %"github.com/goplus/llgo/internal/runtime.String" %154, %"github.com/goplus/llgo/internal/runtime.Slice" %146) - store ptr %155, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8 - %156 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %157 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - %158 = load ptr, ptr @_llgo_main.I, align 8 - %159 = icmp eq ptr %158, null - br i1 %159, label %_llgo_11, label %_llgo_12 + %87 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 + %88 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %89 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %88, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %66, ptr %89, align 8 + %90 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %88, i32 0, i32 1 + store ptr %87, ptr %90, align 8 + %91 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %88, i32 0, i32 2 + store ptr @"main.(*impl).two", ptr %91, align 8 + %92 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %88, i32 0, i32 3 + store ptr @"main.(*impl).two", ptr %92, align 8 + %93 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %88, align 8 + %94 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %95 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %94, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %66, ptr %95, align 8 + %96 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %94, i32 0, i32 1 + store ptr %87, ptr %96, align 8 + %97 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %94, i32 0, i32 2 + store ptr @"main.(*impl).two", ptr %97, align 8 + %98 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %94, i32 0, i32 3 + store ptr @main.impl.two, ptr %98, align 8 + %99 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %94, align 8 + %100 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80) + %101 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %100, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %58, ptr %101, align 8 + %102 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %100, i64 1 + store %"github.com/goplus/llgo/internal/abi.Method" %99, ptr %102, align 8 + %103 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %104 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %103, i32 0, i32 0 + store ptr %100, ptr %104, align 8 + %105 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %103, i32 0, i32 1 + store i64 2, ptr %105, align 4 + %106 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %103, i32 0, i32 2 + store i64 2, ptr %106, align 4 + %107 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %103, align 8 + %108 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80) + %109 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %108, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %52, ptr %109, align 8 + %110 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %108, i64 1 + store %"github.com/goplus/llgo/internal/abi.Method" %93, ptr %110, align 8 + %111 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %112 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %111, i32 0, i32 0 + store ptr %108, ptr %112, align 8 + %113 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %111, i32 0, i32 1 + store i64 2, ptr %113, align 4 + %114 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %111, i32 0, i32 2 + store i64 2, ptr %114, align 4 + %115 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %111, align 8 + %116 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %117 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %116, i32 0, i32 0 + store ptr @1, ptr %117, align 8 + %118 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %116, i32 0, i32 1 + store i64 4, ptr %118, align 4 + %119 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %116, align 8 + %120 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %121 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %120, i32 0, i32 0 + store ptr @5, ptr %121, align 8 + %122 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %120, i32 0, i32 1 + store i64 9, ptr %122, align 4 + %123 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %120, align 8 + call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %0, %"github.com/goplus/llgo/internal/runtime.String" %119, %"github.com/goplus/llgo/internal/runtime.String" %123, ptr %14, %"github.com/goplus/llgo/internal/runtime.Slice" %107, %"github.com/goplus/llgo/internal/runtime.Slice" %115) + %124 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %125 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 + %126 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %127 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %126, i32 0, i32 0 + store ptr @3, ptr %127, align 8 + %128 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %126, i32 0, i32 1 + store i64 8, ptr %128, align 4 + %129 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %126, align 8 + %130 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %131 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %130, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %129, ptr %131, align 8 + %132 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %130, i32 0, i32 1 + store ptr %124, ptr %132, align 8 + %133 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %130, align 8 + %134 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %135 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %134, i32 0, i32 0 + store ptr @4, ptr %135, align 8 + %136 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %134, i32 0, i32 1 + store i64 8, ptr %136, align 4 + %137 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %134, align 8 + %138 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %139 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %138, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %137, ptr %139, align 8 + %140 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %138, i32 0, i32 1 + store ptr %125, ptr %140, align 8 + %141 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %138, align 8 + %142 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) + %143 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %142, i64 0 + store %"github.com/goplus/llgo/internal/abi.Imethod" %133, ptr %143, align 8 + %144 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %142, i64 1 + store %"github.com/goplus/llgo/internal/abi.Imethod" %141, ptr %144, align 8 + %145 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %146 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %145, i32 0, i32 0 + store ptr %142, ptr %146, align 8 + %147 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %145, i32 0, i32 1 + store i64 2, ptr %147, align 4 + %148 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %145, i32 0, i32 2 + store i64 2, ptr %148, align 4 + %149 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %145, align 8 + %150 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %151 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %150, i32 0, i32 0 + store ptr @1, ptr %151, align 8 + %152 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %150, i32 0, i32 1 + store i64 4, ptr %152, align 4 + %153 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %150, align 8 + %154 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %155 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %154, i32 0, i32 0 + store ptr null, ptr %155, align 8 + %156 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %154, i32 0, i32 1 + store i64 0, ptr %156, align 4 + %157 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %154, align 8 + %158 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %153, %"github.com/goplus/llgo/internal/runtime.String" %157, %"github.com/goplus/llgo/internal/runtime.Slice" %149) + store ptr %158, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8 + %159 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %160 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 + %161 = load ptr, ptr @_llgo_main.I, align 8 + %162 = icmp eq ptr %161, null + br i1 %162, label %_llgo_11, label %_llgo_12 _llgo_11: ; preds = %_llgo_10 - %160 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %161 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %160, i32 0, i32 0 - store ptr @12, ptr %161, align 8 - %162 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %160, i32 0, i32 1 - store i64 8, ptr %162, align 4 - %163 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %160, align 8 - %164 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %165 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %164, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %163, ptr %165, align 8 - %166 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %164, i32 0, i32 1 - store ptr %156, ptr %166, align 8 - %167 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %164, align 8 - %168 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %169 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %168, i32 0, i32 0 - store ptr @13, ptr %169, align 8 - %170 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %168, i32 0, i32 1 - store i64 8, ptr %170, align 4 - %171 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %168, align 8 - %172 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %173 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %172, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %171, ptr %173, align 8 - %174 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %172, i32 0, i32 1 - store ptr %157, ptr %174, align 8 - %175 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %172, align 8 - %176 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) - %177 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %176, i64 0 - store %"github.com/goplus/llgo/internal/abi.Imethod" %167, ptr %177, align 8 - %178 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %176, i64 1 - store %"github.com/goplus/llgo/internal/abi.Imethod" %175, ptr %178, align 8 - %179 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %180 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %179, i32 0, i32 0 - store ptr %176, ptr %180, align 8 - %181 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %179, i32 0, i32 1 - store i64 2, ptr %181, align 4 - %182 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %179, i32 0, i32 2 - store i64 2, ptr %182, align 4 - %183 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %179, align 8 - %184 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %185 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %184, i32 0, i32 0 - store ptr @14, ptr %185, align 8 - %186 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %184, i32 0, i32 1 - store i64 4, ptr %186, align 4 - %187 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %184, align 8 - %188 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %189 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %188, i32 0, i32 0 - store ptr @15, ptr %189, align 8 - %190 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %188, i32 0, i32 1 - store i64 6, ptr %190, align 4 - %191 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %188, align 8 - %192 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %187, %"github.com/goplus/llgo/internal/runtime.String" %191, %"github.com/goplus/llgo/internal/runtime.Slice" %183) - store ptr %192, ptr @_llgo_main.I, align 8 + %163 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %164 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %163, i32 0, i32 0 + store ptr @3, ptr %164, align 8 + %165 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %163, i32 0, i32 1 + store i64 8, ptr %165, align 4 + %166 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %163, align 8 + %167 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %168 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %167, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %166, ptr %168, align 8 + %169 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %167, i32 0, i32 1 + store ptr %159, ptr %169, align 8 + %170 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %167, align 8 + %171 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %172 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %171, i32 0, i32 0 + store ptr @4, ptr %172, align 8 + %173 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %171, i32 0, i32 1 + store i64 8, ptr %173, align 4 + %174 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %171, align 8 + %175 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %176 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %175, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %174, ptr %176, align 8 + %177 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %175, i32 0, i32 1 + store ptr %160, ptr %177, align 8 + %178 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %175, align 8 + %179 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) + %180 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %179, i64 0 + store %"github.com/goplus/llgo/internal/abi.Imethod" %170, ptr %180, align 8 + %181 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %179, i64 1 + store %"github.com/goplus/llgo/internal/abi.Imethod" %178, ptr %181, align 8 + %182 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %183 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %182, i32 0, i32 0 + store ptr %179, ptr %183, align 8 + %184 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %182, i32 0, i32 1 + store i64 2, ptr %184, align 4 + %185 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %182, i32 0, i32 2 + store i64 2, ptr %185, align 4 + %186 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %182, align 8 + %187 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %188 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %187, i32 0, i32 0 + store ptr @1, ptr %188, align 8 + %189 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %187, i32 0, i32 1 + store i64 4, ptr %189, align 4 + %190 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %187, align 8 + %191 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %192 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %191, i32 0, i32 0 + store ptr @6, ptr %192, align 8 + %193 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %191, i32 0, i32 1 + store i64 6, ptr %193, align 4 + %194 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %191, align 8 + %195 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %190, %"github.com/goplus/llgo/internal/runtime.String" %194, %"github.com/goplus/llgo/internal/runtime.Slice" %186) + store ptr %195, ptr @_llgo_main.I, align 8 br label %_llgo_12 _llgo_12: ; preds = %_llgo_11, %_llgo_10 diff --git a/cl/_testgo/interface/out.ll b/cl/_testgo/interface/out.ll index 9c8236ca..92258906 100644 --- a/cl/_testgo/interface/out.ll +++ b/cl/_testgo/interface/out.ll @@ -19,39 +19,24 @@ source_filename = "main" @"*_llgo_github.com/goplus/llgo/cl/internal/foo.Game" = linkonce global ptr null @"_llgo_github.com/goplus/llgo/cl/internal/foo.Game" = linkonce global ptr null @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null -@0 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@1 = private unnamed_addr constant [5 x i8] c"Load\00", align 1 +@0 = private unnamed_addr constant [4 x i8] c"main", align 1 +@1 = private unnamed_addr constant [4 x i8] c"Load", align 1 @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null -@2 = private unnamed_addr constant [9 x i8] c"initGame\00", align 1 -@3 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/cl/internal/foo.initGame\00", align 1 -@4 = private unnamed_addr constant [39 x i8] c"github.com/goplus/llgo/cl/internal/foo\00", align 1 -@5 = private unnamed_addr constant [44 x i8] c"github.com/goplus/llgo/cl/internal/foo.Game\00", align 1 -@6 = private unnamed_addr constant [5 x i8] c"Game\00", align 1 -@7 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@8 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@9 = private unnamed_addr constant [5 x i8] c"Load\00", align 1 -@10 = private unnamed_addr constant [9 x i8] c"initGame\00", align 1 -@11 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/cl/internal/foo.initGame\00", align 1 -@12 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@13 = private unnamed_addr constant [11 x i8] c"main.Game1\00", align 1 +@2 = private unnamed_addr constant [8 x i8] c"initGame", align 1 +@3 = private unnamed_addr constant [47 x i8] c"github.com/goplus/llgo/cl/internal/foo.initGame", align 1 +@4 = private unnamed_addr constant [38 x i8] c"github.com/goplus/llgo/cl/internal/foo", align 1 +@5 = private unnamed_addr constant [43 x i8] c"github.com/goplus/llgo/cl/internal/foo.Game", align 1 +@6 = private unnamed_addr constant [4 x i8] c"Game", align 1 +@7 = private unnamed_addr constant [10 x i8] c"main.Game1", align 1 @"*_llgo_main.Game2" = linkonce global ptr null @_llgo_main.Game2 = linkonce global ptr null -@14 = private unnamed_addr constant [9 x i8] c"initGame\00", align 1 -@15 = private unnamed_addr constant [14 x i8] c"main.initGame\00", align 1 -@16 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@17 = private unnamed_addr constant [11 x i8] c"main.Game2\00", align 1 +@8 = private unnamed_addr constant [13 x i8] c"main.initGame", align 1 +@9 = private unnamed_addr constant [10 x i8] c"main.Game2", align 1 @"_llgo_github.com/goplus/llgo/cl/internal/foo.Gamer" = linkonce global ptr null -@18 = private unnamed_addr constant [5 x i8] c"Load\00", align 1 -@19 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/cl/internal/foo.initGame\00", align 1 -@20 = private unnamed_addr constant [39 x i8] c"github.com/goplus/llgo/cl/internal/foo\00", align 1 -@21 = private unnamed_addr constant [45 x i8] c"github.com/goplus/llgo/cl/internal/foo.Gamer\00", align 1 +@10 = private unnamed_addr constant [44 x i8] c"github.com/goplus/llgo/cl/internal/foo.Gamer", align 1 @"main.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg" = global ptr null -@22 = private unnamed_addr constant [5 x i8] c"Load\00", align 1 -@23 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/cl/internal/foo.initGame\00", align 1 -@24 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@25 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@26 = private unnamed_addr constant [3 x i8] c"OK\00", align 1 -@27 = private unnamed_addr constant [5 x i8] c"FAIL\00", align 1 +@11 = private unnamed_addr constant [2 x i8] c"OK", align 1 +@12 = private unnamed_addr constant [4 x i8] c"FAIL", align 1 define void @main.Game1.Load(%main.Game1 %0) { _llgo_0: @@ -196,7 +181,7 @@ _llgo_5: ; preds = %_llgo_4, %_llgo_3 %49 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %47, 1 %50 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %51 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %50, i32 0, i32 0 - store ptr @26, ptr %51, align 8 + store ptr @11, ptr %51, align 8 %52 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %50, i32 0, i32 1 store i64 2, ptr %52, align 4 %53 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %50, align 8 @@ -241,7 +226,7 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6 %71 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %69, 1 %72 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %73 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %72, i32 0, i32 0 - store ptr @27, ptr %73, align 8 + store ptr @12, ptr %73, align 8 %74 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %72, i32 0, i32 1 store i64 4, ptr %74, align 4 %75 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %72, align 8 @@ -439,14 +424,14 @@ _llgo_13: ; preds = %_llgo_12 %87 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %84, align 8 %88 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %89 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %88, i32 0, i32 0 - store ptr @7, ptr %89, align 8 + store ptr null, ptr %89, align 8 %90 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %88, i32 0, i32 1 store i64 0, ptr %90, align 4 %91 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %88, align 8 %92 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %87, ptr %81, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %91, i1 true) %93 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %94 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %93, i32 0, i32 0 - store ptr @8, ptr %94, align 8 + store ptr @0, ptr %94, align 8 %95 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %93, i32 0, i32 1 store i64 4, ptr %95, align 4 %96 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %93, align 8 @@ -472,7 +457,7 @@ _llgo_14: ; preds = %_llgo_13, %_llgo_12 _llgo_15: ; preds = %_llgo_14 %106 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %107 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %106, i32 0, i32 0 - store ptr @9, ptr %107, align 8 + store ptr @1, ptr %107, align 8 %108 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %106, i32 0, i32 1 store i64 4, ptr %108, align 4 %109 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %106, align 8 @@ -489,13 +474,13 @@ _llgo_15: ; preds = %_llgo_14 %116 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %111, align 8 %117 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %118 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %117, i32 0, i32 0 - store ptr @10, ptr %118, align 8 + store ptr @2, ptr %118, align 8 %119 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %117, i32 0, i32 1 store i64 8, ptr %119, align 4 %120 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %117, align 8 %121 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %122 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %121, i32 0, i32 0 - store ptr @11, ptr %122, align 8 + store ptr @3, ptr %122, align 8 %123 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %121, i32 0, i32 1 store i64 47, ptr %123, align 4 %124 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %121, align 8 @@ -525,13 +510,13 @@ _llgo_15: ; preds = %_llgo_14 %139 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %135, align 8 %140 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %141 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %140, i32 0, i32 0 - store ptr @12, ptr %141, align 8 + store ptr @0, ptr %141, align 8 %142 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %140, i32 0, i32 1 store i64 4, ptr %142, align 4 %143 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %140, align 8 %144 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %145 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %144, i32 0, i32 0 - store ptr @13, ptr %145, align 8 + store ptr @7, ptr %145, align 8 %146 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %144, i32 0, i32 1 store i64 10, ptr %146, align 4 %147 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %144, align 8 @@ -566,13 +551,13 @@ _llgo_20: ; preds = %_llgo_19, %_llgo_18 _llgo_21: ; preds = %_llgo_20 %156 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %157 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %156, i32 0, i32 0 - store ptr @14, ptr %157, align 8 + store ptr @2, ptr %157, align 8 %158 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %156, i32 0, i32 1 store i64 8, ptr %158, align 4 %159 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %156, align 8 %160 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %161 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %160, i32 0, i32 0 - store ptr @15, ptr %161, align 8 + store ptr @8, ptr %161, align 8 %162 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %160, i32 0, i32 1 store i64 13, ptr %162, align 4 %163 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %160, align 8 @@ -600,13 +585,13 @@ _llgo_21: ; preds = %_llgo_20 %177 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %173, align 8 %178 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %179 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %178, i32 0, i32 0 - store ptr @16, ptr %179, align 8 + store ptr @0, ptr %179, align 8 %180 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %178, i32 0, i32 1 store i64 4, ptr %180, align 4 %181 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %178, align 8 %182 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %183 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %182, i32 0, i32 0 - store ptr @17, ptr %183, align 8 + store ptr @9, ptr %183, align 8 %184 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %182, i32 0, i32 1 store i64 10, ptr %184, align 4 %185 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %182, align 8 @@ -634,7 +619,7 @@ _llgo_24: ; preds = %_llgo_23, %_llgo_22 _llgo_25: ; preds = %_llgo_24 %194 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %195 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %194, i32 0, i32 0 - store ptr @18, ptr %195, align 8 + store ptr @1, ptr %195, align 8 %196 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %194, i32 0, i32 1 store i64 4, ptr %196, align 4 %197 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %194, align 8 @@ -646,7 +631,7 @@ _llgo_25: ; preds = %_llgo_24 %201 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %198, align 8 %202 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %203 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %202, i32 0, i32 0 - store ptr @19, ptr %203, align 8 + store ptr @3, ptr %203, align 8 %204 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %202, i32 0, i32 1 store i64 47, ptr %204, align 4 %205 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %202, align 8 @@ -671,13 +656,13 @@ _llgo_25: ; preds = %_llgo_24 %217 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %213, align 8 %218 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %219 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %218, i32 0, i32 0 - store ptr @20, ptr %219, align 8 + store ptr @4, ptr %219, align 8 %220 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %218, i32 0, i32 1 store i64 38, ptr %220, align 4 %221 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %218, align 8 %222 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %223 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %222, i32 0, i32 0 - store ptr @21, ptr %223, align 8 + store ptr @10, ptr %223, align 8 %224 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %222, i32 0, i32 1 store i64 44, ptr %224, align 4 %225 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %222, align 8 @@ -690,7 +675,7 @@ _llgo_26: ; preds = %_llgo_25, %_llgo_24 %228 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 %229 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %230 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %229, i32 0, i32 0 - store ptr @22, ptr %230, align 8 + store ptr @1, ptr %230, align 8 %231 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %229, i32 0, i32 1 store i64 4, ptr %231, align 4 %232 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %229, align 8 @@ -702,7 +687,7 @@ _llgo_26: ; preds = %_llgo_25, %_llgo_24 %236 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %233, align 8 %237 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %238 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %237, i32 0, i32 0 - store ptr @23, ptr %238, align 8 + store ptr @3, ptr %238, align 8 %239 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %237, i32 0, i32 1 store i64 47, ptr %239, align 4 %240 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %237, align 8 @@ -727,13 +712,13 @@ _llgo_26: ; preds = %_llgo_25, %_llgo_24 %252 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %248, align 8 %253 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %254 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %253, i32 0, i32 0 - store ptr @24, ptr %254, align 8 + store ptr @0, ptr %254, align 8 %255 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %253, i32 0, i32 1 store i64 4, ptr %255, align 4 %256 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %253, align 8 %257 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %258 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %257, i32 0, i32 0 - store ptr @25, ptr %258, align 8 + store ptr null, ptr %258, align 8 %259 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %257, i32 0, i32 1 store i64 0, ptr %259, align 4 %260 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %257, align 8 diff --git a/cl/_testgo/invoke/out.ll b/cl/_testgo/invoke/out.ll index aca1f8ab..3f419b70 100644 --- a/cl/_testgo/invoke/out.ll +++ b/cl/_testgo/invoke/out.ll @@ -12,64 +12,43 @@ source_filename = "main" %"github.com/goplus/llgo/internal/abi.Imethod" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr } @"main.init$guard" = global ptr null -@0 = private unnamed_addr constant [7 x i8] c"invoke\00", align 1 -@1 = private unnamed_addr constant [8 x i8] c"invoke1\00", align 1 -@2 = private unnamed_addr constant [8 x i8] c"invoke2\00", align 1 -@3 = private unnamed_addr constant [8 x i8] c"invoke3\00", align 1 +@0 = private unnamed_addr constant [6 x i8] c"invoke", align 1 +@1 = private unnamed_addr constant [7 x i8] c"invoke1", align 1 +@2 = private unnamed_addr constant [7 x i8] c"invoke2", align 1 +@3 = private unnamed_addr constant [7 x i8] c"invoke3", align 1 @__llgo_argc = global ptr null @__llgo_argv = global ptr null -@4 = private unnamed_addr constant [6 x i8] c"hello\00", align 1 +@4 = private unnamed_addr constant [5 x i8] c"hello", align 1 @_llgo_main.T = linkonce global ptr null @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = global ptr null @_llgo_string = linkonce global ptr null -@5 = private unnamed_addr constant [2 x i8] c"s\00", align 1 -@6 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@7 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@8 = private unnamed_addr constant [7 x i8] c"Invoke\00", align 1 +@5 = private unnamed_addr constant [1 x i8] c"s", align 1 +@6 = private unnamed_addr constant [4 x i8] c"main", align 1 +@7 = private unnamed_addr constant [6 x i8] c"Invoke", align 1 @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA" = linkonce global ptr null @_llgo_int = linkonce global ptr null -@9 = private unnamed_addr constant [7 x i8] c"Method\00", align 1 +@8 = private unnamed_addr constant [6 x i8] c"Method", align 1 @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null -@10 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@11 = private unnamed_addr constant [7 x i8] c"main.T\00", align 1 +@9 = private unnamed_addr constant [6 x i8] c"main.T", align 1 @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0" = linkonce global ptr null -@12 = private unnamed_addr constant [7 x i8] c"Invoke\00", align 1 -@13 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@14 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @"*_llgo_main.T" = linkonce global ptr null @_llgo_main.T1 = linkonce global ptr null -@15 = private unnamed_addr constant [7 x i8] c"Invoke\00", align 1 -@16 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@17 = private unnamed_addr constant [8 x i8] c"main.T1\00", align 1 +@10 = private unnamed_addr constant [7 x i8] c"main.T1", align 1 @"*_llgo_main.T1" = linkonce global ptr null @_llgo_main.T2 = linkonce global ptr null @_llgo_float64 = linkonce global ptr null -@18 = private unnamed_addr constant [7 x i8] c"Invoke\00", align 1 -@19 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@20 = private unnamed_addr constant [8 x i8] c"main.T2\00", align 1 +@11 = private unnamed_addr constant [7 x i8] c"main.T2", align 1 @"*_llgo_main.T2" = linkonce global ptr null @"*_llgo_main.T3" = linkonce global ptr null @_llgo_main.T3 = linkonce global ptr null @_llgo_int8 = linkonce global ptr null -@21 = private unnamed_addr constant [7 x i8] c"Invoke\00", align 1 -@22 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@23 = private unnamed_addr constant [8 x i8] c"main.T3\00", align 1 +@12 = private unnamed_addr constant [7 x i8] c"main.T3", align 1 @"_llgo_iface$jwmSdgh1zvY_TDIgLzCkvkbiyrdwl9N806DH0JGcyMI" = linkonce global ptr null -@24 = private unnamed_addr constant [7 x i8] c"Invoke\00", align 1 -@25 = private unnamed_addr constant [7 x i8] c"Method\00", align 1 -@26 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@27 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@28 = private unnamed_addr constant [6 x i8] c"world\00", align 1 +@13 = private unnamed_addr constant [5 x i8] c"world", align 1 @_llgo_main.I = linkonce global ptr null -@29 = private unnamed_addr constant [7 x i8] c"Invoke\00", align 1 -@30 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@31 = private unnamed_addr constant [7 x i8] c"main.I\00", align 1 -@32 = private unnamed_addr constant [22 x i8] c"type assertion failed\00", align 1 +@14 = private unnamed_addr constant [6 x i8] c"main.I", align 1 +@15 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1 @_llgo_any = linkonce global ptr null -@33 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@34 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@35 = private unnamed_addr constant [22 x i8] c"type assertion failed\00", align 1 -@36 = private unnamed_addr constant [22 x i8] c"type assertion failed\00", align 1 define i64 @main.T.Invoke(%main.T %0) { _llgo_0: @@ -343,7 +322,7 @@ _llgo_0: %97 = getelementptr inbounds %main.T, ptr %96, i32 0, i32 0 %98 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %99 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %98, i32 0, i32 0 - store ptr @28, ptr %99, align 8 + store ptr @13, ptr %99, align 8 %100 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %98, i32 0, i32 1 store i64 5, ptr %100, align 4 %101 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %98, align 8 @@ -382,7 +361,7 @@ _llgo_1: ; preds = %_llgo_0 _llgo_2: ; preds = %_llgo_0 %122 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %123 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %122, i32 0, i32 0 - store ptr @32, ptr %123, align 8 + store ptr @15, ptr %123, align 8 %124 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %122, i32 0, i32 1 store i64 21, ptr %124, align 4 %125 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %122, align 8 @@ -414,7 +393,7 @@ _llgo_3: ; preds = %_llgo_1 _llgo_4: ; preds = %_llgo_1 %140 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %141 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %140, i32 0, i32 0 - store ptr @35, ptr %141, align 8 + store ptr @15, ptr %141, align 8 %142 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %140, i32 0, i32 1 store i64 21, ptr %142, align 4 %143 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %140, align 8 @@ -447,7 +426,7 @@ _llgo_5: ; preds = %_llgo_3 _llgo_6: ; preds = %_llgo_3 %157 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %158 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %157, i32 0, i32 0 - store ptr @36, ptr %158, align 8 + store ptr @15, ptr %158, align 8 %159 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %157, i32 0, i32 1 store i64 21, ptr %159, align 4 %160 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %157, align 8 @@ -511,14 +490,14 @@ _llgo_4: ; preds = %_llgo_3, %_llgo_2 %10 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %7, align 8 %11 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %12 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %11, i32 0, i32 0 - store ptr @6, ptr %12, align 8 + store ptr null, ptr %12, align 8 %13 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %11, i32 0, i32 1 store i64 0, ptr %13, align 4 %14 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %11, align 8 %15 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %10, ptr %6, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %14, i1 false) %16 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %17 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %16, i32 0, i32 0 - store ptr @7, ptr %17, align 8 + store ptr @6, ptr %17, align 8 %18 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %16, i32 0, i32 1 store i64 4, ptr %18, align 4 %19 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %16, align 8 @@ -541,7 +520,7 @@ _llgo_4: ; preds = %_llgo_3, %_llgo_2 _llgo_5: ; preds = %_llgo_4 %29 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %30 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %29, i32 0, i32 0 - store ptr @8, ptr %30, align 8 + store ptr @7, ptr %30, align 8 %31 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %29, i32 0, i32 1 store i64 6, ptr %31, align 4 %32 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %29, align 8 @@ -561,598 +540,622 @@ _llgo_7: ; preds = %_llgo_5 br label %_llgo_8 _llgo_8: ; preds = %_llgo_7, %_llgo_5 - %39 = load ptr, ptr @_llgo_int, align 8 - %40 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %41 = icmp eq ptr %40, null - br i1 %41, label %_llgo_9, label %_llgo_10 + %39 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %38, i32 0, i32 6 + %40 = load i8, ptr %39, align 1 + %41 = or i8 %40, 32 + store i8 %41, ptr %39, align 1 + %42 = load ptr, ptr @_llgo_int, align 8 + %43 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %44 = icmp eq ptr %43, null + br i1 %44, label %_llgo_9, label %_llgo_10 _llgo_9: ; preds = %_llgo_8 - %42 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - %43 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %44 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %43, i32 0, i32 0 - store ptr %42, ptr %44, align 8 - %45 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %43, i32 0, i32 1 - store i64 0, ptr %45, align 4 - %46 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %43, i32 0, i32 2 - store i64 0, ptr %46, align 4 - %47 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %43, align 8 - %48 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) - %49 = getelementptr ptr, ptr %48, i64 0 - store ptr %39, ptr %49, align 8 - %50 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %51 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %50, i32 0, i32 0 - store ptr %48, ptr %51, align 8 - %52 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %50, i32 0, i32 1 - store i64 1, ptr %52, align 4 - %53 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %50, i32 0, i32 2 - store i64 1, ptr %53, align 4 - %54 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %50, align 8 - %55 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %47, %"github.com/goplus/llgo/internal/runtime.Slice" %54, i1 false) - store ptr %55, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %45 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + %46 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %47 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %46, i32 0, i32 0 + store ptr %45, ptr %47, align 8 + %48 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %46, i32 0, i32 1 + store i64 0, ptr %48, align 4 + %49 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %46, i32 0, i32 2 + store i64 0, ptr %49, align 4 + %50 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %46, align 8 + %51 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) + %52 = getelementptr ptr, ptr %51, i64 0 + store ptr %42, ptr %52, align 8 + %53 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %54 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %53, i32 0, i32 0 + store ptr %51, ptr %54, align 8 + %55 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %53, i32 0, i32 1 + store i64 1, ptr %55, align 4 + %56 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %53, i32 0, i32 2 + store i64 1, ptr %56, align 4 + %57 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %53, align 8 + %58 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %50, %"github.com/goplus/llgo/internal/runtime.Slice" %57, i1 false) + store ptr %58, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 br label %_llgo_10 _llgo_10: ; preds = %_llgo_9, %_llgo_8 - %56 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %57 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %58 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %57, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %32, ptr %58, align 8 - %59 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %57, i32 0, i32 1 - store ptr %56, ptr %59, align 8 - %60 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %57, i32 0, i32 2 - store ptr @"main.(*T).Invoke", ptr %60, align 8 - %61 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %57, i32 0, i32 3 - store ptr @"main.(*T).Invoke", ptr %61, align 8 - %62 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %57, align 8 - %63 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %64 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %63, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %32, ptr %64, align 8 - %65 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %63, i32 0, i32 1 - store ptr %56, ptr %65, align 8 - %66 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %63, i32 0, i32 2 - store ptr @"main.(*T).Invoke", ptr %66, align 8 - %67 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %63, i32 0, i32 3 - store ptr @main.T.Invoke, ptr %67, align 8 - %68 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %63, align 8 - %69 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %70 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %69, i32 0, i32 0 - store ptr @9, ptr %70, align 8 - %71 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %69, i32 0, i32 1 - store i64 6, ptr %71, align 4 - %72 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %69, align 8 - %73 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %74 = icmp eq ptr %73, null - br i1 %74, label %_llgo_11, label %_llgo_12 + %59 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %60 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %61 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %60, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %32, ptr %61, align 8 + %62 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %60, i32 0, i32 1 + store ptr %59, ptr %62, align 8 + %63 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %60, i32 0, i32 2 + store ptr @"main.(*T).Invoke", ptr %63, align 8 + %64 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %60, i32 0, i32 3 + store ptr @"main.(*T).Invoke", ptr %64, align 8 + %65 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %60, align 8 + %66 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %67 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %66, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %32, ptr %67, align 8 + %68 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %66, i32 0, i32 1 + store ptr %59, ptr %68, align 8 + %69 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %66, i32 0, i32 2 + store ptr @"main.(*T).Invoke", ptr %69, align 8 + %70 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %66, i32 0, i32 3 + store ptr @main.T.Invoke, ptr %70, align 8 + %71 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %66, align 8 + %72 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %73 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %72, i32 0, i32 0 + store ptr @8, ptr %73, align 8 + %74 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %72, i32 0, i32 1 + store i64 6, ptr %74, align 4 + %75 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %72, align 8 + %76 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + %77 = icmp eq ptr %76, null + br i1 %77, label %_llgo_11, label %_llgo_12 _llgo_11: ; preds = %_llgo_10 - %75 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - %76 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %77 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %76, i32 0, i32 0 - store ptr %75, ptr %77, align 8 - %78 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %76, i32 0, i32 1 - store i64 0, ptr %78, align 4 - %79 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %76, i32 0, i32 2 - store i64 0, ptr %79, align 4 - %80 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %76, align 8 - %81 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - %82 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %83 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %82, i32 0, i32 0 - store ptr %81, ptr %83, align 8 - %84 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %82, i32 0, i32 1 - store i64 0, ptr %84, align 4 - %85 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %82, i32 0, i32 2 - store i64 0, ptr %85, align 4 - %86 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %82, align 8 - %87 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %80, %"github.com/goplus/llgo/internal/runtime.Slice" %86, i1 false) - store ptr %87, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + %78 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + %79 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %80 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %79, i32 0, i32 0 + store ptr %78, ptr %80, align 8 + %81 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %79, i32 0, i32 1 + store i64 0, ptr %81, align 4 + %82 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %79, i32 0, i32 2 + store i64 0, ptr %82, align 4 + %83 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %79, align 8 + %84 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + %85 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %86 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %85, i32 0, i32 0 + store ptr %84, ptr %86, align 8 + %87 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %85, i32 0, i32 1 + store i64 0, ptr %87, align 4 + %88 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %85, i32 0, i32 2 + store i64 0, ptr %88, align 4 + %89 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %85, align 8 + %90 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %83, %"github.com/goplus/llgo/internal/runtime.Slice" %89, i1 false) + store ptr %90, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 br label %_llgo_12 _llgo_12: ; preds = %_llgo_11, %_llgo_10 - %88 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %89 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %90 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %89, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %72, ptr %90, align 8 - %91 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %89, i32 0, i32 1 - store ptr %88, ptr %91, align 8 - %92 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %89, i32 0, i32 2 - store ptr @"main.(*T).Method", ptr %92, align 8 - %93 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %89, i32 0, i32 3 - store ptr @"main.(*T).Method", ptr %93, align 8 - %94 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %89, align 8 - %95 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) - %96 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %95, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %68, ptr %96, align 8 - %97 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %98 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %97, i32 0, i32 0 - store ptr %95, ptr %98, align 8 - %99 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %97, i32 0, i32 1 - store i64 1, ptr %99, align 4 - %100 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %97, i32 0, i32 2 - store i64 1, ptr %100, align 4 - %101 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %97, align 8 - %102 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80) - %103 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %102, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %62, ptr %103, align 8 - %104 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %102, i64 1 - store %"github.com/goplus/llgo/internal/abi.Method" %94, ptr %104, align 8 - %105 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %106 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %105, i32 0, i32 0 - store ptr %102, ptr %106, align 8 - %107 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %105, i32 0, i32 1 - store i64 2, ptr %107, align 4 - %108 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %105, i32 0, i32 2 - store i64 2, ptr %108, align 4 - %109 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %105, align 8 - %110 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %111 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %110, i32 0, i32 0 - store ptr @10, ptr %111, align 8 - %112 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %110, i32 0, i32 1 - store i64 4, ptr %112, align 4 - %113 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %110, align 8 - %114 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %115 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %114, i32 0, i32 0 - store ptr @11, ptr %115, align 8 - %116 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %114, i32 0, i32 1 - store i64 6, ptr %116, align 4 - %117 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %114, align 8 - call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %2, %"github.com/goplus/llgo/internal/runtime.String" %113, %"github.com/goplus/llgo/internal/runtime.String" %117, ptr %28, %"github.com/goplus/llgo/internal/runtime.Slice" %101, %"github.com/goplus/llgo/internal/runtime.Slice" %109) + %91 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + %92 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %93 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %92, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %75, ptr %93, align 8 + %94 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %92, i32 0, i32 1 + store ptr %91, ptr %94, align 8 + %95 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %92, i32 0, i32 2 + store ptr @"main.(*T).Method", ptr %95, align 8 + %96 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %92, i32 0, i32 3 + store ptr @"main.(*T).Method", ptr %96, align 8 + %97 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %92, align 8 + %98 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) + %99 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %98, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %71, ptr %99, align 8 + %100 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %101 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %100, i32 0, i32 0 + store ptr %98, ptr %101, align 8 + %102 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %100, i32 0, i32 1 + store i64 1, ptr %102, align 4 + %103 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %100, i32 0, i32 2 + store i64 1, ptr %103, align 4 + %104 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %100, align 8 + %105 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80) + %106 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %105, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %65, ptr %106, align 8 + %107 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %105, i64 1 + store %"github.com/goplus/llgo/internal/abi.Method" %97, ptr %107, align 8 + %108 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %109 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %108, i32 0, i32 0 + store ptr %105, ptr %109, align 8 + %110 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %108, i32 0, i32 1 + store i64 2, ptr %110, align 4 + %111 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %108, i32 0, i32 2 + store i64 2, ptr %111, align 4 + %112 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %108, align 8 + %113 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %114 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %113, i32 0, i32 0 + store ptr @6, ptr %114, align 8 + %115 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %113, i32 0, i32 1 + store i64 4, ptr %115, align 4 + %116 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %113, align 8 + %117 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %118 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %117, i32 0, i32 0 + store ptr @9, ptr %118, align 8 + %119 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %117, i32 0, i32 1 + store i64 6, ptr %119, align 4 + %120 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %117, align 8 + call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %2, %"github.com/goplus/llgo/internal/runtime.String" %116, %"github.com/goplus/llgo/internal/runtime.String" %120, ptr %28, %"github.com/goplus/llgo/internal/runtime.Slice" %104, %"github.com/goplus/llgo/internal/runtime.Slice" %112) br label %_llgo_6 _llgo_13: ; preds = %_llgo_6 - %118 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %119 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %118, i32 0, i32 0 - store ptr @12, ptr %119, align 8 - %120 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %118, i32 0, i32 1 - store i64 6, ptr %120, align 4 - %121 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %118, align 8 - %122 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %123 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %122, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %121, ptr %123, align 8 - %124 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %122, i32 0, i32 1 - store ptr %35, ptr %124, align 8 - %125 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %122, align 8 - %126 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) - %127 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %126, i64 0 - store %"github.com/goplus/llgo/internal/abi.Imethod" %125, ptr %127, align 8 - %128 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %129 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %128, i32 0, i32 0 - store ptr %126, ptr %129, align 8 - %130 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %128, i32 0, i32 1 - store i64 1, ptr %130, align 4 - %131 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %128, i32 0, i32 2 - store i64 1, ptr %131, align 4 - %132 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %128, align 8 - %133 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %134 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %133, i32 0, i32 0 - store ptr @13, ptr %134, align 8 - %135 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %133, i32 0, i32 1 - store i64 4, ptr %135, align 4 - %136 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %133, align 8 - %137 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %138 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %137, i32 0, i32 0 - store ptr @14, ptr %138, align 8 - %139 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %137, i32 0, i32 1 - store i64 0, ptr %139, align 4 - %140 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %137, align 8 - %141 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %136, %"github.com/goplus/llgo/internal/runtime.String" %140, %"github.com/goplus/llgo/internal/runtime.Slice" %132) - store ptr %141, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 + %121 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %122 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %121, i32 0, i32 0 + store ptr @7, ptr %122, align 8 + %123 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %121, i32 0, i32 1 + store i64 6, ptr %123, align 4 + %124 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %121, align 8 + %125 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %126 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %125, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %124, ptr %126, align 8 + %127 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %125, i32 0, i32 1 + store ptr %35, ptr %127, align 8 + %128 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %125, align 8 + %129 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) + %130 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %129, i64 0 + store %"github.com/goplus/llgo/internal/abi.Imethod" %128, ptr %130, align 8 + %131 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %132 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %131, i32 0, i32 0 + store ptr %129, ptr %132, align 8 + %133 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %131, i32 0, i32 1 + store i64 1, ptr %133, align 4 + %134 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %131, i32 0, i32 2 + store i64 1, ptr %134, align 4 + %135 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %131, align 8 + %136 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %137 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %136, i32 0, i32 0 + store ptr @6, ptr %137, align 8 + %138 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %136, i32 0, i32 1 + store i64 4, ptr %138, align 4 + %139 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %136, align 8 + %140 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %141 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %140, i32 0, i32 0 + store ptr null, ptr %141, align 8 + %142 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %140, i32 0, i32 1 + store i64 0, ptr %142, align 4 + %143 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %140, align 8 + %144 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %139, %"github.com/goplus/llgo/internal/runtime.String" %143, %"github.com/goplus/llgo/internal/runtime.Slice" %135) + store ptr %144, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 br label %_llgo_14 _llgo_14: ; preds = %_llgo_13, %_llgo_6 - %142 = load ptr, ptr @_llgo_main.T, align 8 - %143 = load ptr, ptr @"*_llgo_main.T", align 8 - %144 = icmp eq ptr %143, null - br i1 %144, label %_llgo_15, label %_llgo_16 + %145 = load ptr, ptr @_llgo_main.T, align 8 + %146 = load ptr, ptr @"*_llgo_main.T", align 8 + %147 = icmp eq ptr %146, null + br i1 %147, label %_llgo_15, label %_llgo_16 _llgo_15: ; preds = %_llgo_14 - %145 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %142) - store ptr %145, ptr @"*_llgo_main.T", align 8 + %148 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %145) + store ptr %148, ptr @"*_llgo_main.T", align 8 br label %_llgo_16 _llgo_16: ; preds = %_llgo_15, %_llgo_14 - %146 = load ptr, ptr @_llgo_main.T1, align 8 - %147 = icmp eq ptr %146, null - br i1 %147, label %_llgo_17, label %_llgo_18 + %149 = load ptr, ptr @_llgo_main.T1, align 8 + %150 = icmp eq ptr %149, null + br i1 %150, label %_llgo_17, label %_llgo_18 _llgo_17: ; preds = %_llgo_16 - %148 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 2, i64 1, i64 1) - store ptr %148, ptr @_llgo_main.T1, align 8 + %151 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 2, i64 1, i64 1) + store ptr %151, ptr @_llgo_main.T1, align 8 br label %_llgo_18 _llgo_18: ; preds = %_llgo_17, %_llgo_16 - %149 = load ptr, ptr @_llgo_int, align 8 - br i1 %147, label %_llgo_19, label %_llgo_20 + %152 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %151, i32 0, i32 6 + %153 = load i8, ptr %152, align 1 + %154 = or i8 %153, 32 + store i8 %154, ptr %152, align 1 + %155 = load ptr, ptr @_llgo_int, align 8 + br i1 %150, label %_llgo_19, label %_llgo_20 _llgo_19: ; preds = %_llgo_18 - %150 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %151 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %150, i32 0, i32 0 - store ptr @15, ptr %151, align 8 - %152 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %150, i32 0, i32 1 - store i64 6, ptr %152, align 4 - %153 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %150, align 8 - %154 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %155 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %156 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %155, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %153, ptr %156, align 8 - %157 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %155, i32 0, i32 1 - store ptr %154, ptr %157, align 8 - %158 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %155, i32 0, i32 2 - store ptr @"main.(*T1).Invoke", ptr %158, align 8 - %159 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %155, i32 0, i32 3 - store ptr @"main.(*T1).Invoke", ptr %159, align 8 - %160 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %155, align 8 + %156 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %157 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %156, i32 0, i32 0 + store ptr @7, ptr %157, align 8 + %158 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %156, i32 0, i32 1 + store i64 6, ptr %158, align 4 + %159 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %156, align 8 + %160 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %161 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 %162 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %161, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %153, ptr %162, align 8 + store %"github.com/goplus/llgo/internal/runtime.String" %159, ptr %162, align 8 %163 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %161, i32 0, i32 1 - store ptr %154, ptr %163, align 8 + store ptr %160, ptr %163, align 8 %164 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %161, i32 0, i32 2 store ptr @"main.(*T1).Invoke", ptr %164, align 8 %165 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %161, i32 0, i32 3 - store ptr @main.T1.Invoke, ptr %165, align 8 + store ptr @"main.(*T1).Invoke", ptr %165, align 8 %166 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %161, align 8 - %167 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) - %168 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %167, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %166, ptr %168, align 8 - %169 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %170 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %169, i32 0, i32 0 - store ptr %167, ptr %170, align 8 - %171 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %169, i32 0, i32 1 - store i64 1, ptr %171, align 4 - %172 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %169, i32 0, i32 2 - store i64 1, ptr %172, align 4 - %173 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %169, align 8 - %174 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) - %175 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %174, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %160, ptr %175, align 8 - %176 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %177 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %176, i32 0, i32 0 - store ptr %174, ptr %177, align 8 - %178 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %176, i32 0, i32 1 + %167 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %168 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %167, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %159, ptr %168, align 8 + %169 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %167, i32 0, i32 1 + store ptr %160, ptr %169, align 8 + %170 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %167, i32 0, i32 2 + store ptr @"main.(*T1).Invoke", ptr %170, align 8 + %171 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %167, i32 0, i32 3 + store ptr @main.T1.Invoke, ptr %171, align 8 + %172 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %167, align 8 + %173 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) + %174 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %173, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %172, ptr %174, align 8 + %175 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %176 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %175, i32 0, i32 0 + store ptr %173, ptr %176, align 8 + %177 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %175, i32 0, i32 1 + store i64 1, ptr %177, align 4 + %178 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %175, i32 0, i32 2 store i64 1, ptr %178, align 4 - %179 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %176, i32 0, i32 2 - store i64 1, ptr %179, align 4 - %180 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %176, align 8 - %181 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %182 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %181, i32 0, i32 0 - store ptr @16, ptr %182, align 8 - %183 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %181, i32 0, i32 1 - store i64 4, ptr %183, align 4 - %184 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %181, align 8 - %185 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %186 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %185, i32 0, i32 0 - store ptr @17, ptr %186, align 8 - %187 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %185, i32 0, i32 1 - store i64 7, ptr %187, align 4 - %188 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %185, align 8 - call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %148, %"github.com/goplus/llgo/internal/runtime.String" %184, %"github.com/goplus/llgo/internal/runtime.String" %188, ptr %149, %"github.com/goplus/llgo/internal/runtime.Slice" %173, %"github.com/goplus/llgo/internal/runtime.Slice" %180) + %179 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %175, align 8 + %180 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) + %181 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %180, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %166, ptr %181, align 8 + %182 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %183 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %182, i32 0, i32 0 + store ptr %180, ptr %183, align 8 + %184 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %182, i32 0, i32 1 + store i64 1, ptr %184, align 4 + %185 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %182, i32 0, i32 2 + store i64 1, ptr %185, align 4 + %186 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %182, align 8 + %187 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %188 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %187, i32 0, i32 0 + store ptr @6, ptr %188, align 8 + %189 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %187, i32 0, i32 1 + store i64 4, ptr %189, align 4 + %190 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %187, align 8 + %191 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %192 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %191, i32 0, i32 0 + store ptr @10, ptr %192, align 8 + %193 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %191, i32 0, i32 1 + store i64 7, ptr %193, align 4 + %194 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %191, align 8 + call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %151, %"github.com/goplus/llgo/internal/runtime.String" %190, %"github.com/goplus/llgo/internal/runtime.String" %194, ptr %155, %"github.com/goplus/llgo/internal/runtime.Slice" %179, %"github.com/goplus/llgo/internal/runtime.Slice" %186) br label %_llgo_20 _llgo_20: ; preds = %_llgo_19, %_llgo_18 - %189 = load ptr, ptr @_llgo_main.T1, align 8 - %190 = load ptr, ptr @"*_llgo_main.T1", align 8 - %191 = icmp eq ptr %190, null - br i1 %191, label %_llgo_21, label %_llgo_22 + %195 = load ptr, ptr @_llgo_main.T1, align 8 + %196 = load ptr, ptr @"*_llgo_main.T1", align 8 + %197 = icmp eq ptr %196, null + br i1 %197, label %_llgo_21, label %_llgo_22 _llgo_21: ; preds = %_llgo_20 - %192 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %189) - store ptr %192, ptr @"*_llgo_main.T1", align 8 + %198 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %195) + store ptr %198, ptr @"*_llgo_main.T1", align 8 br label %_llgo_22 _llgo_22: ; preds = %_llgo_21, %_llgo_20 - %193 = load ptr, ptr @_llgo_main.T2, align 8 - %194 = icmp eq ptr %193, null - br i1 %194, label %_llgo_23, label %_llgo_24 + %199 = load ptr, ptr @_llgo_main.T2, align 8 + %200 = icmp eq ptr %199, null + br i1 %200, label %_llgo_23, label %_llgo_24 _llgo_23: ; preds = %_llgo_22 - %195 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 14, i64 1, i64 1) - store ptr %195, ptr @_llgo_main.T2, align 8 + %201 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 14, i64 1, i64 1) + store ptr %201, ptr @_llgo_main.T2, align 8 br label %_llgo_24 _llgo_24: ; preds = %_llgo_23, %_llgo_22 - %196 = load ptr, ptr @_llgo_float64, align 8 - %197 = icmp eq ptr %196, null - br i1 %197, label %_llgo_25, label %_llgo_26 + %202 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %201, i32 0, i32 6 + %203 = load i8, ptr %202, align 1 + %204 = or i8 %203, 32 + store i8 %204, ptr %202, align 1 + %205 = load ptr, ptr @_llgo_float64, align 8 + %206 = icmp eq ptr %205, null + br i1 %206, label %_llgo_25, label %_llgo_26 _llgo_25: ; preds = %_llgo_24 - %198 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 14) - store ptr %198, ptr @_llgo_float64, align 8 + %207 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 14) + store ptr %207, ptr @_llgo_float64, align 8 br label %_llgo_26 _llgo_26: ; preds = %_llgo_25, %_llgo_24 - %199 = load ptr, ptr @_llgo_float64, align 8 - br i1 %194, label %_llgo_27, label %_llgo_28 + %208 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %207, i32 0, i32 6 + %209 = load i8, ptr %208, align 1 + %210 = or i8 %209, 32 + store i8 %210, ptr %208, align 1 + %211 = load ptr, ptr @_llgo_float64, align 8 + br i1 %200, label %_llgo_27, label %_llgo_28 _llgo_27: ; preds = %_llgo_26 - %200 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %201 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %200, i32 0, i32 0 - store ptr @18, ptr %201, align 8 - %202 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %200, i32 0, i32 1 - store i64 6, ptr %202, align 4 - %203 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %200, align 8 - %204 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %205 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %206 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %205, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %203, ptr %206, align 8 - %207 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %205, i32 0, i32 1 - store ptr %204, ptr %207, align 8 - %208 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %205, i32 0, i32 2 - store ptr @"main.(*T2).Invoke", ptr %208, align 8 - %209 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %205, i32 0, i32 3 - store ptr @"main.(*T2).Invoke", ptr %209, align 8 - %210 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %205, align 8 - %211 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %212 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %211, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %203, ptr %212, align 8 - %213 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %211, i32 0, i32 1 - store ptr %204, ptr %213, align 8 - %214 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %211, i32 0, i32 2 - store ptr @"main.(*T2).Invoke", ptr %214, align 8 - %215 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %211, i32 0, i32 3 - store ptr @main.T2.Invoke, ptr %215, align 8 - %216 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %211, align 8 - %217 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) - %218 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %217, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %216, ptr %218, align 8 - %219 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %220 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %219, i32 0, i32 0 - store ptr %217, ptr %220, align 8 - %221 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %219, i32 0, i32 1 - store i64 1, ptr %221, align 4 - %222 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %219, i32 0, i32 2 - store i64 1, ptr %222, align 4 - %223 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %219, align 8 - %224 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) - %225 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %224, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %210, ptr %225, align 8 - %226 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %227 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %226, i32 0, i32 0 - store ptr %224, ptr %227, align 8 - %228 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %226, i32 0, i32 1 - store i64 1, ptr %228, align 4 - %229 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %226, i32 0, i32 2 - store i64 1, ptr %229, align 4 - %230 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %226, align 8 - %231 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %232 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %231, i32 0, i32 0 - store ptr @19, ptr %232, align 8 - %233 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %231, i32 0, i32 1 - store i64 4, ptr %233, align 4 - %234 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %231, align 8 - %235 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %236 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %235, i32 0, i32 0 - store ptr @20, ptr %236, align 8 - %237 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %235, i32 0, i32 1 - store i64 7, ptr %237, align 4 - %238 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %235, align 8 - call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %195, %"github.com/goplus/llgo/internal/runtime.String" %234, %"github.com/goplus/llgo/internal/runtime.String" %238, ptr %199, %"github.com/goplus/llgo/internal/runtime.Slice" %223, %"github.com/goplus/llgo/internal/runtime.Slice" %230) + %212 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %213 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %212, i32 0, i32 0 + store ptr @7, ptr %213, align 8 + %214 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %212, i32 0, i32 1 + store i64 6, ptr %214, align 4 + %215 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %212, align 8 + %216 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %217 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %218 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %217, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %215, ptr %218, align 8 + %219 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %217, i32 0, i32 1 + store ptr %216, ptr %219, align 8 + %220 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %217, i32 0, i32 2 + store ptr @"main.(*T2).Invoke", ptr %220, align 8 + %221 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %217, i32 0, i32 3 + store ptr @"main.(*T2).Invoke", ptr %221, align 8 + %222 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %217, align 8 + %223 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %224 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %223, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %215, ptr %224, align 8 + %225 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %223, i32 0, i32 1 + store ptr %216, ptr %225, align 8 + %226 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %223, i32 0, i32 2 + store ptr @"main.(*T2).Invoke", ptr %226, align 8 + %227 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %223, i32 0, i32 3 + store ptr @main.T2.Invoke, ptr %227, align 8 + %228 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %223, align 8 + %229 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) + %230 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %229, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %228, ptr %230, align 8 + %231 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %232 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %231, i32 0, i32 0 + store ptr %229, ptr %232, align 8 + %233 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %231, i32 0, i32 1 + store i64 1, ptr %233, align 4 + %234 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %231, i32 0, i32 2 + store i64 1, ptr %234, align 4 + %235 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %231, align 8 + %236 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) + %237 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %236, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %222, ptr %237, align 8 + %238 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %239 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %238, i32 0, i32 0 + store ptr %236, ptr %239, align 8 + %240 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %238, i32 0, i32 1 + store i64 1, ptr %240, align 4 + %241 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %238, i32 0, i32 2 + store i64 1, ptr %241, align 4 + %242 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %238, align 8 + %243 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %244 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %243, i32 0, i32 0 + store ptr @6, ptr %244, align 8 + %245 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %243, i32 0, i32 1 + store i64 4, ptr %245, align 4 + %246 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %243, align 8 + %247 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %248 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %247, i32 0, i32 0 + store ptr @11, ptr %248, align 8 + %249 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %247, i32 0, i32 1 + store i64 7, ptr %249, align 4 + %250 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %247, align 8 + call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %201, %"github.com/goplus/llgo/internal/runtime.String" %246, %"github.com/goplus/llgo/internal/runtime.String" %250, ptr %211, %"github.com/goplus/llgo/internal/runtime.Slice" %235, %"github.com/goplus/llgo/internal/runtime.Slice" %242) br label %_llgo_28 _llgo_28: ; preds = %_llgo_27, %_llgo_26 - %239 = load ptr, ptr @_llgo_main.T2, align 8 - %240 = load ptr, ptr @"*_llgo_main.T2", align 8 - %241 = icmp eq ptr %240, null - br i1 %241, label %_llgo_29, label %_llgo_30 + %251 = load ptr, ptr @_llgo_main.T2, align 8 + %252 = load ptr, ptr @"*_llgo_main.T2", align 8 + %253 = icmp eq ptr %252, null + br i1 %253, label %_llgo_29, label %_llgo_30 _llgo_29: ; preds = %_llgo_28 - %242 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %239) - store ptr %242, ptr @"*_llgo_main.T2", align 8 + %254 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %251) + store ptr %254, ptr @"*_llgo_main.T2", align 8 br label %_llgo_30 _llgo_30: ; preds = %_llgo_29, %_llgo_28 - %243 = load ptr, ptr @_llgo_main.T3, align 8 - %244 = icmp eq ptr %243, null - br i1 %244, label %_llgo_31, label %_llgo_32 + %255 = load ptr, ptr @_llgo_main.T3, align 8 + %256 = icmp eq ptr %255, null + br i1 %256, label %_llgo_31, label %_llgo_32 _llgo_31: ; preds = %_llgo_30 - %245 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 3, i64 0, i64 1) - store ptr %245, ptr @_llgo_main.T3, align 8 + %257 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 3, i64 0, i64 1) + store ptr %257, ptr @_llgo_main.T3, align 8 br label %_llgo_32 _llgo_32: ; preds = %_llgo_31, %_llgo_30 - %246 = load ptr, ptr @_llgo_int8, align 8 - %247 = icmp eq ptr %246, null - br i1 %247, label %_llgo_33, label %_llgo_34 + %258 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %257, i32 0, i32 6 + %259 = load i8, ptr %258, align 1 + %260 = or i8 %259, 32 + store i8 %260, ptr %258, align 1 + %261 = load ptr, ptr @_llgo_int8, align 8 + %262 = icmp eq ptr %261, null + br i1 %262, label %_llgo_33, label %_llgo_34 _llgo_33: ; preds = %_llgo_32 - %248 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 3) - store ptr %248, ptr @_llgo_int8, align 8 + %263 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 3) + store ptr %263, ptr @_llgo_int8, align 8 br label %_llgo_34 _llgo_34: ; preds = %_llgo_33, %_llgo_32 - %249 = load ptr, ptr @_llgo_int8, align 8 - br i1 %244, label %_llgo_35, label %_llgo_36 + %264 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %263, i32 0, i32 6 + %265 = load i8, ptr %264, align 1 + %266 = or i8 %265, 32 + store i8 %266, ptr %264, align 1 + %267 = load ptr, ptr @_llgo_int8, align 8 + br i1 %256, label %_llgo_35, label %_llgo_36 _llgo_35: ; preds = %_llgo_34 - %250 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %251 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %250, i32 0, i32 0 - store ptr @21, ptr %251, align 8 - %252 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %250, i32 0, i32 1 - store i64 6, ptr %252, align 4 - %253 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %250, align 8 - %254 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %255 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %256 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %255, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %253, ptr %256, align 8 - %257 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %255, i32 0, i32 1 - store ptr %254, ptr %257, align 8 - %258 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %255, i32 0, i32 2 - store ptr @"main.(*T3).Invoke", ptr %258, align 8 - %259 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %255, i32 0, i32 3 - store ptr @"main.(*T3).Invoke", ptr %259, align 8 - %260 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %255, align 8 - %261 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) - %262 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %261, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %260, ptr %262, align 8 - %263 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %264 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %263, i32 0, i32 0 - store ptr %261, ptr %264, align 8 - %265 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %263, i32 0, i32 1 - store i64 1, ptr %265, align 4 - %266 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %263, i32 0, i32 2 - store i64 1, ptr %266, align 4 - %267 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %263, align 8 %268 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %269 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %268, i32 0, i32 0 - store ptr @22, ptr %269, align 8 + store ptr @7, ptr %269, align 8 %270 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %268, i32 0, i32 1 - store i64 4, ptr %270, align 4 + store i64 6, ptr %270, align 4 %271 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %268, align 8 - %272 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %273 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %272, i32 0, i32 0 - store ptr @23, ptr %273, align 8 - %274 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %272, i32 0, i32 1 - store i64 7, ptr %274, align 4 - %275 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %272, align 8 - call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %245, %"github.com/goplus/llgo/internal/runtime.String" %271, %"github.com/goplus/llgo/internal/runtime.String" %275, ptr %249, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %267) + %272 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %273 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %274 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %273, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %271, ptr %274, align 8 + %275 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %273, i32 0, i32 1 + store ptr %272, ptr %275, align 8 + %276 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %273, i32 0, i32 2 + store ptr @"main.(*T3).Invoke", ptr %276, align 8 + %277 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %273, i32 0, i32 3 + store ptr @"main.(*T3).Invoke", ptr %277, align 8 + %278 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %273, align 8 + %279 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) + %280 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %279, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %278, ptr %280, align 8 + %281 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %282 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %281, i32 0, i32 0 + store ptr %279, ptr %282, align 8 + %283 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %281, i32 0, i32 1 + store i64 1, ptr %283, align 4 + %284 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %281, i32 0, i32 2 + store i64 1, ptr %284, align 4 + %285 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %281, align 8 + %286 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %287 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %286, i32 0, i32 0 + store ptr @6, ptr %287, align 8 + %288 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %286, i32 0, i32 1 + store i64 4, ptr %288, align 4 + %289 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %286, align 8 + %290 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %291 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %290, i32 0, i32 0 + store ptr @12, ptr %291, align 8 + %292 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %290, i32 0, i32 1 + store i64 7, ptr %292, align 4 + %293 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %290, align 8 + call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %257, %"github.com/goplus/llgo/internal/runtime.String" %289, %"github.com/goplus/llgo/internal/runtime.String" %293, ptr %267, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %285) br label %_llgo_36 _llgo_36: ; preds = %_llgo_35, %_llgo_34 - %276 = load ptr, ptr @_llgo_main.T3, align 8 - %277 = load ptr, ptr @"*_llgo_main.T3", align 8 - %278 = icmp eq ptr %277, null - br i1 %278, label %_llgo_37, label %_llgo_38 + %294 = load ptr, ptr @_llgo_main.T3, align 8 + %295 = load ptr, ptr @"*_llgo_main.T3", align 8 + %296 = icmp eq ptr %295, null + br i1 %296, label %_llgo_37, label %_llgo_38 _llgo_37: ; preds = %_llgo_36 - %279 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %276) - store ptr %279, ptr @"*_llgo_main.T3", align 8 + %297 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %294) + store ptr %297, ptr @"*_llgo_main.T3", align 8 br label %_llgo_38 _llgo_38: ; preds = %_llgo_37, %_llgo_36 - %280 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %281 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %282 = load ptr, ptr @"_llgo_iface$jwmSdgh1zvY_TDIgLzCkvkbiyrdwl9N806DH0JGcyMI", align 8 - %283 = icmp eq ptr %282, null - br i1 %283, label %_llgo_39, label %_llgo_40 + %298 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %299 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + %300 = load ptr, ptr @"_llgo_iface$jwmSdgh1zvY_TDIgLzCkvkbiyrdwl9N806DH0JGcyMI", align 8 + %301 = icmp eq ptr %300, null + br i1 %301, label %_llgo_39, label %_llgo_40 _llgo_39: ; preds = %_llgo_38 - %284 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %285 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %284, i32 0, i32 0 - store ptr @24, ptr %285, align 8 - %286 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %284, i32 0, i32 1 - store i64 6, ptr %286, align 4 - %287 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %284, align 8 - %288 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %289 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %288, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %287, ptr %289, align 8 - %290 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %288, i32 0, i32 1 - store ptr %280, ptr %290, align 8 - %291 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %288, align 8 - %292 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %293 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %292, i32 0, i32 0 - store ptr @25, ptr %293, align 8 - %294 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %292, i32 0, i32 1 - store i64 6, ptr %294, align 4 - %295 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %292, align 8 - %296 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %297 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %296, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %295, ptr %297, align 8 - %298 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %296, i32 0, i32 1 - store ptr %281, ptr %298, align 8 - %299 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %296, align 8 - %300 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) - %301 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %300, i64 0 - store %"github.com/goplus/llgo/internal/abi.Imethod" %291, ptr %301, align 8 - %302 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %300, i64 1 - store %"github.com/goplus/llgo/internal/abi.Imethod" %299, ptr %302, align 8 - %303 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %304 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %303, i32 0, i32 0 - store ptr %300, ptr %304, align 8 - %305 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %303, i32 0, i32 1 - store i64 2, ptr %305, align 4 - %306 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %303, i32 0, i32 2 - store i64 2, ptr %306, align 4 - %307 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %303, align 8 - %308 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %309 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %308, i32 0, i32 0 - store ptr @26, ptr %309, align 8 - %310 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %308, i32 0, i32 1 - store i64 4, ptr %310, align 4 - %311 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %308, align 8 - %312 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %313 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %312, i32 0, i32 0 - store ptr @27, ptr %313, align 8 - %314 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %312, i32 0, i32 1 - store i64 0, ptr %314, align 4 - %315 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %312, align 8 - %316 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %311, %"github.com/goplus/llgo/internal/runtime.String" %315, %"github.com/goplus/llgo/internal/runtime.Slice" %307) - store ptr %316, ptr @"_llgo_iface$jwmSdgh1zvY_TDIgLzCkvkbiyrdwl9N806DH0JGcyMI", align 8 + %302 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %303 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %302, i32 0, i32 0 + store ptr @7, ptr %303, align 8 + %304 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %302, i32 0, i32 1 + store i64 6, ptr %304, align 4 + %305 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %302, align 8 + %306 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %307 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %306, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %305, ptr %307, align 8 + %308 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %306, i32 0, i32 1 + store ptr %298, ptr %308, align 8 + %309 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %306, align 8 + %310 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %311 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %310, i32 0, i32 0 + store ptr @8, ptr %311, align 8 + %312 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %310, i32 0, i32 1 + store i64 6, ptr %312, align 4 + %313 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %310, align 8 + %314 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %315 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %314, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %313, ptr %315, align 8 + %316 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %314, i32 0, i32 1 + store ptr %299, ptr %316, align 8 + %317 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %314, align 8 + %318 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) + %319 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %318, i64 0 + store %"github.com/goplus/llgo/internal/abi.Imethod" %309, ptr %319, align 8 + %320 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %318, i64 1 + store %"github.com/goplus/llgo/internal/abi.Imethod" %317, ptr %320, align 8 + %321 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %322 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %321, i32 0, i32 0 + store ptr %318, ptr %322, align 8 + %323 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %321, i32 0, i32 1 + store i64 2, ptr %323, align 4 + %324 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %321, i32 0, i32 2 + store i64 2, ptr %324, align 4 + %325 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %321, align 8 + %326 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %327 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %326, i32 0, i32 0 + store ptr @6, ptr %327, align 8 + %328 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %326, i32 0, i32 1 + store i64 4, ptr %328, align 4 + %329 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %326, align 8 + %330 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %331 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %330, i32 0, i32 0 + store ptr null, ptr %331, align 8 + %332 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %330, i32 0, i32 1 + store i64 0, ptr %332, align 4 + %333 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %330, align 8 + %334 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %329, %"github.com/goplus/llgo/internal/runtime.String" %333, %"github.com/goplus/llgo/internal/runtime.Slice" %325) + store ptr %334, ptr @"_llgo_iface$jwmSdgh1zvY_TDIgLzCkvkbiyrdwl9N806DH0JGcyMI", align 8 br label %_llgo_40 _llgo_40: ; preds = %_llgo_39, %_llgo_38 - %317 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %318 = load ptr, ptr @_llgo_main.I, align 8 - %319 = icmp eq ptr %318, null - br i1 %319, label %_llgo_41, label %_llgo_42 + %335 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %336 = load ptr, ptr @_llgo_main.I, align 8 + %337 = icmp eq ptr %336, null + br i1 %337, label %_llgo_41, label %_llgo_42 _llgo_41: ; preds = %_llgo_40 - %320 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %321 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %320, i32 0, i32 0 - store ptr @29, ptr %321, align 8 - %322 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %320, i32 0, i32 1 - store i64 6, ptr %322, align 4 - %323 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %320, align 8 - %324 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %325 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %324, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %323, ptr %325, align 8 - %326 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %324, i32 0, i32 1 - store ptr %317, ptr %326, align 8 - %327 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %324, align 8 - %328 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) - %329 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %328, i64 0 - store %"github.com/goplus/llgo/internal/abi.Imethod" %327, ptr %329, align 8 - %330 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %331 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %330, i32 0, i32 0 - store ptr %328, ptr %331, align 8 - %332 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %330, i32 0, i32 1 - store i64 1, ptr %332, align 4 - %333 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %330, i32 0, i32 2 - store i64 1, ptr %333, align 4 - %334 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %330, align 8 - %335 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %336 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %335, i32 0, i32 0 - store ptr @30, ptr %336, align 8 - %337 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %335, i32 0, i32 1 - store i64 4, ptr %337, align 4 - %338 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %335, align 8 - %339 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %340 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %339, i32 0, i32 0 - store ptr @31, ptr %340, align 8 - %341 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %339, i32 0, i32 1 - store i64 6, ptr %341, align 4 - %342 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %339, align 8 - %343 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %338, %"github.com/goplus/llgo/internal/runtime.String" %342, %"github.com/goplus/llgo/internal/runtime.Slice" %334) - store ptr %343, ptr @_llgo_main.I, align 8 + %338 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %339 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %338, i32 0, i32 0 + store ptr @7, ptr %339, align 8 + %340 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %338, i32 0, i32 1 + store i64 6, ptr %340, align 4 + %341 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %338, align 8 + %342 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %343 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %342, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %341, ptr %343, align 8 + %344 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %342, i32 0, i32 1 + store ptr %335, ptr %344, align 8 + %345 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %342, align 8 + %346 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) + %347 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %346, i64 0 + store %"github.com/goplus/llgo/internal/abi.Imethod" %345, ptr %347, align 8 + %348 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %349 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %348, i32 0, i32 0 + store ptr %346, ptr %349, align 8 + %350 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %348, i32 0, i32 1 + store i64 1, ptr %350, align 4 + %351 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %348, i32 0, i32 2 + store i64 1, ptr %351, align 4 + %352 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %348, align 8 + %353 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %354 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %353, i32 0, i32 0 + store ptr @6, ptr %354, align 8 + %355 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %353, i32 0, i32 1 + store i64 4, ptr %355, align 4 + %356 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %353, align 8 + %357 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %358 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %357, i32 0, i32 0 + store ptr @14, ptr %358, align 8 + %359 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %357, i32 0, i32 1 + store i64 6, ptr %359, align 4 + %360 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %357, align 8 + %361 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %356, %"github.com/goplus/llgo/internal/runtime.String" %360, %"github.com/goplus/llgo/internal/runtime.Slice" %352) + store ptr %361, ptr @_llgo_main.I, align 8 br label %_llgo_42 _llgo_42: ; preds = %_llgo_41, %_llgo_40 - %344 = load ptr, ptr @_llgo_any, align 8 - %345 = icmp eq ptr %344, null - br i1 %345, label %_llgo_43, label %_llgo_44 + %362 = load ptr, ptr @_llgo_any, align 8 + %363 = icmp eq ptr %362, null + br i1 %363, label %_llgo_43, label %_llgo_44 _llgo_43: ; preds = %_llgo_42 - %346 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - %347 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %348 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %347, i32 0, i32 0 - store ptr %346, ptr %348, align 8 - %349 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %347, i32 0, i32 1 - store i64 0, ptr %349, align 4 - %350 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %347, i32 0, i32 2 - store i64 0, ptr %350, align 4 - %351 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %347, align 8 - %352 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %353 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %352, i32 0, i32 0 - store ptr @33, ptr %353, align 8 - %354 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %352, i32 0, i32 1 - store i64 4, ptr %354, align 4 - %355 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %352, align 8 - %356 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %357 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %356, i32 0, i32 0 - store ptr @34, ptr %357, align 8 - %358 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %356, i32 0, i32 1 - store i64 0, ptr %358, align 4 - %359 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %356, align 8 - %360 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %355, %"github.com/goplus/llgo/internal/runtime.String" %359, %"github.com/goplus/llgo/internal/runtime.Slice" %351) - store ptr %360, ptr @_llgo_any, align 8 + %364 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + %365 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %366 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %365, i32 0, i32 0 + store ptr %364, ptr %366, align 8 + %367 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %365, i32 0, i32 1 + store i64 0, ptr %367, align 4 + %368 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %365, i32 0, i32 2 + store i64 0, ptr %368, align 4 + %369 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %365, align 8 + %370 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %371 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %370, i32 0, i32 0 + store ptr @6, ptr %371, align 8 + %372 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %370, i32 0, i32 1 + store i64 4, ptr %372, align 4 + %373 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %370, align 8 + %374 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %375 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %374, i32 0, i32 0 + store ptr null, ptr %375, align 8 + %376 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %374, i32 0, i32 1 + store i64 0, ptr %376, align 4 + %377 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %374, align 8 + %378 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %373, %"github.com/goplus/llgo/internal/runtime.String" %377, %"github.com/goplus/llgo/internal/runtime.Slice" %369) + store ptr %378, ptr @_llgo_any, align 8 br label %_llgo_44 _llgo_44: ; preds = %_llgo_43, %_llgo_42 diff --git a/cl/_testgo/reader/out.ll b/cl/_testgo/reader/out.ll index 4d129ddd..4db55df1 100644 --- a/cl/_testgo/reader/out.ll +++ b/cl/_testgo/reader/out.ll @@ -9,6 +9,7 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } %main.errorString = type { %"github.com/goplus/llgo/internal/runtime.String" } %main.stringReader = type { %"github.com/goplus/llgo/internal/runtime.String", i64, i64 } +%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/abi.Imethod" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 } %"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr } @@ -26,113 +27,73 @@ source_filename = "main" @_llgo_error = global ptr null @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null @_llgo_string = linkonce global ptr null -@0 = private unnamed_addr constant [6 x i8] c"Error\00", align 1 -@1 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@2 = private unnamed_addr constant [6 x i8] c"error\00", align 1 -@3 = private unnamed_addr constant [6 x i8] c"Write\00", align 1 -@4 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@5 = private unnamed_addr constant [12 x i8] c"main.Writer\00", align 1 +@0 = private unnamed_addr constant [5 x i8] c"Error", align 1 +@1 = private unnamed_addr constant [4 x i8] c"main", align 1 +@2 = private unnamed_addr constant [5 x i8] c"error", align 1 +@3 = private unnamed_addr constant [5 x i8] c"Write", align 1 +@4 = private unnamed_addr constant [11 x i8] c"main.Writer", align 1 @_llgo_int64 = linkonce global ptr null -@6 = private unnamed_addr constant [8 x i8] c"WriteTo\00", align 1 -@7 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@8 = private unnamed_addr constant [14 x i8] c"main.WriterTo\00", align 1 +@5 = private unnamed_addr constant [7 x i8] c"WriteTo", align 1 +@6 = private unnamed_addr constant [13 x i8] c"main.WriterTo", align 1 @"_llgo_iface$eN81k1zqixGTyagHw_4nqH4mGfwwehTOCTXUlbT9kzk" = linkonce global ptr null -@9 = private unnamed_addr constant [8 x i8] c"WriteTo\00", align 1 -@10 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@11 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @_llgo_main.nopCloserWriterTo = global ptr null @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y" = linkonce global ptr null @_llgo_main.Reader = linkonce global ptr null -@12 = private unnamed_addr constant [5 x i8] c"Read\00", align 1 -@13 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@14 = private unnamed_addr constant [12 x i8] c"main.Reader\00", align 1 -@15 = private unnamed_addr constant [7 x i8] c"Reader\00", align 1 -@16 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@17 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@18 = private unnamed_addr constant [6 x i8] c"Close\00", align 1 +@7 = private unnamed_addr constant [4 x i8] c"Read", align 1 +@8 = private unnamed_addr constant [11 x i8] c"main.Reader", align 1 +@9 = private unnamed_addr constant [6 x i8] c"Reader", align 1 +@10 = private unnamed_addr constant [5 x i8] c"Close", align 1 @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w" = linkonce global ptr null -@19 = private unnamed_addr constant [5 x i8] c"Read\00", align 1 -@20 = private unnamed_addr constant [8 x i8] c"WriteTo\00", align 1 -@21 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@22 = private unnamed_addr constant [23 x i8] c"main.nopCloserWriterTo\00", align 1 +@11 = private unnamed_addr constant [22 x i8] c"main.nopCloserWriterTo", align 1 @"_llgo_iface$L2Ik-AJcd0jsoBw5fQ07pQpfUM-kh78Wn2bOeak6M3I" = linkonce global ptr null -@23 = private unnamed_addr constant [6 x i8] c"Close\00", align 1 -@24 = private unnamed_addr constant [5 x i8] c"Read\00", align 1 -@25 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@26 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @_llgo_main.nopCloser = global ptr null -@27 = private unnamed_addr constant [6 x i8] c"Close\00", align 1 -@28 = private unnamed_addr constant [5 x i8] c"Read\00", align 1 -@29 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@30 = private unnamed_addr constant [15 x i8] c"main.nopCloser\00", align 1 +@12 = private unnamed_addr constant [14 x i8] c"main.nopCloser", align 1 @_llgo_main.StringWriter = linkonce global ptr null @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw" = linkonce global ptr null -@31 = private unnamed_addr constant [12 x i8] c"WriteString\00", align 1 -@32 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@33 = private unnamed_addr constant [18 x i8] c"main.StringWriter\00", align 1 +@13 = private unnamed_addr constant [11 x i8] c"WriteString", align 1 +@14 = private unnamed_addr constant [17 x i8] c"main.StringWriter", align 1 @"_llgo_iface$Ly4zXiUMEac-hYAMw6b6miJ1JEhGfLyBWyBOhpsRZcU" = linkonce global ptr null -@34 = private unnamed_addr constant [12 x i8] c"WriteString\00", align 1 -@35 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@36 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@37 = private unnamed_addr constant [4 x i8] c"EOF\00", align 1 -@38 = private unnamed_addr constant [12 x i8] c"short write\00", align 1 +@15 = private unnamed_addr constant [3 x i8] c"EOF", align 1 +@16 = private unnamed_addr constant [11 x i8] c"short write", align 1 @__llgo_argc = global ptr null @__llgo_argv = global ptr null -@39 = private unnamed_addr constant [12 x i8] c"hello world\00", align 1 +@17 = private unnamed_addr constant [11 x i8] c"hello world", align 1 @"*_llgo_main.stringReader" = global ptr null @_llgo_main.stringReader = global ptr null @"main.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk" = global ptr null -@40 = private unnamed_addr constant [2 x i8] c"s\00", align 1 -@41 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@42 = private unnamed_addr constant [2 x i8] c"i\00", align 1 -@43 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@44 = private unnamed_addr constant [9 x i8] c"prevRune\00", align 1 -@45 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@46 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@47 = private unnamed_addr constant [4 x i8] c"Len\00", align 1 +@18 = private unnamed_addr constant [1 x i8] c"s", align 1 +@19 = private unnamed_addr constant [1 x i8] c"i", align 1 +@20 = private unnamed_addr constant [8 x i8] c"prevRune", align 1 +@21 = private unnamed_addr constant [3 x i8] c"Len", align 1 @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA" = linkonce global ptr null -@48 = private unnamed_addr constant [5 x i8] c"Read\00", align 1 -@49 = private unnamed_addr constant [7 x i8] c"ReadAt\00", align 1 +@22 = private unnamed_addr constant [6 x i8] c"ReadAt", align 1 @"_llgo_func$TY5Etv7VBKM_-2um1BDEeQEE2lP06Pt6G54EuKiNC3c" = linkonce global ptr null -@50 = private unnamed_addr constant [9 x i8] c"ReadByte\00", align 1 +@23 = private unnamed_addr constant [8 x i8] c"ReadByte", align 1 @"_llgo_func$6bvVpCcGPUc3z_EmsQTHB0AVT1hP5-NNLVRgm43teCM" = linkonce global ptr null -@51 = private unnamed_addr constant [9 x i8] c"ReadRune\00", align 1 +@24 = private unnamed_addr constant [8 x i8] c"ReadRune", align 1 @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU" = linkonce global ptr null @_llgo_rune = linkonce global ptr null -@52 = private unnamed_addr constant [5 x i8] c"Seek\00", align 1 +@25 = private unnamed_addr constant [4 x i8] c"Seek", align 1 @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms" = linkonce global ptr null -@53 = private unnamed_addr constant [5 x i8] c"Size\00", align 1 +@26 = private unnamed_addr constant [4 x i8] c"Size", align 1 @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug" = linkonce global ptr null -@54 = private unnamed_addr constant [11 x i8] c"UnreadByte\00", align 1 -@55 = private unnamed_addr constant [11 x i8] c"UnreadRune\00", align 1 -@56 = private unnamed_addr constant [8 x i8] c"WriteTo\00", align 1 -@57 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@58 = private unnamed_addr constant [18 x i8] c"main.stringReader\00", align 1 +@27 = private unnamed_addr constant [10 x i8] c"UnreadByte", align 1 +@28 = private unnamed_addr constant [10 x i8] c"UnreadRune", align 1 +@29 = private unnamed_addr constant [17 x i8] c"main.stringReader", align 1 @"_llgo_iface$OFO8Us9n8ajWCabGedeuoJ-Za2zAMk4Jh0FunAcUCFE" = linkonce global ptr null -@59 = private unnamed_addr constant [5 x i8] c"Read\00", align 1 -@60 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@61 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @"*_llgo_main.errorString" = global ptr null @_llgo_main.errorString = global ptr null @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = global ptr null -@62 = private unnamed_addr constant [2 x i8] c"s\00", align 1 -@63 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@64 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@65 = private unnamed_addr constant [6 x i8] c"Error\00", align 1 -@66 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@67 = private unnamed_addr constant [17 x i8] c"main.errorString\00", align 1 +@30 = private unnamed_addr constant [16 x i8] c"main.errorString", align 1 @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU" = linkonce global ptr null -@68 = private unnamed_addr constant [6 x i8] c"Error\00", align 1 -@69 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@70 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@71 = private unnamed_addr constant [22 x i8] c"type assertion failed\00", align 1 -@72 = private unnamed_addr constant [38 x i8] c"stringsReader.ReadAt: negative offset\00", align 1 -@73 = private unnamed_addr constant [35 x i8] c"stringsReader.Seek: invalid whence\00", align 1 -@74 = private unnamed_addr constant [38 x i8] c"stringsReader.Seek: negative position\00", align 1 -@75 = private unnamed_addr constant [49 x i8] c"stringsReader.UnreadByte: at beginning of string\00", align 1 -@76 = private unnamed_addr constant [50 x i8] c"strings.Reader.UnreadRune: at beginning of string\00", align 1 -@77 = private unnamed_addr constant [63 x i8] c"strings.Reader.UnreadRune: previous operation was not ReadRune\00", align 1 -@78 = private unnamed_addr constant [49 x i8] c"stringsReader.WriteTo: invalid WriteString count\00", align 1 +@31 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1 +@32 = private unnamed_addr constant [37 x i8] c"stringsReader.ReadAt: negative offset", align 1 +@33 = private unnamed_addr constant [34 x i8] c"stringsReader.Seek: invalid whence", align 1 +@34 = private unnamed_addr constant [37 x i8] c"stringsReader.Seek: negative position", align 1 +@35 = private unnamed_addr constant [48 x i8] c"stringsReader.UnreadByte: at beginning of string", align 1 +@36 = private unnamed_addr constant [49 x i8] c"strings.Reader.UnreadRune: at beginning of string", align 1 +@37 = private unnamed_addr constant [62 x i8] c"strings.Reader.UnreadRune: previous operation was not ReadRune", align 1 +@38 = private unnamed_addr constant [48 x i8] c"stringsReader.WriteTo: invalid WriteString count", align 1 define %"github.com/goplus/llgo/internal/runtime.iface" @main.NopCloser(%"github.com/goplus/llgo/internal/runtime.iface" %0) { _llgo_0: @@ -423,7 +384,7 @@ _llgo_1: ; preds = %_llgo_0 call void @"main.init$after"() %1 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %2 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %1, i32 0, i32 0 - store ptr @37, ptr %2, align 8 + store ptr @15, ptr %2, align 8 %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %1, i32 0, i32 1 store i64 3, ptr %3, align 4 %4 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %1, align 8 @@ -431,7 +392,7 @@ _llgo_1: ; preds = %_llgo_0 store %"github.com/goplus/llgo/internal/runtime.iface" %5, ptr @main.EOF, align 8 %6 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %7 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %6, i32 0, i32 0 - store ptr @38, ptr %7, align 8 + store ptr @16, ptr %7, align 8 %8 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %6, i32 0, i32 1 store i64 11, ptr %8, align 4 %9 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %6, align 8 @@ -453,7 +414,7 @@ _llgo_0: %3 = getelementptr inbounds %main.stringReader, ptr %2, i32 0, i32 0 %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @39, ptr %5, align 8 + store ptr @17, ptr %5, align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 store i64 11, ptr %6, align 4 %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 @@ -634,7 +595,7 @@ _llgo_1: ; preds = %_llgo_0 _llgo_2: ; preds = %_llgo_0 %29 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %30 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %29, i32 0, i32 0 - store ptr @71, ptr %30, align 8 + store ptr @31, ptr %30, align 8 %31 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %29, i32 0, i32 1 store i64 21, ptr %31, align 4 %32 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %29, align 8 @@ -761,7 +722,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @72, ptr %5, align 8 + store ptr @32, ptr %5, align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 store i64 37, ptr %6, align 4 %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 @@ -947,7 +908,7 @@ _llgo_6: ; preds = %_llgo_4 _llgo_7: ; preds = %_llgo_6 %16 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %17 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %16, i32 0, i32 0 - store ptr @73, ptr %17, align 8 + store ptr @33, ptr %17, align 8 %18 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %16, i32 0, i32 1 store i64 34, ptr %18, align 4 %19 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %16, align 8 @@ -958,7 +919,7 @@ _llgo_7: ; preds = %_llgo_6 _llgo_8: ; preds = %_llgo_1 %21 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %22 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %21, i32 0, i32 0 - store ptr @74, ptr %22, align 8 + store ptr @34, ptr %22, align 8 %23 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %21, i32 0, i32 1 store i64 37, ptr %23, align 4 %24 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %21, align 8 @@ -992,7 +953,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @75, ptr %5, align 8 + store ptr @35, ptr %5, align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 store i64 48, ptr %6, align 4 %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 @@ -1020,7 +981,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @76, ptr %5, align 8 + store ptr @36, ptr %5, align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 store i64 49, ptr %6, align 4 %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 @@ -1036,7 +997,7 @@ _llgo_2: ; preds = %_llgo_0 _llgo_3: ; preds = %_llgo_2 %12 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %13 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %12, i32 0, i32 0 - store ptr @77, ptr %13, align 8 + store ptr @37, ptr %13, align 8 %14 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %12, i32 0, i32 1 store i64 62, ptr %14, align 4 %15 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %12, align 8 @@ -1085,7 +1046,7 @@ _llgo_2: ; preds = %_llgo_0 _llgo_3: ; preds = %_llgo_2 %20 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %21 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %20, i32 0, i32 0 - store ptr @78, ptr %21, align 8 + store ptr @38, ptr %21, align 8 %22 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %20, i32 0, i32 1 store i64 48, ptr %22, align 4 %23 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %20, align 8 @@ -1155,552 +1116,549 @@ _llgo_1: ; preds = %_llgo_0 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 - %3 = load ptr, ptr @_llgo_byte, align 8 - %4 = load ptr, ptr @"[]_llgo_byte", align 8 - %5 = icmp eq ptr %4, null - br i1 %5, label %_llgo_3, label %_llgo_4 + %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %2, i32 0, i32 6 + %4 = load i8, ptr %3, align 1 + %5 = or i8 %4, 32 + store i8 %5, ptr %3, align 1 + %6 = load ptr, ptr @_llgo_byte, align 8 + %7 = load ptr, ptr @"[]_llgo_byte", align 8 + %8 = icmp eq ptr %7, null + br i1 %8, label %_llgo_3, label %_llgo_4 _llgo_3: ; preds = %_llgo_2 - %6 = call ptr @"github.com/goplus/llgo/internal/runtime.SliceOf"(ptr %3) - store ptr %6, ptr @"[]_llgo_byte", align 8 + %9 = call ptr @"github.com/goplus/llgo/internal/runtime.SliceOf"(ptr %6) + store ptr %9, ptr @"[]_llgo_byte", align 8 br label %_llgo_4 _llgo_4: ; preds = %_llgo_3, %_llgo_2 - %7 = load ptr, ptr @"[]_llgo_byte", align 8 - %8 = load ptr, ptr @_llgo_int, align 8 - %9 = icmp eq ptr %8, null - br i1 %9, label %_llgo_5, label %_llgo_6 + %10 = load ptr, ptr @"[]_llgo_byte", align 8 + %11 = load ptr, ptr @_llgo_int, align 8 + %12 = icmp eq ptr %11, null + br i1 %12, label %_llgo_5, label %_llgo_6 _llgo_5: ; preds = %_llgo_4 - %10 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 2) - store ptr %10, ptr @_llgo_int, align 8 + %13 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 2) + store ptr %13, ptr @_llgo_int, align 8 br label %_llgo_6 _llgo_6: ; preds = %_llgo_5, %_llgo_4 - %11 = load ptr, ptr @_llgo_int, align 8 - %12 = load ptr, ptr @_llgo_string, align 8 - %13 = icmp eq ptr %12, null - br i1 %13, label %_llgo_7, label %_llgo_8 + %14 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %13, i32 0, i32 6 + %15 = load i8, ptr %14, align 1 + %16 = or i8 %15, 32 + store i8 %16, ptr %14, align 1 + %17 = load ptr, ptr @_llgo_int, align 8 + %18 = load ptr, ptr @_llgo_string, align 8 + %19 = icmp eq ptr %18, null + br i1 %19, label %_llgo_7, label %_llgo_8 _llgo_7: ; preds = %_llgo_6 - %14 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24) - store ptr %14, ptr @_llgo_string, align 8 + %20 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24) + store ptr %20, ptr @_llgo_string, align 8 br label %_llgo_8 _llgo_8: ; preds = %_llgo_7, %_llgo_6 - %15 = load ptr, ptr @_llgo_string, align 8 - %16 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - %17 = icmp eq ptr %16, null - br i1 %17, label %_llgo_9, label %_llgo_10 + %21 = load ptr, ptr @_llgo_string, align 8 + %22 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 + %23 = icmp eq ptr %22, null + br i1 %23, label %_llgo_9, label %_llgo_10 _llgo_9: ; preds = %_llgo_8 - %18 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - %19 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %20 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %19, i32 0, i32 0 - store ptr %18, ptr %20, align 8 - %21 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %19, i32 0, i32 1 - store i64 0, ptr %21, align 4 - %22 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %19, i32 0, i32 2 - store i64 0, ptr %22, align 4 - %23 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %19, align 8 - %24 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) - %25 = getelementptr ptr, ptr %24, i64 0 - store ptr %15, ptr %25, align 8 - %26 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %27 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %26, i32 0, i32 0 - store ptr %24, ptr %27, align 8 - %28 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %26, i32 0, i32 1 - store i64 1, ptr %28, align 4 - %29 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %26, i32 0, i32 2 - store i64 1, ptr %29, align 4 - %30 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %26, align 8 - %31 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %23, %"github.com/goplus/llgo/internal/runtime.Slice" %30, i1 false) - store ptr %31, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 + %24 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + %25 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %26 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %25, i32 0, i32 0 + store ptr %24, ptr %26, align 8 + %27 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %25, i32 0, i32 1 + store i64 0, ptr %27, align 4 + %28 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %25, i32 0, i32 2 + store i64 0, ptr %28, align 4 + %29 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %25, align 8 + %30 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) + %31 = getelementptr ptr, ptr %30, i64 0 + store ptr %21, ptr %31, align 8 + %32 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %33 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %32, i32 0, i32 0 + store ptr %30, ptr %33, align 8 + %34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %32, i32 0, i32 1 + store i64 1, ptr %34, align 4 + %35 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %32, i32 0, i32 2 + store i64 1, ptr %35, align 4 + %36 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %32, align 8 + %37 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %29, %"github.com/goplus/llgo/internal/runtime.Slice" %36, i1 false) + store ptr %37, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 br label %_llgo_10 _llgo_10: ; preds = %_llgo_9, %_llgo_8 - %32 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - %33 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %33, i32 0, i32 0 - store ptr @0, ptr %34, align 8 - %35 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %33, i32 0, i32 1 - store i64 5, ptr %35, align 4 - %36 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %33, align 8 - %37 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %38 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %37, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %36, ptr %38, align 8 - %39 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %37, i32 0, i32 1 - store ptr %32, ptr %39, align 8 - %40 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %37, align 8 - %41 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) - %42 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %41, i64 0 - store %"github.com/goplus/llgo/internal/abi.Imethod" %40, ptr %42, align 8 - %43 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %44 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %43, i32 0, i32 0 - store ptr %41, ptr %44, align 8 - %45 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %43, i32 0, i32 1 - store i64 1, ptr %45, align 4 - %46 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %43, i32 0, i32 2 - store i64 1, ptr %46, align 4 - %47 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %43, align 8 - %48 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %49 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %48, i32 0, i32 0 - store ptr @1, ptr %49, align 8 - %50 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %48, i32 0, i32 1 - store i64 4, ptr %50, align 4 - %51 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %48, align 8 - %52 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %53 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %52, i32 0, i32 0 - store ptr @2, ptr %53, align 8 - %54 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %52, i32 0, i32 1 - store i64 5, ptr %54, align 4 - %55 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %52, align 8 - %56 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %51, %"github.com/goplus/llgo/internal/runtime.String" %55, %"github.com/goplus/llgo/internal/runtime.Slice" %47) - store ptr %56, ptr @_llgo_error, align 8 - %57 = load ptr, ptr @_llgo_error, align 8 - %58 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 - %59 = icmp eq ptr %58, null - br i1 %59, label %_llgo_11, label %_llgo_12 + %38 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 + %39 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %40 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %39, i32 0, i32 0 + store ptr @0, ptr %40, align 8 + %41 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %39, i32 0, i32 1 + store i64 5, ptr %41, align 4 + %42 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %39, align 8 + %43 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %44 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %43, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %42, ptr %44, align 8 + %45 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %43, i32 0, i32 1 + store ptr %38, ptr %45, align 8 + %46 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %43, align 8 + %47 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) + %48 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %47, i64 0 + store %"github.com/goplus/llgo/internal/abi.Imethod" %46, ptr %48, align 8 + %49 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %50 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %49, i32 0, i32 0 + store ptr %47, ptr %50, align 8 + %51 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %49, i32 0, i32 1 + store i64 1, ptr %51, align 4 + %52 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %49, i32 0, i32 2 + store i64 1, ptr %52, align 4 + %53 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %49, align 8 + %54 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %55 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %54, i32 0, i32 0 + store ptr @1, ptr %55, align 8 + %56 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %54, i32 0, i32 1 + store i64 4, ptr %56, align 4 + %57 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %54, align 8 + %58 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %59 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %58, i32 0, i32 0 + store ptr @2, ptr %59, align 8 + %60 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %58, i32 0, i32 1 + store i64 5, ptr %60, align 4 + %61 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %58, align 8 + %62 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %57, %"github.com/goplus/llgo/internal/runtime.String" %61, %"github.com/goplus/llgo/internal/runtime.Slice" %53) + store ptr %62, ptr @_llgo_error, align 8 + %63 = load ptr, ptr @_llgo_error, align 8 + %64 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 + %65 = icmp eq ptr %64, null + br i1 %65, label %_llgo_11, label %_llgo_12 _llgo_11: ; preds = %_llgo_10 - %60 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) - %61 = getelementptr ptr, ptr %60, i64 0 - store ptr %7, ptr %61, align 8 - %62 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %63 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %62, i32 0, i32 0 - store ptr %60, ptr %63, align 8 - %64 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %62, i32 0, i32 1 - store i64 1, ptr %64, align 4 - %65 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %62, i32 0, i32 2 - store i64 1, ptr %65, align 4 - %66 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %62, align 8 - %67 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - %68 = getelementptr ptr, ptr %67, i64 0 - store ptr %11, ptr %68, align 8 - %69 = getelementptr ptr, ptr %67, i64 1 - store ptr %57, ptr %69, align 8 - %70 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %71 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %70, i32 0, i32 0 - store ptr %67, ptr %71, align 8 - %72 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %70, i32 0, i32 1 - store i64 2, ptr %72, align 4 - %73 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %70, i32 0, i32 2 - store i64 2, ptr %73, align 4 - %74 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %70, align 8 - %75 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %66, %"github.com/goplus/llgo/internal/runtime.Slice" %74, i1 false) - store ptr %75, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 + %66 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) + %67 = getelementptr ptr, ptr %66, i64 0 + store ptr %10, ptr %67, align 8 + %68 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %69 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %68, i32 0, i32 0 + store ptr %66, ptr %69, align 8 + %70 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %68, i32 0, i32 1 + store i64 1, ptr %70, align 4 + %71 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %68, i32 0, i32 2 + store i64 1, ptr %71, align 4 + %72 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %68, align 8 + %73 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + %74 = getelementptr ptr, ptr %73, i64 0 + store ptr %17, ptr %74, align 8 + %75 = getelementptr ptr, ptr %73, i64 1 + store ptr %63, ptr %75, align 8 + %76 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %77 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %76, i32 0, i32 0 + store ptr %73, ptr %77, align 8 + %78 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %76, i32 0, i32 1 + store i64 2, ptr %78, align 4 + %79 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %76, i32 0, i32 2 + store i64 2, ptr %79, align 4 + %80 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %76, align 8 + %81 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %72, %"github.com/goplus/llgo/internal/runtime.Slice" %80, i1 false) + store ptr %81, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 br label %_llgo_12 _llgo_12: ; preds = %_llgo_11, %_llgo_10 - %76 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 - %77 = load ptr, ptr @_llgo_main.Writer, align 8 - %78 = icmp eq ptr %77, null - br i1 %78, label %_llgo_13, label %_llgo_14 + %82 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 + %83 = load ptr, ptr @_llgo_main.Writer, align 8 + %84 = icmp eq ptr %83, null + br i1 %84, label %_llgo_13, label %_llgo_14 _llgo_13: ; preds = %_llgo_12 - %79 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %80 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %79, i32 0, i32 0 - store ptr @3, ptr %80, align 8 - %81 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %79, i32 0, i32 1 - store i64 5, ptr %81, align 4 - %82 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %79, align 8 - %83 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %84 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %83, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %82, ptr %84, align 8 - %85 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %83, i32 0, i32 1 - store ptr %76, ptr %85, align 8 - %86 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %83, align 8 - %87 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) - %88 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %87, i64 0 - store %"github.com/goplus/llgo/internal/abi.Imethod" %86, ptr %88, align 8 - %89 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %90 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %89, i32 0, i32 0 - store ptr %87, ptr %90, align 8 - %91 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %89, i32 0, i32 1 - store i64 1, ptr %91, align 4 - %92 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %89, i32 0, i32 2 - store i64 1, ptr %92, align 4 - %93 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %89, align 8 - %94 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %95 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %94, i32 0, i32 0 - store ptr @4, ptr %95, align 8 - %96 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %94, i32 0, i32 1 - store i64 4, ptr %96, align 4 - %97 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %94, align 8 - %98 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %99 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %98, i32 0, i32 0 - store ptr @5, ptr %99, align 8 - %100 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %98, i32 0, i32 1 - store i64 11, ptr %100, align 4 - %101 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %98, align 8 - %102 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %97, %"github.com/goplus/llgo/internal/runtime.String" %101, %"github.com/goplus/llgo/internal/runtime.Slice" %93) - store ptr %102, ptr @_llgo_main.Writer, align 8 + %85 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %86 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %85, i32 0, i32 0 + store ptr @3, ptr %86, align 8 + %87 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %85, i32 0, i32 1 + store i64 5, ptr %87, align 4 + %88 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %85, align 8 + %89 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %90 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %89, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %88, ptr %90, align 8 + %91 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %89, i32 0, i32 1 + store ptr %82, ptr %91, align 8 + %92 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %89, align 8 + %93 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) + %94 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %93, i64 0 + store %"github.com/goplus/llgo/internal/abi.Imethod" %92, ptr %94, align 8 + %95 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %96 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %95, i32 0, i32 0 + store ptr %93, ptr %96, align 8 + %97 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %95, i32 0, i32 1 + store i64 1, ptr %97, align 4 + %98 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %95, i32 0, i32 2 + store i64 1, ptr %98, align 4 + %99 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %95, align 8 + %100 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %101 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %100, i32 0, i32 0 + store ptr @1, ptr %101, align 8 + %102 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %100, i32 0, i32 1 + store i64 4, ptr %102, align 4 + %103 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %100, align 8 + %104 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %105 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %104, i32 0, i32 0 + store ptr @4, ptr %105, align 8 + %106 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %104, i32 0, i32 1 + store i64 11, ptr %106, align 4 + %107 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %104, align 8 + %108 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %103, %"github.com/goplus/llgo/internal/runtime.String" %107, %"github.com/goplus/llgo/internal/runtime.Slice" %99) + store ptr %108, ptr @_llgo_main.Writer, align 8 br label %_llgo_14 _llgo_14: ; preds = %_llgo_13, %_llgo_12 - %103 = load ptr, ptr @_llgo_main.Writer, align 8 - %104 = load ptr, ptr @_llgo_int64, align 8 - %105 = icmp eq ptr %104, null - br i1 %105, label %_llgo_15, label %_llgo_16 + %109 = load ptr, ptr @_llgo_main.Writer, align 8 + %110 = load ptr, ptr @_llgo_int64, align 8 + %111 = icmp eq ptr %110, null + br i1 %111, label %_llgo_15, label %_llgo_16 _llgo_15: ; preds = %_llgo_14 - %106 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 6) - store ptr %106, ptr @_llgo_int64, align 8 + %112 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 6) + store ptr %112, ptr @_llgo_int64, align 8 br label %_llgo_16 _llgo_16: ; preds = %_llgo_15, %_llgo_14 - %107 = load ptr, ptr @_llgo_int64, align 8 - %108 = load ptr, ptr @_llgo_error, align 8 - %109 = load ptr, ptr @"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk", align 8 - %110 = icmp eq ptr %109, null - br i1 %110, label %_llgo_17, label %_llgo_18 + %113 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %112, i32 0, i32 6 + %114 = load i8, ptr %113, align 1 + %115 = or i8 %114, 32 + store i8 %115, ptr %113, align 1 + %116 = load ptr, ptr @_llgo_int64, align 8 + %117 = load ptr, ptr @_llgo_error, align 8 + %118 = load ptr, ptr @"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk", align 8 + %119 = icmp eq ptr %118, null + br i1 %119, label %_llgo_17, label %_llgo_18 _llgo_17: ; preds = %_llgo_16 - %111 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) - %112 = getelementptr ptr, ptr %111, i64 0 - store ptr %103, ptr %112, align 8 - %113 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %114 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %113, i32 0, i32 0 - store ptr %111, ptr %114, align 8 - %115 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %113, i32 0, i32 1 - store i64 1, ptr %115, align 4 - %116 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %113, i32 0, i32 2 - store i64 1, ptr %116, align 4 - %117 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %113, align 8 - %118 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - %119 = getelementptr ptr, ptr %118, i64 0 - store ptr %107, ptr %119, align 8 - %120 = getelementptr ptr, ptr %118, i64 1 - store ptr %108, ptr %120, align 8 - %121 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %122 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %121, i32 0, i32 0 - store ptr %118, ptr %122, align 8 - %123 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %121, i32 0, i32 1 - store i64 2, ptr %123, align 4 - %124 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %121, i32 0, i32 2 - store i64 2, ptr %124, align 4 - %125 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %121, align 8 - %126 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %117, %"github.com/goplus/llgo/internal/runtime.Slice" %125, i1 false) - store ptr %126, ptr @"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk", align 8 + %120 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) + %121 = getelementptr ptr, ptr %120, i64 0 + store ptr %109, ptr %121, align 8 + %122 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %123 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %122, i32 0, i32 0 + store ptr %120, ptr %123, align 8 + %124 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %122, i32 0, i32 1 + store i64 1, ptr %124, align 4 + %125 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %122, i32 0, i32 2 + store i64 1, ptr %125, align 4 + %126 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %122, align 8 + %127 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + %128 = getelementptr ptr, ptr %127, i64 0 + store ptr %116, ptr %128, align 8 + %129 = getelementptr ptr, ptr %127, i64 1 + store ptr %117, ptr %129, align 8 + %130 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %131 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %130, i32 0, i32 0 + store ptr %127, ptr %131, align 8 + %132 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %130, i32 0, i32 1 + store i64 2, ptr %132, align 4 + %133 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %130, i32 0, i32 2 + store i64 2, ptr %133, align 4 + %134 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %130, align 8 + %135 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %126, %"github.com/goplus/llgo/internal/runtime.Slice" %134, i1 false) + store ptr %135, ptr @"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk", align 8 br label %_llgo_18 _llgo_18: ; preds = %_llgo_17, %_llgo_16 - %127 = load ptr, ptr @"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk", align 8 - %128 = load ptr, ptr @_llgo_main.WriterTo, align 8 - %129 = icmp eq ptr %128, null - br i1 %129, label %_llgo_19, label %_llgo_20 + %136 = load ptr, ptr @"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk", align 8 + %137 = load ptr, ptr @_llgo_main.WriterTo, align 8 + %138 = icmp eq ptr %137, null + br i1 %138, label %_llgo_19, label %_llgo_20 _llgo_19: ; preds = %_llgo_18 - %130 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %131 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %130, i32 0, i32 0 - store ptr @6, ptr %131, align 8 - %132 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %130, i32 0, i32 1 - store i64 7, ptr %132, align 4 - %133 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %130, align 8 - %134 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %135 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %134, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %133, ptr %135, align 8 - %136 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %134, i32 0, i32 1 - store ptr %127, ptr %136, align 8 - %137 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %134, align 8 - %138 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) - %139 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %138, i64 0 - store %"github.com/goplus/llgo/internal/abi.Imethod" %137, ptr %139, align 8 - %140 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %141 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %140, i32 0, i32 0 - store ptr %138, ptr %141, align 8 - %142 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %140, i32 0, i32 1 - store i64 1, ptr %142, align 4 - %143 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %140, i32 0, i32 2 - store i64 1, ptr %143, align 4 - %144 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %140, align 8 - %145 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %146 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %145, i32 0, i32 0 - store ptr @7, ptr %146, align 8 - %147 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %145, i32 0, i32 1 - store i64 4, ptr %147, align 4 - %148 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %145, align 8 - %149 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %150 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %149, i32 0, i32 0 - store ptr @8, ptr %150, align 8 - %151 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %149, i32 0, i32 1 - store i64 13, ptr %151, align 4 - %152 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %149, align 8 - %153 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %148, %"github.com/goplus/llgo/internal/runtime.String" %152, %"github.com/goplus/llgo/internal/runtime.Slice" %144) - store ptr %153, ptr @_llgo_main.WriterTo, align 8 + %139 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %140 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %139, i32 0, i32 0 + store ptr @5, ptr %140, align 8 + %141 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %139, i32 0, i32 1 + store i64 7, ptr %141, align 4 + %142 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %139, align 8 + %143 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %144 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %143, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %142, ptr %144, align 8 + %145 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %143, i32 0, i32 1 + store ptr %136, ptr %145, align 8 + %146 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %143, align 8 + %147 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) + %148 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %147, i64 0 + store %"github.com/goplus/llgo/internal/abi.Imethod" %146, ptr %148, align 8 + %149 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %150 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %149, i32 0, i32 0 + store ptr %147, ptr %150, align 8 + %151 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %149, i32 0, i32 1 + store i64 1, ptr %151, align 4 + %152 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %149, i32 0, i32 2 + store i64 1, ptr %152, align 4 + %153 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %149, align 8 + %154 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %155 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %154, i32 0, i32 0 + store ptr @1, ptr %155, align 8 + %156 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %154, i32 0, i32 1 + store i64 4, ptr %156, align 4 + %157 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %154, align 8 + %158 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %159 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %158, i32 0, i32 0 + store ptr @6, ptr %159, align 8 + %160 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %158, i32 0, i32 1 + store i64 13, ptr %160, align 4 + %161 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %158, align 8 + %162 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %157, %"github.com/goplus/llgo/internal/runtime.String" %161, %"github.com/goplus/llgo/internal/runtime.Slice" %153) + store ptr %162, ptr @_llgo_main.WriterTo, align 8 br label %_llgo_20 _llgo_20: ; preds = %_llgo_19, %_llgo_18 - %154 = load ptr, ptr @"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk", align 8 - %155 = load ptr, ptr @"_llgo_iface$eN81k1zqixGTyagHw_4nqH4mGfwwehTOCTXUlbT9kzk", align 8 - %156 = icmp eq ptr %155, null - br i1 %156, label %_llgo_21, label %_llgo_22 + %163 = load ptr, ptr @"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk", align 8 + %164 = load ptr, ptr @"_llgo_iface$eN81k1zqixGTyagHw_4nqH4mGfwwehTOCTXUlbT9kzk", align 8 + %165 = icmp eq ptr %164, null + br i1 %165, label %_llgo_21, label %_llgo_22 _llgo_21: ; preds = %_llgo_20 - %157 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %158 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %157, i32 0, i32 0 - store ptr @9, ptr %158, align 8 - %159 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %157, i32 0, i32 1 - store i64 7, ptr %159, align 4 - %160 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %157, align 8 - %161 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %162 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %161, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %160, ptr %162, align 8 - %163 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %161, i32 0, i32 1 - store ptr %154, ptr %163, align 8 - %164 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %161, align 8 - %165 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) - %166 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %165, i64 0 - store %"github.com/goplus/llgo/internal/abi.Imethod" %164, ptr %166, align 8 - %167 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %168 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %167, i32 0, i32 0 - store ptr %165, ptr %168, align 8 - %169 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %167, i32 0, i32 1 - store i64 1, ptr %169, align 4 - %170 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %167, i32 0, i32 2 - store i64 1, ptr %170, align 4 - %171 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %167, align 8 - %172 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %173 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %172, i32 0, i32 0 - store ptr @10, ptr %173, align 8 - %174 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %172, i32 0, i32 1 - store i64 4, ptr %174, align 4 - %175 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %172, align 8 - %176 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %177 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %176, i32 0, i32 0 - store ptr @11, ptr %177, align 8 - %178 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %176, i32 0, i32 1 - store i64 0, ptr %178, align 4 - %179 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %176, align 8 - %180 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %175, %"github.com/goplus/llgo/internal/runtime.String" %179, %"github.com/goplus/llgo/internal/runtime.Slice" %171) - store ptr %180, ptr @"_llgo_iface$eN81k1zqixGTyagHw_4nqH4mGfwwehTOCTXUlbT9kzk", align 8 + %166 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %167 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %166, i32 0, i32 0 + store ptr @5, ptr %167, align 8 + %168 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %166, i32 0, i32 1 + store i64 7, ptr %168, align 4 + %169 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %166, align 8 + %170 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %171 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %170, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %169, ptr %171, align 8 + %172 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %170, i32 0, i32 1 + store ptr %163, ptr %172, align 8 + %173 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %170, align 8 + %174 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) + %175 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %174, i64 0 + store %"github.com/goplus/llgo/internal/abi.Imethod" %173, ptr %175, align 8 + %176 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %177 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %176, i32 0, i32 0 + store ptr %174, ptr %177, align 8 + %178 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %176, i32 0, i32 1 + store i64 1, ptr %178, align 4 + %179 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %176, i32 0, i32 2 + store i64 1, ptr %179, align 4 + %180 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %176, align 8 + %181 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %182 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %181, i32 0, i32 0 + store ptr @1, ptr %182, align 8 + %183 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %181, i32 0, i32 1 + store i64 4, ptr %183, align 4 + %184 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %181, align 8 + %185 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %186 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %185, i32 0, i32 0 + store ptr null, ptr %186, align 8 + %187 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %185, i32 0, i32 1 + store i64 0, ptr %187, align 4 + %188 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %185, align 8 + %189 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %184, %"github.com/goplus/llgo/internal/runtime.String" %188, %"github.com/goplus/llgo/internal/runtime.Slice" %180) + store ptr %189, ptr @"_llgo_iface$eN81k1zqixGTyagHw_4nqH4mGfwwehTOCTXUlbT9kzk", align 8 br label %_llgo_22 _llgo_22: ; preds = %_llgo_21, %_llgo_20 - %181 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 3, i64 3) - store ptr %181, ptr @_llgo_main.nopCloserWriterTo, align 8 - %182 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 - %183 = load ptr, ptr @_llgo_main.Reader, align 8 - %184 = icmp eq ptr %183, null - br i1 %184, label %_llgo_23, label %_llgo_24 + %190 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 3, i64 3) + store ptr %190, ptr @_llgo_main.nopCloserWriterTo, align 8 + %191 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 + %192 = load ptr, ptr @_llgo_main.Reader, align 8 + %193 = icmp eq ptr %192, null + br i1 %193, label %_llgo_23, label %_llgo_24 _llgo_23: ; preds = %_llgo_22 - %185 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %186 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %185, i32 0, i32 0 - store ptr @12, ptr %186, align 8 - %187 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %185, i32 0, i32 1 - store i64 4, ptr %187, align 4 - %188 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %185, align 8 - %189 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %190 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %189, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %188, ptr %190, align 8 - %191 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %189, i32 0, i32 1 - store ptr %182, ptr %191, align 8 - %192 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %189, align 8 - %193 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) - %194 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %193, i64 0 - store %"github.com/goplus/llgo/internal/abi.Imethod" %192, ptr %194, align 8 - %195 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %196 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %195, i32 0, i32 0 - store ptr %193, ptr %196, align 8 - %197 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %195, i32 0, i32 1 - store i64 1, ptr %197, align 4 - %198 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %195, i32 0, i32 2 - store i64 1, ptr %198, align 4 - %199 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %195, align 8 - %200 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %201 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %200, i32 0, i32 0 - store ptr @13, ptr %201, align 8 - %202 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %200, i32 0, i32 1 - store i64 4, ptr %202, align 4 - %203 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %200, align 8 - %204 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %205 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %204, i32 0, i32 0 - store ptr @14, ptr %205, align 8 - %206 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %204, i32 0, i32 1 - store i64 11, ptr %206, align 4 - %207 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %204, align 8 - %208 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %203, %"github.com/goplus/llgo/internal/runtime.String" %207, %"github.com/goplus/llgo/internal/runtime.Slice" %199) - store ptr %208, ptr @_llgo_main.Reader, align 8 + %194 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %195 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %194, i32 0, i32 0 + store ptr @7, ptr %195, align 8 + %196 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %194, i32 0, i32 1 + store i64 4, ptr %196, align 4 + %197 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %194, align 8 + %198 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %199 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %198, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %197, ptr %199, align 8 + %200 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %198, i32 0, i32 1 + store ptr %191, ptr %200, align 8 + %201 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %198, align 8 + %202 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) + %203 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %202, i64 0 + store %"github.com/goplus/llgo/internal/abi.Imethod" %201, ptr %203, align 8 + %204 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %205 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %204, i32 0, i32 0 + store ptr %202, ptr %205, align 8 + %206 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %204, i32 0, i32 1 + store i64 1, ptr %206, align 4 + %207 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %204, i32 0, i32 2 + store i64 1, ptr %207, align 4 + %208 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %204, align 8 + %209 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %210 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %209, i32 0, i32 0 + store ptr @1, ptr %210, align 8 + %211 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %209, i32 0, i32 1 + store i64 4, ptr %211, align 4 + %212 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %209, align 8 + %213 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %214 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %213, i32 0, i32 0 + store ptr @8, ptr %214, align 8 + %215 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %213, i32 0, i32 1 + store i64 11, ptr %215, align 4 + %216 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %213, align 8 + %217 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %212, %"github.com/goplus/llgo/internal/runtime.String" %216, %"github.com/goplus/llgo/internal/runtime.Slice" %208) + store ptr %217, ptr @_llgo_main.Reader, align 8 br label %_llgo_24 _llgo_24: ; preds = %_llgo_23, %_llgo_22 - %209 = load ptr, ptr @_llgo_main.Reader, align 8 - %210 = load ptr, ptr @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y", align 8 - %211 = icmp eq ptr %210, null - br i1 %211, label %_llgo_25, label %_llgo_26 + %218 = load ptr, ptr @_llgo_main.Reader, align 8 + %219 = load ptr, ptr @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y", align 8 + %220 = icmp eq ptr %219, null + br i1 %220, label %_llgo_25, label %_llgo_26 _llgo_25: ; preds = %_llgo_24 - %212 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %213 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %212, i32 0, i32 0 - store ptr @15, ptr %213, align 8 - %214 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %212, i32 0, i32 1 - store i64 6, ptr %214, align 4 - %215 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %212, align 8 - %216 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %217 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %216, i32 0, i32 0 - store ptr @16, ptr %217, align 8 - %218 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %216, i32 0, i32 1 - store i64 0, ptr %218, align 4 - %219 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %216, align 8 - %220 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %215, ptr %209, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %219, i1 true) %221 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %222 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %221, i32 0, i32 0 - store ptr @17, ptr %222, align 8 + store ptr @9, ptr %222, align 8 %223 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %221, i32 0, i32 1 - store i64 4, ptr %223, align 4 + store i64 6, ptr %223, align 4 %224 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %221, align 8 - %225 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 56) - %226 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %225, i64 0 - store %"github.com/goplus/llgo/internal/abi.StructField" %220, ptr %226, align 8 - %227 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %228 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %227, i32 0, i32 0 - store ptr %225, ptr %228, align 8 - %229 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %227, i32 0, i32 1 - store i64 1, ptr %229, align 4 - %230 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %227, i32 0, i32 2 - store i64 1, ptr %230, align 4 - %231 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %227, align 8 - %232 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %224, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %231) - store ptr %232, ptr @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y", align 8 + %225 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %226 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %225, i32 0, i32 0 + store ptr null, ptr %226, align 8 + %227 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %225, i32 0, i32 1 + store i64 0, ptr %227, align 4 + %228 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %225, align 8 + %229 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %224, ptr %218, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %228, i1 true) + %230 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %231 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %230, i32 0, i32 0 + store ptr @1, ptr %231, align 8 + %232 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %230, i32 0, i32 1 + store i64 4, ptr %232, align 4 + %233 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %230, align 8 + %234 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 56) + %235 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %234, i64 0 + store %"github.com/goplus/llgo/internal/abi.StructField" %229, ptr %235, align 8 + %236 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %237 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %236, i32 0, i32 0 + store ptr %234, ptr %237, align 8 + %238 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %236, i32 0, i32 1 + store i64 1, ptr %238, align 4 + %239 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %236, i32 0, i32 2 + store i64 1, ptr %239, align 4 + %240 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %236, align 8 + %241 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %233, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %240) + store ptr %241, ptr @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y", align 8 br label %_llgo_26 _llgo_26: ; preds = %_llgo_25, %_llgo_24 - %233 = load ptr, ptr @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y", align 8 - %234 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %235 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %234, i32 0, i32 0 - store ptr @18, ptr %235, align 8 - %236 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %234, i32 0, i32 1 - store i64 5, ptr %236, align 4 - %237 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %234, align 8 - %238 = load ptr, ptr @_llgo_error, align 8 - %239 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 - %240 = icmp eq ptr %239, null - br i1 %240, label %_llgo_27, label %_llgo_28 + %242 = load ptr, ptr @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y", align 8 + %243 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %244 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %243, i32 0, i32 0 + store ptr @10, ptr %244, align 8 + %245 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %243, i32 0, i32 1 + store i64 5, ptr %245, align 4 + %246 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %243, align 8 + %247 = load ptr, ptr @_llgo_error, align 8 + %248 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 + %249 = icmp eq ptr %248, null + br i1 %249, label %_llgo_27, label %_llgo_28 _llgo_27: ; preds = %_llgo_26 - %241 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - %242 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %243 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %242, i32 0, i32 0 - store ptr %241, ptr %243, align 8 - %244 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %242, i32 0, i32 1 - store i64 0, ptr %244, align 4 - %245 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %242, i32 0, i32 2 - store i64 0, ptr %245, align 4 - %246 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %242, align 8 - %247 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) - %248 = getelementptr ptr, ptr %247, i64 0 - store ptr %238, ptr %248, align 8 - %249 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %250 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %249, i32 0, i32 0 - store ptr %247, ptr %250, align 8 - %251 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %249, i32 0, i32 1 - store i64 1, ptr %251, align 4 - %252 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %249, i32 0, i32 2 - store i64 1, ptr %252, align 4 - %253 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %249, align 8 - %254 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %246, %"github.com/goplus/llgo/internal/runtime.Slice" %253, i1 false) - store ptr %254, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 + %250 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + %251 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %252 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %251, i32 0, i32 0 + store ptr %250, ptr %252, align 8 + %253 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %251, i32 0, i32 1 + store i64 0, ptr %253, align 4 + %254 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %251, i32 0, i32 2 + store i64 0, ptr %254, align 4 + %255 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %251, align 8 + %256 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) + %257 = getelementptr ptr, ptr %256, i64 0 + store ptr %247, ptr %257, align 8 + %258 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %259 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %258, i32 0, i32 0 + store ptr %256, ptr %259, align 8 + %260 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %258, i32 0, i32 1 + store i64 1, ptr %260, align 4 + %261 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %258, i32 0, i32 2 + store i64 1, ptr %261, align 4 + %262 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %258, align 8 + %263 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %255, %"github.com/goplus/llgo/internal/runtime.Slice" %262, i1 false) + store ptr %263, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 br label %_llgo_28 _llgo_28: ; preds = %_llgo_27, %_llgo_26 - %255 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 - %256 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %257 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %256, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %237, ptr %257, align 8 - %258 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %256, i32 0, i32 1 - store ptr %255, ptr %258, align 8 - %259 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %256, i32 0, i32 2 - store ptr @"main.(*nopCloserWriterTo).Close", ptr %259, align 8 - %260 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %256, i32 0, i32 3 - store ptr @"main.(*nopCloserWriterTo).Close", ptr %260, align 8 - %261 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %256, align 8 - %262 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %263 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %262, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %237, ptr %263, align 8 - %264 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %262, i32 0, i32 1 - store ptr %255, ptr %264, align 8 - %265 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %262, i32 0, i32 2 - store ptr @"main.(*nopCloserWriterTo).Close", ptr %265, align 8 - %266 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %262, i32 0, i32 3 - store ptr @main.nopCloserWriterTo.Close, ptr %266, align 8 - %267 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %262, align 8 - %268 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %269 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %268, i32 0, i32 0 - store ptr @19, ptr %269, align 8 - %270 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %268, i32 0, i32 1 - store i64 4, ptr %270, align 4 - %271 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %268, align 8 - %272 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 - %273 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %274 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %273, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %271, ptr %274, align 8 - %275 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %273, i32 0, i32 1 - store ptr %272, ptr %275, align 8 - %276 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %273, i32 0, i32 2 - store ptr @"main.(*nopCloserWriterTo).Read", ptr %276, align 8 - %277 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %273, i32 0, i32 3 - store ptr @"main.(*nopCloserWriterTo).Read", ptr %277, align 8 - %278 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %273, align 8 - %279 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %280 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %279, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %271, ptr %280, align 8 - %281 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %279, i32 0, i32 1 - store ptr %272, ptr %281, align 8 - %282 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %279, i32 0, i32 2 - store ptr @"main.(*nopCloserWriterTo).Read", ptr %282, align 8 - %283 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %279, i32 0, i32 3 - store ptr @main.nopCloserWriterTo.Read, ptr %283, align 8 - %284 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %279, align 8 - %285 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %286 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %285, i32 0, i32 0 - store ptr @20, ptr %286, align 8 - %287 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %285, i32 0, i32 1 - store i64 7, ptr %287, align 4 - %288 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %285, align 8 - %289 = load ptr, ptr @"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk", align 8 - %290 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %291 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %290, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %288, ptr %291, align 8 - %292 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %290, i32 0, i32 1 - store ptr %289, ptr %292, align 8 - %293 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %290, i32 0, i32 2 - store ptr @"main.(*nopCloserWriterTo).WriteTo", ptr %293, align 8 - %294 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %290, i32 0, i32 3 - store ptr @"main.(*nopCloserWriterTo).WriteTo", ptr %294, align 8 - %295 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %290, align 8 - %296 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %297 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %296, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %288, ptr %297, align 8 - %298 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %296, i32 0, i32 1 - store ptr %289, ptr %298, align 8 - %299 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %296, i32 0, i32 2 - store ptr @"main.(*nopCloserWriterTo).WriteTo", ptr %299, align 8 - %300 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %296, i32 0, i32 3 - store ptr @main.nopCloserWriterTo.WriteTo, ptr %300, align 8 - %301 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %296, align 8 - %302 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 120) - %303 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %302, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %267, ptr %303, align 8 - %304 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %302, i64 1 - store %"github.com/goplus/llgo/internal/abi.Method" %284, ptr %304, align 8 - %305 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %302, i64 2 - store %"github.com/goplus/llgo/internal/abi.Method" %301, ptr %305, align 8 - %306 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %307 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %306, i32 0, i32 0 - store ptr %302, ptr %307, align 8 - %308 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %306, i32 0, i32 1 - store i64 3, ptr %308, align 4 - %309 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %306, i32 0, i32 2 - store i64 3, ptr %309, align 4 - %310 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %306, align 8 + %264 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 + %265 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %266 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %265, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %246, ptr %266, align 8 + %267 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %265, i32 0, i32 1 + store ptr %264, ptr %267, align 8 + %268 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %265, i32 0, i32 2 + store ptr @"main.(*nopCloserWriterTo).Close", ptr %268, align 8 + %269 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %265, i32 0, i32 3 + store ptr @"main.(*nopCloserWriterTo).Close", ptr %269, align 8 + %270 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %265, align 8 + %271 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %272 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %271, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %246, ptr %272, align 8 + %273 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %271, i32 0, i32 1 + store ptr %264, ptr %273, align 8 + %274 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %271, i32 0, i32 2 + store ptr @"main.(*nopCloserWriterTo).Close", ptr %274, align 8 + %275 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %271, i32 0, i32 3 + store ptr @main.nopCloserWriterTo.Close, ptr %275, align 8 + %276 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %271, align 8 + %277 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %278 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %277, i32 0, i32 0 + store ptr @7, ptr %278, align 8 + %279 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %277, i32 0, i32 1 + store i64 4, ptr %279, align 4 + %280 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %277, align 8 + %281 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 + %282 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %283 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %282, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %280, ptr %283, align 8 + %284 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %282, i32 0, i32 1 + store ptr %281, ptr %284, align 8 + %285 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %282, i32 0, i32 2 + store ptr @"main.(*nopCloserWriterTo).Read", ptr %285, align 8 + %286 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %282, i32 0, i32 3 + store ptr @"main.(*nopCloserWriterTo).Read", ptr %286, align 8 + %287 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %282, align 8 + %288 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %289 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %288, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %280, ptr %289, align 8 + %290 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %288, i32 0, i32 1 + store ptr %281, ptr %290, align 8 + %291 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %288, i32 0, i32 2 + store ptr @"main.(*nopCloserWriterTo).Read", ptr %291, align 8 + %292 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %288, i32 0, i32 3 + store ptr @main.nopCloserWriterTo.Read, ptr %292, align 8 + %293 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %288, align 8 + %294 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %295 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %294, i32 0, i32 0 + store ptr @5, ptr %295, align 8 + %296 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %294, i32 0, i32 1 + store i64 7, ptr %296, align 4 + %297 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %294, align 8 + %298 = load ptr, ptr @"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk", align 8 + %299 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %300 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %299, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %297, ptr %300, align 8 + %301 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %299, i32 0, i32 1 + store ptr %298, ptr %301, align 8 + %302 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %299, i32 0, i32 2 + store ptr @"main.(*nopCloserWriterTo).WriteTo", ptr %302, align 8 + %303 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %299, i32 0, i32 3 + store ptr @"main.(*nopCloserWriterTo).WriteTo", ptr %303, align 8 + %304 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %299, align 8 + %305 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %306 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %305, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %297, ptr %306, align 8 + %307 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %305, i32 0, i32 1 + store ptr %298, ptr %307, align 8 + %308 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %305, i32 0, i32 2 + store ptr @"main.(*nopCloserWriterTo).WriteTo", ptr %308, align 8 + %309 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %305, i32 0, i32 3 + store ptr @main.nopCloserWriterTo.WriteTo, ptr %309, align 8 + %310 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %305, align 8 %311 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 120) %312 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %311, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %261, ptr %312, align 8 + store %"github.com/goplus/llgo/internal/abi.Method" %276, ptr %312, align 8 %313 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %311, i64 1 - store %"github.com/goplus/llgo/internal/abi.Method" %278, ptr %313, align 8 + store %"github.com/goplus/llgo/internal/abi.Method" %293, ptr %313, align 8 %314 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %311, i64 2 - store %"github.com/goplus/llgo/internal/abi.Method" %295, ptr %314, align 8 + store %"github.com/goplus/llgo/internal/abi.Method" %310, ptr %314, align 8 %315 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 %316 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %315, i32 0, i32 0 store ptr %311, ptr %316, align 8 @@ -1709,980 +1667,999 @@ _llgo_28: ; preds = %_llgo_27, %_llgo_26 %318 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %315, i32 0, i32 2 store i64 3, ptr %318, align 4 %319 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %315, align 8 - %320 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %321 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %320, i32 0, i32 0 - store ptr @21, ptr %321, align 8 - %322 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %320, i32 0, i32 1 - store i64 4, ptr %322, align 4 - %323 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %320, align 8 - %324 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %325 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %324, i32 0, i32 0 - store ptr @22, ptr %325, align 8 - %326 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %324, i32 0, i32 1 - store i64 22, ptr %326, align 4 - %327 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %324, align 8 - call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %181, %"github.com/goplus/llgo/internal/runtime.String" %323, %"github.com/goplus/llgo/internal/runtime.String" %327, ptr %233, %"github.com/goplus/llgo/internal/runtime.Slice" %310, %"github.com/goplus/llgo/internal/runtime.Slice" %319) - %328 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 - %329 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 - %330 = load ptr, ptr @"_llgo_iface$L2Ik-AJcd0jsoBw5fQ07pQpfUM-kh78Wn2bOeak6M3I", align 8 - %331 = icmp eq ptr %330, null - br i1 %331, label %_llgo_29, label %_llgo_30 + %320 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 120) + %321 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %320, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %270, ptr %321, align 8 + %322 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %320, i64 1 + store %"github.com/goplus/llgo/internal/abi.Method" %287, ptr %322, align 8 + %323 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %320, i64 2 + store %"github.com/goplus/llgo/internal/abi.Method" %304, ptr %323, align 8 + %324 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %325 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %324, i32 0, i32 0 + store ptr %320, ptr %325, align 8 + %326 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %324, i32 0, i32 1 + store i64 3, ptr %326, align 4 + %327 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %324, i32 0, i32 2 + store i64 3, ptr %327, align 4 + %328 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %324, align 8 + %329 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %330 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %329, i32 0, i32 0 + store ptr @1, ptr %330, align 8 + %331 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %329, i32 0, i32 1 + store i64 4, ptr %331, align 4 + %332 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %329, align 8 + %333 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %334 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %333, i32 0, i32 0 + store ptr @11, ptr %334, align 8 + %335 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %333, i32 0, i32 1 + store i64 22, ptr %335, align 4 + %336 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %333, align 8 + call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %190, %"github.com/goplus/llgo/internal/runtime.String" %332, %"github.com/goplus/llgo/internal/runtime.String" %336, ptr %242, %"github.com/goplus/llgo/internal/runtime.Slice" %319, %"github.com/goplus/llgo/internal/runtime.Slice" %328) + %337 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 + %338 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 + %339 = load ptr, ptr @"_llgo_iface$L2Ik-AJcd0jsoBw5fQ07pQpfUM-kh78Wn2bOeak6M3I", align 8 + %340 = icmp eq ptr %339, null + br i1 %340, label %_llgo_29, label %_llgo_30 _llgo_29: ; preds = %_llgo_28 - %332 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %333 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %332, i32 0, i32 0 - store ptr @23, ptr %333, align 8 - %334 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %332, i32 0, i32 1 - store i64 5, ptr %334, align 4 - %335 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %332, align 8 - %336 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %337 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %336, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %335, ptr %337, align 8 - %338 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %336, i32 0, i32 1 - store ptr %328, ptr %338, align 8 - %339 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %336, align 8 - %340 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %341 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %340, i32 0, i32 0 - store ptr @24, ptr %341, align 8 - %342 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %340, i32 0, i32 1 - store i64 4, ptr %342, align 4 - %343 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %340, align 8 - %344 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %345 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %344, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %343, ptr %345, align 8 - %346 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %344, i32 0, i32 1 - store ptr %329, ptr %346, align 8 - %347 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %344, align 8 - %348 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) - %349 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %348, i64 0 - store %"github.com/goplus/llgo/internal/abi.Imethod" %339, ptr %349, align 8 - %350 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %348, i64 1 - store %"github.com/goplus/llgo/internal/abi.Imethod" %347, ptr %350, align 8 - %351 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %352 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %351, i32 0, i32 0 - store ptr %348, ptr %352, align 8 - %353 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %351, i32 0, i32 1 - store i64 2, ptr %353, align 4 - %354 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %351, i32 0, i32 2 - store i64 2, ptr %354, align 4 - %355 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %351, align 8 - %356 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %357 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %356, i32 0, i32 0 - store ptr @25, ptr %357, align 8 - %358 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %356, i32 0, i32 1 - store i64 4, ptr %358, align 4 - %359 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %356, align 8 - %360 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %361 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %360, i32 0, i32 0 - store ptr @26, ptr %361, align 8 - %362 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %360, i32 0, i32 1 - store i64 0, ptr %362, align 4 - %363 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %360, align 8 - %364 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %359, %"github.com/goplus/llgo/internal/runtime.String" %363, %"github.com/goplus/llgo/internal/runtime.Slice" %355) - store ptr %364, ptr @"_llgo_iface$L2Ik-AJcd0jsoBw5fQ07pQpfUM-kh78Wn2bOeak6M3I", align 8 + %341 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %342 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %341, i32 0, i32 0 + store ptr @10, ptr %342, align 8 + %343 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %341, i32 0, i32 1 + store i64 5, ptr %343, align 4 + %344 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %341, align 8 + %345 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %346 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %345, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %344, ptr %346, align 8 + %347 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %345, i32 0, i32 1 + store ptr %337, ptr %347, align 8 + %348 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %345, align 8 + %349 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %350 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %349, i32 0, i32 0 + store ptr @7, ptr %350, align 8 + %351 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %349, i32 0, i32 1 + store i64 4, ptr %351, align 4 + %352 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %349, align 8 + %353 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %354 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %353, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %352, ptr %354, align 8 + %355 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %353, i32 0, i32 1 + store ptr %338, ptr %355, align 8 + %356 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %353, align 8 + %357 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48) + %358 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %357, i64 0 + store %"github.com/goplus/llgo/internal/abi.Imethod" %348, ptr %358, align 8 + %359 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %357, i64 1 + store %"github.com/goplus/llgo/internal/abi.Imethod" %356, ptr %359, align 8 + %360 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %361 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %360, i32 0, i32 0 + store ptr %357, ptr %361, align 8 + %362 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %360, i32 0, i32 1 + store i64 2, ptr %362, align 4 + %363 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %360, i32 0, i32 2 + store i64 2, ptr %363, align 4 + %364 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %360, align 8 + %365 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %366 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %365, i32 0, i32 0 + store ptr @1, ptr %366, align 8 + %367 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %365, i32 0, i32 1 + store i64 4, ptr %367, align 4 + %368 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %365, align 8 + %369 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %370 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %369, i32 0, i32 0 + store ptr null, ptr %370, align 8 + %371 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %369, i32 0, i32 1 + store i64 0, ptr %371, align 4 + %372 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %369, align 8 + %373 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %368, %"github.com/goplus/llgo/internal/runtime.String" %372, %"github.com/goplus/llgo/internal/runtime.Slice" %364) + store ptr %373, ptr @"_llgo_iface$L2Ik-AJcd0jsoBw5fQ07pQpfUM-kh78Wn2bOeak6M3I", align 8 br label %_llgo_30 _llgo_30: ; preds = %_llgo_29, %_llgo_28 - %365 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 2, i64 2) - store ptr %365, ptr @_llgo_main.nopCloser, align 8 - %366 = load ptr, ptr @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y", align 8 - %367 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %368 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %367, i32 0, i32 0 - store ptr @27, ptr %368, align 8 - %369 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %367, i32 0, i32 1 - store i64 5, ptr %369, align 4 - %370 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %367, align 8 - %371 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 - %372 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %373 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %372, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %370, ptr %373, align 8 - %374 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %372, i32 0, i32 1 - store ptr %371, ptr %374, align 8 - %375 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %372, i32 0, i32 2 - store ptr @"main.(*nopCloser).Close", ptr %375, align 8 - %376 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %372, i32 0, i32 3 - store ptr @"main.(*nopCloser).Close", ptr %376, align 8 - %377 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %372, align 8 - %378 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %379 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %378, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %370, ptr %379, align 8 - %380 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %378, i32 0, i32 1 - store ptr %371, ptr %380, align 8 - %381 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %378, i32 0, i32 2 - store ptr @"main.(*nopCloser).Close", ptr %381, align 8 - %382 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %378, i32 0, i32 3 - store ptr @main.nopCloser.Close, ptr %382, align 8 - %383 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %378, align 8 - %384 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %385 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %384, i32 0, i32 0 - store ptr @28, ptr %385, align 8 - %386 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %384, i32 0, i32 1 - store i64 4, ptr %386, align 4 - %387 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %384, align 8 - %388 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 - %389 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %390 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %389, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %387, ptr %390, align 8 - %391 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %389, i32 0, i32 1 - store ptr %388, ptr %391, align 8 - %392 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %389, i32 0, i32 2 - store ptr @"main.(*nopCloser).Read", ptr %392, align 8 - %393 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %389, i32 0, i32 3 - store ptr @"main.(*nopCloser).Read", ptr %393, align 8 - %394 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %389, align 8 - %395 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %396 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %395, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %387, ptr %396, align 8 - %397 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %395, i32 0, i32 1 - store ptr %388, ptr %397, align 8 - %398 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %395, i32 0, i32 2 - store ptr @"main.(*nopCloser).Read", ptr %398, align 8 - %399 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %395, i32 0, i32 3 - store ptr @main.nopCloser.Read, ptr %399, align 8 - %400 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %395, align 8 - %401 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80) - %402 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %401, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %383, ptr %402, align 8 - %403 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %401, i64 1 - store %"github.com/goplus/llgo/internal/abi.Method" %400, ptr %403, align 8 - %404 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %405 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %404, i32 0, i32 0 - store ptr %401, ptr %405, align 8 - %406 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %404, i32 0, i32 1 - store i64 2, ptr %406, align 4 - %407 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %404, i32 0, i32 2 - store i64 2, ptr %407, align 4 - %408 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %404, align 8 - %409 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80) - %410 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %409, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %377, ptr %410, align 8 - %411 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %409, i64 1 - store %"github.com/goplus/llgo/internal/abi.Method" %394, ptr %411, align 8 - %412 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %413 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %412, i32 0, i32 0 - store ptr %409, ptr %413, align 8 - %414 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %412, i32 0, i32 1 - store i64 2, ptr %414, align 4 - %415 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %412, i32 0, i32 2 + %374 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 2, i64 2) + store ptr %374, ptr @_llgo_main.nopCloser, align 8 + %375 = load ptr, ptr @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y", align 8 + %376 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %377 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %376, i32 0, i32 0 + store ptr @10, ptr %377, align 8 + %378 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %376, i32 0, i32 1 + store i64 5, ptr %378, align 4 + %379 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %376, align 8 + %380 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 + %381 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %382 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %381, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %379, ptr %382, align 8 + %383 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %381, i32 0, i32 1 + store ptr %380, ptr %383, align 8 + %384 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %381, i32 0, i32 2 + store ptr @"main.(*nopCloser).Close", ptr %384, align 8 + %385 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %381, i32 0, i32 3 + store ptr @"main.(*nopCloser).Close", ptr %385, align 8 + %386 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %381, align 8 + %387 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %388 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %387, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %379, ptr %388, align 8 + %389 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %387, i32 0, i32 1 + store ptr %380, ptr %389, align 8 + %390 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %387, i32 0, i32 2 + store ptr @"main.(*nopCloser).Close", ptr %390, align 8 + %391 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %387, i32 0, i32 3 + store ptr @main.nopCloser.Close, ptr %391, align 8 + %392 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %387, align 8 + %393 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %394 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %393, i32 0, i32 0 + store ptr @7, ptr %394, align 8 + %395 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %393, i32 0, i32 1 + store i64 4, ptr %395, align 4 + %396 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %393, align 8 + %397 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 + %398 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %399 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %398, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %396, ptr %399, align 8 + %400 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %398, i32 0, i32 1 + store ptr %397, ptr %400, align 8 + %401 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %398, i32 0, i32 2 + store ptr @"main.(*nopCloser).Read", ptr %401, align 8 + %402 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %398, i32 0, i32 3 + store ptr @"main.(*nopCloser).Read", ptr %402, align 8 + %403 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %398, align 8 + %404 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %405 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %404, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %396, ptr %405, align 8 + %406 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %404, i32 0, i32 1 + store ptr %397, ptr %406, align 8 + %407 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %404, i32 0, i32 2 + store ptr @"main.(*nopCloser).Read", ptr %407, align 8 + %408 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %404, i32 0, i32 3 + store ptr @main.nopCloser.Read, ptr %408, align 8 + %409 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %404, align 8 + %410 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80) + %411 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %410, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %392, ptr %411, align 8 + %412 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %410, i64 1 + store %"github.com/goplus/llgo/internal/abi.Method" %409, ptr %412, align 8 + %413 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %414 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %413, i32 0, i32 0 + store ptr %410, ptr %414, align 8 + %415 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %413, i32 0, i32 1 store i64 2, ptr %415, align 4 - %416 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %412, align 8 - %417 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %418 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %417, i32 0, i32 0 - store ptr @29, ptr %418, align 8 - %419 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %417, i32 0, i32 1 - store i64 4, ptr %419, align 4 - %420 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %417, align 8 - %421 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %422 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %421, i32 0, i32 0 - store ptr @30, ptr %422, align 8 - %423 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %421, i32 0, i32 1 - store i64 14, ptr %423, align 4 - %424 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %421, align 8 - call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %365, %"github.com/goplus/llgo/internal/runtime.String" %420, %"github.com/goplus/llgo/internal/runtime.String" %424, ptr %366, %"github.com/goplus/llgo/internal/runtime.Slice" %408, %"github.com/goplus/llgo/internal/runtime.Slice" %416) - %425 = load ptr, ptr @_llgo_string, align 8 - %426 = load ptr, ptr @_llgo_int, align 8 - %427 = load ptr, ptr @_llgo_error, align 8 - %428 = load ptr, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8 - %429 = icmp eq ptr %428, null - br i1 %429, label %_llgo_31, label %_llgo_32 + %416 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %413, i32 0, i32 2 + store i64 2, ptr %416, align 4 + %417 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %413, align 8 + %418 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80) + %419 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %418, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %386, ptr %419, align 8 + %420 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %418, i64 1 + store %"github.com/goplus/llgo/internal/abi.Method" %403, ptr %420, align 8 + %421 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %422 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %421, i32 0, i32 0 + store ptr %418, ptr %422, align 8 + %423 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %421, i32 0, i32 1 + store i64 2, ptr %423, align 4 + %424 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %421, i32 0, i32 2 + store i64 2, ptr %424, align 4 + %425 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %421, align 8 + %426 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %427 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %426, i32 0, i32 0 + store ptr @1, ptr %427, align 8 + %428 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %426, i32 0, i32 1 + store i64 4, ptr %428, align 4 + %429 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %426, align 8 + %430 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %431 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %430, i32 0, i32 0 + store ptr @12, ptr %431, align 8 + %432 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %430, i32 0, i32 1 + store i64 14, ptr %432, align 4 + %433 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %430, align 8 + call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %374, %"github.com/goplus/llgo/internal/runtime.String" %429, %"github.com/goplus/llgo/internal/runtime.String" %433, ptr %375, %"github.com/goplus/llgo/internal/runtime.Slice" %417, %"github.com/goplus/llgo/internal/runtime.Slice" %425) + %434 = load ptr, ptr @_llgo_string, align 8 + %435 = load ptr, ptr @_llgo_int, align 8 + %436 = load ptr, ptr @_llgo_error, align 8 + %437 = load ptr, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8 + %438 = icmp eq ptr %437, null + br i1 %438, label %_llgo_31, label %_llgo_32 _llgo_31: ; preds = %_llgo_30 - %430 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) - %431 = getelementptr ptr, ptr %430, i64 0 - store ptr %425, ptr %431, align 8 - %432 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %433 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %432, i32 0, i32 0 - store ptr %430, ptr %433, align 8 - %434 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %432, i32 0, i32 1 - store i64 1, ptr %434, align 4 - %435 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %432, i32 0, i32 2 - store i64 1, ptr %435, align 4 - %436 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %432, align 8 - %437 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - %438 = getelementptr ptr, ptr %437, i64 0 - store ptr %426, ptr %438, align 8 - %439 = getelementptr ptr, ptr %437, i64 1 - store ptr %427, ptr %439, align 8 - %440 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %441 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %440, i32 0, i32 0 - store ptr %437, ptr %441, align 8 - %442 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %440, i32 0, i32 1 - store i64 2, ptr %442, align 4 - %443 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %440, i32 0, i32 2 - store i64 2, ptr %443, align 4 - %444 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %440, align 8 - %445 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %436, %"github.com/goplus/llgo/internal/runtime.Slice" %444, i1 false) - store ptr %445, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8 + %439 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) + %440 = getelementptr ptr, ptr %439, i64 0 + store ptr %434, ptr %440, align 8 + %441 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %442 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %441, i32 0, i32 0 + store ptr %439, ptr %442, align 8 + %443 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %441, i32 0, i32 1 + store i64 1, ptr %443, align 4 + %444 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %441, i32 0, i32 2 + store i64 1, ptr %444, align 4 + %445 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %441, align 8 + %446 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + %447 = getelementptr ptr, ptr %446, i64 0 + store ptr %435, ptr %447, align 8 + %448 = getelementptr ptr, ptr %446, i64 1 + store ptr %436, ptr %448, align 8 + %449 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %450 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %449, i32 0, i32 0 + store ptr %446, ptr %450, align 8 + %451 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %449, i32 0, i32 1 + store i64 2, ptr %451, align 4 + %452 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %449, i32 0, i32 2 + store i64 2, ptr %452, align 4 + %453 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %449, align 8 + %454 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %445, %"github.com/goplus/llgo/internal/runtime.Slice" %453, i1 false) + store ptr %454, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8 br label %_llgo_32 _llgo_32: ; preds = %_llgo_31, %_llgo_30 - %446 = load ptr, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8 - %447 = load ptr, ptr @_llgo_main.StringWriter, align 8 - %448 = icmp eq ptr %447, null - br i1 %448, label %_llgo_33, label %_llgo_34 + %455 = load ptr, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8 + %456 = load ptr, ptr @_llgo_main.StringWriter, align 8 + %457 = icmp eq ptr %456, null + br i1 %457, label %_llgo_33, label %_llgo_34 _llgo_33: ; preds = %_llgo_32 - %449 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %450 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %449, i32 0, i32 0 - store ptr @31, ptr %450, align 8 - %451 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %449, i32 0, i32 1 - store i64 11, ptr %451, align 4 - %452 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %449, align 8 - %453 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %454 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %453, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %452, ptr %454, align 8 - %455 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %453, i32 0, i32 1 - store ptr %446, ptr %455, align 8 - %456 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %453, align 8 - %457 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) - %458 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %457, i64 0 - store %"github.com/goplus/llgo/internal/abi.Imethod" %456, ptr %458, align 8 - %459 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %460 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %459, i32 0, i32 0 - store ptr %457, ptr %460, align 8 - %461 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %459, i32 0, i32 1 - store i64 1, ptr %461, align 4 - %462 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %459, i32 0, i32 2 - store i64 1, ptr %462, align 4 - %463 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %459, align 8 - %464 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %465 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %464, i32 0, i32 0 - store ptr @32, ptr %465, align 8 - %466 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %464, i32 0, i32 1 - store i64 4, ptr %466, align 4 - %467 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %464, align 8 - %468 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %469 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %468, i32 0, i32 0 - store ptr @33, ptr %469, align 8 - %470 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %468, i32 0, i32 1 - store i64 17, ptr %470, align 4 - %471 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %468, align 8 - %472 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %467, %"github.com/goplus/llgo/internal/runtime.String" %471, %"github.com/goplus/llgo/internal/runtime.Slice" %463) - store ptr %472, ptr @_llgo_main.StringWriter, align 8 + %458 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %459 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %458, i32 0, i32 0 + store ptr @13, ptr %459, align 8 + %460 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %458, i32 0, i32 1 + store i64 11, ptr %460, align 4 + %461 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %458, align 8 + %462 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %463 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %462, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %461, ptr %463, align 8 + %464 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %462, i32 0, i32 1 + store ptr %455, ptr %464, align 8 + %465 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %462, align 8 + %466 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) + %467 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %466, i64 0 + store %"github.com/goplus/llgo/internal/abi.Imethod" %465, ptr %467, align 8 + %468 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %469 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %468, i32 0, i32 0 + store ptr %466, ptr %469, align 8 + %470 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %468, i32 0, i32 1 + store i64 1, ptr %470, align 4 + %471 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %468, i32 0, i32 2 + store i64 1, ptr %471, align 4 + %472 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %468, align 8 + %473 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %474 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %473, i32 0, i32 0 + store ptr @1, ptr %474, align 8 + %475 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %473, i32 0, i32 1 + store i64 4, ptr %475, align 4 + %476 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %473, align 8 + %477 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %478 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %477, i32 0, i32 0 + store ptr @14, ptr %478, align 8 + %479 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %477, i32 0, i32 1 + store i64 17, ptr %479, align 4 + %480 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %477, align 8 + %481 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %476, %"github.com/goplus/llgo/internal/runtime.String" %480, %"github.com/goplus/llgo/internal/runtime.Slice" %472) + store ptr %481, ptr @_llgo_main.StringWriter, align 8 br label %_llgo_34 _llgo_34: ; preds = %_llgo_33, %_llgo_32 - %473 = load ptr, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8 - %474 = load ptr, ptr @"_llgo_iface$Ly4zXiUMEac-hYAMw6b6miJ1JEhGfLyBWyBOhpsRZcU", align 8 - %475 = icmp eq ptr %474, null - br i1 %475, label %_llgo_35, label %_llgo_36 + %482 = load ptr, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8 + %483 = load ptr, ptr @"_llgo_iface$Ly4zXiUMEac-hYAMw6b6miJ1JEhGfLyBWyBOhpsRZcU", align 8 + %484 = icmp eq ptr %483, null + br i1 %484, label %_llgo_35, label %_llgo_36 _llgo_35: ; preds = %_llgo_34 - %476 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %477 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %476, i32 0, i32 0 - store ptr @34, ptr %477, align 8 - %478 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %476, i32 0, i32 1 - store i64 11, ptr %478, align 4 - %479 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %476, align 8 - %480 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %481 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %480, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %479, ptr %481, align 8 - %482 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %480, i32 0, i32 1 - store ptr %473, ptr %482, align 8 - %483 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %480, align 8 - %484 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) - %485 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %484, i64 0 - store %"github.com/goplus/llgo/internal/abi.Imethod" %483, ptr %485, align 8 - %486 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %487 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %486, i32 0, i32 0 - store ptr %484, ptr %487, align 8 - %488 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %486, i32 0, i32 1 - store i64 1, ptr %488, align 4 - %489 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %486, i32 0, i32 2 - store i64 1, ptr %489, align 4 - %490 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %486, align 8 - %491 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %492 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %491, i32 0, i32 0 - store ptr @35, ptr %492, align 8 - %493 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %491, i32 0, i32 1 - store i64 4, ptr %493, align 4 - %494 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %491, align 8 - %495 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %496 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %495, i32 0, i32 0 - store ptr @36, ptr %496, align 8 - %497 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %495, i32 0, i32 1 - store i64 0, ptr %497, align 4 - %498 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %495, align 8 - %499 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %494, %"github.com/goplus/llgo/internal/runtime.String" %498, %"github.com/goplus/llgo/internal/runtime.Slice" %490) - store ptr %499, ptr @"_llgo_iface$Ly4zXiUMEac-hYAMw6b6miJ1JEhGfLyBWyBOhpsRZcU", align 8 + %485 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %486 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %485, i32 0, i32 0 + store ptr @13, ptr %486, align 8 + %487 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %485, i32 0, i32 1 + store i64 11, ptr %487, align 4 + %488 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %485, align 8 + %489 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %490 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %489, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %488, ptr %490, align 8 + %491 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %489, i32 0, i32 1 + store ptr %482, ptr %491, align 8 + %492 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %489, align 8 + %493 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) + %494 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %493, i64 0 + store %"github.com/goplus/llgo/internal/abi.Imethod" %492, ptr %494, align 8 + %495 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %496 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %495, i32 0, i32 0 + store ptr %493, ptr %496, align 8 + %497 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %495, i32 0, i32 1 + store i64 1, ptr %497, align 4 + %498 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %495, i32 0, i32 2 + store i64 1, ptr %498, align 4 + %499 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %495, align 8 + %500 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %501 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %500, i32 0, i32 0 + store ptr @1, ptr %501, align 8 + %502 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %500, i32 0, i32 1 + store i64 4, ptr %502, align 4 + %503 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %500, align 8 + %504 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %505 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %504, i32 0, i32 0 + store ptr null, ptr %505, align 8 + %506 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %504, i32 0, i32 1 + store i64 0, ptr %506, align 4 + %507 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %504, align 8 + %508 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %503, %"github.com/goplus/llgo/internal/runtime.String" %507, %"github.com/goplus/llgo/internal/runtime.Slice" %499) + store ptr %508, ptr @"_llgo_iface$Ly4zXiUMEac-hYAMw6b6miJ1JEhGfLyBWyBOhpsRZcU", align 8 br label %_llgo_36 _llgo_36: ; preds = %_llgo_35, %_llgo_34 - %500 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 10) - store ptr %500, ptr @_llgo_main.stringReader, align 8 - %501 = load ptr, ptr @_llgo_string, align 8 - %502 = load ptr, ptr @_llgo_int64, align 8 - %503 = load ptr, ptr @_llgo_int, align 8 - %504 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %505 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %504, i32 0, i32 0 - store ptr @40, ptr %505, align 8 - %506 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %504, i32 0, i32 1 - store i64 1, ptr %506, align 4 - %507 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %504, align 8 - %508 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %509 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %508, i32 0, i32 0 - store ptr @41, ptr %509, align 8 - %510 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %508, i32 0, i32 1 - store i64 0, ptr %510, align 4 - %511 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %508, align 8 - %512 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %507, ptr %501, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %511, i1 false) + %509 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 10) + store ptr %509, ptr @_llgo_main.stringReader, align 8 + %510 = load ptr, ptr @_llgo_string, align 8 + %511 = load ptr, ptr @_llgo_int64, align 8 + %512 = load ptr, ptr @_llgo_int, align 8 %513 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %514 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %513, i32 0, i32 0 - store ptr @42, ptr %514, align 8 + store ptr @18, ptr %514, align 8 %515 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %513, i32 0, i32 1 store i64 1, ptr %515, align 4 %516 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %513, align 8 %517 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %518 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %517, i32 0, i32 0 - store ptr @43, ptr %518, align 8 + store ptr null, ptr %518, align 8 %519 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %517, i32 0, i32 1 store i64 0, ptr %519, align 4 %520 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %517, align 8 - %521 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %516, ptr %502, i64 16, %"github.com/goplus/llgo/internal/runtime.String" %520, i1 false) + %521 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %516, ptr %510, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %520, i1 false) %522 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %523 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %522, i32 0, i32 0 - store ptr @44, ptr %523, align 8 + store ptr @19, ptr %523, align 8 %524 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %522, i32 0, i32 1 - store i64 8, ptr %524, align 4 + store i64 1, ptr %524, align 4 %525 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %522, align 8 %526 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %527 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %526, i32 0, i32 0 - store ptr @45, ptr %527, align 8 + store ptr null, ptr %527, align 8 %528 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %526, i32 0, i32 1 store i64 0, ptr %528, align 4 %529 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %526, align 8 - %530 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %525, ptr %503, i64 24, %"github.com/goplus/llgo/internal/runtime.String" %529, i1 false) + %530 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %525, ptr %511, i64 16, %"github.com/goplus/llgo/internal/runtime.String" %529, i1 false) %531 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %532 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %531, i32 0, i32 0 - store ptr @46, ptr %532, align 8 + store ptr @20, ptr %532, align 8 %533 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %531, i32 0, i32 1 - store i64 4, ptr %533, align 4 + store i64 8, ptr %533, align 4 %534 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %531, align 8 - %535 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 168) - %536 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %535, i64 0 - store %"github.com/goplus/llgo/internal/abi.StructField" %512, ptr %536, align 8 - %537 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %535, i64 1 - store %"github.com/goplus/llgo/internal/abi.StructField" %521, ptr %537, align 8 - %538 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %535, i64 2 - store %"github.com/goplus/llgo/internal/abi.StructField" %530, ptr %538, align 8 - %539 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %540 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %539, i32 0, i32 0 - store ptr %535, ptr %540, align 8 - %541 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %539, i32 0, i32 1 - store i64 3, ptr %541, align 4 - %542 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %539, i32 0, i32 2 - store i64 3, ptr %542, align 4 - %543 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %539, align 8 - %544 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %534, i64 32, %"github.com/goplus/llgo/internal/runtime.Slice" %543) - store ptr %544, ptr @"main.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk", align 8 - %545 = load ptr, ptr @"main.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk", align 8 - %546 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %547 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %546, i32 0, i32 0 - store ptr @47, ptr %547, align 8 - %548 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %546, i32 0, i32 1 - store i64 3, ptr %548, align 4 - %549 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %546, align 8 - %550 = load ptr, ptr @_llgo_int, align 8 - %551 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %552 = icmp eq ptr %551, null - br i1 %552, label %_llgo_37, label %_llgo_38 + %535 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %536 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %535, i32 0, i32 0 + store ptr null, ptr %536, align 8 + %537 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %535, i32 0, i32 1 + store i64 0, ptr %537, align 4 + %538 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %535, align 8 + %539 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %534, ptr %512, i64 24, %"github.com/goplus/llgo/internal/runtime.String" %538, i1 false) + %540 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %541 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %540, i32 0, i32 0 + store ptr @1, ptr %541, align 8 + %542 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %540, i32 0, i32 1 + store i64 4, ptr %542, align 4 + %543 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %540, align 8 + %544 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 168) + %545 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %544, i64 0 + store %"github.com/goplus/llgo/internal/abi.StructField" %521, ptr %545, align 8 + %546 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %544, i64 1 + store %"github.com/goplus/llgo/internal/abi.StructField" %530, ptr %546, align 8 + %547 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %544, i64 2 + store %"github.com/goplus/llgo/internal/abi.StructField" %539, ptr %547, align 8 + %548 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %549 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %548, i32 0, i32 0 + store ptr %544, ptr %549, align 8 + %550 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %548, i32 0, i32 1 + store i64 3, ptr %550, align 4 + %551 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %548, i32 0, i32 2 + store i64 3, ptr %551, align 4 + %552 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %548, align 8 + %553 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %543, i64 32, %"github.com/goplus/llgo/internal/runtime.Slice" %552) + store ptr %553, ptr @"main.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk", align 8 + %554 = load ptr, ptr @"main.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk", align 8 + %555 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %556 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %555, i32 0, i32 0 + store ptr @21, ptr %556, align 8 + %557 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %555, i32 0, i32 1 + store i64 3, ptr %557, align 4 + %558 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %555, align 8 + %559 = load ptr, ptr @_llgo_int, align 8 + %560 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %561 = icmp eq ptr %560, null + br i1 %561, label %_llgo_37, label %_llgo_38 _llgo_37: ; preds = %_llgo_36 - %553 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - %554 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %555 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %554, i32 0, i32 0 - store ptr %553, ptr %555, align 8 - %556 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %554, i32 0, i32 1 - store i64 0, ptr %556, align 4 - %557 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %554, i32 0, i32 2 - store i64 0, ptr %557, align 4 - %558 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %554, align 8 - %559 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) - %560 = getelementptr ptr, ptr %559, i64 0 - store ptr %550, ptr %560, align 8 - %561 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %562 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %561, i32 0, i32 0 - store ptr %559, ptr %562, align 8 - %563 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %561, i32 0, i32 1 - store i64 1, ptr %563, align 4 - %564 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %561, i32 0, i32 2 - store i64 1, ptr %564, align 4 - %565 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %561, align 8 - %566 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %558, %"github.com/goplus/llgo/internal/runtime.Slice" %565, i1 false) - store ptr %566, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %562 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + %563 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %564 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %563, i32 0, i32 0 + store ptr %562, ptr %564, align 8 + %565 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %563, i32 0, i32 1 + store i64 0, ptr %565, align 4 + %566 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %563, i32 0, i32 2 + store i64 0, ptr %566, align 4 + %567 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %563, align 8 + %568 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) + %569 = getelementptr ptr, ptr %568, i64 0 + store ptr %559, ptr %569, align 8 + %570 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %571 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %570, i32 0, i32 0 + store ptr %568, ptr %571, align 8 + %572 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %570, i32 0, i32 1 + store i64 1, ptr %572, align 4 + %573 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %570, i32 0, i32 2 + store i64 1, ptr %573, align 4 + %574 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %570, align 8 + %575 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %567, %"github.com/goplus/llgo/internal/runtime.Slice" %574, i1 false) + store ptr %575, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 br label %_llgo_38 _llgo_38: ; preds = %_llgo_37, %_llgo_36 - %567 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %568 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %569 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %568, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %549, ptr %569, align 8 - %570 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %568, i32 0, i32 1 - store ptr %567, ptr %570, align 8 - %571 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %568, i32 0, i32 2 - store ptr @"main.(*stringReader).Len", ptr %571, align 8 - %572 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %568, i32 0, i32 3 - store ptr @"main.(*stringReader).Len", ptr %572, align 8 - %573 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %568, align 8 - %574 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %575 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %574, i32 0, i32 0 - store ptr @48, ptr %575, align 8 - %576 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %574, i32 0, i32 1 - store i64 4, ptr %576, align 4 - %577 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %574, align 8 - %578 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 - %579 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %580 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %579, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %577, ptr %580, align 8 - %581 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %579, i32 0, i32 1 - store ptr %578, ptr %581, align 8 - %582 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %579, i32 0, i32 2 - store ptr @"main.(*stringReader).Read", ptr %582, align 8 - %583 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %579, i32 0, i32 3 - store ptr @"main.(*stringReader).Read", ptr %583, align 8 - %584 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %579, align 8 - %585 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %586 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %585, i32 0, i32 0 - store ptr @49, ptr %586, align 8 - %587 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %585, i32 0, i32 1 - store i64 6, ptr %587, align 4 - %588 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %585, align 8 - %589 = load ptr, ptr @"[]_llgo_byte", align 8 - %590 = load ptr, ptr @_llgo_int64, align 8 - %591 = load ptr, ptr @_llgo_int, align 8 - %592 = load ptr, ptr @_llgo_error, align 8 - %593 = load ptr, ptr @"_llgo_func$TY5Etv7VBKM_-2um1BDEeQEE2lP06Pt6G54EuKiNC3c", align 8 - %594 = icmp eq ptr %593, null - br i1 %594, label %_llgo_39, label %_llgo_40 + %576 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %577 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %578 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %577, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %558, ptr %578, align 8 + %579 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %577, i32 0, i32 1 + store ptr %576, ptr %579, align 8 + %580 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %577, i32 0, i32 2 + store ptr @"main.(*stringReader).Len", ptr %580, align 8 + %581 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %577, i32 0, i32 3 + store ptr @"main.(*stringReader).Len", ptr %581, align 8 + %582 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %577, align 8 + %583 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %584 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %583, i32 0, i32 0 + store ptr @7, ptr %584, align 8 + %585 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %583, i32 0, i32 1 + store i64 4, ptr %585, align 4 + %586 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %583, align 8 + %587 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 + %588 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %589 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %588, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %586, ptr %589, align 8 + %590 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %588, i32 0, i32 1 + store ptr %587, ptr %590, align 8 + %591 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %588, i32 0, i32 2 + store ptr @"main.(*stringReader).Read", ptr %591, align 8 + %592 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %588, i32 0, i32 3 + store ptr @"main.(*stringReader).Read", ptr %592, align 8 + %593 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %588, align 8 + %594 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %595 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %594, i32 0, i32 0 + store ptr @22, ptr %595, align 8 + %596 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %594, i32 0, i32 1 + store i64 6, ptr %596, align 4 + %597 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %594, align 8 + %598 = load ptr, ptr @"[]_llgo_byte", align 8 + %599 = load ptr, ptr @_llgo_int64, align 8 + %600 = load ptr, ptr @_llgo_int, align 8 + %601 = load ptr, ptr @_llgo_error, align 8 + %602 = load ptr, ptr @"_llgo_func$TY5Etv7VBKM_-2um1BDEeQEE2lP06Pt6G54EuKiNC3c", align 8 + %603 = icmp eq ptr %602, null + br i1 %603, label %_llgo_39, label %_llgo_40 _llgo_39: ; preds = %_llgo_38 - %595 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - %596 = getelementptr ptr, ptr %595, i64 0 - store ptr %589, ptr %596, align 8 - %597 = getelementptr ptr, ptr %595, i64 1 - store ptr %590, ptr %597, align 8 - %598 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %599 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %598, i32 0, i32 0 - store ptr %595, ptr %599, align 8 - %600 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %598, i32 0, i32 1 - store i64 2, ptr %600, align 4 - %601 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %598, i32 0, i32 2 - store i64 2, ptr %601, align 4 - %602 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %598, align 8 - %603 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - %604 = getelementptr ptr, ptr %603, i64 0 - store ptr %591, ptr %604, align 8 - %605 = getelementptr ptr, ptr %603, i64 1 - store ptr %592, ptr %605, align 8 - %606 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %607 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %606, i32 0, i32 0 - store ptr %603, ptr %607, align 8 - %608 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %606, i32 0, i32 1 - store i64 2, ptr %608, align 4 - %609 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %606, i32 0, i32 2 + %604 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + %605 = getelementptr ptr, ptr %604, i64 0 + store ptr %598, ptr %605, align 8 + %606 = getelementptr ptr, ptr %604, i64 1 + store ptr %599, ptr %606, align 8 + %607 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %608 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %607, i32 0, i32 0 + store ptr %604, ptr %608, align 8 + %609 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %607, i32 0, i32 1 store i64 2, ptr %609, align 4 - %610 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %606, align 8 - %611 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %602, %"github.com/goplus/llgo/internal/runtime.Slice" %610, i1 false) - store ptr %611, ptr @"_llgo_func$TY5Etv7VBKM_-2um1BDEeQEE2lP06Pt6G54EuKiNC3c", align 8 + %610 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %607, i32 0, i32 2 + store i64 2, ptr %610, align 4 + %611 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %607, align 8 + %612 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + %613 = getelementptr ptr, ptr %612, i64 0 + store ptr %600, ptr %613, align 8 + %614 = getelementptr ptr, ptr %612, i64 1 + store ptr %601, ptr %614, align 8 + %615 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %616 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %615, i32 0, i32 0 + store ptr %612, ptr %616, align 8 + %617 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %615, i32 0, i32 1 + store i64 2, ptr %617, align 4 + %618 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %615, i32 0, i32 2 + store i64 2, ptr %618, align 4 + %619 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %615, align 8 + %620 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %611, %"github.com/goplus/llgo/internal/runtime.Slice" %619, i1 false) + store ptr %620, ptr @"_llgo_func$TY5Etv7VBKM_-2um1BDEeQEE2lP06Pt6G54EuKiNC3c", align 8 br label %_llgo_40 _llgo_40: ; preds = %_llgo_39, %_llgo_38 - %612 = load ptr, ptr @"_llgo_func$TY5Etv7VBKM_-2um1BDEeQEE2lP06Pt6G54EuKiNC3c", align 8 - %613 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %614 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %613, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %588, ptr %614, align 8 - %615 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %613, i32 0, i32 1 - store ptr %612, ptr %615, align 8 - %616 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %613, i32 0, i32 2 - store ptr @"main.(*stringReader).ReadAt", ptr %616, align 8 - %617 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %613, i32 0, i32 3 - store ptr @"main.(*stringReader).ReadAt", ptr %617, align 8 - %618 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %613, align 8 - %619 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %620 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %619, i32 0, i32 0 - store ptr @50, ptr %620, align 8 - %621 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %619, i32 0, i32 1 - store i64 8, ptr %621, align 4 - %622 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %619, align 8 - %623 = load ptr, ptr @_llgo_byte, align 8 - %624 = load ptr, ptr @_llgo_error, align 8 - %625 = load ptr, ptr @"_llgo_func$6bvVpCcGPUc3z_EmsQTHB0AVT1hP5-NNLVRgm43teCM", align 8 - %626 = icmp eq ptr %625, null - br i1 %626, label %_llgo_41, label %_llgo_42 + %621 = load ptr, ptr @"_llgo_func$TY5Etv7VBKM_-2um1BDEeQEE2lP06Pt6G54EuKiNC3c", align 8 + %622 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %623 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %622, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %597, ptr %623, align 8 + %624 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %622, i32 0, i32 1 + store ptr %621, ptr %624, align 8 + %625 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %622, i32 0, i32 2 + store ptr @"main.(*stringReader).ReadAt", ptr %625, align 8 + %626 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %622, i32 0, i32 3 + store ptr @"main.(*stringReader).ReadAt", ptr %626, align 8 + %627 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %622, align 8 + %628 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %629 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %628, i32 0, i32 0 + store ptr @23, ptr %629, align 8 + %630 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %628, i32 0, i32 1 + store i64 8, ptr %630, align 4 + %631 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %628, align 8 + %632 = load ptr, ptr @_llgo_byte, align 8 + %633 = load ptr, ptr @_llgo_error, align 8 + %634 = load ptr, ptr @"_llgo_func$6bvVpCcGPUc3z_EmsQTHB0AVT1hP5-NNLVRgm43teCM", align 8 + %635 = icmp eq ptr %634, null + br i1 %635, label %_llgo_41, label %_llgo_42 _llgo_41: ; preds = %_llgo_40 - %627 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - %628 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %629 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %628, i32 0, i32 0 - store ptr %627, ptr %629, align 8 - %630 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %628, i32 0, i32 1 - store i64 0, ptr %630, align 4 - %631 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %628, i32 0, i32 2 - store i64 0, ptr %631, align 4 - %632 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %628, align 8 - %633 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - %634 = getelementptr ptr, ptr %633, i64 0 - store ptr %623, ptr %634, align 8 - %635 = getelementptr ptr, ptr %633, i64 1 - store ptr %624, ptr %635, align 8 - %636 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %637 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %636, i32 0, i32 0 - store ptr %633, ptr %637, align 8 - %638 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %636, i32 0, i32 1 - store i64 2, ptr %638, align 4 - %639 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %636, i32 0, i32 2 - store i64 2, ptr %639, align 4 - %640 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %636, align 8 - %641 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %632, %"github.com/goplus/llgo/internal/runtime.Slice" %640, i1 false) - store ptr %641, ptr @"_llgo_func$6bvVpCcGPUc3z_EmsQTHB0AVT1hP5-NNLVRgm43teCM", align 8 + %636 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + %637 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %638 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %637, i32 0, i32 0 + store ptr %636, ptr %638, align 8 + %639 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %637, i32 0, i32 1 + store i64 0, ptr %639, align 4 + %640 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %637, i32 0, i32 2 + store i64 0, ptr %640, align 4 + %641 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %637, align 8 + %642 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + %643 = getelementptr ptr, ptr %642, i64 0 + store ptr %632, ptr %643, align 8 + %644 = getelementptr ptr, ptr %642, i64 1 + store ptr %633, ptr %644, align 8 + %645 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %646 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %645, i32 0, i32 0 + store ptr %642, ptr %646, align 8 + %647 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %645, i32 0, i32 1 + store i64 2, ptr %647, align 4 + %648 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %645, i32 0, i32 2 + store i64 2, ptr %648, align 4 + %649 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %645, align 8 + %650 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %641, %"github.com/goplus/llgo/internal/runtime.Slice" %649, i1 false) + store ptr %650, ptr @"_llgo_func$6bvVpCcGPUc3z_EmsQTHB0AVT1hP5-NNLVRgm43teCM", align 8 br label %_llgo_42 _llgo_42: ; preds = %_llgo_41, %_llgo_40 - %642 = load ptr, ptr @"_llgo_func$6bvVpCcGPUc3z_EmsQTHB0AVT1hP5-NNLVRgm43teCM", align 8 - %643 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %644 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %643, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %622, ptr %644, align 8 - %645 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %643, i32 0, i32 1 - store ptr %642, ptr %645, align 8 - %646 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %643, i32 0, i32 2 - store ptr @"main.(*stringReader).ReadByte", ptr %646, align 8 - %647 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %643, i32 0, i32 3 - store ptr @"main.(*stringReader).ReadByte", ptr %647, align 8 - %648 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %643, align 8 - %649 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %650 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %649, i32 0, i32 0 - store ptr @51, ptr %650, align 8 - %651 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %649, i32 0, i32 1 - store i64 8, ptr %651, align 4 - %652 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %649, align 8 - %653 = load ptr, ptr @_llgo_rune, align 8 - %654 = icmp eq ptr %653, null - br i1 %654, label %_llgo_43, label %_llgo_44 + %651 = load ptr, ptr @"_llgo_func$6bvVpCcGPUc3z_EmsQTHB0AVT1hP5-NNLVRgm43teCM", align 8 + %652 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %653 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %652, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %631, ptr %653, align 8 + %654 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %652, i32 0, i32 1 + store ptr %651, ptr %654, align 8 + %655 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %652, i32 0, i32 2 + store ptr @"main.(*stringReader).ReadByte", ptr %655, align 8 + %656 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %652, i32 0, i32 3 + store ptr @"main.(*stringReader).ReadByte", ptr %656, align 8 + %657 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %652, align 8 + %658 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %659 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %658, i32 0, i32 0 + store ptr @24, ptr %659, align 8 + %660 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %658, i32 0, i32 1 + store i64 8, ptr %660, align 4 + %661 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %658, align 8 + %662 = load ptr, ptr @_llgo_rune, align 8 + %663 = icmp eq ptr %662, null + br i1 %663, label %_llgo_43, label %_llgo_44 _llgo_43: ; preds = %_llgo_42 - %655 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 5) - store ptr %655, ptr @_llgo_rune, align 8 + %664 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 5) + store ptr %664, ptr @_llgo_rune, align 8 br label %_llgo_44 _llgo_44: ; preds = %_llgo_43, %_llgo_42 - %656 = load ptr, ptr @_llgo_rune, align 8 - %657 = load ptr, ptr @_llgo_int, align 8 - %658 = load ptr, ptr @_llgo_error, align 8 - %659 = load ptr, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8 - %660 = icmp eq ptr %659, null - br i1 %660, label %_llgo_45, label %_llgo_46 + %665 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %664, i32 0, i32 6 + %666 = load i8, ptr %665, align 1 + %667 = or i8 %666, 32 + store i8 %667, ptr %665, align 1 + %668 = load ptr, ptr @_llgo_rune, align 8 + %669 = load ptr, ptr @_llgo_int, align 8 + %670 = load ptr, ptr @_llgo_error, align 8 + %671 = load ptr, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8 + %672 = icmp eq ptr %671, null + br i1 %672, label %_llgo_45, label %_llgo_46 _llgo_45: ; preds = %_llgo_44 - %661 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - %662 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %663 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %662, i32 0, i32 0 - store ptr %661, ptr %663, align 8 - %664 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %662, i32 0, i32 1 - store i64 0, ptr %664, align 4 - %665 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %662, i32 0, i32 2 - store i64 0, ptr %665, align 4 - %666 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %662, align 8 - %667 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) - %668 = getelementptr ptr, ptr %667, i64 0 - store ptr %656, ptr %668, align 8 - %669 = getelementptr ptr, ptr %667, i64 1 - store ptr %657, ptr %669, align 8 - %670 = getelementptr ptr, ptr %667, i64 2 - store ptr %658, ptr %670, align 8 - %671 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %672 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %671, i32 0, i32 0 - store ptr %667, ptr %672, align 8 - %673 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %671, i32 0, i32 1 - store i64 3, ptr %673, align 4 - %674 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %671, i32 0, i32 2 - store i64 3, ptr %674, align 4 - %675 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %671, align 8 - %676 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %666, %"github.com/goplus/llgo/internal/runtime.Slice" %675, i1 false) - store ptr %676, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8 + %673 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + %674 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %675 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %674, i32 0, i32 0 + store ptr %673, ptr %675, align 8 + %676 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %674, i32 0, i32 1 + store i64 0, ptr %676, align 4 + %677 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %674, i32 0, i32 2 + store i64 0, ptr %677, align 4 + %678 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %674, align 8 + %679 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) + %680 = getelementptr ptr, ptr %679, i64 0 + store ptr %668, ptr %680, align 8 + %681 = getelementptr ptr, ptr %679, i64 1 + store ptr %669, ptr %681, align 8 + %682 = getelementptr ptr, ptr %679, i64 2 + store ptr %670, ptr %682, align 8 + %683 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %684 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %683, i32 0, i32 0 + store ptr %679, ptr %684, align 8 + %685 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %683, i32 0, i32 1 + store i64 3, ptr %685, align 4 + %686 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %683, i32 0, i32 2 + store i64 3, ptr %686, align 4 + %687 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %683, align 8 + %688 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %678, %"github.com/goplus/llgo/internal/runtime.Slice" %687, i1 false) + store ptr %688, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8 br label %_llgo_46 _llgo_46: ; preds = %_llgo_45, %_llgo_44 - %677 = load ptr, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8 - %678 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %679 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %678, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %652, ptr %679, align 8 - %680 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %678, i32 0, i32 1 - store ptr %677, ptr %680, align 8 - %681 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %678, i32 0, i32 2 - store ptr @"main.(*stringReader).ReadRune", ptr %681, align 8 - %682 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %678, i32 0, i32 3 - store ptr @"main.(*stringReader).ReadRune", ptr %682, align 8 - %683 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %678, align 8 - %684 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %685 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %684, i32 0, i32 0 - store ptr @52, ptr %685, align 8 - %686 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %684, i32 0, i32 1 - store i64 4, ptr %686, align 4 - %687 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %684, align 8 - %688 = load ptr, ptr @_llgo_int64, align 8 - %689 = load ptr, ptr @_llgo_int, align 8 - %690 = load ptr, ptr @_llgo_int64, align 8 - %691 = load ptr, ptr @_llgo_error, align 8 - %692 = load ptr, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8 - %693 = icmp eq ptr %692, null - br i1 %693, label %_llgo_47, label %_llgo_48 + %689 = load ptr, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8 + %690 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %691 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %690, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %661, ptr %691, align 8 + %692 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %690, i32 0, i32 1 + store ptr %689, ptr %692, align 8 + %693 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %690, i32 0, i32 2 + store ptr @"main.(*stringReader).ReadRune", ptr %693, align 8 + %694 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %690, i32 0, i32 3 + store ptr @"main.(*stringReader).ReadRune", ptr %694, align 8 + %695 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %690, align 8 + %696 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %697 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %696, i32 0, i32 0 + store ptr @25, ptr %697, align 8 + %698 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %696, i32 0, i32 1 + store i64 4, ptr %698, align 4 + %699 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %696, align 8 + %700 = load ptr, ptr @_llgo_int64, align 8 + %701 = load ptr, ptr @_llgo_int, align 8 + %702 = load ptr, ptr @_llgo_int64, align 8 + %703 = load ptr, ptr @_llgo_error, align 8 + %704 = load ptr, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8 + %705 = icmp eq ptr %704, null + br i1 %705, label %_llgo_47, label %_llgo_48 _llgo_47: ; preds = %_llgo_46 - %694 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - %695 = getelementptr ptr, ptr %694, i64 0 - store ptr %688, ptr %695, align 8 - %696 = getelementptr ptr, ptr %694, i64 1 - store ptr %689, ptr %696, align 8 - %697 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %698 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %697, i32 0, i32 0 - store ptr %694, ptr %698, align 8 - %699 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %697, i32 0, i32 1 - store i64 2, ptr %699, align 4 - %700 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %697, i32 0, i32 2 - store i64 2, ptr %700, align 4 - %701 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %697, align 8 - %702 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) - %703 = getelementptr ptr, ptr %702, i64 0 - store ptr %690, ptr %703, align 8 - %704 = getelementptr ptr, ptr %702, i64 1 - store ptr %691, ptr %704, align 8 - %705 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %706 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %705, i32 0, i32 0 - store ptr %702, ptr %706, align 8 - %707 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %705, i32 0, i32 1 - store i64 2, ptr %707, align 4 - %708 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %705, i32 0, i32 2 - store i64 2, ptr %708, align 4 - %709 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %705, align 8 - %710 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %701, %"github.com/goplus/llgo/internal/runtime.Slice" %709, i1 false) - store ptr %710, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8 + %706 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + %707 = getelementptr ptr, ptr %706, i64 0 + store ptr %700, ptr %707, align 8 + %708 = getelementptr ptr, ptr %706, i64 1 + store ptr %701, ptr %708, align 8 + %709 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %710 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %709, i32 0, i32 0 + store ptr %706, ptr %710, align 8 + %711 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %709, i32 0, i32 1 + store i64 2, ptr %711, align 4 + %712 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %709, i32 0, i32 2 + store i64 2, ptr %712, align 4 + %713 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %709, align 8 + %714 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16) + %715 = getelementptr ptr, ptr %714, i64 0 + store ptr %702, ptr %715, align 8 + %716 = getelementptr ptr, ptr %714, i64 1 + store ptr %703, ptr %716, align 8 + %717 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %718 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %717, i32 0, i32 0 + store ptr %714, ptr %718, align 8 + %719 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %717, i32 0, i32 1 + store i64 2, ptr %719, align 4 + %720 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %717, i32 0, i32 2 + store i64 2, ptr %720, align 4 + %721 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %717, align 8 + %722 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %713, %"github.com/goplus/llgo/internal/runtime.Slice" %721, i1 false) + store ptr %722, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8 br label %_llgo_48 _llgo_48: ; preds = %_llgo_47, %_llgo_46 - %711 = load ptr, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8 - %712 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %713 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %712, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %687, ptr %713, align 8 - %714 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %712, i32 0, i32 1 - store ptr %711, ptr %714, align 8 - %715 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %712, i32 0, i32 2 - store ptr @"main.(*stringReader).Seek", ptr %715, align 8 - %716 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %712, i32 0, i32 3 - store ptr @"main.(*stringReader).Seek", ptr %716, align 8 - %717 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %712, align 8 - %718 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %719 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %718, i32 0, i32 0 - store ptr @53, ptr %719, align 8 - %720 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %718, i32 0, i32 1 - store i64 4, ptr %720, align 4 - %721 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %718, align 8 - %722 = load ptr, ptr @_llgo_int64, align 8 - %723 = load ptr, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8 - %724 = icmp eq ptr %723, null - br i1 %724, label %_llgo_49, label %_llgo_50 + %723 = load ptr, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8 + %724 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %725 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %724, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %699, ptr %725, align 8 + %726 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %724, i32 0, i32 1 + store ptr %723, ptr %726, align 8 + %727 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %724, i32 0, i32 2 + store ptr @"main.(*stringReader).Seek", ptr %727, align 8 + %728 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %724, i32 0, i32 3 + store ptr @"main.(*stringReader).Seek", ptr %728, align 8 + %729 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %724, align 8 + %730 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %731 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %730, i32 0, i32 0 + store ptr @26, ptr %731, align 8 + %732 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %730, i32 0, i32 1 + store i64 4, ptr %732, align 4 + %733 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %730, align 8 + %734 = load ptr, ptr @_llgo_int64, align 8 + %735 = load ptr, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8 + %736 = icmp eq ptr %735, null + br i1 %736, label %_llgo_49, label %_llgo_50 _llgo_49: ; preds = %_llgo_48 - %725 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - %726 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %727 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %726, i32 0, i32 0 - store ptr %725, ptr %727, align 8 - %728 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %726, i32 0, i32 1 - store i64 0, ptr %728, align 4 - %729 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %726, i32 0, i32 2 - store i64 0, ptr %729, align 4 - %730 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %726, align 8 - %731 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) - %732 = getelementptr ptr, ptr %731, i64 0 - store ptr %722, ptr %732, align 8 - %733 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %734 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %733, i32 0, i32 0 - store ptr %731, ptr %734, align 8 - %735 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %733, i32 0, i32 1 - store i64 1, ptr %735, align 4 - %736 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %733, i32 0, i32 2 - store i64 1, ptr %736, align 4 - %737 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %733, align 8 - %738 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %730, %"github.com/goplus/llgo/internal/runtime.Slice" %737, i1 false) - store ptr %738, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8 + %737 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + %738 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %739 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %738, i32 0, i32 0 + store ptr %737, ptr %739, align 8 + %740 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %738, i32 0, i32 1 + store i64 0, ptr %740, align 4 + %741 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %738, i32 0, i32 2 + store i64 0, ptr %741, align 4 + %742 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %738, align 8 + %743 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) + %744 = getelementptr ptr, ptr %743, i64 0 + store ptr %734, ptr %744, align 8 + %745 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %746 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %745, i32 0, i32 0 + store ptr %743, ptr %746, align 8 + %747 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %745, i32 0, i32 1 + store i64 1, ptr %747, align 4 + %748 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %745, i32 0, i32 2 + store i64 1, ptr %748, align 4 + %749 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %745, align 8 + %750 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %742, %"github.com/goplus/llgo/internal/runtime.Slice" %749, i1 false) + store ptr %750, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8 br label %_llgo_50 _llgo_50: ; preds = %_llgo_49, %_llgo_48 - %739 = load ptr, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8 - %740 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %741 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %740, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %721, ptr %741, align 8 - %742 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %740, i32 0, i32 1 - store ptr %739, ptr %742, align 8 - %743 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %740, i32 0, i32 2 - store ptr @"main.(*stringReader).Size", ptr %743, align 8 - %744 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %740, i32 0, i32 3 - store ptr @"main.(*stringReader).Size", ptr %744, align 8 - %745 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %740, align 8 - %746 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %747 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %746, i32 0, i32 0 - store ptr @54, ptr %747, align 8 - %748 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %746, i32 0, i32 1 - store i64 10, ptr %748, align 4 - %749 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %746, align 8 - %750 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 - %751 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %752 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %751, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %749, ptr %752, align 8 - %753 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %751, i32 0, i32 1 - store ptr %750, ptr %753, align 8 - %754 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %751, i32 0, i32 2 - store ptr @"main.(*stringReader).UnreadByte", ptr %754, align 8 - %755 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %751, i32 0, i32 3 - store ptr @"main.(*stringReader).UnreadByte", ptr %755, align 8 - %756 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %751, align 8 - %757 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %758 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %757, i32 0, i32 0 - store ptr @55, ptr %758, align 8 - %759 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %757, i32 0, i32 1 - store i64 10, ptr %759, align 4 - %760 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %757, align 8 - %761 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 - %762 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %763 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %762, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %760, ptr %763, align 8 - %764 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %762, i32 0, i32 1 - store ptr %761, ptr %764, align 8 - %765 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %762, i32 0, i32 2 - store ptr @"main.(*stringReader).UnreadRune", ptr %765, align 8 - %766 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %762, i32 0, i32 3 - store ptr @"main.(*stringReader).UnreadRune", ptr %766, align 8 - %767 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %762, align 8 - %768 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %769 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %768, i32 0, i32 0 - store ptr @56, ptr %769, align 8 - %770 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %768, i32 0, i32 1 - store i64 7, ptr %770, align 4 - %771 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %768, align 8 - %772 = load ptr, ptr @"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk", align 8 - %773 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %774 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %773, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %771, ptr %774, align 8 - %775 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %773, i32 0, i32 1 - store ptr %772, ptr %775, align 8 - %776 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %773, i32 0, i32 2 - store ptr @"main.(*stringReader).WriteTo", ptr %776, align 8 - %777 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %773, i32 0, i32 3 - store ptr @"main.(*stringReader).WriteTo", ptr %777, align 8 - %778 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %773, align 8 - %779 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 400) - %780 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %779, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %573, ptr %780, align 8 - %781 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %779, i64 1 - store %"github.com/goplus/llgo/internal/abi.Method" %584, ptr %781, align 8 - %782 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %779, i64 2 - store %"github.com/goplus/llgo/internal/abi.Method" %618, ptr %782, align 8 - %783 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %779, i64 3 - store %"github.com/goplus/llgo/internal/abi.Method" %648, ptr %783, align 8 - %784 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %779, i64 4 - store %"github.com/goplus/llgo/internal/abi.Method" %683, ptr %784, align 8 - %785 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %779, i64 5 - store %"github.com/goplus/llgo/internal/abi.Method" %717, ptr %785, align 8 - %786 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %779, i64 6 - store %"github.com/goplus/llgo/internal/abi.Method" %745, ptr %786, align 8 - %787 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %779, i64 7 - store %"github.com/goplus/llgo/internal/abi.Method" %756, ptr %787, align 8 - %788 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %779, i64 8 - store %"github.com/goplus/llgo/internal/abi.Method" %767, ptr %788, align 8 - %789 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %779, i64 9 - store %"github.com/goplus/llgo/internal/abi.Method" %778, ptr %789, align 8 - %790 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %791 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %790, i32 0, i32 0 - store ptr %779, ptr %791, align 8 - %792 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %790, i32 0, i32 1 - store i64 10, ptr %792, align 4 - %793 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %790, i32 0, i32 2 - store i64 10, ptr %793, align 4 - %794 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %790, align 8 - %795 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %796 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %795, i32 0, i32 0 - store ptr @57, ptr %796, align 8 - %797 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %795, i32 0, i32 1 - store i64 4, ptr %797, align 4 - %798 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %795, align 8 - %799 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %800 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %799, i32 0, i32 0 - store ptr @58, ptr %800, align 8 - %801 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %799, i32 0, i32 1 - store i64 17, ptr %801, align 4 - %802 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %799, align 8 - call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %500, %"github.com/goplus/llgo/internal/runtime.String" %798, %"github.com/goplus/llgo/internal/runtime.String" %802, ptr %545, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %794) - %803 = load ptr, ptr @_llgo_main.stringReader, align 8 - %804 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %803) - store ptr %804, ptr @"*_llgo_main.stringReader", align 8 - %805 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 - %806 = load ptr, ptr @"_llgo_iface$OFO8Us9n8ajWCabGedeuoJ-Za2zAMk4Jh0FunAcUCFE", align 8 - %807 = icmp eq ptr %806, null - br i1 %807, label %_llgo_51, label %_llgo_52 + %751 = load ptr, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8 + %752 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %753 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %752, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %733, ptr %753, align 8 + %754 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %752, i32 0, i32 1 + store ptr %751, ptr %754, align 8 + %755 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %752, i32 0, i32 2 + store ptr @"main.(*stringReader).Size", ptr %755, align 8 + %756 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %752, i32 0, i32 3 + store ptr @"main.(*stringReader).Size", ptr %756, align 8 + %757 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %752, align 8 + %758 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %759 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %758, i32 0, i32 0 + store ptr @27, ptr %759, align 8 + %760 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %758, i32 0, i32 1 + store i64 10, ptr %760, align 4 + %761 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %758, align 8 + %762 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 + %763 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %764 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %763, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %761, ptr %764, align 8 + %765 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %763, i32 0, i32 1 + store ptr %762, ptr %765, align 8 + %766 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %763, i32 0, i32 2 + store ptr @"main.(*stringReader).UnreadByte", ptr %766, align 8 + %767 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %763, i32 0, i32 3 + store ptr @"main.(*stringReader).UnreadByte", ptr %767, align 8 + %768 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %763, align 8 + %769 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %770 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %769, i32 0, i32 0 + store ptr @28, ptr %770, align 8 + %771 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %769, i32 0, i32 1 + store i64 10, ptr %771, align 4 + %772 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %769, align 8 + %773 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 + %774 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %775 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %774, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %772, ptr %775, align 8 + %776 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %774, i32 0, i32 1 + store ptr %773, ptr %776, align 8 + %777 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %774, i32 0, i32 2 + store ptr @"main.(*stringReader).UnreadRune", ptr %777, align 8 + %778 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %774, i32 0, i32 3 + store ptr @"main.(*stringReader).UnreadRune", ptr %778, align 8 + %779 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %774, align 8 + %780 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %781 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %780, i32 0, i32 0 + store ptr @5, ptr %781, align 8 + %782 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %780, i32 0, i32 1 + store i64 7, ptr %782, align 4 + %783 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %780, align 8 + %784 = load ptr, ptr @"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk", align 8 + %785 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %786 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %785, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %783, ptr %786, align 8 + %787 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %785, i32 0, i32 1 + store ptr %784, ptr %787, align 8 + %788 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %785, i32 0, i32 2 + store ptr @"main.(*stringReader).WriteTo", ptr %788, align 8 + %789 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %785, i32 0, i32 3 + store ptr @"main.(*stringReader).WriteTo", ptr %789, align 8 + %790 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %785, align 8 + %791 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 400) + %792 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %791, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %582, ptr %792, align 8 + %793 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %791, i64 1 + store %"github.com/goplus/llgo/internal/abi.Method" %593, ptr %793, align 8 + %794 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %791, i64 2 + store %"github.com/goplus/llgo/internal/abi.Method" %627, ptr %794, align 8 + %795 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %791, i64 3 + store %"github.com/goplus/llgo/internal/abi.Method" %657, ptr %795, align 8 + %796 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %791, i64 4 + store %"github.com/goplus/llgo/internal/abi.Method" %695, ptr %796, align 8 + %797 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %791, i64 5 + store %"github.com/goplus/llgo/internal/abi.Method" %729, ptr %797, align 8 + %798 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %791, i64 6 + store %"github.com/goplus/llgo/internal/abi.Method" %757, ptr %798, align 8 + %799 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %791, i64 7 + store %"github.com/goplus/llgo/internal/abi.Method" %768, ptr %799, align 8 + %800 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %791, i64 8 + store %"github.com/goplus/llgo/internal/abi.Method" %779, ptr %800, align 8 + %801 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %791, i64 9 + store %"github.com/goplus/llgo/internal/abi.Method" %790, ptr %801, align 8 + %802 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %803 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %802, i32 0, i32 0 + store ptr %791, ptr %803, align 8 + %804 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %802, i32 0, i32 1 + store i64 10, ptr %804, align 4 + %805 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %802, i32 0, i32 2 + store i64 10, ptr %805, align 4 + %806 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %802, align 8 + %807 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %808 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %807, i32 0, i32 0 + store ptr @1, ptr %808, align 8 + %809 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %807, i32 0, i32 1 + store i64 4, ptr %809, align 4 + %810 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %807, align 8 + %811 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %812 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %811, i32 0, i32 0 + store ptr @29, ptr %812, align 8 + %813 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %811, i32 0, i32 1 + store i64 17, ptr %813, align 4 + %814 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %811, align 8 + call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %509, %"github.com/goplus/llgo/internal/runtime.String" %810, %"github.com/goplus/llgo/internal/runtime.String" %814, ptr %554, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %806) + %815 = load ptr, ptr @_llgo_main.stringReader, align 8 + %816 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %815) + store ptr %816, ptr @"*_llgo_main.stringReader", align 8 + %817 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8 + %818 = load ptr, ptr @"_llgo_iface$OFO8Us9n8ajWCabGedeuoJ-Za2zAMk4Jh0FunAcUCFE", align 8 + %819 = icmp eq ptr %818, null + br i1 %819, label %_llgo_51, label %_llgo_52 _llgo_51: ; preds = %_llgo_50 - %808 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %809 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %808, i32 0, i32 0 - store ptr @59, ptr %809, align 8 - %810 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %808, i32 0, i32 1 - store i64 4, ptr %810, align 4 - %811 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %808, align 8 - %812 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %813 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %812, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %811, ptr %813, align 8 - %814 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %812, i32 0, i32 1 - store ptr %805, ptr %814, align 8 - %815 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %812, align 8 - %816 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) - %817 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %816, i64 0 - store %"github.com/goplus/llgo/internal/abi.Imethod" %815, ptr %817, align 8 - %818 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %819 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %818, i32 0, i32 0 - store ptr %816, ptr %819, align 8 - %820 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %818, i32 0, i32 1 - store i64 1, ptr %820, align 4 - %821 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %818, i32 0, i32 2 - store i64 1, ptr %821, align 4 - %822 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %818, align 8 - %823 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %824 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %823, i32 0, i32 0 - store ptr @60, ptr %824, align 8 - %825 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %823, i32 0, i32 1 - store i64 4, ptr %825, align 4 - %826 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %823, align 8 - %827 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %828 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %827, i32 0, i32 0 - store ptr @61, ptr %828, align 8 - %829 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %827, i32 0, i32 1 - store i64 0, ptr %829, align 4 - %830 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %827, align 8 - %831 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %826, %"github.com/goplus/llgo/internal/runtime.String" %830, %"github.com/goplus/llgo/internal/runtime.Slice" %822) - store ptr %831, ptr @"_llgo_iface$OFO8Us9n8ajWCabGedeuoJ-Za2zAMk4Jh0FunAcUCFE", align 8 + %820 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %821 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %820, i32 0, i32 0 + store ptr @7, ptr %821, align 8 + %822 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %820, i32 0, i32 1 + store i64 4, ptr %822, align 4 + %823 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %820, align 8 + %824 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %825 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %824, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %823, ptr %825, align 8 + %826 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %824, i32 0, i32 1 + store ptr %817, ptr %826, align 8 + %827 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %824, align 8 + %828 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) + %829 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %828, i64 0 + store %"github.com/goplus/llgo/internal/abi.Imethod" %827, ptr %829, align 8 + %830 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %831 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %830, i32 0, i32 0 + store ptr %828, ptr %831, align 8 + %832 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %830, i32 0, i32 1 + store i64 1, ptr %832, align 4 + %833 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %830, i32 0, i32 2 + store i64 1, ptr %833, align 4 + %834 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %830, align 8 + %835 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %836 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %835, i32 0, i32 0 + store ptr @1, ptr %836, align 8 + %837 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %835, i32 0, i32 1 + store i64 4, ptr %837, align 4 + %838 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %835, align 8 + %839 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %840 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %839, i32 0, i32 0 + store ptr null, ptr %840, align 8 + %841 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %839, i32 0, i32 1 + store i64 0, ptr %841, align 4 + %842 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %839, align 8 + %843 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %838, %"github.com/goplus/llgo/internal/runtime.String" %842, %"github.com/goplus/llgo/internal/runtime.Slice" %834) + store ptr %843, ptr @"_llgo_iface$OFO8Us9n8ajWCabGedeuoJ-Za2zAMk4Jh0FunAcUCFE", align 8 br label %_llgo_52 _llgo_52: ; preds = %_llgo_51, %_llgo_50 - %832 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 1) - store ptr %832, ptr @_llgo_main.errorString, align 8 - %833 = load ptr, ptr @_llgo_string, align 8 - %834 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %835 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %834, i32 0, i32 0 - store ptr @62, ptr %835, align 8 - %836 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %834, i32 0, i32 1 - store i64 1, ptr %836, align 4 - %837 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %834, align 8 - %838 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %839 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %838, i32 0, i32 0 - store ptr @63, ptr %839, align 8 - %840 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %838, i32 0, i32 1 - store i64 0, ptr %840, align 4 - %841 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %838, align 8 - %842 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %837, ptr %833, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %841, i1 false) - %843 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %844 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %843, i32 0, i32 0 - store ptr @64, ptr %844, align 8 - %845 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %843, i32 0, i32 1 - store i64 4, ptr %845, align 4 - %846 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %843, align 8 - %847 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 56) - %848 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %847, i64 0 - store %"github.com/goplus/llgo/internal/abi.StructField" %842, ptr %848, align 8 - %849 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %850 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %849, i32 0, i32 0 - store ptr %847, ptr %850, align 8 - %851 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %849, i32 0, i32 1 - store i64 1, ptr %851, align 4 - %852 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %849, i32 0, i32 2 - store i64 1, ptr %852, align 4 - %853 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %849, align 8 - %854 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %846, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %853) - store ptr %854, ptr @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 - %855 = load ptr, ptr @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 - %856 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %857 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %856, i32 0, i32 0 - store ptr @65, ptr %857, align 8 - %858 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %856, i32 0, i32 1 - store i64 5, ptr %858, align 4 - %859 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %856, align 8 - %860 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - %861 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %862 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %861, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %859, ptr %862, align 8 - %863 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %861, i32 0, i32 1 - store ptr %860, ptr %863, align 8 - %864 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %861, i32 0, i32 2 - store ptr @"main.(*errorString).Error", ptr %864, align 8 - %865 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %861, i32 0, i32 3 - store ptr @"main.(*errorString).Error", ptr %865, align 8 - %866 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %861, align 8 - %867 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) - %868 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %867, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %866, ptr %868, align 8 - %869 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %870 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %869, i32 0, i32 0 - store ptr %867, ptr %870, align 8 - %871 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %869, i32 0, i32 1 - store i64 1, ptr %871, align 4 - %872 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %869, i32 0, i32 2 - store i64 1, ptr %872, align 4 - %873 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %869, align 8 - %874 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %875 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %874, i32 0, i32 0 - store ptr @66, ptr %875, align 8 - %876 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %874, i32 0, i32 1 - store i64 4, ptr %876, align 4 - %877 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %874, align 8 - %878 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %879 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %878, i32 0, i32 0 - store ptr @67, ptr %879, align 8 - %880 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %878, i32 0, i32 1 - store i64 16, ptr %880, align 4 - %881 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %878, align 8 - call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %832, %"github.com/goplus/llgo/internal/runtime.String" %877, %"github.com/goplus/llgo/internal/runtime.String" %881, ptr %855, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %873) - %882 = load ptr, ptr @_llgo_main.errorString, align 8 - %883 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %882) - store ptr %883, ptr @"*_llgo_main.errorString", align 8 - %884 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - %885 = load ptr, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8 - %886 = icmp eq ptr %885, null - br i1 %886, label %_llgo_53, label %_llgo_54 + %844 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 1) + store ptr %844, ptr @_llgo_main.errorString, align 8 + %845 = load ptr, ptr @_llgo_string, align 8 + %846 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %847 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %846, i32 0, i32 0 + store ptr @18, ptr %847, align 8 + %848 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %846, i32 0, i32 1 + store i64 1, ptr %848, align 4 + %849 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %846, align 8 + %850 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %851 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %850, i32 0, i32 0 + store ptr null, ptr %851, align 8 + %852 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %850, i32 0, i32 1 + store i64 0, ptr %852, align 4 + %853 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %850, align 8 + %854 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %849, ptr %845, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %853, i1 false) + %855 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %856 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %855, i32 0, i32 0 + store ptr @1, ptr %856, align 8 + %857 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %855, i32 0, i32 1 + store i64 4, ptr %857, align 4 + %858 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %855, align 8 + %859 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 56) + %860 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %859, i64 0 + store %"github.com/goplus/llgo/internal/abi.StructField" %854, ptr %860, align 8 + %861 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %862 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %861, i32 0, i32 0 + store ptr %859, ptr %862, align 8 + %863 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %861, i32 0, i32 1 + store i64 1, ptr %863, align 4 + %864 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %861, i32 0, i32 2 + store i64 1, ptr %864, align 4 + %865 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %861, align 8 + %866 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %858, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %865) + store ptr %866, ptr @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 + %867 = load ptr, ptr @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 + %868 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %869 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %868, i32 0, i32 0 + store ptr @0, ptr %869, align 8 + %870 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %868, i32 0, i32 1 + store i64 5, ptr %870, align 4 + %871 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %868, align 8 + %872 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 + %873 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %874 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %873, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %871, ptr %874, align 8 + %875 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %873, i32 0, i32 1 + store ptr %872, ptr %875, align 8 + %876 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %873, i32 0, i32 2 + store ptr @"main.(*errorString).Error", ptr %876, align 8 + %877 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %873, i32 0, i32 3 + store ptr @"main.(*errorString).Error", ptr %877, align 8 + %878 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %873, align 8 + %879 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) + %880 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %879, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %878, ptr %880, align 8 + %881 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %882 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %881, i32 0, i32 0 + store ptr %879, ptr %882, align 8 + %883 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %881, i32 0, i32 1 + store i64 1, ptr %883, align 4 + %884 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %881, i32 0, i32 2 + store i64 1, ptr %884, align 4 + %885 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %881, align 8 + %886 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %887 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %886, i32 0, i32 0 + store ptr @1, ptr %887, align 8 + %888 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %886, i32 0, i32 1 + store i64 4, ptr %888, align 4 + %889 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %886, align 8 + %890 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %891 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %890, i32 0, i32 0 + store ptr @30, ptr %891, align 8 + %892 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %890, i32 0, i32 1 + store i64 16, ptr %892, align 4 + %893 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %890, align 8 + call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %844, %"github.com/goplus/llgo/internal/runtime.String" %889, %"github.com/goplus/llgo/internal/runtime.String" %893, ptr %867, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %885) + %894 = load ptr, ptr @_llgo_main.errorString, align 8 + %895 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %894) + store ptr %895, ptr @"*_llgo_main.errorString", align 8 + %896 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 + %897 = load ptr, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8 + %898 = icmp eq ptr %897, null + br i1 %898, label %_llgo_53, label %_llgo_54 _llgo_53: ; preds = %_llgo_52 - %887 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %888 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %887, i32 0, i32 0 - store ptr @68, ptr %888, align 8 - %889 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %887, i32 0, i32 1 - store i64 5, ptr %889, align 4 - %890 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %887, align 8 - %891 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 - %892 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %891, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %890, ptr %892, align 8 - %893 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %891, i32 0, i32 1 - store ptr %884, ptr %893, align 8 - %894 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %891, align 8 - %895 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) - %896 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %895, i64 0 - store %"github.com/goplus/llgo/internal/abi.Imethod" %894, ptr %896, align 8 - %897 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %898 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %897, i32 0, i32 0 - store ptr %895, ptr %898, align 8 - %899 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %897, i32 0, i32 1 - store i64 1, ptr %899, align 4 - %900 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %897, i32 0, i32 2 - store i64 1, ptr %900, align 4 - %901 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %897, align 8 - %902 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %903 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %902, i32 0, i32 0 - store ptr @69, ptr %903, align 8 - %904 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %902, i32 0, i32 1 - store i64 4, ptr %904, align 4 - %905 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %902, align 8 - %906 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %907 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %906, i32 0, i32 0 - store ptr @70, ptr %907, align 8 - %908 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %906, i32 0, i32 1 - store i64 0, ptr %908, align 4 - %909 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %906, align 8 - %910 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %905, %"github.com/goplus/llgo/internal/runtime.String" %909, %"github.com/goplus/llgo/internal/runtime.Slice" %901) - store ptr %910, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8 + %899 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %900 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %899, i32 0, i32 0 + store ptr @0, ptr %900, align 8 + %901 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %899, i32 0, i32 1 + store i64 5, ptr %901, align 4 + %902 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %899, align 8 + %903 = alloca %"github.com/goplus/llgo/internal/abi.Imethod", align 8 + %904 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %903, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %902, ptr %904, align 8 + %905 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Imethod", ptr %903, i32 0, i32 1 + store ptr %896, ptr %905, align 8 + %906 = load %"github.com/goplus/llgo/internal/abi.Imethod", ptr %903, align 8 + %907 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24) + %908 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %907, i64 0 + store %"github.com/goplus/llgo/internal/abi.Imethod" %906, ptr %908, align 8 + %909 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %910 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %909, i32 0, i32 0 + store ptr %907, ptr %910, align 8 + %911 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %909, i32 0, i32 1 + store i64 1, ptr %911, align 4 + %912 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %909, i32 0, i32 2 + store i64 1, ptr %912, align 4 + %913 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %909, align 8 + %914 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %915 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %914, i32 0, i32 0 + store ptr @1, ptr %915, align 8 + %916 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %914, i32 0, i32 1 + store i64 4, ptr %916, align 4 + %917 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %914, align 8 + %918 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %919 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %918, i32 0, i32 0 + store ptr null, ptr %919, align 8 + %920 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %918, i32 0, i32 1 + store i64 0, ptr %920, align 4 + %921 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %918, align 8 + %922 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" %917, %"github.com/goplus/llgo/internal/runtime.String" %921, %"github.com/goplus/llgo/internal/runtime.Slice" %913) + store ptr %922, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8 br label %_llgo_54 _llgo_54: ; preds = %_llgo_53, %_llgo_52 diff --git a/cl/_testgo/strucintf/out.ll b/cl/_testgo/strucintf/out.ll index 131b5bb5..aefb12fd 100644 --- a/cl/_testgo/strucintf/out.ll +++ b/cl/_testgo/strucintf/out.ll @@ -10,18 +10,15 @@ source_filename = "main" @"main.init$guard" = global ptr null @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = global ptr null @_llgo_int = linkonce global ptr null -@0 = private unnamed_addr constant [2 x i8] c"v\00", align 1 -@1 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@2 = private unnamed_addr constant [5 x i8] c"main\00", align 1 +@0 = private unnamed_addr constant [1 x i8] c"v", align 1 +@1 = private unnamed_addr constant [4 x i8] c"main", align 1 @__llgo_argc = global ptr null @__llgo_argv = global ptr null -@3 = private unnamed_addr constant [12 x i8] c"Foo: not ok\00", align 1 +@2 = private unnamed_addr constant [11 x i8] c"Foo: not ok", align 1 @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk" = linkonce global ptr null -@4 = private unnamed_addr constant [2 x i8] c"V\00", align 1 -@5 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@6 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@7 = private unnamed_addr constant [12 x i8] c"Bar: not ok\00", align 1 -@8 = private unnamed_addr constant [10 x i8] c"F: not ok\00", align 1 +@3 = private unnamed_addr constant [1 x i8] c"V", align 1 +@4 = private unnamed_addr constant [11 x i8] c"Bar: not ok", align 1 +@5 = private unnamed_addr constant [9 x i8] c"F: not ok", align 1 define %"github.com/goplus/llgo/internal/runtime.eface" @main.Foo() { _llgo_0: @@ -94,7 +91,7 @@ _llgo_2: ; preds = %_llgo_3, %_llgo_1 _llgo_3: ; preds = %_llgo_12 %16 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %17 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %16, i32 0, i32 0 - store ptr @3, ptr %17, align 8 + store ptr @2, ptr %17, align 8 %18 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %16, i32 0, i32 1 store i64 11, ptr %18, align 4 %19 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %16, align 8 @@ -121,7 +118,7 @@ _llgo_5: ; preds = %_llgo_6, %_llgo_4 _llgo_6: ; preds = %_llgo_15 %28 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %29 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %28, i32 0, i32 0 - store ptr @7, ptr %29, align 8 + store ptr @4, ptr %29, align 8 %30 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %28, i32 0, i32 1 store i64 11, ptr %30, align 4 %31 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %28, align 8 @@ -142,7 +139,7 @@ _llgo_8: ; preds = %_llgo_9, %_llgo_7 _llgo_9: ; preds = %_llgo_18 %34 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %35 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %34, i32 0, i32 0 - store ptr @8, ptr %35, align 8 + store ptr @5, ptr %35, align 8 %36 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %34, i32 0, i32 1 store i64 9, ptr %36, align 4 %37 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %34, align 8 @@ -258,80 +255,92 @@ _llgo_1: ; preds = %_llgo_0 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 - %3 = load ptr, ptr @_llgo_int, align 8 - %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @0, ptr %5, align 8 - %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 - store i64 1, ptr %6, align 4 - %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 - %8 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %8, i32 0, i32 0 - store ptr @1, ptr %9, align 8 - %10 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %8, i32 0, i32 1 - store i64 0, ptr %10, align 4 - %11 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %8, align 8 - %12 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %7, ptr %3, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %11, i1 false) - %13 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %14 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %13, i32 0, i32 0 - store ptr @2, ptr %14, align 8 - %15 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %13, i32 0, i32 1 - store i64 4, ptr %15, align 4 - %16 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %13, align 8 - %17 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 56) - %18 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %17, i64 0 - store %"github.com/goplus/llgo/internal/abi.StructField" %12, ptr %18, align 8 - %19 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %20 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %19, i32 0, i32 0 - store ptr %17, ptr %20, align 8 - %21 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %19, i32 0, i32 1 - store i64 1, ptr %21, align 4 - %22 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %19, i32 0, i32 2 - store i64 1, ptr %22, align 4 - %23 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %19, align 8 - %24 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %16, i64 8, %"github.com/goplus/llgo/internal/runtime.Slice" %23) - store ptr %24, ptr @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 - %25 = load ptr, ptr @_llgo_int, align 8 - %26 = load ptr, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8 - %27 = icmp eq ptr %26, null - br i1 %27, label %_llgo_3, label %_llgo_4 + %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %2, i32 0, i32 6 + %4 = load i8, ptr %3, align 1 + %5 = or i8 %4, 32 + store i8 %5, ptr %3, align 1 + %6 = load ptr, ptr @_llgo_int, align 8 + %7 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %8 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %7, i32 0, i32 0 + store ptr @0, ptr %8, align 8 + %9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %7, i32 0, i32 1 + store i64 1, ptr %9, align 4 + %10 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %7, align 8 + %11 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %12 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %11, i32 0, i32 0 + store ptr null, ptr %12, align 8 + %13 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %11, i32 0, i32 1 + store i64 0, ptr %13, align 4 + %14 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %11, align 8 + %15 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %10, ptr %6, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %14, i1 false) + %16 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %17 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %16, i32 0, i32 0 + store ptr @1, ptr %17, align 8 + %18 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %16, i32 0, i32 1 + store i64 4, ptr %18, align 4 + %19 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %16, align 8 + %20 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 56) + %21 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %20, i64 0 + store %"github.com/goplus/llgo/internal/abi.StructField" %15, ptr %21, align 8 + %22 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %23 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %22, i32 0, i32 0 + store ptr %20, ptr %23, align 8 + %24 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %22, i32 0, i32 1 + store i64 1, ptr %24, align 4 + %25 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %22, i32 0, i32 2 + store i64 1, ptr %25, align 4 + %26 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %22, align 8 + %27 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %19, i64 8, %"github.com/goplus/llgo/internal/runtime.Slice" %26) + store ptr %27, ptr @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8 + %28 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %27, i32 0, i32 6 + %29 = load i8, ptr %28, align 1 + %30 = or i8 %29, 32 + store i8 %30, ptr %28, align 1 + %31 = load ptr, ptr @_llgo_int, align 8 + %32 = load ptr, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8 + %33 = icmp eq ptr %32, null + br i1 %33, label %_llgo_3, label %_llgo_4 _llgo_3: ; preds = %_llgo_2 - %28 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %29 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %28, i32 0, i32 0 - store ptr @4, ptr %29, align 8 - %30 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %28, i32 0, i32 1 - store i64 1, ptr %30, align 4 - %31 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %28, align 8 - %32 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %33 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %32, i32 0, i32 0 - store ptr @5, ptr %33, align 8 - %34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %32, i32 0, i32 1 - store i64 0, ptr %34, align 4 - %35 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %32, align 8 - %36 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %31, ptr %25, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %35, i1 false) - %37 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %38 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %37, i32 0, i32 0 - store ptr @6, ptr %38, align 8 - %39 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %37, i32 0, i32 1 - store i64 4, ptr %39, align 4 - %40 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %37, align 8 - %41 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 56) - %42 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %41, i64 0 - store %"github.com/goplus/llgo/internal/abi.StructField" %36, ptr %42, align 8 - %43 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %44 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %43, i32 0, i32 0 - store ptr %41, ptr %44, align 8 - %45 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %43, i32 0, i32 1 - store i64 1, ptr %45, align 4 - %46 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %43, i32 0, i32 2 - store i64 1, ptr %46, align 4 - %47 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %43, align 8 - %48 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %40, i64 8, %"github.com/goplus/llgo/internal/runtime.Slice" %47) - store ptr %48, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8 + %34 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %35 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %34, i32 0, i32 0 + store ptr @3, ptr %35, align 8 + %36 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %34, i32 0, i32 1 + store i64 1, ptr %36, align 4 + %37 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %34, align 8 + %38 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %39 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %38, i32 0, i32 0 + store ptr null, ptr %39, align 8 + %40 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %38, i32 0, i32 1 + store i64 0, ptr %40, align 4 + %41 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %38, align 8 + %42 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %37, ptr %31, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %41, i1 false) + %43 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %44 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %43, i32 0, i32 0 + store ptr @1, ptr %44, align 8 + %45 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %43, i32 0, i32 1 + store i64 4, ptr %45, align 4 + %46 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %43, align 8 + %47 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 56) + %48 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %47, i64 0 + store %"github.com/goplus/llgo/internal/abi.StructField" %42, ptr %48, align 8 + %49 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %50 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %49, i32 0, i32 0 + store ptr %47, ptr %50, align 8 + %51 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %49, i32 0, i32 1 + store i64 1, ptr %51, align 4 + %52 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %49, i32 0, i32 2 + store i64 1, ptr %52, align 4 + %53 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %49, align 8 + %54 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %46, i64 8, %"github.com/goplus/llgo/internal/runtime.Slice" %53) + store ptr %54, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8 br label %_llgo_4 _llgo_4: ; preds = %_llgo_3, %_llgo_2 + %55 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %54, i32 0, i32 6 + %56 = load i8, ptr %55, align 1 + %57 = or i8 %56, 32 + store i8 %57, ptr %55, align 1 ret void } diff --git a/cl/_testgo/struczero/out.ll b/cl/_testgo/struczero/out.ll index 48894dd4..4c417f06 100644 --- a/cl/_testgo/struczero/out.ll +++ b/cl/_testgo/struczero/out.ll @@ -5,6 +5,7 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr } %main.bar = type { ptr, float } %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } +%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 } %"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr } @@ -15,27 +16,20 @@ source_filename = "main" @"*_llgo_byte" = linkonce global ptr null @_llgo_byte = linkonce global ptr null @_llgo_float32 = linkonce global ptr null -@0 = private unnamed_addr constant [3 x i8] c"pb\00", align 1 -@1 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@2 = private unnamed_addr constant [2 x i8] c"F\00", align 1 -@3 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@4 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@5 = private unnamed_addr constant [3 x i8] c"Pb\00", align 1 +@0 = private unnamed_addr constant [2 x i8] c"pb", align 1 +@1 = private unnamed_addr constant [1 x i8] c"F", align 1 +@2 = private unnamed_addr constant [4 x i8] c"main", align 1 +@3 = private unnamed_addr constant [2 x i8] c"Pb", align 1 @"_llgo_func$NfGSLZ1QiKRoFkKeqYSXE5hUU5bpeteSJKrbMNUzYRE" = linkonce global ptr null -@6 = private unnamed_addr constant [39 x i8] c"github.com/goplus/llgo/cl/internal/foo\00", align 1 -@7 = private unnamed_addr constant [43 x i8] c"github.com/goplus/llgo/cl/internal/foo.Foo\00", align 1 +@4 = private unnamed_addr constant [38 x i8] c"github.com/goplus/llgo/cl/internal/foo", align 1 +@5 = private unnamed_addr constant [42 x i8] c"github.com/goplus/llgo/cl/internal/foo.Foo", align 1 @_llgo_main.bar = global ptr null @"main.struct$Ci43nzKYkRLddRL_N4mkykxLXfJlqJGS5n04LKThPNo" = global ptr null -@8 = private unnamed_addr constant [3 x i8] c"pb\00", align 1 -@9 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@10 = private unnamed_addr constant [2 x i8] c"f\00", align 1 -@11 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@12 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@13 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@14 = private unnamed_addr constant [9 x i8] c"main.bar\00", align 1 +@6 = private unnamed_addr constant [1 x i8] c"f", align 1 +@7 = private unnamed_addr constant [8 x i8] c"main.bar", align 1 @__llgo_argc = global ptr null @__llgo_argv = global ptr null -@15 = private unnamed_addr constant [7 x i8] c"notOk:\00", align 1 +@8 = private unnamed_addr constant [6 x i8] c"notOk:", align 1 define { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } @main.Bar(%"github.com/goplus/llgo/internal/runtime.eface" %0) { _llgo_0: @@ -143,7 +137,7 @@ _llgo_0: %11 = xor i1 %6, true %12 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %13 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %12, i32 0, i32 0 - store ptr @15, ptr %13, align 8 + store ptr @8, ptr %13, align 8 %14 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %12, i32 0, i32 1 store i64 6, ptr %14, align 4 %15 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %12, align 8 @@ -207,241 +201,249 @@ _llgo_3: ; preds = %_llgo_2 br label %_llgo_4 _llgo_4: ; preds = %_llgo_3, %_llgo_2 - %6 = load ptr, ptr @_llgo_byte, align 8 - %7 = load ptr, ptr @"*_llgo_byte", align 8 - %8 = icmp eq ptr %7, null - br i1 %8, label %_llgo_5, label %_llgo_6 + %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %5, i32 0, i32 6 + %7 = load i8, ptr %6, align 1 + %8 = or i8 %7, 32 + store i8 %8, ptr %6, align 1 + %9 = load ptr, ptr @_llgo_byte, align 8 + %10 = load ptr, ptr @"*_llgo_byte", align 8 + %11 = icmp eq ptr %10, null + br i1 %11, label %_llgo_5, label %_llgo_6 _llgo_5: ; preds = %_llgo_4 - %9 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %6) - store ptr %9, ptr @"*_llgo_byte", align 8 + %12 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %9) + store ptr %12, ptr @"*_llgo_byte", align 8 br label %_llgo_6 _llgo_6: ; preds = %_llgo_5, %_llgo_4 - %10 = load ptr, ptr @"*_llgo_byte", align 8 - %11 = load ptr, ptr @_llgo_float32, align 8 - %12 = icmp eq ptr %11, null - br i1 %12, label %_llgo_7, label %_llgo_8 + %13 = load ptr, ptr @"*_llgo_byte", align 8 + %14 = load ptr, ptr @_llgo_float32, align 8 + %15 = icmp eq ptr %14, null + br i1 %15, label %_llgo_7, label %_llgo_8 _llgo_7: ; preds = %_llgo_6 - %13 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 13) - store ptr %13, ptr @_llgo_float32, align 8 + %16 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 13) + store ptr %16, ptr @_llgo_float32, align 8 br label %_llgo_8 _llgo_8: ; preds = %_llgo_7, %_llgo_6 - %14 = load ptr, ptr @_llgo_float32, align 8 - %15 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %16 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %15, i32 0, i32 0 - store ptr @0, ptr %16, align 8 - %17 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %15, i32 0, i32 1 - store i64 2, ptr %17, align 4 - %18 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %15, align 8 - %19 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %20 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %19, i32 0, i32 0 - store ptr @1, ptr %20, align 8 - %21 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %19, i32 0, i32 1 - store i64 0, ptr %21, align 4 - %22 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %19, align 8 - %23 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %18, ptr %10, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %22, i1 false) - %24 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %25 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %24, i32 0, i32 0 - store ptr @2, ptr %25, align 8 - %26 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %24, i32 0, i32 1 - store i64 1, ptr %26, align 4 - %27 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %24, align 8 - %28 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %29 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %28, i32 0, i32 0 - store ptr @3, ptr %29, align 8 - %30 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %28, i32 0, i32 1 - store i64 0, ptr %30, align 4 - %31 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %28, align 8 - %32 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %27, ptr %14, i64 8, %"github.com/goplus/llgo/internal/runtime.String" %31, i1 false) - %33 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %33, i32 0, i32 0 - store ptr @4, ptr %34, align 8 - %35 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %33, i32 0, i32 1 - store i64 4, ptr %35, align 4 - %36 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %33, align 8 - %37 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 112) - %38 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %37, i64 0 - store %"github.com/goplus/llgo/internal/abi.StructField" %23, ptr %38, align 8 - %39 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %37, i64 1 - store %"github.com/goplus/llgo/internal/abi.StructField" %32, ptr %39, align 8 - %40 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %41 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %40, i32 0, i32 0 - store ptr %37, ptr %41, align 8 - %42 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %40, i32 0, i32 1 - store i64 2, ptr %42, align 4 - %43 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %40, i32 0, i32 2 - store i64 2, ptr %43, align 4 - %44 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %40, align 8 - %45 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %36, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %44) - store ptr %45, ptr @"main.struct$qQwZyFy_4JRalRxVVsVD8R09X5t58tWjTrtJPtHbEjs", align 8 - %46 = load ptr, ptr @"main.struct$qQwZyFy_4JRalRxVVsVD8R09X5t58tWjTrtJPtHbEjs", align 8 + %17 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %16, i32 0, i32 6 + %18 = load i8, ptr %17, align 1 + %19 = or i8 %18, 32 + store i8 %19, ptr %17, align 1 + %20 = load ptr, ptr @_llgo_float32, align 8 + %21 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %22 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %21, i32 0, i32 0 + store ptr @0, ptr %22, align 8 + %23 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %21, i32 0, i32 1 + store i64 2, ptr %23, align 4 + %24 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %21, align 8 + %25 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %26 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %25, i32 0, i32 0 + store ptr null, ptr %26, align 8 + %27 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %25, i32 0, i32 1 + store i64 0, ptr %27, align 4 + %28 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %25, align 8 + %29 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %24, ptr %13, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %28, i1 false) + %30 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %31 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %30, i32 0, i32 0 + store ptr @1, ptr %31, align 8 + %32 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %30, i32 0, i32 1 + store i64 1, ptr %32, align 4 + %33 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %30, align 8 + %34 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %35 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %34, i32 0, i32 0 + store ptr null, ptr %35, align 8 + %36 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %34, i32 0, i32 1 + store i64 0, ptr %36, align 4 + %37 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %34, align 8 + %38 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %33, ptr %20, i64 8, %"github.com/goplus/llgo/internal/runtime.String" %37, i1 false) + %39 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %40 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %39, i32 0, i32 0 + store ptr @2, ptr %40, align 8 + %41 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %39, i32 0, i32 1 + store i64 4, ptr %41, align 4 + %42 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %39, align 8 + %43 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 112) + %44 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %43, i64 0 + store %"github.com/goplus/llgo/internal/abi.StructField" %29, ptr %44, align 8 + %45 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %43, i64 1 + store %"github.com/goplus/llgo/internal/abi.StructField" %38, ptr %45, align 8 + %46 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %47 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %46, i32 0, i32 0 + store ptr %43, ptr %47, align 8 + %48 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %46, i32 0, i32 1 + store i64 2, ptr %48, align 4 + %49 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %46, i32 0, i32 2 + store i64 2, ptr %49, align 4 + %50 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %46, align 8 + %51 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %42, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %50) + store ptr %51, ptr @"main.struct$qQwZyFy_4JRalRxVVsVD8R09X5t58tWjTrtJPtHbEjs", align 8 + %52 = load ptr, ptr @"main.struct$qQwZyFy_4JRalRxVVsVD8R09X5t58tWjTrtJPtHbEjs", align 8 br i1 %1, label %_llgo_9, label %_llgo_10 _llgo_9: ; preds = %_llgo_8 - %47 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %48 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %47, i32 0, i32 0 - store ptr @5, ptr %48, align 8 - %49 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %47, i32 0, i32 1 - store i64 2, ptr %49, align 4 - %50 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %47, align 8 - %51 = load ptr, ptr @"*_llgo_byte", align 8 - %52 = load ptr, ptr @"_llgo_func$NfGSLZ1QiKRoFkKeqYSXE5hUU5bpeteSJKrbMNUzYRE", align 8 - %53 = icmp eq ptr %52, null - br i1 %53, label %_llgo_11, label %_llgo_12 + %53 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %54 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %53, i32 0, i32 0 + store ptr @3, ptr %54, align 8 + %55 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %53, i32 0, i32 1 + store i64 2, ptr %55, align 4 + %56 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %53, align 8 + %57 = load ptr, ptr @"*_llgo_byte", align 8 + %58 = load ptr, ptr @"_llgo_func$NfGSLZ1QiKRoFkKeqYSXE5hUU5bpeteSJKrbMNUzYRE", align 8 + %59 = icmp eq ptr %58, null + br i1 %59, label %_llgo_11, label %_llgo_12 _llgo_10: ; preds = %_llgo_12, %_llgo_8 - %54 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 0) - store ptr %54, ptr @_llgo_main.bar, align 8 - %55 = load ptr, ptr @"*_llgo_byte", align 8 - %56 = load ptr, ptr @_llgo_float32, align 8 - %57 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %58 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %57, i32 0, i32 0 - store ptr @8, ptr %58, align 8 - %59 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %57, i32 0, i32 1 - store i64 2, ptr %59, align 4 - %60 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %57, align 8 - %61 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %62 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %61, i32 0, i32 0 - store ptr @9, ptr %62, align 8 - %63 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %61, i32 0, i32 1 - store i64 0, ptr %63, align 4 - %64 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %61, align 8 - %65 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %60, ptr %55, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %64, i1 false) - %66 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %67 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %66, i32 0, i32 0 - store ptr @10, ptr %67, align 8 - %68 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %66, i32 0, i32 1 - store i64 1, ptr %68, align 4 - %69 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %66, align 8 - %70 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %71 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %70, i32 0, i32 0 - store ptr @11, ptr %71, align 8 - %72 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %70, i32 0, i32 1 - store i64 0, ptr %72, align 4 - %73 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %70, align 8 - %74 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %69, ptr %56, i64 8, %"github.com/goplus/llgo/internal/runtime.String" %73, i1 false) - %75 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %76 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %75, i32 0, i32 0 - store ptr @12, ptr %76, align 8 - %77 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %75, i32 0, i32 1 - store i64 4, ptr %77, align 4 - %78 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %75, align 8 - %79 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 112) - %80 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %79, i64 0 - store %"github.com/goplus/llgo/internal/abi.StructField" %65, ptr %80, align 8 - %81 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %79, i64 1 - store %"github.com/goplus/llgo/internal/abi.StructField" %74, ptr %81, align 8 - %82 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %83 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %82, i32 0, i32 0 - store ptr %79, ptr %83, align 8 - %84 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %82, i32 0, i32 1 - store i64 2, ptr %84, align 4 - %85 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %82, i32 0, i32 2 - store i64 2, ptr %85, align 4 - %86 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %82, align 8 - %87 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %78, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %86) - store ptr %87, ptr @"main.struct$Ci43nzKYkRLddRL_N4mkykxLXfJlqJGS5n04LKThPNo", align 8 - %88 = load ptr, ptr @"main.struct$Ci43nzKYkRLddRL_N4mkykxLXfJlqJGS5n04LKThPNo", align 8 - %89 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %90 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %89, i32 0, i32 0 - store ptr @13, ptr %90, align 8 - %91 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %89, i32 0, i32 1 - store i64 4, ptr %91, align 4 - %92 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %89, align 8 - %93 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %94 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %93, i32 0, i32 0 - store ptr @14, ptr %94, align 8 - %95 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %93, i32 0, i32 1 - store i64 8, ptr %95, align 4 - %96 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %93, align 8 - call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %54, %"github.com/goplus/llgo/internal/runtime.String" %92, %"github.com/goplus/llgo/internal/runtime.String" %96, ptr %88, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer) + %60 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 0) + store ptr %60, ptr @_llgo_main.bar, align 8 + %61 = load ptr, ptr @"*_llgo_byte", align 8 + %62 = load ptr, ptr @_llgo_float32, align 8 + %63 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %64 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %63, i32 0, i32 0 + store ptr @0, ptr %64, align 8 + %65 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %63, i32 0, i32 1 + store i64 2, ptr %65, align 4 + %66 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %63, align 8 + %67 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %68 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %67, i32 0, i32 0 + store ptr null, ptr %68, align 8 + %69 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %67, i32 0, i32 1 + store i64 0, ptr %69, align 4 + %70 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %67, align 8 + %71 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %66, ptr %61, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %70, i1 false) + %72 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %73 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %72, i32 0, i32 0 + store ptr @6, ptr %73, align 8 + %74 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %72, i32 0, i32 1 + store i64 1, ptr %74, align 4 + %75 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %72, align 8 + %76 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %77 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %76, i32 0, i32 0 + store ptr null, ptr %77, align 8 + %78 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %76, i32 0, i32 1 + store i64 0, ptr %78, align 4 + %79 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %76, align 8 + %80 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %75, ptr %62, i64 8, %"github.com/goplus/llgo/internal/runtime.String" %79, i1 false) + %81 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %82 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %81, i32 0, i32 0 + store ptr @2, ptr %82, align 8 + %83 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %81, i32 0, i32 1 + store i64 4, ptr %83, align 4 + %84 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %81, align 8 + %85 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 112) + %86 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %85, i64 0 + store %"github.com/goplus/llgo/internal/abi.StructField" %71, ptr %86, align 8 + %87 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %85, i64 1 + store %"github.com/goplus/llgo/internal/abi.StructField" %80, ptr %87, align 8 + %88 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %89 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %88, i32 0, i32 0 + store ptr %85, ptr %89, align 8 + %90 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %88, i32 0, i32 1 + store i64 2, ptr %90, align 4 + %91 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %88, i32 0, i32 2 + store i64 2, ptr %91, align 4 + %92 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %88, align 8 + %93 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %84, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %92) + store ptr %93, ptr @"main.struct$Ci43nzKYkRLddRL_N4mkykxLXfJlqJGS5n04LKThPNo", align 8 + %94 = load ptr, ptr @"main.struct$Ci43nzKYkRLddRL_N4mkykxLXfJlqJGS5n04LKThPNo", align 8 + %95 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %96 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %95, i32 0, i32 0 + store ptr @2, ptr %96, align 8 + %97 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %95, i32 0, i32 1 + store i64 4, ptr %97, align 4 + %98 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %95, align 8 + %99 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %100 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %99, i32 0, i32 0 + store ptr @7, ptr %100, align 8 + %101 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %99, i32 0, i32 1 + store i64 8, ptr %101, align 4 + %102 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %99, align 8 + call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %60, %"github.com/goplus/llgo/internal/runtime.String" %98, %"github.com/goplus/llgo/internal/runtime.String" %102, ptr %94, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer) ret void _llgo_11: ; preds = %_llgo_9 - %97 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - %98 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %99 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %98, i32 0, i32 0 - store ptr %97, ptr %99, align 8 - %100 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %98, i32 0, i32 1 - store i64 0, ptr %100, align 4 - %101 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %98, i32 0, i32 2 - store i64 0, ptr %101, align 4 - %102 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %98, align 8 - %103 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) - %104 = getelementptr ptr, ptr %103, i64 0 - store ptr %51, ptr %104, align 8 - %105 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %106 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %105, i32 0, i32 0 - store ptr %103, ptr %106, align 8 - %107 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %105, i32 0, i32 1 - store i64 1, ptr %107, align 4 - %108 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %105, i32 0, i32 2 - store i64 1, ptr %108, align 4 - %109 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %105, align 8 - %110 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %102, %"github.com/goplus/llgo/internal/runtime.Slice" %109, i1 false) - store ptr %110, ptr @"_llgo_func$NfGSLZ1QiKRoFkKeqYSXE5hUU5bpeteSJKrbMNUzYRE", align 8 + %103 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + %104 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %105 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %104, i32 0, i32 0 + store ptr %103, ptr %105, align 8 + %106 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %104, i32 0, i32 1 + store i64 0, ptr %106, align 4 + %107 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %104, i32 0, i32 2 + store i64 0, ptr %107, align 4 + %108 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %104, align 8 + %109 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8) + %110 = getelementptr ptr, ptr %109, i64 0 + store ptr %57, ptr %110, align 8 + %111 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %112 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %111, i32 0, i32 0 + store ptr %109, ptr %112, align 8 + %113 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %111, i32 0, i32 1 + store i64 1, ptr %113, align 4 + %114 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %111, i32 0, i32 2 + store i64 1, ptr %114, align 4 + %115 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %111, align 8 + %116 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %108, %"github.com/goplus/llgo/internal/runtime.Slice" %115, i1 false) + store ptr %116, ptr @"_llgo_func$NfGSLZ1QiKRoFkKeqYSXE5hUU5bpeteSJKrbMNUzYRE", align 8 br label %_llgo_12 _llgo_12: ; preds = %_llgo_11, %_llgo_9 - %111 = load ptr, ptr @"_llgo_func$NfGSLZ1QiKRoFkKeqYSXE5hUU5bpeteSJKrbMNUzYRE", align 8 - %112 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %113 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %112, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %50, ptr %113, align 8 - %114 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %112, i32 0, i32 1 - store ptr %111, ptr %114, align 8 - %115 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %112, i32 0, i32 2 - store ptr @"github.com/goplus/llgo/cl/internal/foo.(*Foo).Pb", ptr %115, align 8 - %116 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %112, i32 0, i32 3 - store ptr @"github.com/goplus/llgo/cl/internal/foo.(*Foo).Pb", ptr %116, align 8 - %117 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %112, align 8 + %117 = load ptr, ptr @"_llgo_func$NfGSLZ1QiKRoFkKeqYSXE5hUU5bpeteSJKrbMNUzYRE", align 8 %118 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 %119 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %118, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %50, ptr %119, align 8 + store %"github.com/goplus/llgo/internal/runtime.String" %56, ptr %119, align 8 %120 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %118, i32 0, i32 1 - store ptr %111, ptr %120, align 8 + store ptr %117, ptr %120, align 8 %121 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %118, i32 0, i32 2 store ptr @"github.com/goplus/llgo/cl/internal/foo.(*Foo).Pb", ptr %121, align 8 %122 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %118, i32 0, i32 3 - store ptr @"github.com/goplus/llgo/cl/internal/foo.Foo.Pb", ptr %122, align 8 + store ptr @"github.com/goplus/llgo/cl/internal/foo.(*Foo).Pb", ptr %122, align 8 %123 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %118, align 8 - %124 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) - %125 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %124, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %123, ptr %125, align 8 - %126 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %127 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %126, i32 0, i32 0 - store ptr %124, ptr %127, align 8 - %128 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %126, i32 0, i32 1 - store i64 1, ptr %128, align 4 - %129 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %126, i32 0, i32 2 - store i64 1, ptr %129, align 4 - %130 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %126, align 8 - %131 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) - %132 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %131, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %117, ptr %132, align 8 - %133 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %134 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %133, i32 0, i32 0 - store ptr %131, ptr %134, align 8 - %135 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %133, i32 0, i32 1 + %124 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %125 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %124, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %56, ptr %125, align 8 + %126 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %124, i32 0, i32 1 + store ptr %117, ptr %126, align 8 + %127 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %124, i32 0, i32 2 + store ptr @"github.com/goplus/llgo/cl/internal/foo.(*Foo).Pb", ptr %127, align 8 + %128 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %124, i32 0, i32 3 + store ptr @"github.com/goplus/llgo/cl/internal/foo.Foo.Pb", ptr %128, align 8 + %129 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %124, align 8 + %130 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) + %131 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %130, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %129, ptr %131, align 8 + %132 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %133 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %132, i32 0, i32 0 + store ptr %130, ptr %133, align 8 + %134 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %132, i32 0, i32 1 + store i64 1, ptr %134, align 4 + %135 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %132, i32 0, i32 2 store i64 1, ptr %135, align 4 - %136 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %133, i32 0, i32 2 - store i64 1, ptr %136, align 4 - %137 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %133, align 8 - %138 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %139 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %138, i32 0, i32 0 - store ptr @6, ptr %139, align 8 - %140 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %138, i32 0, i32 1 - store i64 38, ptr %140, align 4 - %141 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %138, align 8 - %142 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %143 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %142, i32 0, i32 0 - store ptr @7, ptr %143, align 8 - %144 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %142, i32 0, i32 1 - store i64 42, ptr %144, align 4 - %145 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %142, align 8 - call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %2, %"github.com/goplus/llgo/internal/runtime.String" %141, %"github.com/goplus/llgo/internal/runtime.String" %145, ptr %46, %"github.com/goplus/llgo/internal/runtime.Slice" %130, %"github.com/goplus/llgo/internal/runtime.Slice" %137) + %136 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %132, align 8 + %137 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) + %138 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %137, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %123, ptr %138, align 8 + %139 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %140 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %139, i32 0, i32 0 + store ptr %137, ptr %140, align 8 + %141 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %139, i32 0, i32 1 + store i64 1, ptr %141, align 4 + %142 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %139, i32 0, i32 2 + store i64 1, ptr %142, align 4 + %143 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %139, align 8 + %144 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %145 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %144, i32 0, i32 0 + store ptr @4, ptr %145, align 8 + %146 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %144, i32 0, i32 1 + store i64 38, ptr %146, align 4 + %147 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %144, align 8 + %148 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %149 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %148, i32 0, i32 0 + store ptr @5, ptr %149, align 8 + %150 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %148, i32 0, i32 1 + store i64 42, ptr %150, align 4 + %151 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %148, align 8 + call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %2, %"github.com/goplus/llgo/internal/runtime.String" %147, %"github.com/goplus/llgo/internal/runtime.String" %151, ptr %52, %"github.com/goplus/llgo/internal/runtime.Slice" %136, %"github.com/goplus/llgo/internal/runtime.Slice" %143) br label %_llgo_10 } diff --git a/cl/_testrt/allocstr/out.ll b/cl/_testrt/allocstr/out.ll index 4f958a80..878c6ffc 100644 --- a/cl/_testrt/allocstr/out.ll +++ b/cl/_testrt/allocstr/out.ll @@ -4,7 +4,7 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } @"main.init$guard" = global ptr null -@0 = private unnamed_addr constant [13 x i8] c"Hello world\0A\00", align 1 +@0 = private unnamed_addr constant [12 x i8] c"Hello world\0A", align 1 @__llgo_argc = global ptr null @__llgo_argv = global ptr null diff --git a/cl/_testrt/any/out.ll b/cl/_testrt/any/out.ll index cb94c6b1..6f45a304 100644 --- a/cl/_testrt/any/out.ll +++ b/cl/_testrt/any/out.ll @@ -8,14 +8,13 @@ source_filename = "main" @"main.init$guard" = global ptr null @"*_llgo_int8" = linkonce global ptr null @_llgo_int8 = linkonce global ptr null -@0 = private unnamed_addr constant [22 x i8] c"type assertion failed\00", align 1 +@0 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1 @_llgo_string = linkonce global ptr null @_llgo_int = linkonce global ptr null -@1 = private unnamed_addr constant [22 x i8] c"type assertion failed\00", align 1 @__llgo_argc = global ptr null @__llgo_argv = global ptr null -@2 = private unnamed_addr constant [7 x i8] c"%s %d\0A\00", align 1 -@3 = private unnamed_addr constant [6 x i8] c"Hello\00", align 1 +@1 = private unnamed_addr constant [7 x i8] c"%s %d\0A\00", align 1 +@2 = private unnamed_addr constant [6 x i8] c"Hello\00", align 1 define ptr @main.hi(%"github.com/goplus/llgo/internal/runtime.eface" %0) { _llgo_0: @@ -64,7 +63,7 @@ _llgo_1: ; preds = %_llgo_0 _llgo_2: ; preds = %_llgo_0 %7 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %8 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %7, i32 0, i32 0 - store ptr @1, ptr %8, align 8 + store ptr @0, ptr %8, align 8 %9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %7, i32 0, i32 1 store i64 21, ptr %9, align 4 %10 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %7, align 8 @@ -106,7 +105,7 @@ _llgo_0: %4 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %3, i32 0, i32 0 store ptr %2, ptr %4, align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %3, i32 0, i32 1 - store ptr @3, ptr %5, align 8 + store ptr @2, ptr %5, align 8 %6 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %3, align 8 %7 = call ptr @main.hi(%"github.com/goplus/llgo/internal/runtime.eface" %6) %8 = load ptr, ptr @_llgo_int, align 8 @@ -121,7 +120,7 @@ _llgo_0: store ptr inttoptr (i64 100 to ptr), ptr %14, align 8 %15 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %12, align 8 %16 = call i64 @main.incVal(%"github.com/goplus/llgo/internal/runtime.eface" %15) - %17 = call i32 (ptr, ...) @printf(ptr @2, ptr %7, i64 %16) + %17 = call i32 (ptr, ...) @printf(ptr @1, ptr %7, i64 %16) ret i32 0 } @@ -137,37 +136,45 @@ _llgo_1: ; preds = %_llgo_0 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 - %3 = load ptr, ptr @_llgo_int8, align 8 - %4 = load ptr, ptr @"*_llgo_int8", align 8 - %5 = icmp eq ptr %4, null - br i1 %5, label %_llgo_3, label %_llgo_4 + %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %2, i32 0, i32 6 + %4 = load i8, ptr %3, align 1 + %5 = or i8 %4, 32 + store i8 %5, ptr %3, align 1 + %6 = load ptr, ptr @_llgo_int8, align 8 + %7 = load ptr, ptr @"*_llgo_int8", align 8 + %8 = icmp eq ptr %7, null + br i1 %8, label %_llgo_3, label %_llgo_4 _llgo_3: ; preds = %_llgo_2 - %6 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %3) - store ptr %6, ptr @"*_llgo_int8", align 8 + %9 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %6) + store ptr %9, ptr @"*_llgo_int8", align 8 br label %_llgo_4 _llgo_4: ; preds = %_llgo_3, %_llgo_2 - %7 = load ptr, ptr @_llgo_string, align 8 - %8 = icmp eq ptr %7, null - br i1 %8, label %_llgo_5, label %_llgo_6 + %10 = load ptr, ptr @_llgo_string, align 8 + %11 = icmp eq ptr %10, null + br i1 %11, label %_llgo_5, label %_llgo_6 _llgo_5: ; preds = %_llgo_4 - %9 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24) - store ptr %9, ptr @_llgo_string, align 8 + %12 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24) + store ptr %12, ptr @_llgo_string, align 8 br label %_llgo_6 _llgo_6: ; preds = %_llgo_5, %_llgo_4 - %10 = load ptr, ptr @_llgo_int, align 8 - %11 = icmp eq ptr %10, null - br i1 %11, label %_llgo_7, label %_llgo_8 + %13 = load ptr, ptr @_llgo_int, align 8 + %14 = icmp eq ptr %13, null + br i1 %14, label %_llgo_7, label %_llgo_8 _llgo_7: ; preds = %_llgo_6 - %12 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 2) - store ptr %12, ptr @_llgo_int, align 8 + %15 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 2) + store ptr %15, ptr @_llgo_int, align 8 br label %_llgo_8 _llgo_8: ; preds = %_llgo_7, %_llgo_6 + %16 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %15, i32 0, i32 6 + %17 = load i8, ptr %16, align 1 + %18 = or i8 %17, 32 + store i8 %18, ptr %16, align 1 ret void } diff --git a/cl/_testrt/builtin/out.ll b/cl/_testrt/builtin/out.ll index 36f38d16..6e91ac88 100644 --- a/cl/_testrt/builtin/out.ll +++ b/cl/_testrt/builtin/out.ll @@ -12,31 +12,14 @@ source_filename = "main" @main.n = global ptr null @__llgo_argc = global ptr null @__llgo_argv = global ptr null -@0 = private unnamed_addr constant [6 x i8] c"hello\00", align 1 -@1 = private unnamed_addr constant [6 x i8] c"hello\00", align 1 -@2 = private unnamed_addr constant [6 x i8] c"hello\00", align 1 -@3 = private unnamed_addr constant [6 x i8] c"hello\00", align 1 -@4 = private unnamed_addr constant [4 x i8] c"def\00", align 1 +@0 = private unnamed_addr constant [5 x i8] c"hello", align 1 +@1 = private unnamed_addr constant [3 x i8] c"def", align 1 @_llgo_int = linkonce global ptr null -@5 = private unnamed_addr constant [5 x i8] c"ABCD\00", align 1 -@6 = private unnamed_addr constant [8 x i8] c"\E4\B8\ADabcd\00", align 1 -@7 = private unnamed_addr constant [8 x i8] c"\E4\B8\ADabcd\00", align 1 -@8 = private unnamed_addr constant [8 x i8] c"\E4\B8\ADabcd\00", align 1 -@9 = private unnamed_addr constant [4 x i8] c"abc\00", align 1 -@10 = private unnamed_addr constant [4 x i8] c"abc\00", align 1 -@11 = private unnamed_addr constant [4 x i8] c"abc\00", align 1 -@12 = private unnamed_addr constant [4 x i8] c"abd\00", align 1 -@13 = private unnamed_addr constant [4 x i8] c"abc\00", align 1 -@14 = private unnamed_addr constant [4 x i8] c"abd\00", align 1 -@15 = private unnamed_addr constant [4 x i8] c"abc\00", align 1 -@16 = private unnamed_addr constant [4 x i8] c"abd\00", align 1 -@17 = private unnamed_addr constant [4 x i8] c"abc\00", align 1 -@18 = private unnamed_addr constant [4 x i8] c"abd\00", align 1 -@19 = private unnamed_addr constant [4 x i8] c"abc\00", align 1 -@20 = private unnamed_addr constant [4 x i8] c"abd\00", align 1 -@21 = private unnamed_addr constant [4 x i8] c"abc\00", align 1 -@22 = private unnamed_addr constant [4 x i8] c"abd\00", align 1 -@23 = private unnamed_addr constant [3 x i8] c"fn\00", align 1 +@2 = private unnamed_addr constant [4 x i8] c"ABCD", align 1 +@3 = private unnamed_addr constant [7 x i8] c"\E4\B8\ADabcd", align 1 +@4 = private unnamed_addr constant [3 x i8] c"abc", align 1 +@5 = private unnamed_addr constant [3 x i8] c"abd", align 1 +@6 = private unnamed_addr constant [2 x i8] c"fn", align 1 define double @main.Float64frombits(i64 %0) { _llgo_0: @@ -249,14 +232,14 @@ _llgo_0: %77 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.NewStringSlice"(%"github.com/goplus/llgo/internal/runtime.String" %75, i64 1, i64 %76) %78 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %79 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %78, i32 0, i32 0 - store ptr @1, ptr %79, align 8 + store ptr @0, ptr %79, align 8 %80 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %78, i32 0, i32 1 store i64 5, ptr %80, align 4 %81 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %78, align 8 %82 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.NewStringSlice"(%"github.com/goplus/llgo/internal/runtime.String" %81, i64 1, i64 2) %83 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %84 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %83, i32 0, i32 0 - store ptr @2, ptr %84, align 8 + store ptr @0, ptr %84, align 8 %85 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %83, i32 0, i32 1 store i64 5, ptr %85, align 4 %86 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %83, align 8 @@ -265,7 +248,7 @@ _llgo_0: %89 = extractvalue %"github.com/goplus/llgo/internal/runtime.String" %88, 1 %90 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %91 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %90, i32 0, i32 0 - store ptr @3, ptr %91, align 8 + store ptr @0, ptr %91, align 8 %92 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %90, i32 0, i32 1 store i64 5, ptr %92, align 4 %93 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %90, align 8 @@ -316,7 +299,7 @@ _llgo_0: %115 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %111, align 8 %116 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %117 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %116, i32 0, i32 0 - store ptr @4, ptr %117, align 8 + store ptr @1, ptr %117, align 8 %118 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %116, i32 0, i32 1 store i64 3, ptr %118, align 4 %119 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %116, align 8 @@ -397,7 +380,7 @@ _llgo_0: %154 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %134, i64 1, i64 3, i64 1, i64 3, i64 3) %155 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %156 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %155, i32 0, i32 0 - store ptr @5, ptr %156, align 8 + store ptr @2, ptr %156, align 8 %157 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %155, i32 0, i32 1 store i64 4, ptr %157, align 4 %158 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %155, align 8 @@ -443,7 +426,7 @@ _llgo_0: call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10) %179 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %180 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %179, i32 0, i32 0 - store ptr @6, ptr %180, align 8 + store ptr @3, ptr %180, align 8 %181 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %179, i32 0, i32 1 store i64 7, ptr %181, align 4 %182 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %179, align 8 @@ -484,14 +467,14 @@ _llgo_3: ; preds = %_llgo_1 call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10) %195 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %196 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %195, i32 0, i32 0 - store ptr @7, ptr %196, align 8 + store ptr @3, ptr %196, align 8 %197 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %195, i32 0, i32 1 store i64 7, ptr %197, align 4 %198 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %195, align 8 %199 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/internal/runtime.String" %198) %200 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %201 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %200, i32 0, i32 0 - store ptr @8, ptr %201, align 8 + store ptr @3, ptr %201, align 8 %202 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %200, i32 0, i32 1 store i64 7, ptr %202, align 4 %203 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %200, align 8 @@ -521,39 +504,39 @@ _llgo_3: ; preds = %_llgo_1 call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10) %216 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %217 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %216, i32 0, i32 0 - store ptr @9, ptr %217, align 8 + store ptr @4, ptr %217, align 8 %218 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %216, i32 0, i32 1 store i64 3, ptr %218, align 4 %219 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %216, align 8 %220 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %221 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %220, i32 0, i32 0 - store ptr @10, ptr %221, align 8 + store ptr @4, ptr %221, align 8 %222 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %220, i32 0, i32 1 store i64 3, ptr %222, align 4 %223 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %220, align 8 %224 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %219, %"github.com/goplus/llgo/internal/runtime.String" %223) %225 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %226 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %225, i32 0, i32 0 - store ptr @11, ptr %226, align 8 + store ptr @4, ptr %226, align 8 %227 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %225, i32 0, i32 1 store i64 3, ptr %227, align 4 %228 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %225, align 8 %229 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %230 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %229, i32 0, i32 0 - store ptr @12, ptr %230, align 8 + store ptr @5, ptr %230, align 8 %231 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %229, i32 0, i32 1 store i64 3, ptr %231, align 4 %232 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %229, align 8 %233 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %228, %"github.com/goplus/llgo/internal/runtime.String" %232) %234 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %235 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %234, i32 0, i32 0 - store ptr @13, ptr %235, align 8 + store ptr @4, ptr %235, align 8 %236 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %234, i32 0, i32 1 store i64 3, ptr %236, align 4 %237 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %234, align 8 %238 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %239 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %238, i32 0, i32 0 - store ptr @14, ptr %239, align 8 + store ptr @5, ptr %239, align 8 %240 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %238, i32 0, i32 1 store i64 3, ptr %240, align 4 %241 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %238, align 8 @@ -561,26 +544,26 @@ _llgo_3: ; preds = %_llgo_1 %243 = xor i1 %242, true %244 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %245 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %244, i32 0, i32 0 - store ptr @15, ptr %245, align 8 + store ptr @4, ptr %245, align 8 %246 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %244, i32 0, i32 1 store i64 3, ptr %246, align 4 %247 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %244, align 8 %248 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %249 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %248, i32 0, i32 0 - store ptr @16, ptr %249, align 8 + store ptr @5, ptr %249, align 8 %250 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %248, i32 0, i32 1 store i64 3, ptr %250, align 4 %251 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %248, align 8 %252 = call i1 @"github.com/goplus/llgo/internal/runtime.StringLess"(%"github.com/goplus/llgo/internal/runtime.String" %247, %"github.com/goplus/llgo/internal/runtime.String" %251) %253 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %254 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %253, i32 0, i32 0 - store ptr @17, ptr %254, align 8 + store ptr @4, ptr %254, align 8 %255 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %253, i32 0, i32 1 store i64 3, ptr %255, align 4 %256 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %253, align 8 %257 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %258 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %257, i32 0, i32 0 - store ptr @18, ptr %258, align 8 + store ptr @5, ptr %258, align 8 %259 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %257, i32 0, i32 1 store i64 3, ptr %259, align 4 %260 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %257, align 8 @@ -588,26 +571,26 @@ _llgo_3: ; preds = %_llgo_1 %262 = xor i1 %261, true %263 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %264 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %263, i32 0, i32 0 - store ptr @19, ptr %264, align 8 + store ptr @4, ptr %264, align 8 %265 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %263, i32 0, i32 1 store i64 3, ptr %265, align 4 %266 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %263, align 8 %267 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %268 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %267, i32 0, i32 0 - store ptr @20, ptr %268, align 8 + store ptr @5, ptr %268, align 8 %269 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %267, i32 0, i32 1 store i64 3, ptr %269, align 4 %270 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %267, align 8 %271 = call i1 @"github.com/goplus/llgo/internal/runtime.StringLess"(%"github.com/goplus/llgo/internal/runtime.String" %270, %"github.com/goplus/llgo/internal/runtime.String" %266) %272 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %273 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %272, i32 0, i32 0 - store ptr @21, ptr %273, align 8 + store ptr @4, ptr %273, align 8 %274 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %272, i32 0, i32 1 store i64 3, ptr %274, align 4 %275 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %272, align 8 %276 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %277 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %276, i32 0, i32 0 - store ptr @22, ptr %277, align 8 + store ptr @5, ptr %277, align 8 %278 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %276, i32 0, i32 1 store i64 3, ptr %278, align 4 %279 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %276, align 8 @@ -660,6 +643,10 @@ _llgo_1: ; preds = %_llgo_0 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 + %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %2, i32 0, i32 6 + %4 = load i8, ptr %3, align 1 + %5 = or i8 %4, 32 + store i8 %5, ptr %3, align 1 ret void } @@ -693,7 +680,7 @@ define void @"main.main$1"() { _llgo_0: %0 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %1 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %0, i32 0, i32 0 - store ptr @23, ptr %1, align 8 + store ptr @6, ptr %1, align 8 %2 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %0, i32 0, i32 1 store i64 2, ptr %2, align 4 %3 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %0, align 8 diff --git a/cl/_testrt/cast/out.ll b/cl/_testrt/cast/out.ll index 0d0cd205..2f26e334 100644 --- a/cl/_testrt/cast/out.ll +++ b/cl/_testrt/cast/out.ll @@ -5,20 +5,8 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr } @"main.init$guard" = global ptr null -@0 = private unnamed_addr constant [6 x i8] c"error\00", align 1 +@0 = private unnamed_addr constant [5 x i8] c"error", align 1 @_llgo_string = linkonce global ptr null -@1 = private unnamed_addr constant [6 x i8] c"error\00", align 1 -@2 = private unnamed_addr constant [6 x i8] c"error\00", align 1 -@3 = private unnamed_addr constant [6 x i8] c"error\00", align 1 -@4 = private unnamed_addr constant [6 x i8] c"error\00", align 1 -@5 = private unnamed_addr constant [6 x i8] c"error\00", align 1 -@6 = private unnamed_addr constant [6 x i8] c"error\00", align 1 -@7 = private unnamed_addr constant [6 x i8] c"error\00", align 1 -@8 = private unnamed_addr constant [6 x i8] c"error\00", align 1 -@9 = private unnamed_addr constant [6 x i8] c"error\00", align 1 -@10 = private unnamed_addr constant [6 x i8] c"error\00", align 1 -@11 = private unnamed_addr constant [6 x i8] c"error\00", align 1 -@12 = private unnamed_addr constant [6 x i8] c"error\00", align 1 @__llgo_argc = global ptr null @__llgo_argv = global ptr null @@ -60,7 +48,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @1, ptr %5, align 8 + store ptr @0, ptr %5, align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 store i64 5, ptr %6, align 4 %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 @@ -89,7 +77,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @2, ptr %5, align 8 + store ptr @0, ptr %5, align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 store i64 5, ptr %6, align 4 %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 @@ -118,7 +106,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @3, ptr %5, align 8 + store ptr @0, ptr %5, align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 store i64 5, ptr %6, align 4 %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 @@ -147,7 +135,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @4, ptr %5, align 8 + store ptr @0, ptr %5, align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 store i64 5, ptr %6, align 4 %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 @@ -176,7 +164,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @5, ptr %5, align 8 + store ptr @0, ptr %5, align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 store i64 5, ptr %6, align 4 %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 @@ -205,7 +193,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @6, ptr %5, align 8 + store ptr @0, ptr %5, align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 store i64 5, ptr %6, align 4 %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 @@ -234,7 +222,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @7, ptr %5, align 8 + store ptr @0, ptr %5, align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 store i64 5, ptr %6, align 4 %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 @@ -263,7 +251,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @8, ptr %5, align 8 + store ptr @0, ptr %5, align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 store i64 5, ptr %6, align 4 %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 @@ -292,7 +280,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @9, ptr %5, align 8 + store ptr @0, ptr %5, align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 store i64 5, ptr %6, align 4 %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 @@ -321,7 +309,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @10, ptr %5, align 8 + store ptr @0, ptr %5, align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 store i64 5, ptr %6, align 4 %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 @@ -350,7 +338,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @11, ptr %5, align 8 + store ptr @0, ptr %5, align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 store i64 5, ptr %6, align 4 %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 @@ -374,7 +362,7 @@ _llgo_2: ; preds = %_llgo_0 _llgo_3: ; preds = %_llgo_2 %16 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %17 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %16, i32 0, i32 0 - store ptr @12, ptr %17, align 8 + store ptr @0, ptr %17, align 8 %18 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %16, i32 0, i32 1 store i64 5, ptr %18, align 4 %19 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %16, align 8 diff --git a/cl/_testrt/concat/out.ll b/cl/_testrt/concat/out.ll index ba32c6e5..b2f479fe 100644 --- a/cl/_testrt/concat/out.ll +++ b/cl/_testrt/concat/out.ll @@ -5,21 +5,19 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 } @"main.init$guard" = global ptr null -@0 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@1 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@2 = private unnamed_addr constant [4 x i8] c"...\00", align 1 +@0 = private unnamed_addr constant [3 x i8] c"...", align 1 @__llgo_argc = global ptr null @__llgo_argv = global ptr null -@3 = private unnamed_addr constant [6 x i8] c"Hello\00", align 1 -@4 = private unnamed_addr constant [2 x i8] c" \00", align 1 -@5 = private unnamed_addr constant [6 x i8] c"World\00", align 1 +@1 = private unnamed_addr constant [5 x i8] c"Hello", align 1 +@2 = private unnamed_addr constant [1 x i8] c" ", align 1 +@3 = private unnamed_addr constant [5 x i8] c"World", align 1 define %"github.com/goplus/llgo/internal/runtime.String" @main.concat(%"github.com/goplus/llgo/internal/runtime.Slice" %0) { _llgo_0: %1 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %0, 1 %2 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i32 0, i32 0 - store ptr @0, ptr %3, align 8 + store ptr null, ptr %3, align 8 %4 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i32 0, i32 1 store i64 0, ptr %4, align 4 %5 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %2, align 8 @@ -49,14 +47,14 @@ define %"github.com/goplus/llgo/internal/runtime.String" @main.info(%"github.com _llgo_0: %1 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %2 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %1, i32 0, i32 0 - store ptr @1, ptr %2, align 8 + store ptr null, ptr %2, align 8 %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %1, i32 0, i32 1 store i64 0, ptr %3, align 4 %4 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %1, align 8 %5 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringCat"(%"github.com/goplus/llgo/internal/runtime.String" %4, %"github.com/goplus/llgo/internal/runtime.String" %0) %6 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %7 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %6, i32 0, i32 0 - store ptr @2, ptr %7, align 8 + store ptr @0, ptr %7, align 8 %8 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %6, i32 0, i32 1 store i64 3, ptr %8, align 4 %9 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %6, align 8 @@ -87,7 +85,7 @@ _llgo_0: %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i64 0 %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @3, ptr %5, align 8 + store ptr @1, ptr %5, align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 store i64 5, ptr %6, align 4 %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 @@ -95,7 +93,7 @@ _llgo_0: %8 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i64 1 %9 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %10 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %9, i32 0, i32 0 - store ptr @4, ptr %10, align 8 + store ptr @2, ptr %10, align 8 %11 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %9, i32 0, i32 1 store i64 1, ptr %11, align 4 %12 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %9, align 8 @@ -103,7 +101,7 @@ _llgo_0: %13 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i64 2 %14 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %15 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %14, i32 0, i32 0 - store ptr @5, ptr %15, align 8 + store ptr @3, ptr %15, align 8 %16 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %14, i32 0, i32 1 store i64 5, ptr %16, align 4 %17 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %14, align 8 diff --git a/cl/_testrt/eface/out.ll b/cl/_testrt/eface/out.ll index b614da51..c6af1445 100644 --- a/cl/_testrt/eface/out.ll +++ b/cl/_testrt/eface/out.ll @@ -11,11 +11,9 @@ source_filename = "main" %"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr } @"main.init$guard" = global ptr null -@0 = private unnamed_addr constant [7 x i8] c"invoke\00", align 1 -@1 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@2 = private unnamed_addr constant [8 x i8] c"\09elem: \00", align 1 -@3 = private unnamed_addr constant [10 x i8] c"\09uncomm: \00", align 1 -@4 = private unnamed_addr constant [10 x i8] c"\09uncomm: \00", align 1 +@0 = private unnamed_addr constant [6 x i8] c"invoke", align 1 +@1 = private unnamed_addr constant [7 x i8] c"\09elem: ", align 1 +@2 = private unnamed_addr constant [9 x i8] c"\09uncomm: ", align 1 @__llgo_argc = global ptr null @__llgo_argv = global ptr null @_llgo_bool = linkonce global ptr null @@ -36,21 +34,16 @@ source_filename = "main" @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null @"*_llgo_int" = linkonce global ptr null @"[]_llgo_int" = linkonce global ptr null -@5 = private unnamed_addr constant [6 x i8] c"hello\00", align 1 +@3 = private unnamed_addr constant [5 x i8] c"hello", align 1 @_llgo_string = linkonce global ptr null @"main.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM" = global ptr null -@6 = private unnamed_addr constant [2 x i8] c"x\00", align 1 -@7 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@8 = private unnamed_addr constant [2 x i8] c"y\00", align 1 -@9 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@10 = private unnamed_addr constant [2 x i8] c"z\00", align 1 -@11 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 -@12 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@13 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 +@4 = private unnamed_addr constant [1 x i8] c"x", align 1 +@5 = private unnamed_addr constant [1 x i8] c"y", align 1 +@6 = private unnamed_addr constant [1 x i8] c"z", align 1 +@7 = private unnamed_addr constant [4 x i8] c"main", align 1 @_llgo_main.T = linkonce global ptr null -@14 = private unnamed_addr constant [7 x i8] c"Invoke\00", align 1 -@15 = private unnamed_addr constant [5 x i8] c"main\00", align 1 -@16 = private unnamed_addr constant [7 x i8] c"main.T\00", align 1 +@8 = private unnamed_addr constant [6 x i8] c"Invoke", align 1 +@9 = private unnamed_addr constant [6 x i8] c"main.T", align 1 define void @"main.(*T).Invoke"(ptr %0) { _llgo_0: @@ -73,7 +66,7 @@ _llgo_0: %3 = load ptr, ptr %2, align 8 %4 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 0 - store ptr @1, ptr %5, align 8 + store ptr null, ptr %5, align 8 %6 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %4, i32 0, i32 1 store i64 0, ptr %6, align 4 %7 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %4, align 8 @@ -125,7 +118,7 @@ _llgo_1: ; preds = %_llgo_0 %21 = call ptr @"github.com/goplus/llgo/internal/abi.(*Type).Elem"(ptr %0) %22 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %23 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %22, i32 0, i32 0 - store ptr @2, ptr %23, align 8 + store ptr @1, ptr %23, align 8 %24 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %22, i32 0, i32 1 store i64 7, ptr %24, align 4 %25 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %22, align 8 @@ -142,7 +135,7 @@ _llgo_3: ; preds = %_llgo_2 %29 = call ptr @"github.com/goplus/llgo/internal/abi.(*Type).Uncommon"(ptr %0) %30 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %31 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %30, i32 0, i32 0 - store ptr @3, ptr %31, align 8 + store ptr @2, ptr %31, align 8 %32 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %30, i32 0, i32 1 store i64 9, ptr %32, align 4 %33 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %30, align 8 @@ -162,7 +155,7 @@ _llgo_5: ; preds = %_llgo_3 %40 = call ptr @"github.com/goplus/llgo/internal/abi.(*Type).Uncommon"(ptr %39) %41 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %42 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %41, i32 0, i32 0 - store ptr @4, ptr %42, align 8 + store ptr @2, ptr %42, align 8 %43 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %41, i32 0, i32 1 store i64 9, ptr %43, align 4 %44 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %41, align 8 @@ -427,7 +420,7 @@ _llgo_0: call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %141) %142 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %143 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %142, i32 0, i32 0 - store ptr @5, ptr %143, align 8 + store ptr @3, ptr %143, align 8 %144 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %142, i32 0, i32 1 store i64 5, ptr %144, align 4 %145 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %142, align 8 @@ -453,7 +446,7 @@ _llgo_0: call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %157) %158 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %159 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %158, i32 0, i32 0 - store ptr @13, ptr %159, align 8 + store ptr null, ptr %159, align 8 %160 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %158, i32 0, i32 1 store i64 0, ptr %160, align 4 %161 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %158, align 8 @@ -504,327 +497,383 @@ _llgo_1: ; preds = %_llgo_0 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 - %3 = load ptr, ptr @_llgo_int, align 8 - %4 = icmp eq ptr %3, null - br i1 %4, label %_llgo_3, label %_llgo_4 + %3 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %2, i32 0, i32 6 + %4 = load i8, ptr %3, align 1 + %5 = or i8 %4, 32 + store i8 %5, ptr %3, align 1 + %6 = load ptr, ptr @_llgo_int, align 8 + %7 = icmp eq ptr %6, null + br i1 %7, label %_llgo_3, label %_llgo_4 _llgo_3: ; preds = %_llgo_2 - %5 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 2) - store ptr %5, ptr @_llgo_int, align 8 + %8 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 2) + store ptr %8, ptr @_llgo_int, align 8 br label %_llgo_4 _llgo_4: ; preds = %_llgo_3, %_llgo_2 - %6 = load ptr, ptr @_llgo_int8, align 8 - %7 = icmp eq ptr %6, null - br i1 %7, label %_llgo_5, label %_llgo_6 + %9 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %8, i32 0, i32 6 + %10 = load i8, ptr %9, align 1 + %11 = or i8 %10, 32 + store i8 %11, ptr %9, align 1 + %12 = load ptr, ptr @_llgo_int8, 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/internal/runtime.Basic"(i64 3) - store ptr %8, ptr @_llgo_int8, align 8 + %14 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 3) + store ptr %14, ptr @_llgo_int8, align 8 br label %_llgo_6 _llgo_6: ; preds = %_llgo_5, %_llgo_4 - %9 = load ptr, ptr @_llgo_int16, align 8 - %10 = icmp eq ptr %9, null - br i1 %10, label %_llgo_7, label %_llgo_8 + %15 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %14, i32 0, i32 6 + %16 = load i8, ptr %15, align 1 + %17 = or i8 %16, 32 + store i8 %17, ptr %15, align 1 + %18 = load ptr, ptr @_llgo_int16, align 8 + %19 = icmp eq ptr %18, null + br i1 %19, label %_llgo_7, label %_llgo_8 _llgo_7: ; preds = %_llgo_6 - %11 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 4) - store ptr %11, ptr @_llgo_int16, align 8 + %20 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 4) + store ptr %20, ptr @_llgo_int16, align 8 br label %_llgo_8 _llgo_8: ; preds = %_llgo_7, %_llgo_6 - %12 = load ptr, ptr @_llgo_int32, align 8 - %13 = icmp eq ptr %12, null - br i1 %13, label %_llgo_9, label %_llgo_10 + %21 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %20, i32 0, i32 6 + %22 = load i8, ptr %21, align 1 + %23 = or i8 %22, 32 + store i8 %23, ptr %21, align 1 + %24 = load ptr, ptr @_llgo_int32, align 8 + %25 = icmp eq ptr %24, null + br i1 %25, label %_llgo_9, label %_llgo_10 _llgo_9: ; preds = %_llgo_8 - %14 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 5) - store ptr %14, ptr @_llgo_int32, align 8 + %26 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 5) + store ptr %26, ptr @_llgo_int32, align 8 br label %_llgo_10 _llgo_10: ; preds = %_llgo_9, %_llgo_8 - %15 = load ptr, ptr @_llgo_int64, align 8 - %16 = icmp eq ptr %15, null - br i1 %16, label %_llgo_11, label %_llgo_12 + %27 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %26, i32 0, i32 6 + %28 = load i8, ptr %27, align 1 + %29 = or i8 %28, 32 + store i8 %29, ptr %27, align 1 + %30 = load ptr, ptr @_llgo_int64, align 8 + %31 = icmp eq ptr %30, null + br i1 %31, label %_llgo_11, label %_llgo_12 _llgo_11: ; preds = %_llgo_10 - %17 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 6) - store ptr %17, ptr @_llgo_int64, align 8 + %32 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 6) + store ptr %32, ptr @_llgo_int64, align 8 br label %_llgo_12 _llgo_12: ; preds = %_llgo_11, %_llgo_10 - %18 = load ptr, ptr @_llgo_uint, align 8 - %19 = icmp eq ptr %18, null - br i1 %19, label %_llgo_13, label %_llgo_14 + %33 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %32, i32 0, i32 6 + %34 = load i8, ptr %33, align 1 + %35 = or i8 %34, 32 + store i8 %35, ptr %33, align 1 + %36 = load ptr, ptr @_llgo_uint, align 8 + %37 = icmp eq ptr %36, null + br i1 %37, label %_llgo_13, label %_llgo_14 _llgo_13: ; preds = %_llgo_12 - %20 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 7) - store ptr %20, ptr @_llgo_uint, align 8 + %38 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 7) + store ptr %38, ptr @_llgo_uint, align 8 br label %_llgo_14 _llgo_14: ; preds = %_llgo_13, %_llgo_12 - %21 = load ptr, ptr @_llgo_uint8, align 8 - %22 = icmp eq ptr %21, null - br i1 %22, label %_llgo_15, label %_llgo_16 + %39 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %38, i32 0, i32 6 + %40 = load i8, ptr %39, align 1 + %41 = or i8 %40, 32 + store i8 %41, ptr %39, align 1 + %42 = load ptr, ptr @_llgo_uint8, align 8 + %43 = icmp eq ptr %42, null + br i1 %43, label %_llgo_15, label %_llgo_16 _llgo_15: ; preds = %_llgo_14 - %23 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 8) - store ptr %23, ptr @_llgo_uint8, align 8 + %44 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 8) + store ptr %44, ptr @_llgo_uint8, align 8 br label %_llgo_16 _llgo_16: ; preds = %_llgo_15, %_llgo_14 - %24 = load ptr, ptr @_llgo_uint16, align 8 - %25 = icmp eq ptr %24, null - br i1 %25, label %_llgo_17, label %_llgo_18 + %45 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %44, i32 0, i32 6 + %46 = load i8, ptr %45, align 1 + %47 = or i8 %46, 32 + store i8 %47, ptr %45, align 1 + %48 = load ptr, ptr @_llgo_uint16, align 8 + %49 = icmp eq ptr %48, null + br i1 %49, label %_llgo_17, label %_llgo_18 _llgo_17: ; preds = %_llgo_16 - %26 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 9) - store ptr %26, ptr @_llgo_uint16, align 8 + %50 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 9) + store ptr %50, ptr @_llgo_uint16, align 8 br label %_llgo_18 _llgo_18: ; preds = %_llgo_17, %_llgo_16 - %27 = load ptr, ptr @_llgo_uint32, align 8 - %28 = icmp eq ptr %27, null - br i1 %28, label %_llgo_19, label %_llgo_20 + %51 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %50, i32 0, i32 6 + %52 = load i8, ptr %51, align 1 + %53 = or i8 %52, 32 + store i8 %53, ptr %51, align 1 + %54 = load ptr, ptr @_llgo_uint32, align 8 + %55 = icmp eq ptr %54, null + br i1 %55, label %_llgo_19, label %_llgo_20 _llgo_19: ; preds = %_llgo_18 - %29 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 10) - store ptr %29, ptr @_llgo_uint32, align 8 + %56 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 10) + store ptr %56, ptr @_llgo_uint32, align 8 br label %_llgo_20 _llgo_20: ; preds = %_llgo_19, %_llgo_18 - %30 = load ptr, ptr @_llgo_uint64, align 8 - %31 = icmp eq ptr %30, null - br i1 %31, label %_llgo_21, label %_llgo_22 + %57 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %56, i32 0, i32 6 + %58 = load i8, ptr %57, align 1 + %59 = or i8 %58, 32 + store i8 %59, ptr %57, align 1 + %60 = load ptr, ptr @_llgo_uint64, align 8 + %61 = icmp eq ptr %60, null + br i1 %61, label %_llgo_21, label %_llgo_22 _llgo_21: ; preds = %_llgo_20 - %32 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 11) - store ptr %32, ptr @_llgo_uint64, align 8 + %62 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 11) + store ptr %62, ptr @_llgo_uint64, align 8 br label %_llgo_22 _llgo_22: ; preds = %_llgo_21, %_llgo_20 - %33 = load ptr, ptr @_llgo_uintptr, align 8 - %34 = icmp eq ptr %33, null - br i1 %34, label %_llgo_23, label %_llgo_24 + %63 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %62, i32 0, i32 6 + %64 = load i8, ptr %63, align 1 + %65 = or i8 %64, 32 + store i8 %65, ptr %63, align 1 + %66 = load ptr, ptr @_llgo_uintptr, align 8 + %67 = icmp eq ptr %66, null + br i1 %67, label %_llgo_23, label %_llgo_24 _llgo_23: ; preds = %_llgo_22 - %35 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 12) - store ptr %35, ptr @_llgo_uintptr, align 8 + %68 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 12) + store ptr %68, ptr @_llgo_uintptr, align 8 br label %_llgo_24 _llgo_24: ; preds = %_llgo_23, %_llgo_22 - %36 = load ptr, ptr @_llgo_float32, align 8 - %37 = icmp eq ptr %36, null - br i1 %37, label %_llgo_25, label %_llgo_26 + %69 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %68, i32 0, i32 6 + %70 = load i8, ptr %69, align 1 + %71 = or i8 %70, 32 + store i8 %71, ptr %69, align 1 + %72 = load ptr, ptr @_llgo_float32, align 8 + %73 = icmp eq ptr %72, null + br i1 %73, label %_llgo_25, label %_llgo_26 _llgo_25: ; preds = %_llgo_24 - %38 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 13) - store ptr %38, ptr @_llgo_float32, align 8 + %74 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 13) + store ptr %74, ptr @_llgo_float32, align 8 br label %_llgo_26 _llgo_26: ; preds = %_llgo_25, %_llgo_24 - %39 = load ptr, ptr @_llgo_float64, align 8 - %40 = icmp eq ptr %39, null - br i1 %40, label %_llgo_27, label %_llgo_28 + %75 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %74, i32 0, i32 6 + %76 = load i8, ptr %75, align 1 + %77 = or i8 %76, 32 + store i8 %77, ptr %75, align 1 + %78 = load ptr, ptr @_llgo_float64, align 8 + %79 = icmp eq ptr %78, null + br i1 %79, label %_llgo_27, label %_llgo_28 _llgo_27: ; preds = %_llgo_26 - %41 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 14) - store ptr %41, ptr @_llgo_float64, align 8 + %80 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 14) + store ptr %80, ptr @_llgo_float64, align 8 br label %_llgo_28 _llgo_28: ; preds = %_llgo_27, %_llgo_26 - %42 = load ptr, ptr @_llgo_int, align 8 - %43 = load ptr, ptr @"[10]_llgo_int", align 8 - %44 = icmp eq ptr %43, null - br i1 %44, label %_llgo_29, label %_llgo_30 + %81 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %80, i32 0, i32 6 + %82 = load i8, ptr %81, align 1 + %83 = or i8 %82, 32 + store i8 %83, ptr %81, align 1 + %84 = load ptr, ptr @_llgo_int, align 8 + %85 = load ptr, ptr @"[10]_llgo_int", align 8 + %86 = icmp eq ptr %85, null + br i1 %86, label %_llgo_29, label %_llgo_30 _llgo_29: ; preds = %_llgo_28 - %45 = call ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64 10, ptr %42) - store ptr %45, ptr @"[10]_llgo_int", align 8 + %87 = call ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64 10, ptr %84) + store ptr %87, ptr @"[10]_llgo_int", align 8 br label %_llgo_30 _llgo_30: ; preds = %_llgo_29, %_llgo_28 - %46 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %47 = icmp eq ptr %46, null - br i1 %47, label %_llgo_31, label %_llgo_32 + %88 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + %89 = icmp eq ptr %88, null + br i1 %89, label %_llgo_31, label %_llgo_32 _llgo_31: ; preds = %_llgo_30 - %48 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - %49 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %50 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %49, i32 0, i32 0 - store ptr %48, ptr %50, align 8 - %51 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %49, i32 0, i32 1 - store i64 0, ptr %51, align 4 - %52 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %49, i32 0, i32 2 - store i64 0, ptr %52, align 4 - %53 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %49, align 8 - %54 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) - %55 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %56 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %55, i32 0, i32 0 - store ptr %54, ptr %56, align 8 - %57 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %55, i32 0, i32 1 - store i64 0, ptr %57, align 4 - %58 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %55, i32 0, i32 2 - store i64 0, ptr %58, align 4 - %59 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %55, align 8 - %60 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %53, %"github.com/goplus/llgo/internal/runtime.Slice" %59, i1 false) - store ptr %60, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + %90 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + %91 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %92 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %91, i32 0, i32 0 + store ptr %90, ptr %92, align 8 + %93 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %91, i32 0, i32 1 + store i64 0, ptr %93, align 4 + %94 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %91, i32 0, i32 2 + store i64 0, ptr %94, align 4 + %95 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %91, align 8 + %96 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0) + %97 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %98 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %97, i32 0, i32 0 + store ptr %96, ptr %98, align 8 + %99 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %97, i32 0, i32 1 + store i64 0, ptr %99, align 4 + %100 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %97, i32 0, i32 2 + store i64 0, ptr %100, align 4 + %101 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %97, align 8 + %102 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %95, %"github.com/goplus/llgo/internal/runtime.Slice" %101, i1 false) + store ptr %102, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 br label %_llgo_32 _llgo_32: ; preds = %_llgo_31, %_llgo_30 - %61 = load ptr, ptr @_llgo_int, align 8 - %62 = load ptr, ptr @"*_llgo_int", align 8 - %63 = icmp eq ptr %62, null - br i1 %63, label %_llgo_33, label %_llgo_34 + %103 = load ptr, ptr @_llgo_int, align 8 + %104 = load ptr, ptr @"*_llgo_int", align 8 + %105 = icmp eq ptr %104, null + br i1 %105, label %_llgo_33, label %_llgo_34 _llgo_33: ; preds = %_llgo_32 - %64 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %61) - store ptr %64, ptr @"*_llgo_int", align 8 + %106 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %103) + store ptr %106, ptr @"*_llgo_int", align 8 br label %_llgo_34 _llgo_34: ; preds = %_llgo_33, %_llgo_32 - %65 = load ptr, ptr @_llgo_int, align 8 - %66 = load ptr, ptr @"[]_llgo_int", align 8 - %67 = icmp eq ptr %66, null - br i1 %67, label %_llgo_35, label %_llgo_36 + %107 = load ptr, ptr @_llgo_int, align 8 + %108 = load ptr, ptr @"[]_llgo_int", align 8 + %109 = icmp eq ptr %108, null + br i1 %109, label %_llgo_35, label %_llgo_36 _llgo_35: ; preds = %_llgo_34 - %68 = call ptr @"github.com/goplus/llgo/internal/runtime.SliceOf"(ptr %65) - store ptr %68, ptr @"[]_llgo_int", align 8 + %110 = call ptr @"github.com/goplus/llgo/internal/runtime.SliceOf"(ptr %107) + store ptr %110, ptr @"[]_llgo_int", align 8 br label %_llgo_36 _llgo_36: ; preds = %_llgo_35, %_llgo_34 - %69 = load ptr, ptr @_llgo_string, align 8 - %70 = icmp eq ptr %69, null - br i1 %70, label %_llgo_37, label %_llgo_38 + %111 = load ptr, ptr @_llgo_string, align 8 + %112 = icmp eq ptr %111, null + br i1 %112, label %_llgo_37, label %_llgo_38 _llgo_37: ; preds = %_llgo_36 - %71 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24) - store ptr %71, ptr @_llgo_string, align 8 + %113 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24) + store ptr %113, ptr @_llgo_string, align 8 br label %_llgo_38 _llgo_38: ; preds = %_llgo_37, %_llgo_36 - %72 = load ptr, ptr @_llgo_int8, align 8 - %73 = load ptr, ptr @_llgo_int, align 8 - %74 = load ptr, ptr @_llgo_int, align 8 - %75 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %76 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %75, i32 0, i32 0 - store ptr @6, ptr %76, align 8 - %77 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %75, i32 0, i32 1 - store i64 1, ptr %77, align 4 - %78 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %75, align 8 - %79 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %80 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %79, i32 0, i32 0 - store ptr @7, ptr %80, align 8 - %81 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %79, i32 0, i32 1 - store i64 0, ptr %81, align 4 - %82 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %79, align 8 - %83 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %78, ptr %72, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %82, i1 false) - %84 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %85 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %84, i32 0, i32 0 - store ptr @8, ptr %85, align 8 - %86 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %84, i32 0, i32 1 - store i64 1, ptr %86, align 4 - %87 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %84, align 8 - %88 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %89 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %88, i32 0, i32 0 - store ptr @9, ptr %89, align 8 - %90 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %88, i32 0, i32 1 - store i64 0, ptr %90, align 4 - %91 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %88, align 8 - %92 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %87, ptr %73, i64 8, %"github.com/goplus/llgo/internal/runtime.String" %91, i1 false) - %93 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %94 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %93, i32 0, i32 0 - store ptr @10, ptr %94, align 8 - %95 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %93, i32 0, i32 1 - store i64 1, ptr %95, align 4 - %96 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %93, align 8 - %97 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %98 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %97, i32 0, i32 0 - store ptr @11, ptr %98, align 8 - %99 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %97, i32 0, i32 1 - store i64 0, ptr %99, align 4 - %100 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %97, align 8 - %101 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %96, ptr %74, i64 16, %"github.com/goplus/llgo/internal/runtime.String" %100, i1 false) - %102 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %103 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %102, i32 0, i32 0 - store ptr @12, ptr %103, align 8 - %104 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %102, i32 0, i32 1 - store i64 4, ptr %104, align 4 - %105 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %102, align 8 - %106 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 168) - %107 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %106, i64 0 - store %"github.com/goplus/llgo/internal/abi.StructField" %83, ptr %107, align 8 - %108 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %106, i64 1 - store %"github.com/goplus/llgo/internal/abi.StructField" %92, ptr %108, align 8 - %109 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %106, i64 2 - store %"github.com/goplus/llgo/internal/abi.StructField" %101, ptr %109, align 8 - %110 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %111 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %110, i32 0, i32 0 - store ptr %106, ptr %111, align 8 - %112 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %110, i32 0, i32 1 - store i64 3, ptr %112, align 4 - %113 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %110, i32 0, i32 2 - store i64 3, ptr %113, align 4 - %114 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %110, align 8 - %115 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %105, i64 24, %"github.com/goplus/llgo/internal/runtime.Slice" %114) - store ptr %115, ptr @"main.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM", align 8 - %116 = load ptr, ptr @_llgo_main.T, align 8 - %117 = icmp eq ptr %116, null - br i1 %117, label %_llgo_39, label %_llgo_40 + %114 = load ptr, ptr @_llgo_int8, align 8 + %115 = load ptr, ptr @_llgo_int, align 8 + %116 = load ptr, ptr @_llgo_int, align 8 + %117 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %118 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %117, i32 0, i32 0 + store ptr @4, ptr %118, align 8 + %119 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %117, i32 0, i32 1 + store i64 1, ptr %119, align 4 + %120 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %117, align 8 + %121 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %122 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %121, i32 0, i32 0 + store ptr null, ptr %122, align 8 + %123 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %121, i32 0, i32 1 + store i64 0, ptr %123, align 4 + %124 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %121, align 8 + %125 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %120, ptr %114, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %124, i1 false) + %126 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %127 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %126, i32 0, i32 0 + store ptr @5, ptr %127, align 8 + %128 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %126, i32 0, i32 1 + store i64 1, ptr %128, align 4 + %129 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %126, align 8 + %130 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %131 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %130, i32 0, i32 0 + store ptr null, ptr %131, align 8 + %132 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %130, i32 0, i32 1 + store i64 0, ptr %132, align 4 + %133 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %130, align 8 + %134 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %129, ptr %115, i64 8, %"github.com/goplus/llgo/internal/runtime.String" %133, i1 false) + %135 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %136 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %135, i32 0, i32 0 + store ptr @6, ptr %136, align 8 + %137 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %135, i32 0, i32 1 + store i64 1, ptr %137, align 4 + %138 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %135, align 8 + %139 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %140 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %139, i32 0, i32 0 + store ptr null, ptr %140, align 8 + %141 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %139, i32 0, i32 1 + store i64 0, ptr %141, align 4 + %142 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %139, align 8 + %143 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %138, ptr %116, i64 16, %"github.com/goplus/llgo/internal/runtime.String" %142, i1 false) + %144 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %145 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %144, i32 0, i32 0 + store ptr @7, ptr %145, align 8 + %146 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %144, i32 0, i32 1 + store i64 4, ptr %146, align 4 + %147 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %144, align 8 + %148 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 168) + %149 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %148, i64 0 + store %"github.com/goplus/llgo/internal/abi.StructField" %125, ptr %149, align 8 + %150 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %148, i64 1 + store %"github.com/goplus/llgo/internal/abi.StructField" %134, ptr %150, align 8 + %151 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %148, i64 2 + store %"github.com/goplus/llgo/internal/abi.StructField" %143, ptr %151, align 8 + %152 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %153 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %152, i32 0, i32 0 + store ptr %148, ptr %153, align 8 + %154 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %152, i32 0, i32 1 + store i64 3, ptr %154, align 4 + %155 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %152, i32 0, i32 2 + store i64 3, ptr %155, align 4 + %156 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %152, align 8 + %157 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" %147, i64 24, %"github.com/goplus/llgo/internal/runtime.Slice" %156) + store ptr %157, ptr @"main.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM", align 8 + %158 = load ptr, ptr @_llgo_main.T, align 8 + %159 = icmp eq ptr %158, null + br i1 %159, label %_llgo_39, label %_llgo_40 _llgo_39: ; preds = %_llgo_38 - %118 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 24, i64 0, i64 1) - store ptr %118, ptr @_llgo_main.T, align 8 + %160 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 24, i64 0, i64 1) + store ptr %160, ptr @_llgo_main.T, align 8 br label %_llgo_40 _llgo_40: ; preds = %_llgo_39, %_llgo_38 - %119 = load ptr, ptr @_llgo_string, align 8 - br i1 %117, label %_llgo_41, label %_llgo_42 + %161 = load ptr, ptr @_llgo_string, align 8 + br i1 %159, label %_llgo_41, label %_llgo_42 _llgo_41: ; preds = %_llgo_40 - %120 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %121 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %120, i32 0, i32 0 - store ptr @14, ptr %121, align 8 - %122 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %120, i32 0, i32 1 - store i64 6, ptr %122, align 4 - %123 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %120, align 8 - %124 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %125 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 - %126 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %125, i32 0, i32 0 - store %"github.com/goplus/llgo/internal/runtime.String" %123, ptr %126, align 8 - %127 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %125, i32 0, i32 1 - store ptr %124, ptr %127, align 8 - %128 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %125, i32 0, i32 2 - store ptr @"main.(*T).Invoke", ptr %128, align 8 - %129 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %125, i32 0, i32 3 - store ptr @"main.(*T).Invoke", ptr %129, align 8 - %130 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %125, align 8 - %131 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) - %132 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %131, i64 0 - store %"github.com/goplus/llgo/internal/abi.Method" %130, ptr %132, align 8 - %133 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 - %134 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %133, i32 0, i32 0 - store ptr %131, ptr %134, align 8 - %135 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %133, i32 0, i32 1 - store i64 1, ptr %135, align 4 - %136 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %133, i32 0, i32 2 - store i64 1, ptr %136, align 4 - %137 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %133, align 8 - %138 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %139 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %138, i32 0, i32 0 - store ptr @15, ptr %139, align 8 - %140 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %138, i32 0, i32 1 - store i64 4, ptr %140, align 4 - %141 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %138, align 8 - %142 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 - %143 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %142, i32 0, i32 0 - store ptr @16, ptr %143, align 8 - %144 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %142, i32 0, i32 1 - store i64 6, ptr %144, align 4 - %145 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %142, align 8 - call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %118, %"github.com/goplus/llgo/internal/runtime.String" %141, %"github.com/goplus/llgo/internal/runtime.String" %145, ptr %119, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %137) + %162 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %163 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %162, i32 0, i32 0 + store ptr @8, ptr %163, align 8 + %164 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %162, i32 0, i32 1 + store i64 6, ptr %164, align 4 + %165 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %162, align 8 + %166 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + %167 = alloca %"github.com/goplus/llgo/internal/abi.Method", align 8 + %168 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %167, i32 0, i32 0 + store %"github.com/goplus/llgo/internal/runtime.String" %165, ptr %168, align 8 + %169 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %167, i32 0, i32 1 + store ptr %166, ptr %169, align 8 + %170 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %167, i32 0, i32 2 + store ptr @"main.(*T).Invoke", ptr %170, align 8 + %171 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Method", ptr %167, i32 0, i32 3 + store ptr @"main.(*T).Invoke", ptr %171, align 8 + %172 = load %"github.com/goplus/llgo/internal/abi.Method", ptr %167, align 8 + %173 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40) + %174 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %173, i64 0 + store %"github.com/goplus/llgo/internal/abi.Method" %172, ptr %174, align 8 + %175 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8 + %176 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %175, i32 0, i32 0 + store ptr %173, ptr %176, align 8 + %177 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %175, i32 0, i32 1 + store i64 1, ptr %177, align 4 + %178 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %175, i32 0, i32 2 + store i64 1, ptr %178, align 4 + %179 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %175, align 8 + %180 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %181 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %180, i32 0, i32 0 + store ptr @7, ptr %181, align 8 + %182 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %180, i32 0, i32 1 + store i64 4, ptr %182, align 4 + %183 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %180, align 8 + %184 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 + %185 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %184, i32 0, i32 0 + store ptr @9, ptr %185, align 8 + %186 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %184, i32 0, i32 1 + store i64 6, ptr %186, align 4 + %187 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %184, align 8 + call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %160, %"github.com/goplus/llgo/internal/runtime.String" %183, %"github.com/goplus/llgo/internal/runtime.String" %187, ptr %161, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %179) br label %_llgo_42 _llgo_42: ; preds = %_llgo_41, %_llgo_40 diff --git a/cl/_testrt/index/out.ll b/cl/_testrt/index/out.ll index e0b1b506..f93bb271 100644 --- a/cl/_testrt/index/out.ll +++ b/cl/_testrt/index/out.ll @@ -12,9 +12,8 @@ source_filename = "main" @2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @3 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @4 = private unnamed_addr constant [4 x i8] c"%c\0A\00", align 1 -@5 = private unnamed_addr constant [7 x i8] c"123456\00", align 1 +@5 = private unnamed_addr constant [6 x i8] c"123456", align 1 @6 = private unnamed_addr constant [4 x i8] c"%c\0A\00", align 1 -@7 = private unnamed_addr constant [7 x i8] c"123456\00", align 1 define void @main.init() { _llgo_0: @@ -130,7 +129,7 @@ _llgo_0: %70 = call i32 (ptr, ...) @printf(ptr @4, i8 %69) %71 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8 %72 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %71, i32 0, i32 0 - store ptr @7, ptr %72, align 8 + store ptr @5, ptr %72, align 8 %73 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %71, i32 0, i32 1 store i64 6, ptr %73, align 4 %74 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %71, align 8 diff --git a/cl/_testrt/linkname/out.ll b/cl/_testrt/linkname/out.ll index 65612d87..fc89222a 100644 --- a/cl/_testrt/linkname/out.ll +++ b/cl/_testrt/linkname/out.ll @@ -15,7 +15,7 @@ source_filename = "main" @5 = private unnamed_addr constant [2 x i8] c"2\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"3\00", align 1 @7 = private unnamed_addr constant [2 x i8] c"4\00", align 1 -@8 = private unnamed_addr constant [6 x i8] c"hello\00", align 1 +@8 = private unnamed_addr constant [5 x i8] c"hello", align 1 declare %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/cl/internal/linktarget.m.info"(%main.m) diff --git a/cl/_testrt/panic/out.ll b/cl/_testrt/panic/out.ll index 4cbb32ee..881403c4 100644 --- a/cl/_testrt/panic/out.ll +++ b/cl/_testrt/panic/out.ll @@ -7,7 +7,7 @@ source_filename = "main" @"main.init$guard" = global ptr null @__llgo_argc = global ptr null @__llgo_argv = global ptr null -@0 = private unnamed_addr constant [14 x i8] c"panic message\00", align 1 +@0 = private unnamed_addr constant [13 x i8] c"panic message", align 1 @_llgo_string = linkonce global ptr null define void @main.init() { diff --git a/internal/runtime/z_face.go b/internal/runtime/z_face.go index 2da98913..287aa8d1 100644 --- a/internal/runtime/z_face.go +++ b/internal/runtime/z_face.go @@ -338,7 +338,7 @@ func EfaceEqual(v, u eface) bool { if v._type != u._type { return false } - if v._type.Kind_&abi.KindDirectIface != 0 { + if isDirectIface(v._type) { return v.data == u.data } switch v.Kind() { @@ -369,7 +369,11 @@ func EfaceEqual(v, u eface) bool { case abi.Struct: st := v._type.StructType() field := func(data unsafe.Pointer, ft *abi.StructField) eface { - return eface{ft.Typ, c.Advance(data, int(ft.Offset))} + ptr := c.Advance(data, int(ft.Offset)) + if isDirectIface(ft.Typ) { + ptr = *(*unsafe.Pointer)(ptr) + } + return eface{ft.Typ, ptr} } for _, ft := range st.Fields { if !EfaceEqual(field(v.data, &ft), field(u.data, &ft)) { @@ -405,7 +409,7 @@ func (v eface) Elem() eface { return *(*eface)(unsafe.Pointer(&i)) case abi.Pointer: ptr := v.data - if v._type.Kind_&abi.KindDirectIface != 0 { + if isDirectIface(v._type) { ptr = *(*unsafe.Pointer)(ptr) } if ptr == nil { @@ -416,4 +420,8 @@ func (v eface) Elem() eface { panic("invalid eface elem") } +func isDirectIface(t *_type) bool { + return t.Kind_&abi.KindDirectIface != 0 +} + // ----------------------------------------------------------------------------- diff --git a/ssa/abitype.go b/ssa/abitype.go index 36c14489..a18aadce 100644 --- a/ssa/abitype.go +++ b/ssa/abitype.go @@ -317,6 +317,15 @@ func (p Package) abiTypeInit(g Global, t types.Type, pub bool) { b.SetBlockEx(blks[1], AtEnd, false) b.blk.last = blks[1].last } + prog := p.Prog + kind, _, _ := abi.DataKindOf(t, 0, prog.is32Bits) + if kind == abi.Integer || kind == abi.BitCast { + // abi.Type.Kind_ |= abi.KindDirectIface + const kindDirectIface = 1 << 5 + pkind := b.FieldAddr(vexpr, 6) + b.Store(pkind, b.BinOp(token.OR, b.Load(pkind), Expr{prog.IntVal(kindDirectIface, prog.Byte()).impl, prog.Byte()})) + } + if t, ok := t.(*types.Named); ok { // skip interface if _, ok := t.Underlying().(*types.Interface); ok { diff --git a/ssa/expr.go b/ssa/expr.go index f41ff644..7c0c3155 100644 --- a/ssa/expr.go +++ b/ssa/expr.go @@ -209,13 +209,34 @@ func (b Builder) CStr(v string) Expr { } // Str returns a Go string constant expression. -func (b Builder) Str(v string) (ret Expr) { +func (b Builder) Str(v string) Expr { prog := b.Prog - data := llvm.CreateGlobalStringPtr(b.impl, v) + data := b.createGlobalStr(v) size := llvm.ConstInt(prog.tyInt(), uint64(len(v)), false) return Expr{aggregateValue(b.impl, prog.rtString(), data, size), prog.String()} } +func (b Builder) createGlobalStr(v string) (ret llvm.Value) { + if ret, ok := b.Pkg.strs[v]; ok { + return ret + } + prog := b.Prog + if v != "" { + typ := llvm.ArrayType(prog.tyInt8(), len(v)) + global := llvm.AddGlobal(b.Pkg.mod, typ, "") + global.SetInitializer(b.Prog.ctx.ConstString(v, false)) + global.SetLinkage(llvm.PrivateLinkage) + global.SetGlobalConstant(true) + global.SetUnnamedAddr(true) + global.SetAlignment(1) + ret = llvm.ConstInBoundsGEP(typ, global, []llvm.Value{prog.Val(0).impl}) + } else { + ret = llvm.ConstNull(prog.CStr().ll) + } + b.Pkg.strs[v] = ret + return +} + // unsafeString(data *byte, size int) string func (b Builder) unsafeString(data, size llvm.Value) Expr { prog := b.Prog @@ -384,7 +405,8 @@ func (b Builder) BinOp(op token.Token, x, y Expr) Expr { return Expr{llvm.CreateBinOp(b.impl, llop, x.impl, y.impl), x.Type} } case isPredOp(op): // op: == != < <= < >= - tret := b.Prog.Bool() + prog := b.Prog + tret := prog.Bool() kind := x.kind switch kind { case vkSigned: @@ -420,8 +442,59 @@ func (b Builder) BinOp(op token.Token, x, y Expr) Expr { ret.impl = llvm.CreateNot(b.impl, ret.impl) return ret } + case vkClosure: + x = b.Field(x, 0) + y = b.Field(y, 0) + fallthrough + case vkFuncPtr, vkFuncDecl: + switch op { + case token.EQL: + return Expr{llvm.CreateICmp(b.impl, llvm.IntEQ, x.impl, y.impl), tret} + case token.NEQ: + return Expr{llvm.CreateICmp(b.impl, llvm.IntNE, x.impl, y.impl), tret} + } + case vkArray: + typ := x.raw.Type.(*types.Array) + elem := b.Prog.Elem(x.Type) + ret := prog.BoolVal(true) + for i, n := 0, int(typ.Len()); i < n; i++ { + fx := b.impl.CreateExtractValue(x.impl, i, "") + fy := b.impl.CreateExtractValue(y.impl, i, "") + r := b.BinOp(token.EQL, Expr{fx, elem}, Expr{fy, elem}) + ret = Expr{b.impl.CreateAnd(ret.impl, r.impl, ""), tret} + } + switch op { + case token.EQL: + return ret + case token.NEQ: + return Expr{b.impl.CreateNot(ret.impl, ""), tret} + } + case vkStruct: + typ := x.raw.Type.Underlying().(*types.Struct) + ret := prog.BoolVal(true) + for i, n := 0, typ.NumFields(); i < n; i++ { + ft := prog.Type(typ.Field(i).Type(), InGo) + fx := b.impl.CreateExtractValue(x.impl, i, "") + fy := b.impl.CreateExtractValue(y.impl, i, "") + r := b.BinOp(token.EQL, Expr{fx, ft}, Expr{fy, ft}) + ret = Expr{b.impl.CreateAnd(ret.impl, r.impl, ""), tret} + } + switch op { + case token.EQL: + return ret + case token.NEQ: + return Expr{b.impl.CreateNot(ret.impl, ""), tret} + } + case vkSlice: + dx := b.impl.CreateExtractValue(x.impl, 0, "") + dy := b.impl.CreateExtractValue(y.impl, 0, "") + switch op { + case token.EQL: + return Expr{b.impl.CreateICmp(llvm.IntEQ, dx, dy, ""), tret} + case token.NEQ: + return Expr{b.impl.CreateICmp(llvm.IntNE, dx, dy, ""), tret} + } case vkIface, vkEface: - prog := b.Prog toEface := func(x Expr, emtpy bool) Expr { if emtpy { return x diff --git a/ssa/package.go b/ssa/package.go index 253e8195..9ef00f79 100644 --- a/ssa/package.go +++ b/ssa/package.go @@ -294,12 +294,13 @@ func (p Program) NewPackage(name, pkgPath string) Package { stubs := make(map[string]Function) pyobjs := make(map[string]PyObjRef) pymods := make(map[string]Global) + strs := make(map[string]llvm.Value) p.NeedRuntime = false // Don't need reset p.needPyInit here // p.needPyInit = false ret := &aPackage{ mod: mod, vars: gbls, fns: fns, stubs: stubs, - pyobjs: pyobjs, pymods: pymods, Prog: p} + pyobjs: pyobjs, pymods: pymods, strs: strs, Prog: p} ret.abi.Init(pkgPath) return ret } @@ -544,6 +545,7 @@ type aPackage struct { stubs map[string]Function pyobjs map[string]PyObjRef pymods map[string]Global + strs map[string]llvm.Value afterb unsafe.Pointer iRoutine int From ec1cca7ca4bf2ceb44151fd16884e245c3988c61 Mon Sep 17 00:00:00 2001 From: visualfc Date: Fri, 14 Jun 2024 09:57:23 +0800 Subject: [PATCH 2/2] ssa: global use elem type --- c/sqlite/llgo_autogen.lla | Bin 850 -> 854 bytes cl/_testdata/apkg/out.ll | 2 +- cl/_testdata/fncall/out.ll | 6 +- cl/_testdata/importpkg/out.ll | 8 +-- cl/_testdata/method/out.ll | 8 +-- cl/_testdata/print/out.ll | 38 +++++------ cl/_testdata/printf/out.ll | 8 +-- cl/_testdata/printval/out.ll | 8 +-- cl/_testdata/ptrmthd/out.ll | 8 +-- cl/_testdata/uint/out.ll | 6 +- cl/_testdata/untyped/out.ll | 8 +-- cl/_testdata/utf8/out.ll | 8 +-- cl/_testdata/vargs/out.ll | 10 +-- cl/_testdata/varinit/out.ll | 8 +-- cl/_testgo/equal/out.ll | 20 +++--- cl/_testgo/errors/out.ll | 18 +++--- cl/_testgo/goroutine/out.ll | 6 +- cl/_testgo/ifaceconv/out.ll | 26 ++++---- cl/_testgo/ifaceprom/out.ll | 22 +++---- cl/_testgo/interface/out.ll | 28 ++++---- cl/_testgo/invoke/out.ll | 44 ++++++------- cl/_testgo/print/out.ll | 6 +- cl/_testgo/reader/out.ll | 82 ++++++++++++------------ cl/_testgo/strucintf/out.ll | 12 ++-- cl/_testgo/struczero/out.ll | 22 +++---- cl/_testlibc/argv/out.ll | 6 +- cl/_testlibc/sqlite/out.ll | 6 +- cl/_testlibgo/mathbits/out.ll | 6 +- cl/_testpy/callpy/out.ll | 14 ++-- cl/_testpy/gcd/out.ll | 10 +-- cl/_testpy/math/out.ll | 4 +- cl/_testpy/matrix/out.ll | 10 +-- cl/_testpy/max/out.ll | 14 ++-- cl/_testpy/pi/out.ll | 8 +-- cl/_testpy/pow/out.ll | 10 +-- cl/_testrt/alloca/out.ll | 6 +- cl/_testrt/allocstr/out.ll | 6 +- cl/_testrt/any/out.ll | 14 ++-- cl/_testrt/builtin/out.ll | 14 ++-- cl/_testrt/callback/out.ll | 6 +- cl/_testrt/cast/out.ll | 8 +-- cl/_testrt/closure/out.ll | 6 +- cl/_testrt/concat/out.ll | 6 +- cl/_testrt/cstr/out.ll | 6 +- cl/_testrt/cvar/out.ll | 10 +-- cl/_testrt/eface/out.ll | 48 +++++++------- cl/_testrt/fprintf/out.ll | 8 +-- cl/_testrt/gblarray/out.ll | 10 +-- cl/_testrt/hello/out.ll | 8 +-- cl/_testrt/index/out.ll | 6 +- cl/_testrt/intgen/out.ll | 6 +- cl/_testrt/linkname/out.ll | 6 +- cl/_testrt/map/out.ll | 6 +- cl/_testrt/mask/out.ll | 6 +- cl/_testrt/named/out.ll | 6 +- cl/_testrt/panic/out.ll | 8 +-- cl/_testrt/qsort/out.ll | 6 +- cl/_testrt/result/out.ll | 6 +- cl/_testrt/strlen/out.ll | 8 +-- cl/_testrt/struct/out.ll | 8 +-- cl/_testrt/sum/out.ll | 6 +- cl/_testrt/typalias/out.ll | 8 +-- cl/_testrt/unreachable/out.ll | 6 +- cl/compile.go | 6 +- cl/compile_test.go | 6 +- internal/runtime/bdwgc/llgo_autogen.lla | Bin 409 -> 414 bytes py/inspect/llgo_autogen.lla | Bin 576 -> 559 bytes py/json/llgo_autogen.lla | Bin 548 -> 558 bytes py/llgo_autogen.lla | Bin 1635 -> 1639 bytes py/math/llgo_autogen.lla | Bin 547 -> 558 bytes py/matplotlib/llgo_autogen.lla | Bin 553 -> 562 bytes py/numpy/llgo_autogen.lla | Bin 546 -> 557 bytes py/os/llgo_autogen.lla | Bin 543 -> 554 bytes py/pandas/llgo_autogen.lla | Bin 547 -> 558 bytes py/statistics/llgo_autogen.lla | Bin 552 -> 561 bytes py/std/llgo_autogen.lla | Bin 549 -> 559 bytes py/sys/llgo_autogen.lla | Bin 546 -> 556 bytes py/torch/llgo_autogen.lla | Bin 547 -> 557 bytes ssa/abitype.go | 2 +- ssa/decl.go | 25 +++----- ssa/eh.go | 3 +- ssa/python.go | 4 +- ssa/ssa_test.go | 25 ++++---- 83 files changed, 407 insertions(+), 412 deletions(-) diff --git a/c/sqlite/llgo_autogen.lla b/c/sqlite/llgo_autogen.lla index 93b7c3ad89c466cb889cea4ee81c084e1de2f389..ffb75f469ff7e8036085769e52f3f9478baa0b86 100644 GIT binary patch delta 801 zcmV++1K#}72G$0DP)h>@6aWAK2mpai&RDuJ$wZ<8003nV000jF8~|)=XK!C&b#!lM zWo|BPY*kbV00Uy6Yi4AiYi4zL3jhHG^#K3?1QY-O0PUB{j+-zTh4(y#g^C77QNk?= zGowna)GoTHT4|&%x`_xl)RJRUW1?20dH32F2#^~|XjYSd4MhAmpYz2rPv9$!a}2+H z0`I|Hg7~j|IgaRhlF$_A*#zT+PNGTn8zTb_@iS+LB)TZe|E3VUfRwWlKr3b;Vg_w!7iK9t~?!}mh{D# z$t_raJdKLYSCr;dnjjy|_p+BNx!dgdrQ5SDVhsj^AsGzLXK;Qi2Adni8-+KZaAy;I z15ttKT?=CMU#djv0_hJ02hwW;Io(>{lGLxIl{FuB!SpW% z^Wl6jgPve+D2jUkDUav6*@ecg56j=F*s-8;A0O519nEMQK{^?I()Rc2m+5sgJL&%bP)h*<9s?8r000O8flbZ| fSh_LEM4|!!0A-Q`DFb4lYm+PkAO`CK0000033O*Y delta 780 zcmV+n1M~dW2GRz9P)h>@6aWAK2mr=;#aP9$vD$ZnP%7)c-0m%a$(y$LacB+s^Z=P7DY{wBuZE!jzO-nUG1$#TFoz_-g-cON+CIfa|5HdAfGU% z(NEo!5(HLj9*L@+hlU79ogaknweh^UlyIMHwY! zrZ)n1nd2Nvk^$h;7*#}cO7<=z{Ldw(zYi?!RP-`fHu3rx4= z@XnTFdb%9`|B=JIeO6ppQenhsD)>SD~~<`s9N zV&{r~(ws^W7u(=@KU3di-ZY{xgBPt_$ zmm0D9FI6OU4e1YM$bn2`S0)vFn3#x#&(h-dA*DNSsS1Y7`vfa0xLmR2#SR+0n}W&OPY; zdH_PoI1^aQDw4~LQwC*E;R$#-_%`YarF#iVL1_c86jExXq>Hd{=Dw#9s}pg~kGWA} z=QBdV*rA|ukB@5a9n5GPK{^?I(sq;K0u~L%dBs@T=XkQ70ssJ9lLP}P149sClQ07y K2Im3*0000TtX*UP diff --git a/cl/_testdata/apkg/out.ll b/cl/_testdata/apkg/out.ll index 3e1aab2d..165eea6c 100644 --- a/cl/_testdata/apkg/out.ll +++ b/cl/_testdata/apkg/out.ll @@ -1,7 +1,7 @@ ; ModuleID = 'apkg' source_filename = "apkg" -@"apkg.init$guard" = global ptr null +@"apkg.init$guard" = global i1 false, align 1 define double @apkg.Max(double %0, double %1) { _llgo_0: diff --git a/cl/_testdata/fncall/out.ll b/cl/_testdata/fncall/out.ll index 180fd4cb..a432973a 100644 --- a/cl/_testdata/fncall/out.ll +++ b/cl/_testdata/fncall/out.ll @@ -1,9 +1,9 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define void @main.init() { _llgo_0: diff --git a/cl/_testdata/importpkg/out.ll b/cl/_testdata/importpkg/out.ll index 7097b520..05dfeefb 100644 --- a/cl/_testdata/importpkg/out.ll +++ b/cl/_testdata/importpkg/out.ll @@ -1,10 +1,10 @@ ; ModuleID = 'main' source_filename = "main" -@main.hello = global [7 x i8] undef -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@main.hello = global [7 x i8] zeroinitializer, align 1 +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define void @main.init() { _llgo_0: diff --git a/cl/_testdata/method/out.ll b/cl/_testdata/method/out.ll index b353e46d..40cd03aa 100644 --- a/cl/_testdata/method/out.ll +++ b/cl/_testdata/method/out.ll @@ -1,10 +1,10 @@ ; ModuleID = 'main' source_filename = "main" -@main.format = global [10 x i8] undef -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@main.format = global [10 x i8] zeroinitializer, align 1 +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define i64 @main.T.Add(i64 %0, i64 %1) { _llgo_0: diff --git a/cl/_testdata/print/out.ll b/cl/_testdata/print/out.ll index b2c17ed3..4b0fa01c 100644 --- a/cl/_testdata/print/out.ll +++ b/cl/_testdata/print/out.ll @@ -8,29 +8,29 @@ source_filename = "main" %"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr } -@"main.init$guard" = global ptr null -@main.minhexdigits = global ptr null +@"main.init$guard" = global i1 false, align 1 +@main.minhexdigits = global i64 0, align 8 @0 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @1 = private unnamed_addr constant [4 x i8] c"llgo", align 1 -@_llgo_float32 = linkonce global ptr null -@_llgo_float64 = linkonce global ptr null +@_llgo_float32 = linkonce global ptr null, align 8 +@_llgo_float64 = linkonce global ptr null, align 8 @2 = private unnamed_addr constant [10 x i8] c"check bool", align 1 -@_llgo_string = linkonce global ptr null -@_llgo_bool = linkonce global ptr null +@_llgo_string = linkonce global ptr null, align 8 +@_llgo_bool = linkonce global ptr null, align 8 @3 = private unnamed_addr constant [8 x i8] c"check &^", align 1 -@_llgo_int32 = linkonce global ptr null -@_llgo_int8 = linkonce global ptr null -@_llgo_int16 = linkonce global ptr null -@_llgo_int64 = linkonce global ptr null -@_llgo_int = linkonce global ptr null -@_llgo_uint8 = linkonce global ptr null -@_llgo_uint16 = linkonce global ptr null -@_llgo_uint32 = linkonce global ptr null -@_llgo_uint64 = linkonce global ptr null -@_llgo_uintptr = linkonce global ptr null -@_llgo_uint = linkonce global ptr null +@_llgo_int32 = linkonce global ptr null, align 8 +@_llgo_int8 = linkonce global ptr null, align 8 +@_llgo_int16 = linkonce global ptr null, align 8 +@_llgo_int64 = linkonce global ptr null, align 8 +@_llgo_int = linkonce global ptr null, align 8 +@_llgo_uint8 = linkonce global ptr null, align 8 +@_llgo_uint16 = linkonce global ptr null, align 8 +@_llgo_uint32 = linkonce global ptr null, align 8 +@_llgo_uint64 = linkonce global ptr null, align 8 +@_llgo_uintptr = linkonce global ptr null, align 8 +@_llgo_uint = linkonce global ptr null, align 8 @4 = private unnamed_addr constant [4 x i8] c"true", align 1 @5 = private unnamed_addr constant [5 x i8] c"false", align 1 @6 = private unnamed_addr constant [3 x i8] c"NaN", align 1 diff --git a/cl/_testdata/printf/out.ll b/cl/_testdata/printf/out.ll index fd92dcbe..1271af05 100644 --- a/cl/_testdata/printf/out.ll +++ b/cl/_testdata/printf/out.ll @@ -1,10 +1,10 @@ ; ModuleID = 'main' source_filename = "main" -@main.hello = global [7 x i8] undef -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@main.hello = global [7 x i8] zeroinitializer, align 1 +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define void @main.init() { _llgo_0: diff --git a/cl/_testdata/printval/out.ll b/cl/_testdata/printval/out.ll index 28677659..a9a9199c 100644 --- a/cl/_testdata/printval/out.ll +++ b/cl/_testdata/printval/out.ll @@ -1,10 +1,10 @@ ; ModuleID = 'main' source_filename = "main" -@main.format = global [10 x i8] undef -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@main.format = global [10 x i8] zeroinitializer, align 1 +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define void @main.init() { _llgo_0: diff --git a/cl/_testdata/ptrmthd/out.ll b/cl/_testdata/ptrmthd/out.ll index fc9c4ce5..669165c3 100644 --- a/cl/_testdata/ptrmthd/out.ll +++ b/cl/_testdata/ptrmthd/out.ll @@ -1,10 +1,10 @@ ; ModuleID = 'main' source_filename = "main" -@main.format = global [10 x i8] undef -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@main.format = global [10 x i8] zeroinitializer, align 1 +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define void @"main.(*T).Print"(ptr %0, i64 %1) { _llgo_0: diff --git a/cl/_testdata/uint/out.ll b/cl/_testdata/uint/out.ll index 0dde97f7..852fa7da 100644 --- a/cl/_testdata/uint/out.ll +++ b/cl/_testdata/uint/out.ll @@ -1,9 +1,9 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [11 x i8] c"Hello, %u\0A\00", align 1 define i32 @main.f(i32 %0) { diff --git a/cl/_testdata/untyped/out.ll b/cl/_testdata/untyped/out.ll index c64ab15b..e1e480bb 100644 --- a/cl/_testdata/untyped/out.ll +++ b/cl/_testdata/untyped/out.ll @@ -1,10 +1,10 @@ ; ModuleID = 'main' source_filename = "main" -@main.a = global ptr null -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@main.a = global double 0.000000e+00, align 8 +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define void @main.init() { _llgo_0: diff --git a/cl/_testdata/utf8/out.ll b/cl/_testdata/utf8/out.ll index a8fe27ab..7a7deb06 100644 --- a/cl/_testdata/utf8/out.ll +++ b/cl/_testdata/utf8/out.ll @@ -3,10 +3,10 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } -@main.array = global [8 x i8] undef -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@main.array = global [8 x i8] zeroinitializer, align 1 +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [7 x i8] c"\E4\B8\ADabcd", align 1 define i8 @main.index(i8 %0) { diff --git a/cl/_testdata/vargs/out.ll b/cl/_testdata/vargs/out.ll index a5623c91..cc9162e5 100644 --- a/cl/_testdata/vargs/out.ll +++ b/cl/_testdata/vargs/out.ll @@ -6,13 +6,13 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 } -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null -@_llgo_int = linkonce global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 +@_llgo_int = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @1 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1 -@_llgo_string = linkonce global ptr null +@_llgo_string = linkonce global ptr null, align 8 define void @main.init() { _llgo_0: diff --git a/cl/_testdata/varinit/out.ll b/cl/_testdata/varinit/out.ll index bd98b63c..cfe2f593 100644 --- a/cl/_testdata/varinit/out.ll +++ b/cl/_testdata/varinit/out.ll @@ -1,10 +1,10 @@ ; ModuleID = 'main' source_filename = "main" -@main.a = global ptr null -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@main.a = global i64 0, align 8 +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define void @main.init() { _llgo_0: diff --git a/cl/_testgo/equal/out.ll b/cl/_testgo/equal/out.ll index afa3ea1d..fec88027 100644 --- a/cl/_testgo/equal/out.ll +++ b/cl/_testgo/equal/out.ll @@ -9,26 +9,26 @@ source_filename = "main" %main.N = type {} %"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 } -@"main.init$guard" = global ptr null +@"main.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [6 x i8] c"failed", align 1 -@_llgo_string = linkonce global ptr null +@_llgo_string = linkonce global ptr null, align 8 @1 = private unnamed_addr constant [5 x i8] c"hello", align 1 -@_llgo_int = linkonce global ptr null +@_llgo_int = linkonce global ptr null, align 8 @2 = private unnamed_addr constant [2 x i8] c"ok", align 1 -@"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null +@"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8 @3 = private unnamed_addr constant [4 x i8] c"main", align 1 -@_llgo_main.T = linkonce global ptr null -@"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk" = linkonce global ptr null -@_llgo_any = linkonce global ptr null +@_llgo_main.T = linkonce global ptr null, align 8 +@"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk" = linkonce global ptr null, align 8 +@_llgo_any = linkonce global ptr null, align 8 @4 = private unnamed_addr constant [1 x i8] c"X", align 1 @5 = private unnamed_addr constant [1 x i8] c"Y", align 1 @6 = private unnamed_addr constant [1 x i8] c"Z", align 1 @7 = private unnamed_addr constant [1 x i8] c"V", align 1 @8 = private unnamed_addr constant [6 x i8] c"main.T", align 1 -@_llgo_main.N = linkonce global ptr null +@_llgo_main.N = linkonce global ptr null, align 8 @9 = private unnamed_addr constant [6 x i8] c"main.N", align 1 -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define void @main.assert(i1 %0) { _llgo_0: diff --git a/cl/_testgo/errors/out.ll b/cl/_testgo/errors/out.ll index 7c0762a2..529954fe 100644 --- a/cl/_testgo/errors/out.ll +++ b/cl/_testgo/errors/out.ll @@ -9,19 +9,19 @@ source_filename = "main" %"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr } %"github.com/goplus/llgo/internal/abi.Imethod" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr } -@"main.init$guard" = global ptr null -@"*_llgo_main.errorString" = global ptr null -@_llgo_main.errorString = global ptr null -@"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = global ptr null -@_llgo_string = linkonce global ptr null +@"main.init$guard" = global i1 false, align 1 +@"*_llgo_main.errorString" = global ptr null, align 8 +@_llgo_main.errorString = global ptr null, align 8 +@"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = global ptr null, align 8 +@_llgo_string = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [1 x i8] c"s", align 1 @1 = private unnamed_addr constant [4 x i8] c"main", align 1 @2 = private unnamed_addr constant [5 x i8] c"Error", align 1 -@"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null +@"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null, align 8 @3 = private unnamed_addr constant [16 x i8] c"main.errorString", align 1 -@"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU" = linkonce global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU" = linkonce global ptr null, align 8 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @4 = private unnamed_addr constant [8 x i8] c"an error", align 1 define %"github.com/goplus/llgo/internal/runtime.iface" @main.New(%"github.com/goplus/llgo/internal/runtime.String" %0) { diff --git a/cl/_testgo/goroutine/out.ll b/cl/_testgo/goroutine/out.ll index 3e5142a8..87077df0 100644 --- a/cl/_testgo/goroutine/out.ll +++ b/cl/_testgo/goroutine/out.ll @@ -3,9 +3,9 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [16 x i8] c"Hello, goroutine", align 1 @1 = private unnamed_addr constant [1 x i8] c".", align 1 diff --git a/cl/_testgo/ifaceconv/out.ll b/cl/_testgo/ifaceconv/out.ll index d85c6dd2..6cc58f93 100644 --- a/cl/_testgo/ifaceconv/out.ll +++ b/cl/_testgo/ifaceconv/out.ll @@ -11,33 +11,33 @@ source_filename = "main" %"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr } %"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 } -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null -@_llgo_main.I0 = linkonce global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 +@_llgo_main.I0 = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [4 x i8] c"main", align 1 @1 = private unnamed_addr constant [7 x i8] c"main.I0", align 1 @2 = private unnamed_addr constant [21 x i8] c"nil i0.(I0) succeeded", align 1 -@_llgo_string = linkonce global ptr null -@_llgo_main.I1 = linkonce global ptr null -@"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null +@_llgo_string = linkonce global ptr null, align 8 +@_llgo_main.I1 = linkonce global ptr null, align 8 +@"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8 @3 = private unnamed_addr constant [6 x i8] c"main.f", align 1 @4 = private unnamed_addr constant [7 x i8] c"main.I1", align 1 -@"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4" = global ptr null +@"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4" = global ptr null, align 8 @5 = private unnamed_addr constant [21 x i8] c"nil i1.(I1) succeeded", align 1 -@_llgo_main.I2 = linkonce global ptr null +@_llgo_main.I2 = linkonce global ptr null, align 8 @6 = private unnamed_addr constant [6 x i8] c"main.g", align 1 @7 = private unnamed_addr constant [7 x i8] c"main.I2", align 1 -@"main.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw" = global ptr null +@"main.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw" = global ptr null, align 8 @8 = private unnamed_addr constant [21 x i8] c"nil i2.(I2) succeeded", align 1 -@_llgo_main.C1 = linkonce global ptr null -@"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null +@_llgo_main.C1 = linkonce global ptr null, align 8 +@"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8 @9 = private unnamed_addr constant [1 x i8] c"f", align 1 @10 = private unnamed_addr constant [7 x i8] c"main.C1", align 1 @11 = private unnamed_addr constant [17 x i8] c"C1 i1.(I0) failed", align 1 @12 = private unnamed_addr constant [17 x i8] c"C1 i1.(I1) failed", align 1 @13 = private unnamed_addr constant [20 x i8] c"C1 i1.(I2) succeeded", align 1 -@_llgo_main.C2 = linkonce global ptr null +@_llgo_main.C2 = linkonce global ptr null, align 8 @14 = private unnamed_addr constant [1 x i8] c"g", align 1 @15 = private unnamed_addr constant [7 x i8] c"main.C2", align 1 @16 = private unnamed_addr constant [17 x i8] c"C2 i1.(I0) failed", align 1 diff --git a/cl/_testgo/ifaceprom/out.ll b/cl/_testgo/ifaceprom/out.ll index 68bdad92..9dac6e6a 100644 --- a/cl/_testgo/ifaceprom/out.ll +++ b/cl/_testgo/ifaceprom/out.ll @@ -12,23 +12,23 @@ source_filename = "main" %"github.com/goplus/llgo/internal/abi.Imethod" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 } -@"main.init$guard" = global ptr null +@"main.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [3 x i8] c"two", align 1 -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null -@_llgo_main.impl = global ptr null -@"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 +@_llgo_main.impl = global ptr null, align 8 +@"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8 @1 = private unnamed_addr constant [4 x i8] c"main", align 1 @2 = private unnamed_addr constant [3 x i8] c"one", align 1 @3 = private unnamed_addr constant [8 x i8] c"main.one", align 1 -@"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA" = linkonce global ptr null -@_llgo_int = linkonce global ptr null +@"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA" = linkonce global ptr null, align 8 +@_llgo_int = linkonce global ptr null, align 8 @4 = private unnamed_addr constant [8 x i8] c"main.two", align 1 -@"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null -@_llgo_string = linkonce global ptr null +@"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null, align 8 +@_llgo_string = linkonce global ptr null, align 8 @5 = private unnamed_addr constant [9 x i8] c"main.impl", align 1 -@"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA" = global ptr null -@_llgo_main.I = linkonce global ptr null +@"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA" = global ptr null, align 8 +@_llgo_main.I = linkonce global ptr null, align 8 @6 = private unnamed_addr constant [6 x i8] c"main.I", align 1 @7 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1 @8 = private unnamed_addr constant [4 x i8] c"pass", align 1 diff --git a/cl/_testgo/interface/out.ll b/cl/_testgo/interface/out.ll index 92258906..e7475bfa 100644 --- a/cl/_testgo/interface/out.ll +++ b/cl/_testgo/interface/out.ll @@ -10,31 +10,31 @@ source_filename = "main" %"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 } %"github.com/goplus/llgo/internal/abi.Imethod" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr } -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null -@"*_llgo_main.Game1" = linkonce global ptr null -@_llgo_main.Game1 = linkonce global ptr null -@"_llgo_struct$cJmCzeVn0orHWafCrTGAnbbAF46F2A4Fms4bJBm8ITI" = linkonce global ptr null -@"*_llgo_github.com/goplus/llgo/cl/internal/foo.Game" = linkonce global ptr null -@"_llgo_github.com/goplus/llgo/cl/internal/foo.Game" = linkonce global ptr null -@"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 +@"*_llgo_main.Game1" = linkonce global ptr null, align 8 +@_llgo_main.Game1 = linkonce global ptr null, align 8 +@"_llgo_struct$cJmCzeVn0orHWafCrTGAnbbAF46F2A4Fms4bJBm8ITI" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/internal/foo.Game" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/internal/foo.Game" = linkonce global ptr null, align 8 +@"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [4 x i8] c"main", align 1 @1 = private unnamed_addr constant [4 x i8] c"Load", align 1 -@"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null +@"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8 @2 = private unnamed_addr constant [8 x i8] c"initGame", align 1 @3 = private unnamed_addr constant [47 x i8] c"github.com/goplus/llgo/cl/internal/foo.initGame", align 1 @4 = private unnamed_addr constant [38 x i8] c"github.com/goplus/llgo/cl/internal/foo", align 1 @5 = private unnamed_addr constant [43 x i8] c"github.com/goplus/llgo/cl/internal/foo.Game", align 1 @6 = private unnamed_addr constant [4 x i8] c"Game", align 1 @7 = private unnamed_addr constant [10 x i8] c"main.Game1", align 1 -@"*_llgo_main.Game2" = linkonce global ptr null -@_llgo_main.Game2 = linkonce global ptr null +@"*_llgo_main.Game2" = linkonce global ptr null, align 8 +@_llgo_main.Game2 = linkonce global ptr null, align 8 @8 = private unnamed_addr constant [13 x i8] c"main.initGame", align 1 @9 = private unnamed_addr constant [10 x i8] c"main.Game2", align 1 -@"_llgo_github.com/goplus/llgo/cl/internal/foo.Gamer" = linkonce global ptr null +@"_llgo_github.com/goplus/llgo/cl/internal/foo.Gamer" = linkonce global ptr null, align 8 @10 = private unnamed_addr constant [44 x i8] c"github.com/goplus/llgo/cl/internal/foo.Gamer", align 1 -@"main.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg" = global ptr null +@"main.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg" = global ptr null, align 8 @11 = private unnamed_addr constant [2 x i8] c"OK", align 1 @12 = private unnamed_addr constant [4 x i8] c"FAIL", align 1 diff --git a/cl/_testgo/invoke/out.ll b/cl/_testgo/invoke/out.ll index 3f419b70..1a1216e6 100644 --- a/cl/_testgo/invoke/out.ll +++ b/cl/_testgo/invoke/out.ll @@ -11,44 +11,44 @@ source_filename = "main" %"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr } %"github.com/goplus/llgo/internal/abi.Imethod" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr } -@"main.init$guard" = global ptr null +@"main.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [6 x i8] c"invoke", align 1 @1 = private unnamed_addr constant [7 x i8] c"invoke1", align 1 @2 = private unnamed_addr constant [7 x i8] c"invoke2", align 1 @3 = private unnamed_addr constant [7 x i8] c"invoke3", align 1 -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @4 = private unnamed_addr constant [5 x i8] c"hello", align 1 -@_llgo_main.T = linkonce global ptr null -@"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = global ptr null -@_llgo_string = linkonce global ptr null +@_llgo_main.T = linkonce global ptr null, align 8 +@"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = global ptr null, align 8 +@_llgo_string = linkonce global ptr null, align 8 @5 = private unnamed_addr constant [1 x i8] c"s", align 1 @6 = private unnamed_addr constant [4 x i8] c"main", align 1 @7 = private unnamed_addr constant [6 x i8] c"Invoke", align 1 -@"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA" = linkonce global ptr null -@_llgo_int = linkonce global ptr null +@"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA" = linkonce global ptr null, align 8 +@_llgo_int = linkonce global ptr null, align 8 @8 = private unnamed_addr constant [6 x i8] c"Method", align 1 -@"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null +@"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8 @9 = private unnamed_addr constant [6 x i8] c"main.T", align 1 -@"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0" = linkonce global ptr null -@"*_llgo_main.T" = linkonce global ptr null -@_llgo_main.T1 = linkonce global ptr null +@"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0" = linkonce global ptr null, align 8 +@"*_llgo_main.T" = linkonce global ptr null, align 8 +@_llgo_main.T1 = linkonce global ptr null, align 8 @10 = private unnamed_addr constant [7 x i8] c"main.T1", align 1 -@"*_llgo_main.T1" = linkonce global ptr null -@_llgo_main.T2 = linkonce global ptr null -@_llgo_float64 = linkonce global ptr null +@"*_llgo_main.T1" = linkonce global ptr null, align 8 +@_llgo_main.T2 = linkonce global ptr null, align 8 +@_llgo_float64 = linkonce global ptr null, align 8 @11 = private unnamed_addr constant [7 x i8] c"main.T2", align 1 -@"*_llgo_main.T2" = linkonce global ptr null -@"*_llgo_main.T3" = linkonce global ptr null -@_llgo_main.T3 = linkonce global ptr null -@_llgo_int8 = linkonce global ptr null +@"*_llgo_main.T2" = linkonce global ptr null, align 8 +@"*_llgo_main.T3" = linkonce global ptr null, align 8 +@_llgo_main.T3 = linkonce global ptr null, align 8 +@_llgo_int8 = linkonce global ptr null, align 8 @12 = private unnamed_addr constant [7 x i8] c"main.T3", align 1 -@"_llgo_iface$jwmSdgh1zvY_TDIgLzCkvkbiyrdwl9N806DH0JGcyMI" = linkonce global ptr null +@"_llgo_iface$jwmSdgh1zvY_TDIgLzCkvkbiyrdwl9N806DH0JGcyMI" = linkonce global ptr null, align 8 @13 = private unnamed_addr constant [5 x i8] c"world", align 1 -@_llgo_main.I = linkonce global ptr null +@_llgo_main.I = linkonce global ptr null, align 8 @14 = private unnamed_addr constant [6 x i8] c"main.I", align 1 @15 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1 -@_llgo_any = linkonce global ptr null +@_llgo_any = linkonce global ptr null, align 8 define i64 @main.T.Invoke(%main.T %0) { _llgo_0: diff --git a/cl/_testgo/print/out.ll b/cl/_testgo/print/out.ll index dd4a2524..5d98f8a7 100644 --- a/cl/_testgo/print/out.ll +++ b/cl/_testgo/print/out.ll @@ -1,9 +1,9 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define void @main.init() { _llgo_0: diff --git a/cl/_testgo/reader/out.ll b/cl/_testgo/reader/out.ll index 4db55df1..eaaa3063 100644 --- a/cl/_testgo/reader/out.ll +++ b/cl/_testgo/reader/out.ll @@ -14,78 +14,78 @@ source_filename = "main" %"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 } %"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr } -@main.EOF = global ptr null -@main.ErrShortWrite = global ptr null -@"main.init$guard" = global ptr null -@_llgo_main.WriterTo = linkonce global ptr null -@"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk" = linkonce global ptr null -@_llgo_main.Writer = linkonce global ptr null -@"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY" = linkonce global ptr null -@"[]_llgo_byte" = linkonce global ptr null -@_llgo_byte = linkonce global ptr null -@_llgo_int = linkonce global ptr null -@_llgo_error = global ptr null -@"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null -@_llgo_string = linkonce global ptr null +@main.EOF = global %"github.com/goplus/llgo/internal/runtime.iface" zeroinitializer, align 8 +@main.ErrShortWrite = global %"github.com/goplus/llgo/internal/runtime.iface" zeroinitializer, align 8 +@"main.init$guard" = global i1 false, align 1 +@_llgo_main.WriterTo = linkonce global ptr null, align 8 +@"_llgo_func$MrYxYl10p_I07B55pBsGw9la9zbzU2vGDPLWrT714Uk" = linkonce global ptr null, align 8 +@_llgo_main.Writer = linkonce global ptr null, align 8 +@"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY" = linkonce global ptr null, align 8 +@"[]_llgo_byte" = linkonce global ptr null, align 8 +@_llgo_byte = linkonce global ptr null, align 8 +@_llgo_int = linkonce global ptr null, align 8 +@_llgo_error = global ptr null, align 8 +@"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null, align 8 +@_llgo_string = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [5 x i8] c"Error", align 1 @1 = private unnamed_addr constant [4 x i8] c"main", align 1 @2 = private unnamed_addr constant [5 x i8] c"error", align 1 @3 = private unnamed_addr constant [5 x i8] c"Write", align 1 @4 = private unnamed_addr constant [11 x i8] c"main.Writer", align 1 -@_llgo_int64 = linkonce global ptr null +@_llgo_int64 = linkonce global ptr null, align 8 @5 = private unnamed_addr constant [7 x i8] c"WriteTo", align 1 @6 = private unnamed_addr constant [13 x i8] c"main.WriterTo", align 1 -@"_llgo_iface$eN81k1zqixGTyagHw_4nqH4mGfwwehTOCTXUlbT9kzk" = linkonce global ptr null -@_llgo_main.nopCloserWriterTo = global ptr null -@"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y" = linkonce global ptr null -@_llgo_main.Reader = linkonce global ptr null +@"_llgo_iface$eN81k1zqixGTyagHw_4nqH4mGfwwehTOCTXUlbT9kzk" = linkonce global ptr null, align 8 +@_llgo_main.nopCloserWriterTo = global ptr null, align 8 +@"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y" = linkonce global ptr null, align 8 +@_llgo_main.Reader = linkonce global ptr null, align 8 @7 = private unnamed_addr constant [4 x i8] c"Read", align 1 @8 = private unnamed_addr constant [11 x i8] c"main.Reader", align 1 @9 = private unnamed_addr constant [6 x i8] c"Reader", align 1 @10 = private unnamed_addr constant [5 x i8] c"Close", align 1 -@"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w" = linkonce global ptr null +@"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w" = linkonce global ptr null, align 8 @11 = private unnamed_addr constant [22 x i8] c"main.nopCloserWriterTo", align 1 -@"_llgo_iface$L2Ik-AJcd0jsoBw5fQ07pQpfUM-kh78Wn2bOeak6M3I" = linkonce global ptr null -@_llgo_main.nopCloser = global ptr null +@"_llgo_iface$L2Ik-AJcd0jsoBw5fQ07pQpfUM-kh78Wn2bOeak6M3I" = linkonce global ptr null, align 8 +@_llgo_main.nopCloser = global ptr null, align 8 @12 = private unnamed_addr constant [14 x i8] c"main.nopCloser", align 1 -@_llgo_main.StringWriter = linkonce global ptr null -@"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw" = linkonce global ptr null +@_llgo_main.StringWriter = linkonce global ptr null, align 8 +@"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw" = linkonce global ptr null, align 8 @13 = private unnamed_addr constant [11 x i8] c"WriteString", align 1 @14 = private unnamed_addr constant [17 x i8] c"main.StringWriter", align 1 -@"_llgo_iface$Ly4zXiUMEac-hYAMw6b6miJ1JEhGfLyBWyBOhpsRZcU" = linkonce global ptr null +@"_llgo_iface$Ly4zXiUMEac-hYAMw6b6miJ1JEhGfLyBWyBOhpsRZcU" = linkonce global ptr null, align 8 @15 = private unnamed_addr constant [3 x i8] c"EOF", align 1 @16 = private unnamed_addr constant [11 x i8] c"short write", align 1 -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @17 = private unnamed_addr constant [11 x i8] c"hello world", align 1 -@"*_llgo_main.stringReader" = global ptr null -@_llgo_main.stringReader = global ptr null -@"main.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk" = global ptr null +@"*_llgo_main.stringReader" = global ptr null, align 8 +@_llgo_main.stringReader = global ptr null, align 8 +@"main.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk" = global ptr null, align 8 @18 = private unnamed_addr constant [1 x i8] c"s", align 1 @19 = private unnamed_addr constant [1 x i8] c"i", align 1 @20 = private unnamed_addr constant [8 x i8] c"prevRune", align 1 @21 = private unnamed_addr constant [3 x i8] c"Len", align 1 -@"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA" = linkonce global ptr null +@"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA" = linkonce global ptr null, align 8 @22 = private unnamed_addr constant [6 x i8] c"ReadAt", align 1 -@"_llgo_func$TY5Etv7VBKM_-2um1BDEeQEE2lP06Pt6G54EuKiNC3c" = linkonce global ptr null +@"_llgo_func$TY5Etv7VBKM_-2um1BDEeQEE2lP06Pt6G54EuKiNC3c" = linkonce global ptr null, align 8 @23 = private unnamed_addr constant [8 x i8] c"ReadByte", align 1 -@"_llgo_func$6bvVpCcGPUc3z_EmsQTHB0AVT1hP5-NNLVRgm43teCM" = linkonce global ptr null +@"_llgo_func$6bvVpCcGPUc3z_EmsQTHB0AVT1hP5-NNLVRgm43teCM" = linkonce global ptr null, align 8 @24 = private unnamed_addr constant [8 x i8] c"ReadRune", align 1 -@"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU" = linkonce global ptr null -@_llgo_rune = linkonce global ptr null +@"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU" = linkonce global ptr null, align 8 +@_llgo_rune = linkonce global ptr null, align 8 @25 = private unnamed_addr constant [4 x i8] c"Seek", align 1 -@"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms" = linkonce global ptr null +@"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms" = linkonce global ptr null, align 8 @26 = private unnamed_addr constant [4 x i8] c"Size", align 1 -@"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug" = linkonce global ptr null +@"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug" = linkonce global ptr null, align 8 @27 = private unnamed_addr constant [10 x i8] c"UnreadByte", align 1 @28 = private unnamed_addr constant [10 x i8] c"UnreadRune", align 1 @29 = private unnamed_addr constant [17 x i8] c"main.stringReader", align 1 -@"_llgo_iface$OFO8Us9n8ajWCabGedeuoJ-Za2zAMk4Jh0FunAcUCFE" = linkonce global ptr null -@"*_llgo_main.errorString" = global ptr null -@_llgo_main.errorString = global ptr null -@"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = global ptr null +@"_llgo_iface$OFO8Us9n8ajWCabGedeuoJ-Za2zAMk4Jh0FunAcUCFE" = linkonce global ptr null, align 8 +@"*_llgo_main.errorString" = global ptr null, align 8 +@_llgo_main.errorString = global ptr null, align 8 +@"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = global ptr null, align 8 @30 = private unnamed_addr constant [16 x i8] c"main.errorString", align 1 -@"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU" = linkonce global ptr null +@"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU" = linkonce global ptr null, align 8 @31 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1 @32 = private unnamed_addr constant [37 x i8] c"stringsReader.ReadAt: negative offset", align 1 @33 = private unnamed_addr constant [34 x i8] c"stringsReader.Seek: invalid whence", align 1 diff --git a/cl/_testgo/strucintf/out.ll b/cl/_testgo/strucintf/out.ll index aefb12fd..ecbe8e05 100644 --- a/cl/_testgo/strucintf/out.ll +++ b/cl/_testgo/strucintf/out.ll @@ -7,15 +7,15 @@ source_filename = "main" %"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 } %"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 } -@"main.init$guard" = global ptr null -@"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = global ptr null -@_llgo_int = linkonce global ptr null +@"main.init$guard" = global i1 false, align 1 +@"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = global ptr null, align 8 +@_llgo_int = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [1 x i8] c"v", align 1 @1 = private unnamed_addr constant [4 x i8] c"main", align 1 -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @2 = private unnamed_addr constant [11 x i8] c"Foo: not ok", align 1 -@"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk" = linkonce global ptr null +@"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk" = linkonce global ptr null, align 8 @3 = private unnamed_addr constant [1 x i8] c"V", align 1 @4 = private unnamed_addr constant [11 x i8] c"Bar: not ok", align 1 @5 = private unnamed_addr constant [9 x i8] c"F: not ok", align 1 diff --git a/cl/_testgo/struczero/out.ll b/cl/_testgo/struczero/out.ll index 4c417f06..4a8bf7fa 100644 --- a/cl/_testgo/struczero/out.ll +++ b/cl/_testgo/struczero/out.ll @@ -10,25 +10,25 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 } %"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr } -@"main.init$guard" = global ptr null -@"_llgo_github.com/goplus/llgo/cl/internal/foo.Foo" = linkonce global ptr null -@"main.struct$qQwZyFy_4JRalRxVVsVD8R09X5t58tWjTrtJPtHbEjs" = global ptr null -@"*_llgo_byte" = linkonce global ptr null -@_llgo_byte = linkonce global ptr null -@_llgo_float32 = linkonce global ptr null +@"main.init$guard" = global i1 false, align 1 +@"_llgo_github.com/goplus/llgo/cl/internal/foo.Foo" = linkonce global ptr null, align 8 +@"main.struct$qQwZyFy_4JRalRxVVsVD8R09X5t58tWjTrtJPtHbEjs" = global ptr null, align 8 +@"*_llgo_byte" = linkonce global ptr null, align 8 +@_llgo_byte = linkonce global ptr null, align 8 +@_llgo_float32 = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [2 x i8] c"pb", align 1 @1 = private unnamed_addr constant [1 x i8] c"F", align 1 @2 = private unnamed_addr constant [4 x i8] c"main", align 1 @3 = private unnamed_addr constant [2 x i8] c"Pb", align 1 -@"_llgo_func$NfGSLZ1QiKRoFkKeqYSXE5hUU5bpeteSJKrbMNUzYRE" = linkonce global ptr null +@"_llgo_func$NfGSLZ1QiKRoFkKeqYSXE5hUU5bpeteSJKrbMNUzYRE" = linkonce global ptr null, align 8 @4 = private unnamed_addr constant [38 x i8] c"github.com/goplus/llgo/cl/internal/foo", align 1 @5 = private unnamed_addr constant [42 x i8] c"github.com/goplus/llgo/cl/internal/foo.Foo", align 1 -@_llgo_main.bar = global ptr null -@"main.struct$Ci43nzKYkRLddRL_N4mkykxLXfJlqJGS5n04LKThPNo" = global ptr null +@_llgo_main.bar = global ptr null, align 8 +@"main.struct$Ci43nzKYkRLddRL_N4mkykxLXfJlqJGS5n04LKThPNo" = global ptr null, align 8 @6 = private unnamed_addr constant [1 x i8] c"f", align 1 @7 = private unnamed_addr constant [8 x i8] c"main.bar", align 1 -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @8 = private unnamed_addr constant [6 x i8] c"notOk:", align 1 define { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } @main.Bar(%"github.com/goplus/llgo/internal/runtime.eface" %0) { diff --git a/cl/_testlibc/argv/out.ll b/cl/_testlibc/argv/out.ll index cb66aef6..0b4d904b 100644 --- a/cl/_testlibc/argv/out.ll +++ b/cl/_testlibc/argv/out.ll @@ -1,9 +1,9 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 define void @main.init() { diff --git a/cl/_testlibc/sqlite/out.ll b/cl/_testlibc/sqlite/out.ll index 5a82fb8d..2d19d3a0 100644 --- a/cl/_testlibc/sqlite/out.ll +++ b/cl/_testlibc/sqlite/out.ll @@ -1,10 +1,10 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null +@"main.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [20 x i8] c"==> Error: (%d) %s\0A\00", align 1 -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @1 = private unnamed_addr constant [9 x i8] c":memory:\00", align 1 define void @main.check(i32 %0) { diff --git a/cl/_testlibgo/mathbits/out.ll b/cl/_testlibgo/mathbits/out.ll index 99a6e817..95ac3a40 100644 --- a/cl/_testlibgo/mathbits/out.ll +++ b/cl/_testlibgo/mathbits/out.ll @@ -1,9 +1,9 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define void @main.init() { _llgo_0: diff --git a/cl/_testpy/callpy/out.ll b/cl/_testpy/callpy/out.ll index 090e0348..6518dace 100644 --- a/cl/_testpy/callpy/out.ll +++ b/cl/_testpy/callpy/out.ll @@ -1,16 +1,16 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null -@__llgo_py.math.sqrt = linkonce global ptr null -@__llgo_py.os.getcwd = linkonce global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 +@__llgo_py.math.sqrt = linkonce global ptr null, align 8 +@__llgo_py.os.getcwd = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [14 x i8] c"sqrt(2) = %f\0A\00", align 1 @1 = private unnamed_addr constant [10 x i8] c"cwd = %s\0A\00", align 1 -@__llgo_py.math = external global ptr +@__llgo_py.math = external global ptr, align 8 @2 = private unnamed_addr constant [5 x i8] c"sqrt\00", align 1 -@__llgo_py.os = external global ptr +@__llgo_py.os = external global ptr, align 8 @3 = private unnamed_addr constant [7 x i8] c"getcwd\00", align 1 define void @main.init() { diff --git a/cl/_testpy/gcd/out.ll b/cl/_testpy/gcd/out.ll index 5d4461e5..7f67e613 100644 --- a/cl/_testpy/gcd/out.ll +++ b/cl/_testpy/gcd/out.ll @@ -1,12 +1,12 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null -@__llgo_py.math.gcd = linkonce global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 +@__llgo_py.math.gcd = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [22 x i8] c"gcd(60, 20, 25) = %d\0A\00", align 1 -@__llgo_py.math = external global ptr +@__llgo_py.math = external global ptr, align 8 @1 = private unnamed_addr constant [4 x i8] c"gcd\00", align 1 define void @main.init() { diff --git a/cl/_testpy/math/out.ll b/cl/_testpy/math/out.ll index 70bdd7e5..746b550c 100644 --- a/cl/_testpy/math/out.ll +++ b/cl/_testpy/math/out.ll @@ -1,8 +1,8 @@ ; ModuleID = 'math' source_filename = "math" -@"math.init$guard" = global ptr null -@__llgo_py.math = linkonce global ptr null +@"math.init$guard" = global i1 false, align 1 +@__llgo_py.math = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [5 x i8] c"math\00", align 1 define void @math.init() { diff --git a/cl/_testpy/matrix/out.ll b/cl/_testpy/matrix/out.ll index 4ff6b720..20548694 100644 --- a/cl/_testpy/matrix/out.ll +++ b/cl/_testpy/matrix/out.ll @@ -1,14 +1,14 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null -@__llgo_py.numpy.add = linkonce global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 +@__llgo_py.numpy.add = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [8 x i8] c"a = %s\0A\00", align 1 @1 = private unnamed_addr constant [8 x i8] c"a = %s\0A\00", align 1 @2 = private unnamed_addr constant [10 x i8] c"a+b = %s\0A\00", align 1 -@__llgo_py.numpy = external global ptr +@__llgo_py.numpy = external global ptr, align 8 @3 = private unnamed_addr constant [4 x i8] c"add\00", align 1 define void @main.init() { diff --git a/cl/_testpy/max/out.ll b/cl/_testpy/max/out.ll index 14e5618c..22a3cfd6 100644 --- a/cl/_testpy/max/out.ll +++ b/cl/_testpy/max/out.ll @@ -1,13 +1,13 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null -@__llgo_py.builtins.max = linkonce global ptr null -@__llgo_py.builtins.print = linkonce global ptr null -@__llgo_py.builtins.iter = linkonce global ptr null -@__llgo_py.builtins = external global ptr +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 +@__llgo_py.builtins.max = linkonce global ptr null, align 8 +@__llgo_py.builtins.print = linkonce global ptr null, align 8 +@__llgo_py.builtins.iter = linkonce global ptr null, align 8 +@__llgo_py.builtins = external global ptr, align 8 @0 = private unnamed_addr constant [5 x i8] c"iter\00", align 1 @1 = private unnamed_addr constant [4 x i8] c"max\00", align 1 @2 = private unnamed_addr constant [6 x i8] c"print\00", align 1 diff --git a/cl/_testpy/pi/out.ll b/cl/_testpy/pi/out.ll index 78809604..0a6225de 100644 --- a/cl/_testpy/pi/out.ll +++ b/cl/_testpy/pi/out.ll @@ -1,11 +1,11 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [9 x i8] c"pi = %f\0A\00", align 1 -@__llgo_py.math = external global ptr +@__llgo_py.math = external global ptr, align 8 @1 = private unnamed_addr constant [3 x i8] c"pi\00", align 1 define void @main.init() { diff --git a/cl/_testpy/pow/out.ll b/cl/_testpy/pow/out.ll index 16c2d44a..5807c6f3 100644 --- a/cl/_testpy/pow/out.ll +++ b/cl/_testpy/pow/out.ll @@ -1,12 +1,12 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null -@__llgo_py.math.pow = linkonce global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 +@__llgo_py.math.pow = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [16 x i8] c"pow(2, 3) = %f\0A\00", align 1 -@__llgo_py.math = external global ptr +@__llgo_py.math = external global ptr, align 8 @1 = private unnamed_addr constant [4 x i8] c"pow\00", align 1 define void @main.init() { diff --git a/cl/_testrt/alloca/out.ll b/cl/_testrt/alloca/out.ll index 452d403a..0029dbad 100644 --- a/cl/_testrt/alloca/out.ll +++ b/cl/_testrt/alloca/out.ll @@ -1,9 +1,9 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [4 x i8] c"Hi\0A\00", align 1 @1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 diff --git a/cl/_testrt/allocstr/out.ll b/cl/_testrt/allocstr/out.ll index 878c6ffc..697062c5 100644 --- a/cl/_testrt/allocstr/out.ll +++ b/cl/_testrt/allocstr/out.ll @@ -3,10 +3,10 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } -@"main.init$guard" = global ptr null +@"main.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [12 x i8] c"Hello world\0A", align 1 -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define %"github.com/goplus/llgo/internal/runtime.String" @main.hello() { _llgo_0: diff --git a/cl/_testrt/any/out.ll b/cl/_testrt/any/out.ll index 6f45a304..ebe0b7de 100644 --- a/cl/_testrt/any/out.ll +++ b/cl/_testrt/any/out.ll @@ -5,14 +5,14 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } -@"main.init$guard" = global ptr null -@"*_llgo_int8" = linkonce global ptr null -@_llgo_int8 = linkonce global ptr null +@"main.init$guard" = global i1 false, align 1 +@"*_llgo_int8" = linkonce global ptr null, align 8 +@_llgo_int8 = linkonce global ptr null, align 8 @0 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1 -@_llgo_string = linkonce global ptr null -@_llgo_int = linkonce global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@_llgo_string = linkonce global ptr null, align 8 +@_llgo_int = linkonce global ptr null, align 8 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @1 = private unnamed_addr constant [7 x i8] c"%s %d\0A\00", align 1 @2 = private unnamed_addr constant [6 x i8] c"Hello\00", align 1 diff --git a/cl/_testrt/builtin/out.ll b/cl/_testrt/builtin/out.ll index 6e91ac88..858d32ef 100644 --- a/cl/_testrt/builtin/out.ll +++ b/cl/_testrt/builtin/out.ll @@ -6,15 +6,15 @@ source_filename = "main" %"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr } -@main.a = global ptr null -@main.b = global ptr null -@"main.init$guard" = global ptr null -@main.n = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@main.a = global i64 0, align 8 +@main.b = global i64 0, align 8 +@"main.init$guard" = global i1 false, align 1 +@main.n = global i64 0, align 8 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [5 x i8] c"hello", align 1 @1 = private unnamed_addr constant [3 x i8] c"def", align 1 -@_llgo_int = linkonce global ptr null +@_llgo_int = linkonce global ptr null, align 8 @2 = private unnamed_addr constant [4 x i8] c"ABCD", align 1 @3 = private unnamed_addr constant [7 x i8] c"\E4\B8\ADabcd", align 1 @4 = private unnamed_addr constant [3 x i8] c"abc", align 1 diff --git a/cl/_testrt/callback/out.ll b/cl/_testrt/callback/out.ll index 42ae697a..2389cc20 100644 --- a/cl/_testrt/callback/out.ll +++ b/cl/_testrt/callback/out.ll @@ -1,9 +1,9 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [7 x i8] c"Hello\0A\00", align 1 @1 = private unnamed_addr constant [10 x i8] c"callback\0A\00", align 1 diff --git a/cl/_testrt/cast/out.ll b/cl/_testrt/cast/out.ll index 2f26e334..84ae587a 100644 --- a/cl/_testrt/cast/out.ll +++ b/cl/_testrt/cast/out.ll @@ -4,11 +4,11 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr } -@"main.init$guard" = global ptr null +@"main.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [5 x i8] c"error", align 1 -@_llgo_string = linkonce global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@_llgo_string = linkonce global ptr null, align 8 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define void @main.cvt32Fto32(float %0, i32 %1) { _llgo_0: diff --git a/cl/_testrt/closure/out.ll b/cl/_testrt/closure/out.ll index e3a0e66f..326344f3 100644 --- a/cl/_testrt/closure/out.ll +++ b/cl/_testrt/closure/out.ll @@ -1,9 +1,9 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 @1 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 diff --git a/cl/_testrt/concat/out.ll b/cl/_testrt/concat/out.ll index b2f479fe..d028e6a7 100644 --- a/cl/_testrt/concat/out.ll +++ b/cl/_testrt/concat/out.ll @@ -4,10 +4,10 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 } -@"main.init$guard" = global ptr null +@"main.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [3 x i8] c"...", align 1 -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @1 = private unnamed_addr constant [5 x i8] c"Hello", align 1 @2 = private unnamed_addr constant [1 x i8] c" ", align 1 @3 = private unnamed_addr constant [5 x i8] c"World", align 1 diff --git a/cl/_testrt/cstr/out.ll b/cl/_testrt/cstr/out.ll index 480ae6d2..7c35b232 100644 --- a/cl/_testrt/cstr/out.ll +++ b/cl/_testrt/cstr/out.ll @@ -1,9 +1,9 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [14 x i8] c"Hello, world\0A\00", align 1 define void @main.init() { diff --git a/cl/_testrt/cvar/out.ll b/cl/_testrt/cvar/out.ll index bd6f7762..f603dd10 100644 --- a/cl/_testrt/cvar/out.ll +++ b/cl/_testrt/cvar/out.ll @@ -1,11 +1,11 @@ ; ModuleID = 'main' source_filename = "main" -@_bar_x = external global ptr -@_bar_y = external global ptr -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@_bar_x = external global { [16 x i8], [2 x ptr] }, align 8 +@_bar_y = external global { [16 x i8] }, align 1 +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define void @main.init() { _llgo_0: diff --git a/cl/_testrt/eface/out.ll b/cl/_testrt/eface/out.ll index c6af1445..d24c6978 100644 --- a/cl/_testrt/eface/out.ll +++ b/cl/_testrt/eface/out.ll @@ -10,38 +10,38 @@ source_filename = "main" %"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 } %"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr } -@"main.init$guard" = global ptr null +@"main.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [6 x i8] c"invoke", align 1 @1 = private unnamed_addr constant [7 x i8] c"\09elem: ", align 1 @2 = private unnamed_addr constant [9 x i8] c"\09uncomm: ", align 1 -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null -@_llgo_bool = linkonce global ptr null -@_llgo_int = linkonce global ptr null -@_llgo_int8 = linkonce global ptr null -@_llgo_int16 = linkonce global ptr null -@_llgo_int32 = linkonce global ptr null -@_llgo_int64 = linkonce global ptr null -@_llgo_uint = linkonce global ptr null -@_llgo_uint8 = linkonce global ptr null -@_llgo_uint16 = linkonce global ptr null -@_llgo_uint32 = linkonce global ptr null -@_llgo_uint64 = linkonce global ptr null -@_llgo_uintptr = linkonce global ptr null -@_llgo_float32 = linkonce global ptr null -@_llgo_float64 = linkonce global ptr null -@"[10]_llgo_int" = linkonce global ptr null -@"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null -@"*_llgo_int" = linkonce global ptr null -@"[]_llgo_int" = linkonce global ptr null +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 +@_llgo_bool = linkonce global ptr null, align 8 +@_llgo_int = linkonce global ptr null, align 8 +@_llgo_int8 = linkonce global ptr null, align 8 +@_llgo_int16 = linkonce global ptr null, align 8 +@_llgo_int32 = linkonce global ptr null, align 8 +@_llgo_int64 = linkonce global ptr null, align 8 +@_llgo_uint = linkonce global ptr null, align 8 +@_llgo_uint8 = linkonce global ptr null, align 8 +@_llgo_uint16 = linkonce global ptr null, align 8 +@_llgo_uint32 = linkonce global ptr null, align 8 +@_llgo_uint64 = linkonce global ptr null, align 8 +@_llgo_uintptr = linkonce global ptr null, align 8 +@_llgo_float32 = linkonce global ptr null, align 8 +@_llgo_float64 = linkonce global ptr null, align 8 +@"[10]_llgo_int" = linkonce global ptr null, align 8 +@"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8 +@"*_llgo_int" = linkonce global ptr null, align 8 +@"[]_llgo_int" = linkonce global ptr null, align 8 @3 = private unnamed_addr constant [5 x i8] c"hello", align 1 -@_llgo_string = linkonce global ptr null -@"main.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM" = global ptr null +@_llgo_string = linkonce global ptr null, align 8 +@"main.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM" = global ptr null, align 8 @4 = private unnamed_addr constant [1 x i8] c"x", align 1 @5 = private unnamed_addr constant [1 x i8] c"y", align 1 @6 = private unnamed_addr constant [1 x i8] c"z", align 1 @7 = private unnamed_addr constant [4 x i8] c"main", align 1 -@_llgo_main.T = linkonce global ptr null +@_llgo_main.T = linkonce global ptr null, align 8 @8 = private unnamed_addr constant [6 x i8] c"Invoke", align 1 @9 = private unnamed_addr constant [6 x i8] c"main.T", align 1 diff --git a/cl/_testrt/fprintf/out.ll b/cl/_testrt/fprintf/out.ll index 0046e6ca..65c65aed 100644 --- a/cl/_testrt/fprintf/out.ll +++ b/cl/_testrt/fprintf/out.ll @@ -1,10 +1,10 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__stderrp = external global ptr -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__stderrp = external global ptr, align 8 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [10 x i8] c"Hello %d\0A\00", align 1 define void @main.init() { diff --git a/cl/_testrt/gblarray/out.ll b/cl/_testrt/gblarray/out.ll index 45de88a6..eeba3cf3 100644 --- a/cl/_testrt/gblarray/out.ll +++ b/cl/_testrt/gblarray/out.ll @@ -4,11 +4,11 @@ source_filename = "main" %"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr } %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } -@main.basicTypes = global [25 x ptr] undef -@"main.init$guard" = global ptr null -@main.sizeBasicTypes = global [25 x i64] undef -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@main.basicTypes = global [25 x ptr] zeroinitializer, align 8 +@"main.init$guard" = global i1 false, align 1 +@main.sizeBasicTypes = global [25 x i64] zeroinitializer, align 8 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [20 x i8] c"Kind: %d, Size: %d\0A\00", align 1 define ptr @main.Basic(i64 %0) { diff --git a/cl/_testrt/hello/out.ll b/cl/_testrt/hello/out.ll index f8cd7298..b4bf2fe1 100644 --- a/cl/_testrt/hello/out.ll +++ b/cl/_testrt/hello/out.ll @@ -1,10 +1,10 @@ ; ModuleID = 'main' source_filename = "main" -@main.format = global [10 x i8] undef -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@main.format = global [10 x i8] zeroinitializer, align 1 +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define void @main.init() { _llgo_0: diff --git a/cl/_testrt/index/out.ll b/cl/_testrt/index/out.ll index f93bb271..34d43925 100644 --- a/cl/_testrt/index/out.ll +++ b/cl/_testrt/index/out.ll @@ -4,9 +4,9 @@ source_filename = "main" %main.point = type { i64, i64 } %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 @1 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 @2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 diff --git a/cl/_testrt/intgen/out.ll b/cl/_testrt/intgen/out.ll index ddc97c91..6f36fcc2 100644 --- a/cl/_testrt/intgen/out.ll +++ b/cl/_testrt/intgen/out.ll @@ -4,9 +4,9 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 } %main.generator = type { i32 } -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 diff --git a/cl/_testrt/linkname/out.ll b/cl/_testrt/linkname/out.ll index fc89222a..a4aa79b0 100644 --- a/cl/_testrt/linkname/out.ll +++ b/cl/_testrt/linkname/out.ll @@ -4,9 +4,9 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } %main.m = type { %"github.com/goplus/llgo/internal/runtime.String" } -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [2 x i8] c"a\00", align 1 @1 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"c\00", align 1 diff --git a/cl/_testrt/map/out.ll b/cl/_testrt/map/out.ll index 1a93ecaf..0591fc76 100644 --- a/cl/_testrt/map/out.ll +++ b/cl/_testrt/map/out.ll @@ -1,9 +1,9 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [10 x i8] c"Hello %d\0A\00", align 1 define void @main.init() { diff --git a/cl/_testrt/mask/out.ll b/cl/_testrt/mask/out.ll index 2b6907ed..0404fd58 100644 --- a/cl/_testrt/mask/out.ll +++ b/cl/_testrt/mask/out.ll @@ -1,9 +1,9 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define void @main.init() { _llgo_0: diff --git a/cl/_testrt/named/out.ll b/cl/_testrt/named/out.ll index cb5f0e64..337619ac 100644 --- a/cl/_testrt/named/out.ll +++ b/cl/_testrt/named/out.ll @@ -5,9 +5,9 @@ source_filename = "main" %main.minfo = type { ptr, i64 } %main.mSpanList = type { ptr, ptr } -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [19 x i8] c"%d %d %d %d %d %d\0A\00", align 1 define void @main.init() { diff --git a/cl/_testrt/panic/out.ll b/cl/_testrt/panic/out.ll index 881403c4..a1d30f99 100644 --- a/cl/_testrt/panic/out.ll +++ b/cl/_testrt/panic/out.ll @@ -4,11 +4,11 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr } -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [13 x i8] c"panic message", align 1 -@_llgo_string = linkonce global ptr null +@_llgo_string = linkonce global ptr null, align 8 define void @main.init() { _llgo_0: diff --git a/cl/_testrt/qsort/out.ll b/cl/_testrt/qsort/out.ll index 916dd34a..2d507d3a 100644 --- a/cl/_testrt/qsort/out.ll +++ b/cl/_testrt/qsort/out.ll @@ -1,9 +1,9 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 define void @main.init() { diff --git a/cl/_testrt/result/out.ll b/cl/_testrt/result/out.ll index 4664affe..dde63bee 100644 --- a/cl/_testrt/result/out.ll +++ b/cl/_testrt/result/out.ll @@ -1,9 +1,9 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @2 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 diff --git a/cl/_testrt/strlen/out.ll b/cl/_testrt/strlen/out.ll index f8cd7298..b4bf2fe1 100644 --- a/cl/_testrt/strlen/out.ll +++ b/cl/_testrt/strlen/out.ll @@ -1,10 +1,10 @@ ; ModuleID = 'main' source_filename = "main" -@main.format = global [10 x i8] undef -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@main.format = global [10 x i8] zeroinitializer, align 1 +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define void @main.init() { _llgo_0: diff --git a/cl/_testrt/struct/out.ll b/cl/_testrt/struct/out.ll index 6373ceb2..8388292e 100644 --- a/cl/_testrt/struct/out.ll +++ b/cl/_testrt/struct/out.ll @@ -3,10 +3,10 @@ source_filename = "main" %main.Foo = type { i32, i1 } -@main.format = global [10 x i8] undef -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@main.format = global [10 x i8] zeroinitializer, align 1 +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define void @main.Foo.Print(%main.Foo %0) { _llgo_0: diff --git a/cl/_testrt/sum/out.ll b/cl/_testrt/sum/out.ll index c36f08d1..8bbf7f8d 100644 --- a/cl/_testrt/sum/out.ll +++ b/cl/_testrt/sum/out.ll @@ -3,9 +3,9 @@ source_filename = "main" %"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 } -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [10 x i8] c"Hello %d\0A\00", align 1 define void @main.init() { diff --git a/cl/_testrt/typalias/out.ll b/cl/_testrt/typalias/out.ll index bb9068ea..e77b0d59 100644 --- a/cl/_testrt/typalias/out.ll +++ b/cl/_testrt/typalias/out.ll @@ -1,10 +1,10 @@ ; ModuleID = 'main' source_filename = "main" -@main.format = global [10 x i8] undef -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@main.format = global [10 x i8] zeroinitializer, align 1 +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 define void @main.Print(ptr %0) { _llgo_0: diff --git a/cl/_testrt/unreachable/out.ll b/cl/_testrt/unreachable/out.ll index 0e3a0f72..3f984679 100644 --- a/cl/_testrt/unreachable/out.ll +++ b/cl/_testrt/unreachable/out.ll @@ -1,9 +1,9 @@ ; ModuleID = 'main' source_filename = "main" -@"main.init$guard" = global ptr null -@__llgo_argc = global ptr null -@__llgo_argv = global ptr null +@"main.init$guard" = global i1 false, align 1 +@__llgo_argc = global i32 0, align 4 +@__llgo_argv = global ptr null, align 8 @0 = private unnamed_addr constant [7 x i8] c"Hello\0A\00", align 1 define void @main.foo() { diff --git a/cl/compile.go b/cl/compile.go index 568a236f..4239f465 100644 --- a/cl/compile.go +++ b/cl/compile.go @@ -201,7 +201,7 @@ func (p *context) compileGlobal(pkg llssa.Package, gbl *ssa.Global) { } g := pkg.NewVar(name, typ, llssa.Background(vtype)) if define { - g.Init(p.prog.Nil(g.Type)) + g.InitNil() } } @@ -380,8 +380,8 @@ func (p *context) compileBlock(b llssa.Builder, block *ssa.BasicBlock, n int, do fn := p.fn argc := pkg.NewVar("__llgo_argc", types.NewPointer(types.Typ[types.Int32]), llssa.InC) argv := pkg.NewVar("__llgo_argv", types.NewPointer(argvTy), llssa.InC) - argc.Init(prog.Nil(argc.Type)) - argv.Init(prog.Nil(argv.Type)) + argc.InitNil() + argv.InitNil() b.Store(argc.Expr, fn.Param(0)) b.Store(argv.Expr, fn.Param(1)) callRuntimeInit(b, pkg) diff --git a/cl/compile_test.go b/cl/compile_test.go index d1126f86..dbd9c939 100644 --- a/cl/compile_test.go +++ b/cl/compile_test.go @@ -71,8 +71,8 @@ var a int `, `; ModuleID = 'foo' source_filename = "foo" -@foo.a = global ptr null -@"foo.init$guard" = global ptr null +@foo.a = global i64 0, align 8 +@"foo.init$guard" = global i1 false, align 1 define void @foo.init() { _llgo_0: @@ -98,7 +98,7 @@ func fn(a int, b float64) int { `, `; ModuleID = 'foo' source_filename = "foo" -@"foo.init$guard" = global ptr null +@"foo.init$guard" = global i1 false, align 1 define i64 @foo.fn(i64 %0, double %1) { _llgo_0: diff --git a/internal/runtime/bdwgc/llgo_autogen.lla b/internal/runtime/bdwgc/llgo_autogen.lla index 5e1a1ad7ae8ebcc246349373a8628435a9aae4dd..3a3a4ea82baf4e39d86c85c558a7cb8e6dcd5421 100644 GIT binary patch literal 414 zcmWIWW@Zs#U|`^22=qG_v90n}&MP2q4-*3eKZ6WIPELA$d}3)yetK%2UQSME2qy#c ztA*KVuYtIlJ7gZ9~|svuXpyGl_@hr zEp^rl$3O3vMSXnyWZknV2cFcjFUW9_<60Evdi-Av1v?8x##!pSoOfhJzFA!z4@V} zw1JP^0YA-lX4aPD9(?B#L#Bs+ShFj2O*TK*f;{g2#f7cc4orEn=0@n>V37l-9>s6x z-LUaQz<%fN_UD#f-eq}U{dGY#M|1Jdrb~4XSh^l;ovHG;KK$pshleZwi$DK#C;koV z<=g95iGSq^@MdI^W5yL|62RbNU;u^+!;(f23nK_wAwh^1d;#99Y#`-~Ko|<7jX@?b F005DFp>_ZO literal 409 zcmWIWW@Zs#U|`^22-tHd;+Vhes;5BSW+ny(eg+waoSgLh_{7qZ{Pfg3y_}rT5KabW z_K7iR96(%J!Og(P@|BT+0c^n9i5vY68wfaj|J@aQWtD=f@1>2RLd@LE_XTc#ygH|3 zok$b zG-*GgY@(N_)LyxcT-UTz@}C+|OeyyeZb}@_54TUn;v6?Qm0m!(7IivsHk5pPS({mg(}B z&i2=`KcAJ?y+6)+&XhYbr_N8=#_?QaYTvmfGyhdjd2d`}mcK4j@BH7Tahh}MMDIP2 y4e(}Ul4HgdUJ}5NV_*OV2*Z*_5DO#pSRtW@7IFdJtZX3Vj6fI)r1d~1FaQ9Ljg#X5 diff --git a/py/inspect/llgo_autogen.lla b/py/inspect/llgo_autogen.lla index d4dfb55083be9a8f1827a0fa87bcd376759eba86..59f54cdfe7eb0ae56aa89b8e53cf797351a320b8 100644 GIT binary patch delta 504 zcmX@WvYw?rz?+#xgn@y9gW;L)xriL4t4FID85rzX7#R2&WEgUC((~gJOH1<8Q}gt4 zazaBm8JHCoW~V6vacKoN10%~6P~83M)^uTK9cph_CL9xf9&Bw{_NN2WmudF6TP8ipgoy=TPI7OZI9;XH`77HEjiV zm%{T6OK)^=Xq*ZcvM--b$6X3oH1zxoihZe$1_f-j8^sSNDFH zcWuj~S3e%sq&$@3y<6A&-NIQt!lE%HlsAuWpG^tR-v#|Te&_2FcKNxBb!SH`x!9Qd zWp2OVw%ziJJ*#>>+ciqF-8SyOeDiT#@YP#4_SAo^f1kU3st^C?mnW7?XDGc;cS&jf qzj?+>oM-QsUH*hSz?+dtju}ftPJYLz35v4GQcMbLM}U#VzyJU^j@~c; literal 576 zcmWIWW@Zs#U|`^2xHxxh#1jTb(H=$yhUqK}4Ezi-3^_UJ`SFRRCHd*8d3rfHp&^_M z%(MPFrp*T8(h6<{MwYKY)nEgbhMdhlWFWHt`TB|}ox)vV)q<%H62DH`kI+H-c(nptPMa`(@D^Zdnh$Lx2XR;el7sVHg7 zKCw0SLO?}1U-+s!1@bcgSa;@h?3l9uG;_I;(lllX9!o1_ui0CS*1AI z)h!9DLQ;+`Em2sbX=^SQcWeWrX&tlR)|U02LPrmn&Sh=u@r==G-muN<(AIy8f6LWu zI+kga$T0U*$F`UzsbgFB*Si%Ouxuze;xxrDW1j=>T(^vpkjdY_r80%v2X}F&dget> zYhm%uU%7P2%h&_6-nvUi|N3>;hJKH^z}_z|QvF6cz?+dtju}_9N&usqfdLqA3`-h8ER0BIg+wx11P6Gt RvVoK{0%0hSz6vsd0RW|E=-mJS diff --git a/py/json/llgo_autogen.lla b/py/json/llgo_autogen.lla index 930d998720c2ad0f29213cb10ba0eff915305888..c3c0e3174932e16a94aa4f0d73a70f59b837110b 100644 GIT binary patch delta 503 zcmZ3&vW}%bz?+#xgn@y9gWG|=Ar6u|4sd;)i zIiVq(49u(xv(wmsxU_#?n)HnOjpL5?Wwyn%$x=X~R-}SF1Zf;^fD)r=b^^WF1#WUHHeTzfe zT32mY>3qbg^{QUY>ZvjlqfD)yzjRZWzU9fbBfobaQC6{>Y$O^qWA>tjvnsbGHfk;A zNMe)jGUabrq@i-gW74v9I%~^E$% o=O%u$t(!i3LVkcZBa<96mUx_eiBS_2W0U_eDzF^}#uWnt0MXpqM*si- delta 493 zcmZ3-vV^5Rz?+#xgn@y9gP~{Hx`;zR|NbaoWMJT9VPN2AkYUKlNzac@EG@}TPtDWI z$q5bNWMFQOb5833;?fFk21b^zK-FLamQIfMK5QUz^!{f}y`!6WPu*I}k?eeCok)^ zxUPCFv}eZa9e0lEPYq)ZdU?xWVy+68EBC`~EcN-E9Fg-T^emn9O>6zihmFQ(0@rIg zW%90&ny9n+%<9cW=HIfGJFJY`n)GP7N#W|H6Qi?OubfhUBKhN%t7l+X0>7_fnOXeG}$dXXQlkN{1-0L zu(eR^oIcZ%>_&lYvCG`Idf%-*^YBgjLk-Tjoh#;gKavUylYUqo72JJ#Q~Tt3O~o(Q z@U7n%etu8Yt1FX4RV}{7Nn4eiZGERHGym5PziO__-Wp3T&dUn@GPg%?+sw{=o>iWc z+x%Z;xow<#_vzof&?&cWtf}2<|71g?m)q~znJ1R0XIdq-uQ<^zpVPMG^N+oEJ8GB$ dycwC~n6bp(_h!KA>p6Bt7b3;+_#*hK&U diff --git a/py/llgo_autogen.lla b/py/llgo_autogen.lla index f8013ee2bf060fe194811d51d9864b8a62d6fe01..36aace8390331918fee0d29f636308f0e8a26475 100644 GIT binary patch delta 397 zcmaFN^PHzXz?+#xgn@y9gW-F?xrm1ODVleHJQpSg27U$^hMb)A{P@JulKk}4JiVNp z&=5`r=8sFW(>?=nX$3a}BgbpFB^v_ouIkfA?v|UgAzHOa4F?hwy zwO1Y=cVhLdbI*N0gKh6}o7g#X^`=x={ohs6++A*#ncvm3QD<)24$-Q!janIHWe2=8 zo%c#}ynn=__p$3Yd(En{tgUC=7*i+T)VY;X)N1&vyCd>tIKzuSPeRQ^Bg&6x^fSJm zY_6Sn1KdNwq;XbTgwUza0UP_%%Z3O delta 442 zcmaFP^O&bTz?+#xgn@y9gJIRWbrDim|M%Yj@~oK{82A}v7;2X zBv*d_{75kZgccgcy zm>1Xl(%H}-mcqVuPe2y0%p@19v}H41ioUJBzxw_gQTy1(y_ri&eo5Xq%!ml0Yn#?Z za2Z@vbY)>+2<2m7-~PAV*LHWxdmZ7p`*9Ko2#!iy53laH}#DuKcdE!+aU n8JXmmAyEJ{f3hH(w5TF5P?5}KWnc!HJK2#G|=Ar6u|4sd;)i zIiVq(49t%gWT!m^;?fFk21b^zK-FLamQKE(eaJxI`2Ek}GO4buNvl&8PA%ZC{+PJo zd+wAQN2JPpy=I+Cc~c*MNxqD0Hs9|{ayxgw|6Xr5ecc1kjZ!~<3Cbl*;oiL3{IZW| z;ySN2s|5_h6Dv8mv&xi%Rz{`U+~s;QN$k$Fiu&mlEh^$c%bd81r(X{-K5up=Fju2# z#=&VxN0}FB6mc3)TC!5x`}E-}Q*VZde2P8U^WAjmMTP7m`_ddIome(C>dnfB0p8DN zE}de?J9E<1h4q&XoVKlLh}h%!Z0EN1flqj6wR~JVLFSv6!Hz6}e49r9OIE$pSPqnn z1q7zKb4hjoXEcgnypiF4w4cdg*F%oF)kgN+YhS-h<_x#j_U_z#D(dYnm#_^+Ud78Z zOU~whes{i#Yn%7=S0(cgU&{G*C#`#p#=%YHJNLOhH?t0~nE%TrzOS0=bF{{hgA=np zOzwHMY^U&EkD6|e!|K}#-8Sw$a`JOx>=durTWYuNf3d@|OYQhslaxo@Cb}DgL!O+D peZ!M^{c-tD&Yx@n-i%Cg%vj=a@fCf%c#J17#LR!3;<%$;8_3w delta 492 zcmZ3-vY4elz?+#xgn@y9gW>U%^%0Joj{NzI3=DiM3=I4XG7LF6>G|=Ar6u|4sd;)i zIiVq(49q7dxTKu|;?fFk21b^zK-FLamQIe(K4c(r^!{f}y;RrMq}8bkrw+95{b6w9 zx0#nu60i5>FsN;4UJvr z%nrI5x+Wy=QIWj(m0b2EMq5*rZhNSj=(6N-{<|k6u*pVQ(p&egZ(Q(cW|K2hBZFC& zZeEbR^n}srJyzP^lh?boPWp8fVPXFQo~H`xfs^0ZAOGLQ zv|(FDW1XPJE-|h{+fIL3a_q|8<1%`6Vji9!xE7b`ahk1}v+>aPl5JwwQ~A|xSxa87 z>07@s{QRD(uB?+?LKF60Z|hjM^8$10<>2|(GW`>)cw0@Z0(wLCP2PCO)cB&g=laY` zA3Qgvg>2otyXMaNu1gWqx32%zE@S3>@9?0rpX*k3T!)o5yZd%0OoVd-~a#s diff --git a/py/matplotlib/llgo_autogen.lla b/py/matplotlib/llgo_autogen.lla index 4bc376d7f13656fd4fecf4fec99bf775adeabf9e..d43278e039f0320f342d3b1db08a42b2009dec87 100644 GIT binary patch literal 562 zcmWIWW@Zs#U|`^2_~d&oBBiuuT^%C>Lo5pe13!ZdLrzY5etcqSNq%~2o?cE)Xb2|* zv-!g8Gz%aut>9*0WcdnI4K`ryOY=i5tG>diVs1 zm#GOQM@s&F*B$jb%xpu+z84e!{4f8$yO^1Ombu2Z?*;6eoo-!Mi#LdEYhAZtrSlP| z_N$6IE7t}@Px;w%WtX8(igl;c#UP7?=B_UUC;9E#F~RHB>_rRPs?Y6lm>bL@dAKi0 zmuZ0pH>;uN<~5?}R}&4p<}xg;y4=<27#YdD%28&D_9VA=QK?VnMKShf?S3Hn^bW)2 zRog-$E4q>^*mqVjKI?sVKJZB|tAJiv5a*5TlMkEj?YV7PGhyG43}1#n+vKiH*{#>S z?%rw7-c-gX%Z@&EXH+=L+I0VU)V!nXnjasRQnQz4_xo^5w5Fsp=FqJyzb;l>F^?ky&X8F!J!WR9L8&7MsYy1CBQxvJ!s z^~*Umi~-(^OmfV)B2oev!3+$*m||Gc2x4JGD=Q>g(V{fKo0ScuoDm2^f%I{Z2@C-J CjpRiD delta 498 zcmdnQvXZ4fz?+#xgn@y9gJC!G=7<}vtN)iWGB9|vFfi~l$S~yOr02&cmX_qFr{?M9 zG}KJGXCwg+zFSSPU84ot6Faxbgf{0Wp7e7`*wqqOKVqdw!G{* z`bdGdFROmDtW%E19HXB- zjqyumOgScLd7WWG8q>k|MY`vbt~>tU*mUvytw!NJMXcZTCVEFi=DJM2JS*ytJA0jt zKw;e8hxx&BCa2vt7f7A#61w9f)%reR+h;o=OZ5Udb>@jjO`}{UJ@Byj;dPSZ_PbLP zRCcO)dTSOMF21q$+p~uobiHzOZtdOmzv7mh>*mK(qKr;@EbF^np73OGWOdt?@?X|3 hduo^hycwC~n6X6R&iJISr1&zY_~RX|ovUlt)JDE_Ut@OfnbB>nDYK?eGC3&ed*H^an6oaK zPxH9WujN>g+L(4&@QTPbnQTc$_t1!&Wl@xZy)^RvvW8bugHIEpT4J%Ozg}F(Mwg|^avH)jBL7X zShGnlXHx=0qA(M$c*&|2yg&6djvFvY-=4rZnPWn}iqnmoXZ)^B+5JD_z|r%Q96SSq zukG`8YTIfYW;X9!Rb}dr0;_@rX0_`lFRYhScYkWE6el+xry{18u74N5H+TD_kBMfw zGr!pQIenWg`a3JHyl+qbr|tJ=)G`NnGcw6BAv@tLM E00_CwE&u=k delta 468 zcmZ3>vWUepz?+#xgn@y9gMn}Vx`>+_H{Hx*WMGhBVPN2AkYUKlNzac@EG@}TPtDWI z$q5bNWME$1>72H%(|Mw$ZoSFLECXM!Sv>7O?(Y3-zEx@V8vVDb>d)u>DcapueR!|X zZR;Jao{D$7&!?Z6Qkbaq^mW9_Lr1PEUfZ{ZPdG?Af98p@AWmQJ#_A^FY9=SMR!troD|7%89T}cD;N# zQeTfp{v11B#^vhXcSRHQrGGL#oitTcq5i*{jMCn3Vf`}4p37Z-c_6Wnv)#n1sCVDy zjfb`t8=83PXI^6R+L#tn%Dku2BIop}i0P&4-<{u+H+|B}k9ko>FEi(KyiwQwbkWB= zc#HYZ-S?-|Fa>xsGRZOHiV+E5OffJ3BZy&1BLlVNvEXs!jiK~x9}9*SlWK@ z-EEG(w`plzvNFrp^!)vP^Jm8HL%W=cJzG@wuCJG~%&xe!$8}?63;T>Im-cNx+VfIN zue3K;Sb3V&y6+qF)RtUao2Yc(OQb98kSNP^E+(f<-JHfNm+aM!&Z>AYYw8N_E`{eC zmfq;#&^Q%za863)yY5d__LqCTT~^v{NlIF?VlCrUr9M&bNve8l&5GRDHiT7fw^=?% zIw8t*nijWyy=F~Q%sxi$lFzeL4hHrYY@F(Kz|Wg6yhq@U|HJMta+5_FIriFQow{of znEt*>z+IZ5^`prl6{aPv4jk3JMYh9N z)8oKb38}exA9rX?-(9eCQmCoLGdtsw3xDkTSR)Z8G$LuKWO zBA)qzFJCOtOB4CMdbaI*^U$@uXMczPcfMEde)7wPseL}b_`Q$6HrM#{cD=E)RmqR& i9IrZt0B=SnIc98eIQbl-1}M5F|728P+YgK=1_l82F44mP literal 543 zcmWIWW@Zs#U|`^2V3@Nm;$?mO=WIp>hF{DK4Ezi-3^_UJ`SFRRCHd*8d3rfHp&^_M z%4NeX$3a}Bgb)ICA2xKiAAEOP!>}{< z#_c6bI(?4q`#tGj;p}9;4b#n@ocwI_Q#JPB-e-JApYi1-hIsvcv@Lkq>Md7Hcd5DR zlt#%1-R<#MJU4OC4NsA-utWMC=X5(bBIk?xES>aiS;>_TCuUDwv0Y^0Hnu6wDz6uD z+*)MkQ~LOM;HvPoGk)lv`ID3TWL^}bUu)i;1#_emqD-f0aray9X^gR9?k@Q}B{h&q zBz0wi8;7{{N|rZUpAbiEKFL^Xl>!6S?|*Bvtz5#`sU{~S#3fgCa^Z#Q z=#*0PvX?uwUrR}O{jV6~a~i%R-rF(pE_Qo$dAzjM(xLVOtW=cZALyLQFW$Zkko8J;(xPQ~Z zb*8LNM(#iUGa2j(m;3tUSsP3qbJQ*0JnP7{%KsZ1yXUV>Jv!6*c6sNTgxo35{4T#} zi+_DDo=+ub{=S_V%vJ&qjg%=s|6 z@7c1w(#;+W n_xP<>&wcKsd4M+~lN>Xac$|EZQ4g3=B#v3=I4XG7LF6>G|=Ar6u|4sd;)i zIiVq(49u2m+|sOoxU_f3AV$J;ir$A44! zu`cM6%IbqAoS8;4kIKzo&R;2dGo?0D-_r8?llt<@rgyYovE06QP}fH*FFwXnd6l2` z($?%CMXjl?oL6mJvSa1~H%sS;jgOl=V~qD}T5Z*I$|w#pc|7U%>Qjl%%K1^8p-GIl zq$c=rY|-pmp#LTD+RMFe1wU7*BtGyZDZ`;Dm&Qcies`>bSKl#;x0%ZCc)`~%a^ zJ1jc)Ui0*#dX^0jrnXo*O?kT`WkdL!Lo**PeyzD@v0mCXCx*ffMUiC(o_o%IS1+;e z5yO;Yvn!6Xu;|Tf*ztO^#8tb>{~Mb&&)=GUG(+Lm?v#Cr$x{;-E;sFqon<$VUuBPf zzM0&M1@UZu552ZrY5GHwrSuKsw#BxSB<9z|JZJ7as;ctoiHF(G5WnLFx9{~X^sMuo zJT2f|c9Uy)w>f`%?%JsvUBADoyZE|HbGF>_%acx?fADhV-PH3s2RJrR@jb-R4;LHZ847R%ZE{p1<36 z$dL88r>>bb z!RvZkXO4cLMihrS&oK^WC$q(R=ax+RrnY|N!$#xtf$ue%d=mUO3JC^G+1b>RQ@`m< z_vTL)(ntIng7#(}by=^omN8WM+bPwXN8UwcK52|%-1;f@Lr+m&L*~;xQ(Bj+G?q^| zEuL`j!9SVf2Ll)$Ch1RYXr3mc_d<8a+(Yb{-TmP#3SYi1SazpW()4SbUzP@ULb}a5 zgFc3rehMwQ>yAdgv3g+_X7DT0x}d50++6SaH$q`y(hrNHg1i5}Q1GczI=9;RPwt(= zK6BF^noJT^-7&Mm^+m$3gZwV%IOiPC^iL_|ooHeu*taj(=#bg&OX{BMJud}##h%gF zX1%Y{Ca*h4diK`!-_GyL?R)ex(~EaziAwPCx9SF;US6N4_;$`eKP%Pv0B=SnIc8{t t@gT?89*0Wcdn=MR3Fhc(bwrk1gHc#P)h>@6aWAK2mpqru2^Zg6lHV)002t_000jF8~|)=XK!C&b#!lM zWo|BPY*kbV00VqpLuP(nLykyR3};_u2Vq zw{C-!E|)~u?{n;8aVS(r~(V9jRt9jK$|@Gn!G;De@_~BPjLCF zBw;@Vi94+|-($nTN?$Y0F{K)alFmXJcuZ4x1HOC)5}Zt*k|c-#3tmb{5u$9zC4;@< z6fWo_n9krGbu}j|1Q7aqgu)bf8ntC!&gE1VK%t$HbB#dYf(Zz_T#K{Vbd*(=QP@~fB)zpOa~&)t2g{@%7bRf3=CQ<3=I4XG7LF6>G|=Ar6u|4sd;)i zIiVq(49wFOW~WUD;?fFk21b^zK-FLamQIe(K4c(r^!{f}y;RrMMOXJ(q&_$tS0nMJ zR$4VTNxW?K6qAW3ZcicjxnYlk4yMUjMLQhU>n)?bZ^ahxXjcnYFqo zYz0@Yt+URRHCAV`4!bQ03wv&Jm-ES_X?HZ6Hg`2lIQz3}<%C0bM5bkl?I>ei)uYs5 z`9|ZK4O7>m2?px3O}?($V&!A3eSsr#cag{^-;;B`?>dz+L2To7-IHo%sZ+(Ovn(QB z25+8Xv`jI4Q@vS;RK>2=a)Hz0Cz|(tEtX+#HczZkS83lX#G_~FZ!qrwdnWU7Z6<+V zA}chC)w^d+`G3HOh4I9ebm3!y3TG{xZp_m0yQWwCePdJi{H>3V%shUpv~zA^?v!Wu zE@zxx-z9ghnr)ru^_SlR+D}>@J*4Rp7xv)6?_U=Vets+7?&%7zdO5Y qe%+p{{Px$MTua6H0B=SnIc6*oIr%c9CMe1#|7TQSI|7U>1_l7Ve%~Sh delta 494 zcmZ3_vXrGhz?+#xgn@y9gJJIGO%WoRCi@B*85ks37#R2&WEgUC((~gJOH1<8Q}gt4 zazaBm8JIP9d!%UtacKoN10%~VNoPyzg(YW~W=nqA;LYEB zce|j>?Xzb@tS!nSC4av!-nVOQ>e9tKRSsQReZ9Vail|M-yMUZ`5Bc0$x2)HjZxnm1 zb=`%lhDi$_XUSim*6*=)Zlcm{FOjZkhr(IXwV9l*JvUw!KDC2f9p(n<*TjccUibTN^Xa=$m|(Q4G|=Ar6u|4sd;)i zIiVq(49v?HW~Z$H;?fFk21b^zK-FLamQFsHb;v=W?fq{N=ZpZw85vaqOCKy0=Wo4t zTj<)GS$eYNhtrgKm%hJu^GJs1t*A4ql4WWC>g)I2)Om2QL+a@(xpxTx8sDSVAK!WN zSgYp7bxB7K9Z3}q_ccwJx-wU9bFb6NpJ73+AF^E!-1zjpXXB+)cSTIMD=jEvon`7C zAbg`>O$v)l=)%N9(;}a(-n2*x=v^msy`FDg-b2|dZ&*Jy?6On$EC@+)%9}E6gR$2E)nJyxf;Ah?r5U9&EHrOu z*hP*5x2lv9g&03=b>Xm{_%hOG-go)p9X}!klr(KF)=qC>(N16UW!AZC zpR`^-T$1kK`)#gYSmhmYRe#OMr?-VVcKh>o&W?XI@!-!h&kJwG8qbJ3tkBEnv-o|? znv%D*FI+EWyF}S&9<@CF?w_9g?5o>MuBF~x{oAI#brHgfHy`IQGBB{PFfi~l$S~yOr02&cmX_qFr{?M9 z5-{dPj}eQ{RTkA8Xsd9{)|@ z$GV_RDyt8gXl5GeJSzYG?S6^y^OV|5eM`&lPwJ=NR=p$rZfeB+gStIMFXR5C9r6); zzAR*4*VI$KG1m%1!1IQ*c~&IH#ESC z`i&70;ekYM$C6~1`pkCi?JTelRs&t+IYyTWGioah9%@V+eee)A7(MgMqo z95ydk;Z#~s@AXV-SxdpjsZj^cdGI|?;ahk7gWs-_lT8dQz6_}v?3TT^V*XqF3KwYT zb!Feu?QpR-K%mSw&D}KZoxNDWx6LjtP38*K(^;g$&P81OQgW@kdr|x4M#foR{MgMc zI-d7dv?ZPF5}Hu0%sVlGvnEhi{vjh<>$llerebB% z;@ghw>JsFZp8oqrw7MB{*v(sSen0#~ToQ-C;?u(k18!ec|dP~&( zf^bCfnh+M5(!_*An{4u5eJZlgd#xe9wQ{@LihV1-@cH!K5I-9+Eg(=o6;Q%-u|AYa?o?C=hka(2hU}3UOy|u*2bVsO6%M8I61>o+)ZcQ zyZXxQ^TQ?29dh~ho|{&6OJ=FRW^8vZ=aK!Me4TNd?+Lem-g*9U+?MACdt05QWOusR z-?VsoyZU1HlIvY4elz?+#xgn@y9gW=HHjS+xSSyH`!u2Jxj zotjhECoL@!o__p>R=TS%OIxarBk3a0l<&d$)`bckpVXe*kqdBw?Z`YiE@ z4BNzPFBmYnZg+CLv27-Q)|tDtIu9SEw=Q5=Z;<_bQo>=b#~r(tZ;p$Rw43u)=EAbi zQg>4IB+6x&lcrRio3jo zaZ1wJ6Re=F{YEZwM=9shQ|W!|(&Ctv1C8NIBW)A2@K`%|F5dGHqFpS$n3)G!5j cGcw6BV~M=Uw;44-(KMNzNr7z#FoGBu05=`easU7T diff --git a/ssa/abitype.go b/ssa/abitype.go index a18aadce..bf4697d2 100644 --- a/ssa/abitype.go +++ b/ssa/abitype.go @@ -354,7 +354,7 @@ func (b Builder) abiType(t types.Type) Expr { if g == nil { prog := b.Prog g = pkg.doNewVar(name, prog.AbiTypePtrPtr()) - g.Init(prog.Nil(g.Type)) + g.InitNil() if pub { g.impl.SetLinkage(llvm.LinkOnceAnyLinkage) } diff --git a/ssa/decl.go b/ssa/decl.go index 637d6aa4..caffa5fe 100644 --- a/ssa/decl.go +++ b/ssa/decl.go @@ -67,7 +67,7 @@ func (p Package) NewConst(name string, val constant.Value) NamedConst { type aGlobal struct { Expr - array bool + //array bool } // A Global is a named Value holding the address of a package-level @@ -92,17 +92,11 @@ func (p Package) NewVarEx(name string, t Type) Global { } func (p Package) doNewVar(name string, t Type) Global { - var gbl llvm.Value - var array bool - if t.kind == vkPtr && p.Prog.Elem(t).kind == vkArray { // TODO(xsw): check this code - typ := p.Prog.Elem(t).ll - gbl = llvm.AddGlobal(p.mod, typ, name) - gbl.SetInitializer(llvm.Undef(typ)) - array = true - } else { - gbl = llvm.AddGlobal(p.mod, t.ll, name) - } - ret := &aGlobal{Expr{gbl, t}, array} + typ := p.Prog.Elem(t).ll + gbl := llvm.AddGlobal(p.mod, typ, name) + alignment := p.Prog.td.ABITypeAlignment(typ) + gbl.SetAlignment(alignment) + ret := &aGlobal{Expr{gbl, t}} p.vars[name] = ret return ret } @@ -114,12 +108,13 @@ func (p Package) VarOf(name string) Global { // Init initializes the global variable with the given value. func (g Global) Init(v Expr) { - if g.array && v.kind == vkPtr { // TODO(xsw): check this code - return - } g.impl.SetInitializer(v.impl) } +func (g Global) InitNil() { + g.impl.SetInitializer(llvm.ConstNull(g.impl.GlobalValueType())) +} + // ----------------------------------------------------------------------------- // Function represents the parameters, results, and code of a function diff --git a/ssa/eh.go b/ssa/eh.go index 3daa4c72..dfbfcb89 100644 --- a/ssa/eh.go +++ b/ssa/eh.go @@ -102,8 +102,7 @@ func (p Package) keyInit(name string) { return } prog := p.Prog - keyNil := prog.Nil(prog.CIntPtr()) - keyVar.Init(keyNil) + keyVar.InitNil() keyVar.impl.SetLinkage(llvm.LinkOnceAnyLinkage) b := p.afterBuilder() diff --git a/ssa/python.go b/ssa/python.go index b9520bee..8bbabcc4 100644 --- a/ssa/python.go +++ b/ssa/python.go @@ -217,7 +217,7 @@ func (p Package) PyNewModVar(name string, doInit bool) Global { objPtr := prog.PyObjectPtrPtr().raw.Type g := p.NewVar(name, objPtr, InC) if doInit { - g.Init(prog.Nil(g.Type)) + g.InitNil() g.impl.SetLinkage(llvm.LinkOnceAnyLinkage) } p.pymods[name] = g @@ -372,7 +372,7 @@ func (p Package) PyNewFunc(name string, sig *types.Signature, doInit bool) PyObj obj := p.NewVar(name, prog.PyObjectPtrPtr().RawType(), InC) if doInit { prog.NeedPyInit = true - obj.Init(prog.Nil(obj.Type)) + obj.InitNil() obj.impl.SetLinkage(llvm.LinkOnceAnyLinkage) } ty := &aType{obj.ll, rawType{types.NewPointer(sig)}, vkPyFuncRef} diff --git a/ssa/ssa_test.go b/ssa/ssa_test.go index fb14d9c6..456b5ec5 100644 --- a/ssa/ssa_test.go +++ b/ssa/ssa_test.go @@ -189,19 +189,20 @@ func TestPyFunc(t *testing.T) { func TestVar(t *testing.T) { prog := NewProgram(nil) pkg := prog.NewPackage("bar", "foo/bar") - a := pkg.NewVar("a", types.Typ[types.Int], InGo) - if pkg.NewVar("a", types.Typ[types.Int], InGo) != a { + typ := types.NewPointer(types.Typ[types.Int]) + a := pkg.NewVar("a", typ, InGo) + if pkg.NewVar("a", typ, InGo) != a { t.Fatal("NewVar(a) failed") } - pkg.NewVarEx("a", prog.Type(types.Typ[types.Int], InGo)) + pkg.NewVarEx("a", prog.Type(typ, InGo)) a.Init(prog.Val(100)) - b := pkg.NewVar("b", types.Typ[types.Int], InGo) + b := pkg.NewVar("b", typ, InGo) b.Init(a.Expr) assertPkg(t, pkg, `; ModuleID = 'foo/bar' source_filename = "foo/bar" -@a = global i64 100 -@b = global i64 @a +@a = global i64 100, align 8 +@b = global i64 @a, align 8 `) } @@ -227,11 +228,11 @@ func TestStruct(t *testing.T) { prog := NewProgram(nil) pkg := prog.NewPackage("bar", "foo/bar") - pkg.NewVar("a", empty, InGo) + pkg.NewVar("a", types.NewPointer(empty), InGo) assertPkg(t, pkg, `; ModuleID = 'foo/bar' source_filename = "foo/bar" -@a = external global {} +@a = external global {}, align 1 `) if prog.NeedRuntime { t.Fatal("NeedRuntime?") @@ -244,7 +245,7 @@ func TestNamedStruct(t *testing.T) { prog := NewProgram(nil) pkg := prog.NewPackage("bar", "foo/bar") - pkg.NewVar("a", empty, InGo) + pkg.NewVar("a", types.NewPointer(empty), InGo) if pkg.VarOf("a") == nil { t.Fatal("VarOf failed") } @@ -253,7 +254,7 @@ source_filename = "foo/bar" %bar.Empty = type {} -@a = external global %bar.Empty +@a = external global %bar.Empty, align 1 `) } @@ -358,14 +359,14 @@ func TestFuncMultiRet(t *testing.T) { types.NewVar(0, nil, "c", types.Typ[types.Int]), types.NewVar(0, nil, "d", types.Typ[types.Float64])) sig := types.NewSignatureType(nil, nil, nil, params, rets, false) - a := pkg.NewVar("a", types.Typ[types.Int], InGo) + a := pkg.NewVar("a", types.NewPointer(types.Typ[types.Int]), InGo) fn := pkg.NewFunc("fn", sig, InGo) b := fn.MakeBody(1) b.Return(a.Expr, fn.Param(0)) assertPkg(t, pkg, `; ModuleID = 'foo/bar' source_filename = "foo/bar" -@a = external global i64 +@a = external global i64, align 8 define { i64, double } @fn(double %0) { _llgo_0: