FAUST compiler  0.9.9.6b8
Functions | Variables
prim2.cpp File Reference
#include "prim2.hh"
#include "stdlib.h"
Include dependency graph for prim2.cpp:

Go to the source code of this file.

Functions

Tree ffunction (Tree signature, Tree incfile, Tree libfile)
bool isffunction (Tree t)
Tree ffsignature (Tree ff)
const char * ffincfile (Tree ff)
const char * fflibfile (Tree ff)
int ffrestype (Tree t)
const char * ffname (Tree t)
int ffarity (Tree t)
int ffargtype (Tree t, int i)

Variables

Sym FFUN = symbol ("ForeignFunction")

Function Documentation

int ffargtype ( Tree  t,
int  i 
)

Definition at line 69 of file prim2.cpp.

References ffsignature(), nth(), and tree2int().

{
    return tree2int(nth(ffsignature(t), i+2));
}

Here is the call graph for this function:

int ffarity ( Tree  t)

Definition at line 64 of file prim2.cpp.

References ffsignature(), and len().

Referenced by ScalarCompiler::generateFFun(), DocCompiler::generateFFun(), generateInsideSchema(), infereBoxType(), infereFFType(), and propagate().

{
    return len(ffsignature(t))-2;
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* ffincfile ( Tree  ff)

Definition at line 44 of file prim2.cpp.

References CTree::branch(), and tree2str().

Referenced by ScalarCompiler::generateFFun().

{
    return tree2str(ff->branch(1));
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* fflibfile ( Tree  ff)

Definition at line 49 of file prim2.cpp.

References CTree::branch(), and tree2str().

Referenced by ScalarCompiler::generateFFun().

{
    return tree2str(ff->branch(2));
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* ffname ( Tree  t)

Definition at line 59 of file prim2.cpp.

References ffsignature(), nth(), and tree2str().

Referenced by ScalarCompiler::generateFFun(), DocCompiler::generateFFun(), generateInsideSchema(), boxpp::print(), and ppsig::printff().

{
    return tree2str(nth(ffsignature(t),1));
}

Here is the call graph for this function:

Here is the caller graph for this function:

int ffrestype ( Tree  t)

Definition at line 54 of file prim2.cpp.

References ffsignature(), hd(), and tree2int().

Referenced by infereFFType().

{
    return tree2int(hd(ffsignature(t)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 39 of file prim2.cpp.

References CTree::branch().

Referenced by ffargtype(), ffarity(), ffname(), and ffrestype().

{ 
    return ff->branch(0); 
}

Here is the call graph for this function:

Here is the caller graph for this function:

Tree ffunction ( Tree  signature,
Tree  incfile,
Tree  libfile 
)

Definition at line 29 of file prim2.cpp.

References tree().

Referenced by yyparse().

{
    return tree(FFUN, signature, incfile, libfile);
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool isffunction ( Tree  t)

Definition at line 34 of file prim2.cpp.

References CTree::node().

{
    return t->node() == Node(FFUN); 
}

Here is the call graph for this function:


Variable Documentation

Sym FFUN = symbol ("ForeignFunction")

Definition at line 27 of file prim2.cpp.