Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Defines
fpoptimizer.cpp File Reference
#include "fpconfig.h"
#include "fparser.h"
#include "fptypes.h"
#include <cmath>
#include <list>
#include <utility>
#include <cassert>

Go to the source code of this file.

Defines

#define M_PI   3.1415926535897932384626433832795
#define CONSTANT_E   2.71828182845904509080
#define CONSTANT_PI   M_PI
#define CONSTANT_L10   2.30258509299404590109
#define CONSTANT_L10I   0.43429448190325176116
#define CONSTANT_L10E   CONSTANT_L10I
#define CONSTANT_L10EI   CONSTANT_L10
#define CONSTANT_DR   (180.0 / M_PI)
#define CONSTANT_RD   (M_PI / 180.0)
#define CHECKCONSTNEG(item, op)
#define ConstantUnaryFun(token, fun)
#define ConstantBinaryFun(token, fun)
#define AddCmd(op)   byteCode.push_back((op))
#define AddConst(v)
#define SubTreeDecl(p1, p2)   SubTree::SubTree p1 : tree(new CodeTree p2), sign(false) { }
#define GROW(n)
#define EAT(n, opcode)
#define ADDCONST(n)

Define Documentation

#define AddCmd (   op)    byteCode.push_back((op))
#define AddConst (   v)
Value:
do { \
        byteCode.push_back(cImmed); \
        immed.push_back((v)); \
    } while(0)
#define ADDCONST (   n)
Value:
do { \
        stack[stacktop].SetImmed((n)); \
        GROW(1); \
    } while(0)
#define CHECKCONSTNEG (   item,
  op 
)
Value:
((op)==cMul) \
       ? (item).CheckConstInv() \
       : (item).CheckConstNeg()

Definition at line 243 of file fpoptimizer.cpp.

#define CONSTANT_DR   (180.0 / M_PI)

Definition at line 47 of file fpoptimizer.cpp.

#define CONSTANT_E   2.71828182845904509080

Definition at line 41 of file fpoptimizer.cpp.

#define CONSTANT_L10   2.30258509299404590109

Definition at line 43 of file fpoptimizer.cpp.

Definition at line 45 of file fpoptimizer.cpp.

Definition at line 46 of file fpoptimizer.cpp.

#define CONSTANT_L10I   0.43429448190325176116

Definition at line 44 of file fpoptimizer.cpp.

#define CONSTANT_PI   M_PI

Definition at line 42 of file fpoptimizer.cpp.

#define CONSTANT_RD   (M_PI / 180.0)

Definition at line 48 of file fpoptimizer.cpp.

#define ConstantBinaryFun (   token,
  fun 
)
Value:
case token: { const SubTree &p0 = getp0(); \
                              const SubTree &p1 = getp1(); \
                    if(p0->IsImmed() && \
                       p1->IsImmed()) ReplaceWithConst(fun(p0->GetImmed(), p1->GetImmed())); \
                    break; }
#define ConstantUnaryFun (   token,
  fun 
)
Value:
case token: { const SubTree &p0 = getp0(); \
                    if(p0->IsImmed()) ReplaceWithConst(fun(p0->GetImmed())); \
                    break; }
#define EAT (   n,
  opcode 
)
Value:
do { \
        unsigned newstacktop = stacktop-n; \
        if((n) == 0) GROW(1); \
        stack[stacktop].SetOp((opcode)); \
        for(unsigned a=0, b=(n); a<b; ++a) \
            stack[stacktop].AddParam(stack[newstacktop+a]); \
        stack.erase(stack.begin() + newstacktop, \
                    stack.begin() + stacktop); \
        stacktop = newstacktop; GROW(1); \
    } while(0)
#define GROW (   n)
Value:
do { \
        stacktop += n; \
        if(stack.size() <= stacktop) stack.resize(stacktop+1); \
    } while(0)
#define M_PI   3.1415926535897932384626433832795

Definition at line 38 of file fpoptimizer.cpp.

#define SubTreeDecl (   p1,
  p2 
)    SubTree::SubTree p1 : tree(new CodeTree p2), sign(false) { }

Definition at line 1517 of file fpoptimizer.cpp.