void IVisitor.Call(Size size, FunctionId functionId, Size argsAndRefsSize) { var formalSubValues = PullInputValuesFromData(argsAndRefsSize); var startAddress = (_startAddress + argsAndRefsSize - size).ToInt(); var element = FormalValueAccess.Call(formalSubValues, functionId); SetFormalValues(element, startAddress, size); }
void ITraceCollector.Call(StackData argsAndRefs, FunctionId functionId) => Frames.Insert ( 0, new FrameItem { Text = argsAndRefs.Dump(), FunctionId = functionId, CallStep = new TraceLogItem(new[] {Steps.Last()}, SourceView) });
void IVisitor.Call(Size size, FunctionId functionId, Size argsAndRefsSize) { var oldFrame = _localData.Frame; var argsAndRefs = Pull(argsAndRefsSize); TraceCollector.Call(argsAndRefs, functionId); do { _localData.Frame = new FrameData(argsAndRefs); SubVisit(_context.Function(functionId)); } while(_localData.Frame.IsRepeatRequired); TraceCollector.Return(); _localData.Frame = oldFrame; }
public SetterFunction(FunctionType parent, int index, Value body) : base(parent, body) { _functionId = FunctionId .Setter(index); }
public static IFormalValue Call(IFormalValue[] formalSubValues, FunctionId functionId) => new CallValue(formalSubValues, functionId);
public CallValue(IFormalValue[] formalSubValues, FunctionId functionId) { _formalSubValues = formalSubValues; _functionId = functionId; }
public ReplacePrimitiveRecursivity(FunctionId functionId) : base(_nextObjectId++) { _functionId = functionId; }
void IVisitor.Call(Size size, FunctionId functionId, Size argsAndRefsSize) => AddCode ( "data.Push({0}(data.Pull({1})))", Generator.FunctionName(functionId), argsAndRefsSize.SaveByteCount );
internal CodeBase Function(FunctionId functionId) { var item = _functions[functionId.Index]; var container = functionId.IsGetter ? item.Getter : item.Setter; return container.Data; }