summaryrefslogtreecommitdiff
path: root/src/exports.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2015-08-08 11:40:19 -0400
committerAdrian Thurston <thurston@complang.org>2015-08-08 11:40:19 -0400
commit42314c5f0f87c45f6968c7c8fcfbfb8eae9f8ad6 (patch)
treeb5d7d144fe4be7181e3cd4c4292ef9efd6b2805e /src/exports.cc
parent835c359b551831b8272dc71e5feaf702aa189576 (diff)
downloadcolm-42314c5f0f87c45f6968c7c8fcfbfb8eae9f8ad6.tar.gz
moved MethodMap into NameScope, converted some ptrs to objs
Diffstat (limited to 'src/exports.cc')
-rw-r--r--src/exports.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/exports.cc b/src/exports.cc
index f32e5a2f..b5b2f7a6 100644
--- a/src/exports.cc
+++ b/src/exports.cc
@@ -118,9 +118,9 @@ void Compiler::generateExports()
out << " " << lel->fullName <<
"( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}\n";
- if ( lel->objectDef != 0 && lel->objectDef->fieldList != 0 ) {
- FieldList *fieldList = lel->objectDef->fieldList;
- for ( FieldList::Iter ofi = *fieldList; ofi.lte(); ofi++ ) {
+ if ( lel->objectDef != 0 ) {
+ FieldList &fieldList = lel->objectDef->fieldList;
+ for ( FieldList::Iter ofi = fieldList; ofi.lte(); ofi++ ) {
ObjectField *field = ofi->value;
if ( ( field->useOffset() && field->typeRef != 0 ) || field->isRhsGet() ) {
UniqueType *ut = field->typeRef->resolveType( this );
@@ -167,7 +167,7 @@ void Compiler::generateExports()
out << "\n";
}
- for ( FieldList::Iter of = *globalObjectDef->fieldList; of.lte(); of++ ) {
+ for ( FieldList::Iter of = globalObjectDef->fieldList; of.lte(); of++ ) {
ObjectField *field = of->value;
if ( field->isExport ) {
UniqueType *ut = field->typeRef->resolveType(this);
@@ -206,9 +206,9 @@ void Compiler::generateExportsImpl()
/* Function implementations. */
for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
- if ( lel->objectDef != 0 && lel->objectDef->fieldList != 0 ) {
- FieldList *fieldList = lel->objectDef->fieldList;
- for ( FieldList::Iter ofi = *fieldList; ofi.lte(); ofi++ ) {
+ if ( lel->objectDef != 0 ) {
+ FieldList &fieldList = lel->objectDef->fieldList;
+ for ( FieldList::Iter ofi = fieldList; ofi.lte(); ofi++ ) {
ObjectField *field = ofi->value;
if ( field->useOffset() && field->typeRef != 0 ) {
UniqueType *ut = field->typeRef->resolveType( this );
@@ -265,7 +265,7 @@ void Compiler::generateExportsImpl()
out << "\n";
- for ( FieldList::Iter of = *globalObjectDef->fieldList; of.lte(); of++ ) {
+ for ( FieldList::Iter of = globalObjectDef->fieldList; of.lte(); of++ ) {
ObjectField *field = of->value;
if ( field->isExport ) {
UniqueType *ut = field->typeRef->resolveType(this);