/[svn]/linuxsampler/trunk/src/scriptvm/tree.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/scriptvm/tree.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3590 by schoenebeck, Mon Sep 2 09:03:31 2019 UTC revision 3595 by schoenebeck, Tue Sep 3 11:06:33 2019 UTC
# Line 224  struct VariableDecl { Line 224  struct VariableDecl {
224      ParserContext* ctx;      ParserContext* ctx;
225      bool isPolyphonic;      bool isPolyphonic;
226      bool isConst;      bool isConst;
     bool isFinal;  
227      vmint elements = 1;      vmint elements = 1;
228      vmint memPos;      vmint memPos;
229      vmint unitFactorMemPos;      vmint unitFactorMemPos;
230      StdUnit_t unitType = VM_NO_UNIT;      StdUnit_t unitType = VM_NO_UNIT;
231        bool isFinal;
232  };  };
233    
234  class Variable : virtual public VMVariable, virtual public Expression {  class Variable : virtual public VMVariable, virtual public Expression {
# Line 279  public: Line 279  public:
279  typedef Ref<RealVariable,Node> RealVariableRef;  typedef Ref<RealVariable,Node> RealVariableRef;
280    
281  struct IntVarDef /* : VariableDecl*/ { //NOTE: derived, aggregate initializer-lists requires C++17  struct IntVarDef /* : VariableDecl*/ { //NOTE: derived, aggregate initializer-lists requires C++17
282        // additions for RealVarDef
283        vmint value = 0; //NOTE: sequence matters! Since this is usually initialized with VMIntExpr::evalInt() it should be before member unitFactor, since the latter is usually initialized with VMIntExpr::unitFactor() which does not evaluate the expression.
284        vmfloat unitFactor = VM_NO_FACTOR;
285      // copied from VariableDecl      // copied from VariableDecl
286      ParserContext* ctx;      ParserContext* ctx;
287      bool isPolyphonic;      bool isPolyphonic;
288      bool isConst;      bool isConst;
     bool isFinal;  
289      vmint elements = 1;      vmint elements = 1;
290      vmint memPos;      vmint memPos;
291      vmint unitFactorMemPos;      vmint unitFactorMemPos;
292      StdUnit_t unitType = VM_NO_UNIT;      StdUnit_t unitType = VM_NO_UNIT;
293      // additions for RealVarDef      bool isFinal;
     vmint value = 0; //NOTE: sequence matters! Since this is usually initialized with VMIntExpr::evalInt() it should be before member unitFactor, since the latter is usually initialized with VMIntExpr::unitFactor() which does not evaluate the expression.  
     vmfloat unitFactor = VM_NO_FACTOR;  
294  };  };
295    
296  class ConstIntVariable FINAL : public IntVariable {  class ConstIntVariable FINAL : public IntVariable {
# Line 306  public: Line 306  public:
306  typedef Ref<ConstIntVariable,Node> ConstIntVariableRef;  typedef Ref<ConstIntVariable,Node> ConstIntVariableRef;
307    
308  struct RealVarDef /* : VariableDecl*/ { //NOTE: derived, aggregate initializer-lists requires C++17  struct RealVarDef /* : VariableDecl*/ { //NOTE: derived, aggregate initializer-lists requires C++17
309        // additions for RealVarDef
310        vmfloat value = vmfloat(0); //NOTE: sequence matters! Since this is usually initialized with VMRealExpr::evalReal() it should be before member unitFactor, since the latter is usually initialized with VMRealExpr::unitFactor() which does not evaluate the expression.
311        vmfloat unitFactor = VM_NO_FACTOR;
312      // copied from VariableDecl      // copied from VariableDecl
313      ParserContext* ctx;      ParserContext* ctx;
314      bool isPolyphonic;      bool isPolyphonic;
315      bool isConst;      bool isConst;
     bool isFinal;  
316      vmint elements = 1;      vmint elements = 1;
317      vmint memPos;      vmint memPos;
318      vmint unitFactorMemPos;      vmint unitFactorMemPos;
319      StdUnit_t unitType = VM_NO_UNIT;      StdUnit_t unitType = VM_NO_UNIT;
320      // additions for RealVarDef      bool isFinal;
     vmfloat value = vmfloat(0); //NOTE: sequence matters! Since this is usually initialized with VMRealExpr::evalReal() it should be before member unitFactor, since the latter is usually initialized with VMRealExpr::unitFactor() which does not evaluate the expression.  
     vmfloat unitFactor = VM_NO_FACTOR;  
321  };  };
322    
323  class ConstRealVariable FINAL : public RealVariable {  class ConstRealVariable FINAL : public RealVariable {

Legend:
Removed from v.3590  
changed lines
  Added in v.3595

  ViewVC Help
Powered by ViewVC