fix: use branch operation in || and && operators, fix storage for ! (#476)
This commit is contained in:
committed by
Ludovic Fernandez
parent
f3f54a5302
commit
9a8a88dcb9
@@ -345,13 +345,16 @@ func not(n *node) {
|
||||
dest := genValue(n)
|
||||
value := genValue(n.child[0])
|
||||
tnext := getExec(n.tnext)
|
||||
i := n.findex
|
||||
|
||||
if n.fnext != nil {
|
||||
fnext := getExec(n.fnext)
|
||||
n.exec = func(f *frame) bltn {
|
||||
if !value(f).Bool() {
|
||||
f.data[i].SetBool(true)
|
||||
return tnext
|
||||
}
|
||||
f.data[i].SetBool(false)
|
||||
return fnext
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user