summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/escapes/tasks.cc
diff options
context:
space:
mode:
authorMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:07:58 +0200
committerMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:07:58 +0200
commit967be9e750221ab2ab783f95df79bb26d290a45e (patch)
tree6802900a5e975f9f68b169f0f503f040056d6952 /tiger-compiler/src/escapes/tasks.cc
add: added projectsHEADmain
Diffstat (limited to 'tiger-compiler/src/escapes/tasks.cc')
-rw-r--r--tiger-compiler/src/escapes/tasks.cc38
1 files changed, 38 insertions, 0 deletions
diff --git a/tiger-compiler/src/escapes/tasks.cc b/tiger-compiler/src/escapes/tasks.cc
new file mode 100644
index 0000000..42e6919
--- /dev/null
+++ b/tiger-compiler/src/escapes/tasks.cc
@@ -0,0 +1,38 @@
+/**
+ ** \file escapes/tasks.cc
+ ** \brief Escapes module related tasks' implementation.
+ */
+
+#include <ostream>
+
+#include <ast/libast.hh>
+#include <ast/tasks.hh>
+#include <escapes/libescapes.hh>
+#define DEFINE_TASKS 1
+#include <escapes/tasks.hh>
+#undef DEFINE_TASKS
+#include <misc/xalloc.hh>
+
+namespace escapes::tasks
+{
+
+ /*--------------------.
+ | Static Link tasks. |
+ `--------------------*/
+
+ void escapes_compute() { escapes::escapes_compute(*ast::tasks::the_program); }
+
+ /* WARNING. It is very tempting to use BOOLEAN_TASK_DECLARE with
+ these stream flags, since it factors out the need for the
+ following routines. Unfortunately when the Tasks are created,
+ not all the misc::xalloc are instantiated, so the registered
+ address of these flags is likely to change if there are other
+ xalloc in between. It is the index that is constant, not the
+ address of the pword.
+
+ Of course we could have Tasks dedicated to misc::xalloc, but
+ that's not nice. */
+
+ void escapes_display() { ast::escapes_display(std::cout) = true; }
+
+} // namespace escapes::tasks