|
FAUST compiler
0.9.9.6b8
|


Public Member Functions | |
| FloorPrim () | |
| virtual unsigned int | arity () |
| virtual bool | needCache () |
| virtual Type | infereSigType (const vector< Type > &args) |
| virtual void | sigVisit (Tree sig, sigvisitor *visitor) |
| virtual int | infereSigOrder (const vector< int > &args) |
| virtual Tree | computeSigOutput (const vector< Tree > &args) |
| virtual string | generateCode (Klass *klass, const vector< string > &args, const vector< Type > &types) |
| virtual string | generateLateq (Lateq *lateq, const vector< string > &args, const vector< Type > &types) |
Definition at line 7 of file floorprim.cpp.
| FloorPrim::FloorPrim | ( | ) | [inline] |
Definition at line 12 of file floorprim.cpp.
: xtended("floor") {}
| virtual unsigned int FloorPrim::arity | ( | ) | [inline, virtual] |
Implements xtended.
Definition at line 14 of file floorprim.cpp.
Referenced by computeSigOutput(), generateCode(), generateLateq(), infereSigOrder(), and infereSigType().
{ return 1; }

| virtual Tree FloorPrim::computeSigOutput | ( | const vector< Tree > & | args | ) | [inline, virtual] |
Implements xtended.
Definition at line 32 of file floorprim.cpp.
References arity(), isNum(), xtended::symbol(), and tree().
{
num n;
assert (args.size() == arity());
if (isNum(args[0],n)) {
return tree(floor(double(n)));
} else {
return tree(symbol(), args[0]);
}
}

| virtual string FloorPrim::generateCode | ( | Klass * | klass, |
| const vector< string > & | args, | ||
| const vector< Type > & | types | ||
| ) | [inline, virtual] |
| virtual string FloorPrim::generateLateq | ( | Lateq * | lateq, |
| const vector< string > & | args, | ||
| const vector< Type > & | types | ||
| ) | [inline, virtual] |
| virtual int FloorPrim::infereSigOrder | ( | const vector< int > & | args | ) | [inline, virtual] |
Implements xtended.
Definition at line 26 of file floorprim.cpp.
References arity().
{
assert (args.size() == arity());
return args[0];
}

| virtual Type FloorPrim::infereSigType | ( | const vector< Type > & | args | ) | [inline, virtual] |
Implements xtended.
Definition at line 18 of file floorprim.cpp.
References arity(), and floatCast().

| virtual bool FloorPrim::needCache | ( | ) | [inline, virtual] |
| virtual void FloorPrim::sigVisit | ( | Tree | sig, |
| sigvisitor * | visitor | ||
| ) | [inline, virtual] |
Definition at line 24 of file floorprim.cpp.
{}
1.8.0