From 1034ff06b1a5742f332365d7069f41db78642c87 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Mon, 19 Oct 2026 03:56:43 +0100 Subject: Bytes compared (140's decision point: DNS and HTTP both met it): TEXT_COMPARE's argument takes PURE_COMPARE_BYTES (bit 8) beside its relation, its two then bytes (UTF-8 asked of neither), as CONCAT's argument says bytes; verified as A_ORDER (a relation, and the bit), the executor relating by the argument's relation alone; the JIT, the tier and the batch executor leave TEXT_COMPARE to the executor as before; unit test bytes_compared: eight relations of a constant's bytes, none, 0xff and 'A' (0xff after 'A', a longer after its first byte), four refused (the bit on texts, no bit on bytes, a text with bytes, a relation past NE); counts: b46 against b45 the same on all five works, with and without batches; 008 --- core/module.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/module.h') diff --git a/core/module.h b/core/module.h index 75e27ba..6fad0ec 100644 --- a/core/module.h +++ b/core/module.h @@ -209,8 +209,10 @@ enum { PURE_LOOP_INTEGER = 256, PURE_MODULE_NESTING = 8 }; #define PURE_WORK_DEFAULT (UINT64_C(1) << 28) #define PURE_GROWTH_DEFAULT ((size_t)1 << 28) /* TEXT_COMPARE's argument: the relation, in the order of the number - * comparisons (LT LE GT GE EQ NE); texts order by their bytes. */ + * comparisons (LT LE GT GE EQ NE), and PURE_COMPARE_BYTES with it when its + * two are bytes (texts and bytes alike order by their bytes). */ typedef enum { PURE_LESS, PURE_LESS_EQUAL, PURE_GREATER, PURE_GREATER_EQUAL, PURE_EQUAL, PURE_NOT_EQUAL } PureRelation; +#define PURE_COMPARE_BYTES 0x100u /* An input is a message (027's 4d: the only thing an app takes), an output * or a view's arguments. An output is a message the app sends (SEND, in a -- cgit v1.2.3