Ruby: vm_exec.h File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Macros | Typedefs
vm_exec.h File Reference

Go to the source code of this file.

## Macros
#define | debugs
#define | DEBUG_ENTER_INSN(insn)
#define | DEBUG_END_INSN()
#define | throwdebug if(0)printf
#define | USE_INSNS_COUNTER 0
#define | INSN_ENTRY(insn) case BIN(insn):
#define | END_INSN(insn)
#define | INSN_DISPATCH()
#define | END_INSNS_DISPATCH()
#define | NEXT_INSN() goto first
#define | START_OF_ORIGINAL_INSN(x) start_of_##x:
#define | DISPATCH_ORIGINAL_INSN(x) goto start_of_##x;
#define | VM_SP_CNT(ec, sp) ((sp) - (ec)->vm_stack)
#define | THROW_EXCEPTION(exc) return (VALUE)(exc)
#define | SCREG(r) (reg_##r)
#define | VM_DEBUG_STACKOVERFLOW 0
#define | CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp, margin)
#define | INSN_LABEL2(insn, name) INSN_LABEL_ ## insn ## _ ## name
#define | INSN_LABEL(x) INSN_LABEL2(NAME_OF_CURRENT_INSN, x)

## Typedefs
typedef long | OFFSET
typedef unsigned long | lindex_t
typedef VALUE | GENTRY
typedef rb_iseq_t * | ISEQ

## Macro Definition Documentation

## ◆ CHECK_VM_STACK_OVERFLOW_FOR_INSN

#define CHECK_VM_STACK_OVERFLOW_FOR_INSN | ( |  | cfp,
|  |  | margin
| ) |  |

Definition at line 190 of file vm_exec.h.

## ◆ DEBUG_END_INSN

#define DEBUG_END_INSN | ( |  | ) |

Definition at line 37 of file vm_exec.h.

## ◆ DEBUG_ENTER_INSN

#define DEBUG_ENTER_INSN | ( |  | insn | ) |

Definition at line 36 of file vm_exec.h.

## ◆ debugs

#define debugs

Definition at line 35 of file vm_exec.h.

## ◆ DISPATCH_ORIGINAL_INSN

#define DISPATCH_ORIGINAL_INSN | ( |  | x | ) | goto start_of_##x;

Definition at line 161 of file vm_exec.h.

## ◆ END_INSN

#define END_INSN | ( |  | insn | ) |

Value:
DEBUG_END_INSN(); \
break;
DEBUG_END_INSN
#define DEBUG_END_INSN()
Definition: vm_exec.h:37

Definition at line 143 of file vm_exec.h.

## ◆ END_INSNS_DISPATCH

#define END_INSNS_DISPATCH | ( |  | ) |

Value:
default: \
SDR(); \
rb_bug("unknown insn: %ld", GET_CURRENT_INSN()); \
} /* end of switch */ \
} /* end of while loop */ \
GET_CURRENT_INSN
#define GET_CURRENT_INSN()
Definition: vm_insnhelper.h:79

Definition at line 151 of file vm_exec.h.

## ◆ INSN_DISPATCH

#define INSN_DISPATCH | ( |  | ) |

Value:
while (1) { \
switch (GET_CURRENT_INSN()) {

Definition at line 147 of file vm_exec.h.

## ◆ INSN_ENTRY

#define INSN_ENTRY | ( |  | insn | ) | case BIN(insn):

Definition at line 140 of file vm_exec.h.

## ◆ INSN_LABEL

#define INSN_LABEL | ( |  | x | ) | INSN_LABEL2(NAME_OF_CURRENT_INSN, x)

Definition at line 194 of file vm_exec.h.

## ◆ INSN_LABEL2

#define INSN_LABEL2 | ( |  | insn,
|  |  | name
| ) |  | INSN_LABEL_ ## insn ## _ ## name

Definition at line 193 of file vm_exec.h.

## ◆ NEXT_INSN

#define NEXT_INSN | ( |  | ) | goto first

Definition at line 158 of file vm_exec.h.

## ◆ SCREG

#define SCREG | ( |  | r | ) | (reg_##r)

Definition at line 183 of file vm_exec.h.

## ◆ START_OF_ORIGINAL_INSN

#define START_OF_ORIGINAL_INSN | ( |  | x | ) | start_of_##x:

Definition at line 160 of file vm_exec.h.

## ◆ THROW_EXCEPTION

#define THROW_EXCEPTION | ( |  | exc | ) | return (VALUE)(exc)

Definition at line 179 of file vm_exec.h.

## ◆ throwdebug

#define throwdebug if(0)printf

Definition at line 40 of file vm_exec.h.

## ◆ USE_INSNS_COUNTER

#define USE_INSNS_COUNTER 0

Definition at line 44 of file vm_exec.h.

## ◆ VM_DEBUG_STACKOVERFLOW

#define VM_DEBUG_STACKOVERFLOW 0

Definition at line 185 of file vm_exec.h.

## ◆ VM_SP_CNT

#define VM_SP_CNT | ( |  | ec,
|  |  | sp
| ) |  | ((sp) - (ec)->vm_stack)

Definition at line 165 of file vm_exec.h.

## Typedef Documentation

## ◆ GENTRY

typedef VALUE GENTRY

Definition at line 16 of file vm_exec.h.

## ◆ ISEQ

typedef rb_iseq_t* ISEQ

Definition at line 17 of file vm_exec.h.

## ◆ lindex_t

typedef unsigned long lindex_t

Definition at line 15 of file vm_exec.h.

## ◆ OFFSET

typedef long OFFSET

Definition at line 14 of file vm_exec.h.