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


C# InterpretedFrame.Push方法代码示例

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


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

示例1: Run

        public override int Run(InterpretedFrame frame) {
            DebugInfo info = DebugInfo.GetMatchingDebugInfo(_debugInfos, frame.FaultingInstruction);
            if (info != null && !info.IsClear) {
                frame.Push(info.StartLine);
            }else{
                frame.Push(-1);
            }

            return +1;
        }
开发者ID:BenHall,项目名称:ironruby,代码行数:10,代码来源:LastFaultingLineExpression.cs

示例2: Run

 public override int Run(InterpretedFrame frame) {
     frame.Push (value);
     return +1;
 }
开发者ID:nlhepler,项目名称:mono,代码行数:4,代码来源:ConstantInstruction.cs

示例3: Run

 public override int Run(InterpretedFrame frame) {
     var ret = new IStrongBox[_count];
     for (int i = ret.Length - 1; i >= 0; i--) {
         ret[i] = (IStrongBox)frame.Pop();
     }
     frame.Push(RuntimeVariables.Create(ret));
     return +1;
 }
开发者ID:madpilot,项目名称:ironruby,代码行数:8,代码来源:LocalAccess.cs

示例4: Run

 public override int Run(InterpretedFrame frame)
 {
     Int32 right = (Int32)frame.Pop();
     frame.Push(((Int32)frame.Pop()) < right);
     return +1;
 }
开发者ID:TerabyteX,项目名称:main,代码行数:6,代码来源:LessThanInstruction.cs

示例5: HandleCatch

        private ExceptionHandler HandleCatch(InterpretedFrame frame, Exception exception) {
            Type exceptionType = exception.GetType();
            var handler = GetBestHandler(frame, exceptionType);
            if (handler == null) {
                return null;
            }

            frame.StackIndex = _numberOfLocals + handler.HandlerStackDepth;
            if (handler.IsFinallyOrFault) {
                frame.InstructionIndex = handler.StartHandlerIndex;

                RunBlock(frame, handler.EndHandlerIndex);
                if (frame.InstructionIndex == handler.EndHandlerIndex) {
                    frame.InstructionIndex -= 1; // push back into the right range

                    return HandleCatch(frame, exception);
                } else {
                    return handler;
                }
            } else {
                if (handler.PushException) {
                    frame.Push(exception);
                }

                frame.InstructionIndex = handler.StartHandlerIndex;
                return handler;
            }
        }
开发者ID:mstram,项目名称:ironruby,代码行数:28,代码来源:Interpreter.cs

示例6: Run

 public override int Run(InterpretedFrame frame) {
     frame.Push(PythonOps.MakeClosureCell());
     return +1;
 }
开发者ID:rudimk,项目名称:dlr-dotnet,代码行数:4,代码来源:ClosureExpression.cs

示例7: Run

 public override int Run(InterpretedFrame frame) {
     var arg5 = frame.Pop();
     var arg4 = frame.Pop();
     var arg3 = frame.Pop();
     var arg2 = frame.Pop();
     var arg1 = frame.Pop();
     var arg0 = frame.Pop();
     var target = frame.Pop();
     frame.Push(_site.Target(_site, (CodeContext)frame.Pop(), target, arg0, arg1, arg2, arg3, arg4, arg5));
     return +1;
 }
开发者ID:rudimk,项目名称:dlr-dotnet,代码行数:11,代码来源:CallExpression.cs

示例8: Run

 public override int Run(InterpretedFrame frame) {
     if (_isLocal) {
         frame.Push(PythonOps.GetLocal((CodeContext)frame.Pop(), _name));
     } else {
         frame.Push(PythonOps.GetGlobal((CodeContext)frame.Pop(), _name));
     }
     return +1;
 }
开发者ID:jxnmaomao,项目名称:ironruby,代码行数:8,代码来源:PythonGlobalVariableExpression.cs

示例9: Run

        public sealed override int Run(InterpretedFrame frame) {
            object[] args = new object[_argumentCount];
            for (int i = _argumentCount - 1; i >= 0; i--) {
                args[i] = frame.Pop();
            }

            object ret = Invoke(args);
            if (_target.ReturnType != typeof(void)) {
                frame.Push(ret);
            }
            return +1;
        }
开发者ID:andreakn,项目名称:ironruby,代码行数:12,代码来源:CallInstruction.cs

示例10: Run

 public override int Run(InterpretedFrame frame) {
     frame.Parent = RubyExceptionData.CurrentInterpretedFrame.Update(frame);
     frame.Push(frame);
     return +1;
 }
开发者ID:andreakn,项目名称:ironruby,代码行数:5,代码来源:FrameTracking.cs

示例11: Run

            public override int Run(InterpretedFrame frame) {
                if (_site == null) {
                    _site = CallSite<Func<CallSite, object, CodeContext, object>>.Create(_binder);
                }

                var context = (CodeContext)frame.Pop();
                frame.Push(_site.Target(_site, frame.Pop(), context));
                return +1;
            }
开发者ID:rudimk,项目名称:dlr-dotnet,代码行数:9,代码来源:DynamicGetMemberExpression.cs

示例12: Run

 public override int Run(InterpretedFrame frame)
 {
     frame.Push(TotemOps.GetLocalClosureFromFunction((TotemFunction)frame.Pop()));
     return +1;
 }
开发者ID:Alxandr,项目名称:IronTotem-3.0,代码行数:5,代码来源:GetLocalClosureFromFunctionExpression.cs

示例13: Run

 public override int Run(InterpretedFrame frame) {
     // it�s okay to pop the args in this order due to commutativity of referential equality
     frame.Push(PythonOps.IsNot(frame.Pop(), frame.Pop()));
     return +1;
 }
开发者ID:rudimk,项目名称:dlr-dotnet,代码行数:5,代码来源:BinaryExpression.cs

示例14: Run

 public override int Run(InterpretedFrame frame) {
     frame.Push(PythonOps.MakeEmptyDict());
     return +1;
 }
开发者ID:jschementi,项目名称:iron,代码行数:4,代码来源:DictionaryExpression.cs

示例15: Run

 public override int Run(InterpretedFrame frame) {
     frame.Push((bool)frame.Pop() ? ScriptingRuntimeHelpers.False : ScriptingRuntimeHelpers.True);
     return +1;
 }
开发者ID:BenHall,项目名称:ironruby,代码行数:4,代码来源:Instruction.cs


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