From 7d32b0e52580d4985e5520b30d2c4cc6960a4d0d Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Sun, 26 Sep 2010 22:36:16 -0700 Subject: [PATCH] Bug 598486 - nanojit: clarify semantics of comparisons. r=edwsmith. --HG-- extra : convert_revision : 2c8245cb9048cc79ca561ec7a7b014249788247c --- js/src/nanojit/LIRopcode.tbl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/src/nanojit/LIRopcode.tbl b/js/src/nanojit/LIRopcode.tbl index db73f41db7e..32bd880e785 100644 --- a/js/src/nanojit/LIRopcode.tbl +++ b/js/src/nanojit/LIRopcode.tbl @@ -209,7 +209,9 @@ OP_UN(52) // Comparisons //--------------------------------------------------------------------------- -// Within each size group, order must be preserved so that, except for eq*, (op +// All comparisons return an int: 0 on failure and 1 on success. +// +// Within each type group, order must be preserved so that, except for eq*, (op // ^ 1) gives the opposite one (eg. lt ^ 1 == gt). eq* must have odd numbers // for this to work. They must also remain contiguous so that opcode range // checking works correctly. Static assertions in LIR.h check these