示例#1
0
文件: cast.go 项目: NickDaison/e8vm
func regSizeCastable(to, from types.T) bool {
	if types.IsPointer(to) && types.IsPointer(from) {
		return true
	}
	if isPointerType(to) && types.IsBasic(from, types.Uint) {
		return true
	}
	if types.IsBasic(to, types.Uint) && isPointerType(from) {
		return true
	}
	return false
}
示例#2
0
文件: cast.go 项目: NickDaison/e8vm
func isPointerType(t types.T) bool {
	return types.IsPointer(t) || types.IsFuncPointer(t)
}