Ruby: vm_opts.h Source File

Ruby 3.4.3p32 (2025-04-14 revision d0b7e5b6a04bde21ca483d20a1546b28b401c2d4)

vm_opts.h
1#ifndef RUBY_VM_OPTS_H/*-*-c-*-*/
2#define RUBY_VM_OPTS_H
3/**********************************************************************
4
5 vm_opts.h - VM optimize option
6
7 $Author$
8
9 Copyright (C) 2004-2007 Koichi Sasada
10
11**********************************************************************/
12
13/* Compile options.
14 * You can change these options at runtime by VM::CompileOption.
15 * Following definitions are default values.
16 */
17
18#define OPT_TAILCALL_OPTIMIZATION 0
19#define OPT_PEEPHOLE_OPTIMIZATION 1
20#define OPT_SPECIALISED_INSTRUCTION 1
21#define OPT_INLINE_CONST_CACHE 1
22#define OPT_FROZEN_STRING_LITERAL -1
23#define OPT_DEBUG_FROZEN_STRING_LITERAL 0
24
25/* Build Options.
26 * You can't change these options at runtime.
27 */
28
29/* C compiler dependent */
30
31/*
32 * 0: direct (using labeled goto using GCC special)
33 * 1: token (switch/case)
34 * 2: call (function call for each insn dispatch)
35 */
36#ifndef OPT_THREADED_CODE
37#define OPT_THREADED_CODE 0
38#endif
39
40#define OPT_DIRECT_THREADED_CODE (OPT_THREADED_CODE == 0)
41#define OPT_TOKEN_THREADED_CODE (OPT_THREADED_CODE == 1)
42#define OPT_CALL_THREADED_CODE (OPT_THREADED_CODE == 2)
43
44/* VM running option */
45#define OPT_CHECKED_RUN 1
46#define OPT_INLINE_METHOD_CACHE 1
47#define OPT_GLOBAL_METHOD_CACHE 1
48
49#ifndef OPT_IC_FOR_IVAR
50#define OPT_IC_FOR_IVAR 1
51#endif
52
53/* architecture independent, affects generated code */
54#define OPT_OPERANDS_UNIFICATION 1
55#define OPT_INSTRUCTIONS_UNIFICATION 0
56#define OPT_UNIFY_ALL_COMBINATION 0
57
58/* misc */
59#ifndef OPT_SUPPORT_JOKE
60#define OPT_SUPPORT_JOKE 0
61#endif
62
63#ifndef VM_COLLECT_USAGE_DETAILS
64#define VM_COLLECT_USAGE_DETAILS 0
65#endif
66
67#endif /* RUBY_VM_OPTS_H */