diff --git a/compiler/cl/_testgo/reflect/out.ll b/compiler/cl/_testgo/reflect/out.ll index 9a6bbf60..c25ba795 100644 --- a/compiler/cl/_testgo/reflect/out.ll +++ b/compiler/cl/_testgo/reflect/out.ll @@ -90,7 +90,7 @@ _llgo_0: %13 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @reflect.Value.Type(%reflect.Value %11) %14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %13) %15 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %13, 0 - %16 = getelementptr ptr, ptr %15, i64 31 + %16 = getelementptr ptr, ptr %15, i64 37 %17 = load ptr, ptr %16, align 8 %18 = insertvalue { ptr, ptr } undef, ptr %17, 0 %19 = insertvalue { ptr, ptr } %18, ptr %14, 1 @@ -185,7 +185,7 @@ _llgo_0: %6 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @reflect.Value.Type(%reflect.Value %4) %7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %6) %8 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %6, 0 - %9 = getelementptr ptr, ptr %8, i64 31 + %9 = getelementptr ptr, ptr %8, i64 37 %10 = load ptr, ptr %9, align 8 %11 = insertvalue { ptr, ptr } undef, ptr %10, 0 %12 = insertvalue { ptr, ptr } %11, ptr %7, 1 @@ -286,7 +286,7 @@ _llgo_0: %16 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @reflect.Value.Type(%reflect.Value %14) %17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %16) %18 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %16, 0 - %19 = getelementptr ptr, ptr %18, i64 31 + %19 = getelementptr ptr, ptr %18, i64 37 %20 = load ptr, ptr %19, align 8 %21 = insertvalue { ptr, ptr } undef, ptr %20, 0 %22 = insertvalue { ptr, ptr } %21, ptr %17, 1 @@ -393,7 +393,7 @@ _llgo_0: %8 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @reflect.Value.Type(%reflect.Value %6) %9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %8) %10 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %8, 0 - %11 = getelementptr ptr, ptr %10, i64 31 + %11 = getelementptr ptr, ptr %10, i64 37 %12 = load ptr, ptr %11, align 8 %13 = insertvalue { ptr, ptr } undef, ptr %12, 0 %14 = insertvalue { ptr, ptr } %13, ptr %9, 1 @@ -827,7 +827,7 @@ _llgo_9: ; preds = %_llgo_8, %_llgo_7 %60 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @reflect.Value.Type(%reflect.Value %11) %61 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %60) %62 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %60, 0 - %63 = getelementptr ptr, ptr %62, i64 18 + %63 = getelementptr ptr, ptr %62, i64 20 %64 = load ptr, ptr %63, align 8 %65 = insertvalue { ptr, ptr } undef, ptr %64, 0 %66 = insertvalue { ptr, ptr } %65, ptr %61, 1 @@ -839,7 +839,7 @@ _llgo_9: ; preds = %_llgo_8, %_llgo_7 %72 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @reflect.Value.Type(%reflect.Value %11) %73 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %72) %74 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %72, 0 - %75 = getelementptr ptr, ptr %74, i64 9 + %75 = getelementptr ptr, ptr %74, i64 11 %76 = load ptr, ptr %75, align 8 %77 = insertvalue { ptr, ptr } undef, ptr %76, 0 %78 = insertvalue { ptr, ptr } %77, ptr %73, 1 @@ -1009,7 +1009,7 @@ _llgo_9: ; preds = %_llgo_8, %_llgo_7 %77 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @reflect.Value.Type(%reflect.Value %10) %78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %77) %79 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %77, 0 - %80 = getelementptr ptr, ptr %79, i64 18 + %80 = getelementptr ptr, ptr %79, i64 20 %81 = load ptr, ptr %80, align 8 %82 = insertvalue { ptr, ptr } undef, ptr %81, 0 %83 = insertvalue { ptr, ptr } %82, ptr %78, 1 @@ -1021,7 +1021,7 @@ _llgo_9: ; preds = %_llgo_8, %_llgo_7 %89 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @reflect.Value.Type(%reflect.Value %10) %90 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %89) %91 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %89, 0 - %92 = getelementptr ptr, ptr %91, i64 9 + %92 = getelementptr ptr, ptr %91, i64 11 %93 = load ptr, ptr %92, align 8 %94 = insertvalue { ptr, ptr } undef, ptr %93, 0 %95 = insertvalue { ptr, ptr } %94, ptr %90, 1 diff --git a/compiler/cl/compile.go b/compiler/cl/compile.go index 7bdef093..917309f3 100644 --- a/compiler/cl/compile.go +++ b/compiler/cl/compile.go @@ -1112,7 +1112,7 @@ func processPkg(ctx *context, ret llssa.Package, pkg *ssa.Package) { } } sort.Slice(typs, func(i, j int) bool { - return typs[i].Obj().Name() < typs[j].Obj().Name() + return typs[i].String() < typs[j].String() }) for _, typ := range typs { ctx.compileMethods(ret, typ)