summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2013-02-11 23:00:52 +0000
committerAdrian Thurston <thurston@complang.org>2013-02-11 23:00:52 +0000
commit30f9243c5bbbaab46335d1919da0a1f1a4907ebc (patch)
tree2bb0f861c8e7c59879f092cc0aa42f841170f478
parent563cffb88a6a9d8e60457bd7898c4c941a8b8843 (diff)
downloadcolm-30f9243c5bbbaab46335d1919da0a1f1a4907ebc.tar.gz
split stream::pull into WV and WC
To do this we need to make the call code generation aware of 'isCustom'. The isCustom code gen needs to also respect pd->revertOn.
-rw-r--r--colm/synthesis.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/colm/synthesis.cc b/colm/synthesis.cc
index ad065343..9558e29b 100644
--- a/colm/synthesis.cc
+++ b/colm/synthesis.cc
@@ -607,7 +607,7 @@ void LangVarRef::loadCustom( Compiler *pd, CodeVect &code,
int lastPtrInQual, bool forWriting ) const
{
/* Start the search in the local frame. */
- loadQualification( pd, code, pd->curLocalFrame, lastPtrInQual, forWriting, true );
+ loadQualification( pd, code, pd->curLocalFrame, lastPtrInQual, forWriting, pd->revertOn );
}
void LangVarRef::loadLocalObj( Compiler *pd, CodeVect &code,
@@ -1066,7 +1066,7 @@ void LangVarRef::callOperation( Compiler *pd, CodeVect &code, VarRefLookup &look
/* Check if we need to revert the function. If it operates on a reference
* or if it is not local then we need to revert it. */
- bool revert = lookup.lastPtrInQual >= 0 || !isLocalRef(pd);
+ bool revert = lookup.lastPtrInQual >= 0 || !isLocalRef(pd) || isCustom(pd);
/* The call instruction. */
if ( pd->revertOn && revert ) {
@@ -2531,7 +2531,7 @@ void Compiler::initStreamObject( )
streamLangEl->objectDef = streamObj;
initFunction( uniqueTypeStr, streamObj, "pull",
- IN_INPUT_PULL_WV, IN_INPUT_PULL_WV, uniqueTypeInt, false );
+ IN_INPUT_PULL_WV, IN_INPUT_PULL_WC, uniqueTypeInt, false );
initFunction( uniqueTypeStr, streamObj, "push",
IN_INPUT_PUSH_WV, IN_INPUT_PUSH_WV, uniqueTypeAny, false );
initFunction( uniqueTypeStr, streamObj, "push_ignore",