OSDN Git Service
(root)
/
bytom
/
equity.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
optimise ifstatements jumpif condition check (#13)
[bytom/equity.git]
/
compiler
/
builder.go
diff --git
a/compiler/builder.go
b/compiler/builder.go
index
e8dca4e
..
b00d4ec
100644
(file)
--- a/
compiler/builder.go
+++ b/
compiler/builder.go
@@
-44,6
+44,10
@@
func (b *builder) addInt64(stk stack, n int64) stack {
return b.add(s, stk.add(s))
}
+func (b *builder) addNot(stk stack, desc string) stack {
+ return b.add("NOT", stk.drop().add(desc))
+}
+
func (b *builder) addEqual(stk stack, desc string) stack {
return b.add("EQUAL", stk.dropN(2).add(desc))
}