diff options
-rw-r--r-- | colm/synthesis.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/colm/synthesis.cc b/colm/synthesis.cc index 88bdbee1..c9b0c358 100644 --- a/colm/synthesis.cc +++ b/colm/synthesis.cc @@ -1959,6 +1959,13 @@ void LangVarRef::assignValue( Compiler *pd, CodeVect &code, UniqueType *LangTerm::evaluateMakeToken( Compiler *pd, CodeVect &code ) const { + bool resetContiguous = false; + if ( !pd->inContiguous ) { + code.append( IN_CONTIGUOUS ); + code.appendHalf( 512 ); + pd->inContiguous = true; + resetContiguous = true; + } // if ( pd->compileContext != Compiler::CompileTranslation ) // error(loc) << "make_token can be used only in a translation block" << endp; @@ -1982,6 +1989,9 @@ UniqueType *LangTerm::evaluateMakeToken( Compiler *pd, CodeVect &code ) const code.append( IN_MAKE_TOKEN ); code.append( args->length() ); + if ( resetContiguous ) + pd->inContiguous = false; + return pd->uniqueTypeAny; } @@ -2179,6 +2189,9 @@ void LangStmt::compileForIter( Compiler *pd, CodeVect &code ) const code.appendHalf( searchUT->langEl->id ); } + if ( resetContiguous ) + pd->inContiguous = false; + compileForIterBody( pd, code, iterUT ); iterCallTerm->varRef->popRefQuals( pd, code, lookup, iterCallTerm->args ); @@ -2187,9 +2200,6 @@ void LangStmt::compileForIter( Compiler *pd, CodeVect &code ) const delete[] paramRefs; pd->curLocalFrame->iterPopScope(); - - if ( resetContiguous ) - pd->inContiguous = false; } void LangStmt::compileWhile( Compiler *pd, CodeVect &code ) const |