Skip to content

Commit

Permalink
remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
liuq19 committed Feb 26, 2025
1 parent a74fa5a commit 4e7c7c3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 192 deletions.
181 changes: 0 additions & 181 deletions internal/rt/stackmap.go

This file was deleted.

12 changes: 1 addition & 11 deletions loader/internal/rt/stackmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ func (b *Bitmap) String() string {
return fmt.Sprintf("Bits: %s(total %d bits, %d bytes)", buf.String(), b.N, len(b.B))
}

// var (
// _stackMapLock = sync.Mutex{}
// _stackMapCache = make(map[*StackMap]struct{})
// )

type BitVec struct {
N uintptr
B unsafe.Pointer
Expand Down Expand Up @@ -106,11 +101,6 @@ type StackMap struct {
B [1]byte
}

func (self *StackMap) Pin() uintptr {
// self.add()
return uintptr(unsafe.Pointer(self))
}

func (self *StackMap) Get(i int32) BitVec {
return BitVec {
N: uintptr(self.L),
Expand Down Expand Up @@ -139,7 +129,7 @@ func (self *StackMap) MarshalBinary() ([]byte, error) {
}

func (self *StackMap) BinaryLen() int {
return ((int(self.N) * int(self.L)) + 7) / 8 + int(unsafe.Sizeof(self.L)) + int(unsafe.Sizeof(self.N))
return (int(self.L) + 7) / 8 + int(unsafe.Sizeof(self.L)) + int(unsafe.Sizeof(self.N))
}

var (
Expand Down

0 comments on commit 4e7c7c3

Please sign in to comment.