summaryrefslogtreecommitdiff
path: root/src/pdabuild.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdabuild.cc')
-rw-r--r--src/pdabuild.cc30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/pdabuild.cc b/src/pdabuild.cc
index 27cd9616..824db1e6 100644
--- a/src/pdabuild.cc
+++ b/src/pdabuild.cc
@@ -1682,6 +1682,36 @@ void Compiler::makeRuntimeData()
runtimeData->global_size = globalObjectDef->size();
/*
+ * Exports.
+ */
+ count = 0;
+ for ( FieldList::Iter of = globalObjectDef->fieldList; of.lte(); of++ ) {
+ ObjectField *field = of->value;
+ if ( field->isExport ) {
+ count += 1;
+ }
+ }
+
+ runtimeData->num_exports = count;
+ if ( count == 0 ) {
+ runtimeData->export_info = 0;
+ }
+ else {
+ runtimeData->export_info = new export_info[count];
+
+ long i = 0;
+ for ( FieldList::Iter of = globalObjectDef->fieldList; of.lte(); of++ ) {
+ ObjectField *field = of->value;
+ if ( field->isExport ) {
+ runtimeData->export_info[i].name = strdup( field->name );
+ runtimeData->export_info[i].global_id = field->offset;
+ i += 1;
+ }
+ }
+ }
+
+
+ /*
* Boundary between terms and non-terms.
*/
runtimeData->first_non_term_id = firstNonTermId;