annotate dmd/backend/BC.d @ 0:10317f0c89a5

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