diff --git a/compiler/agjasmin.pas b/compiler/agjasmin.pas index c33747f422..10fee0677a 100644 --- a/compiler/agjasmin.pas +++ b/compiler/agjasmin.pas @@ -526,6 +526,8 @@ implementation i: longint; toplevelowner: tsymtable; begin + superclass:=nil; + { JVM 1.5+ } AsmWriteLn('.bytecode 49.0'); // 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)); 4:result:=tostr(longint(csym.value.valueord.svalue)); 8:result:=tostr(csym.value.valueord.svalue); + else + internalerror(2014082050); end; conststring: result:=constastr(pchar(csym.value.valueptr),csym.value.len); diff --git a/compiler/jvm/njvmflw.pas b/compiler/jvm/njvmflw.pas index 966a57a23d..25f9d11fb0 100644 --- a/compiler/jvm/njvmflw.pas +++ b/compiler/jvm/njvmflw.pas @@ -340,6 +340,12 @@ implementation reasonbuf, exceptreg: tregister; begin + oldBreakLabel:=nil; + oldContinueLabel:=nil; + finallycodecopy:=nil; + continuefinallylabel:=nil; + breakfinallylabel:=nil; + { not necessary on a garbage-collected platform } if implicitframe then internalerror(2011031803); diff --git a/compiler/jvm/njvminl.pas b/compiler/jvm/njvminl.pas index e4176fc838..3141b48016 100644 --- a/compiler/jvm/njvminl.pas +++ b/compiler/jvm/njvminl.pas @@ -87,13 +87,13 @@ implementation function tjvminlinenode.typecheck_length(var handled: boolean): tnode; begin + result:=nil; typecheckpass(left); if is_open_array(left.resultdef) or is_dynamic_array(left.resultdef) or is_array_of_const(left.resultdef) then begin resultdef:=s32inttype; - result:=nil; handled:=true; end; end; @@ -101,6 +101,7 @@ implementation function tjvminlinenode.typecheck_high(var handled: boolean): tnode; begin + result:=nil; typecheckpass(left); if is_dynamic_array(left.resultdef) or is_open_array(left.resultdef) or @@ -120,6 +121,7 @@ implementation para: tcallparanode; elemdef: tdef; begin + result:=nil; { normally never exists; used by the JVM backend to create new arrays because it requires special opcodes } tcallparanode(left).get_paratype; @@ -150,7 +152,6 @@ implementation para:=tcallparanode(para.right); elemdef:=tarraydef(elemdef).elementdef; end; - result:=nil; resultdef:=left.resultdef; handled:=true; end; @@ -289,6 +290,7 @@ implementation var handled: boolean; begin + result:=nil; handled:=false; case inlinenumber of in_length_x: diff --git a/compiler/jvm/njvmmem.pas b/compiler/jvm/njvmmem.pas index a93902a3f5..a65a070077 100644 --- a/compiler/jvm/njvmmem.pas +++ b/compiler/jvm/njvmmem.pas @@ -361,6 +361,8 @@ implementation newsize: tcgsize; isjump: boolean; begin + otl:=nil; + ofl:=nil; if left.resultdef.typ=stringdef then internalerror(2011052702); diff --git a/compiler/jvm/njvmutil.pas b/compiler/jvm/njvmutil.pas index 72df2627b2..ad61b5099c 100644 --- a/compiler/jvm/njvmutil.pas +++ b/compiler/jvm/njvmutil.pas @@ -75,6 +75,9 @@ implementation paras: tcallparanode; proc: string; begin + result:=nil; + proc:=''; + temp:=nil; if not assigned(p.resultdef) then typecheckpass(p); if ((p.resultdef.typ=stringdef) and diff --git a/compiler/jvm/tgcpu.pas b/compiler/jvm/tgcpu.pas index e768e1883f..12f163226b 100644 --- a/compiler/jvm/tgcpu.pas +++ b/compiler/jvm/tgcpu.pas @@ -145,8 +145,8 @@ unit tgcpu; if tprocsym(sym).procdeflist.Count<>1 then internalerror(2011062801); pd:=tprocdef(tprocsym(sym).procdeflist[0]); + hlcg.a_call_name(list,pd,pd.mangledname,nil,false); end; - hlcg.a_call_name(list,pd,pd.mangledname,nil,false); { static calls method replaces parameter with set instance -> no change in stack height } end @@ -202,8 +202,8 @@ unit tgcpu; if tprocsym(sym).procdeflist.Count<>1 then internalerror(2011052404); pd:=tprocdef(tprocsym(sym).procdeflist[0]); + hlcg.a_call_name(list,pd,pd.mangledname,nil,false); end; - hlcg.a_call_name(list,pd,pd.mangledname,nil,false); { static calls method replaces parameter with string instance -> no change in stack height } { store reference to instance }