diff options
author | Adrian Thurston <thurston@complang.org> | 2015-01-04 10:01:23 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-01-04 10:01:23 -0500 |
commit | bce5c95fa055b7523349e1824d906b0debe4178e (patch) | |
tree | bb98a0054fec999c405c6d0f30bf8099cf6283de /src/pdabuild.cc | |
parent | 650b70f4a55af12ee1ebb22a9afdd9fba7a3b626 (diff) | |
download | colm-bce5c95fa055b7523349e1824d906b0debe4178e.tar.gz |
don't allocate a constructor for parse statements
Just need a consItemList for the list of items we are going to parse.
Diffstat (limited to 'src/pdabuild.cc')
-rw-r--r-- | src/pdabuild.cc | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/src/pdabuild.cc b/src/pdabuild.cc index c8db886b..29f71be9 100644 --- a/src/pdabuild.cc +++ b/src/pdabuild.cc @@ -1810,11 +1810,9 @@ void Compiler::fillInPatterns( Program *prg ) } for ( ConsList::Iter repl = replList; repl.lte(); repl++ ) { - if ( repl->langEl != 0 ) { - countNodes( prg, count, - repl->pdaRun->stackTop->next, - repl->pdaRun->stackTop->next->shadow ); - } + countNodes( prg, count, + repl->pdaRun->stackTop->next, + repl->pdaRun->stackTop->next->shadow ); } runtimeData->patReplNodes = new PatConsNode[count]; @@ -1840,21 +1838,19 @@ void Compiler::fillInPatterns( Program *prg ) } for ( ConsList::Iter repl = replList; repl.lte(); repl++ ) { - if ( repl->langEl != 0 ) { - int ind = nextAvail++; - runtimeData->patReplInfo[repl->patRepId].offset = ind; + int ind = nextAvail++; + runtimeData->patReplInfo[repl->patRepId].offset = ind; - /* BindIds are indexed base one. */ - runtimeData->patReplInfo[repl->patRepId].numBindings = - repl->pdaRun->bindings->length() - 1; + /* BindIds are indexed base one. */ + runtimeData->patReplInfo[repl->patRepId].numBindings = + repl->pdaRun->bindings->length() - 1; - long bindId = 1; - fillNodes( prg, nextAvail, repl->pdaRun->bindings, bindId, - runtimeData->patReplNodes, - repl->pdaRun->stackTop->next, - repl->pdaRun->stackTop->next->shadow, - ind ); - } + long bindId = 1; + fillNodes( prg, nextAvail, repl->pdaRun->bindings, bindId, + runtimeData->patReplNodes, + repl->pdaRun->stackTop->next, + repl->pdaRun->stackTop->next->shadow, + ind ); } assert( nextAvail == count ); |