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

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

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 705  IntVariable::IntVariable(const VariableD Line 705  IntVariable::IntVariable(const VariableD
705          .ctx = decl.ctx,          .ctx = decl.ctx,
706          .isPolyphonic = decl.isPolyphonic,          .isPolyphonic = decl.isPolyphonic,
707          .isConst = decl.isConst,          .isConst = decl.isConst,
         .isFinal = decl.isFinal,  
708          .elements = decl.elements,          .elements = decl.elements,
709          .memPos = (          .memPos = (
710              (!decl.ctx) ? 0 :              (!decl.ctx) ? 0 :
# Line 719  IntVariable::IntVariable(const VariableD Line 718  IntVariable::IntVariable(const VariableD
718                      postfixInc(decl.ctx->polyphonicUnitFactorCount, decl.elements) :                      postfixInc(decl.ctx->polyphonicUnitFactorCount, decl.elements) :
719                      postfixInc(decl.ctx->globalUnitFactorCount, decl.elements)                      postfixInc(decl.ctx->globalUnitFactorCount, decl.elements)
720          ),          ),
721          .unitType = decl.unitType          .unitType = decl.unitType,
722            .isFinal = decl.isFinal,
723      }),      }),
724      Unit(decl.unitType)      Unit(decl.unitType)
725  {  {
# Line 761  RealVariable::RealVariable(const Variabl Line 761  RealVariable::RealVariable(const Variabl
761          .ctx = decl.ctx,          .ctx = decl.ctx,
762          .isPolyphonic = decl.isPolyphonic,          .isPolyphonic = decl.isPolyphonic,
763          .isConst = decl.isConst,          .isConst = decl.isConst,
         .isFinal = decl.isFinal,  
764          .elements = decl.elements,          .elements = decl.elements,
765          .memPos = (          .memPos = (
766              (!decl.ctx) ? 0 :              (!decl.ctx) ? 0 :
# Line 775  RealVariable::RealVariable(const Variabl Line 774  RealVariable::RealVariable(const Variabl
774                      postfixInc(decl.ctx->polyphonicUnitFactorCount, decl.elements) :                      postfixInc(decl.ctx->polyphonicUnitFactorCount, decl.elements) :
775                      postfixInc(decl.ctx->globalUnitFactorCount, decl.elements)                      postfixInc(decl.ctx->globalUnitFactorCount, decl.elements)
776          ),          ),
777          .unitType = decl.unitType          .unitType = decl.unitType,
778            .isFinal = decl.isFinal,
779      }),      }),
780      Unit(decl.unitType)      Unit(decl.unitType)
781  {  {
# Line 817  ConstIntVariable::ConstIntVariable(const Line 817  ConstIntVariable::ConstIntVariable(const
817          .ctx = def.ctx,          .ctx = def.ctx,
818          .isPolyphonic = false,          .isPolyphonic = false,
819          .isConst = true,          .isConst = true,
         .isFinal = def.isFinal,  
820          .elements = 1,          .elements = 1,
821          .memPos = def.memPos,          .memPos = def.memPos,
822          .unitFactorMemPos = def.unitFactorMemPos,          .unitFactorMemPos = def.unitFactorMemPos,
823          .unitType = def.unitType          .unitType = def.unitType,
824            .isFinal = def.isFinal,
825      }),      }),
826      Unit(def.unitType),      Unit(def.unitType),
827      value(def.value), unitPrefixFactor(def.unitFactor)      value(def.value), unitPrefixFactor(def.unitFactor)
# Line 853  ConstRealVariable::ConstRealVariable(con Line 853  ConstRealVariable::ConstRealVariable(con
853          .ctx = def.ctx,          .ctx = def.ctx,
854          .isPolyphonic = false,          .isPolyphonic = false,
855          .isConst = true,          .isConst = true,
         .isFinal = def.isFinal,  
856          .elements = 1,          .elements = 1,
857          .memPos = def.memPos,          .memPos = def.memPos,
858          .unitFactorMemPos = def.unitFactorMemPos,          .unitFactorMemPos = def.unitFactorMemPos,
859          .unitType = def.unitType          .unitType = def.unitType,
860            .isFinal = def.isFinal,
861      }),      }),
862      Unit(def.unitType),      Unit(def.unitType),
863      value(def.value), unitPrefixFactor(def.unitFactor)      value(def.value), unitPrefixFactor(def.unitFactor)
# Line 882  BuiltInIntVariable::BuiltInIntVariable(c Line 882  BuiltInIntVariable::BuiltInIntVariable(c
882          .ctx = NULL,          .ctx = NULL,
883          .isPolyphonic = false,          .isPolyphonic = false,
884          .isConst = false, // may or may not be modifyable though!          .isConst = false, // may or may not be modifyable though!
         .isFinal = false,  
