diff options
author | Son Ho | 2021-11-30 09:43:23 +0100 |
---|---|---|
committer | Son Ho | 2021-11-30 09:43:23 +0100 |
commit | 7b686ea3bcabf2178b666e141e773bed923ea55a (patch) | |
tree | 205918874158d4d6171701e5fc8f6e175298f0cd /src | |
parent | 4aeb5a70952280bc90fea1014d8097e3639896e5 (diff) |
Fix another bug
Diffstat (limited to '')
-rw-r--r-- | src/Interpreter.ml | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Interpreter.ml b/src/Interpreter.ml index c0efc0cc..93629a35 100644 --- a/src/Interpreter.ml +++ b/src/Interpreter.ml @@ -1694,10 +1694,10 @@ let eval_binary_op (config : C.config) (ctx : C.eval_ctx) (binop : E.binop) assert (sv1.int_ty = sv2.int_ty); let b = match binop with - | E.Lt -> Z.lt sv1.V.value sv1.V.value - | E.Le -> Z.leq sv1.V.value sv1.V.value - | E.Ge -> Z.geq sv1.V.value sv1.V.value - | E.Gt -> Z.gt sv1.V.value sv1.V.value + | E.Lt -> Z.lt sv1.V.value sv2.V.value + | E.Le -> Z.leq sv1.V.value sv2.V.value + | E.Ge -> Z.geq sv1.V.value sv2.V.value + | E.Gt -> Z.gt sv1.V.value sv2.V.value | E.Div | E.Rem | E.Add | E.Sub | E.Mul | E.BitXor | E.BitAnd | E.BitOr | E.Shl | E.Shr | E.Ne | E.Eq -> failwith "Unreachable" @@ -2390,6 +2390,10 @@ let test_unit_function (type_defs : T.type_def T.TypeDefId.vector) (* Retrieve the function declaration *) let fdef = A.FunDefId.nth fun_defs fid in + (* Debug *) + L.log#ldebug + (lazy ("test_unit_function: " ^ Print.Types.name_to_string fdef.A.name)); + (* Sanity check - *) assert (T.RegionVarId.length fdef.A.signature.region_params = 0); assert (T.TypeVarId.length fdef.A.signature.type_params = 0); |