summaryrefslogtreecommitdiff
path: root/src/pdabuild.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2018-06-15 11:34:13 +0700
committerAdrian Thurston <thurston@colm.net>2018-06-15 11:35:10 +0700
commitd5e0774c3b986bf58a7faff0e2ea1c56928a260b (patch)
tree6e77f64ce132cfa792713e0e10afe19a32476484 /src/pdabuild.cc
parent75ea06cbf7c922c0bdbc717c2bb7882f06e7ac68 (diff)
downloadcolm-d5e0774c3b986bf58a7faff0e2ea1c56928a260b.tar.gz
pass prg to colm_tree_upref and maintian first struct id
Diffstat (limited to 'src/pdabuild.cc')
-rw-r--r--src/pdabuild.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/pdabuild.cc b/src/pdabuild.cc
index 4146e389..1760c9ba 100644
--- a/src/pdabuild.cc
+++ b/src/pdabuild.cc
@@ -240,6 +240,8 @@ void Compiler::makeLangElIds()
void Compiler::makeStructElIds()
{
+ firstStructElId = nextLelId;
+
/* Start at the next lang el id and go up from there. Using disjoint sets
* allows us to verify that a tree is a tree and struct is a struct because
* the ID field is at the same offset. */
@@ -1678,10 +1680,15 @@ void Compiler::makeRuntimeData()
runtimeData->global_size = globalObjectDef->size();
/*
- * firstNonTermId
+ * Boundary between terms and non-terms.
*/
runtimeData->first_non_term_id = firstNonTermId;
+ /*
+ * Boundary between trees and structs
+ */
+ runtimeData->first_struct_el_id = firstStructElId;
+
/* Special trees. */
runtimeData->integer_id = -1; //intLangEl->id;
runtimeData->string_id = strLangEl->id;