885          .elements = 0,          .elements = 0,
886          .memPos = 0,          .memPos = 0,
887          .unitFactorMemPos = 0,          .unitFactorMemPos = 0,
888          .unitType = VM_NO_UNIT          .unitType = VM_NO_UNIT,
889            .isFinal = false,
890      }),      }),
891      Unit(VM_NO_UNIT),      Unit(VM_NO_UNIT),
892      name(name), ptr(ptr)      name(name), ptr(ptr)
# Line 913  PolyphonicIntVariable::PolyphonicIntVari Line 913  PolyphonicIntVariable::PolyphonicIntVari
913          .ctx = decl.ctx,          .ctx = decl.ctx,
914          .isPolyphonic = true,          .isPolyphonic = true,
915          .isConst = decl.isConst,          .isConst = decl.isConst,
         .isFinal = decl.isFinal,  
916          .elements = 1,          .elements = 1,
917          .memPos = 0,          .memPos = 0,
918          .unitFactorMemPos = 0,          .unitFactorMemPos = 0,
919          .unitType = decl.unitType          .unitType = decl.unitType,
920            .isFinal = decl.isFinal,
921      }),      }),
922      Unit(decl.unitType)      Unit(decl.unitType)
923  {  {
# Line 933  PolyphonicRealVariable::PolyphonicRealVa Line 933  PolyphonicRealVariable::PolyphonicRealVa
933          .ctx = decl.ctx,          .ctx = decl.ctx,
934          .isPolyphonic = true,          .isPolyphonic = true,
935          .isConst = decl.isConst,          .isConst = decl.isConst,
         .isFinal = decl.isFinal,  
936          .elements = 1,          .elements = 1,
937          .memPos = 0,          .memPos = 0,
938          .unitFactorMemPos = 0,          .unitFactorMemPos = 0,
939          .unitType = decl.unitType          .unitType = decl.unitType,
940            .isFinal = decl.isFinal,
941      }),      }),
942      Unit(decl.unitType)      Unit(decl.unitType)
943  {  {
# Line 953  IntArrayVariable::IntArrayVariable(Parse Line 953  IntArrayVariable::IntArrayVariable(Parse
953          .ctx = ctx,          .ctx = ctx,
954          .isPolyphonic = false,          .isPolyphonic = false,
955          .isConst = false,          .isConst = false,
         .isFinal = false,  
956          .elements = 0,          .elements = 0,
957          .memPos = 0,          .memPos = 0,
958          .unitFactorMemPos = 0,          .unitFactorMemPos = 0,
959          .unitType = VM_NO_UNIT          .unitType = VM_NO_UNIT,
960            .isFinal = false,
961      })      })
962  {  {
963      values.resize(size);      values.resize(size);
# Line 974  IntArrayVariable::IntArrayVariable(Parse Line 974  IntArrayVariable::IntArrayVariable(Parse
974          .ctx = ctx,          .ctx = ctx,
975          .isPolyphonic = false,          .isPolyphonic = false,
976          .isConst = _bConst,          .isConst = _bConst,
         .isFinal = false,  
977          .elements = 0,          .elements = 0,
978          .memPos = 0,          .memPos = 0,
979          .unitFactorMemPos = 0,          .unitFactorMemPos = 0,
980          .unitType = VM_NO_UNIT          .unitType = VM_NO_UNIT,
981            .isFinal = false,
982      })      })
983  {  {
984      this->values.resize(size);      this->values.resize(size);
# Line 997  IntArrayVariable::IntArrayVariable(Parse Line 997  IntArrayVariable::IntArrayVariable(Parse
997          .ctx = ctx,          .ctx = ctx,
998          .isPolyphonic = false,          .isPolyphonic = false,
999          .isConst = bConst,          .isConst = bConst,
         .isFinal = false,  
1000          .elements = 0,          .elements = 0,
1001          .memPos = 0,          .memPos = 0,
1002          .unitFactorMemPos = 0,          .unitFactorMemPos = 0,
1003          .unitType = VM_NO_UNIT          .unitType = VM_NO_UNIT,
1004            .isFinal = false,
1005      })      })
1006  {  {
1007  }  }
# Line 1045  RealArrayVariable::RealArrayVariable(Par Line 1045  RealArrayVariable::RealArrayVariable(Par
1045          .ctx = ctx,          .ctx = ctx,
1046          .isPolyphonic = false,          .isPolyphonic = false,
1047          .isConst = false,          .isConst = false,
         .isFinal = false,  
