LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
tasks.hh
Go to the documentation of this file.
1 
6 #ifndef DESUGAR_TASKS_HH
7 # define DESUGAR_TASKS_HH
8 
9 # include <config.h>
10 # include <misc/fwd.hh>
11 # include <task/libtask.hh>
12 
13 namespace desugar
14 {
15 
17  namespace tasks
18  {
19  TASK_GROUP("Desugaring and bound-checking");
20 
21 
22  /*-------------.
23  | Desugaring. |
24  `-------------*/
25 
27  BOOLEAN_TASK_DECLARE("desugar-for", "desugar `for' loops",
28  desugar_for_p, "");
29 
31  BOOLEAN_TASK_DECLARE("desugar-string-cmp", "desugar string comparisons",
32  desugar_string_cmp_p, "");
33 
34 
37  DISJUNCTIVE_TASK_DECLARE("desugared",
38  "Default the removal of syntactic sugar "
39  "from the AST to Tiger (without overloading)",
40  "desugar"
41  );
42 
44  TASK_DECLARE("desugar", "desugar the AST", desugar,
45  "types-compute rename");
46 
47 
48 
49  /* FIXME: Careful with this options (and with
50  --raw-bound-checks-add), as they leave the AST in a bad state
51  (without bindings nor types). For instance,
52 
53  tc --raw-desugar -H will probably result in a SEGV.
54 
55  since hir-compute wants a type-checked AST. */
56 
59  TASK_DECLARE("raw-desugar", "desugar the AST without recomputing "
60  "bindings nor types", raw_desugar, "typed rename");
61 
62 
63  /*-----------------------.
64  | Array bound checking. |
65  `-----------------------*/
66 
68  TASK_DECLARE("bound-checks-add", "add dynamic bound checks",
69  bound_checks_add, "types-compute rename");
70 
71 
74  TASK_DECLARE("raw-bound-checks-add",
75  "add bound-checking to the AST without recomputing "
76  "bindings nor types", raw_bound_checks_add, "typed rename");
77 
78  } // namespace tasks
79 
80 } // namespace desugar
81 
82 #endif // !DESUGAR_TASKS_HH