当前位置: 首页>>代码示例>>C#>>正文


C# Environment.StaticValue方法代码示例

本文整理汇总了C#中System.Environment.StaticValue方法的典型用法代码示例。如果您正苦于以下问题:C# Environment.StaticValue方法的具体用法?C# Environment.StaticValue怎么用?C# Environment.StaticValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Environment的用法示例。


在下文中一共展示了Environment.StaticValue方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EvalStep

        public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
        {
            #if DEBUG
            Warm ("-");
            NoteCalls (this.rand0);
            rand0TypeHistogram.Note (this.rand0Type);
            SCode.location = "POrIsEqXS.EvalStep";
            #endif
            object ev1;
            if (environment.StaticValue (out ev1, this.rand1Name, this.rand1Offset))
                throw new NotImplementedException ();

            Control unev = this.rand0;
            Environment env = environment;
            object ev0;
            while (unev.EvalStep (out ev0, ref unev, ref env)) { };
            #if DEBUG
            SCode.location = "POrXS.EvalStep";
            #endif
            if (ev0 == Interpreter.UnwindStack) {
                throw new NotImplementedException ();
                //((UnwinderState) env).AddFrame (new PrimitiveCombination1Frame0 (this, environment));
                //answer = Interpreter.UnwindStack;
                //environment = env;
                //return false;
            }

            if (! ObjectModel.SchemeEq (ev0, ev1)) {
            #if DEBUG
                SCode.location = "-";
                NoteCalls (this.alternative);
                alternativeTypeHistogram.Note (this.alternativeType);
                SCode.location = "POrIsEqXS.EvalStep";
            #endif
                expression = this.alternative;
                answer = null; //happy compiler
                return true;
            }
            else {
                answer = Constant.sharpT;
                return false;
                }
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:43,代码来源:POrIsEq.cs

示例2: EvalStep

        public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
        {
            #if DEBUG
            Warm ("PrimitiveStringSetSQQ");
            #endif
            object ev0;
            if (environment.StaticValue (out ev0, this.rand0Name, this.rand0Offset))
                throw new NotImplementedException ();

            object ev1 = this.rand1Value;
            object ev2 = this.rand2Value;
            answer = ((char []) ev0) [(int) ev1];
            ((char []) ev0) [(int) ev1] = (char) ev2;
            return false;
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:15,代码来源:PrimitiveStringSet.cs

示例3: EvalStep

        public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
        {
            #if DEBUG
            Warm ("-");
            NoteCalls (this.arg0);
            arg0TypeHistogram.Note (this.arg0Type);
            SCode.location = "PCondIsNullXXS";
            #endif
            Control unev0 = this.arg0;
            Environment env = environment;
            object ev0;
            while (unev0.EvalStep (out ev0, ref unev0, ref env)) { };
            #if DEBUG
            SCode.location = "PCondIsNullXXS";
            #endif
            if (ev0 == Interpreter.UnwindStack) {
                throw new NotImplementedException ();
                //((UnwinderState) env).AddFrame (new PrimitiveIsNullFrame0 (this, closureEnvironment));
                //answer = Interpreter.Unwind;
                //closureEnvironment = env;
                //return false;
            }

            if (ev0 == null) {
            #if DEBUG
                SCode.location = "-";
                NoteCalls (this.consequent);
                consequentTypeHistogram.Note (this.consequentType);
                SCode.location = "PCondIsNullXXS";
            #endif
                expression = this.consequent;
                answer = null; // keep c# compiler happy
                return true;
            }
            else {
                if (environment.StaticValue (out answer, this.alternativeName, this.alternativeOffset))
                    throw new NotImplementedException ();
                return false;
            }
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:40,代码来源:PCondIsNull.cs

示例4: EvalStep

        public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
        {
            #if DEBUG
            Warm ("PrimitiveGreaterThanFixnumA0S");
            #endif
            // Eval argument1
            object ev1;
            if (environment.StaticValue (out ev1, this.rand1Name, this.rand1Offset))
                throw new NotImplementedException ();

            // Eval argument0
            object ev0 = environment.Argument0Value;

            // Greater-than-fixnum?
            answer = (int) ev0 > (int) ev1 ? Constant.sharpT : Constant.sharpF;
            return false;
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:17,代码来源:PrimitiveGreaterThanFixnum.cs

示例5: EvalStep

        public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
        {
            #if DEBUG
            Warm ("-");
            SCode.location = "PrimitiveRecordSetSQS";
            #endif
            object ev2;
            if (environment.StaticValue (out ev2, this.rand2Name, this.rand2Offset))
                throw new NotImplementedException ();

            object ev0;
            if (environment.StaticValue (out ev0, this.rand0Name, this.rand0Offset))
                throw new NotImplementedException ();

            answer = ((Record) ev0).Set (this.rand1Value, ev2);
            return false;
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:17,代码来源:PrimitiveRecordSet.cs

示例6: EvalStep

        public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
        {
            #if DEBUG
            Warm ("-");
            procedureHistogram.Note (this.procedure);
            SCode.location = "PCond1A0XS";
            #endif
            object ev0 = environment.Argument0Value;

            #if DEBUG
            SCode.location = this.procedure.Name.ToString();
            Primitive.hotPrimitives.Note(this.procedure);
            #endif
            // It is expensive to bounce down to invoke the procedure
            // we invoke it directly and pass along the ref args.
            if (this.method (out answer, ev0)) {
                TailCallInterpreter tci = answer as TailCallInterpreter;
                if (tci != null) {
                    answer = null; // dispose of the evidence
                    // set up the interpreter for a tail call
                    Control cExpression = tci.Expression;
                    Environment cEnvironment = tci.Environment;
                    while (cExpression.EvalStep (out answer, ref cExpression, ref cEnvironment)) { };
                }
            }
            #if DEBUG
            SCode.location = "PCond1A0XS";
            #endif

            if ((answer is bool) && (bool) answer == false) {
                if (environment.StaticValue (out answer, this.alternativeName, this.alternativeOffset))
                    throw new NotImplementedException ();
                return false;
            }
            else {
            #if DEBUG
                SCode.location = "-";
                NoteCalls (this.consequent);
                consequentTypeHistogram.Note (this.consequentType);
                SCode.location = "PCond1A0XQ";
            #endif
                expression = this.consequent;
                return true;
            }
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:45,代码来源:PCond1.cs

示例7: EvalStep

        public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
        {
            #if DEBUG
            Warm ("-");
            SCode.location = "PCondLessThanFixnumSQ";
            #endif

            object ev0;
            if (environment.StaticValue (out ev0, this.rand0Name, this.rand0Offset))
                throw new NotImplementedException ();

            if ((int) ev0 < this.rand1Value) {
            #if DEBUG
                SCode.location = "-";
                NoteCalls (this.consequent);
                consequentTypeHistogram.Note (this.consequentType);
                SCode.location = "PCondLessThanFixnumSQ";
            #endif
                expression = this.consequent;
                answer = null;
                return true;
            }
            else {
            #if DEBUG
                SCode.location = "-";
                NoteCalls (this.alternative);
                alternativeTypeHistogram.Note (this.alternativeType);
                SCode.location = "PCondLessThanFixnumSQ";
            #endif
                expression = this.alternative;
                answer = null;
                return true;
            }
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:34,代码来源:PCondLessThanFixnum.cs

示例8: EvalStep

 public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
 {
     #if DEBUG
     Warm ("PrimitiveRecordRefSQ");
     #endif
     object ev0;
     if (environment.StaticValue (out ev0, this.rand0Name, this.rand0Offset))
         throw new NotImplementedException ();
     // Eval argument0
     answer = ((Record) ev0).Ref (this.offset);
     return false;
 }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:12,代码来源:PrimitiveRecordRef.cs

示例9: EvalStep

        public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
        {
            #if DEBUG
            Warm ("-");
            NoteCalls (this.rand1);
            rand1TypeHistogram.Note (this.rand1Type);
            SCode.location = "PCondRecordRefS";
            #endif
            Control unev = this.rand1;
            Environment env = environment;
            object ev1;
            while (unev.EvalStep (out ev1, ref unev, ref env)) { };
            #if DEBUG
            SCode.location = "PCondRecordRefS";
            #endif
            if (ev1 == Interpreter.UnwindStack) {
                throw new NotImplementedException ();
            }

            object ev0;
            if (environment.StaticValue (out ev0, this.rand0Name, this.rand0Offset))
                throw new NotImplementedException ();

            object result = ((Record) ev0).Ref ((int) ev1);

            if (result is Boolean && (((bool) result) == false)) {
            #if DEBUG
                SCode.location = "-";
                NoteCalls (this.alternative);
                alternativeTypeHistogram.Note (this.alternativeType);
                SCode.location = "PCondRecordRefS";
            #endif
                expression = this.alternative;
                answer = null;
                return true;
            }
            else {
            #if DEBUG
                SCode.location = "-";
                NoteCalls (this.consequent);
                consequentTypeHistogram.Note (this.consequentType);
                SCode.location = "PCondRecordRefS";
            #endif
                expression = this.consequent;
                answer = null;
                return true;
            }
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:48,代码来源:PCondRecordRef.cs

示例10: EvalStep

        public override bool EvalStep (out object answer, ref Control expression, ref Environment environment)
        {
#if DEBUG
            Warm ("-");
            NoteCalls (this.rand1);
            procedureHistogram.Note (this.procedure);
            rand1TypeHistogram.Note (this.rand1Type);
            SCode.location = "PCond2SXQ";
#endif
            Control unev = this.rand1;
            Environment env = environment;
            object ev1;
            while (unev.EvalStep (out ev1, ref unev, ref env)) { };
#if DEBUG
            SCode.location = "PCond2SXQ";
#endif
            if (ev1 == Interpreter.UnwindStack) {
                throw new NotImplementedException ();
            }

            object ev0;
            if (environment.StaticValue (out ev0, this.rand0Name, this.rand0Offset))
                throw new NotImplementedException ();

#if DEBUG
            SCode.location = this.procedure.Name.ToString ();
            Primitive.hotPrimitives.Note (this.procedure);
#endif
            // It is expensive to bounce down to invoke the procedure
            // we invoke it directly and pass along the ref args.
            if (this.method (out answer, ev0, ev1)) {
                TailCallInterpreter tci = answer as TailCallInterpreter;
                if (tci != null) {
                    answer = null; // dispose of the evidence
                    // set up the interpreter for a tail call
                    Control cExpression = tci.Expression;
                    Environment cEnvironment = tci.Environment;
                    while (cExpression.EvalStep (out answer, ref cExpression, ref cEnvironment)) { };
                }
            }
#if DEBUG
            SCode.location = "PCond2SXQ";
#endif
            if ((answer is bool) && (bool) answer == false) {
#if DEBUG
                NoteCalls (this.alternative);
                alternativeTypeHistogram.Note (this.alternativeType);
#endif
                expression = this.alternative;
                return true;
            }
            else {
                answer = this.consequentValue;
                return false;
            }
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:56,代码来源:PCond2.cs

示例11: EvalStep

 public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
 {
     #if DEBUG
     Warm ("PrimitiveVector8BRefSS");
     #endif
     object ev1;
     if (environment.StaticValue (out ev1, this.rand1Name, this.rand1Offset))
         throw new NotImplementedException ();
     object ev0;
     if (environment.StaticValue (out ev0, this.rand0Name, this.rand0Offset))
         throw new NotImplementedException ();
     // Vector-8b-ref
     answer = (int) ((char []) ev0) [(int) ev1];
     return false;
 }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:15,代码来源:PrimitiveVector8BRef.cs

示例12: EvalStep

 public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
 {
     #if DEBUG
     Warm ("PrimitiveIsEqAS");
     #endif
     object ev1;
     if (environment.StaticValue (out ev1, this.rand1Name, this.rand1Offset))
         throw new NotImplementedException ();
     if (ObjectModel.Eq (out answer, environment.ArgumentValue (this.rand0Offset), ev1))
         throw new NotImplementedException ();
     return false;
 }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:12,代码来源:PrimitiveIsEq.cs

示例13: EvalStep

        public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
        {
            #if DEBUG
            Warm ("-");
            SCode.location = "PCondIsEqCarA0S";
            #endif

            object ev1;
            if (environment.StaticValue (out ev1, this.rand1Name, this.rand1Offset))
                throw new NotImplementedException ();

            object ev0 = environment.Argument0Value;

            #if DEBUG
            SCode.location = "PCondIsEqCarA0S";
            #endif
            if (!ObjectModel.SchemeEq (((Cons)ev0).Car, ev1)) {
            #if DEBUG
                NoteCalls (this.alternative);
                alternativeTypeHistogram.Note (this.alternativeType);
            #endif
                expression = this.alternative;
                answer = null; // happy compiler
                return true;
            }
            else {
            #if DEBUG
                NoteCalls (this.consequent);
                consequentTypeHistogram.Note (this.consequentType);
            #endif
                expression = this.consequent;
                answer = null; // happy compiler
                return true;
            }
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:35,代码来源:PCondIsEqCar.cs

示例14: EvalStep

        public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
        {
            #if DEBUG
            Warm ("-");
            SCode.location = "PrimitiveLessThanFixnumSQ";
            #endif
            // Eval argument0
            object ev0;
            if (environment.StaticValue (out ev0, this.rand0Name, this.rand0Offset))
                throw new NotImplementedException ();

            // less-than-fixnum?
            answer = (int) ev0 < this.rand1Value ? Constant.sharpT : Constant.sharpF;
            return false;
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:15,代码来源:PrimitiveLessThanFixnum.cs


注:本文中的System.Environment.StaticValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。