You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect Asm in x64 FastStringBuilder Append for Char #5
Using Delphi Tokyo, I've added testcases for FastStringBuilder.TStringBuilder and I'm unable to confirm your findings both on x64 and x86. Can you pls download the lastest code, retry, and state which compiler you're using. I have Berlin as well. And with a bit of effort I may be able to test it on the older compilers.
Here's the testcode I used to try and confirm your case:
procedure TTestFastStringBuilder<T>.Setup;
begin
FData:= TStringBuilder.Create;
end;
procedure TTestFastStringBuilder<T>.TearDown;
begin
FData.Free;
end;
procedure TTestFastStringBuilder<T>.HardcodedSandwhich;
var
s: string;
c: char;
norm: string;
begin
s:= 'items:{}';
FData.Append('{');
if TypeInfo(T) = TypeInfo(char) then begin
FData.Append('{');
norm := '{' + '{' + '}';
end else if TypeInfo(T) = TypeInfo(string) then begin
FData.Append(s);
norm := '{' + s + '}';
end;
FData.Append('}');
Assert.IsTrue(FData.ToString = norm,'HardcodedSandwhich failed, expected: '+norm+' got: '+FData.ToString);
end;
Activity
JBontes commentedon Oct 15, 2018
Using Delphi Tokyo, I've added testcases for
FastStringBuilder.TStringBuilderand I'm unable to confirm your findings both on x64 and x86. Can you pls download the lastest code, retry, and state which compiler you're using. I have Berlin as well. And with a bit of effort I may be able to test it on the older compilers.Here's the testcode I used to try and confirm your case: