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


C# Environment.FastLexicalRef1方法代码示例

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


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

示例1: EvalStep

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

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

            #if DEBUG
            Primitive.hotPrimitives.Note (this.procedure);
            #endif
            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 ((answer is bool) && (bool) answer == false) {
            #if DEBUG
                noteCalls (this.alternative);
            #endif
                expression = this.alternative;
                return true;
            }
            else {
            #if DEBUG
                noteCalls (this.consequent);
            #endif
                expression = this.consequent;
                return true;
            }
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:46,代码来源:PCond2d.cs

示例2: EvalStep

        public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
        {
            #if DEBUG
            Warm ("PrimitivePlusFixnumL1A0.EvalStep");
            #endif
            // Eval argument1
            object ev1 = environment.Argument0Value;

            // Eval argument0
            object ev0;
            if (environment.FastLexicalRef1 (out ev0, this.rand0Name, this.rand0Offset))
                throw new NotImplementedException ();

            // Compute answer
            answer = (int) ev0 + (int) ev1;
            return false;
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:17,代码来源:PrimitivePlusFixnum.cs

示例3: EvalStep

 public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
 {
     #if DEBUG
     Warm ("PrimitiveIsCharEqQL1.EvalStep");
     #endif
     object ev1;
     if (environment.FastLexicalRef1 (out ev1, this.rand1Name, this.rand1Offset))
         throw new NotImplementedException ();
     answer = (this.rand0Value == (char) ev1) ? Constant.sharpT : Constant.sharpF;
     return false;
 }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:11,代码来源:PrimitiveIsCharEq.cs

示例4: EvalStep

 public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
 {
     #if DEBUG
     Warm ("PCondIsObjectEqQL1");
     #endif
     object ev1;
     if (environment.FastLexicalRef1 (out ev1, this.rand1Name, this.rand1Offset))
         throw new NotImplementedException ();
     if (this.rand0Value == ev1) {
     #if DEBUG
         noteCalls (this.consequent);
         consequentTypeHistogram.Note (this.consequentType);
     #endif
         expression = this.consequent;
         answer = null;
         return true;
     }
     else {
     #if DEBUG
         noteCalls (this.alternative);
         alternativeTypeHistogram.Note (this.alternativeType);
     #endif
         expression = this.alternative;
         answer = null;
         return true;
     }
 }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:27,代码来源:PCondIsObjectEq.cs

示例5: EvalStep

        public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
        {
            #if DEBUG
            Warm ("-");
            SCode.location = "PCond2A0L1L1L1.EvalStep";
            #endif
            object ev1;
            if (environment.FastLexicalRef1 (out ev1, this.rand1Name, this.rand1Offset))
                throw new NotImplementedException ();

            #if DEBUG
            Primitive.hotPrimitives.Note (this.procedure);
            #endif
            if (this.method (out answer, environment.Argument0Value, 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 ((answer is bool) && (bool) answer == false) {
                if (environment.FastLexicalRef1 (out answer, this.alternativeName, this.alternativeOffset))
                    throw new NotImplementedException ();
                return false;
            }
            else {
                if (environment.FastLexicalRef1 (out answer, this.consequentName, this.consequentOffset))
                    throw new NotImplementedException ();
                return false;
            }
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:35,代码来源:PCond2f.cs

示例6: EvalStep

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

            if ((int) environment.Argument0Value == (int) ev1) {
                if (environment.FastLexicalRef1 (out answer, this.consequentName, this.consequentOffset))
                    throw new NotImplementedException ();
                return false;
            }
            else {
            #if DEBUG
                noteCalls (this.alternative);
                alternativeTypeHistogram.Note (this.alternativeType);
            #endif
                expression = this.alternative;
                answer = null;
                return true;
            }
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:24,代码来源:PCondIsFixnumEqual.cs

示例7: EvalStep

        public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
        {
            #if DEBUG
            Warm ("-");
            SCode.location = "PCond2LL1A1A1.EvalStep";
            #endif
            object ev1;
            if (environment.FastLexicalRef1 (out ev1, this.rand1Name, this.rand1Offset))
                throw new NotImplementedException ();

            #if DEBUG
            Primitive.hotPrimitives.Note (this.procedure);
            #endif
            object ev0;
            if (environment.FastLexicalRef (out ev0, this.rand0Name, this.rand0Depth, this.rand0Offset))
                throw new NotImplementedException();
            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)) { };
                }
            }

            answer = environment.Argument1Value;
            return false;
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:30,代码来源:PCond2c.cs

示例8: EvalStep

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

            // Compute answer
            if (Cons.GeneralCarCdr (out answer, ev0, this.rand1Value))
                throw new NotImplementedException ();
            return false;
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:15,代码来源:PrimitiveGeneralCarCdr.cs

示例9: EvalStep

        public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
        {
            #region EvalStepBody
            #if DEBUG
            Warm ("PCondIsFixnumL1.EvalStep");
            #endif
            object ev0;
            if (environment.FastLexicalRef1 (out ev0, this.predicateName, this.predicateOffset))
                throw new NotImplementedException ();

            if (ev0 is Int32) {
            #if DEBUG
                noteCalls (this.consequent);
            #endif
                expression = this.consequent;
                answer = null;
                return true;
            }
            else {
            #if DEBUG
                noteCalls (this.alternative);

            #endif
                expression = this.alternative;
                answer = null;
                return true;
            }
            #endregion
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:29,代码来源:PCondIsFixnum.cs

示例10: EvalStep

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

            // Eval argument0
            object ev0 = (int) environment.Argument1Value;

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

示例11: EvalStep

        public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
        {
            #if DEBUG
            Warm ("PCondIsComplex.EvalStep");
            #endif
            object ev0;
            if (environment.FastLexicalRef1 (out ev0, this.predicateName, this.predicateOffset))
                throw new NotImplementedException ();

            if (!(ev0 is Complex)) {
            #if DEBUG
                noteCalls (this.alternative);
            #endif
                expression = this.alternative;
                answer = null;
                return true;
            }
            else {
                answer = this.consequentValue;
                return false;
            }
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:22,代码来源:PCondIsComplex.cs

示例12: EvalStep

        public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
        {
            #region EvalStepBody
            #if DEBUG
            Warm ();
            noteCalls (this.arg0);
            #endif
            object ev0;
            if (environment.FastLexicalRef1 (out ev0, this.predicateName, this.predicateOffset))
                throw new NotImplementedException ();

            if (!(ev0 is Symbol)) {
                answer = this.alternativeValue;
                return false;
            }
            else {
            #if DEBUG
                noteCalls (this.consequent);
            #endif
                expression = this.consequent;
                answer = null;
                return true;
            }
            #endregion

            throw new NotImplementedException ();
        }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:27,代码来源:PCondIsSymbol.cs

示例13: EvalStep

 public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
 {
     #if DEBUG
     Warm ("PCondIsNegativeL1SA0.EvalStep");
     #endif
     object tmp;
     if (environment.FastLexicalRef1 (out tmp, this.predicateName, this.predicateOffset))
         throw new NotImplementedException ();
     if ((int) tmp < 0) {
     #if DEBUG
         noteCalls (this.Consequent);
     #endif
         expression = this.Consequent;
         answer = false;
         return true;
     }
     else {
         answer = environment.Argument0Value;
         return false;
     }
 }
开发者ID:NotJRM,项目名称:jrm-code-project,代码行数:21,代码来源:PCondIsNegative.cs


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