From e62b89190faf05bf7e3cb92d8d199e39953a20b5 Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Tue, 2 Jan 2024 16:11:20 +0100 Subject: added 'in' operator for private fields --- lib/quickjs/quickjs-opcode.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/quickjs/quickjs-opcode.h') diff --git a/lib/quickjs/quickjs-opcode.h b/lib/quickjs/quickjs-opcode.h index 55e9809e..f471907c 100644 --- a/lib/quickjs/quickjs-opcode.h +++ b/lib/quickjs/quickjs-opcode.h @@ -256,6 +256,7 @@ DEF( and, 1, 2, 1, none) DEF( xor, 1, 2, 1, none) DEF( or, 1, 2, 1, none) DEF(is_undefined_or_null, 1, 1, 1, none) +DEF( private_in, 1, 2, 1, none) #ifdef CONFIG_BIGNUM DEF( mul_pow10, 1, 2, 1, none) DEF( math_mod, 1, 2, 1, none) @@ -280,7 +281,7 @@ def(scope_put_var_init, 7, 0, 2, atom_u16) /* emitted in phase 1, removed in pha def(scope_get_private_field, 7, 1, 1, atom_u16) /* obj -> value, emitted in phase 1, removed in phase 2 */ def(scope_get_private_field2, 7, 1, 2, atom_u16) /* obj -> obj value, emitted in phase 1, removed in phase 2 */ def(scope_put_private_field, 7, 2, 0, atom_u16) /* obj value ->, emitted in phase 1, removed in phase 2 */ - +def(scope_in_private_field, 7, 1, 1, atom_u16) /* obj -> res emitted in phase 1, removed in phase 2 */ def( set_class_name, 5, 1, 1, u32) /* emitted in phase 1, removed in phase 2 */ def( line_num, 5, 0, 0, u32) /* emitted in phase 1, removed in phase 3 */ -- cgit 1.4.1-2-gfad0