diff options
author | Adrian Thurston <thurston@complang.org> | 2015-01-17 09:47:22 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-01-17 09:47:22 -0500 |
commit | 46ec944af0047c5dddd5d413a22fcea4c44c4f10 (patch) | |
tree | 4c904a9276d1f8f08c8b40ac8b7a49af55d80314 /src/resolve.cc | |
parent | 1a426568f512691be1c16ef06ea7f156f9002f6e (diff) | |
download | colm-46ec944af0047c5dddd5d413a22fcea4c44c4f10.tar.gz |
setting the map el size
Diffstat (limited to 'src/resolve.cc')
-rw-r--r-- | src/resolve.cc | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/resolve.cc b/src/resolve.cc index 3e0ca899..c6f45076 100644 --- a/src/resolve.cc +++ b/src/resolve.cc @@ -193,23 +193,9 @@ UniqueType *TypeRef::resolveTypeMap( Compiler *pd ) } } - /* Find the key field (named Key). */ - ObjectField *keyEl = 0; - fieldList = utEl->structEl->structDef->objectDef->fieldList; - for ( FieldList::Iter f = *fieldList; f.lte(); f++ ) { - UniqueType *fUT = f->value->typeRef->resolveType( pd ); - if ( fUT->typeId == TYPE_TREE && strcmp( f->value->name, "Key" ) == 0 ) { - keyEl = f->value; - break; - } - } - if ( !mapEl ) error( loc ) << "could not find list element in type ref" << endp; - if ( !keyEl ) - error( loc ) << "could not find Key in type ref" << endp; - UniqueGeneric searchKey( UniqueGeneric::Map, utKey, utEl ); UniqueGeneric *inMap = pd->uniqueGenericMap.find( &searchKey ); if ( inMap == 0 ) { @@ -220,7 +206,6 @@ UniqueType *TypeRef::resolveTypeMap( Compiler *pd ) pd->nextGenericId++, typeRef2 ); generic->keyTypeArg = typeRef1; generic->el = mapEl; - generic->keyEl = mapEl; nspace->genericList.append( generic ); @@ -774,6 +759,7 @@ void Compiler::resolveProductionEls() } } +/* Is this necessary? */ void Compiler::resolveGenericTypes() { for ( NamespaceList::Iter ns = namespaceList; ns.lte(); ns++ ) { @@ -852,8 +838,6 @@ void Compiler::resolvePass() resolveParseTree(); - resolveGenericTypes(); - argvTypeRef->resolveType( this ); /* We must do this as the last step in the type resolution process because |