|
FAUST compiler
0.9.9.6b8
|


Go to the source code of this file.
| Tree addElement | ( | Tree | e, |
| Tree | l1 | ||
| ) |
Definition at line 272 of file list.cpp.
References addElement(), cons(), hd(), isList(), and tl().
Referenced by addElement(), evalIdDef(), list2set(), and ppsig::printrec().
{
if (isList(l)) {
if (e < hd(l)) {
return cons(e,l);
} else if (e == hd(l)) {
return l;
} else {
return cons(hd(l), addElement(e,tl(l)));
}
} else {
return cons(e,nil);
}
}


Definition at line 216 of file list.cpp.
References rconcat(), and reverse().
Referenced by applyList(), and sigCartesianProd().


Definition at line 124 of file list.hh.
References tree().
Referenced by addElement(), addKey(), annotate(), applyList(), collectEqSigs(), concatPath(), declareAutoDoc(), encodeName(), eval(), evalIdDef(), evalPatternList(), evalRule(), evalRuleList(), SourceReader::expandrec(), formatDefinitions(), getBoxType(), label2path(), list1(), list2(), list3(), list4(), listConvert(), listn(), lrange(), main(), makeDefinition(), normalizeLabel(), nwires(), prepareRule(), propagate(), pushEnv(), rconcat(), real_a2sb(), remElement(), removeKey(), replace(), reverse(), revEvalList(), rmap(), setDefProp(), setDifference(), setIntersection(), setUnion(), updateKey(), vec2list(), and yyparse().


| bool getProperty | ( | Tree | t, |
| Tree | key, | ||
| Tree & | val | ||
| ) |
Definition at line 423 of file list.cpp.
References CTree::getProperty().
Referenced by addLayerDef(), annotate(), evalIdDef(), getBoxType(), getColorProperty(), Occurrences::getCount(), getDefFileProp(), getDefLineProp(), getDefNameProperty(), getEvalProperty(), getNumericProperty(), getPMProperty(), getRecursivness(), ScalarCompiler::getSharingCount(), DocCompiler::getSharingCount(), getSigNickname(), getSigOrder(), privatisation(), searchIdDef(), shcount(), sigMap(), sigMapRename(), subst(), and tmap().
{
CTree* pl = t->getProperty(key);
if (pl) {
val = pl;
return true;
} else {
return false;
}
}


Definition at line 133 of file list.hh.
References CTree::branch().
Referenced by addElement(), Description::addGroup(), addKey(), applyList(), boxlistOutputs(), buildBoxAbstr(), checkRulelist(), Klass::closeLoop(), collectDocEqns(), DocCompiler::compileLateq(), SchedulerCompiler::compileMultiSignal(), VectorCompiler::compileMultiSignal(), ScalarCompiler::compileMultiSignal(), concatPath(), copyEnvReplaceDefs(), eval2double(), eval2int(), evalPatternList(), evalRuleList(), SourceReader::expandrec(), ffrestype(), findKey(), formatDefinitions(), ScalarCompiler::generateButton(), ScalarCompiler::generateCheckbox(), ScalarCompiler::generateHBargraph(), ScalarCompiler::generateHSlider(), Compiler::generateMacroInterfaceElements(), ScalarCompiler::generateNumEntry(), Compiler::generateUserInterfaceElements(), ScalarCompiler::generateVBargraph(), ScalarCompiler::generateVSlider(), getBoxType(), getDefFileProp(), getSubSignals(), DocCompiler::getUIDir(), DocCompiler::getUIDocInfos(), infereFFType(), infereSigOrder(), infereSigType(), isBoxNumeric(), isCons(), isElement(), larg2par(), list2set(), list2vec(), makeDefinition(), makeSubFolderChain(), OccMarkup::mark(), normalizePath(), nth(), numericBoxSimplification(), position(), prepareRule(), Compiler::prepareUserInterfaceTree(), boxpp::print(), envpp::print(), printdoccontent(), ppsig::printlabel(), ppsig::printlist(), printlist(), printRule(), printSignal(), pushMultiClosureDefs(), putSubFolder(), rconcat(), recdraw(), remElement(), removeKey(), replace(), reverse(), revEvalList(), rmap(), searchEnv(), setDifference(), setIntersection(), setSigListNickName(), setUnion(), ScalarCompiler::sharingAnalysis(), DocCompiler::sharingAnalysis(), sigToGraph(), standardArgList(), typeAnnotation(), updateKey(), and fullvisitor::visitList().
{ return l->branch(0); }

