Esempio n. 1
0
 public abstract CodePiece GenerateCodeWriteFromStackToGrid(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed);
Esempio n. 2
0
 public abstract CodePiece GenerateCodeReadFromGridToStack(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed);
Esempio n. 3
0
 public override CodePiece GenerateCodeWriteFromStackToGrid(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed)
 {
     return(CodePieceStore.WriteArrayFromStack(env, gridPos, reversed));
 }
Esempio n. 4
0
 public override CodePiece GenerateCodeReadFromGridToStack(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed)
 {
     return(CodePieceStore.ReadArrayToStack(env, gridPos, reversed));
 }
Esempio n. 5
0
 public override CodePiece GenerateCodeReadFromGridToStack(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed)
 {
     throw new InvalidAstStateException(pos);
 }
Esempio n. 6
0
 public override CodePiece GenerateCodeReadFromGridToStack(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed)
 {
     return(CodePiece.Empty);            // Do nothing
 }
Esempio n. 7
0
 public override CodePiece GenerateCodeWriteFromStackToGrid(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed)
 {
     return(new CodePiece(BCHelper.StackPop));            // Nobody cares about the result ...
 }
Esempio n. 8
0
        public override CodePiece GenerateCodeReadFromGridToStack(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed)
        {
            CodePiece p = new CodePiece();

            if (reversed)
            {
                p.AppendLeft(NumberCodeHelper.GenerateCode(gridPos.X, reversed));
                p.AppendLeft(NumberCodeHelper.GenerateCode(gridPos.Y, reversed));

                p.AppendLeft(BCHelper.ReflectGet);
            }
            else
            {
                p.AppendRight(NumberCodeHelper.GenerateCode(gridPos.X, reversed));
                p.AppendRight(NumberCodeHelper.GenerateCode(gridPos.Y, reversed));

                p.AppendRight(BCHelper.ReflectGet);
            }
            return(p);
        }
Esempio n. 9
0
 public void ResetBeforeCodeGen()
 {
     _codeDeclPos = null;
 }