quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

commit 85865674789f115f29d0d47c09e01af7d4c8e37e
parent 86358ef734a52b52c72ac4d2e196ce5afbeb3900
Author: Florian Dold <dold@taler.net>
Date:   Sun,  9 Aug 2026 21:31:00 +0200

quickjs: pack opcode patterns without signed shifts

Diffstat:
Mquickjs/quickjs.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/quickjs/quickjs.c b/quickjs/quickjs.c @@ -33953,9 +33953,9 @@ typedef struct CodeContext { JSAtom atom; } CodeContext; -#define M2(op1, op2) ((op1) | ((op2) << 8)) -#define M3(op1, op2, op3) ((op1) | ((op2) << 8) | ((op3) << 16)) -#define M4(op1, op2, op3, op4) ((op1) | ((op2) << 8) | ((op3) << 16) | ((op4) << 24)) +#define M2(op1, op2) ((int)((uint32_t)(op1) | ((uint32_t)(op2) << 8))) +#define M3(op1, op2, op3) ((int)((uint32_t)(op1) | ((uint32_t)(op2) << 8) | ((uint32_t)(op3) << 16))) +#define M4(op1, op2, op3, op4) ((int)((uint32_t)(op1) | ((uint32_t)(op2) << 8) | ((uint32_t)(op3) << 16) | ((uint32_t)(op4) << 24))) static BOOL code_match(CodeContext *s, int pos, ...) {