1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
//! Definitions common to multiple passes.
//!
//! This includes error handling and the basic definition of Brainfuck commands.
use fmt;
/// The result type for Brainfuck operations that can fail.
///
/// This is `Result` specialized to the four kinds of Brainfuck
/// [`Error`](enum.Error.html)s
pub type BfResult<T> = ;
/// The static and dynamic errors that can happen in Brainfuck.
/// The eight Brainfuck commands.
/// The number of times to repeat a command when run-length encoded.
///
/// This can be changed to `u16` or `u32` by enabling the `u16count` or `u32count` features,
/// respectively. Making `Count` smaller may make bytecode instructions to be smaller, which
/// may enable more bytecode to fit in cache.
pub type Count = usize;
/// The number of times to repeat a command when run-length encoded.
///
/// This type is `usize` by default, but was set to `u16` by enabling the `u16count` feature. It
/// can also be set to `u32` via the `u32count` feature.
pub type Count = u16;
/// The number of times to repeat a command when run-length encoded.
///
/// This type is `usize` by default, but was set to `u32` by enabling the `u32count` feature. It
/// can also be set to `u16` via the `u16count` feature.
pub type Count = u32;
/// Instructions as output by the bytecode flattener.
///
/// These include the result of peephole optimizations that turn sequences of Brainfuck commands
/// into non-Brainfuck instructions that are understood by the appropriate interpreters and the
/// JIT compiler.
///
/// Unlike in the earlier passes, the loop instructions
/// do not include a boxed slice of instructions as a
/// subtree. Note that this type is `Copy`.