Revision 5f92df59c8ea01930d2e9e1d238806885fb2d591 authored by Raphaël Proust on 27 June 2019, 00:19:25 UTC, committed by Pierre Boutillier on 21 October 2019, 12:25:24 UTC
The Michelson documentation states that `COMPARE` pushes -1 (resp. 1)
if the top element of the stack is smaller (resp. greater) than the
second. However, the implementation can actually push a negative
number instead of -1 and a positive number instead of 1 depending on
the type and values.

This semantics should not break any code as the result of `COMPARE` is
almost always comsumed by comparison projectors such as `GT` or `LT`
who only care about the sign. However, for the sake of consistency,
this patches makes `COMPARE` return only -1, 0 or 1.

This fixes issue #546
1 parent 36fbc8d
History
File Mode Size
.ocamlformat -rw-r--r-- 40 bytes
bheap.ml -rw-r--r-- 3.4 KB
bheap.mli -rw-r--r-- 2.3 KB
branch.ml -rw-r--r-- 1.1 KB
branch.mli -rw-r--r-- 882 bytes
commit.ml -rw-r--r-- 16.5 KB
commit.mli -rw-r--r-- 1.6 KB
conf.ml -rw-r--r-- 3.6 KB
conf.mli -rw-r--r-- 1.8 KB
contents.ml -rw-r--r-- 9.1 KB
contents.mli -rw-r--r-- 1.9 KB
diff.ml -rw-r--r-- 1.2 KB
diff.mli -rw-r--r-- 908 bytes
dot.ml -rw-r--r-- 6.6 KB
dot.mli -rw-r--r-- 1.0 KB
dune -rw-r--r-- 134 bytes
hash.ml -rw-r--r-- 2.4 KB
hash.mli -rw-r--r-- 1.2 KB
info.ml -rw-r--r-- 1.5 KB
info.mli -rw-r--r-- 1.0 KB
irmin.ml -rw-r--r-- 7.8 KB
irmin.mli -rw-r--r-- 114.3 KB
irmin.opam -rw-r--r-- 1.1 KB
lock.ml -rw-r--r-- 2.0 KB
lock.mli -rw-r--r-- 1008 bytes
lru.ml -rw-r--r-- 1 byte
merge.ml -rw-r--r-- 12.5 KB
merge.mli -rw-r--r-- 3.0 KB
node.ml -rw-r--r-- 12.6 KB
node.mli -rw-r--r-- 2.2 KB
object_graph.ml -rw-r--r-- 6.8 KB
object_graph.mli -rw-r--r-- 2.7 KB
path.ml -rw-r--r-- 1.6 KB
path.mli -rw-r--r-- 911 bytes
s.ml -rw-r--r-- 22.2 KB
slice.ml -rw-r--r-- 2.7 KB
slice.mli -rw-r--r-- 1010 bytes
store.ml -rw-r--r-- 35.4 KB
store.mli -rw-r--r-- 1.6 KB
sync.ml -rw-r--r-- 1.1 KB
sync.mli -rw-r--r-- 983 bytes
sync_ext.ml -rw-r--r-- 7.3 KB
sync_ext.mli -rw-r--r-- 998 bytes
tree.ml -rw-r--r-- 46.2 KB
tree.mli -rw-r--r-- 1.6 KB
type.ml -rw-r--r-- 43.5 KB
type.mli -rw-r--r-- 4.7 KB
version.ml -rw-r--r-- 28 bytes
watch.ml -rw-r--r-- 8.9 KB
watch.mli -rw-r--r-- 1.7 KB

back to top