Definition at line 138 of file list.hh.
References CTree::arity(), and CTree::node().
Referenced by addElement(), collectDocEqns(), DocCompiler::compileLateq(), SchedulerCompiler::compileMultiSignal(), VectorCompiler::compileMultiSignal(), ScalarCompiler::compileMultiSignal(), concatPath(), getSubSignals(), infereFFType(), infereSigOrder(), infereSigType(), initialRecType(), isBefore(), isCons(), isElement(), len(), list2set(), OccMarkup::mark(), normalizeLabel(), nth(), preparePattern(), Compiler::prepareUserInterfaceTree(), ppsig::print(), boxpp::print(), envpp::print(), printdoccontent(), printlist(), printSignal(), rconcat(), recdraw(), remElement(), reverse(), reverseall(), rmap(), searchEnv(), setSigListNickName(), ScalarCompiler::sharingAnalysis(), DocCompiler::sharingAnalysis(), sigToGraph(), standardArgList(), typeAnnotation(), and sigvisitor::visit().


Definition at line 137 of file list.hh.
References CTree::arity(), and CTree::node().
Referenced by Description::addGroup(), addKey(), applyList(), boxlistOutputs(), buildBoxAbstr(), buildBoxAppl(), checkRulelist(), Klass::closeLoop(), concatPath(), copyEnvReplaceDefs(), evalIdDef(), evalPatternList(), evalRuleList(), SourceReader::expandrec(), findKey(), formatDefinitions(), Compiler::generateMacroInterfaceElements(), Compiler::generateUserInterfaceElements(), getBoxType(), getSubSignals(), DocCompiler::getUIDir(), Loop::hasRecDependencyIn(), infereSigOrder(), infereSigType(), isEnvBarrier(), larg2par(), list2vec(), makeDefinition(), makeSubFolderChain(), normalizePath(), position(), preparePattern(), Compiler::prepareUserInterfaceTree(), boxpp::print(), ppsig::printlabel(), ppsig::printlist(), printlist(), printRule(), privatisation(), pushMultiClosureDefs(), putSubFolder(), removeKey(), revEvalList(), setDifference(), setIntersection(), setSigListNickName(), setUnion(), sigMap(), sigMapRename(), subst(), tmap(), updateKey(), and fullvisitor::visitList().

Definition at line 170 of file list.hh.
References CTree::branch().
Referenced by Description::addGroup(), addKey(), evalRule(), findKey(), Compiler::generateUserInterfaceTree(), printRule(), removeKey(), and updateKey().
{ return t->branch(0); }


Definition at line 198 of file list.cpp.
References isList(), and tl().
Referenced by checkRulelist(), evalCase(), ffarity(), ScalarCompiler::generateRec(), DocCompiler::generateRec(), make_pattern_matcher(), makeDefinition(), Symbol::Symbol(), symlistVisit(), and typeAnnotation().


Definition at line 127 of file list.hh.
References cons(), and list0().
Referenced by list2(), sigCartesianProd(), and singleton().


Definition at line 130 of file list.hh.
References cons(), and list3().
Referenced by boxHSlider(), boxNumEntry(), boxVSlider(), sigHSlider(), sigNumEntry(), and sigVSlider().


Definition at line 247 of file list.cpp.
References reverse(), and rmap().
Referenced by preparePattern(), prepareRule(), and prepareRules().


Definition at line 182 of file list.cpp.
References hd(), isList(), nil, and tl().
Referenced by ffargtype(), ffname(), ScalarCompiler::generateFFun(), DocCompiler::generateFFun(), ScalarCompiler::generateRec(), DocCompiler::generateRec(), isBoxHSlider(), isBoxNumEntry(), isBoxVSlider(), isSigHSlider(), isSigNumEntry(), isSigVSlider(), lrange(), and symlistVisit().


Definition at line 154 of file list.cpp.
References CTree::arity(), CTree::branch(), isDouble(), isInt(), isPointer(), isSym(), name(), CTree::node(), print(), and printlist().
Referenced by addLayerDef(), evalerror(), evalremark(), evalwarning(), ScalarCompiler::generateCode(), generateInsideSchema(), infereSigOrder(), infereSigType(), print(), printlist(), and printSignal().
{
int i; double f; Sym s; void* p;
if (printlist(t, out)) return;
Node n = t->node();
if (isInt(n, &i)) fprintf (out, "%d", i);
else if (isDouble(n, &f)) fprintf (out, "%f", f);
else if (isSym(n, &s)) fprintf (out, "%s", name(s));
else if (isPointer(n, &p)) fprintf (out, "#%p", p);
int k = t->arity();
if (k > 0) {
char sep = '[';
for (int i=0; i<k; i++) {
fputc(sep, out); sep = ',';
print(t->branch(i), out);
}
fputc(']', out);
}
}


Definition at line 351 of file list.cpp.
References cons().
Referenced by propagate(), and sigMapRename().


