本文整理汇总了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;
}
示例2: Run
public override int Run(InterpretedFrame frame) {
frame.Push (value);
return +1;
}
示例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;
}
示例4: Run
public override int Run(InterpretedFrame frame)
{
Int32 right = (Int32)frame.Pop();
frame.Push(((Int32)frame.Pop()) < right);
return +1;
}
示例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;
}
}
示例6: Run
public override int Run(InterpretedFrame frame) {
frame.Push(PythonOps.MakeClosureCell());
return +1;
}
示例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;
}
示例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;
}
示例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;
}
示例10: Run
public override int Run(InterpretedFrame frame) {
frame.Parent = RubyExceptionData.CurrentInterpretedFrame.Update(frame);
frame.Push(frame);
return +1;
}
示例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;
}
示例12: Run
public override int Run(InterpretedFrame frame)
{
frame.Push(TotemOps.GetLocalClosureFromFunction((TotemFunction)frame.Pop()));
return +1;
}
示例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;
}
示例14: Run
public override int Run(InterpretedFrame frame) {
frame.Push(PythonOps.MakeEmptyDict());
return +1;
}
示例15: Run
public override int Run(InterpretedFrame frame) {
frame.Push((bool)frame.Pop() ? ScriptingRuntimeHelpers.False : ScriptingRuntimeHelpers.True);
return +1;
}