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