| Tree remElement | ( | Tree | e, |
| Tree | l1 | ||
| ) |
Definition at line 287 of file list.cpp.
References cons(), hd(), isList(), nil, remElement(), and tl().
Referenced by remElement().
{
if (isList(l)) {
if (e < hd(l)) {
return l;
} else if (e == hd(l)) {
return tl(l);
} else {
return cons(hd(l), remElement(e,tl(l)));
}
} else {
return nil;
}
}


| void remProperty | ( | Tree | t, |
| Tree | key | ||
| ) |
Definition at line 240 of file list.cpp.
References cons(), hd(), isList(), nil, and tl().
Referenced by applyList(), collectDocEqns(), concat(), ScalarCompiler::generateButton(), ScalarCompiler::generateCheckbox(), ScalarCompiler::generateHBargraph(), ScalarCompiler::generateHSlider(), ScalarCompiler::generateNumEntry(), ScalarCompiler::generateVBargraph(), ScalarCompiler::generateVSlider(), DocCompiler::getUIDir(), lmap(), make_pattern_matcher(), printdoccontent(), and printPatternError().


| Tree reverseall | ( | Tree | l | ) |
Definition at line 252 of file list.cpp.
References isList(), reverseall(), and rmap().
Referenced by reverseall().
{
return isList(l) ? rmap(reverseall, l) : l;
}


Definition at line 171 of file list.hh.
References CTree::branch().
Referenced by Description::addGroup(), evalRule(), findKey(), Compiler::generateMacroInterfaceElements(), Compiler::generateMacroInterfaceTree(), Compiler::generateUserInterfaceElements(), Compiler::generateUserInterfaceTree(), Compiler::prepareUserInterfaceTree(), and printRule().
{ return t->branch(1); }


Definition at line 356 of file list.cpp.
References hd(), isList(), and tl().
Referenced by propagate(), and sigMapRename().
{
while (isList(env)) {
if (hd(hd(env)) == key) {
v = tl(hd(env));
return true;
}
env = tl(env);
}
return false;
}


| Tree setDifference | ( | Tree | l1, |
| Tree | l2 | ||
| ) |
Definition at line 336 of file list.cpp.
References cons(), hd(), isNil(), setDifference(), and tl().
Referenced by setDifference().
{
if (isNil(A)) return A;
if (isNil(B)) return A;
if (hd(A) == hd(B)) return setDifference(tl(A),tl(B));
if (hd(A) < hd(B)) return cons(hd(A), setDifference(tl(A),B));
/* (hd(A) > hd(B)*/ return setDifference(A,tl(B));
}


| Tree setIntersection | ( | Tree | l1, |
| Tree | l2 | ||
| ) |
Definition at line 327 of file list.cpp.
References cons(), hd(), isNil(), setIntersection(), and tl().
Referenced by Loop::hasRecDependencyIn(), and setIntersection().
{
if (isNil(A)) return A;
if (isNil(B)) return B;
if (hd(A) == hd(B)) return cons(hd(A), setIntersection(tl(A),tl(B)));
if (hd(A) < hd(B)) return setIntersection(tl(A),B);
/* (hd(A) > hd(B)*/ return setIntersection(A,tl(B));
}


| void setProperty | ( | Tree | t, |
| Tree | key, | ||
| Tree | val | ||
| ) |
Definition at line 418 of file list.cpp.
References CTree::setProperty().
Referenced by addLayerDef(), annotate(), computePrivatisation(), copyEnvReplaceDefs(), getBoxType(), getSigOrder(), privatisation(), setColorProperty(), Occurrences::setCount(), setDefNameProperty(), setDefProp(), setEvalProperty(), setNumericProperty(), setPMProperty(), ScalarCompiler::setSharingCount(), DocCompiler::setSharingCount(), setSigNickname(), sigMap(), sigMapRename(), subst(), and tmap().
{
t->setProperty(key, val);
}


Definition at line 317 of file list.cpp.
References cons(), hd(), isNil(), setUnion(), and tl().
Referenced by Loop::absorb(), realeval(), setUnion(), and symlistVisit().
{
if (isNil(A)) return B;
if (isNil(B)) return A;
if (hd(A) == hd(B)) return cons(hd(A), setUnion(tl(A),tl(B)));
if (hd(A) < hd(B)) return cons(hd(A), setUnion(tl(A),B));
/* hd(A) > hd(B) */ return cons(hd(B), setUnion(A,tl(B)));
}


Definition at line 302 of file list.cpp.
References list1().
Referenced by VectorCompiler::generateLoopCode(), and symlistVisit().
{
return list1(e);
}


