Ruby 3.3.2p78 (2024-05-30 revision e5a195edf62fe1bf7146a191da13fa1c4fecbd71)
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_HASH,
35 BOP_CALL,
36 BOP_AND,
37 BOP_OR,
38 BOP_CMP,
39 BOP_DEFAULT,
40
41 BOP_LAST_
42};
43
44RUBY_EXTERN short ruby_vm_redefined_flag[BOP_LAST_];
45
46/* optimize insn */
47#define INTEGER_REDEFINED_OP_FLAG (1 << 0)
48#define FLOAT_REDEFINED_OP_FLAG (1 << 1)
49#define STRING_REDEFINED_OP_FLAG (1 << 2)
50#define ARRAY_REDEFINED_OP_FLAG (1 << 3)
51#define HASH_REDEFINED_OP_FLAG (1 << 4)
52/* #define BIGNUM_REDEFINED_OP_FLAG (1 << 5) */
53#define SYMBOL_REDEFINED_OP_FLAG (1 << 6)
54#define TIME_REDEFINED_OP_FLAG (1 << 7)
55#define REGEXP_REDEFINED_OP_FLAG (1 << 8)
56#define NIL_REDEFINED_OP_FLAG (1 << 9)
57#define TRUE_REDEFINED_OP_FLAG (1 << 10)
58#define FALSE_REDEFINED_OP_FLAG (1 << 11)
59#define PROC_REDEFINED_OP_FLAG (1 << 12)
60
61#define BASIC_OP_UNREDEFINED_P(op, klass) (LIKELY((ruby_vm_redefined_flag[(op)]&(klass)) == 0))
62
63#endif
Tweaking visibility of C variables/functions.
#define RUBY_EXTERN
Declaration of externally visible global variables.
Definition dllexport.h:45