
// Copyright (c) Meta Platforms, Inc. and affiliates.

// 3.14 has a simple file that just defines the relavant ids:

#include "opcode.h"

// 0x200 to make sure we don't collide with pseudo instructions
#define EXTENDED_OPCODE_FLAG 0x200


#define INVOKE_METHOD (1 | EXTENDED_OPCODE_FLAG)
#define LOAD_FIELD (2 | EXTENDED_OPCODE_FLAG)
#define LOAD_OBJ_FIELD (4 | EXTENDED_OPCODE_FLAG)
#define LOAD_PRIMITIVE_FIELD (5 | EXTENDED_OPCODE_FLAG)
#define STORE_FIELD (6 | EXTENDED_OPCODE_FLAG)
#define STORE_OBJ_FIELD (7 | EXTENDED_OPCODE_FLAG)
#define STORE_PRIMITIVE_FIELD (8 | EXTENDED_OPCODE_FLAG)
#define BUILD_CHECKED_LIST (9 | EXTENDED_OPCODE_FLAG)
#define BUILD_CHECKED_LIST_CACHED (10 | EXTENDED_OPCODE_FLAG)
#define LOAD_TYPE (11 | EXTENDED_OPCODE_FLAG)
#define CAST (12 | EXTENDED_OPCODE_FLAG)
#define CAST_CACHED (13 | EXTENDED_OPCODE_FLAG)
#define LOAD_LOCAL (14 | EXTENDED_OPCODE_FLAG)
#define STORE_LOCAL (15 | EXTENDED_OPCODE_FLAG)
#define STORE_LOCAL_CACHED (16 | EXTENDED_OPCODE_FLAG)
#define PRIMITIVE_BOX (17 | EXTENDED_OPCODE_FLAG)
#define POP_JUMP_IF_ZERO (100 | EXTENDED_OPCODE_FLAG)
#define POP_JUMP_IF_NONZERO (103 | EXTENDED_OPCODE_FLAG)
#define PRIMITIVE_UNBOX (18 | EXTENDED_OPCODE_FLAG)
#define PRIMITIVE_BINARY_OP (19 | EXTENDED_OPCODE_FLAG)
#define PRIMITIVE_UNARY_OP (20 | EXTENDED_OPCODE_FLAG)
#define PRIMITIVE_COMPARE_OP (21 | EXTENDED_OPCODE_FLAG)
#define LOAD_ITERABLE_ARG (22 | EXTENDED_OPCODE_FLAG)
#define LOAD_MAPPING_ARG (23 | EXTENDED_OPCODE_FLAG)
#define INVOKE_FUNCTION (24 | EXTENDED_OPCODE_FLAG)
#define INVOKE_FUNCTION_CACHED (25 | EXTENDED_OPCODE_FLAG)
#define INVOKE_INDIRECT_CACHED (26 | EXTENDED_OPCODE_FLAG)
#define FAST_LEN (27 | EXTENDED_OPCODE_FLAG)
#define CONVERT_PRIMITIVE (28 | EXTENDED_OPCODE_FLAG)
#define INVOKE_NATIVE (29 | EXTENDED_OPCODE_FLAG)
#define LOAD_CLASS (30 | EXTENDED_OPCODE_FLAG)
#define BUILD_CHECKED_MAP (31 | EXTENDED_OPCODE_FLAG)
#define BUILD_CHECKED_MAP_CACHED (32 | EXTENDED_OPCODE_FLAG)
#define SEQUENCE_GET (33 | EXTENDED_OPCODE_FLAG)
#define SEQUENCE_SET (34 | EXTENDED_OPCODE_FLAG)
#define LIST_DEL (35 | EXTENDED_OPCODE_FLAG)
#define REFINE_TYPE (36 | EXTENDED_OPCODE_FLAG)
#define PRIMITIVE_LOAD_CONST (37 | EXTENDED_OPCODE_FLAG)
#define RETURN_PRIMITIVE (40 | EXTENDED_OPCODE_FLAG)
#define TP_ALLOC (41 | EXTENDED_OPCODE_FLAG)
#define TP_ALLOC_CACHED (42 | EXTENDED_OPCODE_FLAG)
#define LOAD_METHOD_STATIC (43 | EXTENDED_OPCODE_FLAG)
#define LOAD_METHOD_STATIC_CACHED (45 | EXTENDED_OPCODE_FLAG)
