1
0
mirror of https://github.com/golang/go synced 2024-11-18 09:44:50 -07:00

rm useless code

This commit is contained in:
alan 2018-10-26 16:11:01 +08:00 committed by 徐志强
parent 2d77600ae7
commit 4b81a79a92

View File

@ -373,19 +373,11 @@ Found:
func (root *semaRoot) rotateLeft(x *sudog) {
// p -> (x a (y b c))
p := x.parent
a, y := x.prev, x.next
b, c := y.prev, y.next
y := x.next
b := y.prev
y.prev = x
x.parent = y
y.next = c
if c != nil {
c.parent = y
}
x.prev = a
if a != nil {
a.parent = x
}
x.next = b
if b != nil {
b.parent = x
@ -409,23 +401,15 @@ func (root *semaRoot) rotateLeft(x *sudog) {
func (root *semaRoot) rotateRight(y *sudog) {
// p -> (y (x a b) c)
p := y.parent
x, c := y.prev, y.next
a, b := x.prev, x.next
x := y.prev
b := x.next
x.prev = a
if a != nil {
a.parent = x
}
x.next = y
y.parent = x
y.prev = b
if b != nil {
b.parent = y
}
y.next = c
if c != nil {
c.parent = y
}
x.parent = p
if p == nil {