diff options
author | Adrian Thurston <thurston@complang.org> | 2014-12-20 12:07:22 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2014-12-20 12:07:22 -0500 |
commit | 9153bb402e7f18df2c600a716021e004438aaf1e (patch) | |
tree | 07f0101a684424b80ea78790260d09fe43d167e9 /src/pdacodegen.cc | |
parent | 0b6d8c987f90868c6fc6ed1aa3346d6cd10201aa (diff) | |
download | colm-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.cc | 14 |
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" |