增加websocket支持
This commit is contained in:
30
vendor/github.com/bytedance/sonic/internal/rt/fastvalue.go
generated
vendored
30
vendor/github.com/bytedance/sonic/internal/rt/fastvalue.go
generated
vendored
@@ -211,33 +211,3 @@ func findReflectRtypeItab() *GoItab {
|
||||
v := reflect.TypeOf(struct{}{})
|
||||
return (*GoIface)(unsafe.Pointer(&v)).Itab
|
||||
}
|
||||
|
||||
func AssertI2I2(t *GoType, i GoIface) (r GoIface) {
|
||||
inter := IfaceType(t)
|
||||
tab := i.Itab
|
||||
if tab == nil {
|
||||
return
|
||||
}
|
||||
if (*GoInterfaceType)(tab.it) != inter {
|
||||
tab = Getitab(inter, tab.Vt, true)
|
||||
if tab == nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
r.Itab = tab
|
||||
r.Value = i.Value
|
||||
return
|
||||
}
|
||||
|
||||
//go:noescape
|
||||
//go:linkname Getitab runtime.getitab
|
||||
func Getitab(inter *GoInterfaceType, typ *GoType, canfail bool) *GoItab
|
||||
|
||||
|
||||
func GetFuncPC(fn interface{}) uintptr {
|
||||
ft := UnpackEface(fn)
|
||||
if ft.Type.Kind() != reflect.Func {
|
||||
panic("not a function")
|
||||
}
|
||||
return *(*uintptr)(ft.Value)
|
||||
}
|
||||
Reference in New Issue
Block a user