mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-24 17:41:41 +02:00
* fixed DFA warnings for JVM target
git-svn-id: trunk@28503 -
This commit is contained in:
parent
d22dc68fda
commit
b13ef4e3bb
@ -526,6 +526,8 @@ implementation
|
|||||||
i: longint;
|
i: longint;
|
||||||
toplevelowner: tsymtable;
|
toplevelowner: tsymtable;
|
||||||
begin
|
begin
|
||||||
|
superclass:=nil;
|
||||||
|
|
||||||
{ JVM 1.5+ }
|
{ JVM 1.5+ }
|
||||||
AsmWriteLn('.bytecode 49.0');
|
AsmWriteLn('.bytecode 49.0');
|
||||||
// include files are not support by Java, and the directory of the main
|
// include files are not support by Java, and the directory of the main
|
||||||
@ -763,6 +765,8 @@ implementation
|
|||||||
2:result:=tostr(smallint(csym.value.valueord.svalue));
|
2:result:=tostr(smallint(csym.value.valueord.svalue));
|
||||||
4:result:=tostr(longint(csym.value.valueord.svalue));
|
4:result:=tostr(longint(csym.value.valueord.svalue));
|
||||||
8:result:=tostr(csym.value.valueord.svalue);
|
8:result:=tostr(csym.value.valueord.svalue);
|
||||||
|
else
|
||||||
|
internalerror(2014082050);
|
||||||
end;
|
end;
|
||||||
conststring:
|
conststring:
|
||||||
result:=constastr(pchar(csym.value.valueptr),csym.value.len);
|
result:=constastr(pchar(csym.value.valueptr),csym.value.len);
|
||||||
|
|||||||
@ -340,6 +340,12 @@ implementation
|
|||||||
reasonbuf,
|
reasonbuf,
|
||||||
exceptreg: tregister;
|
exceptreg: tregister;
|
||||||
begin
|
begin
|
||||||
|
oldBreakLabel:=nil;
|
||||||
|
oldContinueLabel:=nil;
|
||||||
|
finallycodecopy:=nil;
|
||||||
|
continuefinallylabel:=nil;
|
||||||
|
breakfinallylabel:=nil;
|
||||||
|
|
||||||
{ not necessary on a garbage-collected platform }
|
{ not necessary on a garbage-collected platform }
|
||||||
if implicitframe then
|
if implicitframe then
|
||||||
internalerror(2011031803);
|
internalerror(2011031803);
|
||||||
|
|||||||
@ -87,13 +87,13 @@ implementation
|
|||||||
|
|
||||||
function tjvminlinenode.typecheck_length(var handled: boolean): tnode;
|
function tjvminlinenode.typecheck_length(var handled: boolean): tnode;
|
||||||
begin
|
begin
|
||||||
|
result:=nil;
|
||||||
typecheckpass(left);
|
typecheckpass(left);
|
||||||
if is_open_array(left.resultdef) or
|
if is_open_array(left.resultdef) or
|
||||||
is_dynamic_array(left.resultdef) or
|
is_dynamic_array(left.resultdef) or
|
||||||
is_array_of_const(left.resultdef) then
|
is_array_of_const(left.resultdef) then
|
||||||
begin
|
begin
|
||||||
resultdef:=s32inttype;
|
resultdef:=s32inttype;
|
||||||
result:=nil;
|
|
||||||
handled:=true;
|
handled:=true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -101,6 +101,7 @@ implementation
|
|||||||
|
|
||||||
function tjvminlinenode.typecheck_high(var handled: boolean): tnode;
|
function tjvminlinenode.typecheck_high(var handled: boolean): tnode;
|
||||||
begin
|
begin
|
||||||
|
result:=nil;
|
||||||
typecheckpass(left);
|
typecheckpass(left);
|
||||||
if is_dynamic_array(left.resultdef) or
|
if is_dynamic_array(left.resultdef) or
|
||||||
is_open_array(left.resultdef) or
|
is_open_array(left.resultdef) or
|
||||||
@ -120,6 +121,7 @@ implementation
|
|||||||
para: tcallparanode;
|
para: tcallparanode;
|
||||||
elemdef: tdef;
|
elemdef: tdef;
|
||||||
begin
|
begin
|
||||||
|
result:=nil;
|
||||||
{ normally never exists; used by the JVM backend to create new
|
{ normally never exists; used by the JVM backend to create new
|
||||||
arrays because it requires special opcodes }
|
arrays because it requires special opcodes }
|
||||||
tcallparanode(left).get_paratype;
|
tcallparanode(left).get_paratype;
|
||||||
@ -150,7 +152,6 @@ implementation
|
|||||||
para:=tcallparanode(para.right);
|
para:=tcallparanode(para.right);
|
||||||
elemdef:=tarraydef(elemdef).elementdef;
|
elemdef:=tarraydef(elemdef).elementdef;
|
||||||
end;
|
end;
|
||||||
result:=nil;
|
|
||||||
resultdef:=left.resultdef;
|
resultdef:=left.resultdef;
|
||||||
handled:=true;
|
handled:=true;
|
||||||
end;
|
end;
|
||||||
@ -289,6 +290,7 @@ implementation
|
|||||||
var
|
var
|
||||||
handled: boolean;
|
handled: boolean;
|
||||||
begin
|
begin
|
||||||
|
result:=nil;
|
||||||
handled:=false;
|
handled:=false;
|
||||||
case inlinenumber of
|
case inlinenumber of
|
||||||
in_length_x:
|
in_length_x:
|
||||||
|
|||||||
@ -361,6 +361,8 @@ implementation
|
|||||||
newsize: tcgsize;
|
newsize: tcgsize;
|
||||||
isjump: boolean;
|
isjump: boolean;
|
||||||
begin
|
begin
|
||||||
|
otl:=nil;
|
||||||
|
ofl:=nil;
|
||||||
if left.resultdef.typ=stringdef then
|
if left.resultdef.typ=stringdef then
|
||||||
internalerror(2011052702);
|
internalerror(2011052702);
|
||||||
|
|
||||||
|
|||||||
@ -75,6 +75,9 @@ implementation
|
|||||||
paras: tcallparanode;
|
paras: tcallparanode;
|
||||||
proc: string;
|
proc: string;
|
||||||
begin
|
begin
|
||||||
|
result:=nil;
|
||||||
|
proc:='';
|
||||||
|
temp:=nil;
|
||||||
if not assigned(p.resultdef) then
|
if not assigned(p.resultdef) then
|
||||||
typecheckpass(p);
|
typecheckpass(p);
|
||||||
if ((p.resultdef.typ=stringdef) and
|
if ((p.resultdef.typ=stringdef) and
|
||||||
|
|||||||
@ -145,8 +145,8 @@ unit tgcpu;
|
|||||||
if tprocsym(sym).procdeflist.Count<>1 then
|
if tprocsym(sym).procdeflist.Count<>1 then
|
||||||
internalerror(2011062801);
|
internalerror(2011062801);
|
||||||
pd:=tprocdef(tprocsym(sym).procdeflist[0]);
|
pd:=tprocdef(tprocsym(sym).procdeflist[0]);
|
||||||
end;
|
|
||||||
hlcg.a_call_name(list,pd,pd.mangledname,nil,false);
|
hlcg.a_call_name(list,pd,pd.mangledname,nil,false);
|
||||||
|
end;
|
||||||
{ static calls method replaces parameter with set instance
|
{ static calls method replaces parameter with set instance
|
||||||
-> no change in stack height }
|
-> no change in stack height }
|
||||||
end
|
end
|
||||||
@ -202,8 +202,8 @@ unit tgcpu;
|
|||||||
if tprocsym(sym).procdeflist.Count<>1 then
|
if tprocsym(sym).procdeflist.Count<>1 then
|
||||||
internalerror(2011052404);
|
internalerror(2011052404);
|
||||||
pd:=tprocdef(tprocsym(sym).procdeflist[0]);
|
pd:=tprocdef(tprocsym(sym).procdeflist[0]);
|
||||||
end;
|
|
||||||
hlcg.a_call_name(list,pd,pd.mangledname,nil,false);
|
hlcg.a_call_name(list,pd,pd.mangledname,nil,false);
|
||||||
|
end;
|
||||||
{ static calls method replaces parameter with string instance
|
{ static calls method replaces parameter with string instance
|
||||||
-> no change in stack height }
|
-> no change in stack height }
|
||||||
{ store reference to instance }
|
{ store reference to instance }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user