* synchronized with trunk

git-svn-id: branches/wasm@46310 -
This commit is contained in:
nickysn 2020-08-07 22:10:49 +00:00
commit 2a40acba19
6 changed files with 22 additions and 12 deletions

1
.gitattributes vendored
View File

@ -18447,6 +18447,7 @@ tests/webtbs/tw37449.pp svneol=native#text/pascal
tests/webtbs/tw37468.pp svneol=native#text/pascal
tests/webtbs/tw37477.pp svneol=native#text/pascal
tests/webtbs/tw37493.pp svneol=native#text/pascal
tests/webtbs/tw37508.pp svneol=native#text/pascal
tests/webtbs/tw3751.pp svneol=native#text/plain
tests/webtbs/tw3758.pp svneol=native#text/plain
tests/webtbs/tw3764.pp svneol=native#text/plain

View File

@ -556,8 +556,7 @@ type
R_ADDRESSREGISTER :
result:=taicpu.op_ref_reg(A_MOVE,S_L,ref,r);
R_FPUREGISTER :
// no need to handle sizes here
result:=taicpu.op_ref_reg(A_FMOVE,S_FS,ref,r);
result:=taicpu.op_ref_reg(A_FMOVE,fpuregopsize,ref,r);
else
internalerror(200602011);
end;
@ -572,8 +571,7 @@ type
R_ADDRESSREGISTER :
result:=taicpu.op_reg_ref(A_MOVE,S_L,r,ref);
R_FPUREGISTER :
// no need to handle sizes here
result:=taicpu.op_reg_ref(A_FMOVE,S_FS,r,ref);
result:=taicpu.op_reg_ref(A_FMOVE,fpuregopsize,r,ref);
else
internalerror(200602012);
end;

View File

@ -737,7 +737,7 @@ implementation
begin
case nodetype of
muln:
result := cunaryminusnode.create(left.getcopy);
result := ctypeconvnode.create_internal(cunaryminusnode.create(left.getcopy),left.resultdef);
else
;
end;
@ -818,9 +818,9 @@ implementation
begin
case nodetype of
addn,orn,xorn:
result := right.getcopy;
result := right.getcopy;
subn:
result := cunaryminusnode.create(right.getcopy);
result := ctypeconvnode.create_internal(cunaryminusnode.create(right.getcopy),right.resultdef);
andn,muln:
begin
if (cs_opt_level4 in current_settings.optimizerswitches) or
@ -844,7 +844,7 @@ implementation
begin
case nodetype of
muln:
result := cunaryminusnode.create(right.getcopy);
result := ctypeconvnode.create_internal(cunaryminusnode.create(right.getcopy),right.resultdef);
else
;
end;
@ -976,7 +976,7 @@ implementation
end;
subn:
begin
result:=cunaryminusnode.create(right.getcopy);
result:=ctypeconvnode.create_internal(cunaryminusnode.create(right.getcopy),right.resultdef);
exit;
end;
else

View File

@ -113,7 +113,7 @@ Type
TJSONRestorePropertyEvent = Procedure (Sender : TObject; AObject : TObject; Info : PPropInfo; AValue : TJSONData; Var Handled : Boolean) of object;
TJSONPropertyErrorEvent = Procedure (Sender : TObject; AObject : TObject; Info : PPropInfo; AValue : TJSONData; Error : Exception; Var Continue : Boolean) of object;
TJSONGetObjectEvent = Procedure (Sender : TOBject; AObject : TObject; Info : PPropInfo; AData : TJSONObject; DataName : TJSONStringType; Var AValue : TObject);
TJSONDestreamOption = (jdoCaseInsensitive,jdoIgnorePropertyErrors);
TJSONDestreamOption = (jdoCaseInsensitive,jdoIgnorePropertyErrors,jdoIgnoreNulls);
TJSONDestreamOptions = set of TJSONDestreamOption;
TJSONDeStreamer = Class(TJSONFiler)
@ -396,7 +396,9 @@ begin
If B then
exit;
end;
DoRestoreProperty(AObject,PropInfo,PropData);
if (PropData.JSONType=jtNull) then
if Not (jdoIgnoreNulls in Options) then
DoRestoreProperty(AObject,PropInfo,PropData);
except
On E : Exception do
If Assigned(FOnPropError) then

6
tests/webtbs/tw37508.pp Normal file
View File

@ -0,0 +1,6 @@
{ %OPT=-O3 }
var a, b : integer;
begin
b := 0;
b := b - a - a { `b := b - a` won't trigger the error }
end.

View File

@ -284,6 +284,8 @@ end;
procedure THTTPCompilerApplication.LoadDefaultMimeTypes;
begin
MimeTypes.LoadKnownTypes;
// To be sure
MimeTypes.AddType('application/xhtml+xml','xhtml;xht');
MimeTypes.AddType('text/html','html;htm');
MimeTypes.AddType('text/plain','txt');
@ -296,6 +298,7 @@ begin
MimeTypes.AddType('image/jp2','jp2');
MimeTypes.AddType('image/tiff','tiff;tif');
MimeTypes.AddType('application/pdf','pdf');
MimeTypes.AddType('text/css','css');
end;
constructor THTTPCompilerApplication.Create(AOWner: TComponent);
@ -366,7 +369,7 @@ end;
procedure THTTPCompilerApplication.AddToStatus(AEntry: TDirectoryEntry; AEvents: TFileEvents);
Var
Var
O : TJSONObject;
FN : String;