internal/runtime: named(ptr) type preset for method type

This commit is contained in:
visualfc
2024-12-20 11:37:30 +08:00
parent 05334de855
commit d251232f8a
20 changed files with 943 additions and 969 deletions

View File

@@ -16,9 +16,9 @@ source_filename = "main"
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
@_llgo_main.impl = linkonce global ptr null, align 8
@1 = private unnamed_addr constant [9 x i8] c"main.impl", align 1
@1 = private unnamed_addr constant [4 x i8] c"main", align 1
@2 = private unnamed_addr constant [4 x i8] c"impl", align 1
@"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8
@2 = private unnamed_addr constant [4 x i8] c"main", align 1
@3 = private unnamed_addr constant [3 x i8] c"one", align 1
@4 = private unnamed_addr constant [8 x i8] c"main.one", align 1
@_llgo_int = linkonce global ptr null, align 8
@@ -26,12 +26,11 @@ source_filename = "main"
@5 = private unnamed_addr constant [8 x i8] c"main.two", align 1
@_llgo_string = linkonce global ptr null, align 8
@"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null, align 8
@6 = private unnamed_addr constant [4 x i8] c"impl", align 1
@"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA" = linkonce global ptr null, align 8
@_llgo_main.I = linkonce global ptr null, align 8
@7 = private unnamed_addr constant [6 x i8] c"main.I", align 1
@8 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1
@9 = private unnamed_addr constant [4 x i8] c"pass", align 1
@6 = private unnamed_addr constant [1 x i8] c"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:
@@ -322,7 +321,7 @@ _llgo_15: ; preds = %_llgo_23
unreachable
_llgo_16: ; preds = %_llgo_23
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @9, i64 4 })
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @8, i64 4 })
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
ret i32 0
@@ -345,7 +344,7 @@ _llgo_17: ; preds = %_llgo_4
_llgo_18: ; preds = %_llgo_4
%126 = load ptr, ptr @_llgo_string, align 8
%127 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @8, i64 21 }, ptr %127, align 8
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 21 }, ptr %127, align 8
%128 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %126, 0
%129 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %128, ptr %127, 1
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %129)
@@ -370,7 +369,7 @@ _llgo_19: ; preds = %_llgo_6
_llgo_20: ; preds = %_llgo_6
%142 = load ptr, ptr @_llgo_string, align 8
%143 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @8, i64 21 }, ptr %143, align 8
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 21 }, ptr %143, align 8
%144 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %142, 0
%145 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %144, ptr %143, 1
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %145)
@@ -396,7 +395,7 @@ _llgo_21: ; preds = %_llgo_12
_llgo_22: ; preds = %_llgo_12
%159 = load ptr, ptr @_llgo_string, align 8
%160 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @8, i64 21 }, ptr %160, align 8
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 21 }, ptr %160, align 8
%161 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %159, 0
%162 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %161, ptr %160, 1
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %162)
@@ -422,7 +421,7 @@ _llgo_23: ; preds = %_llgo_14
_llgo_24: ; preds = %_llgo_14
%176 = load ptr, ptr @_llgo_string, align 8
%177 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @8, i64 21 }, ptr %177, align 8
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 21 }, ptr %177, align 8
%178 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %176, 0
%179 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %178, ptr %177, 1
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %179)
@@ -438,7 +437,7 @@ declare void @"github.com/goplus/llgo/internal/runtime.init"()
define void @"main.init$after"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 9 }, i64 25, i64 0, i64 2, i64 2)
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 4 }, i64 25, i64 0, i64 2, i64 2)
store ptr %0, ptr @_llgo_main.impl, align 8
%1 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
%2 = icmp eq ptr %1, null
@@ -449,7 +448,7 @@ _llgo_1: ; preds = %_llgo_0
%4 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %3, 0
%5 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %4, i64 0, 1
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %5, i64 0, 2
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 4 }, i64 0, %"github.com/goplus/llgo/internal/runtime.Slice" %6)
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, i64 0, %"github.com/goplus/llgo/internal/runtime.Slice" %6)
store ptr %7, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
br label %_llgo_2
@@ -551,7 +550,7 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_8
%66 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %63, 0
%67 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %66, i64 2, 1
%68 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %67, i64 2, 2
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %0, %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 4 }, ptr %8, %"github.com/goplus/llgo/internal/runtime.Slice" %62, %"github.com/goplus/llgo/internal/runtime.Slice" %68)
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %0, ptr %8, %"github.com/goplus/llgo/internal/runtime.Slice" %62, %"github.com/goplus/llgo/internal/runtime.Slice" %68)
%69 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
%70 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
%71 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 8 }, ptr undef }, ptr %69, 1
@@ -564,9 +563,9 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_8
%76 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %73, 0
%77 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %76, i64 2, 1
%78 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %77, i64 2, 2
%79 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %78)
%79 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %78)
store ptr %79, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
%80 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 6 })
%80 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 1 })
%81 = load ptr, ptr @_llgo_main.I, align 8
%82 = icmp eq ptr %81, null
br i1 %82, label %_llgo_11, label %_llgo_12
@@ -598,7 +597,7 @@ _llgo_14: ; preds = %_llgo_13, %_llgo_12
ret void
}
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String", i64, i64, i64, i64)
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String", 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")
@@ -606,7 +605,7 @@ declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/l
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
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.InitNamed"(ptr, ptr, %"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice")
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)