| Tree substitute | ( | Tree | t, |
| Tree | id, | ||
| Tree | val | ||
| ) |
Definition at line 559 of file list.cpp.
References subst(), and substkey().
Referenced by calcDeBruijn2Sym(), and calcsubstitute().


Definition at line 134 of file list.hh.
References CTree::branch().
Referenced by addElement(), Description::addGroup(), addKey(), applyList(), boxlistOutputs(), buildBoxAbstr(), checkRulelist(), Klass::closeLoop(), collectDocEqns(), DocCompiler::compileLateq(), SchedulerCompiler::compileMultiSignal(), VectorCompiler::compileMultiSignal(), ScalarCompiler::compileMultiSignal(), concatPath(), copyEnvReplaceDefs(), VectorCompiler::CS(), decorateSchema::draw(), evalPatternList(), evalRuleList(), SourceReader::expandrec(), findKey(), formatDefinitions(), ScalarCompiler::generateButton(), ScalarCompiler::generateCheckbox(), ScalarCompiler::generateHBargraph(), ScalarCompiler::generateHSlider(), Compiler::generateMacroInterfaceElements(), ScalarCompiler::generateNumEntry(), Compiler::generateUserInterfaceElements(), ScalarCompiler::generateVBargraph(), ScalarCompiler::generateVSlider(), getBoxType(), getDefLineProp(), getSubSignals(), DocCompiler::getUIDir(), infereFFType(), infereSigOrder(), infereSigType(), initialRecType(), isBefore(), isCons(), isElement(), larg2par(), len(), list2set(), list2vec(), makeDefinition(), makeSubFolderChain(), OccMarkup::mark(), normalizePath(), nth(), position(), prepareRule(), Compiler::prepareUserInterfaceTree(), boxpp::print(), envpp::print(), printdoccontent(), ppsig::printlabel(), ppsig::printlist(), printlist(), printRule(), printSignal(), pushMultiClosureDefs(), putSubFolder(), rconcat(), recdraw(), remElement(), removeKey(), replace(), reverse(), revEvalList(), rmap(), searchEnv(), setDifference(), setIntersection(), setSigListNickName(), setUnion(), ScalarCompiler::sharingAnalysis(), DocCompiler::sharingAnalysis(), sigToGraph(), standardArgList(), typeAnnotation(), updateKey(), and fullvisitor::visitList().
{ return l->branch(1); }

Definition at line 445 of file list.cpp.
References CTree::arity(), CTree::branch(), getProperty(), isNil(), nil, CTree::node(), setProperty(), tmap(), and tree().
Referenced by tmap().
{
//printf("start tmap\n");
Tree p;
if (getProperty(t, key, p)) {
return (isNil(p)) ? t : p; // truc pour eviter les boucles
} else {
Tree r1=nil;
switch (t->arity()) {
case 0 :
r1 = t;
break;
case 1 :
r1 = tree(t->node(), tmap(key,f,t->branch(0)));
break;
case 2 :
r1 = tree(t->node(), tmap(key,f,t->branch(0)), tmap(key,f,t->branch(1)));
break;
case 3 :
r1 = tree(t->node(), tmap(key,f,t->branch(0)), tmap(key,f,t->branch(1)),
tmap(key,f,t->branch(2)));
break;
case 4 :
r1 = tree(t->node(), tmap(key,f,t->branch(0)), tmap(key,f,t->branch(1)),
tmap(key,f,t->branch(2)), tmap(key,f,t->branch(3)));
break;
}
Tree r2 = f(r1);
if (r2 == t) {
setProperty(t, key, nil);
} else {
setProperty(t, key, r2);
}
return r2;
}
}


Definition at line 116 of file list.cpp.
Referenced by addKey(), apply_pattern_matcher(), applyList(), boxPropagateSig(), collectEqSigs(), computePrivatisation(), concatPath(), copyEnvReplaceDefs(), declareAutoDoc(), eval2double(), eval2int(), evalCase(), evaldocexpr(), evalIdDef(), evalPattern(), evalPatternList(), evalprocess(), evalRuleList(), SourceReader::expandlist(), formatDefinitions(), getBoxType(), getFolder(), isBoxNumeric(), label2path(), list0(), list2set(), listConvert(), listn(), lrange(), main(), make_pattern_matcher(), makeDefinition(), mapPrepareEqSig(), OccMarkup::mark(), nth(), numericBoxSimplification(), nwires(), privatisation(), pushMultiClosureDefs(), real_a2sb(), realeval(), recursivnessAnnotation(), remElement(), removeKey(), reverse(), revEvalList(), rmap(), sigMap(), sigMapRename(), sigReadOnlyTable(), sigWriteReadTable(), subst(), symlistVisit(), tmap(), updateKey(), vec2list(), and yyparse().
1.8.0