0
|
1 module dmd.backend.BC;
|
|
2
|
|
3 enum BC
|
|
4 {
|
|
5 BCgoto = 1, // goto Bsucc block
|
|
6 BCiftrue = 2, // if (Belem) goto Bsucc[0] else Bsucc[1]
|
|
7 BCret = 3, // return (no return value)
|
|
8 BCretexp = 4, // return with return value
|
|
9 BCexit = 5, // never reaches end of block (like exit() was called)
|
|
10 BCasm = 6, // inline assembler block (Belem is NULL, Bcode
|
|
11 // contains code generated).
|
|
12 // These blocks have one or more successors in Bsucc,
|
|
13 // never 0
|
|
14 BCswitch = 7, // switch statement
|
|
15 // Bswitch points to switch data
|
|
16 // Default is Bsucc
|
|
17 // Cases follow in linked list
|
|
18 BCifthen = 8, // a BCswitch is converted to if-then
|
|
19 // statements
|
|
20 BCjmptab = 9, // a BCswitch is converted to a jump
|
|
21 // table (switch value is index into
|
|
22 // the table)
|
|
23 BCtry = 10, // C++ try block
|
|
24 // first block in a try-block. The first block in
|
|
25 // Bsucc is the next one to go to, subsequent
|
|
26 // blocks are the catch blocks
|
|
27 BCcatch = 11, // C++ catch block
|
|
28 BCjump = 12, // Belem specifies (near) address to jump to
|
|
29 BC_try = 13, // SEH: first block of try-except or try-finally
|
|
30 // Jupiter, Mars: try-catch or try-finally
|
|
31 BC_filter = 14, // SEH exception-filter (always exactly one block)
|
|
32 BC_finally = 15, // first block of SEH termination-handler,
|
|
33 // or finally block
|
|
34 BC_ret = 16, // last block of SEH termination-handler or finally block
|
|
35 BC_except = 17, // first block of SEH exception-handler
|
|
36 BCjcatch = 18, // first block of Jupiter or Mars catch-block
|
|
37 BCjplace = 19, // Jupiter: placeholder
|
|
38 BCMAX
|
|
39 }
|
|
40
|
|
41 import dmd.EnumUtils;
|
|
42 mixin(BringToCurrentScope!(BC)); |