summaryrefslogtreecommitdiff
path: root/src/runtime/c/pgf/linearizer.c
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2017-05-23 21:06:17 +0000
committerkrasimir <krasimir@chalmers.se>2017-05-23 21:06:17 +0000
commitcb67a24c99c9490074cd62a1fa8cd9e0ac45c948 (patch)
treef33a64c3a0ae8fd4e61d4c0751ec929f44cfea6f /src/runtime/c/pgf/linearizer.c
parent622274180af2e3bd64ced3e191319dc5be3aa4d1 (diff)
an optimized expression extraction in the lookup
Diffstat (limited to 'src/runtime/c/pgf/linearizer.c')
-rw-r--r--src/runtime/c/pgf/linearizer.c40
1 files changed, 1 insertions, 39 deletions
diff --git a/src/runtime/c/pgf/linearizer.c b/src/runtime/c/pgf/linearizer.c
index 30dab086d..68a2e1415 100644
--- a/src/runtime/c/pgf/linearizer.c
+++ b/src/runtime/c/pgf/linearizer.c
@@ -70,44 +70,6 @@ typedef struct {
} PgfCnc;
-//
-// PgfCncTree
-//
-
-typedef enum {
- PGF_CNC_TREE_APP,
- PGF_CNC_TREE_CHUNKS,
- PGF_CNC_TREE_LIT,
-} PgfCncTreeTag;
-
-typedef struct {
- PgfCCat* ccat;
- PgfCncFun* fun;
- int fid;
-
- size_t n_vars;
- PgfPrintContext* context;
-
- size_t n_args;
- PgfCncTree args[];
-} PgfCncTreeApp;
-
-typedef struct {
- size_t n_vars;
- PgfPrintContext* context;
-
- size_t n_args;
- PgfCncTree args[];
-} PgfCncTreeChunks;
-
-typedef struct {
- size_t n_vars;
- PgfPrintContext* context;
-
- int fid;
- PgfLiteral lit;
-} PgfCncTreeLit;
-
#ifdef PGF_LINEARIZER_DEBUG
static void
pgf_print_cnc_tree_vars(size_t n_vars, PgfPrintContext* context,
@@ -128,7 +90,7 @@ pgf_print_cnc_tree_vars(size_t n_vars, PgfPrintContext* context,
}
}
-static void
+PGF_INTERNAL void
pgf_print_cnc_tree(PgfCncTree ctree, GuOut* out, GuExn* err)
{
GuVariantInfo ti = gu_variant_open(ctree);