diff options
author | Adrian Thurston <thurston@complang.org> | 2015-04-01 10:24:42 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-04-01 10:24:42 -0400 |
commit | 24e144ea5fd1275bf6c864455b2dd4d96e589363 (patch) | |
tree | 5c35d484904e32626a862bd5784b882a4f27d4b8 /src/resolve.cc | |
parent | 03e0f380a472db828c3bd5ae481a6b1c10fed3d0 (diff) | |
download | colm-24e144ea5fd1275bf6c864455b2dd4d96e589363.tar.gz |
first cut of C extensions
Diffstat (limited to 'src/resolve.cc')
-rw-r--r-- | src/resolve.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/resolve.cc b/src/resolve.cc index 5f8bfaa4..90a35b60 100644 --- a/src/resolve.cc +++ b/src/resolve.cc @@ -780,6 +780,16 @@ void Compiler::resolveFunction( Function *func ) block->resolve( this ); } +void Compiler::resolveInHost( Function *func ) +{ + if ( func->typeRef != 0 ) + func->typeRef->resolveType( this ); + + for ( ParameterList::Iter param = *func->paramList; param.lte(); param++ ) + param->typeRef->resolveType( this ); +} + + void Compiler::resolvePreEof( TokenRegion *region ) { CodeBlock *block = region->preEofBlock; @@ -810,6 +820,9 @@ void Compiler::resolveParseTree() for ( FunctionList::Iter f = functionList; f.lte(); f++ ) resolveFunction( f ); + for ( FunctionList::Iter f = inHostList; f.lte(); f++ ) + resolveInHost( f ); + /* Compile the reduction code. */ for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) { if ( prod->redBlock != 0 ) |