public override CodePiece GenerateCodeAssignment(CodeGenEnvironment env, SourceCodePosition pos, Expression source, ExpressionValuePointer target, bool reversed) { throw new InvalidAstStateException(pos); }
public WrongTypeException(SourceCodePosition pos, BType found, params BType[] expec) : base(String.Format("Wrong Type found: Found = {0}. Expected = {1}", found, string.Join(" or ", expec.ToList())), pos) { }
public InlineVoidMethodCallException(SourceCodePosition pos) : base("Call of an void-Method inside of a expression", pos) { }
public TerminalNode(string value, SourceCodePosition pos) : base(pos) { Value = value; }
public WrongParameterCountException(int actual, int expected, SourceCodePosition pos) : base(String.Format("Parametercount ({0}) differs from expected ({1})", actual, expected), pos) { }
public BTypeDigitArr(SourceCodePosition pos, int sz) : base(pos, sz) { }
public BTypeValue(SourceCodePosition pos) : base(pos) { //-- }
public override CodePiece GenerateCodeWriteFromStackToGrid(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed) { return(CodePieceStore.WriteArrayFromStack(env, gridPos, reversed)); }
public override CodePiece GenerateCodeReadFromGridToStack(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed) { return(CodePieceStore.ReadArrayToStack(env, gridPos, reversed)); }
public BTypeStack(SourceCodePosition pos, int sz) : base(pos) { StackSize = sz; }
public override CodePiece GenerateCodePopValueFromStack(CodeGenEnvironment env, SourceCodePosition pos, bool reversed) { return(CodePieceStore.PopMultipleStackValues(StackSize + 1, reversed)); }
public override CodePiece GenerateCodeReturnFromMethodCall(CodeGenEnvironment env, SourceCodePosition pos, Expression value, bool reversed) { throw new InvalidAstStateException(pos); }
public override CodePiece GenerateCodeReadFromGridToStack(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed) { throw new InvalidAstStateException(pos); }
public override CodePiece GenerateCodePopValueFromStack(CodeGenEnvironment env, SourceCodePosition pos, bool reversed) { throw new InvalidAstStateException(pos); }
public abstract CodePiece GenerateCodeWriteFromStackToGrid(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed);
public override CodePiece GenerateCodeReturnFromMethodCall(CodeGenEnvironment env, SourceCodePosition pos, Expression value, bool reversed) { CodePiece p = new CodePiece(); if (reversed) { #region Reversed p.AppendLeft(value.GenerateCode(env, reversed)); // Switch ReturnValue (Array) and BackJumpAddr p.AppendLeft(CodePieceStore.WriteArrayFromStack(env, env.TMP_ARRFIELD_RETURNVAL, reversed)); p.AppendLeft(CodePieceStore.WriteValueToField(env.TMP_FIELD_JMP_ADDR, reversed)); p.AppendLeft(CodePieceStore.ReadArrayToStack(env, env.TMP_ARRFIELD_RETURNVAL, reversed)); p.AppendLeft(CodePieceStore.ReadValueFromField(env.TMP_FIELD_JMP_ADDR, reversed)); p.AppendLeft(BCHelper.Digit0); // Right Lane p.AppendLeft(BCHelper.PC_Up_tagged(new MethodCallVerticalExitTag())); #endregion } else { #region Normal p.AppendRight(value.GenerateCode(env, reversed)); // Switch ReturnValue (Array) and BackJumpAddr p.AppendRight(CodePieceStore.WriteArrayFromStack(env, env.TMP_ARRFIELD_RETURNVAL, reversed)); p.AppendRight(CodePieceStore.WriteValueToField(env.TMP_FIELD_JMP_ADDR, reversed)); p.AppendRight(CodePieceStore.ReadArrayToStack(env, env.TMP_ARRFIELD_RETURNVAL, reversed)); p.AppendRight(CodePieceStore.ReadValueFromField(env.TMP_FIELD_JMP_ADDR, reversed)); p.AppendRight(BCHelper.Digit0); // Right Lane p.AppendRight(BCHelper.PC_Up_tagged(new MethodCallVerticalExitTag())); #endregion } p.NormalizeX(); return(p); }
public abstract CodePiece GenerateCodeReadFromGridToStack(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed);
public BTypeDigit(SourceCodePosition pos) : base(pos) { //-- }
public abstract CodePiece GenerateCodeReturnFromMethodCall(CodeGenEnvironment env, SourceCodePosition pos, Expression value, bool reversed);
public BTypeChar(SourceCodePosition pos) : base(pos) { //-- }
public BTypeBoolStack(SourceCodePosition pos, int sz) : base(pos, sz) { }
public BTypeBool(SourceCodePosition pos) : base(pos) { //-- }
public ElseActionNode(ActionSequenceNode actions, SourceCodePosition pos) : base(pos) { Actions = actions; }
public abstract CodePiece GenerateCodeAssignment(CodeGenEnvironment env, SourceCodePosition pos, Expression source, ExpressionValuePointer target, bool reversed);
public WrongTypeException(SourceCodePosition pos, BType found, BType expec) : base(String.Format("Wrong Type found: Found = {0}. Expected = {1}", found, expec), pos) { }
public BTypeCharArr(SourceCodePosition pos, int sz) : base(pos, sz) { }
public ArrayTooSmallException(SourceCodePosition pos) : base(String.Format("The size of the array is too small"), pos) { }
public abstract CodePiece GenerateCodePopValueFromStack(CodeGenEnvironment env, SourceCodePosition pos, bool reversed);
public InitGlobalVariableException(SourceCodePosition pos, string ident) : base("The global variable " + ident + " has an Initializator, this is not possible for global variables", pos) { }
public BTypeUnion(SourceCodePosition pos) : base(pos) { //-- }