debug why runtime.Basic doesn't work

This commit is contained in:
xushiwei
2024-05-01 12:32:09 +08:00
parent 666808b427
commit 8ae97f73d0
7 changed files with 98 additions and 63 deletions

View File

@@ -46,7 +46,7 @@ func MakeAnyInt(typ *Type, data uintptr) Interface {
func MakeAnyString(data string) Interface {
typ := Basic(abi.String)
tab := &itab{inter: TyAny, _type: typ, hash: 0, fun: [1]uintptr{0}}
c.Printf(c.Str("MakeAnyString(%p)\n"), typ)
c.Printf(c.Str("MakeAnyString(%p): %d, %d\n"), typ, int(typ.Kind_), abi.String)
return Interface{
tab: tab,
data: unsafe.Pointer(&data),