Пример #1
0
 public abstract CodePiece GenerateCodeWriteFromStackToGrid(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed);
Пример #2
0
 public abstract CodePiece GenerateCodeReadFromGridToStack(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed);
Пример #3
0
 public override CodePiece GenerateCodeWriteFromStackToGrid(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed)
 {
     return(CodePieceStore.WriteArrayFromStack(env, gridPos, reversed));
 }
Пример #4
0
 public override CodePiece GenerateCodeReadFromGridToStack(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed)
 {
     return(CodePieceStore.ReadArrayToStack(env, gridPos, reversed));
 }
Пример #5
0
 public override CodePiece GenerateCodeReadFromGridToStack(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed)
 {
     throw new InvalidAstStateException(pos);
 }
Пример #6
0
 public override CodePiece GenerateCodeReadFromGridToStack(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed)
 {
     return(CodePiece.Empty);            // Do nothing
 }
Пример #7
0
 public override CodePiece GenerateCodeWriteFromStackToGrid(CodeGenEnvironment env, SourceCodePosition pos, VarDeclarationPosition gridPos, bool reversed)
 {
     return(new CodePiece(BCHelper.StackPop));            // Nobody cares about the result ...
 }
Пример #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);
        }
Пример #9
0
 public void ResetBeforeCodeGen()
 {
     _codeDeclPos = null;
 }