diff --git a/_demo/go/gotoken/main.go b/_demo/go/gotoken/main.go new file mode 100644 index 00000000..ac5cad27 --- /dev/null +++ b/_demo/go/gotoken/main.go @@ -0,0 +1,356 @@ +package main + +import ( + "fmt" + "go/token" +) + +func main() { + testPos() + testToken() + testFileSet() + testFile() + testPosition() + testTokenPrecedence() + testTokenKeywords() + testUtilityFunctions() +} + +func testPos() { + fmt.Println("=== Test Pos ===") + + pos1 := token.Pos(100) + pos2 := token.Pos(200) + + if pos1 != 100 { + panic(fmt.Sprintf("Expected pos1 to be 100, got %d", pos1)) + } + if pos2 != 200 { + panic(fmt.Sprintf("Expected pos2 to be 200, got %d", pos2)) + } + fmt.Printf("Pos1: %d, Pos2: %d\n", pos1, pos2) + + if !pos1.IsValid() { + panic("Expected pos1.IsValid() to be true") + } + fmt.Printf("Pos1.IsValid(): %v\n", pos1.IsValid()) + + noPos := token.NoPos + if noPos != 0 { + panic(fmt.Sprintf("Expected NoPos to be 0, got %d", noPos)) + } + if noPos.IsValid() { + panic("Expected NoPos.IsValid() to be false") + } + fmt.Printf("NoPos: %d, IsValid: %v\n", noPos, noPos.IsValid()) + + fmt.Println("SUCCESS: Pos operations work correctly\n") +} + +func testToken() { + fmt.Println("\n=== Test Token Types ===") + + expectedStrings := map[token.Token]string{ + token.ADD: "+", + token.SUB: "-", + token.MUL: "*", + token.QUO: "/", + token.LPAREN: "(", + token.RPAREN: ")", + token.EQL: "==", + token.NEQ: "!=", + } + + for tok, expected := range expectedStrings { + if tok.String() != expected { + panic(fmt.Sprintf("Expected %v.String() to be %q, got %q", tok, expected, tok.String())) + } + } + + tokens := []token.Token{ + token.ILLEGAL, + token.EOF, + token.COMMENT, + token.IDENT, + token.INT, + token.FLOAT, + token.IMAG, + token.CHAR, + token.STRING, + token.ADD, + token.SUB, + token.MUL, + token.QUO, + token.REM, + token.AND, + token.OR, + token.XOR, + token.SHL, + token.SHR, + token.AND_NOT, + token.ADD_ASSIGN, + token.SUB_ASSIGN, + token.MUL_ASSIGN, + token.QUO_ASSIGN, + token.REM_ASSIGN, + token.AND_ASSIGN, + token.OR_ASSIGN, + token.XOR_ASSIGN, + token.SHL_ASSIGN, + token.SHR_ASSIGN, + token.AND_NOT_ASSIGN, + token.LAND, + token.LOR, + token.ARROW, + token.INC, + token.DEC, + token.EQL, + token.LSS, + token.GTR, + token.ASSIGN, + token.NOT, + token.NEQ, + token.LEQ, + token.GEQ, + token.DEFINE, + token.ELLIPSIS, + token.LPAREN, + token.LBRACK, + token.LBRACE, + token.COMMA, + token.PERIOD, + token.RPAREN, + token.RBRACK, + token.RBRACE, + token.SEMICOLON, + token.COLON, + } + + for _, tok := range tokens { + fmt.Printf("Token: %s (String: %q)\n", tok, tok.String()) + } + + fmt.Println("SUCCESS: Token types work correctly\n") +} + +func testTokenKeywords() { + fmt.Println("\n=== Test Keywords ===") + + keywords := []token.Token{ + token.BREAK, + token.CASE, + token.CHAN, + token.CONST, + token.CONTINUE, + token.DEFAULT, + token.DEFER, + token.ELSE, + token.FALLTHROUGH, + token.FOR, + token.FUNC, + token.GO, + token.GOTO, + token.IF, + token.IMPORT, + token.INTERFACE, + token.MAP, + token.PACKAGE, + token.RANGE, + token.RETURN, + token.SELECT, + token.STRUCT, + token.SWITCH, + token.TYPE, + token.VAR, + } + + for _, kw := range keywords { + if !kw.IsKeyword() { + panic(fmt.Sprintf("Expected %s to be a keyword", kw)) + } + fmt.Printf("Keyword: %s, IsKeyword: %v\n", kw, kw.IsKeyword()) + } + + if token.ADD.IsKeyword() { + panic("Expected ADD operator to not be a keyword") + } + if token.IDENT.IsKeyword() { + panic("Expected IDENT token to not be a keyword") + } + + fmt.Println("SUCCESS: Keyword checks work correctly\n") +} + +func testTokenPrecedence() { + fmt.Println("\n=== Test Token Precedence ===") + + if token.MUL.Precedence() <= token.ADD.Precedence() { + panic("Expected MUL to have higher precedence than ADD") + } + if token.LAND.Precedence() <= token.LOR.Precedence() { + panic("Expected LAND to have higher precedence than LOR") + } + if token.MUL.Precedence() != token.QUO.Precedence() { + panic("Expected MUL and QUO to have same precedence") + } + if token.ADD.Precedence() != token.SUB.Precedence() { + panic("Expected ADD and SUB to have same precedence") + } + + operators := []token.Token{ + token.ADD, + token.SUB, + token.MUL, + token.QUO, + token.REM, + token.LAND, + token.LOR, + token.EQL, + token.LSS, + token.GTR, + } + + for _, op := range operators { + fmt.Printf("Operator: %s, Precedence: %d\n", op, op.Precedence()) + } + + fmt.Println("SUCCESS: Precedence operations work correctly\n") +} + +func testFileSet() { + fmt.Println("\n=== Test FileSet ===") + + fset := token.NewFileSet() + + file1 := fset.AddFile("file1.go", -1, 1000) + file2 := fset.AddFile("file2.go", -1, 2000) + + fmt.Printf("Added file1: %s, Base: %d, Size: %d\n", file1.Name(), file1.Base(), file1.Size()) + fmt.Printf("Added file2: %s, Base: %d, Size: %d\n", file2.Name(), file2.Base(), file2.Size()) + + pos := file1.Pos(100) + retrievedFile := fset.File(pos) + if retrievedFile != file1 { + panic("FileSet.File failed to retrieve correct file") + } + + position := fset.Position(pos) + fmt.Printf("Position at offset 100: %s\n", position) + + fmt.Println("SUCCESS: FileSet operations work correctly\n") +} + +func testFile() { + fmt.Println("\n=== Test File ===") + + fset := token.NewFileSet() + file := fset.AddFile("test.go", -1, 1000) + + if file.Name() != "test.go" { + panic(fmt.Sprintf("Expected file name to be 'test.go', got %q", file.Name())) + } + if file.Size() != 1000 { + panic(fmt.Sprintf("Expected file size to be 1000, got %d", file.Size())) + } + + file.AddLine(0) + file.AddLine(50) + file.AddLine(100) + + if file.LineCount() != 3 { + panic(fmt.Sprintf("Expected line count to be 3, got %d", file.LineCount())) + } + + fmt.Printf("File name: %s\n", file.Name()) + fmt.Printf("File base: %d\n", file.Base()) + fmt.Printf("File size: %d\n", file.Size()) + fmt.Printf("File line count: %d\n", file.LineCount()) + + pos := file.Pos(50) + fmt.Printf("Pos at offset 50: %d\n", pos) + + offset := file.Offset(pos) + if offset != 50 { + panic(fmt.Sprintf("Expected offset to be 50, got %d", offset)) + } + fmt.Printf("Offset of pos: %d\n", offset) + + line := file.Line(pos) + if line != 2 { + panic(fmt.Sprintf("Expected line to be 2, got %d", line)) + } + fmt.Printf("Line number at pos: %d\n", line) + + lineStart := file.LineStart(2) + fmt.Printf("Line 2 starts at pos: %d\n", lineStart) + + position := file.Position(pos) + fmt.Printf("Position: %s\n", position) + + fmt.Println("SUCCESS: File operations work correctly\n") +} + +func testPosition() { + fmt.Println("\n=== Test Position ===" ) + + pos := token.Position{ + Filename: "test.go", + Offset: 100, + Line: 5, + Column: 10, + } + + if !pos.IsValid() { + panic("Expected valid position to be valid") + } + if pos.Filename != "test.go" { + panic(fmt.Sprintf("Expected filename to be 'test.go', got %q", pos.Filename)) + } + if pos.Line != 5 { + panic(fmt.Sprintf("Expected line to be 5, got %d", pos.Line)) + } + if pos.Column != 10 { + panic(fmt.Sprintf("Expected column to be 10, got %d", pos.Column)) + } + + fmt.Printf("Position: %s\n", pos.String()) + fmt.Printf("Filename: %s, Line: %d, Column: %d, Offset: %d\n", + pos.Filename, pos.Line, pos.Column, pos.Offset) + fmt.Printf("IsValid: %v\n", pos.IsValid()) + + invalidPos := token.Position{} + if invalidPos.IsValid() { + panic("Expected empty position to be invalid") + } + fmt.Printf("Invalid position IsValid: %v\n", invalidPos.IsValid()) + + fmt.Println("SUCCESS: Position operations work correctly\n") +} + +func testUtilityFunctions() { + fmt.Println("\n=== Test Utility Functions ===") + + fmt.Printf("IsExported(\"Foo\"): %v\n", token.IsExported("Foo")) + fmt.Printf("IsExported(\"foo\"): %v\n", token.IsExported("foo")) + fmt.Printf("IsExported(\"_foo\"): %v\n", token.IsExported("_foo")) + + fmt.Printf("IsIdentifier(\"foo\"): %v\n", token.IsIdentifier("foo")) + fmt.Printf("IsIdentifier(\"foo123\"): %v\n", token.IsIdentifier("foo123")) + fmt.Printf("IsIdentifier(\"123foo\"): %v\n", token.IsIdentifier("123foo")) + fmt.Printf("IsIdentifier(\"foo-bar\"): %v\n", token.IsIdentifier("foo-bar")) + + fmt.Printf("IsKeyword(\"func\"): %v\n", token.IsKeyword("func")) + fmt.Printf("IsKeyword(\"if\"): %v\n", token.IsKeyword("if")) + fmt.Printf("IsKeyword(\"foo\"): %v\n", token.IsKeyword("foo")) + + lookupFunc := token.Lookup("func") + fmt.Printf("Lookup(\"func\"): %s\n", lookupFunc) + + lookupIdent := token.Lookup("myVar") + fmt.Printf("Lookup(\"myVar\"): %s\n", lookupIdent) + + lookupFor := token.Lookup("for") + fmt.Printf("Lookup(\"for\"): %s\n", lookupFor) + + fmt.Println("SUCCESS: Utility functions work correctly\n") +} diff --git a/_demo/go/gotypes/main.go b/_demo/go/gotypes/main.go new file mode 100644 index 00000000..e7630e01 --- /dev/null +++ b/_demo/go/gotypes/main.go @@ -0,0 +1,488 @@ +package main + +import ( + "fmt" + "go/token" + "go/types" +) + +func main() { + testBasicTypes() + testObjects() + testScope() + testPackage() + testNamed() + testInterface() + testStruct() + testSignature() + testTuple() + testArray() + testSlice() + testPointer() + testMap() + testChan() + testTypeComparison() + testTypeChecking() + testStringFunctions() + testLookupFunctions() + testUtilityFunctions() +} + +func testBasicTypes() { + fmt.Println("=== Test Basic Types ===") + + intType := types.Typ[types.Int] + fmt.Printf("Int type: %v, Kind: %v\n", intType, intType.Kind()) + if intType.Kind() != types.Int { + panic(fmt.Sprintf("Int type kind mismatch: expected %v, got %v", types.Int, intType.Kind())) + } + + stringType := types.Typ[types.String] + fmt.Printf("String type: %v, Kind: %v\n", stringType, stringType.Kind()) + if stringType.Kind() != types.String { + panic(fmt.Sprintf("String type kind mismatch: expected %v, got %v", types.String, stringType.Kind())) + } + + boolType := types.Typ[types.Bool] + fmt.Printf("Bool type: %v, Kind: %v\n", boolType, boolType.Kind()) + if boolType.Kind() != types.Bool { + panic(fmt.Sprintf("Bool type kind mismatch: expected %v, got %v", types.Bool, boolType.Kind())) + } + + float64Type := types.Typ[types.Float64] + fmt.Printf("Float64 type: %v, Kind: %v\n", float64Type, float64Type.Kind()) + if float64Type.Kind() != types.Float64 { + panic(fmt.Sprintf("Float64 type kind mismatch: expected %v, got %v", types.Float64, float64Type.Kind())) + } + + fmt.Println("SUCCESS: Basic types work correctly\n") +} + +func testObjects() { + fmt.Println("\n=== Test Objects (Var, Const, Func, TypeName) ===") + + varObj := types.NewVar(token.NoPos, nil, "x", types.Typ[types.Int]) + fmt.Printf("Var: Name=%s, Type=%v\n", varObj.Name(), varObj.Type()) + if varObj.Name() != "x" { + panic(fmt.Sprintf("Var name mismatch: expected x, got %s", varObj.Name())) + } + if varObj.Type() != types.Typ[types.Int] { + panic(fmt.Sprintf("Var type mismatch: expected int, got %v", varObj.Type())) + } + + constObj := types.NewConst(token.NoPos, nil, "pi", types.Typ[types.Float64], nil) + fmt.Printf("Const: Name=%s, Type=%v\n", constObj.Name(), constObj.Type()) + if constObj.Name() != "pi" { + panic(fmt.Sprintf("Const name mismatch: expected pi, got %s", constObj.Name())) + } + if constObj.Type() != types.Typ[types.Float64] { + panic(fmt.Sprintf("Const type mismatch: expected float64, got %v", constObj.Type())) + } + + sig := types.NewSignatureType(nil, nil, nil, nil, nil, false) + funcObj := types.NewFunc(token.NoPos, nil, "foo", sig) + fmt.Printf("Func: Name=%s, Type=%v\n", funcObj.Name(), funcObj.Type()) + if funcObj.Name() != "foo" { + panic(fmt.Sprintf("Func name mismatch: expected foo, got %s", funcObj.Name())) + } + + typeObj := types.NewTypeName(token.NoPos, nil, "MyInt", types.Typ[types.Int]) + fmt.Printf("TypeName: Name=%s, Type=%v\n", typeObj.Name(), typeObj.Type()) + if typeObj.Name() != "MyInt" { + panic(fmt.Sprintf("TypeName name mismatch: expected MyInt, got %s", typeObj.Name())) + } + + var obj types.Object = varObj + if obj.Name() != "x" { + panic("Object interface conversion failed") + } + fmt.Println("SUCCESS: Object interface works correctly\n") +} + +func testScope() { + fmt.Println("\n=== Test Scope ===") + + scope := types.NewScope(nil, 0, 0, "test") + obj := types.NewVar(0, nil, "x", types.Typ[types.Int]) + + scope.Insert(obj) + result := scope.Lookup("x") + if result != obj { + panic("Scope.Lookup failed") + } + + names := scope.Names() + if len(names) != 1 || names[0] != "x" { + panic("Scope.Names failed") + } + + num := scope.Len() + if num != 1 { + panic("Scope.Len failed") + } + + fmt.Printf("Scope contains %d object(s): %v\n", num, names) + fmt.Println("SUCCESS: Scope operations work correctly\n") +} + +func testPackage() { + fmt.Println("\n=== Test Package ===") + + pkg := types.NewPackage("example.com/test", "test") + fmt.Printf("Package: Path=%s, Name=%s\n", pkg.Path(), pkg.Name()) + if pkg.Path() != "example.com/test" { + panic(fmt.Sprintf("Package path mismatch: expected example.com/test, got %s", pkg.Path())) + } + if pkg.Name() != "test" { + panic(fmt.Sprintf("Package name mismatch: expected test, got %s", pkg.Name())) + } + + scope := pkg.Scope() + if scope == nil { + panic("Package.Scope returned nil") + } + + varObj := types.NewVar(token.NoPos, pkg, "x", types.Typ[types.Int]) + scope.Insert(varObj) + + result := pkg.Scope().Lookup("x") + if result != varObj { + panic("Package scope lookup failed") + } + + fmt.Println("SUCCESS: Package operations work correctly\n") +} + +func testNamed() { + fmt.Println("\n=== Test Named Types ===") + + pkg := types.NewPackage("example.com/test", "test") + typeName := types.NewTypeName(token.NoPos, pkg, "MyInt", nil) + named := types.NewNamed(typeName, types.Typ[types.Int], nil) + + fmt.Printf("Named type: %v, Underlying: %v\n", named, named.Underlying()) + + if named.Obj() != typeName { + panic("Named.Obj failed") + } + + fmt.Println("SUCCESS: Named type operations work correctly\n") +} + +func testInterface() { + fmt.Println("\n=== Test Interface ===") + + pkg := types.NewPackage("example.com/test", "test") + + posMethod := types.NewFunc(token.NoPos, pkg, "Pos", types.NewSignatureType(nil, nil, nil, nil, types.NewTuple(types.NewVar(0, pkg, "", types.Typ[types.Int])), false)) + endMethod := types.NewFunc(token.NoPos, pkg, "End", types.NewSignatureType(nil, nil, nil, nil, types.NewTuple(types.NewVar(0, pkg, "", types.Typ[types.Int])), false)) + + methods := []*types.Func{posMethod, endMethod} + iface := types.NewInterfaceType(methods, nil) + iface.Complete() + + fmt.Printf("Interface with %d methods\n", iface.NumMethods()) + if iface.NumMethods() != 2 { + panic(fmt.Sprintf("Interface method count mismatch: expected 2, got %d", iface.NumMethods())) + } + + method := iface.Method(0) + fmt.Printf("Method 0: %s\n", method.Name()) + if method.Name() != "End" && method.Name() != "Pos" { + panic(fmt.Sprintf("Unexpected method name: %s", method.Name())) + } + + fmt.Println("SUCCESS: Interface operations work correctly\n") +} + +func testStruct() { + fmt.Println("\n=== Test Struct ===") + + fields := []*types.Var{ + types.NewField(token.NoPos, nil, "X", types.Typ[types.Int], false), + types.NewField(token.NoPos, nil, "Y", types.Typ[types.String], false), + } + + structType := types.NewStruct(fields, nil) + fmt.Printf("Struct with %d fields\n", structType.NumFields()) + if structType.NumFields() != 2 { + panic(fmt.Sprintf("Struct field count mismatch: expected 2, got %d", structType.NumFields())) + } + + field0 := structType.Field(0) + fmt.Printf("Field 0: Name=%s, Type=%v\n", field0.Name(), field0.Type()) + if field0.Name() != "X" { + panic(fmt.Sprintf("Field 0 name mismatch: expected X, got %s", field0.Name())) + } + if field0.Type() != types.Typ[types.Int] { + panic(fmt.Sprintf("Field 0 type mismatch: expected int, got %v", field0.Type())) + } + + fmt.Println("SUCCESS: Struct operations work correctly\n") +} + +func testSignature() { + fmt.Println("\n=== Test Signature ===") + + params := types.NewTuple( + types.NewVar(token.NoPos, nil, "x", types.Typ[types.Int]), + types.NewVar(token.NoPos, nil, "y", types.Typ[types.String]), + ) + + results := types.NewTuple( + types.NewVar(token.NoPos, nil, "", types.Typ[types.Bool]), + ) + + sig := types.NewSignatureType(nil, nil, nil, params, results, false) + + fmt.Printf("Signature: %d params, %d results\n", sig.Params().Len(), sig.Results().Len()) + if sig.Params().Len() != 2 { + panic(fmt.Sprintf("Signature param count mismatch: expected 2, got %d", sig.Params().Len())) + } + if sig.Results().Len() != 1 { + panic(fmt.Sprintf("Signature result count mismatch: expected 1, got %d", sig.Results().Len())) + } + + param0 := sig.Params().At(0) + fmt.Printf("Param 0: Name=%s, Type=%v\n", param0.Name(), param0.Type()) + if param0.Name() != "x" { + panic(fmt.Sprintf("Param 0 name mismatch: expected x, got %s", param0.Name())) + } + if param0.Type() != types.Typ[types.Int] { + panic(fmt.Sprintf("Param 0 type mismatch: expected int, got %v", param0.Type())) + } + + fmt.Println("SUCCESS: Signature operations work correctly\n") +} + +func testTuple() { + fmt.Println("\n=== Test Tuple ===") + + tuple := types.NewTuple( + types.NewVar(token.NoPos, nil, "a", types.Typ[types.Int]), + types.NewVar(token.NoPos, nil, "b", types.Typ[types.String]), + ) + + fmt.Printf("Tuple length: %d\n", tuple.Len()) + if tuple.Len() != 2 { + panic(fmt.Sprintf("Tuple length mismatch: expected 2, got %d", tuple.Len())) + } + + var0 := tuple.At(0) + fmt.Printf("Element 0: Name=%s, Type=%v\n", var0.Name(), var0.Type()) + if var0.Name() != "a" { + panic(fmt.Sprintf("Tuple element 0 name mismatch: expected a, got %s", var0.Name())) + } + if var0.Type() != types.Typ[types.Int] { + panic(fmt.Sprintf("Tuple element 0 type mismatch: expected int, got %v", var0.Type())) + } + + fmt.Println("SUCCESS: Tuple operations work correctly\n") +} + +func testArray() { + fmt.Println("\n=== Test Array ===") + + arrayType := types.NewArray(types.Typ[types.Int], 10) + fmt.Printf("Array type: %v, Elem: %v, Len: %d\n", arrayType, arrayType.Elem(), arrayType.Len()) + if arrayType.Len() != 10 { + panic(fmt.Sprintf("Array length mismatch: expected 10, got %d", arrayType.Len())) + } + if arrayType.Elem() != types.Typ[types.Int] { + panic(fmt.Sprintf("Array element type mismatch: expected int, got %v", arrayType.Elem())) + } + + fmt.Println("SUCCESS: Array operations work correctly\n") +} + +func testSlice() { + fmt.Println("\n=== Test Slice ===") + + sliceType := types.NewSlice(types.Typ[types.String]) + fmt.Printf("Slice type: %v, Elem: %v\n", sliceType, sliceType.Elem()) + if sliceType.Elem() != types.Typ[types.String] { + panic(fmt.Sprintf("Slice element type mismatch: expected string, got %v", sliceType.Elem())) + } + + fmt.Println("SUCCESS: Slice operations work correctly\n") +} + +func testPointer() { + fmt.Println("\n=== Test Pointer ===") + + ptrType := types.NewPointer(types.Typ[types.Int]) + fmt.Printf("Pointer type: %v, Elem: %v\n", ptrType, ptrType.Elem()) + if ptrType.Elem() != types.Typ[types.Int] { + panic(fmt.Sprintf("Pointer element type mismatch: expected int, got %v", ptrType.Elem())) + } + + fmt.Println("SUCCESS: Pointer operations work correctly\n") +} + +func testMap() { + fmt.Println("\n=== Test Map ===") + + mapType := types.NewMap(types.Typ[types.String], types.Typ[types.Int]) + fmt.Printf("Map type: %v, Key: %v, Elem: %v\n", mapType, mapType.Key(), mapType.Elem()) + if mapType.Key() != types.Typ[types.String] { + panic(fmt.Sprintf("Map key type mismatch: expected string, got %v", mapType.Key())) + } + if mapType.Elem() != types.Typ[types.Int] { + panic(fmt.Sprintf("Map element type mismatch: expected int, got %v", mapType.Elem())) + } + + fmt.Println("SUCCESS: Map operations work correctly\n") +} + +func testChan() { + fmt.Println("\n=== Test Chan ===" ) + + chanType := types.NewChan(types.SendRecv, types.Typ[types.Int]) + fmt.Printf("Chan type: %v, Dir: %v, Elem: %v\n", chanType, chanType.Dir(), chanType.Elem()) + if chanType.Dir() != types.SendRecv { + panic(fmt.Sprintf("Chan direction mismatch: expected SendRecv, got %v", chanType.Dir())) + } + if chanType.Elem() != types.Typ[types.Int] { + panic(fmt.Sprintf("Chan element type mismatch: expected int, got %v", chanType.Elem())) + } + + sendChan := types.NewChan(types.SendOnly, types.Typ[types.String]) + fmt.Printf("SendOnly chan: %v, Dir: %v\n", sendChan, sendChan.Dir()) + if sendChan.Dir() != types.SendOnly { + panic(fmt.Sprintf("SendOnly chan direction mismatch: expected SendOnly, got %v", sendChan.Dir())) + } + + recvChan := types.NewChan(types.RecvOnly, types.Typ[types.Bool]) + fmt.Printf("RecvOnly chan: %v, Dir: %v\n", recvChan, recvChan.Dir()) + if recvChan.Dir() != types.RecvOnly { + panic(fmt.Sprintf("RecvOnly chan direction mismatch: expected RecvOnly, got %v", recvChan.Dir())) + } + + fmt.Println("SUCCESS: Chan operations work correctly\n") +} + +func testTypeComparison() { + fmt.Println("\n=== Test Type Comparison Functions ===") + + t1 := types.Typ[types.Int] + t2 := types.Typ[types.Int] + t3 := types.Typ[types.String] + + if !types.Identical(t1, t2) { + panic("Identical failed: int should be identical to int") + } + fmt.Printf("Identical(int, int): %v\n", types.Identical(t1, t2)) + fmt.Printf("Identical(int, string): %v\n", types.Identical(t1, t3)) + + if !types.AssignableTo(t1, t2) { + panic("AssignableTo failed") + } + fmt.Printf("AssignableTo(int, int): %v\n", types.AssignableTo(t1, t2)) + fmt.Printf("AssignableTo(int, string): %v\n", types.AssignableTo(t1, t3)) + + fmt.Printf("Comparable(int): %v\n", types.Comparable(t1)) + fmt.Printf("Comparable(string): %v\n", types.Comparable(t3)) + + fmt.Printf("ConvertibleTo(int, int): %v\n", types.ConvertibleTo(t1, t2)) + + fmt.Println("SUCCESS: Type comparison functions work correctly\n") +} + +func testTypeChecking() { + fmt.Println("\n=== Test Type Checking Functions ===") + + pkg := types.NewPackage("example.com/test", "test") + + m1 := types.NewFunc(token.NoPos, pkg, "Method1", types.NewSignatureType(nil, nil, nil, nil, nil, false)) + m2 := types.NewFunc(token.NoPos, pkg, "Method2", types.NewSignatureType(nil, nil, nil, nil, nil, false)) + iface := types.NewInterfaceType([]*types.Func{m1, m2}, nil) + iface.Complete() + + fields := []*types.Var{ + types.NewField(token.NoPos, nil, "x", types.Typ[types.Int], false), + } + structType := types.NewStruct(fields, nil) + + fmt.Printf("Implements(struct, interface): %v\n", types.Implements(structType, iface)) + fmt.Printf("Implements(int, interface): %v\n", types.Implements(types.Typ[types.Int], iface)) + + emptyIface := types.NewInterfaceType(nil, nil) + emptyIface.Complete() + fmt.Printf("Implements(int, empty interface): %v\n", types.Implements(types.Typ[types.Int], emptyIface)) + + fmt.Printf("AssertableTo(interface, int): %v\n", types.AssertableTo(iface, types.Typ[types.Int])) + + fmt.Println("SUCCESS: Type checking functions work correctly\n") +} + +func testStringFunctions() { + fmt.Println("\n=== Test String Functions ===") + + pkg := types.NewPackage("example.com/test", "test") + varObj := types.NewVar(token.NoPos, pkg, "myVar", types.Typ[types.Int]) + + objStr := types.ObjectString(varObj, nil) + fmt.Printf("ObjectString: %s\n", objStr) + + objStrQual := types.ObjectString(varObj, types.RelativeTo(pkg)) + fmt.Printf("ObjectString (qualified): %s\n", objStrQual) + + typeStr := types.TypeString(types.Typ[types.Int], nil) + fmt.Printf("TypeString(int): %s\n", typeStr) + + sliceType := types.NewSlice(types.Typ[types.String]) + sliceStr := types.TypeString(sliceType, nil) + fmt.Printf("TypeString([]string): %s\n", sliceStr) + + fmt.Println("SUCCESS: String functions work correctly\n") +} + +func testLookupFunctions() { + fmt.Println("\n=== Test Lookup Functions ===") + + pkg := types.NewPackage("example.com/test", "test") + + fields := []*types.Var{ + types.NewField(token.NoPos, pkg, "X", types.Typ[types.Int], false), + types.NewField(token.NoPos, pkg, "Y", types.Typ[types.String], false), + } + structType := types.NewStruct(fields, nil) + + obj, index, indirect := types.LookupFieldOrMethod(structType, false, pkg, "X") + if obj == nil { + panic("LookupFieldOrMethod failed to find X") + } + fmt.Printf("LookupFieldOrMethod found: %s, index: %v, indirect: %v\n", obj.Name(), index, indirect) + + obj2, index2, indirect2 := types.LookupFieldOrMethod(structType, false, pkg, "NonExistent") + fmt.Printf("LookupFieldOrMethod (non-existent): found=%v, index=%v, indirect=%v\n", obj2 != nil, index2, indirect2) + + mset := types.NewMethodSet(structType) + fmt.Printf("NewMethodSet: %d methods\n", mset.Len()) + + fmt.Println("SUCCESS: Lookup functions work correctly\n") +} + +func testUtilityFunctions() { + fmt.Println("\n=== Test Utility Functions ===") + + pkg := types.NewPackage("example.com/test", "test") + + iface := types.NewInterfaceType(nil, nil) + iface.Complete() + + fmt.Printf("IsInterface(interface): %v\n", types.IsInterface(iface)) + fmt.Printf("IsInterface(int): %v\n", types.IsInterface(types.Typ[types.Int])) + + typedNil := types.Typ[types.UntypedNil] + defaultType := types.Default(typedNil) + fmt.Printf("Default(UntypedNil): %v\n", defaultType) + + intDefault := types.Default(types.Typ[types.Int]) + fmt.Printf("Default(int): %v\n", intDefault) + + idStr := types.Id(pkg, "MyType") + fmt.Printf("Id(pkg, \"MyType\"): %s\n", idStr) + + fmt.Println("SUCCESS: Utility functions work correctly\n") +} diff --git a/cl/_testdata/geometry1370/geometry.go b/cl/_testdata/geometry1370/geometry.go new file mode 100644 index 00000000..9db70b92 --- /dev/null +++ b/cl/_testdata/geometry1370/geometry.go @@ -0,0 +1,25 @@ +package geometry1370 + +type Shape interface { + Area() float64 + validate() bool + setID(int) +} + +type Rectangle struct { + Width, Height float64 + id int +} + +func (r *Rectangle) Area() float64 { return r.Width * r.Height } +func (r *Rectangle) validate() bool { return r.Width > 0 && r.Height > 0 } +func (r *Rectangle) setID(id int) { r.id = id } +func (r *Rectangle) GetID() int { return r.id } + +func NewRectangle(width, height float64) *Rectangle { + return &Rectangle{Width: width, Height: height} +} + +func RegisterShape(s Shape, id int) { + s.setID(id) +} diff --git a/cl/_testdata/geometry1370/out.ll b/cl/_testdata/geometry1370/out.ll new file mode 100644 index 00000000..06518106 --- /dev/null +++ b/cl/_testdata/geometry1370/out.ll @@ -0,0 +1,90 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testdata/geometry1370' +source_filename = "github.com/goplus/llgo/cl/_testdata/geometry1370" + +%"github.com/goplus/llgo/cl/_testdata/geometry1370.Rectangle" = type { double, double, i64 } +%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } + +@"github.com/goplus/llgo/cl/_testdata/geometry1370.init$guard" = global i1 false, align 1 + +define ptr @"github.com/goplus/llgo/cl/_testdata/geometry1370.NewRectangle"(double %0, double %1) { +_llgo_0: + %2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) + %3 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/geometry1370.Rectangle", ptr %2, i32 0, i32 0 + %4 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/geometry1370.Rectangle", ptr %2, i32 0, i32 1 + store double %0, ptr %3, align 8 + store double %1, ptr %4, align 8 + ret ptr %2 +} + +define double @"github.com/goplus/llgo/cl/_testdata/geometry1370.(*Rectangle).Area"(ptr %0) { +_llgo_0: + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/geometry1370.Rectangle", ptr %0, i32 0, i32 0 + %2 = load double, ptr %1, align 8 + %3 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/geometry1370.Rectangle", ptr %0, i32 0, i32 1 + %4 = load double, ptr %3, align 8 + %5 = fmul double %2, %4 + ret double %5 +} + +define i64 @"github.com/goplus/llgo/cl/_testdata/geometry1370.(*Rectangle).GetID"(ptr %0) { +_llgo_0: + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/geometry1370.Rectangle", ptr %0, i32 0, i32 2 + %2 = load i64, ptr %1, align 4 + ret i64 %2 +} + +define void @"github.com/goplus/llgo/cl/_testdata/geometry1370.(*Rectangle).setID"(ptr %0, i64 %1) { +_llgo_0: + %2 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/geometry1370.Rectangle", ptr %0, i32 0, i32 2 + store i64 %1, ptr %2, align 4 + ret void +} + +define i1 @"github.com/goplus/llgo/cl/_testdata/geometry1370.(*Rectangle).validate"(ptr %0) { +_llgo_0: + %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/geometry1370.Rectangle", ptr %0, i32 0, i32 0 + %2 = load double, ptr %1, align 8 + %3 = fcmp ogt double %2, 0.000000e+00 + br i1 %3, label %_llgo_1, label %_llgo_2 + +_llgo_1: ; preds = %_llgo_0 + %4 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testdata/geometry1370.Rectangle", ptr %0, i32 0, i32 1 + %5 = load double, ptr %4, align 8 + %6 = fcmp ogt double %5, 0.000000e+00 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + %7 = phi i1 [ false, %_llgo_0 ], [ %6, %_llgo_1 ] + ret i1 %7 +} + +define void @"github.com/goplus/llgo/cl/_testdata/geometry1370.RegisterShape"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0, i64 %1) { +_llgo_0: + %2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) + %3 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %0, 0 + %4 = getelementptr ptr, ptr %3, i64 4 + %5 = load ptr, ptr %4, align 8 + %6 = insertvalue { ptr, ptr } undef, ptr %5, 0 + %7 = insertvalue { ptr, ptr } %6, ptr %2, 1 + %8 = extractvalue { ptr, ptr } %7, 1 + %9 = extractvalue { ptr, ptr } %7, 0 + call void %9(ptr %8, i64 %1) + ret void +} + +define void @"github.com/goplus/llgo/cl/_testdata/geometry1370.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/geometry1370.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/geometry1370.init$guard", align 1 + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) + +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface") diff --git a/cl/_testgo/errors/out.ll b/cl/_testgo/errors/out.ll index e30d59d8..480afd7e 100644 --- a/cl/_testgo/errors/out.ll +++ b/cl/_testgo/errors/out.ll @@ -19,8 +19,9 @@ source_filename = "github.com/goplus/llgo/cl/_testgo/errors" @3 = private unnamed_addr constant [5 x i8] c"Error", align 1 @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null, align 8 @"*_llgo_github.com/goplus/llgo/cl/_testgo/errors.errorString" = linkonce global ptr null, align 8 -@"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU" = linkonce global ptr null, align 8 -@4 = private unnamed_addr constant [8 x i8] c"an error", align 1 +@_llgo_error = linkonce global ptr null, align 8 +@4 = private unnamed_addr constant [5 x i8] c"error", align 1 +@5 = private unnamed_addr constant [8 x i8] c"an error", align 1 define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/errors.New"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { _llgo_0: @@ -29,12 +30,11 @@ _llgo_0: store %"github.com/goplus/llgo/runtime/internal/runtime.String" %0, ptr %2, align 8 %3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/errors.errorString", align 8 %4 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/errors.errorString", align 8 - %5 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - %6 = load ptr, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8 - %7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %6, ptr %4) - %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %7, 0 - %9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %8, ptr %1, 1 - ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %9 + %5 = load ptr, ptr @_llgo_error, align 8 + %6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %5, ptr %4) + %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %6, 0 + %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %7, ptr %1, 1 + ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %8 } define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/cl/_testgo/errors.(*errorString).Error"(ptr %0) { @@ -60,7 +60,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0 define void @"github.com/goplus/llgo/cl/_testgo/errors.main"() { _llgo_0: - %0 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/errors.New"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 8 }) + %0 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/errors.New"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 8 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintIface"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) @@ -142,24 +142,31 @@ _llgo_4: ; preds = %_llgo_3, %_llgo_2 %37 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %36) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %37) store ptr %37, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/errors.errorString", align 8 - %38 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - %39 = load ptr, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8 + %38 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 5 }) + %39 = load ptr, ptr @_llgo_error, align 8 %40 = icmp eq ptr %39, null br i1 %40, label %_llgo_5, label %_llgo_6 _llgo_5: ; preds = %_llgo_4 - %41 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }, ptr undef }, ptr %38, 1 - %42 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) - %43 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %42, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %41, ptr %43, align 8 - %44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %42, 0 - %45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %44, i64 1, 1 - %46 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %45, i64 1, 2 - %47 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %46) - store ptr %47, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8 + store ptr %38, ptr @_llgo_error, align 8 br label %_llgo_6 _llgo_6: ; preds = %_llgo_5, %_llgo_4 + %41 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 + br i1 %40, label %_llgo_7, label %_llgo_8 + +_llgo_7: ; preds = %_llgo_6 + %42 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }, ptr undef }, ptr %41, 1 + %43 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) + %44 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %43, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %42, ptr %44, align 8 + %45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %43, 0 + %46 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %45, i64 1, 1 + %47 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %46, i64 1, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %38, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %47) + br label %_llgo_8 + +_llgo_8: ; preds = %_llgo_7, %_llgo_6 ret void } @@ -181,7 +188,9 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(p declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr) -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.Slice") +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.String") + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr, %"github.com/goplus/llgo/runtime/internal/runtime.Slice") declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr, ptr) diff --git a/cl/_testgo/ifaceconv/out.ll b/cl/_testgo/ifaceconv/out.ll index 2f6e0bee..cf0d48b1 100644 --- a/cl/_testgo/ifaceconv/out.ll +++ b/cl/_testgo/ifaceconv/out.ll @@ -26,13 +26,11 @@ source_filename = "github.com/goplus/llgo/cl/_testgo/ifaceconv" @6 = private unnamed_addr constant [2 x i8] c"I2", align 1 @7 = private unnamed_addr constant [45 x i8] c"github.com/goplus/llgo/cl/_testgo/ifaceconv.g", align 1 @8 = private unnamed_addr constant [21 x i8] c"nil i2.(I2) succeeded", align 1 -@"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4" = linkonce global ptr null, align 8 @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C1" = linkonce global ptr null, align 8 @9 = private unnamed_addr constant [2 x i8] c"C1", align 1 @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8 @10 = private unnamed_addr constant [1 x i8] c"f", align 1 @11 = private unnamed_addr constant [17 x i8] c"C1 i1.(I0) failed", align 1 -@"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw" = linkonce global ptr null, align 8 @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_github.com/goplus/llgo/cl/_testgo/ifaceconv.C2" = linkonce global ptr null, align 8 @@ -145,14 +143,14 @@ _llgo_6: ; preds = %_llgo_31 %21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %20, 0 %22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %21, ptr null, 1 %23 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer) - %24 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8 + %24 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I1", align 8 %25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %24, ptr %23) %26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %25, 0 %27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %26, ptr null, 1 %28 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C1", align 8 %29 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) store %"github.com/goplus/llgo/cl/_testgo/ifaceconv.C1" zeroinitializer, ptr %29, align 1 - %30 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8 + %30 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I1", align 8 %31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %30, ptr %28) %32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %31, 0 %33 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %32, ptr %29, 1 @@ -204,7 +202,7 @@ _llgo_12: ; preds = %_llgo_40 %55 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C2", align 8 %56 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) store %"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2" zeroinitializer, ptr %56, align 1 - %57 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8 + %57 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I1", align 8 %58 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %57, ptr %55) %59 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %58, 0 %60 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %59, ptr %56, 1 @@ -256,7 +254,7 @@ _llgo_18: ; preds = %_llgo_49 %82 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C1", align 8 %83 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) store %"github.com/goplus/llgo/cl/_testgo/ifaceconv.C1" zeroinitializer, ptr %83, align 1 - %84 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8 + %84 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I1", align 8 %85 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %84, ptr %82) %86 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %85, 0 %87 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %86, ptr %83, 1 @@ -370,7 +368,7 @@ _llgo_37: ; preds = %_llgo_36, %_llgo_35 _llgo_38: ; preds = %_llgo_10 %131 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %33, 1 - %132 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8 + %132 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I2", align 8 %133 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %132, ptr %48) %134 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %133, 0 %135 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %134, ptr %131, 1 @@ -420,7 +418,7 @@ _llgo_46: ; preds = %_llgo_45, %_llgo_44 _llgo_47: ; preds = %_llgo_16 %154 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %60, 1 - %155 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8 + %155 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.I2", align 8 %156 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %155, ptr %75) %157 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %156, 0 %158 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %157, ptr %154, 1 @@ -544,118 +542,94 @@ _llgo_15: ; preds = %_llgo_14 br label %_llgo_16 _llgo_16: ; preds = %_llgo_15, %_llgo_14 - %44 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %45 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef }, ptr %44, 1 - %46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) - %47 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %46, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %45, ptr %47, align 8 - %48 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %46, 0 - %49 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %48, i64 1, 1 - %50 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %49, i64 1, 2 - %51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %50) - store ptr %51, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8 - %52 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 2 }, i64 25, i64 0, i64 1, i64 1) - %53 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C1", align 8 - %54 = icmp eq ptr %53, null - br i1 %54, label %_llgo_17, label %_llgo_18 + %44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 2 }, i64 25, i64 0, i64 1, i64 1) + %45 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C1", align 8 + %46 = icmp eq ptr %45, null + br i1 %46, label %_llgo_17, label %_llgo_18 _llgo_17: ; preds = %_llgo_16 - store ptr %52, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C1", align 8 + store ptr %44, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C1", align 8 br label %_llgo_18 _llgo_18: ; preds = %_llgo_17, %_llgo_16 - %55 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) - %56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %55, 0 - %57 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %56, i64 0, 1 - %58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %57, i64 0, 2 - %59 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58) - store ptr %59, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 - %60 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 - br i1 %54, label %_llgo_19, label %_llgo_20 + %47 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) + %48 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %47, 0 + %49 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %48, i64 0, 1 + %50 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %49, i64 0, 2 + %51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %50) + store ptr %51, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 + %52 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 + br i1 %46, label %_llgo_19, label %_llgo_20 _llgo_19: ; preds = %_llgo_18 - %61 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %62 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %61, 1 - %63 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %62, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C1).f", 2 - %64 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %63, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C1).f", 3 - %65 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %61, 1 - %66 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %65, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C1).f", 2 - %67 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %66, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.C1.f", 3 - %68 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) - %69 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %68, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Method" %67, ptr %69, align 8 - %70 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %68, 0 - %71 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %70, i64 1, 1 - %72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %71, i64 1, 2 - %73 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) - %74 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %73, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Method" %64, ptr %74, align 8 - %75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %73, 0 - %76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75, i64 1, 1 - %77 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %76, i64 1, 2 - call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %52, ptr %60, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %72, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77) + %53 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + %54 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %53, 1 + %55 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %54, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C1).f", 2 + %56 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %55, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C1).f", 3 + %57 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %53, 1 + %58 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %57, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C1).f", 2 + %59 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %58, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.C1.f", 3 + %60 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) + %61 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %60, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Method" %59, ptr %61, align 8 + %62 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %60, 0 + %63 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %62, i64 1, 1 + %64 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %63, i64 1, 2 + %65 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) + %66 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %65, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Method" %56, ptr %66, align 8 + %67 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %65, 0 + %68 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %67, i64 1, 1 + %69 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68, i64 1, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %44, ptr %52, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %64, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %69) br label %_llgo_20 _llgo_20: ; preds = %_llgo_19, %_llgo_18 - %78 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %79 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %80 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef }, ptr %78, 1 - %81 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 45 }, ptr undef }, ptr %79, 1 - %82 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) - %83 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %82, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %80, ptr %83, align 8 - %84 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %82, i64 1 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %81, ptr %84, align 8 - %85 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %82, 0 - %86 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %85, i64 2, 1 - %87 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %86, i64 2, 2 - %88 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %87) - store ptr %88, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8 - %89 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 2 }, i64 25, i64 0, i64 2, i64 2) - %90 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C2", align 8 - %91 = icmp eq ptr %90, null - br i1 %91, label %_llgo_21, label %_llgo_22 + %70 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 2 }, i64 25, i64 0, i64 2, i64 2) + %71 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C2", align 8 + %72 = icmp eq ptr %71, null + br i1 %72, label %_llgo_21, label %_llgo_22 _llgo_21: ; preds = %_llgo_20 - store ptr %89, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C2", align 8 + store ptr %70, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceconv.C2", align 8 br label %_llgo_22 _llgo_22: ; preds = %_llgo_21, %_llgo_20 - %92 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 - br i1 %91, label %_llgo_23, label %_llgo_24 + %73 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8 + br i1 %72, label %_llgo_23, label %_llgo_24 _llgo_23: ; preds = %_llgo_22 - %93 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %94 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %93, 1 - %95 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %94, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).f", 2 - %96 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %95, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).f", 3 - %97 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %93, 1 - %98 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %97, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).f", 2 - %99 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %98, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2.f", 3 - %100 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %101 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %100, 1 - %102 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %101, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).g", 2 - %103 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %102, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).g", 3 - %104 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %100, 1 - %105 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %104, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).g", 2 - %106 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %105, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2.g", 3 - %107 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80) - %108 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %107, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Method" %99, ptr %108, align 8 - %109 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %107, i64 1 - store %"github.com/goplus/llgo/runtime/abi.Method" %106, ptr %109, align 8 - %110 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %107, 0 - %111 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %110, i64 2, 1 - %112 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %111, i64 2, 2 - %113 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80) - %114 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %113, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Method" %96, ptr %114, align 8 - %115 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %113, i64 1 - store %"github.com/goplus/llgo/runtime/abi.Method" %103, ptr %115, align 8 - %116 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %113, 0 - %117 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %116, i64 2, 1 - %118 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %117, i64 2, 2 - call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %89, ptr %92, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %112, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %118) + %74 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + %75 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %74, 1 + %76 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %75, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).f", 2 + %77 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %76, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).f", 3 + %78 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %74, 1 + %79 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %78, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).f", 2 + %80 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %79, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2.f", 3 + %81 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + %82 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %81, 1 + %83 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %82, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).g", 2 + %84 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %83, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).g", 3 + %85 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 45 }, ptr undef, ptr undef, ptr undef }, ptr %81, 1 + %86 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %85, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.(*C2).g", 2 + %87 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %86, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceconv.C2.g", 3 + %88 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80) + %89 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %88, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Method" %80, ptr %89, align 8 + %90 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %88, i64 1 + store %"github.com/goplus/llgo/runtime/abi.Method" %87, ptr %90, align 8 + %91 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %88, 0 + %92 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %91, i64 2, 1 + %93 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %92, i64 2, 2 + %94 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80) + %95 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %94, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Method" %77, ptr %95, align 8 + %96 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %94, i64 1 + store %"github.com/goplus/llgo/runtime/abi.Method" %84, ptr %96, align 8 + %97 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %94, 0 + %98 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %97, i64 2, 1 + %99 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %98, i64 2, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %70, ptr %73, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %93, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %99) br label %_llgo_24 _llgo_24: ; preds = %_llgo_23, %_llgo_22 @@ -678,8 +652,6 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com declare void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr) -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.Slice") - declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr, ptr) declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.String", i64, i64, i64, i64) diff --git a/cl/_testgo/ifaceprom/out.ll b/cl/_testgo/ifaceprom/out.ll index c7ece331..c352d1b4 100644 --- a/cl/_testgo/ifaceprom/out.ll +++ b/cl/_testgo/ifaceprom/out.ll @@ -24,7 +24,6 @@ source_filename = "github.com/goplus/llgo/cl/_testgo/ifaceprom" @5 = private unnamed_addr constant [47 x i8] c"github.com/goplus/llgo/cl/_testgo/ifaceprom.two", align 1 @_llgo_string = linkonce global ptr null, align 8 @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null, align 8 -@"github.com/goplus/llgo/cl/_testgo/ifaceprom.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA" = linkonce global ptr null, align 8 @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I" = linkonce global ptr null, align 8 @6 = private unnamed_addr constant [1 x i8] c"I", align 1 @7 = private unnamed_addr constant [116 x i8] c"type assertion github.com/goplus/llgo/cl/_testgo/ifaceprom.I -> github.com/goplus/llgo/cl/_testgo/ifaceprom.I failed", align 1 @@ -146,172 +145,170 @@ _llgo_0: %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.impl", align 8 %3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) store %"github.com/goplus/llgo/cl/_testgo/ifaceprom.impl" zeroinitializer, ptr %3, align 1 - %4 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %5 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - %6 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8 - %7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %6, ptr %2) - %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %7, 0 - %9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %8, ptr %3, 1 - store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %9, ptr %1, align 8 - %10 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 - %11 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %10, align 8 - %12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %11) - %13 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %11, 0 - %14 = getelementptr ptr, ptr %13, i64 3 - %15 = load ptr, ptr %14, align 8 - %16 = insertvalue { ptr, ptr } undef, ptr %15, 0 - %17 = insertvalue { ptr, ptr } %16, ptr %12, 1 - %18 = extractvalue { ptr, ptr } %17, 1 - %19 = extractvalue { ptr, ptr } %17, 0 - %20 = call i64 %19(ptr %18) - %21 = icmp ne i64 %20, 1 - br i1 %21, label %_llgo_1, label %_llgo_2 + %4 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 + %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %4, ptr %2) + %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %5, 0 + %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %6, ptr %3, 1 + store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %7, ptr %1, align 8 + %8 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 + %9 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %8, align 8 + %10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %9) + %11 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %9, 0 + %12 = getelementptr ptr, ptr %11, i64 3 + %13 = load ptr, ptr %12, align 8 + %14 = insertvalue { ptr, ptr } undef, ptr %13, 0 + %15 = insertvalue { ptr, ptr } %14, ptr %10, 1 + %16 = extractvalue { ptr, ptr } %15, 1 + %17 = extractvalue { ptr, ptr } %15, 0 + %18 = call i64 %17(ptr %16) + %19 = icmp ne i64 %18, 1 + br i1 %19, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - %22 = load ptr, ptr @_llgo_int, align 8 - %23 = inttoptr i64 %20 to ptr - %24 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %22, 0 - %25 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %24, ptr %23, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %25) + %20 = load ptr, ptr @_llgo_int, align 8 + %21 = inttoptr i64 %18 to ptr + %22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %20, 0 + %23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %22, ptr %21, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %23) unreachable _llgo_2: ; preds = %_llgo_0 - %26 = load %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, align 8 - %27 = extractvalue %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S" %26, 0 - %28 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %27) - %29 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %27, 0 - %30 = getelementptr ptr, ptr %29, i64 3 - %31 = load ptr, ptr %30, align 8 - %32 = insertvalue { ptr, ptr } undef, ptr %31, 0 - %33 = insertvalue { ptr, ptr } %32, ptr %28, 1 - %34 = extractvalue { ptr, ptr } %33, 1 - %35 = extractvalue { ptr, ptr } %33, 0 - %36 = call i64 %35(ptr %34) - %37 = icmp ne i64 %36, 1 - br i1 %37, label %_llgo_3, label %_llgo_4 + %24 = load %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, align 8 + %25 = extractvalue %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S" %24, 0 + %26 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %25) + %27 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %25, 0 + %28 = getelementptr ptr, ptr %27, i64 3 + %29 = load ptr, ptr %28, align 8 + %30 = insertvalue { ptr, ptr } undef, ptr %29, 0 + %31 = insertvalue { ptr, ptr } %30, ptr %26, 1 + %32 = extractvalue { ptr, ptr } %31, 1 + %33 = extractvalue { ptr, ptr } %31, 0 + %34 = call i64 %33(ptr %32) + %35 = icmp ne i64 %34, 1 + br i1 %35, label %_llgo_3, label %_llgo_4 _llgo_3: ; preds = %_llgo_2 - %38 = load ptr, ptr @_llgo_int, align 8 - %39 = inttoptr i64 %36 to ptr - %40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %38, 0 - %41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %40, ptr %39, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %41) + %36 = load ptr, ptr @_llgo_int, align 8 + %37 = inttoptr i64 %34 to ptr + %38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %36, 0 + %39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %38, ptr %37, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %39) unreachable _llgo_4: ; preds = %_llgo_2 - %42 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 - %43 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %42, align 8 - %44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %43) - %45 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 - %46 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %43, 1 + %40 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 + %41 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %40, align 8 + %42 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %41) + %43 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 + %44 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %41, 1 br i1 true, label %_llgo_17, label %_llgo_18 _llgo_5: ; preds = %_llgo_17 - %47 = load ptr, ptr @_llgo_int, align 8 - %48 = inttoptr i64 %117 to ptr - %49 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %47, 0 - %50 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %49, ptr %48, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %50) + %45 = load ptr, ptr @_llgo_int, align 8 + %46 = inttoptr i64 %115 to ptr + %47 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %45, 0 + %48 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %47, ptr %46, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %48) unreachable _llgo_6: ; preds = %_llgo_17 - %51 = load %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, align 8 - %52 = extractvalue %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S" %51, 0 - %53 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %52) - %54 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 - %55 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %52, 1 + %49 = load %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, align 8 + %50 = extractvalue %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S" %49, 0 + %51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %50) + %52 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 + %53 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %50, 1 br i1 true, label %_llgo_19, label %_llgo_20 _llgo_7: ; preds = %_llgo_19 - %56 = load ptr, ptr @_llgo_int, align 8 - %57 = inttoptr i64 %128 to ptr - %58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %56, 0 - %59 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %58, ptr %57, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %59) + %54 = load ptr, ptr @_llgo_int, align 8 + %55 = inttoptr i64 %126 to ptr + %56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %54, 0 + %57 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %56, ptr %55, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %57) unreachable _llgo_8: ; preds = %_llgo_19 - %60 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 - %61 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %60, align 8 - %62 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %61) - %63 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %61, 0 - %64 = getelementptr ptr, ptr %63, i64 4 - %65 = load ptr, ptr %64, align 8 - %66 = insertvalue { ptr, ptr } undef, ptr %65, 0 - %67 = insertvalue { ptr, ptr } %66, ptr %62, 1 - %68 = extractvalue { ptr, ptr } %67, 1 - %69 = extractvalue { ptr, ptr } %67, 0 - %70 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %69(ptr %68) - %71 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %70, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 }) - %72 = xor i1 %71, true - br i1 %72, label %_llgo_9, label %_llgo_10 + %58 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 + %59 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %58, align 8 + %60 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %59) + %61 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %59, 0 + %62 = getelementptr ptr, ptr %61, i64 4 + %63 = load ptr, ptr %62, align 8 + %64 = insertvalue { ptr, ptr } undef, ptr %63, 0 + %65 = insertvalue { ptr, ptr } %64, ptr %60, 1 + %66 = extractvalue { ptr, ptr } %65, 1 + %67 = extractvalue { ptr, ptr } %65, 0 + %68 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %67(ptr %66) + %69 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %68, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 }) + %70 = xor i1 %69, true + br i1 %70, label %_llgo_9, label %_llgo_10 _llgo_9: ; preds = %_llgo_8 - %73 = load ptr, ptr @_llgo_string, align 8 - %74 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" %70, ptr %74, align 8 - %75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %73, 0 - %76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %75, ptr %74, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %76) + %71 = load ptr, ptr @_llgo_string, align 8 + %72 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/runtime/internal/runtime.String" %68, ptr %72, align 8 + %73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %71, 0 + %74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %73, ptr %72, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %74) unreachable _llgo_10: ; preds = %_llgo_8 - %77 = load %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, align 8 - %78 = extractvalue %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S" %77, 0 - %79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %78) - %80 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %78, 0 - %81 = getelementptr ptr, ptr %80, i64 4 - %82 = load ptr, ptr %81, align 8 - %83 = insertvalue { ptr, ptr } undef, ptr %82, 0 - %84 = insertvalue { ptr, ptr } %83, ptr %79, 1 - %85 = extractvalue { ptr, ptr } %84, 1 - %86 = extractvalue { ptr, ptr } %84, 0 - %87 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %86(ptr %85) - %88 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %87, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 }) - %89 = xor i1 %88, true - br i1 %89, label %_llgo_11, label %_llgo_12 + %75 = load %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, align 8 + %76 = extractvalue %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S" %75, 0 + %77 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %76) + %78 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %76, 0 + %79 = getelementptr ptr, ptr %78, i64 4 + %80 = load ptr, ptr %79, align 8 + %81 = insertvalue { ptr, ptr } undef, ptr %80, 0 + %82 = insertvalue { ptr, ptr } %81, ptr %77, 1 + %83 = extractvalue { ptr, ptr } %82, 1 + %84 = extractvalue { ptr, ptr } %82, 0 + %85 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %84(ptr %83) + %86 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %85, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 }) + %87 = xor i1 %86, true + br i1 %87, label %_llgo_11, label %_llgo_12 _llgo_11: ; preds = %_llgo_10 - %90 = load ptr, ptr @_llgo_string, align 8 - %91 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" %87, ptr %91, align 8 - %92 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %90, 0 - %93 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %92, ptr %91, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %93) + %88 = load ptr, ptr @_llgo_string, align 8 + %89 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/runtime/internal/runtime.String" %85, ptr %89, align 8 + %90 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %88, 0 + %91 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %90, ptr %89, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %91) unreachable _llgo_12: ; preds = %_llgo_10 - %94 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 - %95 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %94, align 8 - %96 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %95) - %97 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 - %98 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %95, 1 + %92 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0 + %93 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %92, align 8 + %94 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %93) + %95 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 + %96 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %93, 1 br i1 true, label %_llgo_21, label %_llgo_22 _llgo_13: ; preds = %_llgo_21 - %99 = load ptr, ptr @_llgo_string, align 8 - %100 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" %139, ptr %100, align 8 - %101 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %99, 0 - %102 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %101, ptr %100, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %102) + %97 = load ptr, ptr @_llgo_string, align 8 + %98 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/runtime/internal/runtime.String" %137, ptr %98, align 8 + %99 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %97, 0 + %100 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %99, ptr %98, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %100) unreachable _llgo_14: ; preds = %_llgo_21 - %103 = load %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, align 8 - %104 = extractvalue %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S" %103, 0 - %105 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %104) - %106 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 - %107 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %104, 1 + %101 = load %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S", ptr %0, align 8 + %102 = extractvalue %"github.com/goplus/llgo/cl/_testgo/ifaceprom.S" %101, 0 + %103 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %102) + %104 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 + %105 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %102, 1 br i1 true, label %_llgo_23, label %_llgo_24 _llgo_15: ; preds = %_llgo_23 - %108 = load ptr, ptr @_llgo_string, align 8 - %109 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" %151, ptr %109, align 8 - %110 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %108, 0 - %111 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %110, ptr %109, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %111) + %106 = load ptr, ptr @_llgo_string, align 8 + %107 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/runtime/internal/runtime.String" %149, ptr %107, align 8 + %108 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %106, 0 + %109 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %108, ptr %107, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %109) unreachable _llgo_16: ; preds = %_llgo_23 @@ -320,85 +317,85 @@ _llgo_16: ; preds = %_llgo_23 ret void _llgo_17: ; preds = %_llgo_4 - %112 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - %113 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %112, i32 0, i32 0 - store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %43, ptr %113, align 8 - %114 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.I.one$bound", ptr undef }, ptr %112, 1 - %115 = extractvalue { ptr, ptr } %114, 1 - %116 = extractvalue { ptr, ptr } %114, 0 - %117 = call i64 %116(ptr %115) - %118 = icmp ne i64 %117, 1 - br i1 %118, label %_llgo_5, label %_llgo_6 + %110 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + %111 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %110, i32 0, i32 0 + store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %41, ptr %111, align 8 + %112 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.I.one$bound", ptr undef }, ptr %110, 1 + %113 = extractvalue { ptr, ptr } %112, 1 + %114 = extractvalue { ptr, ptr } %112, 0 + %115 = call i64 %114(ptr %113) + %116 = icmp ne i64 %115, 1 + br i1 %116, label %_llgo_5, label %_llgo_6 _llgo_18: ; preds = %_llgo_4 - %119 = load ptr, ptr @_llgo_string, align 8 - %120 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 116 }, ptr %120, align 8 - %121 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %119, 0 - %122 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %121, ptr %120, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %122) + %117 = load ptr, ptr @_llgo_string, align 8 + %118 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 116 }, ptr %118, align 8 + %119 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %117, 0 + %120 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %119, ptr %118, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %120) unreachable _llgo_19: ; preds = %_llgo_6 - %123 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - %124 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %123, i32 0, i32 0 - store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %52, ptr %124, align 8 - %125 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.I.one$bound", ptr undef }, ptr %123, 1 - %126 = extractvalue { ptr, ptr } %125, 1 - %127 = extractvalue { ptr, ptr } %125, 0 - %128 = call i64 %127(ptr %126) - %129 = icmp ne i64 %128, 1 - br i1 %129, label %_llgo_7, label %_llgo_8 + %121 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + %122 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %121, i32 0, i32 0 + store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %50, ptr %122, align 8 + %123 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.I.one$bound", ptr undef }, ptr %121, 1 + %124 = extractvalue { ptr, ptr } %123, 1 + %125 = extractvalue { ptr, ptr } %123, 0 + %126 = call i64 %125(ptr %124) + %127 = icmp ne i64 %126, 1 + br i1 %127, label %_llgo_7, label %_llgo_8 _llgo_20: ; preds = %_llgo_6 - %130 = load ptr, ptr @_llgo_string, align 8 - %131 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 116 }, ptr %131, align 8 - %132 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %130, 0 - %133 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %132, ptr %131, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %133) + %128 = load ptr, ptr @_llgo_string, align 8 + %129 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 116 }, ptr %129, align 8 + %130 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %128, 0 + %131 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %130, ptr %129, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %131) unreachable _llgo_21: ; preds = %_llgo_12 - %134 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - %135 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %134, i32 0, i32 0 - store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %95, ptr %135, align 8 - %136 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.I.two$bound", ptr undef }, ptr %134, 1 - %137 = extractvalue { ptr, ptr } %136, 1 - %138 = extractvalue { ptr, ptr } %136, 0 - %139 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %138(ptr %137) - %140 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %139, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 }) - %141 = xor i1 %140, true - br i1 %141, label %_llgo_13, label %_llgo_14 + %132 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + %133 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %132, i32 0, i32 0 + store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %93, ptr %133, align 8 + %134 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.I.two$bound", ptr undef }, ptr %132, 1 + %135 = extractvalue { ptr, ptr } %134, 1 + %136 = extractvalue { ptr, ptr } %134, 0 + %137 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %136(ptr %135) + %138 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %137, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 }) + %139 = xor i1 %138, true + br i1 %139, label %_llgo_13, label %_llgo_14 _llgo_22: ; preds = %_llgo_12 - %142 = load ptr, ptr @_llgo_string, align 8 - %143 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 116 }, ptr %143, align 8 - %144 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %142, 0 - %145 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %144, ptr %143, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %145) + %140 = load ptr, ptr @_llgo_string, align 8 + %141 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 116 }, ptr %141, align 8 + %142 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %140, 0 + %143 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %142, ptr %141, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %143) unreachable _llgo_23: ; preds = %_llgo_14 - %146 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - %147 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %146, i32 0, i32 0 - store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %104, ptr %147, align 8 - %148 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.I.two$bound", ptr undef }, ptr %146, 1 - %149 = extractvalue { ptr, ptr } %148, 1 - %150 = extractvalue { ptr, ptr } %148, 0 - %151 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %150(ptr %149) - %152 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %151, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 }) - %153 = xor i1 %152, true - br i1 %153, label %_llgo_15, label %_llgo_16 + %144 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + %145 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %144, i32 0, i32 0 + store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %102, ptr %145, align 8 + %146 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.I.two$bound", ptr undef }, ptr %144, 1 + %147 = extractvalue { ptr, ptr } %146, 1 + %148 = extractvalue { ptr, ptr } %146, 0 + %149 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %148(ptr %147) + %150 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %149, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 }) + %151 = xor i1 %150, true + br i1 %151, label %_llgo_15, label %_llgo_16 _llgo_24: ; preds = %_llgo_14 - %154 = load ptr, ptr @_llgo_string, align 8 - %155 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 116 }, ptr %155, align 8 - %156 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %154, 0 - %157 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %156, ptr %155, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %157) + %152 = load ptr, ptr @_llgo_string, align 8 + %153 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 116 }, ptr %153, align 8 + %154 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %152, 0 + %155 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %154, ptr %153, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %155) unreachable } @@ -515,46 +512,32 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6 %65 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %64, i64 2, 1 %66 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %65, i64 2, 2 call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %0, ptr %6, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %66) - %67 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %68 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - %69 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 47 }, ptr undef }, ptr %67, 1 - %70 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 47 }, ptr undef }, ptr %68, 1 - %71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) - %72 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %71, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %69, ptr %72, align 8 - %73 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %71, i64 1 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %70, ptr %73, align 8 - %74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %71, 0 - %75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %74, i64 2, 1 - %76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75, i64 2, 2 - %77 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %76) - store ptr %77, ptr @"github.com/goplus/llgo/cl/_testgo/ifaceprom.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8 - %78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 1 }) - %79 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 - %80 = icmp eq ptr %79, null - br i1 %80, label %_llgo_9, label %_llgo_10 + %67 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 1 }) + %68 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 + %69 = icmp eq ptr %68, null + br i1 %69, label %_llgo_9, label %_llgo_10 _llgo_9: ; preds = %_llgo_8 - store ptr %78, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 + store ptr %67, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/ifaceprom.I", align 8 br label %_llgo_10 _llgo_10: ; preds = %_llgo_9, %_llgo_8 - %81 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %82 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - br i1 %80, label %_llgo_11, label %_llgo_12 + %70 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %71 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 + br i1 %69, label %_llgo_11, label %_llgo_12 _llgo_11: ; preds = %_llgo_10 - %83 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 47 }, ptr undef }, ptr %81, 1 - %84 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 47 }, ptr undef }, ptr %82, 1 - %85 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) - %86 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %85, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %83, ptr %86, align 8 - %87 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %85, i64 1 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %84, ptr %87, align 8 - %88 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %85, 0 - %89 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %88, i64 2, 1 - %90 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %89, i64 2, 2 - call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %78, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %90) + %72 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 47 }, ptr undef }, ptr %70, 1 + %73 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 47 }, ptr undef }, ptr %71, 1 + %74 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) + %75 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %74, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %72, ptr %75, align 8 + %76 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %74, i64 1 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %73, ptr %76, align 8 + %77 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %74, 0 + %78 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77, i64 2, 1 + %79 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %78, i64 2, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %67, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %79) br label %_llgo_12 _llgo_12: ; preds = %_llgo_11, %_llgo_10 @@ -577,7 +560,9 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com declare void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr) -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.Slice") +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.String") + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr, %"github.com/goplus/llgo/runtime/internal/runtime.Slice") declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr, ptr) @@ -585,10 +570,6 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.c declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface") -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.String") - -declare void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr, %"github.com/goplus/llgo/runtime/internal/runtime.Slice") - define i64 @"github.com/goplus/llgo/cl/_testgo/ifaceprom.I.one$bound"(ptr %0) { _llgo_0: %1 = load { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %0, align 8 diff --git a/cl/_testgo/interface/out.ll b/cl/_testgo/interface/out.ll index 6effe6db..25d64532 100644 --- a/cl/_testgo/interface/out.ll +++ b/cl/_testgo/interface/out.ll @@ -31,7 +31,6 @@ source_filename = "github.com/goplus/llgo/cl/_testgo/interface" @"*_llgo_github.com/goplus/llgo/cl/_testgo/interface.Game2" = linkonce global ptr null, align 8 @"_llgo_github.com/goplus/llgo/cl/_testdata/foo.Gamer" = linkonce global ptr null, align 8 @9 = private unnamed_addr constant [5 x i8] c"Gamer", align 1 -@"github.com/goplus/llgo/cl/_testgo/interface.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg" = linkonce global ptr null, align 8 @10 = private unnamed_addr constant [2 x i8] c"OK", align 1 @11 = private unnamed_addr constant [4 x i8] c"FAIL", align 1 @@ -133,7 +132,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_5 _llgo_3: ; preds = %_llgo_0 %26 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, 1 - %27 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/interface.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8 + %27 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/foo.Gamer", align 8 %28 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %27, ptr %12) %29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %28, 0 %30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %29, ptr %26, 1 @@ -158,7 +157,7 @@ _llgo_5: ; preds = %_llgo_4, %_llgo_3 _llgo_6: ; preds = %_llgo_2 %36 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %11, 1 - %37 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/interface.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8 + %37 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/foo.Gamer", align 8 %38 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %37, ptr %23) %39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %38, 0 %40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %39, ptr %36, 1 @@ -405,20 +404,6 @@ _llgo_23: ; preds = %_llgo_22 br label %_llgo_24 _llgo_24: ; preds = %_llgo_23, %_llgo_22 - %109 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %110 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %111 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef }, ptr %109, 1 - %112 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 48 }, ptr undef }, ptr %110, 1 - %113 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) - %114 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %113, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %111, ptr %114, align 8 - %115 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %113, i64 1 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %112, ptr %115, align 8 - %116 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %113, 0 - %117 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %116, i64 2, 1 - %118 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %117, i64 2, 2 - %119 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 43 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %118) - store ptr %119, ptr @"github.com/goplus/llgo/cl/_testgo/interface.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8 ret void } @@ -444,8 +429,6 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterfac declare i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr, ptr) -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.Slice") - declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr, ptr) declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String") diff --git a/cl/_testgo/interface1370/in.go b/cl/_testgo/interface1370/in.go new file mode 100644 index 00000000..57d4ef95 --- /dev/null +++ b/cl/_testgo/interface1370/in.go @@ -0,0 +1,11 @@ +package main + +import ( + "github.com/goplus/llgo/cl/_testdata/geometry1370" +) + +func main() { + rect := geometry1370.NewRectangle(5.0, 3.0) + geometry1370.RegisterShape(rect, 42) + println("ID:", rect.GetID()) +} diff --git a/cl/_testgo/interface1370/out.ll b/cl/_testgo/interface1370/out.ll new file mode 100644 index 00000000..2459333f --- /dev/null +++ b/cl/_testgo/interface1370/out.ll @@ -0,0 +1,348 @@ +; ModuleID = 'github.com/goplus/llgo/cl/_testgo/interface1370' +source_filename = "github.com/goplus/llgo/cl/_testgo/interface1370" + +%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr } +%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } +%"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } +%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } +%"github.com/goplus/llgo/runtime/abi.Method" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, ptr } +%"github.com/goplus/llgo/runtime/abi.Imethod" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr } + +@"github.com/goplus/llgo/cl/_testgo/interface1370.init$guard" = global i1 false, align 1 +@"_llgo_github.com/goplus/llgo/cl/_testdata/geometry1370.Rectangle" = linkonce global ptr null, align 8 +@0 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/cl/_testdata/geometry1370", align 1 +@1 = private unnamed_addr constant [9 x i8] c"Rectangle", align 1 +@_llgo_float64 = linkonce global ptr null, align 8 +@_llgo_int = linkonce global ptr null, align 8 +@"github.com/goplus/llgo/cl/_testgo/interface1370.struct$EuRbjzGGO7GwkW6RxZGl-8lEjTdEMzAFD8LnY_SpVoQ" = linkonce global ptr null, align 8 +@2 = private unnamed_addr constant [5 x i8] c"Width", align 1 +@3 = private unnamed_addr constant [6 x i8] c"Height", align 1 +@4 = private unnamed_addr constant [2 x i8] c"id", align 1 +@5 = private unnamed_addr constant [47 x i8] c"github.com/goplus/llgo/cl/_testgo/interface1370", align 1 +@6 = private unnamed_addr constant [4 x i8] c"Area", align 1 +@"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8" = linkonce global ptr null, align 8 +@7 = private unnamed_addr constant [5 x i8] c"GetID", align 1 +@"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA" = linkonce global ptr null, align 8 +@8 = private unnamed_addr constant [5 x i8] c"setID", align 1 +@9 = private unnamed_addr constant [54 x i8] c"github.com/goplus/llgo/cl/_testdata/geometry1370.setID", align 1 +@"_llgo_func$VZ-8VPNF1RaLICwxc1Ghn7BbgyFX3v762OCdx127EkA" = linkonce global ptr null, align 8 +@10 = private unnamed_addr constant [8 x i8] c"validate", align 1 +@11 = private unnamed_addr constant [57 x i8] c"github.com/goplus/llgo/cl/_testdata/geometry1370.validate", align 1 +@_llgo_bool = linkonce global ptr null, align 8 +@"_llgo_func$YHeRw3AOvQtzv982-ZO3Yn8vh3Fx89RM3VvI8E4iKVk" = linkonce global ptr null, align 8 +@"*_llgo_github.com/goplus/llgo/cl/_testdata/geometry1370.Rectangle" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testdata/geometry1370.Shape" = linkonce global ptr null, align 8 +@12 = private unnamed_addr constant [5 x i8] c"Shape", align 1 +@13 = private unnamed_addr constant [3 x i8] c"ID:", align 1 + +define void @"github.com/goplus/llgo/cl/_testgo/interface1370.init"() { +_llgo_0: + %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testgo/interface1370.init$guard", align 1 + br i1 %0, label %_llgo_2, label %_llgo_1 + +_llgo_1: ; preds = %_llgo_0 + store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/interface1370.init$guard", align 1 + call void @"github.com/goplus/llgo/cl/_testdata/geometry1370.init"() + call void @"github.com/goplus/llgo/cl/_testgo/interface1370.init$after"() + br label %_llgo_2 + +_llgo_2: ; preds = %_llgo_1, %_llgo_0 + ret void +} + +define void @"github.com/goplus/llgo/cl/_testgo/interface1370.main"() { +_llgo_0: + %0 = call ptr @"github.com/goplus/llgo/cl/_testdata/geometry1370.NewRectangle"(double 5.000000e+00, double 3.000000e+00) + %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/geometry1370.Rectangle", align 8 + %2 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testdata/geometry1370.Rectangle", align 8 + %3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/geometry1370.Shape", align 8 + %4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %3, ptr %2) + %5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %4, 0 + %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %5, ptr %0, 1 + call void @"github.com/goplus/llgo/cl/_testdata/geometry1370.RegisterShape"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %6, i64 42) + %7 = call i64 @"github.com/goplus/llgo/cl/_testdata/geometry1370.(*Rectangle).GetID"(ptr %0) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 3 }) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %7) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) + ret void +} + +declare void @"github.com/goplus/llgo/cl/_testdata/geometry1370.init"() + +declare ptr @"github.com/goplus/llgo/cl/_testdata/geometry1370.NewRectangle"(double, double) + +declare void @"github.com/goplus/llgo/cl/_testdata/geometry1370.RegisterShape"(%"github.com/goplus/llgo/runtime/internal/runtime.iface", i64) + +define void @"github.com/goplus/llgo/cl/_testgo/interface1370.init$after"() { +_llgo_0: + %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 9 }, i64 25, i64 24, i64 0, i64 4) + %1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/geometry1370.Rectangle", align 8 + %2 = icmp eq ptr %1, null + br i1 %2, label %_llgo_1, label %_llgo_2 + +_llgo_1: ; preds = %_llgo_0 + store ptr %0, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/geometry1370.Rectangle", align 8 + 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 + +_llgo_3: ; preds = %_llgo_2 + %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 46) + store ptr %5, ptr @_llgo_float64, align 8 + br label %_llgo_4 + +_llgo_4: ; preds = %_llgo_3, %_llgo_2 + %6 = load ptr, ptr @_llgo_float64, align 8 + %7 = load ptr, ptr @_llgo_int, align 8 + %8 = icmp eq ptr %7, null + br i1 %8, label %_llgo_5, label %_llgo_6 + +_llgo_5: ; preds = %_llgo_4 + %9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) + store ptr %9, ptr @_llgo_int, align 8 + br label %_llgo_6 + +_llgo_6: ; preds = %_llgo_5, %_llgo_4 + %10 = load ptr, ptr @_llgo_int, align 8 + %11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 46) + %12 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 5 }, ptr %11, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) + %13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 46) + %14 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 6 }, ptr %13, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) + %15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) + %16 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 2 }, ptr %15, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) + %17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 168) + %18 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %17, i64 0 + store %"github.com/goplus/llgo/runtime/abi.StructField" %12, ptr %18, align 8 + %19 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %17, i64 1 + store %"github.com/goplus/llgo/runtime/abi.StructField" %14, ptr %19, align 8 + %20 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %17, i64 2 + store %"github.com/goplus/llgo/runtime/abi.StructField" %16, ptr %20, align 8 + %21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %17, 0 + %22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %21, i64 3, 1 + %23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %22, i64 3, 2 + %24 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 47 }, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %23) + store ptr %24, ptr @"github.com/goplus/llgo/cl/_testgo/interface1370.struct$EuRbjzGGO7GwkW6RxZGl-8lEjTdEMzAFD8LnY_SpVoQ", align 8 + %25 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/interface1370.struct$EuRbjzGGO7GwkW6RxZGl-8lEjTdEMzAFD8LnY_SpVoQ", align 8 + br i1 %2, label %_llgo_7, label %_llgo_8 + +_llgo_7: ; preds = %_llgo_6 + %26 = load ptr, ptr @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8", align 8 + %27 = icmp eq ptr %26, null + br i1 %27, label %_llgo_9, label %_llgo_10 + +_llgo_8: ; preds = %_llgo_18, %_llgo_6 + %28 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 9 }, i64 25, i64 24, i64 0, i64 4) + %29 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testdata/geometry1370.Rectangle", align 8 + %30 = icmp eq ptr %29, null + br i1 %30, label %_llgo_19, label %_llgo_20 + +_llgo_9: ; preds = %_llgo_7 + %31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) + %32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %31, 0 + %33 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %32, i64 0, 1 + %34 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %33, i64 0, 2 + %35 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 46) + %36 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) + %37 = getelementptr ptr, ptr %36, i64 0 + store ptr %35, ptr %37, align 8 + %38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %36, 0 + %39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %38, i64 1, 1 + %40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %39, i64 1, 2 + %41 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %34, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %40, i1 false) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %41) + store ptr %41, ptr @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8", align 8 + br label %_llgo_10 + +_llgo_10: ; preds = %_llgo_9, %_llgo_7 + %42 = load ptr, ptr @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8", align 8 + %43 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %42, 1 + %44 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %43, ptr @"github.com/goplus/llgo/cl/_testdata/geometry1370.(*Rectangle).Area", 2 + %45 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %44, ptr @"github.com/goplus/llgo/cl/_testdata/geometry1370.(*Rectangle).Area", 3 + %46 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %47 = icmp eq ptr %46, null + br i1 %47, label %_llgo_11, label %_llgo_12 + +_llgo_11: ; preds = %_llgo_10 + %48 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) + %49 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %48, 0 + %50 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %49, i64 0, 1 + %51 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %50, i64 0, 2 + %52 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) + %53 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) + %54 = getelementptr ptr, ptr %53, i64 0 + store ptr %52, ptr %54, align 8 + %55 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %53, 0 + %56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %55, i64 1, 1 + %57 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %56, i64 1, 2 + %58 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %51, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %57, i1 false) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %58) + store ptr %58, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + br label %_llgo_12 + +_llgo_12: ; preds = %_llgo_11, %_llgo_10 + %59 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %60 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %59, 1 + %61 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %60, ptr @"github.com/goplus/llgo/cl/_testdata/geometry1370.(*Rectangle).GetID", 2 + %62 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %61, ptr @"github.com/goplus/llgo/cl/_testdata/geometry1370.(*Rectangle).GetID", 3 + %63 = load ptr, ptr @"_llgo_func$VZ-8VPNF1RaLICwxc1Ghn7BbgyFX3v762OCdx127EkA", align 8 + %64 = icmp eq ptr %63, null + br i1 %64, label %_llgo_13, label %_llgo_14 + +_llgo_13: ; preds = %_llgo_12 + %65 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) + %66 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) + %67 = getelementptr ptr, ptr %66, i64 0 + store ptr %65, ptr %67, align 8 + %68 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %66, 0 + %69 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68, i64 1, 1 + %70 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %69, i64 1, 2 + %71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) + %72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %71, 0 + %73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %72, i64 0, 1 + %74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %73, i64 0, 2 + %75 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %70, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %74, i1 false) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %75) + store ptr %75, ptr @"_llgo_func$VZ-8VPNF1RaLICwxc1Ghn7BbgyFX3v762OCdx127EkA", align 8 + br label %_llgo_14 + +_llgo_14: ; preds = %_llgo_13, %_llgo_12 + %76 = load ptr, ptr @"_llgo_func$VZ-8VPNF1RaLICwxc1Ghn7BbgyFX3v762OCdx127EkA", align 8 + %77 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 54 }, ptr undef, ptr undef, ptr undef }, ptr %76, 1 + %78 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %77, ptr @"github.com/goplus/llgo/cl/_testdata/geometry1370.(*Rectangle).setID", 2 + %79 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %78, ptr @"github.com/goplus/llgo/cl/_testdata/geometry1370.(*Rectangle).setID", 3 + %80 = load ptr, ptr @_llgo_bool, align 8 + %81 = icmp eq ptr %80, null + br i1 %81, label %_llgo_15, label %_llgo_16 + +_llgo_15: ; preds = %_llgo_14 + %82 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 33) + store ptr %82, ptr @_llgo_bool, align 8 + br label %_llgo_16 + +_llgo_16: ; preds = %_llgo_15, %_llgo_14 + %83 = load ptr, ptr @_llgo_bool, align 8 + %84 = load ptr, ptr @"_llgo_func$YHeRw3AOvQtzv982-ZO3Yn8vh3Fx89RM3VvI8E4iKVk", align 8 + %85 = icmp eq ptr %84, null + br i1 %85, label %_llgo_17, label %_llgo_18 + +_llgo_17: ; preds = %_llgo_16 + %86 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) + %87 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %86, 0 + %88 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %87, i64 0, 1 + %89 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %88, i64 0, 2 + %90 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 33) + %91 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) + %92 = getelementptr ptr, ptr %91, i64 0 + store ptr %90, ptr %92, align 8 + %93 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %91, 0 + %94 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %93, i64 1, 1 + %95 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %94, i64 1, 2 + %96 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %89, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %95, i1 false) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %96) + store ptr %96, ptr @"_llgo_func$YHeRw3AOvQtzv982-ZO3Yn8vh3Fx89RM3VvI8E4iKVk", align 8 + br label %_llgo_18 + +_llgo_18: ; preds = %_llgo_17, %_llgo_16 + %97 = load ptr, ptr @"_llgo_func$YHeRw3AOvQtzv982-ZO3Yn8vh3Fx89RM3VvI8E4iKVk", align 8 + %98 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 57 }, ptr undef, ptr undef, ptr undef }, ptr %97, 1 + %99 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %98, ptr @"github.com/goplus/llgo/cl/_testdata/geometry1370.(*Rectangle).validate", 2 + %100 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %99, ptr @"github.com/goplus/llgo/cl/_testdata/geometry1370.(*Rectangle).validate", 3 + %101 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 160) + %102 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %101, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Method" %45, ptr %102, align 8 + %103 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %101, i64 1 + store %"github.com/goplus/llgo/runtime/abi.Method" %62, ptr %103, align 8 + %104 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %101, i64 2 + store %"github.com/goplus/llgo/runtime/abi.Method" %79, ptr %104, align 8 + %105 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %101, i64 3 + store %"github.com/goplus/llgo/runtime/abi.Method" %100, ptr %105, align 8 + %106 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %101, 0 + %107 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %106, i64 4, 1 + %108 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %107, i64 4, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %0, ptr %25, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %108) + br label %_llgo_8 + +_llgo_19: ; preds = %_llgo_8 + %109 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %28) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %109) + store ptr %109, ptr @"*_llgo_github.com/goplus/llgo/cl/_testdata/geometry1370.Rectangle", align 8 + br label %_llgo_20 + +_llgo_20: ; preds = %_llgo_19, %_llgo_8 + %110 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 5 }) + %111 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/geometry1370.Shape", align 8 + %112 = icmp eq ptr %111, null + br i1 %112, label %_llgo_21, label %_llgo_22 + +_llgo_21: ; preds = %_llgo_20 + store ptr %110, ptr @"_llgo_github.com/goplus/llgo/cl/_testdata/geometry1370.Shape", align 8 + br label %_llgo_22 + +_llgo_22: ; preds = %_llgo_21, %_llgo_20 + %113 = load ptr, ptr @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8", align 8 + %114 = load ptr, ptr @"_llgo_func$VZ-8VPNF1RaLICwxc1Ghn7BbgyFX3v762OCdx127EkA", align 8 + %115 = load ptr, ptr @"_llgo_func$YHeRw3AOvQtzv982-ZO3Yn8vh3Fx89RM3VvI8E4iKVk", align 8 + br i1 %112, label %_llgo_23, label %_llgo_24 + +_llgo_23: ; preds = %_llgo_22 + %116 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 4 }, ptr undef }, ptr %113, 1 + %117 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 54 }, ptr undef }, ptr %114, 1 + %118 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 57 }, ptr undef }, ptr %115, 1 + %119 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 72) + %120 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %119, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %116, ptr %120, align 8 + %121 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %119, i64 1 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %117, ptr %121, align 8 + %122 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %119, i64 2 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %118, ptr %122, align 8 + %123 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %119, 0 + %124 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %123, i64 3, 1 + %125 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %124, i64 3, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %110, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %125) + br label %_llgo_24 + +_llgo_24: ; preds = %_llgo_23, %_llgo_22 + ret void +} + +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.String", i64, i64, i64, i64) + +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64) + +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String", i64, %"github.com/goplus/llgo/runtime/internal/runtime.Slice") + +declare %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1) + +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64) + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr, ptr, %"github.com/goplus/llgo/runtime/internal/runtime.Slice", %"github.com/goplus/llgo/runtime/internal/runtime.Slice") + +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice", %"github.com/goplus/llgo/runtime/internal/runtime.Slice", i1) + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr) + +declare double @"github.com/goplus/llgo/cl/_testdata/geometry1370.(*Rectangle).Area"(ptr) + +declare i64 @"github.com/goplus/llgo/cl/_testdata/geometry1370.(*Rectangle).GetID"(ptr) + +declare void @"github.com/goplus/llgo/cl/_testdata/geometry1370.(*Rectangle).setID"(ptr, i64) + +declare i1 @"github.com/goplus/llgo/cl/_testdata/geometry1370.(*Rectangle).validate"(ptr) + +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr) + +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.String") + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr, %"github.com/goplus/llgo/runtime/internal/runtime.Slice") + +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr, ptr) + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String") + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8) + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64) diff --git a/cl/_testgo/invoke/out.ll b/cl/_testgo/invoke/out.ll index e5b27bce..18a43523 100644 --- a/cl/_testgo/invoke/out.ll +++ b/cl/_testgo/invoke/out.ll @@ -32,43 +32,44 @@ source_filename = "github.com/goplus/llgo/cl/_testgo/invoke" @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA" = linkonce global ptr null, align 8 @12 = private unnamed_addr constant [6 x i8] c"Method", align 1 @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8 -@"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I" = linkonce global ptr null, align 8 +@13 = private unnamed_addr constant [1 x i8] c"I", align 1 @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T" = linkonce global ptr null, align 8 @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1" = linkonce global ptr null, align 8 -@13 = private unnamed_addr constant [2 x i8] c"T1", align 1 +@14 = private unnamed_addr constant [2 x i8] c"T1", align 1 @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1" = linkonce global ptr null, align 8 @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2" = linkonce global ptr null, align 8 -@14 = private unnamed_addr constant [2 x i8] c"T2", align 1 +@15 = private unnamed_addr constant [2 x i8] c"T2", align 1 @_llgo_float64 = linkonce global ptr null, align 8 @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2" = linkonce global ptr null, align 8 @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3" = linkonce global ptr null, align 8 -@15 = private unnamed_addr constant [2 x i8] c"T3", align 1 +@16 = private unnamed_addr constant [2 x i8] c"T3", align 1 @_llgo_int8 = linkonce global ptr null, align 8 @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3" = linkonce global ptr null, align 8 @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4" = linkonce global ptr null, align 8 -@16 = private unnamed_addr constant [2 x i8] c"T4", align 1 +@17 = private unnamed_addr constant [2 x i8] c"T4", align 1 @"[1]_llgo_int" = linkonce global ptr null, align 8 @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4" = linkonce global ptr null, align 8 @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5" = linkonce global ptr null, align 8 -@17 = private unnamed_addr constant [2 x i8] c"T5", align 1 +@18 = private unnamed_addr constant [2 x i8] c"T5", align 1 @"github.com/goplus/llgo/cl/_testgo/invoke.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U" = linkonce global ptr null, align 8 -@18 = private unnamed_addr constant [1 x i8] c"n", align 1 +@19 = private unnamed_addr constant [1 x i8] c"n", align 1 @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5" = linkonce global ptr null, align 8 @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6" = linkonce global ptr null, align 8 -@19 = private unnamed_addr constant [2 x i8] c"T6", align 1 +@20 = private unnamed_addr constant [2 x i8] c"T6", align 1 @_llgo_Pointer = linkonce global ptr null, align 8 @"github.com/goplus/llgo/cl/_testgo/invoke.struct$TWlEC03isGYe2Nyy2HYnOBsOYR1lIx43oIUpIyqvm4s" = linkonce global ptr null, align 8 -@20 = private unnamed_addr constant [2 x i8] c"$f", align 1 -@21 = private unnamed_addr constant [5 x i8] c"$data", align 1 +@21 = private unnamed_addr constant [2 x i8] c"$f", align 1 +@22 = private unnamed_addr constant [5 x i8] c"$data", align 1 @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6" = linkonce global ptr null, align 8 -@"_llgo_iface$jwmSdgh1zvY_TDIgLzCkvkbiyrdwl9N806DH0JGcyMI" = linkonce global ptr null, align 8 -@22 = private unnamed_addr constant [5 x i8] c"world", align 1 -@"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I" = linkonce global ptr null, align 8 -@23 = private unnamed_addr constant [1 x i8] c"I", align 1 -@24 = private unnamed_addr constant [71 x i8] c"type assertion any -> github.com/goplus/llgo/cl/_testgo/invoke.I failed", align 1 +@"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.M" = linkonce global ptr null, align 8 +@23 = private unnamed_addr constant [1 x i8] c"M", align 1 +@24 = private unnamed_addr constant [5 x i8] c"world", align 1 +@25 = private unnamed_addr constant [71 x i8] c"type assertion any -> github.com/goplus/llgo/cl/_testgo/invoke.I failed", align 1 @_llgo_any = linkonce global ptr null, align 8 -@25 = private unnamed_addr constant [32 x i8] c"type assertion any -> any failed", align 1 -@26 = private unnamed_addr constant [52 x i8] c"type assertion any -> interface{Invoke() int} failed", align 1 +@26 = private unnamed_addr constant [32 x i8] c"type assertion any -> any failed", align 1 +@"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0" = linkonce global ptr null, align 8 +@27 = private unnamed_addr constant [52 x i8] c"type assertion any -> interface{Invoke() int} failed", align 1 define i64 @"github.com/goplus/llgo/cl/_testgo/invoke.T.Invoke"(%"github.com/goplus/llgo/cl/_testgo/invoke.T" %0) { _llgo_0: @@ -253,189 +254,186 @@ _llgo_0: %11 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 %12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/cl/_testgo/invoke.T" %10, ptr %12, align 8 - %13 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %14 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %14, ptr %11) - %16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %15, 0 - %17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %16, ptr %12, 1 - call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %17) - %18 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 - %19 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %19, ptr %18) - %21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %20, 0 - %22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %21, ptr %0, 1 - call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %22) - %23 = load i64, ptr %2, align 4 - %24 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 - %25 = inttoptr i64 %23 to ptr - %26 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %27 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %26, ptr %24) - %28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %27, 0 - %29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %28, ptr %25, 1 - call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %29) - %30 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 - %31 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %31, ptr %30) - %33 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %32, 0 - %34 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %33, ptr %2, 1 - call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %34) - %35 = load double, ptr %3, align 8 - %36 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 - %37 = bitcast double %35 to i64 - %38 = inttoptr i64 %37 to ptr - %39 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %40 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %39, ptr %36) - %41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %40, 0 - %42 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %41, ptr %38, 1 - call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %42) - %43 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 - %44 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %45 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %44, ptr %43) - %46 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %45, 0 - %47 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %46, ptr %3, 1 - call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %47) - %48 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 - %49 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 - %50 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %50, ptr %49) - %52 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %51, 0 - %53 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %52, ptr %4, 1 - call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %53) - %54 = load [1 x i64], ptr %5, align 4 - %55 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 - %56 = extractvalue [1 x i64] %54, 0 - %57 = inttoptr i64 %56 to ptr - %58 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %59 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %58, ptr %55) - %60 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %59, 0 - %61 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %60, ptr %57, 1 - call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %61) - %62 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 - %63 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %64 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %63, ptr %62) - %65 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %64, 0 - %66 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %65, ptr %5, 1 - call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %66) - %67 = load %"github.com/goplus/llgo/cl/_testgo/invoke.T5", ptr %7, align 4 - %68 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 - %69 = extractvalue %"github.com/goplus/llgo/cl/_testgo/invoke.T5" %67, 0 - %70 = inttoptr i64 %69 to ptr - %71 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %72 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %71, ptr %68) - %73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %72, 0 - %74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %73, ptr %70, 1 - call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %74) - %75 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 - %76 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %77 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %76, ptr %75) - %78 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %77, 0 - %79 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %78, ptr %7, 1 - call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %79) - %80 = load %"github.com/goplus/llgo/cl/_testgo/invoke.T6", ptr %9, align 8 - %81 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 - %82 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/cl/_testgo/invoke.T6" %80, ptr %82, align 8 - %83 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %84 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %83, ptr %81) - %85 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %84, 0 - %86 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %85, ptr %82, 1 - call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %86) - %87 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 - %88 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %89 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %88, ptr %87) - %90 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %89, 0 - %91 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %90, ptr %9, 1 - call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %91) - %92 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer) - %93 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %94 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %93, ptr %92) - %95 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %94, 0 - %96 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %95, ptr null, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintIface"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %96) + %13 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + %14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %13, ptr %11) + %15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %14, 0 + %16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %15, ptr %12, 1 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %16) + %17 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 + %18 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + %19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %18, ptr %17) + %20 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %19, 0 + %21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %20, ptr %0, 1 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %21) + %22 = load i64, ptr %2, align 4 + %23 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 + %24 = inttoptr i64 %22 to ptr + %25 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + %26 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %25, ptr %23) + %27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %26, 0 + %28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %27, ptr %24, 1 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %28) + %29 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 + %30 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + %31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %30, ptr %29) + %32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %31, 0 + %33 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %32, ptr %2, 1 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %33) + %34 = load double, ptr %3, align 8 + %35 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 + %36 = bitcast double %34 to i64 + %37 = inttoptr i64 %36 to ptr + %38 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + %39 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %38, ptr %35) + %40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %39, 0 + %41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %40, ptr %37, 1 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %41) + %42 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 + %43 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + %44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %43, ptr %42) + %45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %44, 0 + %46 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %45, ptr %3, 1 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %46) + %47 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 + %48 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 + %49 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + %50 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %49, ptr %48) + %51 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %50, 0 + %52 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %51, ptr %4, 1 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %52) + %53 = load [1 x i64], ptr %5, align 4 + %54 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 + %55 = extractvalue [1 x i64] %53, 0 + %56 = inttoptr i64 %55 to ptr + %57 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + %58 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %57, ptr %54) + %59 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %58, 0 + %60 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %59, ptr %56, 1 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %60) + %61 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 + %62 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + %63 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %62, ptr %61) + %64 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %63, 0 + %65 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %64, ptr %5, 1 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %65) + %66 = load %"github.com/goplus/llgo/cl/_testgo/invoke.T5", ptr %7, align 4 + %67 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 + %68 = extractvalue %"github.com/goplus/llgo/cl/_testgo/invoke.T5" %66, 0 + %69 = inttoptr i64 %68 to ptr + %70 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + %71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %70, ptr %67) + %72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %71, 0 + %73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %72, ptr %69, 1 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %73) + %74 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 + %75 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + %76 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %75, ptr %74) + %77 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %76, 0 + %78 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %77, ptr %7, 1 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %78) + %79 = load %"github.com/goplus/llgo/cl/_testgo/invoke.T6", ptr %9, align 8 + %80 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 + %81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/cl/_testgo/invoke.T6" %79, ptr %81, align 8 + %82 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + %83 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %82, ptr %80) + %84 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %83, 0 + %85 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %84, ptr %81, 1 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %85) + %86 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 + %87 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + %88 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %87, ptr %86) + %89 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %88, 0 + %90 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %89, ptr %9, 1 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %90) + %91 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer) + %92 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + %93 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %92, ptr %91) + %94 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %93, 0 + %95 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %94, ptr null, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintIface"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %95) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintIface"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %97 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 - %98 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %99 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %100 = load ptr, ptr @"_llgo_iface$jwmSdgh1zvY_TDIgLzCkvkbiyrdwl9N806DH0JGcyMI", align 8 - %101 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %100, ptr %97) - %102 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %101, 0 - %103 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %102, ptr %0, 1 - %104 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %103) - %105 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %103, 1 - %106 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %107 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %106, ptr %104) - %108 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %107, 0 - %109 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %108, ptr %105, 1 - call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %109) - %110 = alloca %"github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 - call void @llvm.memset(ptr %110, i8 0, i64 16, i1 false) - %111 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/invoke.T", ptr %110, i32 0, i32 0 - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 5 }, ptr %111, align 8 - %112 = load %"github.com/goplus/llgo/cl/_testgo/invoke.T", ptr %110, align 8 - %113 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 - %114 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/cl/_testgo/invoke.T" %112, ptr %114, align 8 - %115 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %113, 0 - %116 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %115, ptr %114, 1 - %117 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %116, 0 - %118 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 - %119 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %118, ptr %117) - br i1 %119, label %_llgo_1, label %_llgo_2 + %96 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 + %97 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.M", align 8 + %98 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %97, ptr %96) + %99 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %98, 0 + %100 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %99, ptr %0, 1 + %101 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %100) + %102 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %100, 1 + %103 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + %104 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %103, ptr %101) + %105 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %104, 0 + %106 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %105, ptr %102, 1 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %106) + %107 = alloca %"github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 + call void @llvm.memset(ptr %107, i8 0, i64 16, i1 false) + %108 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/invoke.T", ptr %107, i32 0, i32 0 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @24, i64 5 }, ptr %108, align 8 + %109 = load %"github.com/goplus/llgo/cl/_testgo/invoke.T", ptr %107, align 8 + %110 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 + %111 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/cl/_testgo/invoke.T" %109, ptr %111, align 8 + %112 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %110, 0 + %113 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %112, ptr %111, 1 + %114 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %113, 0 + %115 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + %116 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %115, ptr %114) + br i1 %116, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - %120 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %116, 1 - %121 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %122 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %121, ptr %117) - %123 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %122, 0 - %124 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %123, ptr %120, 1 - call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %124) - %125 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %116, 0 - %126 = load ptr, ptr @_llgo_any, align 8 - %127 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %116, 1 + %117 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %113, 1 + %118 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + %119 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %118, ptr %114) + %120 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %119, 0 + %121 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %120, ptr %117, 1 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %121) + %122 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %113, 0 + %123 = load ptr, ptr @_llgo_any, align 8 + %124 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %113, 1 br i1 true, label %_llgo_3, label %_llgo_4 _llgo_2: ; preds = %_llgo_0 - %128 = load ptr, ptr @_llgo_string, align 8 - %129 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @24, i64 71 }, ptr %129, align 8 - %130 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %128, 0 - %131 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %130, ptr %129, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %131) + %125 = load ptr, ptr @_llgo_string, align 8 + %126 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @25, i64 71 }, ptr %126, align 8 + %127 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %125, 0 + %128 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %127, ptr %126, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %128) unreachable _llgo_3: ; preds = %_llgo_1 - %132 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %116, 0 - %133 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %134 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %133, ptr %132) - br i1 %134, label %_llgo_5, label %_llgo_6 + %129 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %113, 0 + %130 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 + %131 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %130, ptr %129) + br i1 %131, label %_llgo_5, label %_llgo_6 _llgo_4: ; preds = %_llgo_1 - %135 = load ptr, ptr @_llgo_string, align 8 - %136 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @25, i64 32 }, ptr %136, align 8 - %137 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %135, 0 - %138 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %137, ptr %136, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %138) + %132 = load ptr, ptr @_llgo_string, align 8 + %133 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @26, i64 32 }, ptr %133, align 8 + %134 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %132, 0 + %135 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %134, ptr %133, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %135) unreachable _llgo_5: ; preds = %_llgo_3 - %139 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %116, 1 - %140 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 - %141 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %140, ptr %132) - %142 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %141, 0 - %143 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %142, ptr %139, 1 - call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %143) + %136 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %113, 1 + %137 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 + %138 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %137, ptr %129) + %139 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %138, 0 + %140 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %139, ptr %136, 1 + call void @"github.com/goplus/llgo/cl/_testgo/invoke.invoke"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %140) ret void _llgo_6: ; preds = %_llgo_3 - %144 = load ptr, ptr @_llgo_string, align 8 - %145 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @26, i64 52 }, ptr %145, align 8 - %146 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %144, 0 - %147 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %146, ptr %145, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %147) + %141 = load ptr, ptr @_llgo_string, align 8 + %142 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @27, i64 52 }, ptr %142, align 8 + %143 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %141, 0 + %144 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %143, ptr %142, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %144) unreachable } @@ -507,8 +505,8 @@ _llgo_5: ; preds = %_llgo_4 br i1 %17, label %_llgo_7, label %_llgo_8 _llgo_6: ; preds = %_llgo_12, %_llgo_4 - %18 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %19 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 + %18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 1 }) + %19 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 %20 = icmp eq ptr %19, null br i1 %20, label %_llgo_13, label %_llgo_14 @@ -589,44 +587,51 @@ _llgo_12: ; preds = %_llgo_11, %_llgo_10 br label %_llgo_6 _llgo_13: ; preds = %_llgo_6 - %69 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef }, ptr %18, 1 - %70 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) - %71 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %70, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %69, ptr %71, align 8 - %72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %70, 0 - %73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %72, i64 1, 1 - %74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %73, i64 1, 2 - %75 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %74) - store ptr %75, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 + store ptr %18, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 br label %_llgo_14 _llgo_14: ; preds = %_llgo_13, %_llgo_6 - %76 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 16, i64 1, i64 2) - %77 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 - %78 = icmp eq ptr %77, null - br i1 %78, label %_llgo_15, label %_llgo_16 + %69 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + br i1 %20, label %_llgo_15, label %_llgo_16 _llgo_15: ; preds = %_llgo_14 - %79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %76) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %79) - store ptr %79, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 + %70 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef }, ptr %69, 1 + %71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) + %72 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %71, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %70, ptr %72, align 8 + %73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %71, 0 + %74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %73, i64 1, 1 + %75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %74, i64 1, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %18, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75) br label %_llgo_16 _llgo_16: ; preds = %_llgo_15, %_llgo_14 - %80 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 2 }, i64 2, i64 8, i64 1, i64 1) - %81 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 - %82 = icmp eq ptr %81, null - br i1 %82, label %_llgo_17, label %_llgo_18 + %76 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 16, i64 1, i64 2) + %77 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 + %78 = icmp eq ptr %77, null + br i1 %78, label %_llgo_17, label %_llgo_18 _llgo_17: ; preds = %_llgo_16 - store ptr %80, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 + %79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %76) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %79) + store ptr %79, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T", align 8 br label %_llgo_18 _llgo_18: ; preds = %_llgo_17, %_llgo_16 - %83 = load ptr, ptr @_llgo_int, align 8 + %80 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 2 }, i64 2, i64 8, i64 1, i64 1) + %81 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 + %82 = icmp eq ptr %81, null br i1 %82, label %_llgo_19, label %_llgo_20 _llgo_19: ; preds = %_llgo_18 + store ptr %80, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 + br label %_llgo_20 + +_llgo_20: ; preds = %_llgo_19, %_llgo_18 + %83 = load ptr, ptr @_llgo_int, align 8 + br i1 %82, label %_llgo_21, label %_llgo_22 + +_llgo_21: ; preds = %_llgo_20 %84 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %85 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %84, 1 %86 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %85, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T1).Invoke", 2 @@ -647,45 +652,45 @@ _llgo_19: ; preds = %_llgo_18 %99 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %98, i64 1, 1 %100 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %99, i64 1, 2 call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %80, ptr %83, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %95, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %100) - br label %_llgo_20 - -_llgo_20: ; preds = %_llgo_19, %_llgo_18 - %101 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 2 }, i64 2, i64 8, i64 1, i64 1) - %102 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 - %103 = icmp eq ptr %102, null - br i1 %103, label %_llgo_21, label %_llgo_22 - -_llgo_21: ; preds = %_llgo_20 - %104 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %101) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %104) - store ptr %104, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 br label %_llgo_22 _llgo_22: ; preds = %_llgo_21, %_llgo_20 - %105 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 2 }, i64 14, i64 8, i64 1, i64 1) - %106 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 - %107 = icmp eq ptr %106, null - br i1 %107, label %_llgo_23, label %_llgo_24 + %101 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 2 }, i64 2, i64 8, i64 1, i64 1) + %102 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 + %103 = icmp eq ptr %102, null + br i1 %103, label %_llgo_23, label %_llgo_24 _llgo_23: ; preds = %_llgo_22 - store ptr %105, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 + %104 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %101) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %104) + store ptr %104, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T1", align 8 br label %_llgo_24 _llgo_24: ; preds = %_llgo_23, %_llgo_22 - %108 = load ptr, ptr @_llgo_float64, align 8 - %109 = icmp eq ptr %108, null - br i1 %109, label %_llgo_25, label %_llgo_26 + %105 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 2 }, i64 14, i64 8, i64 1, i64 1) + %106 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 + %107 = icmp eq ptr %106, null + br i1 %107, label %_llgo_25, label %_llgo_26 _llgo_25: ; preds = %_llgo_24 - %110 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 46) - store ptr %110, ptr @_llgo_float64, align 8 + store ptr %105, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 br label %_llgo_26 _llgo_26: ; preds = %_llgo_25, %_llgo_24 - %111 = load ptr, ptr @_llgo_float64, align 8 - br i1 %107, label %_llgo_27, label %_llgo_28 + %108 = load ptr, ptr @_llgo_float64, align 8 + %109 = icmp eq ptr %108, null + br i1 %109, label %_llgo_27, label %_llgo_28 _llgo_27: ; preds = %_llgo_26 + %110 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 46) + store ptr %110, ptr @_llgo_float64, align 8 + br label %_llgo_28 + +_llgo_28: ; preds = %_llgo_27, %_llgo_26 + %111 = load ptr, ptr @_llgo_float64, align 8 + br i1 %107, label %_llgo_29, label %_llgo_30 + +_llgo_29: ; preds = %_llgo_28 %112 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %113 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %112, 1 %114 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %113, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T2).Invoke", 2 @@ -706,45 +711,45 @@ _llgo_27: ; preds = %_llgo_26 %127 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %126, i64 1, 1 %128 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %127, i64 1, 2 call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %105, ptr %111, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %123, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %128) - br label %_llgo_28 - -_llgo_28: ; preds = %_llgo_27, %_llgo_26 - %129 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 2 }, i64 14, i64 8, i64 1, i64 1) - %130 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 - %131 = icmp eq ptr %130, null - br i1 %131, label %_llgo_29, label %_llgo_30 - -_llgo_29: ; preds = %_llgo_28 - %132 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %129) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %132) - store ptr %132, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 br label %_llgo_30 _llgo_30: ; preds = %_llgo_29, %_llgo_28 - %133 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 2 }, i64 3, i64 1, i64 0, i64 1) - %134 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 - %135 = icmp eq ptr %134, null - br i1 %135, label %_llgo_31, label %_llgo_32 + %129 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 2 }, i64 14, i64 8, i64 1, i64 1) + %130 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 + %131 = icmp eq ptr %130, null + br i1 %131, label %_llgo_31, label %_llgo_32 _llgo_31: ; preds = %_llgo_30 - store ptr %133, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 + %132 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %129) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %132) + store ptr %132, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T2", align 8 br label %_llgo_32 _llgo_32: ; preds = %_llgo_31, %_llgo_30 - %136 = load ptr, ptr @_llgo_int8, align 8 - %137 = icmp eq ptr %136, null - br i1 %137, label %_llgo_33, label %_llgo_34 + %133 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @16, i64 2 }, i64 3, i64 1, i64 0, i64 1) + %134 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 + %135 = icmp eq ptr %134, null + br i1 %135, label %_llgo_33, label %_llgo_34 _llgo_33: ; preds = %_llgo_32 - %138 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 35) - store ptr %138, ptr @_llgo_int8, align 8 + store ptr %133, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 br label %_llgo_34 _llgo_34: ; preds = %_llgo_33, %_llgo_32 - %139 = load ptr, ptr @_llgo_int8, align 8 - br i1 %135, label %_llgo_35, label %_llgo_36 + %136 = load ptr, ptr @_llgo_int8, align 8 + %137 = icmp eq ptr %136, null + br i1 %137, label %_llgo_35, label %_llgo_36 _llgo_35: ; preds = %_llgo_34 + %138 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 35) + store ptr %138, ptr @_llgo_int8, align 8 + br label %_llgo_36 + +_llgo_36: ; preds = %_llgo_35, %_llgo_34 + %139 = load ptr, ptr @_llgo_int8, align 8 + br i1 %135, label %_llgo_37, label %_llgo_38 + +_llgo_37: ; preds = %_llgo_36 %140 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %141 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %140, 1 %142 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %141, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T3).Invoke", 2 @@ -756,46 +761,46 @@ _llgo_35: ; preds = %_llgo_34 %147 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %146, i64 1, 1 %148 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %147, i64 1, 2 call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %133, ptr %139, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %148) - br label %_llgo_36 - -_llgo_36: ; preds = %_llgo_35, %_llgo_34 - %149 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 2 }, i64 3, i64 1, i64 0, i64 1) - %150 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 - %151 = icmp eq ptr %150, null - br i1 %151, label %_llgo_37, label %_llgo_38 - -_llgo_37: ; preds = %_llgo_36 - %152 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %149) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %152) - store ptr %152, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 br label %_llgo_38 _llgo_38: ; preds = %_llgo_37, %_llgo_36 - %153 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @16, i64 2 }, i64 17, i64 8, i64 1, i64 1) - %154 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 - %155 = icmp eq ptr %154, null - br i1 %155, label %_llgo_39, label %_llgo_40 + %149 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @16, i64 2 }, i64 3, i64 1, i64 0, i64 1) + %150 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 + %151 = icmp eq ptr %150, null + br i1 %151, label %_llgo_39, label %_llgo_40 _llgo_39: ; preds = %_llgo_38 - store ptr %153, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 + %152 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %149) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %152) + store ptr %152, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T3", align 8 br label %_llgo_40 _llgo_40: ; preds = %_llgo_39, %_llgo_38 - %156 = load ptr, ptr @"[1]_llgo_int", align 8 - %157 = icmp eq ptr %156, null - br i1 %157, label %_llgo_41, label %_llgo_42 + %153 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 2 }, i64 17, i64 8, i64 1, i64 1) + %154 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 + %155 = icmp eq ptr %154, null + br i1 %155, label %_llgo_41, label %_llgo_42 _llgo_41: ; preds = %_llgo_40 - %158 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) - %159 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 1, ptr %158) - store ptr %159, ptr @"[1]_llgo_int", align 8 + store ptr %153, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 br label %_llgo_42 _llgo_42: ; preds = %_llgo_41, %_llgo_40 - %160 = load ptr, ptr @"[1]_llgo_int", align 8 - br i1 %155, label %_llgo_43, label %_llgo_44 + %156 = load ptr, ptr @"[1]_llgo_int", align 8 + %157 = icmp eq ptr %156, null + br i1 %157, label %_llgo_43, label %_llgo_44 _llgo_43: ; preds = %_llgo_42 + %158 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) + %159 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 1, ptr %158) + store ptr %159, ptr @"[1]_llgo_int", align 8 + br label %_llgo_44 + +_llgo_44: ; preds = %_llgo_43, %_llgo_42 + %160 = load ptr, ptr @"[1]_llgo_int", align 8 + br i1 %155, label %_llgo_45, label %_llgo_46 + +_llgo_45: ; preds = %_llgo_44 %161 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %162 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %161, 1 %163 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %162, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T4).Invoke", 2 @@ -816,33 +821,33 @@ _llgo_43: ; preds = %_llgo_42 %176 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %175, i64 1, 1 %177 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %176, i64 1, 2 call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %153, ptr %160, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %172, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %177) - br label %_llgo_44 - -_llgo_44: ; preds = %_llgo_43, %_llgo_42 - %178 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @16, i64 2 }, i64 17, i64 8, i64 1, i64 1) - %179 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 - %180 = icmp eq ptr %179, null - br i1 %180, label %_llgo_45, label %_llgo_46 - -_llgo_45: ; preds = %_llgo_44 - %181 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %178) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %181) - store ptr %181, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 br label %_llgo_46 _llgo_46: ; preds = %_llgo_45, %_llgo_44 - %182 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 2 }, i64 25, i64 8, i64 1, i64 1) - %183 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 - %184 = icmp eq ptr %183, null - br i1 %184, label %_llgo_47, label %_llgo_48 + %178 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 2 }, i64 17, i64 8, i64 1, i64 1) + %179 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 + %180 = icmp eq ptr %179, null + br i1 %180, label %_llgo_47, label %_llgo_48 _llgo_47: ; preds = %_llgo_46 - store ptr %182, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 + %181 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %178) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %181) + store ptr %181, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T4", align 8 br label %_llgo_48 _llgo_48: ; preds = %_llgo_47, %_llgo_46 + %182 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 2 }, i64 25, i64 8, i64 1, i64 1) + %183 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 + %184 = icmp eq ptr %183, null + br i1 %184, label %_llgo_49, label %_llgo_50 + +_llgo_49: ; preds = %_llgo_48 + store ptr %182, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 + br label %_llgo_50 + +_llgo_50: ; preds = %_llgo_49, %_llgo_48 %185 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) - %186 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 1 }, ptr %185, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) + %186 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 1 }, ptr %185, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %187 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56) %188 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %187, i64 0 store %"github.com/goplus/llgo/runtime/abi.StructField" %186, ptr %188, align 8 @@ -852,9 +857,9 @@ _llgo_48: ; preds = %_llgo_47, %_llgo_46 %192 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %191) store ptr %192, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U", align 8 %193 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U", align 8 - br i1 %184, label %_llgo_49, label %_llgo_50 + br i1 %184, label %_llgo_51, label %_llgo_52 -_llgo_49: ; preds = %_llgo_48 +_llgo_51: ; preds = %_llgo_50 %194 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %195 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %194, 1 %196 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %195, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T5).Invoke", 2 @@ -875,43 +880,43 @@ _llgo_49: ; preds = %_llgo_48 %209 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %208, i64 1, 1 %210 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %209, i64 1, 2 call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %182, ptr %193, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %205, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %210) - br label %_llgo_50 - -_llgo_50: ; preds = %_llgo_49, %_llgo_48 - %211 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 2 }, i64 25, i64 8, i64 1, i64 1) - %212 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 - %213 = icmp eq ptr %212, null - br i1 %213, label %_llgo_51, label %_llgo_52 - -_llgo_51: ; preds = %_llgo_50 - %214 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %211) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %214) - store ptr %214, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 br label %_llgo_52 _llgo_52: ; preds = %_llgo_51, %_llgo_50 - %215 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 2 }, i64 25, i64 24, i64 1, i64 1) - %216 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 - %217 = icmp eq ptr %216, null - br i1 %217, label %_llgo_53, label %_llgo_54 + %211 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 2 }, i64 25, i64 8, i64 1, i64 1) + %212 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 + %213 = icmp eq ptr %212, null + br i1 %213, label %_llgo_53, label %_llgo_54 _llgo_53: ; preds = %_llgo_52 - store ptr %215, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 + %214 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %211) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %214) + store ptr %214, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T5", align 8 br label %_llgo_54 _llgo_54: ; preds = %_llgo_53, %_llgo_52 - %218 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %219 = load ptr, ptr @_llgo_Pointer, align 8 - %220 = icmp eq ptr %219, null - br i1 %220, label %_llgo_55, label %_llgo_56 + %215 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @20, i64 2 }, i64 25, i64 24, i64 1, i64 1) + %216 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 + %217 = icmp eq ptr %216, null + br i1 %217, label %_llgo_55, label %_llgo_56 _llgo_55: ; preds = %_llgo_54 - %221 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 58) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %221) - store ptr %221, ptr @_llgo_Pointer, align 8 + store ptr %215, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 br label %_llgo_56 _llgo_56: ; preds = %_llgo_55, %_llgo_54 + %218 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %219 = load ptr, ptr @_llgo_Pointer, align 8 + %220 = icmp eq ptr %219, null + br i1 %220, label %_llgo_57, label %_llgo_58 + +_llgo_57: ; preds = %_llgo_56 + %221 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 58) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %221) + store ptr %221, ptr @_llgo_Pointer, align 8 + br label %_llgo_58 + +_llgo_58: ; preds = %_llgo_57, %_llgo_56 %222 = load ptr, ptr @_llgo_Pointer, align 8 %223 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) %224 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %223, 0 @@ -925,9 +930,9 @@ _llgo_56: ; preds = %_llgo_55, %_llgo_54 %231 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %230, i64 1, 1 %232 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %231, i64 1, 2 %233 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %226, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %232, i1 false) - %234 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @20, i64 2 }, ptr %233, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) + %234 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @21, i64 2 }, ptr %233, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %235 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 58) - %236 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @21, i64 5 }, ptr %235, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) + %236 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 5 }, ptr %235, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %237 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 112) %238 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %237, i64 0 store %"github.com/goplus/llgo/runtime/abi.StructField" %234, ptr %238, align 8 @@ -939,9 +944,9 @@ _llgo_56: ; preds = %_llgo_55, %_llgo_54 %243 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %242) store ptr %243, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.struct$TWlEC03isGYe2Nyy2HYnOBsOYR1lIx43oIUpIyqvm4s", align 8 %244 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.struct$TWlEC03isGYe2Nyy2HYnOBsOYR1lIx43oIUpIyqvm4s", align 8 - br i1 %217, label %_llgo_57, label %_llgo_58 + br i1 %217, label %_llgo_59, label %_llgo_60 -_llgo_57: ; preds = %_llgo_56 +_llgo_59: ; preds = %_llgo_58 %245 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %246 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %245, 1 %247 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %246, ptr @"github.com/goplus/llgo/cl/_testgo/invoke.(*T6).Invoke", 2 @@ -962,82 +967,82 @@ _llgo_57: ; preds = %_llgo_56 %260 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %259, i64 1, 1 %261 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %260, i64 1, 2 call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %215, ptr %244, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %256, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %261) - br label %_llgo_58 - -_llgo_58: ; preds = %_llgo_57, %_llgo_56 - %262 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 2 }, i64 25, i64 24, i64 1, i64 1) - %263 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 - %264 = icmp eq ptr %263, null - br i1 %264, label %_llgo_59, label %_llgo_60 - -_llgo_59: ; preds = %_llgo_58 - %265 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %262) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %265) - store ptr %265, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 br label %_llgo_60 _llgo_60: ; preds = %_llgo_59, %_llgo_58 - %266 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %267 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %268 = load ptr, ptr @"_llgo_iface$jwmSdgh1zvY_TDIgLzCkvkbiyrdwl9N806DH0JGcyMI", align 8 - %269 = icmp eq ptr %268, null - br i1 %269, label %_llgo_61, label %_llgo_62 + %262 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @20, i64 2 }, i64 25, i64 24, i64 1, i64 1) + %263 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 + %264 = icmp eq ptr %263, null + br i1 %264, label %_llgo_61, label %_llgo_62 _llgo_61: ; preds = %_llgo_60 - %270 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef }, ptr %266, 1 - %271 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 6 }, ptr undef }, ptr %267, 1 - %272 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) - %273 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %272, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %270, ptr %273, align 8 - %274 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %272, i64 1 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %271, ptr %274, align 8 - %275 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %272, 0 - %276 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %275, i64 2, 1 - %277 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %276, i64 2, 2 - %278 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %277) - store ptr %278, ptr @"_llgo_iface$jwmSdgh1zvY_TDIgLzCkvkbiyrdwl9N806DH0JGcyMI", align 8 + %265 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %262) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %265) + store ptr %265, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/invoke.T6", align 8 br label %_llgo_62 _llgo_62: ; preds = %_llgo_61, %_llgo_60 - %279 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @23, i64 1 }) - %280 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 - %281 = icmp eq ptr %280, null - br i1 %281, label %_llgo_63, label %_llgo_64 + %266 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @23, i64 1 }) + %267 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.M", align 8 + %268 = icmp eq ptr %267, null + br i1 %268, label %_llgo_63, label %_llgo_64 _llgo_63: ; preds = %_llgo_62 - store ptr %279, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.I", align 8 + store ptr %266, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/invoke.M", align 8 br label %_llgo_64 _llgo_64: ; preds = %_llgo_63, %_llgo_62 - %282 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - br i1 %281, label %_llgo_65, label %_llgo_66 + %269 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %270 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + br i1 %268, label %_llgo_65, label %_llgo_66 _llgo_65: ; preds = %_llgo_64 - %283 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef }, ptr %282, 1 - %284 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) - %285 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %284, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %283, ptr %285, align 8 - %286 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %284, 0 - %287 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %286, i64 1, 1 - %288 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %287, i64 1, 2 - call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %279, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %288) + %271 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef }, ptr %269, 1 + %272 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 6 }, ptr undef }, ptr %270, 1 + %273 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) + %274 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %273, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %271, ptr %274, align 8 + %275 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %273, i64 1 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %272, ptr %275, align 8 + %276 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %273, 0 + %277 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %276, i64 2, 1 + %278 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %277, i64 2, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %266, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %278) br label %_llgo_66 _llgo_66: ; preds = %_llgo_65, %_llgo_64 - %289 = load ptr, ptr @_llgo_any, align 8 - %290 = icmp eq ptr %289, null - br i1 %290, label %_llgo_67, label %_llgo_68 + %279 = load ptr, ptr @_llgo_any, align 8 + %280 = icmp eq ptr %279, null + br i1 %280, label %_llgo_67, label %_llgo_68 _llgo_67: ; preds = %_llgo_66 - %291 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) - %292 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %291, 0 - %293 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %292, i64 0, 1 - %294 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %293, i64 0, 2 - %295 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %294) - store ptr %295, ptr @_llgo_any, align 8 + %281 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) + %282 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %281, 0 + %283 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %282, i64 0, 1 + %284 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %283, i64 0, 2 + %285 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %284) + store ptr %285, ptr @_llgo_any, align 8 br label %_llgo_68 _llgo_68: ; preds = %_llgo_67, %_llgo_66 + %286 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %287 = load ptr, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 + %288 = icmp eq ptr %287, null + br i1 %288, label %_llgo_69, label %_llgo_70 + +_llgo_69: ; preds = %_llgo_68 + %289 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef }, ptr %286, 1 + %290 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) + %291 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %290, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %289, ptr %291, align 8 + %292 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %290, 0 + %293 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %292, i64 1, 1 + %294 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %293, i64 1, 2 + %295 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %294) + store ptr %295, ptr @"_llgo_iface$uRUteI7wmSy7y7ODhGzk0FdDaxGKMhVSSu6HZEv9aa0", align 8 + br label %_llgo_70 + +_llgo_70: ; preds = %_llgo_69, %_llgo_68 ret void } @@ -1057,7 +1062,9 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com declare void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr) -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.Slice") +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.String") + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr, %"github.com/goplus/llgo/runtime/internal/runtime.Slice") declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr, ptr) @@ -1069,12 +1076,10 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"githu declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintIface"(%"github.com/goplus/llgo/runtime/internal/runtime.iface") -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.String") - -declare void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr, %"github.com/goplus/llgo/runtime/internal/runtime.Slice") - declare i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr, ptr) declare void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface") +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.Slice") + attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) } diff --git a/cl/_testgo/reader/out.ll b/cl/_testgo/reader/out.ll index e440f393..c7fa4aa1 100644 --- a/cl/_testgo/reader/out.ll +++ b/cl/_testgo/reader/out.ll @@ -34,7 +34,6 @@ source_filename = "github.com/goplus/llgo/cl/_testgo/reader" @_llgo_int64 = linkonce global ptr null, align 8 @"_llgo_func$V_kP-r1nn8Ij-G2jGIm9ROLn4CjtLBch-g3Ha7pGJo4" = linkonce global ptr null, align 8 @6 = private unnamed_addr constant [7 x i8] c"WriteTo", align 1 -@"_llgo_iface$p5Bo_emI1h8acs1rFbUxZTrpeDbIQ34gFcsbwK9YIgs" = linkonce global ptr null, align 8 @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo" = linkonce global ptr null, align 8 @7 = private unnamed_addr constant [17 x i8] c"nopCloserWriterTo", align 1 @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.Reader" = linkonce global ptr null, align 8 @@ -43,53 +42,51 @@ source_filename = "github.com/goplus/llgo/cl/_testgo/reader" @"_llgo_struct$aF5tOq8uFNwjAKwq7XzhGO-4YESPiFwZOQDpqkTBqL8" = linkonce global ptr null, align 8 @10 = private unnamed_addr constant [5 x i8] c"Close", align 1 @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w" = linkonce global ptr null, align 8 -@"_llgo_iface$2bmbYDBStAIdmbXPPn7qIaCcpVcj2I5k6AqgqwAfh84" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/reader.ReadCloser" = linkonce global ptr null, align 8 +@11 = private unnamed_addr constant [10 x i8] c"ReadCloser", align 1 @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.nopCloser" = linkonce global ptr null, align 8 -@11 = private unnamed_addr constant [9 x i8] c"nopCloser", align 1 +@12 = private unnamed_addr constant [9 x i8] c"nopCloser", align 1 @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.StringWriter" = linkonce global ptr null, align 8 -@12 = private unnamed_addr constant [12 x i8] c"StringWriter", align 1 +@13 = private unnamed_addr constant [12 x i8] c"StringWriter", align 1 @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw" = linkonce global ptr null, align 8 -@13 = private unnamed_addr constant [11 x i8] c"WriteString", align 1 -@"_llgo_iface$Ly4zXiUMEac-hYAMw6b6miJ1JEhGfLyBWyBOhpsRZcU" = linkonce global ptr null, align 8 -@14 = private unnamed_addr constant [3 x i8] c"EOF", align 1 -@15 = private unnamed_addr constant [11 x i8] c"short write", align 1 -@16 = private unnamed_addr constant [11 x i8] c"hello world", align 1 +@14 = private unnamed_addr constant [11 x i8] c"WriteString", 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 +@17 = private unnamed_addr constant [11 x i8] c"hello world", align 1 @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.stringReader" = linkonce global ptr null, align 8 -@17 = private unnamed_addr constant [12 x i8] c"stringReader", align 1 +@18 = private unnamed_addr constant [12 x i8] c"stringReader", align 1 @"github.com/goplus/llgo/cl/_testgo/reader.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk" = linkonce 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 +@19 = private unnamed_addr constant [1 x i8] c"s", align 1 +@20 = private unnamed_addr constant [1 x i8] c"i", align 1 +@21 = private unnamed_addr constant [8 x i8] c"prevRune", align 1 +@22 = private unnamed_addr constant [3 x i8] c"Len", align 1 @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA" = linkonce global ptr null, align 8 -@22 = private unnamed_addr constant [6 x i8] c"ReadAt", align 1 +@23 = private unnamed_addr constant [6 x i8] c"ReadAt", align 1 @"_llgo_func$QoHVzMQ4PMXOd5kbZvdARJn-o_00R6hNyf6LoVk3X_4" = linkonce global ptr null, align 8 -@23 = private unnamed_addr constant [8 x i8] c"ReadByte", align 1 +@24 = private unnamed_addr constant [8 x i8] c"ReadByte", align 1 @"_llgo_func$lukqSsfDYBoIp_R8GMojGkZnrYDqaq2iHn8RkCjW7iQ" = linkonce global ptr null, align 8 -@24 = private unnamed_addr constant [8 x i8] c"ReadRune", align 1 +@25 = private unnamed_addr constant [8 x i8] c"ReadRune", align 1 @_llgo_rune = linkonce global ptr null, align 8 @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU" = linkonce global ptr null, align 8 -@25 = private unnamed_addr constant [4 x i8] c"Seek", align 1 +@26 = private unnamed_addr constant [4 x i8] c"Seek", align 1 @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms" = linkonce global ptr null, align 8 -@26 = private unnamed_addr constant [4 x i8] c"Size", align 1 +@27 = private unnamed_addr constant [4 x i8] c"Size", align 1 @"_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 +@28 = private unnamed_addr constant [10 x i8] c"UnreadByte", align 1 +@29 = private unnamed_addr constant [10 x i8] c"UnreadRune", align 1 @"*_llgo_github.com/goplus/llgo/cl/_testgo/reader.stringReader" = linkonce global ptr null, align 8 -@"_llgo_iface$uycIKA3bbxRhudEjW1hHKWKdLqHQsCVy8NdW1bkQmNw" = linkonce global ptr null, align 8 @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.errorString" = linkonce global ptr null, align 8 -@29 = private unnamed_addr constant [11 x i8] c"errorString", align 1 +@30 = private unnamed_addr constant [11 x i8] c"errorString", align 1 @"github.com/goplus/llgo/cl/_testgo/reader.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = linkonce global ptr null, align 8 @"*_llgo_github.com/goplus/llgo/cl/_testgo/reader.errorString" = linkonce global ptr null, align 8 -@"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU" = linkonce global ptr null, align 8 -@30 = private unnamed_addr constant [122 x i8] c"type assertion github.com/goplus/llgo/cl/_testgo/reader.Reader -> github.com/goplus/llgo/cl/_testgo/reader.WriterTo failed", align 1 -@31 = private unnamed_addr constant [37 x i8] c"stringsReader.ReadAt: negative offset", align 1 -@32 = private unnamed_addr constant [34 x i8] c"stringsReader.Seek: invalid whence", align 1 -@33 = private unnamed_addr constant [37 x i8] c"stringsReader.Seek: negative position", align 1 -@34 = private unnamed_addr constant [48 x i8] c"stringsReader.UnreadByte: at beginning of string", align 1 -@35 = private unnamed_addr constant [49 x i8] c"strings.Reader.UnreadRune: at beginning of string", align 1 -@36 = private unnamed_addr constant [62 x i8] c"strings.Reader.UnreadRune: previous operation was not ReadRune", align 1 -@37 = private unnamed_addr constant [48 x i8] c"stringsReader.WriteTo: invalid WriteString count", align 1 +@31 = private unnamed_addr constant [122 x i8] c"type assertion github.com/goplus/llgo/cl/_testgo/reader.Reader -> github.com/goplus/llgo/cl/_testgo/reader.WriterTo 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/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.NopCloser"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) { _llgo_0: @@ -107,46 +104,45 @@ _llgo_1: ; preds = %_llgo_5 %7 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo", align 8 %8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo" %6, ptr %8, align 8 - %9 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 - %10 = load ptr, ptr @"_llgo_iface$2bmbYDBStAIdmbXPPn7qIaCcpVcj2I5k6AqgqwAfh84", align 8 - %11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %10, ptr %7) - %12 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %11, 0 - %13 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %12, ptr %8, 1 - ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %13 + %9 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.ReadCloser", align 8 + %10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %9, ptr %7) + %11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %10, 0 + %12 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %11, ptr %8, 1 + ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %12 _llgo_2: ; preds = %_llgo_5 - %14 = alloca %"github.com/goplus/llgo/cl/_testgo/reader.nopCloser", align 8 - call void @llvm.memset(ptr %14, i8 0, i64 16, i1 false) - %15 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.nopCloser", ptr %14, i32 0, i32 0 - store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %0, ptr %15, align 8 - %16 = load %"github.com/goplus/llgo/cl/_testgo/reader.nopCloser", ptr %14, align 8 - %17 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.nopCloser", align 8 - %18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/cl/_testgo/reader.nopCloser" %16, ptr %18, align 8 - %19 = load ptr, ptr @"_llgo_iface$2bmbYDBStAIdmbXPPn7qIaCcpVcj2I5k6AqgqwAfh84", align 8 - %20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %19, ptr %17) - %21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %20, 0 - %22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %21, ptr %18, 1 - ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %22 + %13 = alloca %"github.com/goplus/llgo/cl/_testgo/reader.nopCloser", align 8 + call void @llvm.memset(ptr %13, i8 0, i64 16, i1 false) + %14 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.nopCloser", ptr %13, i32 0, i32 0 + store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %0, ptr %14, align 8 + %15 = load %"github.com/goplus/llgo/cl/_testgo/reader.nopCloser", ptr %13, align 8 + %16 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.nopCloser", align 8 + %17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/cl/_testgo/reader.nopCloser" %15, ptr %17, align 8 + %18 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.ReadCloser", align 8 + %19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %18, ptr %16) + %20 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %19, 0 + %21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %20, ptr %17, 1 + ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %21 _llgo_3: ; preds = %_llgo_0 - %23 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %0, 1 - %24 = load ptr, ptr @"_llgo_iface$p5Bo_emI1h8acs1rFbUxZTrpeDbIQ34gFcsbwK9YIgs", align 8 - %25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %24, ptr %1) - %26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %25, 0 - %27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %26, ptr %23, 1 - %28 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %27, 0 - %29 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %28, i1 true, 1 + %22 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %0, 1 + %23 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.WriterTo", align 8 + %24 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %23, ptr %1) + %25 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %24, 0 + %26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %25, ptr %22, 1 + %27 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %26, 0 + %28 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %27, i1 true, 1 br label %_llgo_5 _llgo_4: ; preds = %_llgo_0 br label %_llgo_5 _llgo_5: ; preds = %_llgo_4, %_llgo_3 - %30 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %29, %_llgo_3 ], [ zeroinitializer, %_llgo_4 ] - %31 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %30, 0 - %32 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %30, 1 - br i1 %32, label %_llgo_1, label %_llgo_2 + %29 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %28, %_llgo_3 ], [ zeroinitializer, %_llgo_4 ] + %30 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %29, 0 + %31 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %29, 1 + br i1 %31, label %_llgo_1, label %_llgo_2 } define { %"github.com/goplus/llgo/runtime/internal/runtime.Slice", %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"github.com/goplus/llgo/cl/_testgo/reader.ReadAll"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) { @@ -276,7 +272,7 @@ _llgo_2: ; preds = %_llgo_5 _llgo_3: ; preds = %_llgo_0 %32 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %0, 1 - %33 = load ptr, ptr @"_llgo_iface$Ly4zXiUMEac-hYAMw6b6miJ1JEhGfLyBWyBOhpsRZcU", align 8 + %33 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.StringWriter", align 8 %34 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %33, ptr %2) %35 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %34, 0 %36 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %35, ptr %32, 1 @@ -310,9 +306,9 @@ _llgo_1: ; preds = %_llgo_0 store i1 true, ptr @"github.com/goplus/llgo/cl/_testgo/reader.init$guard", align 1 call void @"unicode/utf8.init"() call void @"github.com/goplus/llgo/cl/_testgo/reader.init$after"() - %1 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 3 }) + %1 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 3 }) store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1, ptr @"github.com/goplus/llgo/cl/_testgo/reader.EOF", align 8 - %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 11 }) + %2 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @16, i64 11 }) store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %2, ptr @"github.com/goplus/llgo/cl/_testgo/reader.ErrShortWrite", align 8 br label %_llgo_2 @@ -324,10 +320,10 @@ define void @"github.com/goplus/llgo/cl/_testgo/reader.main"() { _llgo_0: %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32) %1 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/reader.stringReader", ptr %0, i32 0, i32 0 - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @16, i64 11 }, ptr %1, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 11 }, ptr %1, align 8 %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.stringReader", align 8 %3 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/reader.stringReader", align 8 - %4 = load ptr, ptr @"_llgo_iface$uycIKA3bbxRhudEjW1hHKWKdLqHQsCVy8NdW1bkQmNw", align 8 + %4 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.Reader", align 8 %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %4, ptr %3) %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %5, 0 %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %6, ptr %0, 1 @@ -349,7 +345,7 @@ _llgo_0: store %"github.com/goplus/llgo/runtime/internal/runtime.String" %0, ptr %2, align 8 %3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.errorString", align 8 %4 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/reader.errorString", align 8 - %5 = load ptr, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8 + %5 = load ptr, ptr @_llgo_error, align 8 %6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %5, ptr %4) %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %6, 0 %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %7, ptr %1, 1 @@ -453,7 +449,7 @@ _llgo_0: _llgo_1: ; preds = %_llgo_0 %8 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %4, 1 - %9 = load ptr, ptr @"_llgo_iface$p5Bo_emI1h8acs1rFbUxZTrpeDbIQ34gFcsbwK9YIgs", align 8 + %9 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.WriterTo", align 8 %10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %9, ptr %5) %11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %10, 0 %12 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %11, ptr %8, 1 @@ -475,7 +471,7 @@ _llgo_1: ; preds = %_llgo_0 _llgo_2: ; preds = %_llgo_0 %26 = load ptr, ptr @_llgo_string, align 8 %27 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @30, i64 122 }, ptr %27, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @31, i64 122 }, ptr %27, align 8 %28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %26, 0 %29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %28, ptr %27, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %29) @@ -586,7 +582,7 @@ _llgo_0: br i1 %3, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - %4 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @31, i64 37 }) + %4 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @32, i64 37 }) %5 = insertvalue { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } { i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef }, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %4, 1 ret { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %5 @@ -772,12 +768,12 @@ _llgo_6: ; preds = %_llgo_4 br i1 %15, label %_llgo_5, label %_llgo_7 _llgo_7: ; preds = %_llgo_6 - %16 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @32, i64 34 }) + %16 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @33, i64 34 }) %17 = insertvalue { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } { i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef }, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %16, 1 ret { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %17 _llgo_8: ; preds = %_llgo_1 - %18 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @33, i64 37 }) + %18 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @34, i64 37 }) %19 = insertvalue { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } { i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef }, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %18, 1 ret { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %19 @@ -805,7 +801,7 @@ _llgo_0: br i1 %3, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - %4 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @34, i64 48 }) + %4 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @35, i64 48 }) ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %4 _llgo_2: ; preds = %_llgo_0 @@ -827,7 +823,7 @@ _llgo_0: br i1 %3, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - %4 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @35, i64 49 }) + %4 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @36, i64 49 }) ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %4 _llgo_2: ; preds = %_llgo_0 @@ -837,7 +833,7 @@ _llgo_2: ; preds = %_llgo_0 br i1 %7, label %_llgo_3, label %_llgo_4 _llgo_3: ; preds = %_llgo_2 - %8 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @36, i64 62 }) + %8 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testgo/reader.newError"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @37, i64 62 }) ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %8 _llgo_4: ; preds = %_llgo_2 @@ -882,7 +878,7 @@ _llgo_2: ; preds = %_llgo_0 _llgo_3: ; preds = %_llgo_2 %20 = load ptr, ptr @_llgo_string, align 8 %21 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @37, i64 48 }, ptr %21, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @38, i64 48 }, ptr %21, align 8 %22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %20, 0 %23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %22, ptr %21, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %23) @@ -1136,582 +1132,517 @@ _llgo_27: ; preds = %_llgo_26 br label %_llgo_28 _llgo_28: ; preds = %_llgo_27, %_llgo_26 - %101 = load ptr, ptr @"_llgo_func$V_kP-r1nn8Ij-G2jGIm9ROLn4CjtLBch-g3Ha7pGJo4", align 8 - %102 = load ptr, ptr @"_llgo_iface$p5Bo_emI1h8acs1rFbUxZTrpeDbIQ34gFcsbwK9YIgs", align 8 - %103 = icmp eq ptr %102, null - br i1 %103, label %_llgo_29, label %_llgo_30 + %101 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 17 }, i64 25, i64 16, i64 3, i64 3) + store ptr %101, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo", align 8 + %102 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 6 }) + %103 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.Reader", align 8 + %104 = icmp eq ptr %103, null + br i1 %104, label %_llgo_29, label %_llgo_30 _llgo_29: ; preds = %_llgo_28 - %104 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 7 }, ptr undef }, ptr %101, 1 - %105 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) - %106 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %105, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %104, ptr %106, align 8 - %107 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %105, 0 - %108 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %107, i64 1, 1 - %109 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %108, i64 1, 2 - %110 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %109) - store ptr %110, ptr @"_llgo_iface$p5Bo_emI1h8acs1rFbUxZTrpeDbIQ34gFcsbwK9YIgs", align 8 + store ptr %102, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.Reader", align 8 br label %_llgo_30 _llgo_30: ; preds = %_llgo_29, %_llgo_28 - %111 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 17 }, i64 25, i64 16, i64 3, i64 3) - store ptr %111, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo", align 8 - %112 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 6 }) - %113 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.Reader", align 8 - %114 = icmp eq ptr %113, null - br i1 %114, label %_llgo_31, label %_llgo_32 + %105 = load ptr, ptr @"[]_llgo_uint8", align 8 + %106 = load ptr, ptr @"_llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk", align 8 + br i1 %104, label %_llgo_31, label %_llgo_32 _llgo_31: ; preds = %_llgo_30 - store ptr %112, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.Reader", align 8 + %107 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef }, ptr %106, 1 + %108 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) + %109 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %108, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %107, ptr %109, align 8 + %110 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %108, 0 + %111 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %110, i64 1, 1 + %112 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %111, i64 1, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %102, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %112) br label %_llgo_32 _llgo_32: ; preds = %_llgo_31, %_llgo_30 - %115 = load ptr, ptr @"[]_llgo_uint8", align 8 - %116 = load ptr, ptr @"_llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk", align 8 - br i1 %114, label %_llgo_33, label %_llgo_34 + %113 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.Reader", align 8 + %114 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 6 }) + %115 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 6 }, ptr %114, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 true) + %116 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56) + %117 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %116, i64 0 + store %"github.com/goplus/llgo/runtime/abi.StructField" %115, ptr %117, align 8 + %118 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %116, 0 + %119 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %118, i64 1, 1 + %120 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %119, i64 1, 2 + %121 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %120) + store ptr %121, ptr @"_llgo_struct$aF5tOq8uFNwjAKwq7XzhGO-4YESPiFwZOQDpqkTBqL8", align 8 + %122 = load ptr, ptr @"_llgo_struct$aF5tOq8uFNwjAKwq7XzhGO-4YESPiFwZOQDpqkTBqL8", align 8 + %123 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }) + %124 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 + %125 = icmp eq ptr %124, null + br i1 %125, label %_llgo_33, label %_llgo_34 _llgo_33: ; preds = %_llgo_32 - %117 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef }, ptr %116, 1 - %118 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) - %119 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %118, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %117, ptr %119, align 8 - %120 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %118, 0 - %121 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %120, i64 1, 1 - %122 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %121, i64 1, 2 - call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %112, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %122) + %126 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) + %127 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %126, 0 + %128 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %127, i64 0, 1 + %129 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %128, i64 0, 2 + %130 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) + %131 = getelementptr ptr, ptr %130, i64 0 + store ptr %123, ptr %131, align 8 + %132 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %130, 0 + %133 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %132, i64 1, 1 + %134 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %133, i64 1, 2 + %135 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %129, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %134, i1 false) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %135) + store ptr %135, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 br label %_llgo_34 _llgo_34: ; preds = %_llgo_33, %_llgo_32 - %123 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.Reader", align 8 - %124 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 6 }) - %125 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 6 }, ptr %124, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 true) - %126 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56) - %127 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %126, i64 0 - store %"github.com/goplus/llgo/runtime/abi.StructField" %125, ptr %127, align 8 - %128 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %126, 0 - %129 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %128, i64 1, 1 - %130 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %129, i64 1, 2 - %131 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %130) - store ptr %131, ptr @"_llgo_struct$aF5tOq8uFNwjAKwq7XzhGO-4YESPiFwZOQDpqkTBqL8", align 8 - %132 = load ptr, ptr @"_llgo_struct$aF5tOq8uFNwjAKwq7XzhGO-4YESPiFwZOQDpqkTBqL8", align 8 - %133 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }) - %134 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 - %135 = icmp eq ptr %134, null - br i1 %135, label %_llgo_35, label %_llgo_36 + %136 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 + %137 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %136, 1 + %138 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %137, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Close", 2 + %139 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %138, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Close", 3 + %140 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %136, 1 + %141 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %140, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Close", 2 + %142 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %141, ptr @"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo.Close", 3 + %143 = load ptr, ptr @"_llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk", align 8 + %144 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %143, 1 + %145 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %144, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Read", 2 + %146 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %145, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Read", 3 + %147 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %143, 1 + %148 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %147, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Read", 2 + %149 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %148, ptr @"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo.Read", 3 + %150 = load ptr, ptr @"_llgo_func$V_kP-r1nn8Ij-G2jGIm9ROLn4CjtLBch-g3Ha7pGJo4", align 8 + %151 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 7 }, ptr undef, ptr undef, ptr undef }, ptr %150, 1 + %152 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %151, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).WriteTo", 2 + %153 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %152, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).WriteTo", 3 + %154 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 7 }, ptr undef, ptr undef, ptr undef }, ptr %150, 1 + %155 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %154, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).WriteTo", 2 + %156 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %155, ptr @"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo.WriteTo", 3 + %157 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 120) + %158 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %157, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Method" %142, ptr %158, align 8 + %159 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %157, i64 1 + store %"github.com/goplus/llgo/runtime/abi.Method" %149, ptr %159, align 8 + %160 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %157, i64 2 + store %"github.com/goplus/llgo/runtime/abi.Method" %156, ptr %160, align 8 + %161 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %157, 0 + %162 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %161, i64 3, 1 + %163 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %162, i64 3, 2 + %164 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 120) + %165 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %164, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Method" %139, ptr %165, align 8 + %166 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %164, i64 1 + store %"github.com/goplus/llgo/runtime/abi.Method" %146, ptr %166, align 8 + %167 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %164, i64 2 + store %"github.com/goplus/llgo/runtime/abi.Method" %153, ptr %167, align 8 + %168 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %164, 0 + %169 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %168, i64 3, 1 + %170 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %169, i64 3, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %101, ptr %122, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %163, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %170) + %171 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 10 }) + %172 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.ReadCloser", align 8 + %173 = icmp eq ptr %172, null + br i1 %173, label %_llgo_35, label %_llgo_36 _llgo_35: ; preds = %_llgo_34 - %136 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) - %137 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %136, 0 - %138 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %137, i64 0, 1 - %139 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %138, i64 0, 2 - %140 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) - %141 = getelementptr ptr, ptr %140, i64 0 - store ptr %133, ptr %141, align 8 - %142 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %140, 0 - %143 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %142, i64 1, 1 - %144 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %143, i64 1, 2 - %145 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %139, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %144, i1 false) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %145) - store ptr %145, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 + store ptr %171, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.ReadCloser", align 8 br label %_llgo_36 _llgo_36: ; preds = %_llgo_35, %_llgo_34 - %146 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 - %147 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %146, 1 - %148 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %147, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Close", 2 - %149 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %148, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Close", 3 - %150 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %146, 1 - %151 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %150, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Close", 2 - %152 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %151, ptr @"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo.Close", 3 - %153 = load ptr, ptr @"_llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk", align 8 - %154 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %153, 1 - %155 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %154, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Read", 2 - %156 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %155, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Read", 3 - %157 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %153, 1 - %158 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %157, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).Read", 2 - %159 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %158, ptr @"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo.Read", 3 - %160 = load ptr, ptr @"_llgo_func$V_kP-r1nn8Ij-G2jGIm9ROLn4CjtLBch-g3Ha7pGJo4", align 8 - %161 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 7 }, ptr undef, ptr undef, ptr undef }, ptr %160, 1 - %162 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %161, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).WriteTo", 2 - %163 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %162, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).WriteTo", 3 - %164 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 7 }, ptr undef, ptr undef, ptr undef }, ptr %160, 1 - %165 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %164, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloserWriterTo).WriteTo", 2 - %166 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %165, ptr @"github.com/goplus/llgo/cl/_testgo/reader.nopCloserWriterTo.WriteTo", 3 - %167 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 120) - %168 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %167, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Method" %152, ptr %168, align 8 - %169 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %167, i64 1 - store %"github.com/goplus/llgo/runtime/abi.Method" %159, ptr %169, align 8 - %170 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %167, i64 2 - store %"github.com/goplus/llgo/runtime/abi.Method" %166, ptr %170, align 8 - %171 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %167, 0 - %172 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %171, i64 3, 1 - %173 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %172, i64 3, 2 - %174 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 120) - %175 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %174, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Method" %149, ptr %175, align 8 - %176 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %174, i64 1 - store %"github.com/goplus/llgo/runtime/abi.Method" %156, ptr %176, align 8 - %177 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %174, i64 2 - store %"github.com/goplus/llgo/runtime/abi.Method" %163, ptr %177, align 8 - %178 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %174, 0 - %179 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %178, i64 3, 1 - %180 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %179, i64 3, 2 - call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %111, ptr %132, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %173, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %180) - %181 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 - %182 = load ptr, ptr @"_llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk", align 8 - %183 = load ptr, ptr @"_llgo_iface$2bmbYDBStAIdmbXPPn7qIaCcpVcj2I5k6AqgqwAfh84", align 8 - %184 = icmp eq ptr %183, null - br i1 %184, label %_llgo_37, label %_llgo_38 + %174 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 + %175 = load ptr, ptr @"_llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk", align 8 + br i1 %173, label %_llgo_37, label %_llgo_38 _llgo_37: ; preds = %_llgo_36 - %185 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef }, ptr %181, 1 - %186 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef }, ptr %182, 1 - %187 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) - %188 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %187, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %185, ptr %188, align 8 - %189 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %187, i64 1 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %186, ptr %189, align 8 - %190 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %187, 0 - %191 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %190, i64 2, 1 - %192 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %191, i64 2, 2 - %193 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %192) - store ptr %193, ptr @"_llgo_iface$2bmbYDBStAIdmbXPPn7qIaCcpVcj2I5k6AqgqwAfh84", align 8 + %176 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef }, ptr %174, 1 + %177 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef }, ptr %175, 1 + %178 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) + %179 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %178, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %176, ptr %179, align 8 + %180 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %178, i64 1 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %177, ptr %180, align 8 + %181 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %178, 0 + %182 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %181, i64 2, 1 + %183 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %182, i64 2, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %171, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %183) br label %_llgo_38 _llgo_38: ; preds = %_llgo_37, %_llgo_36 - %194 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 9 }, i64 25, i64 16, i64 2, i64 2) - store ptr %194, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.nopCloser", align 8 - %195 = load ptr, ptr @"_llgo_struct$aF5tOq8uFNwjAKwq7XzhGO-4YESPiFwZOQDpqkTBqL8", align 8 - %196 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 - %197 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %196, 1 - %198 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %197, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Close", 2 - %199 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %198, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Close", 3 - %200 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %196, 1 - %201 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %200, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Close", 2 - %202 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %201, ptr @"github.com/goplus/llgo/cl/_testgo/reader.nopCloser.Close", 3 - %203 = load ptr, ptr @"_llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk", align 8 - %204 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %203, 1 - %205 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %204, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Read", 2 - %206 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %205, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Read", 3 - %207 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %203, 1 - %208 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %207, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Read", 2 - %209 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %208, ptr @"github.com/goplus/llgo/cl/_testgo/reader.nopCloser.Read", 3 - %210 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80) - %211 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %210, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Method" %202, ptr %211, align 8 - %212 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %210, i64 1 - store %"github.com/goplus/llgo/runtime/abi.Method" %209, ptr %212, align 8 - %213 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %210, 0 - %214 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %213, i64 2, 1 - %215 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %214, i64 2, 2 - %216 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80) - %217 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %216, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Method" %199, ptr %217, align 8 - %218 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %216, i64 1 - store %"github.com/goplus/llgo/runtime/abi.Method" %206, ptr %218, align 8 - %219 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %216, 0 - %220 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %219, i64 2, 1 - %221 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %220, i64 2, 2 - call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %194, ptr %195, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %215, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %221) - %222 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 12 }) - %223 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.StringWriter", align 8 - %224 = icmp eq ptr %223, null - br i1 %224, label %_llgo_39, label %_llgo_40 + %184 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 9 }, i64 25, i64 16, i64 2, i64 2) + store ptr %184, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.nopCloser", align 8 + %185 = load ptr, ptr @"_llgo_struct$aF5tOq8uFNwjAKwq7XzhGO-4YESPiFwZOQDpqkTBqL8", align 8 + %186 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 + %187 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %186, 1 + %188 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %187, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Close", 2 + %189 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %188, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Close", 3 + %190 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %186, 1 + %191 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %190, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Close", 2 + %192 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %191, ptr @"github.com/goplus/llgo/cl/_testgo/reader.nopCloser.Close", 3 + %193 = load ptr, ptr @"_llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk", align 8 + %194 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %193, 1 + %195 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %194, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Read", 2 + %196 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %195, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Read", 3 + %197 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %193, 1 + %198 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %197, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*nopCloser).Read", 2 + %199 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %198, ptr @"github.com/goplus/llgo/cl/_testgo/reader.nopCloser.Read", 3 + %200 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80) + %201 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %200, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Method" %192, ptr %201, align 8 + %202 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %200, i64 1 + store %"github.com/goplus/llgo/runtime/abi.Method" %199, ptr %202, align 8 + %203 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %200, 0 + %204 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %203, i64 2, 1 + %205 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %204, i64 2, 2 + %206 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80) + %207 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %206, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Method" %189, ptr %207, align 8 + %208 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %206, i64 1 + store %"github.com/goplus/llgo/runtime/abi.Method" %196, ptr %208, align 8 + %209 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %206, 0 + %210 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %209, i64 2, 1 + %211 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %210, i64 2, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %184, ptr %185, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %205, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %211) + %212 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 12 }) + %213 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.StringWriter", align 8 + %214 = icmp eq ptr %213, null + br i1 %214, label %_llgo_39, label %_llgo_40 _llgo_39: ; preds = %_llgo_38 - store ptr %222, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.StringWriter", align 8 + store ptr %212, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.StringWriter", align 8 br label %_llgo_40 _llgo_40: ; preds = %_llgo_39, %_llgo_38 - %225 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }) - %226 = load ptr, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8 - %227 = icmp eq ptr %226, null - br i1 %227, label %_llgo_41, label %_llgo_42 + %215 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }) + %216 = load ptr, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8 + %217 = icmp eq ptr %216, null + br i1 %217, label %_llgo_41, label %_llgo_42 _llgo_41: ; preds = %_llgo_40 - %228 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24) - %229 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) - %230 = getelementptr ptr, ptr %229, i64 0 - store ptr %228, ptr %230, align 8 - %231 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %229, 0 - %232 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %231, i64 1, 1 - %233 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %232, i64 1, 2 - %234 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) - %235 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - %236 = getelementptr ptr, ptr %235, i64 0 - store ptr %234, ptr %236, align 8 - %237 = getelementptr ptr, ptr %235, i64 1 - store ptr %225, ptr %237, align 8 - %238 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %235, 0 - %239 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %238, i64 2, 1 - %240 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %239, i64 2, 2 - %241 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %233, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %240, i1 false) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %241) - store ptr %241, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8 + %218 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24) + %219 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) + %220 = getelementptr ptr, ptr %219, i64 0 + store ptr %218, ptr %220, align 8 + %221 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %219, 0 + %222 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %221, i64 1, 1 + %223 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %222, i64 1, 2 + %224 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) + %225 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + %226 = getelementptr ptr, ptr %225, i64 0 + store ptr %224, ptr %226, align 8 + %227 = getelementptr ptr, ptr %225, i64 1 + store ptr %215, ptr %227, align 8 + %228 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %225, 0 + %229 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %228, i64 2, 1 + %230 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %229, i64 2, 2 + %231 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %223, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %230, i1 false) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %231) + store ptr %231, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8 br label %_llgo_42 _llgo_42: ; preds = %_llgo_41, %_llgo_40 - %242 = load ptr, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8 - br i1 %224, label %_llgo_43, label %_llgo_44 + %232 = load ptr, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8 + br i1 %214, label %_llgo_43, label %_llgo_44 _llgo_43: ; preds = %_llgo_42 - %243 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 11 }, ptr undef }, ptr %242, 1 - %244 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) - %245 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %244, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %243, ptr %245, align 8 - %246 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %244, 0 - %247 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %246, i64 1, 1 - %248 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %247, i64 1, 2 - call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %222, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %248) + %233 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 11 }, ptr undef }, ptr %232, 1 + %234 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) + %235 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %234, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %233, ptr %235, align 8 + %236 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %234, 0 + %237 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %236, i64 1, 1 + %238 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %237, i64 1, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %212, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %238) br label %_llgo_44 _llgo_44: ; preds = %_llgo_43, %_llgo_42 - %249 = load ptr, ptr @"_llgo_func$thH5FBpdXzJNnCpSfiLU5ItTntFU6LWp0RJhDm2XJjw", align 8 - %250 = load ptr, ptr @"_llgo_iface$Ly4zXiUMEac-hYAMw6b6miJ1JEhGfLyBWyBOhpsRZcU", align 8 - %251 = icmp eq ptr %250, null - br i1 %251, label %_llgo_45, label %_llgo_46 + %239 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 12 }, i64 25, i64 32, i64 0, i64 10) + store ptr %239, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.stringReader", align 8 + %240 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24) + %241 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 1 }, ptr %240, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) + %242 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 38) + %243 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @20, i64 1 }, ptr %242, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) + %244 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) + %245 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @21, i64 8 }, ptr %244, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) + %246 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 168) + %247 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %246, i64 0 + store %"github.com/goplus/llgo/runtime/abi.StructField" %241, ptr %247, align 8 + %248 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %246, i64 1 + store %"github.com/goplus/llgo/runtime/abi.StructField" %243, ptr %248, align 8 + %249 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %246, i64 2 + store %"github.com/goplus/llgo/runtime/abi.StructField" %245, ptr %249, align 8 + %250 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %246, 0 + %251 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %250, i64 3, 1 + %252 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %251, i64 3, 2 + %253 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, i64 32, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %252) + store ptr %253, ptr @"github.com/goplus/llgo/cl/_testgo/reader.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk", align 8 + %254 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/reader.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk", align 8 + %255 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %256 = icmp eq ptr %255, null + br i1 %256, label %_llgo_45, label %_llgo_46 _llgo_45: ; preds = %_llgo_44 - %252 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 11 }, ptr undef }, ptr %249, 1 - %253 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) - %254 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %253, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %252, ptr %254, align 8 - %255 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %253, 0 - %256 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %255, i64 1, 1 - %257 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %256, i64 1, 2 - %258 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %257) - store ptr %258, ptr @"_llgo_iface$Ly4zXiUMEac-hYAMw6b6miJ1JEhGfLyBWyBOhpsRZcU", align 8 + %257 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) + %258 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %257, 0 + %259 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %258, i64 0, 1 + %260 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %259, i64 0, 2 + %261 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) + %262 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) + %263 = getelementptr ptr, ptr %262, i64 0 + store ptr %261, ptr %263, align 8 + %264 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %262, 0 + %265 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %264, i64 1, 1 + %266 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %265, i64 1, 2 + %267 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %260, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %266, i1 false) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %267) + store ptr %267, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 br label %_llgo_46 _llgo_46: ; preds = %_llgo_45, %_llgo_44 - %259 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 12 }, i64 25, i64 32, i64 0, i64 10) - store ptr %259, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.stringReader", align 8 - %260 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24) - %261 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 1 }, ptr %260, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) - %262 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 38) - %263 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 1 }, ptr %262, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) - %264 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) - %265 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @20, i64 8 }, ptr %264, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) - %266 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 168) - %267 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %266, i64 0 - store %"github.com/goplus/llgo/runtime/abi.StructField" %261, ptr %267, align 8 - %268 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %266, i64 1 - store %"github.com/goplus/llgo/runtime/abi.StructField" %263, ptr %268, align 8 - %269 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %266, i64 2 - store %"github.com/goplus/llgo/runtime/abi.StructField" %265, ptr %269, align 8 - %270 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %266, 0 - %271 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %270, i64 3, 1 - %272 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %271, i64 3, 2 - %273 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, i64 32, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %272) - store ptr %273, ptr @"github.com/goplus/llgo/cl/_testgo/reader.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk", align 8 - %274 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/reader.struct$Mdt84yjYYwxF9D2i4cRmpEPiWaO6tsjtrbGUjyESypk", align 8 - %275 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %276 = icmp eq ptr %275, null - br i1 %276, label %_llgo_47, label %_llgo_48 + %268 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %269 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 3 }, ptr undef, ptr undef, ptr undef }, ptr %268, 1 + %270 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %269, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Len", 2 + %271 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %270, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Len", 3 + %272 = load ptr, ptr @"[]_llgo_uint8", align 8 + %273 = load ptr, ptr @"_llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk", align 8 + %274 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %273, 1 + %275 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %274, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Read", 2 + %276 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %275, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Read", 3 + %277 = load ptr, ptr @"[]_llgo_uint8", align 8 + %278 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }) + %279 = load ptr, ptr @"_llgo_func$QoHVzMQ4PMXOd5kbZvdARJn-o_00R6hNyf6LoVk3X_4", align 8 + %280 = icmp eq ptr %279, null + br i1 %280, label %_llgo_47, label %_llgo_48 _llgo_47: ; preds = %_llgo_46 - %277 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) - %278 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %277, 0 - %279 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %278, i64 0, 1 - %280 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %279, i64 0, 2 - %281 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) - %282 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) - %283 = getelementptr ptr, ptr %282, i64 0 - store ptr %281, ptr %283, align 8 - %284 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %282, 0 - %285 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %284, i64 1, 1 - %286 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %285, i64 1, 2 - %287 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %280, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %286, i1 false) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %287) - store ptr %287, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %281 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 40) + %282 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.SliceOf"(ptr %281) + %283 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 38) + %284 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + %285 = getelementptr ptr, ptr %284, i64 0 + store ptr %282, ptr %285, align 8 + %286 = getelementptr ptr, ptr %284, i64 1 + store ptr %283, ptr %286, align 8 + %287 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %284, 0 + %288 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %287, i64 2, 1 + %289 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %288, i64 2, 2 + %290 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) + %291 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + %292 = getelementptr ptr, ptr %291, i64 0 + store ptr %290, ptr %292, align 8 + %293 = getelementptr ptr, ptr %291, i64 1 + store ptr %278, ptr %293, align 8 + %294 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %291, 0 + %295 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %294, i64 2, 1 + %296 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %295, i64 2, 2 + %297 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %289, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %296, i1 false) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %297) + store ptr %297, ptr @"_llgo_func$QoHVzMQ4PMXOd5kbZvdARJn-o_00R6hNyf6LoVk3X_4", align 8 br label %_llgo_48 _llgo_48: ; preds = %_llgo_47, %_llgo_46 - %288 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %289 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @21, i64 3 }, ptr undef, ptr undef, ptr undef }, ptr %288, 1 - %290 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %289, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Len", 2 - %291 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %290, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Len", 3 - %292 = load ptr, ptr @"[]_llgo_uint8", align 8 - %293 = load ptr, ptr @"_llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk", align 8 - %294 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %293, 1 - %295 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %294, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Read", 2 - %296 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %295, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Read", 3 - %297 = load ptr, ptr @"[]_llgo_uint8", align 8 - %298 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }) - %299 = load ptr, ptr @"_llgo_func$QoHVzMQ4PMXOd5kbZvdARJn-o_00R6hNyf6LoVk3X_4", align 8 - %300 = icmp eq ptr %299, null - br i1 %300, label %_llgo_49, label %_llgo_50 + %298 = load ptr, ptr @"_llgo_func$QoHVzMQ4PMXOd5kbZvdARJn-o_00R6hNyf6LoVk3X_4", align 8 + %299 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @23, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %298, 1 + %300 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %299, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadAt", 2 + %301 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %300, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadAt", 3 + %302 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }) + %303 = load ptr, ptr @"_llgo_func$lukqSsfDYBoIp_R8GMojGkZnrYDqaq2iHn8RkCjW7iQ", align 8 + %304 = icmp eq ptr %303, null + br i1 %304, label %_llgo_49, label %_llgo_50 _llgo_49: ; preds = %_llgo_48 - %301 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 40) - %302 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.SliceOf"(ptr %301) - %303 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 38) - %304 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - %305 = getelementptr ptr, ptr %304, i64 0 - store ptr %302, ptr %305, align 8 - %306 = getelementptr ptr, ptr %304, i64 1 - store ptr %303, ptr %306, align 8 - %307 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %304, 0 - %308 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %307, i64 2, 1 - %309 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %308, i64 2, 2 - %310 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) - %311 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - %312 = getelementptr ptr, ptr %311, i64 0 - store ptr %310, ptr %312, align 8 - %313 = getelementptr ptr, ptr %311, i64 1 - store ptr %298, ptr %313, align 8 - %314 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %311, 0 - %315 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %314, i64 2, 1 - %316 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %315, i64 2, 2 - %317 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %309, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %316, i1 false) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %317) - store ptr %317, ptr @"_llgo_func$QoHVzMQ4PMXOd5kbZvdARJn-o_00R6hNyf6LoVk3X_4", align 8 + %305 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) + %306 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %305, 0 + %307 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %306, i64 0, 1 + %308 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %307, i64 0, 2 + %309 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 40) + %310 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + %311 = getelementptr ptr, ptr %310, i64 0 + store ptr %309, ptr %311, align 8 + %312 = getelementptr ptr, ptr %310, i64 1 + store ptr %302, ptr %312, align 8 + %313 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %310, 0 + %314 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %313, i64 2, 1 + %315 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %314, i64 2, 2 + %316 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %308, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %315, i1 false) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %316) + store ptr %316, ptr @"_llgo_func$lukqSsfDYBoIp_R8GMojGkZnrYDqaq2iHn8RkCjW7iQ", align 8 br label %_llgo_50 _llgo_50: ; preds = %_llgo_49, %_llgo_48 - %318 = load ptr, ptr @"_llgo_func$QoHVzMQ4PMXOd5kbZvdARJn-o_00R6hNyf6LoVk3X_4", align 8 - %319 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %318, 1 - %320 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %319, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadAt", 2 - %321 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %320, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadAt", 3 - %322 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }) - %323 = load ptr, ptr @"_llgo_func$lukqSsfDYBoIp_R8GMojGkZnrYDqaq2iHn8RkCjW7iQ", align 8 - %324 = icmp eq ptr %323, null - br i1 %324, label %_llgo_51, label %_llgo_52 + %317 = load ptr, ptr @"_llgo_func$lukqSsfDYBoIp_R8GMojGkZnrYDqaq2iHn8RkCjW7iQ", align 8 + %318 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @24, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %317, 1 + %319 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %318, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadByte", 2 + %320 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %319, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadByte", 3 + %321 = load ptr, ptr @_llgo_rune, align 8 + %322 = icmp eq ptr %321, null + br i1 %322, label %_llgo_51, label %_llgo_52 _llgo_51: ; preds = %_llgo_50 - %325 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) - %326 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %325, 0 - %327 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %326, i64 0, 1 - %328 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %327, i64 0, 2 - %329 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 40) - %330 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - %331 = getelementptr ptr, ptr %330, i64 0 - store ptr %329, ptr %331, align 8 - %332 = getelementptr ptr, ptr %330, i64 1 - store ptr %322, ptr %332, align 8 - %333 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %330, 0 - %334 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %333, i64 2, 1 - %335 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %334, i64 2, 2 - %336 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %328, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %335, i1 false) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %336) - store ptr %336, ptr @"_llgo_func$lukqSsfDYBoIp_R8GMojGkZnrYDqaq2iHn8RkCjW7iQ", align 8 + %323 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 37) + store ptr %323, ptr @_llgo_rune, align 8 br label %_llgo_52 _llgo_52: ; preds = %_llgo_51, %_llgo_50 - %337 = load ptr, ptr @"_llgo_func$lukqSsfDYBoIp_R8GMojGkZnrYDqaq2iHn8RkCjW7iQ", align 8 - %338 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @23, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %337, 1 - %339 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %338, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadByte", 2 - %340 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %339, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadByte", 3 - %341 = load ptr, ptr @_llgo_rune, align 8 - %342 = icmp eq ptr %341, null - br i1 %342, label %_llgo_53, label %_llgo_54 + %324 = load ptr, ptr @_llgo_rune, align 8 + %325 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }) + %326 = load ptr, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8 + %327 = icmp eq ptr %326, null + br i1 %327, label %_llgo_53, label %_llgo_54 _llgo_53: ; preds = %_llgo_52 - %343 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 37) - store ptr %343, ptr @_llgo_rune, align 8 + %328 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) + %329 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %328, 0 + %330 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %329, i64 0, 1 + %331 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %330, i64 0, 2 + %332 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 37) + %333 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) + %334 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) + %335 = getelementptr ptr, ptr %334, i64 0 + store ptr %332, ptr %335, align 8 + %336 = getelementptr ptr, ptr %334, i64 1 + store ptr %333, ptr %336, align 8 + %337 = getelementptr ptr, ptr %334, i64 2 + store ptr %325, ptr %337, align 8 + %338 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %334, 0 + %339 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %338, i64 3, 1 + %340 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %339, i64 3, 2 + %341 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %331, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %340, i1 false) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %341) + store ptr %341, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8 br label %_llgo_54 _llgo_54: ; preds = %_llgo_53, %_llgo_52 - %344 = load ptr, ptr @_llgo_rune, align 8 - %345 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }) - %346 = load ptr, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8 - %347 = icmp eq ptr %346, null - br i1 %347, label %_llgo_55, label %_llgo_56 + %342 = load ptr, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8 + %343 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @25, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %342, 1 + %344 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %343, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadRune", 2 + %345 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %344, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadRune", 3 + %346 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }) + %347 = load ptr, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8 + %348 = icmp eq ptr %347, null + br i1 %348, label %_llgo_55, label %_llgo_56 _llgo_55: ; preds = %_llgo_54 - %348 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) - %349 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %348, 0 - %350 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %349, i64 0, 1 - %351 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %350, i64 0, 2 - %352 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 37) - %353 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) - %354 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) - %355 = getelementptr ptr, ptr %354, i64 0 - store ptr %352, ptr %355, align 8 - %356 = getelementptr ptr, ptr %354, i64 1 - store ptr %353, ptr %356, align 8 - %357 = getelementptr ptr, ptr %354, i64 2 - store ptr %345, ptr %357, align 8 - %358 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %354, 0 - %359 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %358, i64 3, 1 - %360 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %359, i64 3, 2 - %361 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %351, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %360, i1 false) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %361) - store ptr %361, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8 + %349 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 38) + %350 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) + %351 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + %352 = getelementptr ptr, ptr %351, i64 0 + store ptr %349, ptr %352, align 8 + %353 = getelementptr ptr, ptr %351, i64 1 + store ptr %350, ptr %353, align 8 + %354 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %351, 0 + %355 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %354, i64 2, 1 + %356 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %355, i64 2, 2 + %357 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 38) + %358 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + %359 = getelementptr ptr, ptr %358, i64 0 + store ptr %357, ptr %359, align 8 + %360 = getelementptr ptr, ptr %358, i64 1 + store ptr %346, ptr %360, align 8 + %361 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %358, 0 + %362 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %361, i64 2, 1 + %363 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %362, i64 2, 2 + %364 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %356, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %363, i1 false) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %364) + store ptr %364, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8 br label %_llgo_56 _llgo_56: ; preds = %_llgo_55, %_llgo_54 - %362 = load ptr, ptr @"_llgo_func$CB0CO6hV_feSzhi4pz1P4omza2fKNK930wvOR1T33fU", align 8 - %363 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @24, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %362, 1 - %364 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %363, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadRune", 2 - %365 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %364, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).ReadRune", 3 - %366 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }) - %367 = load ptr, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8 - %368 = icmp eq ptr %367, null - br i1 %368, label %_llgo_57, label %_llgo_58 + %365 = load ptr, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8 + %366 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @26, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %365, 1 + %367 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %366, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Seek", 2 + %368 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %367, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Seek", 3 + %369 = load ptr, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8 + %370 = icmp eq ptr %369, null + br i1 %370, label %_llgo_57, label %_llgo_58 _llgo_57: ; preds = %_llgo_56 - %369 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 38) - %370 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) - %371 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - %372 = getelementptr ptr, ptr %371, i64 0 - store ptr %369, ptr %372, align 8 - %373 = getelementptr ptr, ptr %371, i64 1 - store ptr %370, ptr %373, align 8 - %374 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %371, 0 - %375 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %374, i64 2, 1 - %376 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %375, i64 2, 2 - %377 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 38) - %378 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - %379 = getelementptr ptr, ptr %378, i64 0 - store ptr %377, ptr %379, align 8 - %380 = getelementptr ptr, ptr %378, i64 1 - store ptr %366, ptr %380, align 8 - %381 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %378, 0 - %382 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %381, i64 2, 1 - %383 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %382, i64 2, 2 - %384 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %376, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %383, i1 false) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %384) - store ptr %384, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8 + %371 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) + %372 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %371, 0 + %373 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %372, i64 0, 1 + %374 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %373, i64 0, 2 + %375 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 38) + %376 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) + %377 = getelementptr ptr, ptr %376, i64 0 + store ptr %375, ptr %377, align 8 + %378 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %376, 0 + %379 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %378, i64 1, 1 + %380 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %379, i64 1, 2 + %381 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %374, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %380, i1 false) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %381) + store ptr %381, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8 br label %_llgo_58 _llgo_58: ; preds = %_llgo_57, %_llgo_56 - %385 = load ptr, ptr @"_llgo_func$HE7H49xPa1uXmrkMDpqB3RCRGf3qzhLGrxKCEXOYjms", align 8 - %386 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @25, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %385, 1 - %387 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %386, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Seek", 2 - %388 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %387, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Seek", 3 - %389 = load ptr, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8 - %390 = icmp eq ptr %389, null - br i1 %390, label %_llgo_59, label %_llgo_60 - -_llgo_59: ; preds = %_llgo_58 - %391 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) - %392 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %391, 0 - %393 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %392, i64 0, 1 - %394 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %393, i64 0, 2 - %395 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 38) - %396 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) - %397 = getelementptr ptr, ptr %396, i64 0 - store ptr %395, ptr %397, align 8 - %398 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %396, 0 - %399 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %398, i64 1, 1 - %400 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %399, i64 1, 2 - %401 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %394, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %400, i1 false) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %401) - store ptr %401, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8 - br label %_llgo_60 - -_llgo_60: ; preds = %_llgo_59, %_llgo_58 - %402 = load ptr, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8 - %403 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @26, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %402, 1 - %404 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %403, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Size", 2 - %405 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %404, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Size", 3 - %406 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 - %407 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @27, i64 10 }, ptr undef, ptr undef, ptr undef }, ptr %406, 1 - %408 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %407, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).UnreadByte", 2 - %409 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %408, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).UnreadByte", 3 - %410 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 - %411 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @28, i64 10 }, ptr undef, ptr undef, ptr undef }, ptr %410, 1 - %412 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %411, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).UnreadRune", 2 - %413 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %412, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).UnreadRune", 3 - %414 = load ptr, ptr @"_llgo_func$V_kP-r1nn8Ij-G2jGIm9ROLn4CjtLBch-g3Ha7pGJo4", align 8 - %415 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 7 }, ptr undef, ptr undef, ptr undef }, ptr %414, 1 - %416 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %415, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).WriteTo", 2 - %417 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %416, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).WriteTo", 3 - %418 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 400) - %419 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Method" %291, ptr %419, align 8 - %420 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 1 - store %"github.com/goplus/llgo/runtime/abi.Method" %296, ptr %420, align 8 - %421 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 2 - store %"github.com/goplus/llgo/runtime/abi.Method" %321, ptr %421, align 8 - %422 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 3 - store %"github.com/goplus/llgo/runtime/abi.Method" %340, ptr %422, align 8 - %423 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 4 - store %"github.com/goplus/llgo/runtime/abi.Method" %365, ptr %423, align 8 - %424 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 5 - store %"github.com/goplus/llgo/runtime/abi.Method" %388, ptr %424, align 8 - %425 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 6 - store %"github.com/goplus/llgo/runtime/abi.Method" %405, ptr %425, align 8 - %426 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 7 - store %"github.com/goplus/llgo/runtime/abi.Method" %409, ptr %426, align 8 - %427 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 8 - store %"github.com/goplus/llgo/runtime/abi.Method" %413, ptr %427, align 8 - %428 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %418, i64 9 - store %"github.com/goplus/llgo/runtime/abi.Method" %417, ptr %428, align 8 - %429 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %418, 0 - %430 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %429, i64 10, 1 - %431 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %430, i64 10, 2 - call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %259, ptr %274, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %431) - %432 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 12 }, i64 25, i64 32, i64 0, i64 10) - %433 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %432) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %433) - store ptr %433, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/reader.stringReader", align 8 - %434 = load ptr, ptr @"_llgo_func$G2hch9Iy9DrhKKsg70PbL54bK-XSl-1IUUORN17J2Dk", align 8 - %435 = load ptr, ptr @"_llgo_iface$uycIKA3bbxRhudEjW1hHKWKdLqHQsCVy8NdW1bkQmNw", align 8 - %436 = icmp eq ptr %435, null - br i1 %436, label %_llgo_61, label %_llgo_62 - -_llgo_61: ; preds = %_llgo_60 - %437 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 4 }, ptr undef }, ptr %434, 1 - %438 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) - %439 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %438, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %437, ptr %439, align 8 - %440 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %438, 0 - %441 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %440, i64 1, 1 - %442 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %441, i64 1, 2 - %443 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %442) - store ptr %443, ptr @"_llgo_iface$uycIKA3bbxRhudEjW1hHKWKdLqHQsCVy8NdW1bkQmNw", align 8 - br label %_llgo_62 - -_llgo_62: ; preds = %_llgo_61, %_llgo_60 - %444 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @29, i64 11 }, i64 25, i64 16, i64 0, i64 1) - store ptr %444, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.errorString", align 8 - %445 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24) - %446 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 1 }, ptr %445, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) - %447 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56) - %448 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %447, i64 0 - store %"github.com/goplus/llgo/runtime/abi.StructField" %446, ptr %448, align 8 - %449 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %447, 0 - %450 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %449, i64 1, 1 - %451 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %450, i64 1, 2 - %452 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %451) - store ptr %452, ptr @"github.com/goplus/llgo/cl/_testgo/reader.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 - %453 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/reader.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 - %454 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - %455 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %454, 1 - %456 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %455, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*errorString).Error", 2 - %457 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %456, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*errorString).Error", 3 - %458 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) - %459 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %458, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Method" %457, ptr %459, align 8 - %460 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %458, 0 - %461 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %460, i64 1, 1 - %462 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %461, i64 1, 2 - call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %444, ptr %453, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %462) - %463 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @29, i64 11 }, i64 25, i64 16, i64 0, i64 1) - %464 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %463) - call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %464) - store ptr %464, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/reader.errorString", align 8 - %465 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 - %466 = load ptr, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8 - %467 = icmp eq ptr %466, null - br i1 %467, label %_llgo_63, label %_llgo_64 - -_llgo_63: ; preds = %_llgo_62 - %468 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 5 }, ptr undef }, ptr %465, 1 - %469 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) - %470 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %469, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %468, ptr %470, align 8 - %471 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %469, 0 - %472 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %471, i64 1, 1 - %473 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %472, i64 1, 2 - %474 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %473) - store ptr %474, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8 - br label %_llgo_64 - -_llgo_64: ; preds = %_llgo_63, %_llgo_62 + %382 = load ptr, ptr @"_llgo_func$Eoig9xhJM5GShHH5aNPxTZZXp1IZxprRl4zPuv2hkug", align 8 + %383 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @27, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %382, 1 + %384 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %383, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Size", 2 + %385 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %384, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).Size", 3 + %386 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 + %387 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @28, i64 10 }, ptr undef, ptr undef, ptr undef }, ptr %386, 1 + %388 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %387, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).UnreadByte", 2 + %389 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %388, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).UnreadByte", 3 + %390 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8 + %391 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @29, i64 10 }, ptr undef, ptr undef, ptr undef }, ptr %390, 1 + %392 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %391, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).UnreadRune", 2 + %393 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %392, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).UnreadRune", 3 + %394 = load ptr, ptr @"_llgo_func$V_kP-r1nn8Ij-G2jGIm9ROLn4CjtLBch-g3Ha7pGJo4", align 8 + %395 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 7 }, ptr undef, ptr undef, ptr undef }, ptr %394, 1 + %396 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %395, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).WriteTo", 2 + %397 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %396, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*stringReader).WriteTo", 3 + %398 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 400) + %399 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %398, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Method" %271, ptr %399, align 8 + %400 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %398, i64 1 + store %"github.com/goplus/llgo/runtime/abi.Method" %276, ptr %400, align 8 + %401 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %398, i64 2 + store %"github.com/goplus/llgo/runtime/abi.Method" %301, ptr %401, align 8 + %402 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %398, i64 3 + store %"github.com/goplus/llgo/runtime/abi.Method" %320, ptr %402, align 8 + %403 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %398, i64 4 + store %"github.com/goplus/llgo/runtime/abi.Method" %345, ptr %403, align 8 + %404 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %398, i64 5 + store %"github.com/goplus/llgo/runtime/abi.Method" %368, ptr %404, align 8 + %405 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %398, i64 6 + store %"github.com/goplus/llgo/runtime/abi.Method" %385, ptr %405, align 8 + %406 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %398, i64 7 + store %"github.com/goplus/llgo/runtime/abi.Method" %389, ptr %406, align 8 + %407 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %398, i64 8 + store %"github.com/goplus/llgo/runtime/abi.Method" %393, ptr %407, align 8 + %408 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %398, i64 9 + store %"github.com/goplus/llgo/runtime/abi.Method" %397, ptr %408, align 8 + %409 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %398, 0 + %410 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %409, i64 10, 1 + %411 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %410, i64 10, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %239, ptr %254, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %411) + %412 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 12 }, i64 25, i64 32, i64 0, i64 10) + %413 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %412) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %413) + store ptr %413, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/reader.stringReader", align 8 + %414 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @30, i64 11 }, i64 25, i64 16, i64 0, i64 1) + store ptr %414, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reader.errorString", align 8 + %415 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24) + %416 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 1 }, ptr %415, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) + %417 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56) + %418 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %417, i64 0 + store %"github.com/goplus/llgo/runtime/abi.StructField" %416, ptr %418, align 8 + %419 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %417, 0 + %420 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %419, i64 1, 1 + %421 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %420, i64 1, 2 + %422 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %421) + store ptr %422, ptr @"github.com/goplus/llgo/cl/_testgo/reader.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 + %423 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/reader.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8 + %424 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8 + %425 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %424, 1 + %426 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %425, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*errorString).Error", 2 + %427 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %426, ptr @"github.com/goplus/llgo/cl/_testgo/reader.(*errorString).Error", 3 + %428 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40) + %429 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %428, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Method" %427, ptr %429, align 8 + %430 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %428, 0 + %431 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %430, i64 1, 1 + %432 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %431, i64 1, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %414, ptr %423, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %432) + %433 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @30, i64 11 }, i64 25, i64 16, i64 0, i64 1) + %434 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %433) + call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %434) + store ptr %434, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/reader.errorString", align 8 ret void } @@ -1731,8 +1662,6 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterfac declare i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr, ptr) -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.Slice") - declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr, ptr) ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) diff --git a/cl/_testgo/reflect/out.ll b/cl/_testgo/reflect/out.ll index ac805422..5a6b70c3 100644 --- a/cl/_testgo/reflect/out.ll +++ b/cl/_testgo/reflect/out.ll @@ -32,26 +32,27 @@ source_filename = "github.com/goplus/llgo/cl/_testgo/reflect" @10 = private unnamed_addr constant [1 x i8] c"n", align 1 @11 = private unnamed_addr constant [3 x i8] c"Add", align 1 @"*_llgo_github.com/goplus/llgo/cl/_testgo/reflect.T" = linkonce global ptr null, align 8 -@"_llgo_iface$VdBKYV8-gcMjZtZfcf-u2oKoj9Lu3VXwuG8TGCW2S4A" = linkonce global ptr null, align 8 -@12 = private unnamed_addr constant [7 x i8] c"imethod", align 1 -@13 = private unnamed_addr constant [6 x i8] c"method", align 1 +@"_llgo_github.com/goplus/llgo/cl/_testgo/reflect.I" = linkonce global ptr null, align 8 +@12 = private unnamed_addr constant [1 x i8] c"I", align 1 +@13 = private unnamed_addr constant [7 x i8] c"imethod", align 1 +@14 = private unnamed_addr constant [6 x i8] c"method", align 1 @_llgo_any = linkonce global ptr null, align 8 @"[]_llgo_any" = linkonce global ptr null, align 8 @"_llgo_func$KK0iU4Wpi3BdRqssvycXqtgNe2Dq1riBlM61Rds1QsU" = linkonce global ptr null, align 8 @"github.com/goplus/llgo/cl/_testgo/reflect.struct$FjMjjQr3-2iTiWyZP1IIQFOz0hUCa0OS6pEm5uVV6Pk" = linkonce global ptr null, align 8 -@14 = private unnamed_addr constant [10 x i8] c"call.slice", align 1 -@15 = private unnamed_addr constant [40 x i8] c"type assertion interface{} -> int failed", align 1 +@15 = private unnamed_addr constant [10 x i8] c"call.slice", align 1 +@16 = private unnamed_addr constant [40 x i8] c"type assertion interface{} -> int failed", align 1 @"map[_llgo_int]_llgo_string" = linkonce global ptr null, align 8 -@16 = private unnamed_addr constant [7 x i8] c"topbits", align 1 -@17 = private unnamed_addr constant [4 x i8] c"keys", align 1 -@18 = private unnamed_addr constant [5 x i8] c"elems", align 1 -@19 = private unnamed_addr constant [8 x i8] c"overflow", align 1 -@20 = private unnamed_addr constant [5 x i8] c"hello", align 1 -@21 = private unnamed_addr constant [5 x i8] c"world", align 1 -@22 = private unnamed_addr constant [14 x i8] c"MapIndex error", align 1 -@23 = private unnamed_addr constant [4 x i8] c"todo", align 1 -@24 = private unnamed_addr constant [12 x i8] c"must invalid", align 1 -@25 = private unnamed_addr constant [13 x i8] c"MapIter error", align 1 +@17 = private unnamed_addr constant [7 x i8] c"topbits", align 1 +@18 = private unnamed_addr constant [4 x i8] c"keys", align 1 +@19 = private unnamed_addr constant [5 x i8] c"elems", align 1 +@20 = private unnamed_addr constant [8 x i8] c"overflow", align 1 +@21 = private unnamed_addr constant [5 x i8] c"hello", align 1 +@22 = private unnamed_addr constant [5 x i8] c"world", align 1 +@23 = private unnamed_addr constant [14 x i8] c"MapIndex error", align 1 +@24 = private unnamed_addr constant [4 x i8] c"todo", align 1 +@25 = private unnamed_addr constant [12 x i8] c"must invalid", align 1 +@26 = private unnamed_addr constant [13 x i8] c"MapIter error", align 1 define i64 @"github.com/goplus/llgo/cl/_testgo/reflect.(*T).Add"(ptr %0, i64 %1) { _llgo_0: @@ -269,112 +270,111 @@ _llgo_0: store i64 1, ptr %1, align 4 %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reflect.T", align 8 %3 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/reflect.T", align 8 - %4 = load ptr, ptr @"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU", align 8 - %5 = load ptr, ptr @"_llgo_iface$VdBKYV8-gcMjZtZfcf-u2oKoj9Lu3VXwuG8TGCW2S4A", align 8 - %6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %5, ptr %3) - %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %6, 0 - %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %7, ptr %0, 1 - %9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %8) - %10 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %8, 1 - %11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %9, 0 - %12 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %11, ptr %10, 1 - %13 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %12) - %14 = call %reflect.Value @reflect.Value.Method(%reflect.Value %13, i64 0) - %15 = call i64 @reflect.Value.Kind(%reflect.Value %14) - %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 37 - %20 = load ptr, ptr %19, align 8 - %21 = insertvalue { ptr, ptr } undef, ptr %20, 0 - %22 = insertvalue { ptr, ptr } %21, ptr %17, 1 - %23 = extractvalue { ptr, ptr } %22, 1 - %24 = extractvalue { ptr, ptr } %22, 0 - %25 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %24(ptr %23) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 7 }) + %4 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reflect.I", align 8 + %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %4, ptr %3) + %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %5, 0 + %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %6, ptr %0, 1 + %8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %7) + %9 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %7, 1 + %10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %8, 0 + %11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %10, ptr %9, 1 + %12 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %11) + %13 = call %reflect.Value @reflect.Value.Method(%reflect.Value %12, i64 0) + %14 = call i64 @reflect.Value.Kind(%reflect.Value %13) + %15 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @reflect.Value.Type(%reflect.Value %13) + %16 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %15) + %17 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %15, 0 + %18 = getelementptr ptr, ptr %17, i64 37 + %19 = load ptr, ptr %18, align 8 + %20 = insertvalue { ptr, ptr } undef, ptr %19, 0 + %21 = insertvalue { ptr, ptr } %20, ptr %16, 1 + %22 = extractvalue { ptr, ptr } %21, 1 + %23 = extractvalue { ptr, ptr } %21, 0 + %24 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %23(ptr %22) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 7 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %15) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %14) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %25) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %24) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %26 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) - %27 = getelementptr inbounds %reflect.Value, ptr %26, i64 0 - %28 = load ptr, ptr @_llgo_int, align 8 - %29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %28, 0 - %30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %29, ptr inttoptr (i64 100 to ptr), 1 - %31 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %30) - store %reflect.Value %31, ptr %27, align 8 - %32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %26, 0 - %33 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %32, i64 1, 1 - %34 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %33, i64 1, 2 - %35 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @reflect.Value.Call(%reflect.Value %14, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %34) - %36 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35, 0 - %37 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35, 1 - %38 = icmp sge i64 0, %37 - call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %38) - %39 = getelementptr inbounds %reflect.Value, ptr %36, i64 0 - %40 = load %reflect.Value, ptr %39, align 8 - %41 = call i64 @reflect.Value.Int(%reflect.Value %40) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %41) + %25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) + %26 = getelementptr inbounds %reflect.Value, ptr %25, i64 0 + %27 = load ptr, ptr @_llgo_int, align 8 + %28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %27, 0 + %29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %28, ptr inttoptr (i64 100 to ptr), 1 + %30 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %29) + store %reflect.Value %30, ptr %26, align 8 + %31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %25, 0 + %32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %31, i64 1, 1 + %33 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %32, i64 1, 2 + %34 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @reflect.Value.Call(%reflect.Value %13, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %33) + %35 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %34, 0 + %36 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %34, 1 + %37 = icmp sge i64 0, %36 + call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %37) + %38 = getelementptr inbounds %reflect.Value, ptr %35, i64 0 + %39 = load %reflect.Value, ptr %38, align 8 + %40 = call i64 @reflect.Value.Int(%reflect.Value %39) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %40) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %42 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @reflect.Value.Interface(%reflect.Value %14) - %43 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %42, 0 - %44 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 - %45 = icmp eq ptr %43, %44 - br i1 %45, label %_llgo_3, label %_llgo_4 + %41 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @reflect.Value.Interface(%reflect.Value %13) + %42 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %41, 0 + %43 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8 + %44 = icmp eq ptr %42, %43 + br i1 %44, label %_llgo_3, label %_llgo_4 _llgo_1: ; preds = %_llgo_5 - %46 = load ptr, ptr @_llgo_string, align 8 - %47 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 5 }, ptr %47, align 8 - %48 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %46, 0 - %49 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %48, ptr %47, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %49) + %45 = load ptr, ptr @_llgo_string, align 8 + %46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 5 }, ptr %46, align 8 + %47 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %45, 0 + %48 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %47, ptr %46, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %48) unreachable _llgo_2: ; preds = %_llgo_5 - %50 = extractvalue { ptr, ptr } %76, 1 - %51 = extractvalue { ptr, ptr } %76, 0 - %52 = call i64 %51(ptr %50, i64 1) - %53 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @reflect.Value.Interface(%reflect.Value %14) - %54 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %53) - %55 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) - %56 = getelementptr inbounds %reflect.Value, ptr %55, i64 0 - %57 = load ptr, ptr @_llgo_int, align 8 - %58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %57, 0 - %59 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %58, ptr inttoptr (i64 100 to ptr), 1 - %60 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %59) - store %reflect.Value %60, ptr %56, align 8 - %61 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %55, 0 - %62 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %61, i64 1, 1 - %63 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %62, i64 1, 2 - %64 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @reflect.Value.Call(%reflect.Value %54, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %63) - %65 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %64, 0 - %66 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %64, 1 - %67 = icmp sge i64 0, %66 - call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %67) - %68 = getelementptr inbounds %reflect.Value, ptr %65, i64 0 - %69 = load %reflect.Value, ptr %68, align 8 - %70 = call i64 @reflect.Value.Int(%reflect.Value %69) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %70) + %49 = extractvalue { ptr, ptr } %75, 1 + %50 = extractvalue { ptr, ptr } %75, 0 + %51 = call i64 %50(ptr %49, i64 1) + %52 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @reflect.Value.Interface(%reflect.Value %13) + %53 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %52) + %54 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24) + %55 = getelementptr inbounds %reflect.Value, ptr %54, i64 0 + %56 = load ptr, ptr @_llgo_int, align 8 + %57 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %56, 0 + %58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %57, ptr inttoptr (i64 100 to ptr), 1 + %59 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %58) + store %reflect.Value %59, ptr %55, align 8 + %60 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %54, 0 + %61 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, i64 1, 1 + %62 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %61, i64 1, 2 + %63 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @reflect.Value.Call(%reflect.Value %53, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %62) + %64 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %63, 0 + %65 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %63, 1 + %66 = icmp sge i64 0, %65 + call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %66) + %67 = getelementptr inbounds %reflect.Value, ptr %64, i64 0 + %68 = load %reflect.Value, ptr %67, align 8 + %69 = call i64 @reflect.Value.Int(%reflect.Value %68) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %69) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) ret void _llgo_3: ; preds = %_llgo_0 - %71 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %42, 1 - %72 = load { ptr, ptr }, ptr %71, align 8 - %73 = insertvalue { { ptr, ptr }, i1 } undef, { ptr, ptr } %72, 0 - %74 = insertvalue { { ptr, ptr }, i1 } %73, i1 true, 1 + %70 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %41, 1 + %71 = load { ptr, ptr }, ptr %70, align 8 + %72 = insertvalue { { ptr, ptr }, i1 } undef, { ptr, ptr } %71, 0 + %73 = insertvalue { { ptr, ptr }, i1 } %72, i1 true, 1 br label %_llgo_5 _llgo_4: ; preds = %_llgo_0 br label %_llgo_5 _llgo_5: ; preds = %_llgo_4, %_llgo_3 - %75 = phi { { ptr, ptr }, i1 } [ %74, %_llgo_3 ], [ zeroinitializer, %_llgo_4 ] - %76 = extractvalue { { ptr, ptr }, i1 } %75, 0 - %77 = extractvalue { { ptr, ptr }, i1 } %75, 1 - br i1 %77, label %_llgo_2, label %_llgo_1 + %74 = phi { { ptr, ptr }, i1 } [ %73, %_llgo_3 ], [ zeroinitializer, %_llgo_4 ] + %75 = extractvalue { { ptr, ptr }, i1 } %74, 0 + %76 = extractvalue { { ptr, ptr }, i1 } %74, 1 + br i1 %76, label %_llgo_2, label %_llgo_1 } define void @"github.com/goplus/llgo/cl/_testgo/reflect.callMethod"() { @@ -398,7 +398,7 @@ _llgo_0: %15 = extractvalue { ptr, ptr } %14, 1 %16 = extractvalue { ptr, ptr } %14, 0 %17 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %16(ptr %15) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 6 }) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 6 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %7) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) @@ -554,7 +554,7 @@ _llgo_0: %50 = getelementptr inbounds %reflect.Value, ptr %47, i64 1 %51 = load %reflect.Value, ptr %50, align 8 %52 = call i64 @reflect.Value.Int(%reflect.Value %51) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 10 }) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 10 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %46) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) @@ -624,7 +624,7 @@ _llgo_0: %98 = getelementptr inbounds %reflect.Value, ptr %95, i64 1 %99 = load %reflect.Value, ptr %98, align 8 %100 = call i64 @reflect.Value.Int(%reflect.Value %99) - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 10 }) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 10 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %94) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32) @@ -681,7 +681,7 @@ _llgo_4: ; preds = %_llgo_2 _llgo_5: ; preds = %_llgo_2 %38 = load ptr, ptr @_llgo_string, align 8 %39 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 40 }, ptr %39, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @16, i64 40 }, ptr %39, align 8 %40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %38, 0 %41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %40, ptr %39, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %41) @@ -723,12 +723,12 @@ _llgo_0: %3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) store i64 1, ptr %3, align 4 %4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %2, ptr %1, ptr %3) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @20, i64 5 }, ptr %4, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @21, i64 5 }, ptr %4, align 8 %5 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8 %6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) store i64 2, ptr %6, align 4 %7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %5, ptr %1, ptr %6) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @21, i64 5 }, ptr %7, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 5 }, ptr %7, align 8 %8 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8 %9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %8, 0 %10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %9, ptr %1, 1 @@ -753,7 +753,7 @@ _llgo_2: ; preds = %_llgo_3 %21 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %20) %22 = call %reflect.Value @reflect.Value.MapIndex(%reflect.Value %11, %reflect.Value %21) %23 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @reflect.Value.String(%reflect.Value %22) - %24 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %23, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @21, i64 5 }) + %24 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %23, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 5 }) %25 = xor i1 %24, true br i1 %25, label %_llgo_4, label %_llgo_5 @@ -766,7 +766,7 @@ _llgo_3: ; preds = %_llgo_0 _llgo_4: ; preds = %_llgo_2 %29 = load ptr, ptr @_llgo_string, align 8 %30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 14 }, ptr %30, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @23, i64 14 }, ptr %30, align 8 %31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %29, 0 %32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %31, ptr %30, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %32) @@ -779,7 +779,7 @@ _llgo_5: ; preds = %_llgo_2 %36 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %35) %37 = load ptr, ptr @_llgo_string, align 8 %38 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @23, i64 4 }, ptr %38, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @24, i64 4 }, ptr %38, align 8 %39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %37, 0 %40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %39, ptr %38, 1 %41 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %40) @@ -790,14 +790,14 @@ _llgo_5: ; preds = %_llgo_2 %45 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %44) %46 = call %reflect.Value @reflect.Value.MapIndex(%reflect.Value %11, %reflect.Value %45) %47 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @reflect.Value.String(%reflect.Value %46) - %48 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %47, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @23, i64 4 }) + %48 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %47, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @24, i64 4 }) %49 = xor i1 %48, true br i1 %49, label %_llgo_6, label %_llgo_7 _llgo_6: ; preds = %_llgo_5 %50 = load ptr, ptr @_llgo_string, align 8 %51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 14 }, ptr %51, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @23, i64 14 }, ptr %51, align 8 %52 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %50, 0 %53 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %52, ptr %51, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %53) @@ -813,7 +813,7 @@ _llgo_7: ; preds = %_llgo_5 br i1 %59, label %_llgo_8, label %_llgo_9 _llgo_8: ; preds = %_llgo_7 - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @24, i64 12 }) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @25, i64 12 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) br label %_llgo_9 @@ -864,7 +864,7 @@ _llgo_12: ; preds = %_llgo_14, %_llgo_9 _llgo_13: ; preds = %_llgo_14, %_llgo_10 %90 = load ptr, ptr @_llgo_string, align 8 %91 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @25, i64 13 }, ptr %91, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @26, i64 13 }, ptr %91, align 8 %92 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %90, 0 %93 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %92, ptr %91, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %93) @@ -899,7 +899,7 @@ _llgo_0: %14 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %13) %15 = load ptr, ptr @_llgo_string, align 8 %16 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @20, i64 5 }, ptr %16, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @21, i64 5 }, ptr %16, align 8 %17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %15, 0 %18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %17, ptr %16, 1 %19 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %18) @@ -910,7 +910,7 @@ _llgo_0: %23 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %22) %24 = load ptr, ptr @_llgo_string, align 8 %25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @21, i64 5 }, ptr %25, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 5 }, ptr %25, align 8 %26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %24, 0 %27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %26, ptr %25, 1 %28 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %27) @@ -935,7 +935,7 @@ _llgo_2: ; preds = %_llgo_3 %38 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %37) %39 = call %reflect.Value @reflect.Value.MapIndex(%reflect.Value %10, %reflect.Value %38) %40 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @reflect.Value.String(%reflect.Value %39) - %41 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %40, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @21, i64 5 }) + %41 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %40, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 5 }) %42 = xor i1 %41, true br i1 %42, label %_llgo_4, label %_llgo_5 @@ -948,7 +948,7 @@ _llgo_3: ; preds = %_llgo_0 _llgo_4: ; preds = %_llgo_2 %46 = load ptr, ptr @_llgo_string, align 8 %47 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 14 }, ptr %47, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @23, i64 14 }, ptr %47, align 8 %48 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %46, 0 %49 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %48, ptr %47, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %49) @@ -961,7 +961,7 @@ _llgo_5: ; preds = %_llgo_2 %53 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %52) %54 = load ptr, ptr @_llgo_string, align 8 %55 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @23, i64 4 }, ptr %55, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @24, i64 4 }, ptr %55, align 8 %56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %54, 0 %57 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %56, ptr %55, 1 %58 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %57) @@ -972,14 +972,14 @@ _llgo_5: ; preds = %_llgo_2 %62 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %61) %63 = call %reflect.Value @reflect.Value.MapIndex(%reflect.Value %10, %reflect.Value %62) %64 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @reflect.Value.String(%reflect.Value %63) - %65 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %64, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @23, i64 4 }) + %65 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %64, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @24, i64 4 }) %66 = xor i1 %65, true br i1 %66, label %_llgo_6, label %_llgo_7 _llgo_6: ; preds = %_llgo_5 %67 = load ptr, ptr @_llgo_string, align 8 %68 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @22, i64 14 }, ptr %68, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @23, i64 14 }, ptr %68, align 8 %69 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %67, 0 %70 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %69, ptr %68, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %70) @@ -995,7 +995,7 @@ _llgo_7: ; preds = %_llgo_5 br i1 %76, label %_llgo_8, label %_llgo_9 _llgo_8: ; preds = %_llgo_7 - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @24, i64 12 }) + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @25, i64 12 }) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) br label %_llgo_9 @@ -1046,7 +1046,7 @@ _llgo_12: ; preds = %_llgo_14, %_llgo_9 _llgo_13: ; preds = %_llgo_14, %_llgo_10 %107 = load ptr, ptr @_llgo_string, align 8 %108 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @25, i64 13 }, ptr %108, align 8 + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @26, i64 13 }, ptr %108, align 8 %109 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %107, 0 %110 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %109, ptr %108, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %110) @@ -1207,43 +1207,50 @@ _llgo_13: ; preds = %_llgo_12 br label %_llgo_14 _llgo_14: ; preds = %_llgo_13, %_llgo_12 - %72 = load ptr, ptr @"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU", align 8 - %73 = load ptr, ptr @"_llgo_iface$VdBKYV8-gcMjZtZfcf-u2oKoj9Lu3VXwuG8TGCW2S4A", align 8 + %72 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 1 }) + %73 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reflect.I", align 8 %74 = icmp eq ptr %73, null br i1 %74, label %_llgo_15, label %_llgo_16 _llgo_15: ; preds = %_llgo_14 - %75 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 3 }, ptr undef }, ptr %72, 1 - %76 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) - %77 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %76, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %75, ptr %77, align 8 - %78 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %76, 0 - %79 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %78, i64 1, 1 - %80 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %79, i64 1, 2 - %81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %80) - store ptr %81, ptr @"_llgo_iface$VdBKYV8-gcMjZtZfcf-u2oKoj9Lu3VXwuG8TGCW2S4A", align 8 + store ptr %72, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/reflect.I", align 8 br label %_llgo_16 _llgo_16: ; preds = %_llgo_15, %_llgo_14 - %82 = load ptr, ptr @_llgo_any, align 8 - %83 = icmp eq ptr %82, null - br i1 %83, label %_llgo_17, label %_llgo_18 + %75 = load ptr, ptr @"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU", align 8 + br i1 %74, label %_llgo_17, label %_llgo_18 _llgo_17: ; preds = %_llgo_16 + %76 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 3 }, ptr undef }, ptr %75, 1 + %77 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) + %78 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %77, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %76, ptr %78, align 8 + %79 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %77, 0 + %80 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %79, i64 1, 1 + %81 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %80, i64 1, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %72, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %81) + br label %_llgo_18 + +_llgo_18: ; preds = %_llgo_17, %_llgo_16 + %82 = load ptr, ptr @_llgo_any, align 8 + %83 = icmp eq ptr %82, null + br i1 %83, label %_llgo_19, label %_llgo_20 + +_llgo_19: ; preds = %_llgo_18 %84 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) %85 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %84, 0 %86 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %85, i64 0, 1 %87 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %86, i64 0, 2 %88 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %87) store ptr %88, ptr @_llgo_any, align 8 - br label %_llgo_18 + br label %_llgo_20 -_llgo_18: ; preds = %_llgo_17, %_llgo_16 +_llgo_20: ; preds = %_llgo_19, %_llgo_18 %89 = load ptr, ptr @"[]_llgo_any", align 8 %90 = icmp eq ptr %89, null - br i1 %90, label %_llgo_19, label %_llgo_20 + br i1 %90, label %_llgo_21, label %_llgo_22 -_llgo_19: ; preds = %_llgo_18 +_llgo_21: ; preds = %_llgo_20 %91 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) %92 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %91, 0 %93 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %92, i64 0, 1 @@ -1251,14 +1258,14 @@ _llgo_19: ; preds = %_llgo_18 %95 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 41 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %94) %96 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.SliceOf"(ptr %95) store ptr %96, ptr @"[]_llgo_any", align 8 - br label %_llgo_20 + br label %_llgo_22 -_llgo_20: ; preds = %_llgo_19, %_llgo_18 +_llgo_22: ; preds = %_llgo_21, %_llgo_20 %97 = load ptr, ptr @"_llgo_func$KK0iU4Wpi3BdRqssvycXqtgNe2Dq1riBlM61Rds1QsU", align 8 %98 = icmp eq ptr %97, null - br i1 %98, label %_llgo_21, label %_llgo_22 + br i1 %98, label %_llgo_23, label %_llgo_24 -_llgo_21: ; preds = %_llgo_20 +_llgo_23: ; preds = %_llgo_22 %99 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) %100 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) %101 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) @@ -1311,9 +1318,9 @@ _llgo_21: ; preds = %_llgo_20 %136 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %127, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %135, i1 true) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %136) store ptr %136, ptr @"_llgo_func$KK0iU4Wpi3BdRqssvycXqtgNe2Dq1riBlM61Rds1QsU", align 8 - br label %_llgo_22 + br label %_llgo_24 -_llgo_22: ; preds = %_llgo_21, %_llgo_20 +_llgo_24: ; preds = %_llgo_23, %_llgo_22 %137 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) %138 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) %139 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) @@ -1379,22 +1386,22 @@ _llgo_22: ; preds = %_llgo_21, %_llgo_20 store ptr %184, ptr @"github.com/goplus/llgo/cl/_testgo/reflect.struct$FjMjjQr3-2iTiWyZP1IIQFOz0hUCa0OS6pEm5uVV6Pk", align 8 %185 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8 %186 = icmp eq ptr %185, null - br i1 %186, label %_llgo_23, label %_llgo_24 + br i1 %186, label %_llgo_25, label %_llgo_26 -_llgo_23: ; preds = %_llgo_22 +_llgo_25: ; preds = %_llgo_24 %187 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) %188 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24) %189 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 40) %190 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 8, ptr %189) - %191 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @16, i64 7 }, ptr %190, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) + %191 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 7 }, ptr %190, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %192 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34) %193 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 8, ptr %192) - %194 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 4 }, ptr %193, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) + %194 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 4 }, ptr %193, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %195 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24) %196 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 8, ptr %195) - %197 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 5 }, ptr %196, i64 72, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) + %197 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 5 }, ptr %196, i64 72, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %198 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 58) - %199 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 8 }, ptr %198, i64 200, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) + %199 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @20, i64 8 }, ptr %198, i64 200, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) %200 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 224) %201 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %200, i64 0 store %"github.com/goplus/llgo/runtime/abi.StructField" %191, ptr %201, align 8 @@ -1411,9 +1418,9 @@ _llgo_23: ; preds = %_llgo_22 %209 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %187, ptr %188, ptr %208, i64 4) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %209) store ptr %209, ptr @"map[_llgo_int]_llgo_string", align 8 - br label %_llgo_24 + br label %_llgo_26 -_llgo_24: ; preds = %_llgo_23, %_llgo_22 +_llgo_26: ; preds = %_llgo_25, %_llgo_24 ret void } @@ -1459,7 +1466,9 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr, p declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr) -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.Slice") +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.String") + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr, %"github.com/goplus/llgo/runtime/internal/runtime.Slice") declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr, ptr) @@ -1473,6 +1482,8 @@ _llgo_0: ret { i64, i64 } %11 } +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.Slice") + declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.SliceOf"(ptr) declare %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @reflect.Value.CallSlice(%reflect.Value, %"github.com/goplus/llgo/runtime/internal/runtime.Slice") diff --git a/cl/_testgo/tpinst/out.ll b/cl/_testgo/tpinst/out.ll index 06ae573c..dee9d37b 100644 --- a/cl/_testgo/tpinst/out.ll +++ b/cl/_testgo/tpinst/out.ll @@ -23,18 +23,19 @@ source_filename = "github.com/goplus/llgo/cl/_testgo/tpinst" @4 = private unnamed_addr constant [5 x i8] c"value", align 1 @5 = private unnamed_addr constant [46 x i8] c"github.com/goplus/llgo/cl/_testgo/tpinst.value", align 1 @"*_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[int]" = linkonce global ptr null, align 8 -@"_llgo_iface$Jvxc0PCI_drlfK7S5npMGdZkQLeRkQ_x2e2CifPE6w8" = linkonce global ptr null, align 8 -@6 = private unnamed_addr constant [5 x i8] c"error", align 1 +@"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.I[int]" = linkonce global ptr null, align 8 +@6 = private unnamed_addr constant [1 x i8] c"I", align 1 +@7 = private unnamed_addr constant [5 x i8] c"error", align 1 @_llgo_string = linkonce global ptr null, align 8 @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]" = linkonce global ptr null, align 8 -@7 = private unnamed_addr constant [10 x i8] c"M[float64]", align 1 +@8 = private unnamed_addr constant [10 x i8] c"M[float64]", align 1 @_llgo_float64 = linkonce global ptr null, align 8 @"github.com/goplus/llgo/cl/_testgo/tpinst.struct$7SZ-TjG6e68olyGxlMRRIOYuZz2LaKIpOrZH-w4GiTU" = linkonce global ptr null, align 8 @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8" = linkonce global ptr null, align 8 @"*_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]" = linkonce global ptr null, align 8 -@"_llgo_iface$2dxw6yZ6V86Spb7J0dTDIoWqg7ba7UDXlAlpJv3-HLk" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.I[float64]" = linkonce global ptr null, align 8 @"github.com/goplus/llgo/cl/_testgo/tpinst.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww" = linkonce global ptr null, align 8 -@8 = private unnamed_addr constant [95 x i8] c"type assertion github.com/goplus/llgo/cl/_testgo/tpinst.I[int] -> interface{value() int} failed", align 1 +@9 = private unnamed_addr constant [95 x i8] c"type assertion github.com/goplus/llgo/cl/_testgo/tpinst.I[int] -> interface{value() int} failed", align 1 define void @"github.com/goplus/llgo/cl/_testgo/tpinst.demo"() { _llgo_0: @@ -43,108 +44,106 @@ _llgo_0: store i64 100, ptr %1, align 4 %2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[int]", align 8 %3 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[int]", align 8 - %4 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %5 = load ptr, ptr @"_llgo_iface$Jvxc0PCI_drlfK7S5npMGdZkQLeRkQ_x2e2CifPE6w8", align 8 - %6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %5, ptr %3) - %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %6, 0 - %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %7, ptr %0, 1 - %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 3 - %12 = load ptr, ptr %11, align 8 - %13 = insertvalue { ptr, ptr } undef, ptr %12, 0 - %14 = insertvalue { ptr, ptr } %13, ptr %9, 1 - %15 = extractvalue { ptr, ptr } %14, 1 - %16 = extractvalue { ptr, ptr } %14, 0 - %17 = call i64 %16(ptr %15) - %18 = icmp ne i64 %17, 100 - br i1 %18, label %_llgo_1, label %_llgo_2 + %4 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.I[int]", align 8 + %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %4, ptr %3) + %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %5, 0 + %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %6, ptr %0, 1 + %8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %7) + %9 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %7, 0 + %10 = getelementptr ptr, ptr %9, i64 3 + %11 = load ptr, ptr %10, align 8 + %12 = insertvalue { ptr, ptr } undef, ptr %11, 0 + %13 = insertvalue { ptr, ptr } %12, ptr %8, 1 + %14 = extractvalue { ptr, ptr } %13, 1 + %15 = extractvalue { ptr, ptr } %13, 0 + %16 = call i64 %15(ptr %14) + %17 = icmp ne i64 %16, 100 + br i1 %17, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 - %19 = load ptr, ptr @_llgo_string, align 8 - %20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 5 }, ptr %20, align 8 - %21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %19, 0 - %22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %21, ptr %20, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %22) + %18 = load ptr, ptr @_llgo_string, align 8 + %19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 5 }, ptr %19, align 8 + %20 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %18, 0 + %21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %20, ptr %19, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %21) unreachable _llgo_2: ; preds = %_llgo_0 - %23 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) - %24 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", ptr %23, i32 0, i32 0 - store double 1.001000e+02, ptr %24, align 8 - %25 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", align 8 - %26 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", align 8 - %27 = load ptr, ptr @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8", align 8 - %28 = load ptr, ptr @"_llgo_iface$2dxw6yZ6V86Spb7J0dTDIoWqg7ba7UDXlAlpJv3-HLk", align 8 - %29 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %28, ptr %26) - %30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %29, 0 - %31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %30, ptr %23, 1 - %32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %31) - %33 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %31, 0 - %34 = getelementptr ptr, ptr %33, i64 3 - %35 = load ptr, ptr %34, align 8 - %36 = insertvalue { ptr, ptr } undef, ptr %35, 0 - %37 = insertvalue { ptr, ptr } %36, ptr %32, 1 - %38 = extractvalue { ptr, ptr } %37, 1 - %39 = extractvalue { ptr, ptr } %37, 0 - %40 = call double %39(ptr %38) - %41 = fcmp une double %40, 1.001000e+02 - br i1 %41, label %_llgo_3, label %_llgo_4 + %22 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) + %23 = getelementptr inbounds %"github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", ptr %22, i32 0, i32 0 + store double 1.001000e+02, ptr %23, align 8 + %24 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", align 8 + %25 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", align 8 + %26 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.I[float64]", align 8 + %27 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %26, ptr %25) + %28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %27, 0 + %29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %28, ptr %22, 1 + %30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %29) + %31 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %29, 0 + %32 = getelementptr ptr, ptr %31, i64 3 + %33 = load ptr, ptr %32, align 8 + %34 = insertvalue { ptr, ptr } undef, ptr %33, 0 + %35 = insertvalue { ptr, ptr } %34, ptr %30, 1 + %36 = extractvalue { ptr, ptr } %35, 1 + %37 = extractvalue { ptr, ptr } %35, 0 + %38 = call double %37(ptr %36) + %39 = fcmp une double %38, 1.001000e+02 + br i1 %39, label %_llgo_3, label %_llgo_4 _llgo_3: ; preds = %_llgo_2 - %42 = load ptr, ptr @_llgo_string, align 8 - %43 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 5 }, ptr %43, align 8 - %44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %42, 0 - %45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %44, ptr %43, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %45) + %40 = load ptr, ptr @_llgo_string, align 8 + %41 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 5 }, ptr %41, align 8 + %42 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %40, 0 + %43 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %42, ptr %41, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %43) unreachable _llgo_4: ; preds = %_llgo_2 - %46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %8) - %47 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %48 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww", align 8 - %49 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %48, ptr %46) - br i1 %49, label %_llgo_7, label %_llgo_8 + %44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %7) + %45 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + %46 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww", align 8 + %47 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %46, ptr %44) + br i1 %47, label %_llgo_7, label %_llgo_8 _llgo_5: ; preds = %_llgo_7 - %50 = load ptr, ptr @_llgo_string, align 8 - %51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 5 }, ptr %51, align 8 - %52 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %50, 0 - %53 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %52, ptr %51, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %53) + %48 = load ptr, ptr @_llgo_string, align 8 + %49 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 5 }, ptr %49, align 8 + %50 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %48, 0 + %51 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %50, ptr %49, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %51) unreachable _llgo_6: ; preds = %_llgo_7 ret void _llgo_7: ; preds = %_llgo_4 - %54 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %8, 1 - %55 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww", align 8 - %56 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %55, ptr %46) - %57 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %56, 0 - %58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %57, ptr %54, 1 - %59 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %58) - %60 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %58, 0 - %61 = getelementptr ptr, ptr %60, i64 3 - %62 = load ptr, ptr %61, align 8 - %63 = insertvalue { ptr, ptr } undef, ptr %62, 0 - %64 = insertvalue { ptr, ptr } %63, ptr %59, 1 - %65 = extractvalue { ptr, ptr } %64, 1 - %66 = extractvalue { ptr, ptr } %64, 0 - %67 = call i64 %66(ptr %65) - %68 = icmp ne i64 %67, 100 - br i1 %68, label %_llgo_5, label %_llgo_6 + %52 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %7, 1 + %53 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww", align 8 + %54 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %53, ptr %44) + %55 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %54, 0 + %56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %55, ptr %52, 1 + %57 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %56) + %58 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %56, 0 + %59 = getelementptr ptr, ptr %58, i64 3 + %60 = load ptr, ptr %59, align 8 + %61 = insertvalue { ptr, ptr } undef, ptr %60, 0 + %62 = insertvalue { ptr, ptr } %61, ptr %57, 1 + %63 = extractvalue { ptr, ptr } %62, 1 + %64 = extractvalue { ptr, ptr } %62, 0 + %65 = call i64 %64(ptr %63) + %66 = icmp ne i64 %65, 100 + br i1 %66, label %_llgo_5, label %_llgo_6 _llgo_8: ; preds = %_llgo_4 - %69 = load ptr, ptr @_llgo_string, align 8 - %70 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 95 }, ptr %70, align 8 - %71 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %69, 0 - %72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %71, ptr %70, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %72) + %67 = load ptr, ptr @_llgo_string, align 8 + %68 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 95 }, ptr %68, align 8 + %69 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %67, 0 + %70 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %69, ptr %68, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %70) unreachable } @@ -289,54 +288,61 @@ _llgo_9: ; preds = %_llgo_6 br label %_llgo_10 _llgo_10: ; preds = %_llgo_9, %_llgo_6 - %47 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 - %48 = load ptr, ptr @"_llgo_iface$Jvxc0PCI_drlfK7S5npMGdZkQLeRkQ_x2e2CifPE6w8", align 8 + %47 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 1 }) + %48 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.I[int]", align 8 %49 = icmp eq ptr %48, null br i1 %49, label %_llgo_11, label %_llgo_12 _llgo_11: ; preds = %_llgo_10 - %50 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }, ptr undef }, ptr %47, 1 - %51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) - %52 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %51, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %50, ptr %52, align 8 - %53 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %51, 0 - %54 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %53, i64 1, 1 - %55 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %54, i64 1, 2 - %56 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %55) - store ptr %56, ptr @"_llgo_iface$Jvxc0PCI_drlfK7S5npMGdZkQLeRkQ_x2e2CifPE6w8", align 8 + store ptr %47, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.I[int]", align 8 br label %_llgo_12 _llgo_12: ; preds = %_llgo_11, %_llgo_10 - %57 = load ptr, ptr @_llgo_string, align 8 - %58 = icmp eq ptr %57, null - br i1 %58, label %_llgo_13, label %_llgo_14 + %50 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 + br i1 %49, label %_llgo_13, label %_llgo_14 _llgo_13: ; preds = %_llgo_12 - %59 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24) - store ptr %59, ptr @_llgo_string, align 8 + %51 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }, ptr undef }, ptr %50, 1 + %52 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) + %53 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %52, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %51, ptr %53, align 8 + %54 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %52, 0 + %55 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %54, i64 1, 1 + %56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %55, i64 1, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %47, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %56) br label %_llgo_14 _llgo_14: ; preds = %_llgo_13, %_llgo_12 - %60 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 10 }, i64 25, i64 8, i64 0, i64 2) - %61 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", align 8 - %62 = icmp eq ptr %61, null - br i1 %62, label %_llgo_15, label %_llgo_16 + %57 = load ptr, ptr @_llgo_string, align 8 + %58 = icmp eq ptr %57, null + br i1 %58, label %_llgo_15, label %_llgo_16 _llgo_15: ; preds = %_llgo_14 - store ptr %60, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", align 8 + %59 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24) + store ptr %59, ptr @_llgo_string, align 8 br label %_llgo_16 _llgo_16: ; preds = %_llgo_15, %_llgo_14 - %63 = load ptr, ptr @_llgo_float64, align 8 - %64 = icmp eq ptr %63, null - br i1 %64, label %_llgo_17, label %_llgo_18 + %60 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 10 }, i64 25, i64 8, i64 0, i64 2) + %61 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", align 8 + %62 = icmp eq ptr %61, null + br i1 %62, label %_llgo_17, label %_llgo_18 _llgo_17: ; preds = %_llgo_16 - %65 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 46) - store ptr %65, ptr @_llgo_float64, align 8 + store ptr %60, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", align 8 br label %_llgo_18 _llgo_18: ; preds = %_llgo_17, %_llgo_16 + %63 = load ptr, ptr @_llgo_float64, align 8 + %64 = icmp eq ptr %63, null + br i1 %64, label %_llgo_19, label %_llgo_20 + +_llgo_19: ; preds = %_llgo_18 + %65 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 46) + store ptr %65, ptr @_llgo_float64, align 8 + br label %_llgo_20 + +_llgo_20: ; preds = %_llgo_19, %_llgo_18 %66 = load ptr, ptr @_llgo_float64, align 8 %67 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 46) %68 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 1 }, ptr %67, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false) @@ -349,20 +355,20 @@ _llgo_18: ; preds = %_llgo_17, %_llgo_16 %74 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %73) store ptr %74, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.struct$7SZ-TjG6e68olyGxlMRRIOYuZz2LaKIpOrZH-w4GiTU", align 8 %75 = load ptr, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.struct$7SZ-TjG6e68olyGxlMRRIOYuZz2LaKIpOrZH-w4GiTU", align 8 - br i1 %62, label %_llgo_19, label %_llgo_20 + br i1 %62, label %_llgo_21, label %_llgo_22 -_llgo_19: ; preds = %_llgo_18 +_llgo_21: ; preds = %_llgo_20 %76 = load ptr, ptr @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8", align 8 %77 = icmp eq ptr %76, null - br i1 %77, label %_llgo_21, label %_llgo_22 + br i1 %77, label %_llgo_23, label %_llgo_24 -_llgo_20: ; preds = %_llgo_22, %_llgo_18 - %78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 10 }, i64 25, i64 8, i64 0, i64 2) +_llgo_22: ; preds = %_llgo_24, %_llgo_20 + %78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 10 }, i64 25, i64 8, i64 0, i64 2) %79 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", align 8 %80 = icmp eq ptr %79, null - br i1 %80, label %_llgo_23, label %_llgo_24 + br i1 %80, label %_llgo_25, label %_llgo_26 -_llgo_21: ; preds = %_llgo_19 +_llgo_23: ; preds = %_llgo_21 %81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0) %82 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %81, 0 %83 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %82, i64 0, 1 @@ -377,9 +383,9 @@ _llgo_21: ; preds = %_llgo_19 %91 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %84, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %90, i1 false) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %91) store ptr %91, ptr @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8", align 8 - br label %_llgo_22 + br label %_llgo_24 -_llgo_22: ; preds = %_llgo_21, %_llgo_19 +_llgo_24: ; preds = %_llgo_23, %_llgo_21 %92 = load ptr, ptr @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8", align 8 %93 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %92, 1 %94 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %93, ptr @"github.com/goplus/llgo/cl/_testgo/tpinst.(*M[float64]).Value", 2 @@ -397,33 +403,40 @@ _llgo_22: ; preds = %_llgo_21, %_llgo_19 %104 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %103, i64 2, 1 %105 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %104, i64 2, 2 call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %60, ptr %75, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %105) - br label %_llgo_20 + br label %_llgo_22 -_llgo_23: ; preds = %_llgo_20 +_llgo_25: ; preds = %_llgo_22 %106 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %78) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %106) store ptr %106, ptr @"*_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.M[float64]", align 8 - br label %_llgo_24 - -_llgo_24: ; preds = %_llgo_23, %_llgo_20 - %107 = load ptr, ptr @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8", align 8 - %108 = load ptr, ptr @"_llgo_iface$2dxw6yZ6V86Spb7J0dTDIoWqg7ba7UDXlAlpJv3-HLk", align 8 - %109 = icmp eq ptr %108, null - br i1 %109, label %_llgo_25, label %_llgo_26 - -_llgo_25: ; preds = %_llgo_24 - %110 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }, ptr undef }, ptr %107, 1 - %111 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) - %112 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %111, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %110, ptr %112, align 8 - %113 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %111, 0 - %114 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %113, i64 1, 1 - %115 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %114, i64 1, 2 - %116 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %115) - store ptr %116, ptr @"_llgo_iface$2dxw6yZ6V86Spb7J0dTDIoWqg7ba7UDXlAlpJv3-HLk", align 8 br label %_llgo_26 -_llgo_26: ; preds = %_llgo_25, %_llgo_24 +_llgo_26: ; preds = %_llgo_25, %_llgo_22 + %107 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 40 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 1 }) + %108 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.I[float64]", align 8 + %109 = icmp eq ptr %108, null + br i1 %109, label %_llgo_27, label %_llgo_28 + +_llgo_27: ; preds = %_llgo_26 + store ptr %107, ptr @"_llgo_github.com/goplus/llgo/cl/_testgo/tpinst.I[float64]", align 8 + br label %_llgo_28 + +_llgo_28: ; preds = %_llgo_27, %_llgo_26 + %110 = load ptr, ptr @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8", align 8 + br i1 %109, label %_llgo_29, label %_llgo_30 + +_llgo_29: ; preds = %_llgo_28 + %111 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }, ptr undef }, ptr %110, 1 + %112 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) + %113 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %112, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %111, ptr %113, align 8 + %114 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %112, 0 + %115 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %114, i64 1, 1 + %116 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %115, i64 1, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %107, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %116) + br label %_llgo_30 + +_llgo_30: ; preds = %_llgo_29, %_llgo_28 %117 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8 %118 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 46 }, ptr undef }, ptr %117, 1 %119 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) @@ -455,7 +468,9 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(p declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr) -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.Slice") +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.String") + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr, %"github.com/goplus/llgo/runtime/internal/runtime.Slice") declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr, ptr) @@ -465,4 +480,6 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.c declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface") +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.Slice") + declare i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr, ptr) diff --git a/cl/_testrt/tpabi/out.ll b/cl/_testrt/tpabi/out.ll index bdbe27d3..cdf31f08 100644 --- a/cl/_testrt/tpabi/out.ll +++ b/cl/_testrt/tpabi/out.ll @@ -26,7 +26,8 @@ source_filename = "github.com/goplus/llgo/cl/_testrt/tpabi" @7 = private unnamed_addr constant [83 x i8] c"type assertion any -> github.com/goplus/llgo/cl/_testrt/tpabi.T[string, int] failed", align 1 @8 = private unnamed_addr constant [5 x i8] c"hello", align 1 @"*_llgo_github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]" = linkonce global ptr null, align 8 -@"_llgo_iface$BP0p_lUsEd-IbbtJVukGmgrdQkqzcoYzSiwgUvgFvUs" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testrt/tpabi.I" = linkonce global ptr null, align 8 +@9 = private unnamed_addr constant [1 x i8] c"I", align 1 define void @"github.com/goplus/llgo/cl/_testrt/tpabi.init"() { _llgo_0: @@ -73,44 +74,43 @@ _llgo_1: ; preds = %_llgo_0 store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 5 }, ptr %15, align 8 store i64 100, ptr %16, align 4 %17 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testrt/tpabi.T[string,int]", align 8 - %18 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %19 = load ptr, ptr @"_llgo_iface$BP0p_lUsEd-IbbtJVukGmgrdQkqzcoYzSiwgUvgFvUs", align 8 - %20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %19, ptr %17) - %21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %20, 0 - %22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %21, ptr %14, 1 - %23 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %22) - %24 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %22, 0 - %25 = getelementptr ptr, ptr %24, i64 3 - %26 = load ptr, ptr %25, align 8 - %27 = insertvalue { ptr, ptr } undef, ptr %26, 0 - %28 = insertvalue { ptr, ptr } %27, ptr %23, 1 - %29 = extractvalue { ptr, ptr } %28, 1 - %30 = extractvalue { ptr, ptr } %28, 0 - call void %30(ptr %29) - %31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32) - %32 = getelementptr inbounds i64, ptr %31, i64 0 - %33 = getelementptr inbounds i64, ptr %31, i64 1 - %34 = getelementptr inbounds i64, ptr %31, i64 2 - %35 = getelementptr inbounds i64, ptr %31, i64 3 - store i64 1, ptr %32, align 4 - store i64 2, ptr %33, align 4 - store i64 3, ptr %34, align 4 - store i64 4, ptr %35, align 4 - %36 = getelementptr [4 x i64], ptr %31, i64 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %36) + %18 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpabi.I", align 8 + %19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %18, ptr %17) + %20 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %19, 0 + %21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %20, ptr %14, 1 + %22 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %21) + %23 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %21, 0 + %24 = getelementptr ptr, ptr %23, i64 3 + %25 = load ptr, ptr %24, align 8 + %26 = insertvalue { ptr, ptr } undef, ptr %25, 0 + %27 = insertvalue { ptr, ptr } %26, ptr %22, 1 + %28 = extractvalue { ptr, ptr } %27, 1 + %29 = extractvalue { ptr, ptr } %27, 0 + call void %29(ptr %28) + %30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32) + %31 = getelementptr inbounds i64, ptr %30, i64 0 + %32 = getelementptr inbounds i64, ptr %30, i64 1 + %33 = getelementptr inbounds i64, ptr %30, i64 2 + %34 = getelementptr inbounds i64, ptr %30, i64 3 + store i64 1, ptr %31, align 4 + store i64 2, ptr %32, align 4 + store i64 3, ptr %33, align 4 + store i64 4, ptr %34, align 4 + %35 = getelementptr [4 x i64], ptr %30, i64 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %35) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) - %37 = getelementptr [4 x i64], ptr %31, i64 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %37) + %36 = getelementptr [4 x i64], ptr %30, i64 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %36) call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10) ret void _llgo_2: ; preds = %_llgo_0 - %38 = load ptr, ptr @_llgo_string, align 8 - %39 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) - store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 83 }, ptr %39, align 8 - %40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %38, 0 - %41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %40, ptr %39, 1 - call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %41) + %37 = load ptr, ptr @_llgo_string, align 8 + %38 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) + store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 83 }, ptr %38, align 8 + %39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %37, 0 + %40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %39, ptr %38, 1 + call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %40) unreachable } @@ -265,24 +265,31 @@ _llgo_11: ; preds = %_llgo_8 br label %_llgo_12 _llgo_12: ; preds = %_llgo_11, %_llgo_8 - %60 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 - %61 = load ptr, ptr @"_llgo_iface$BP0p_lUsEd-IbbtJVukGmgrdQkqzcoYzSiwgUvgFvUs", align 8 + %60 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }) + %61 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpabi.I", align 8 %62 = icmp eq ptr %61, null br i1 %62, label %_llgo_13, label %_llgo_14 _llgo_13: ; preds = %_llgo_12 - %63 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 4 }, ptr undef }, ptr %60, 1 - %64 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) - %65 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %64, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %63, ptr %65, align 8 - %66 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %64, 0 - %67 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %66, i64 1, 1 - %68 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %67, i64 1, 2 - %69 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68) - store ptr %69, ptr @"_llgo_iface$BP0p_lUsEd-IbbtJVukGmgrdQkqzcoYzSiwgUvgFvUs", align 8 + store ptr %60, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpabi.I", align 8 br label %_llgo_14 _llgo_14: ; preds = %_llgo_13, %_llgo_12 + %63 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8 + br i1 %62, label %_llgo_15, label %_llgo_16 + +_llgo_15: ; preds = %_llgo_14 + %64 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 4 }, ptr undef }, ptr %63, 1 + %65 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) + %66 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %65, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %64, ptr %66, align 8 + %67 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %65, 0 + %68 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %67, i64 1, 1 + %69 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68, i64 1, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %60, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %69) + br label %_llgo_16 + +_llgo_16: ; preds = %_llgo_15, %_llgo_14 ret void } @@ -312,7 +319,9 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr) -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.Slice") +declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.String") + +declare void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr, %"github.com/goplus/llgo/runtime/internal/runtime.Slice") declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr, ptr) diff --git a/cl/_testrt/tpmethod/out.ll b/cl/_testrt/tpmethod/out.ll index 926da872..dc60f100 100644 --- a/cl/_testrt/tpmethod/out.ll +++ b/cl/_testrt/tpmethod/out.ll @@ -37,7 +37,8 @@ source_filename = "github.com/goplus/llgo/cl/_testrt/tpmethod" @10 = private unnamed_addr constant [2 x i8] c"fn", align 1 @11 = private unnamed_addr constant [4 x i8] c"Then", align 1 @"*_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]" = linkonce global ptr null, align 8 -@"_llgo_iface$kSla6xFkiJD3PX1RdCGebCgULXloNxgSHKPEQsXsqos" = linkonce global ptr null, align 8 +@"_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.Future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]" = linkonce global ptr null, align 8 +@12 = private unnamed_addr constant [6 x i8] c"Future", align 1 define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/cl/_testrt/tpmethod.ReadFile"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) { _llgo_0: @@ -129,14 +130,11 @@ _llgo_0: store { ptr, ptr } %0, ptr %2, align 8 %3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]", align 8 %4 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]", align 8 - %5 = load ptr, ptr @"_llgo_func$wp7b63sFyNWPTd8VyEOOosByqpZg5pKsGThGMOTpyvo", align 8 - %6 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$s_pTkk2q6m_bRjfPic11Z1ogmQ-VdSHpGxyzvfszwb8", align 8 - %7 = load ptr, ptr @"_llgo_func$pIyBXw4qkUL3JRjAVf_wwtiGz7b0evOvoFHlctBJd6o", align 8 - %8 = load ptr, ptr @"_llgo_iface$kSla6xFkiJD3PX1RdCGebCgULXloNxgSHKPEQsXsqos", align 8 - %9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %8, ptr %4) - %10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %9, 0 - %11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %10, ptr %1, 1 - ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %11 + %5 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.Future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]", align 8 + %6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %5, ptr %4) + %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %6, 0 + %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %7, ptr %1, 1 + ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %8 } define linkonce void @"__llgo_stub.github.com/goplus/llgo/cl/_testrt/tpmethod.ReadFile$1"(ptr %0, { ptr, ptr } %1) { @@ -525,24 +523,33 @@ _llgo_20: ; preds = %_llgo_19, %_llgo_18 %249 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %248) call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %249) store ptr %249, ptr @"*_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]", align 8 - %250 = load ptr, ptr @"_llgo_func$pIyBXw4qkUL3JRjAVf_wwtiGz7b0evOvoFHlctBJd6o", align 8 - %251 = load ptr, ptr @"_llgo_iface$kSla6xFkiJD3PX1RdCGebCgULXloNxgSHKPEQsXsqos", align 8 + %250 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 42 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 6 }) + %251 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.Future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]", align 8 %252 = icmp eq ptr %251, null br i1 %252, label %_llgo_21, label %_llgo_22 _llgo_21: ; preds = %_llgo_20 - %253 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 4 }, ptr undef }, ptr %250, 1 - %254 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) - %255 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %254, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %253, ptr %255, align 8 - %256 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %254, 0 - %257 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %256, i64 1, 1 - %258 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %257, i64 1, 2 - %259 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 42 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %258) - store ptr %259, ptr @"_llgo_iface$kSla6xFkiJD3PX1RdCGebCgULXloNxgSHKPEQsXsqos", align 8 + store ptr %250, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/tpmethod.Future[github.com/goplus/llgo/cl/_testrt/tpmethod.Tuple[error]]", align 8 br label %_llgo_22 _llgo_22: ; preds = %_llgo_21, %_llgo_20 + %253 = load ptr, ptr @"_llgo_func$wp7b63sFyNWPTd8VyEOOosByqpZg5pKsGThGMOTpyvo", align 8 + %254 = load ptr, ptr @"github.com/goplus/llgo/cl/_testrt/tpmethod.struct$s_pTkk2q6m_bRjfPic11Z1ogmQ-VdSHpGxyzvfszwb8", align 8 + %255 = load ptr, ptr @"_llgo_func$pIyBXw4qkUL3JRjAVf_wwtiGz7b0evOvoFHlctBJd6o", align 8 + br i1 %252, label %_llgo_23, label %_llgo_24 + +_llgo_23: ; preds = %_llgo_22 + %256 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 4 }, ptr undef }, ptr %255, 1 + %257 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24) + %258 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %257, i64 0 + store %"github.com/goplus/llgo/runtime/abi.Imethod" %256, ptr %258, align 8 + %259 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %257, 0 + %260 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %259, i64 1, 1 + %261 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %260, i64 1, 2 + call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterface"(ptr %250, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %261) + br label %_llgo_24 + +_llgo_24: ; preds = %_llgo_23, %_llgo_22 ret void } @@ -568,8 +575,6 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr, p declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr) -declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.Slice") - declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr, ptr) attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) } diff --git a/cl/_testrt/vamethod/out.ll b/cl/_testrt/vamethod/out.ll index 23fa356a..bdafd8cb 100644 --- a/cl/_testrt/vamethod/out.ll +++ b/cl/_testrt/vamethod/out.ll @@ -34,7 +34,6 @@ source_filename = "github.com/goplus/llgo/cl/_testrt/vamethod" @"*_llgo_github.com/goplus/llgo/cl/_testrt/vamethod.CFmt" = linkonce global ptr null, align 8 @"_llgo_github.com/goplus/llgo/cl/_testrt/vamethod.IFmt" = linkonce global ptr null, align 8 @9 = private unnamed_addr constant [4 x i8] c"IFmt", align 1 -@"_llgo_iface$a85zs5wWQQoPIERm_en8plssh4spdIeeXZPC-E0TDh0" = linkonce global ptr null, align 8 @10 = private unnamed_addr constant [12 x i8] c"%s (%d,%d)\0A\00", align 1 @11 = private unnamed_addr constant [5 x i8] c"ifmt\00", align 1 @12 = private unnamed_addr constant [5 x i8] c"error", align 1 @@ -133,7 +132,7 @@ _llgo_2: ; preds = %_llgo_5 _llgo_3: ; preds = %_llgo_0 %36 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %11, 1 - %37 = load ptr, ptr @"_llgo_iface$a85zs5wWQQoPIERm_en8plssh4spdIeeXZPC-E0TDh0", align 8 + %37 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/_testrt/vamethod.IFmt", align 8 %38 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %37, ptr %12) %39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %38, 0 %40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %39, ptr %36, 1 @@ -420,38 +419,16 @@ _llgo_29: ; preds = %_llgo_28 br label %_llgo_30 _llgo_30: ; preds = %_llgo_29, %_llgo_28 - %137 = load ptr, ptr @"_llgo_func$sSO5Bw-E3E7TeJqIJF_OmmojTYyqWBhYrUwNYJNw7Bs", align 8 - %138 = load ptr, ptr @"_llgo_func$vAfTC3ZLX0_lZI-ZNliu0_DkE266FSmKXxj_cqKPPkA", align 8 - %139 = load ptr, ptr @"_llgo_iface$a85zs5wWQQoPIERm_en8plssh4spdIeeXZPC-E0TDh0", align 8 - %140 = icmp eq ptr %139, null - br i1 %140, label %_llgo_31, label %_llgo_32 + %137 = load ptr, ptr @_llgo_string, align 8 + %138 = icmp eq ptr %137, null + br i1 %138, label %_llgo_31, label %_llgo_32 _llgo_31: ; preds = %_llgo_30 - %141 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 6 }, ptr undef }, ptr %137, 1 - %142 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 9 }, ptr undef }, ptr %138, 1 - %143 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48) - %144 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %143, i64 0 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %141, ptr %144, align 8 - %145 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %143, i64 1 - store %"github.com/goplus/llgo/runtime/abi.Imethod" %142, ptr %145, align 8 - %146 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %143, 0 - %147 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %146, i64 2, 1 - %148 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %147, i64 2, 2 - %149 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 42 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %148) - store ptr %149, ptr @"_llgo_iface$a85zs5wWQQoPIERm_en8plssh4spdIeeXZPC-E0TDh0", align 8 + %139 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24) + store ptr %139, ptr @_llgo_string, align 8 br label %_llgo_32 _llgo_32: ; preds = %_llgo_31, %_llgo_30 - %150 = load ptr, ptr @_llgo_string, align 8 - %151 = icmp eq ptr %150, null - br i1 %151, label %_llgo_33, label %_llgo_34 - -_llgo_33: ; preds = %_llgo_32 - %152 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24) - store ptr %152, ptr @_llgo_string, align 8 - br label %_llgo_34 - -_llgo_34: ; preds = %_llgo_33, %_llgo_32 ret void } diff --git a/ssa/abitype.go b/ssa/abitype.go index 6f465edd..06ca0ba5 100644 --- a/ssa/abitype.go +++ b/ssa/abitype.go @@ -186,6 +186,7 @@ func (b Builder) abiInterfaceOf(t *types.Interface) func() Expr { } return func() Expr { prog := b.Prog + pkg := b.Pkg methods := make([]Expr, n) for i := 0; i < n; i++ { m := t.Method(i) @@ -195,7 +196,6 @@ func (b Builder) abiInterfaceOf(t *types.Interface) func() Expr { } methods[i] = b.abiImethodOf(mName, typs[i]) } - pkg := b.Pkg fn := pkg.rtFunc("Interface") tSlice := lastParamType(prog, fn) methodSlice := b.SliceLit(tSlice, methods...) diff --git a/ssa/interface.go b/ssa/interface.go index f31f15d2..71f4a79c 100644 --- a/ssa/interface.go +++ b/ssa/interface.go @@ -43,11 +43,11 @@ func (b Builder) newItab(tintf, typ Expr) Expr { return b.Call(b.Pkg.rtFunc("NewItab"), tintf, typ) } -func (b Builder) unsafeInterface(rawIntf *types.Interface, t Expr, data llvm.Value) llvm.Value { +func (b Builder) unsafeInterface(rawIntf *types.Interface, originType types.Type, t Expr, data llvm.Value) llvm.Value { if rawIntf.Empty() { return b.unsafeEface(t.impl, data) } - tintf := b.abiType(rawIntf) + tintf := b.abiType(originType) itab := b.newItab(tintf, t) return b.unsafeIface(itab.impl, data) } @@ -112,7 +112,7 @@ func (b Builder) MakeInterface(tinter Type, x Expr) (ret Expr) { case abi.Indirect: vptr := b.AllocU(typ) b.Store(vptr, x) - return Expr{b.unsafeInterface(rawIntf, tabi, vptr.impl), tinter} + return Expr{b.unsafeInterface(rawIntf, tinter.raw.Type, tabi, vptr.impl), tinter} } ximpl := x.impl if lvl > 0 { @@ -121,7 +121,7 @@ func (b Builder) MakeInterface(tinter Type, x Expr) (ret Expr) { var u llvm.Value switch kind { case abi.Pointer: - return Expr{b.unsafeInterface(rawIntf, tabi, ximpl), tinter} + return Expr{b.unsafeInterface(rawIntf, tinter.raw.Type, tabi, ximpl), tinter} case abi.Integer: tu := prog.Uintptr() u = llvm.CreateIntCast(b.impl, ximpl, tu.ll) @@ -136,7 +136,7 @@ func (b Builder) MakeInterface(tinter Type, x Expr) (ret Expr) { panic("todo") } data := llvm.CreateIntToPtr(b.impl, u, prog.tyVoidPtr()) - return Expr{b.unsafeInterface(rawIntf, tabi, data), tinter} + return Expr{b.unsafeInterface(rawIntf, tinter.raw.Type, tabi, data), tinter} } func (b Builder) valFromData(typ Type, data llvm.Value) Expr { @@ -249,7 +249,9 @@ func (b Builder) TypeAssert(x Expr, assertedTyp Type, commaOk bool) Expr { } else { if rawIntf, ok := assertedTyp.raw.Type.Underlying().(*types.Interface); ok { eq = b.InlineCall(b.Pkg.rtFunc("Implements"), tabi, tx) - val = func() Expr { return Expr{b.unsafeInterface(rawIntf, tx, b.faceData(x.impl)), assertedTyp} } + val = func() Expr { + return Expr{b.unsafeInterface(rawIntf, assertedTyp.raw.Type, tx, b.faceData(x.impl)), assertedTyp} + } } else { eq = b.BinOp(token.EQL, tx, tabi) val = func() Expr { return b.valFromData(assertedTyp, b.faceData(x.impl)) } @@ -305,7 +307,7 @@ func (b Builder) ChangeInterface(typ Type, x Expr) (ret Expr) { rawIntf := typ.raw.Type.Underlying().(*types.Interface) tabi := b.faceAbiType(x) data := b.faceData(x.impl) - return Expr{b.unsafeInterface(rawIntf, tabi, data), typ} + return Expr{b.unsafeInterface(rawIntf, typ.raw.Type, tabi, data), typ} } // -----------------------------------------------------------------------------