runtime: rm NewSlice (use b.unsafeSlice); llgo/ssa: Println

This commit is contained in:
xushiwei
2024-05-28 07:47:07 +08:00
parent 963d7958ea
commit 1c1da6433a
9 changed files with 224 additions and 180 deletions

View File

@@ -31,11 +31,6 @@ type Slice struct {
cap int
}
// NewSlice creates a new slice.
func NewSlice(data unsafe.Pointer, len, cap int) Slice {
return Slice{data, len, cap}
}
func NewSlice3(base unsafe.Pointer, eltSize, cap, i, j, k int) (s Slice) {
if i < 0 || j < i || k < j || k > cap {
panic("slice index out of bounds")