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


C# InterpretedFrame.Pop方法代码示例

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


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

示例1: Run

        public override int Run(InterpretedFrame frame) {
            Debug.Assert(_offset != Unknown);

            if (!(bool)frame.Pop()) {
                return _offset;
            }

            return +1;
        }
开发者ID:nlhepler,项目名称:mono,代码行数:9,代码来源:ControlFlowInstructions.cs

示例2: Run

        public override int Run(InterpretedFrame frame) {
            var targetDelegate = _targetField.GetValue(_site);

            object[] args = new object[_argCount];
            
            for (int i = _argCount - 1; i >= 1; i--) {
                args[i] = frame.Pop();
            }
            args[0] = _site;

            object ret = _target.InvokeInstance(targetDelegate, args);
            if (!_isVoid) frame.Push(ret);
            return +1;
        }
开发者ID:andreakn,项目名称:ironruby,代码行数:14,代码来源:DynamicInstructions.cs

示例3: Run

        public object Run(InterpretedFrame frame) {
            if (_onlyFaultHandlers) {
                bool fault = true;
                try {
                    RunInstructions(frame);
                    fault = false;
                    return frame.Pop();
                } finally {
                    if (fault) {
                        frame.FaultingInstruction = frame.InstructionIndex;
                        HandleFault(frame);
                    }
                }
            } else {
                while (true) {
                    try {
                        RunInstructions(frame);
                        return frame.Pop();
                    } catch (Exception exc) {
                        frame.FaultingInstruction = frame.InstructionIndex;
                        ExceptionHandler handler = HandleCatch(frame, exc);

                        if (handler == null) {
                            throw;
                        }

                        // stay in the current catch so that ThreadAbortException is not rethrown by CLR:
                        var abort = exc as ThreadAbortException;
                        if (abort != null) {
                            _anyAbortException = abort;
                            frame.CurrentAbortHandler = handler;
                            return Run(frame);
                        } 
                    }
                }
            }
        }
开发者ID:Hank923,项目名称:ironruby,代码行数:37,代码来源:Interpreter.cs

示例4: 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

示例5: Run

            public override int Run(InterpretedFrame frame) {
                object[] defaults;
                if (_defaultCount > 0) {
                    defaults = new object[_defaultCount];
                    for (int i = 0; i < _defaultCount; i++) {
                        defaults[i] = frame.Pop();
                    }
                } else {
                    defaults = ArrayUtils.EmptyObjects;
                }

                object modName;
                if (_name != null) {
                    modName = _name.RawValue;
                } else {
                    modName = frame.Pop();
                }

                CodeContext context = /*_context ?? */(CodeContext)frame.Pop();
                
                frame.Push(PythonOps.MakeFunction(context, _def.FunctionCode, modName, defaults));

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

示例6: Run

 public override int Run(InterpretedFrame frame) {
     frame.Push(Convert(frame.Pop()));
     return +1;
 }
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:4,代码来源:NumericConvertInstruction.cs

示例7: 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

示例8: Run

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

示例9: Run

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

示例10: Run

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

示例11: 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

示例12: Run

 public override int Run(InterpretedFrame frame) {
     object value = frame.Pop();
     _field.SetValue(null, value);
     return +1;
 }
开发者ID:nlhepler,项目名称:mono,代码行数:5,代码来源:FieldOperations.cs

示例13: Run

 public override int Run(InterpretedFrame frame) {
     throw (Exception)frame.Pop();
 }
开发者ID:BenHall,项目名称:ironruby,代码行数:3,代码来源:ControlFlowInstructions.cs

示例14: Run

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

示例15: 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


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