本文整理汇总了C#中System.Environment.FastLexicalRef方法的典型用法代码示例。如果您正苦于以下问题:C# Environment.FastLexicalRef方法的具体用法?C# Environment.FastLexicalRef怎么用?C# Environment.FastLexicalRef使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Environment
的用法示例。
在下文中一共展示了Environment.FastLexicalRef方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EvalStep
public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
{
#if DEBUG
Warm ("PCond2L.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.FastLexicalRef (out ev0, this.rand0Name, this.rand0Depth, 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;
}
}
示例2: EvalStep
public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
{
#if DEBUG
Warm ("PrimitivePlusFixnumA1L.EvalStep");
#endif
object ev1;
if (environment.FastLexicalRef (out ev1, this.rand1Name, this.rand1Depth, this.rand1Offset))
throw new NotImplementedException ();
answer = (int) environment.Argument1Value + (int) ev1;
return false;
}
示例3: EvalStep
public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
{
#if DEBUG
Warm ("PrimitiveGeneralCarCdrLQ.EvalStep");
#endif
// Eval argument0
object ev0;
if (environment.FastLexicalRef (out ev0, this.rand0Name, this.rand0Depth, this.rand0Offset))
throw new NotImplementedException ();
// Compute answer
if (Cons.GeneralCarCdr (out answer, ev0, this.rand1Value))
throw new NotImplementedException ();
return false;
}
示例4: EvalStep
public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
{
#if DEBUG
Warm ();
#endif
object ev0 = environment.Argument1Value;
if (!(ev0 is Symbol)) {
answer = this.alternativeValue;
return false;
}
else {
if (environment.FastLexicalRef (out answer, this.consequentName, this.consequentDepth, this.consequentOffset))
throw new NotImplementedException ();
return false;
}
}
示例5: EvalStep
public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
{
#if DEBUG
Warm ("-");
SCode.location = "PCondIsObjectEqQL";
#endif
object ev1;
if (environment.FastLexicalRef (out ev1, this.rand1Name, this.rand1Depth, 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;
}
}
示例6: EvalStep
public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
{
#if DEBUG
Warm ("PrimitiveIsFixnumEqualA1L.EvalStep");
#endif
// Eval argument1
object ev1;
if (environment.FastLexicalRef (out ev1, this.rand1Name, this.rand1Depth, this.rand1Offset))
throw new NotImplementedException ();
// Greater-than-fixnum?
answer = (int) environment.Argument1Value == (int) ev1 ? Constant.sharpT : Constant.sharpF;
return false;
}
示例7: EvalStep
public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
{
#if DEBUG
Warm ("-");
SCode.location = "PCond2A0L1L1L.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.FastLexicalRef (out answer, this.alternativeName, this.alternativeDepth, this.alternativeOffset))
throw new NotImplementedException ();
return false;
}
else {
if (environment.FastLexicalRef1 (out answer, this.consequentName, this.consequentOffset))
throw new NotImplementedException ();
return false;
}
}
示例8: EvalStep
public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
{
#if DEBUG
Warm ("PCondIsFixnumEqualAL");
#endif
object ev1;
if (environment.FastLexicalRef (out ev1, this.rand1Name, this.rand1Depth, this.rand1Offset))
throw new NotImplementedException ();
object ev0 = environment.ArgumentValue (this.rand0Offset);
if ((int) ev0 == (int) 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;
}
}
示例9: EvalStep
public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
{
#region EvalStepBody
#if DEBUG
Warm ();
#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 {
if (environment.FastLexicalRef (out answer, this.consequentName, this.consequentDepth, this.consequentOffset))
throw new NotImplementedException ();
return false;
}
#endregion
}
示例10: EvalStep
public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
{
#if DEBUG
Warm ("PrimitiveIsCharEqQL.EvalStep");
#endif
object ev1;
if (environment.FastLexicalRef (out ev1, this.rand1Name, this.rand1Depth, this.rand1Offset))
throw new NotImplementedException ();
answer = (ev1 is char && this.rand0Value == (char) ev1) ? Constant.sharpT : Constant.sharpF;
return false;
}
示例11: EvalStep
public override bool EvalStep(out object answer, ref Control expression, ref Environment environment)
{
#if DEBUG
Warm ("PrimitiveIsIntEqLQ.EvalStep");
#endif
object ev0;
if (environment.FastLexicalRef (out ev0, this.rand0Name, this.rand0Depth, this.rand0Offset))
throw new NotImplementedException ();
answer = ((int) ev0 == this.rand1Value) ? Constant.sharpT : Constant.sharpF;
return false;
}