本文整理汇总了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;
}
示例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;
}
示例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);
}
}
}
}
}
示例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;
}
示例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;
}
示例6: Run
public override int Run(InterpretedFrame frame) {
frame.Push(Convert(frame.Pop()));
return +1;
}
示例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;
}
示例8: Run
public override int Run(InterpretedFrame frame)
{
UInt64 right = (UInt64)frame.Pop();
frame.Push(((UInt64)frame.Pop()) < right);
return +1;
}
示例9: Run
public override int Run(InterpretedFrame frame) {
frame.Push(((UInt64)frame.Pop()) == ((UInt64)frame.Pop()));
return +1;
}
示例10: Run
public override int Run(InterpretedFrame frame) {
frame.Push(((Byte)frame.Pop()) != ((Byte)frame.Pop()));
return +1;
}
示例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;
}
示例12: Run
public override int Run(InterpretedFrame frame) {
object value = frame.Pop();
_field.SetValue(null, value);
return +1;
}
示例13: Run
public override int Run(InterpretedFrame frame) {
throw (Exception)frame.Pop();
}
示例14: Run
public override int Run(InterpretedFrame frame)
{
frame.Push(TotemOps.GetVariable((CodeContext)frame.Pop(), _name, !_isLocal, _lightThrow));
return +1;
}
示例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;
}