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


C# Interpreter.InterpretedFrame类代码示例

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


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

示例1: Run

 public override int Run(InterpretedFrame frame) {
     object l = frame.Data[frame.StackIndex - 2];
     object r = frame.Data[frame.StackIndex - 1];
     frame.Data[frame.StackIndex - 2] = ScriptingRuntimeHelpers.Int32ToObject(unchecked((Int32)l * (Int32)r));
     frame.StackIndex--;
     return +1;
 }
开发者ID:knocte,项目名称:mono,代码行数:7,代码来源:MulInstruction.cs

示例2: Run

 public override int Run(InterpretedFrame frame) {
     object l = frame.Data[frame.StackIndex - 2];
     object r = frame.Data[frame.StackIndex - 1];
     frame.Data[frame.StackIndex - 2] = (Int64)((Int64)l / (Int64)r);
     frame.StackIndex--;
     return 1;
 }
开发者ID:nlhepler,项目名称:mono,代码行数:7,代码来源:DivInstruction.cs

示例3: Run

 public override int Run(InterpretedFrame frame) {
     var l = (UInt32)frame.Data[frame.StackIndex - 2];
     var r = (UInt32)frame.Data[frame.StackIndex - 1];
     frame.Data[frame.StackIndex - 2] = (UInt32)(l & r);
     frame.StackIndex--;
     return 1;
 }
开发者ID:knocte,项目名称:mono,代码行数:7,代码来源:AndInstruction.cs

示例4: Run

 public override int Run(InterpretedFrame frame) {
     var l = frame.Data[frame.StackIndex - 2];
     var r = frame.Data[frame.StackIndex - 1];
     frame.Data[frame.StackIndex - 2] = (UInt16)((UInt16)l | (UInt16)r);
     frame.StackIndex--;
     return 1;
 }
开发者ID:knocte,项目名称:mono,代码行数:7,代码来源:OrInstruction.cs

示例5: Run

 public override int Run(InterpretedFrame frame) {
     object l = frame.Data[frame.StackIndex - 2];
     object r = frame.Data[frame.StackIndex - 1];
     frame.Data[frame.StackIndex - 2] = (Int32)((UInt16)l >> (Int32)r);
     frame.StackIndex--;
     return 1;
 }
开发者ID:knocte,项目名称:mono,代码行数:7,代码来源:ShrInstruction.cs

示例6: Run

 public override int Run(InterpretedFrame frame) {
     object l = frame.Data[frame.StackIndex - 2];
     object r = frame.Data[frame.StackIndex - 1];
     frame.Data[frame.StackIndex - 2] = Calculate (l, r);
     frame.StackIndex--;
     return +1;
 }
开发者ID:pmq20,项目名称:mono_forked,代码行数:7,代码来源:AritmeticInstruction.cs

示例7: Run

        public override int Run(InterpretedFrame frame) {
            int first = frame.StackIndex - _argumentCount;
            object ret = _site.Target(_site, new ArgumentArray(frame.Data, first, _argumentCount));
            frame.Data[first] = ret;
            frame.StackIndex = first + 1;

            return 1;
        }
开发者ID:rudimk,项目名称:dlr-dotnet,代码行数:8,代码来源:DynamicSplatInstruction.cs

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

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

示例10: Run

            public override int Run(InterpretedFrame frame) {
                object l = frame.Data[frame.StackIndex - 2];
                object r = frame.Data[frame.StackIndex - 1];
                if (l == null || r == null)
                    frame.Data[frame.StackIndex - 2] = LiftedToNull ? (object) null : (object) false;
                else
                    frame.Data[frame.StackIndex - 2] = (Char)l < (Char)r;

                frame.StackIndex--;
                return +1;
            }
开发者ID:knocte,项目名称:mono,代码行数:11,代码来源:LessThanInstruction.cs

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

示例12: Run

        public override int Run(InterpretedFrame frame) {
            int first = frame.StackIndex - _argumentCount;
            object[] args = new object[1 + _argumentCount];
            args[0] = _site;
            for (int i = 0; i < _argumentCount; i++) {
                args[1 + i] = frame.Data[first + i];
            }

            object ret = _target.InvokeInstance(_targetDelegate, args);
            if (_isVoid) {
                frame.StackIndex = first;
            } else {
                frame.Data[first] = ret;
                frame.StackIndex = first + 1;
            }

            return 1;
        }
开发者ID:jschementi,项目名称:iron,代码行数:18,代码来源:DynamicInstructionN.cs

示例13: Run

        public void Run(InterpretedFrame frame) {
            if (_onlyFaultHandlers) {
                bool fault = true;
                try {
                    RunInstructions(frame);
                    fault = false;
                    return;
                } finally {
                    if (fault) {
                        frame.FaultingInstruction = frame.InstructionIndex;
                        HandleFault(frame);
                    }
                }
            } else {
                while (true) {
                    try {
                        RunInstructions(frame);
                        return;
                    } 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;
                            Run(frame);
                            return;
                        } 
                    }
                }
            }
        }
开发者ID:mstram,项目名称:ironruby,代码行数:38,代码来源:Interpreter.cs

示例14: CreateBacktrace

        private RubyArray CreateBacktrace(RubyContext/*!*/ context, InterpretedFrame handlerFrame, StackTrace catchSiteTrace) {
            Assert.NotNull(context);

            bool hasFileAccessPermissions = DetectFileAccessPermissions();

            var result = new RubyArray();
            
            // Compiled trace: contains frames starting with the throw site up to the first filter/catch that the exception was caught by:
            StackTrace throwSiteTrace = DebugInfoAvailable ? new StackTrace(_exception, true) : new StackTrace(_exception);

            var interpretedFrame = handlerFrame ?? CurrentInterpretedFrame.Value;
            AddBacktrace(result, throwSiteTrace.GetFrames(), ref interpretedFrame, handlerFrame, hasFileAccessPermissions, 0, context.Options.ExceptionDetail);

            // Compiled trace: contains frames above and including the first Ruby filter/catch site that the exception was caught by:
            if (catchSiteTrace != null) {
                // skip one frame - the catch-site frame is already included
                AddBacktrace(result, catchSiteTrace.GetFrames(), ref interpretedFrame, handlerFrame, hasFileAccessPermissions,
                    handlerFrame != null ? 0 : 1, false
                );
            }

            return result;            
        }
开发者ID:bclubb,项目名称:ironruby,代码行数:23,代码来源:RubyExceptionData.cs

示例15: Run

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


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