summaryrefslogtreecommitdiff
path: root/src/synthesis.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2018-05-15 18:25:10 -0400
committerAdrian Thurston <thurston@colm.net>2018-05-15 18:25:10 -0400
commit03055b165a5453053c014a45cc2bc4c4af7ff359 (patch)
tree532ebab4fa0bd2d9af2f6e119aebfa038b20d927 /src/synthesis.cc
parente9e58383d07766cc9721b6a1efd1b46facf0fffa (diff)
downloadcolm-03055b165a5453053c014a45cc2bc4c4af7ff359.tar.gz
merged the WC and WV versions of SEND TEXT, TREE, STREAM
The SEND_EOF instruction was already in merged form.
Diffstat (limited to 'src/synthesis.cc')
-rw-r--r--src/synthesis.cc48
1 files changed, 12 insertions, 36 deletions
diff --git a/src/synthesis.cc b/src/synthesis.cc
index 08f120dc..5af50863 100644
--- a/src/synthesis.cc
+++ b/src/synthesis.cc
@@ -1565,24 +1565,12 @@ UniqueType *LangTerm::evaluateParse( Compiler *pd, CodeVect &code,
break;
}}
- if ( isStream ) {
- if ( pd->revertOn )
- code.append( IN_SEND_STREAM_WV );
- else
- code.append( IN_SEND_STREAM_WC );
- }
- else if ( tree ) {
- if ( pd->revertOn )
- code.append( IN_SEND_TREE_WV );
- else
- code.append( IN_SEND_TREE_WC );
- }
- else {
- if ( pd->revertOn )
- code.append( IN_SEND_TEXT_WV );
- else
- code.append( IN_SEND_TEXT_WC );
- }
+ if ( isStream )
+ code.append( IN_SEND_STREAM_W );
+ else if ( tree )
+ code.append( IN_SEND_TREE_W );
+ else
+ code.append( IN_SEND_TEXT_W );
/* Parse instruction, dependent on whether or not we are producing
* revert or commit code. */
@@ -1678,24 +1666,12 @@ void LangTerm::evaluateSendParser( Compiler *pd, CodeVect &code, bool strings )
break;
}
- if ( isStream ) {
- if ( pd->revertOn )
- code.append( IN_SEND_STREAM_WV );
- else
- code.append( IN_SEND_STREAM_WC );
- }
- else if ( !strings ) {
- if ( pd->revertOn )
- code.append( IN_SEND_TREE_WV );
- else
- code.append( IN_SEND_TREE_WC );
- }
- else {
- if ( pd->revertOn )
- code.append( IN_SEND_TEXT_WV );
- else
- code.append( IN_SEND_TEXT_WC );
- }
+ if ( isStream )
+ code.append( IN_SEND_STREAM_W );
+ else if ( !strings )
+ code.append( IN_SEND_TREE_W );
+ else
+ code.append( IN_SEND_TEXT_W );
parseFrag( pd, code, 0 );
}