summaryrefslogtreecommitdiff
path: root/src/pdacodegen.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2014-12-20 12:07:22 -0500
committerAdrian Thurston <thurston@complang.org>2014-12-20 12:07:22 -0500
commit9153bb402e7f18df2c600a716021e004438aaf1e (patch)
tree07f0101a684424b80ea78790260d09fe43d167e9 /src/pdacodegen.cc
parent0b6d8c987f90868c6fc6ed1aa3346d6cd10201aa (diff)
downloadcolm-9153bb402e7f18df2c600a716021e004438aaf1e.tar.gz
added structElInfo to the runtime data
Storing size and can add trees offsets for downreffing on free.
Diffstat (limited to 'src/pdacodegen.cc')
-rw-r--r--src/pdacodegen.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pdacodegen.cc b/src/pdacodegen.cc
index c41f4012..96b1df1a 100644
--- a/src/pdacodegen.cc
+++ b/src/pdacodegen.cc
@@ -198,6 +198,17 @@ void PdaCodeGen::writeRuntimeData( RuntimeData *runtimeData, PdaTables *pdaTable
out << "\n};\n\n";
/*
+ * selInfo
+ */
+ out << "static StructElInfo " << selInfo() << "[] = {\n";
+ for ( int i = 0; i < runtimeData->numStructEls; i++ ) {
+ out << "\t{ ";
+ out << runtimeData->selInfo[i].size << ", ";
+ out << " }";
+ }
+ out << "\n};\n\n";
+
+ /*
* frameInfo
*/
out << "static FrameInfo " << frameInfo() << "[] = {\n";
@@ -410,6 +421,9 @@ void PdaCodeGen::writeRuntimeData( RuntimeData *runtimeData, PdaTables *pdaTable
" " << lelInfo() << ",\n"
" " << runtimeData->numLangEls << ",\n"
"\n"
+ " " << selInfo() << ",\n"
+ " " << runtimeData->numStructEls << ",\n"
+ "\n"
" " << prodInfo() << ",\n"
" " << runtimeData->numProds << ",\n"
"\n"