* store/load tloopnode.loopflags to/from ppu files so that for/repeat/while

loops are correctly inlined (mantis #17493)

git-svn-id: trunk@16106 -
This commit is contained in:
Jonas Maebe 2010-10-08 13:01:25 +00:00
parent 1f362c35f3
commit 92997a0249
5 changed files with 35 additions and 1 deletions

2
.gitattributes vendored
View File

@ -10690,6 +10690,7 @@ tests/webtbs/tw17413.pp svneol=native#text/plain
tests/webtbs/tw17430.pp svneol=native#text/plain
tests/webtbs/tw1744.pp svneol=native#text/plain
tests/webtbs/tw17458.pp svneol=native#text/plain
tests/webtbs/tw17493.pp svneol=native#text/plain
tests/webtbs/tw17514.pp svneol=native#text/plain
tests/webtbs/tw17546.pp svneol=native#text/plain
tests/webtbs/tw1754c.pp svneol=native#text/plain
@ -11549,6 +11550,7 @@ tests/webtbs/uw14958.pp svneol=native#text/plain
tests/webtbs/uw15909.pp svneol=native#text/plain
tests/webtbs/uw17220.pp svneol=native#text/plain
tests/webtbs/uw17220a.pp svneol=native#text/plain
tests/webtbs/uw17493.pp svneol=native#text/plain
tests/webtbs/uw2004.inc svneol=native#text/plain
tests/webtbs/uw2040.pp svneol=native#text/plain
tests/webtbs/uw2266a.inc svneol=native#text/plain

View File

@ -934,6 +934,7 @@ implementation
inherited ppuload(t,ppufile);
t1:=ppuloadnode(ppufile);
t2:=ppuloadnode(ppufile);
ppufile.getsmallset(loopflags);
end;
@ -942,6 +943,7 @@ implementation
inherited ppuwrite(ppufile);
ppuwritenode(ppufile,t1);
ppuwritenode(ppufile,t2);
ppufile.putsmallset(loopflags);
end;

View File

@ -43,7 +43,7 @@ type
{$endif Test_Double_checksum}
const
CurrentPPUVersion = 120;
CurrentPPUVersion = 121;
{ buffer sizes }
maxentrysize = 1024;

10
tests/webtbs/tw17493.pp Normal file
View File

@ -0,0 +1,10 @@
{ %recompile }
{$inline on}
uses
uw17493;
begin
test;
end.

20
tests/webtbs/uw17493.pp Normal file
View File

@ -0,0 +1,20 @@
{$inline on}
unit uw17493;
interface
procedure test; inline;
implementation
procedure test; inline;
var
a: boolean;
begin
a:=paramcount>100;
while a do
halt(1);
end;
end.