summaryrefslogtreecommitdiff
path: root/src/declare.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2015-02-14 12:39:47 -0500
committerAdrian Thurston <thurston@complang.org>2015-02-14 12:39:47 -0500
commitf0089542330fa9ff580faf2e69f18bd6f7367e50 (patch)
treef5c70455c236ae7049a743f7cd61cbf1e8ef6663 /src/declare.cc
parente730b33092cb1e2ce3e8bf8d54133d6e2b92a643 (diff)
downloadcolm-f0089542330fa9ff580faf2e69f18bd6f7367e50.tar.gz
implementing vlist functions
Diffstat (limited to 'src/declare.cc')
-rw-r--r--src/declare.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/declare.cc b/src/declare.cc
index 9534feb5..edb2fab7 100644
--- a/src/declare.cc
+++ b/src/declare.cc
@@ -359,7 +359,7 @@ void GenericType::declare( Compiler *pd, Namespace *nspace )
if ( typeId == GEN_MAP || typeId == GEN_VMAP )
keyUt = keyTr->resolveType( pd );
- if ( typeId == GEN_VMAP )
+ if ( typeId == GEN_VMAP || typeId == GEN_VLIST )
valueUt = valueTr->resolveType( pd );
objDef = ObjectDef::cons( ObjectDef::BuiltinType,
@@ -1169,22 +1169,22 @@ void Compiler::initListFunctions( GenericType *gen )
void Compiler::initValueListFunctions( GenericType *gen )
{
initFunction( uniqueTypeInt, gen->objDef, "push_head",
- IN_LIST_PUSH_HEAD_WV, IN_LIST_PUSH_HEAD_WC, gen->elUt, false, true, gen );
+ IN_VLIST_PUSH_HEAD_WV, IN_VLIST_PUSH_HEAD_WC, gen->valueUt, false, true, gen );
initFunction( uniqueTypeInt, gen->objDef, "push_tail",
- IN_LIST_PUSH_TAIL_WV, IN_LIST_PUSH_TAIL_WC, gen->elUt, false, true, gen );
+ IN_VLIST_PUSH_TAIL_WV, IN_VLIST_PUSH_TAIL_WC, gen->valueUt, false, true, gen );
initFunction( uniqueTypeInt, gen->objDef, "push",
- IN_LIST_PUSH_HEAD_WV, IN_LIST_PUSH_HEAD_WC, gen->elUt, false, true, gen );
+ IN_VLIST_PUSH_HEAD_WV, IN_VLIST_PUSH_HEAD_WC, gen->valueUt, false, true, gen );
- initFunction( gen->elUt, gen->objDef, "pop_head",
- IN_LIST_POP_HEAD_WV, IN_LIST_POP_HEAD_WC, false, true, gen );
+ initFunction( gen->valueUt, gen->objDef, "pop_head",
+ IN_VLIST_POP_HEAD_WV, IN_VLIST_POP_HEAD_WC, false, true, gen );
- initFunction( gen->elUt, gen->objDef, "pop_tail",
- IN_LIST_POP_TAIL_WV, IN_LIST_POP_TAIL_WC, false, true, gen );
+ initFunction( gen->valueUt, gen->objDef, "pop_tail",
+ IN_VLIST_POP_TAIL_WV, IN_VLIST_POP_TAIL_WC, false, true, gen );
- initFunction( gen->elUt, gen->objDef, "pop",
- IN_LIST_POP_HEAD_WV, IN_LIST_POP_HEAD_WC, false, true, gen );
+ initFunction( gen->valueUt, gen->objDef, "pop",
+ IN_VLIST_POP_HEAD_WV, IN_VLIST_POP_HEAD_WC, false, true, gen );
}
void Compiler::initListElField( GenericType *gen, const char *name, int offset )