1048          .elements = 0,          .elements = 0,
1049          .memPos = 0,          .memPos = 0,
1050          .unitFactorMemPos = 0,          .unitFactorMemPos = 0,
1051          .unitType = VM_NO_UNIT          .unitType = VM_NO_UNIT,
1052            .isFinal = false,
1053      })      })
1054  {  {
1055      values.resize(size);      values.resize(size);
# Line 1066  RealArrayVariable::RealArrayVariable(Par Line 1066  RealArrayVariable::RealArrayVariable(Par
1066          .ctx = ctx,          .ctx = ctx,
1067          .isPolyphonic = false,          .isPolyphonic = false,
1068          .isConst = _bConst,          .isConst = _bConst,
         .isFinal = false,  
1069          .elements = 0,          .elements = 0,
1070          .memPos = 0,          .memPos = 0,
1071          .unitFactorMemPos = 0,          .unitFactorMemPos = 0,
1072          .unitType = VM_NO_UNIT          .unitType = VM_NO_UNIT,
1073            .isFinal = false,
1074      })      })
1075  {  {
1076      this->values.resize(size);      this->values.resize(size);
# Line 1089  RealArrayVariable::RealArrayVariable(Par Line 1089  RealArrayVariable::RealArrayVariable(Par
1089          .ctx = ctx,          .ctx = ctx,
1090          .isPolyphonic = false,          .isPolyphonic = false,
1091          .isConst = bConst,          .isConst = bConst,
         .isFinal = false,  
1092          .elements = 0,          .elements = 0,
1093          .memPos = 0,          .memPos = 0,
1094          .unitFactorMemPos = 0,          .unitFactorMemPos = 0,
1095          .unitType = VM_NO_UNIT          .unitType = VM_NO_UNIT,
1096            .isFinal = false,
1097      })      })
1098  {  {
1099  }  }
# Line 1158  IntArrayElement::IntArrayElement(IntArra Line 1158  IntArrayElement::IntArrayElement(IntArra
1158          .ctx = NULL,          .ctx = NULL,
1159          .isPolyphonic = (array) ? array->isPolyphonic() : false,          .isPolyphonic = (array) ? array->isPolyphonic() : false,
1160          .isConst = (array) ? array->isConstExpr() : false,          .isConst = (array) ? array->isConstExpr() : false,
         .isFinal = false,  
1161          .elements = 0,          .elements = 0,
1162          .memPos = 0,          .memPos = 0,
1163          .unitFactorMemPos = 0,          .unitFactorMemPos = 0,
1164          .unitType = VM_NO_UNIT          .unitType = VM_NO_UNIT,
1165            .isFinal = false,
1166      }),      }),
1167      Unit(VM_NO_UNIT),      Unit(VM_NO_UNIT),
1168      array(array), index(arrayIndex), currentIndex(-1)      array(array), index(arrayIndex), currentIndex(-1)
1169  {      {
1170  }  }
1171    
1172  void IntArrayElement::assign(Expression* expr) {  void IntArrayElement::assign(Expression* expr) {
# Line 1209  RealArrayElement::RealArrayElement(RealA Line 1209  RealArrayElement::RealArrayElement(RealA
1209          .ctx = NULL,          .ctx = NULL,
1210          .isPolyphonic = (array) ? array->isPolyphonic() : false,          .isPolyphonic = (array) ? array->isPolyphonic() : false,
1211          .isConst = (array) ? array->isConstExpr() : false,          .isConst = (array) ? array->isConstExpr() : false,
         .isFinal = false,  
1212          .elements = 0,          .elements = 0,
1213          .memPos = 0,          .memPos = 0,
1214          .unitFactorMemPos = 0,          .unitFactorMemPos = 0,
1215          .unitType = VM_NO_UNIT          .unitType = VM_NO_UNIT,
1216            .isFinal = false,
1217      }),      }),
1218      Unit(VM_NO_UNIT),      Unit(VM_NO_UNIT),
1219      array(array), index(arrayIndex), currentIndex(-1)      array(array), index(arrayIndex), currentIndex(-1)
# Line 1267  StringVariable::StringVariable(ParserCon Line 1267  StringVariable::StringVariable(ParserCon
1267  StringVariable::StringVariable(ParserContext* ctx, bool bConst) :  StringVariable::StringVariable(ParserContext* ctx, bool bConst) :
1268      Variable({      Variable({
1269          .ctx = ctx,          .ctx = ctx,
1270            .isConst = bConst,
1271          .memPos = 0,          .memPos = 0,
         .isConst = bConst  
1272      })      })
1273  {  {
1274  }  }

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

  ViewVC Help
Powered by ViewVC