Ruby 3.2.3p157 (2024-01-18 revision 52bb2ac0a6971d0391efa2275f7a66bff319087c)
basic_operators.h
1#ifndef INTERNAL_BOP_H /*-*-C-*-vi:se ft=c:*/
2#define INTERNAL_BOP_H
3
4#include "internal.h"
6
7enum ruby_basic_operators {
8 BOP_PLUS,
9 BOP_MINUS,
10 BOP_MULT,
11 BOP_DIV,
12 BOP_MOD,
13 BOP_EQ,
14 BOP_EQQ,
15 BOP_LT,
16 BOP_LE,
17 BOP_LTLT,
18 BOP_AREF,
19 BOP_ASET,
20 BOP_LENGTH,
21 BOP_SIZE,
22 BOP_EMPTY_P,
23 BOP_NIL_P,
24 BOP_SUCC,
25 BOP_GT,
26 BOP_GE,
27 BOP_NOT,
28 BOP_NEQ,
29 BOP_MATCH,
30 BOP_FREEZE,
31 BOP_UMINUS,
32 BOP_MAX,
33 BOP_MIN,
34 BOP_CALL,
35 BOP_AND,
36 BOP_OR,
37 BOP_CMP,
38 BOP_DEFAULT,
39
40 BOP_LAST_
41};
42
43MJIT_SYMBOL_EXPORT_BEGIN
44RUBY_EXTERN short ruby_vm_redefined_flag[BOP_LAST_];
45MJIT_SYMBOL_EXPORT_END
46
47/* optimize insn */
48#define INTEGER_REDEFINED_OP_FLAG (1 << 0)
49#define FLOAT_REDEFINED_OP_FLAG (1 << 1)
50#define STRING_REDEFINED_OP_FLAG (1 << 2)
51#define ARRAY_REDEFINED_OP_FLAG (1 << 3)
52#define HASH_REDEFINED_OP_FLAG (1 << 4)
53/* #define BIGNUM_REDEFINED_OP_FLAG (1 << 5) */
54#define SYMBOL_REDEFINED_OP_FLAG (1 << 6)
55#define TIME_REDEFINED_OP_FLAG (1 << 7)
56#define REGEXP_REDEFINED_OP_FLAG (1 << 8)
57#define NIL_REDEFINED_OP_FLAG (1 << 9)
58#define TRUE_REDEFINED_OP_FLAG (1 << 10)
59#define FALSE_REDEFINED_OP_FLAG (1 << 11)
60#define PROC_REDEFINED_OP_FLAG (1 << 12)
61
62#define BASIC_OP_UNREDEFINED_P(op, klass) (LIKELY((ruby_vm_redefined_flag[(op)]&(klass)) == 0))
63
64#endif
Tweaking visibility of C variables/functions.
#define RUBY_EXTERN
Declaration of externally visible global variables.
Definition dllexport.h:47