Skip to content

Commit

Permalink
minor coercion speed up
Browse files Browse the repository at this point in the history
  • Loading branch information
benibela committed Jun 30, 2024
1 parent 3353112 commit 5c39807
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion data/xquery_terms.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1220,12 +1220,15 @@ end;
procedure dynamicCallForwardArguments(fresult: TXQBoxedFunction; const v: IXQValue; arguments: array of TXQTermSequenceType);
var i: SizeInt;
tempvar: TXQTermVariable;
temp: string[10];
begin
fresult.ownsTerms := true;
fresult.body := TXQTermDynamicFunctionCall.create(TXQTermConstant.Create(v));
setlength(fresult.parameters, length(arguments) - 1);
for i := 0 to high(fresult.parameters) do begin
tempvar := TXQTermVariable.create(IntToStr(i)+'.');
str(i, temp);
tempvar := TXQTermVariable.create(temp+'.');
writeln(tempvar.value);
tempvar.index := high(fresult.parameters);
TXQTermDynamicFunctionCall(fresult.body).push(tempvar);
fresult.parameters[i].variable := TXQTermVariable(TXQTermDynamicFunctionCall(fresult.body).children[high(TXQTermDynamicFunctionCall(fresult.body).children)].clone);
Expand Down

0 comments on commit 5c39807

Please sign in to comment.