summaryrefslogtreecommitdiff
path: root/compiler/jvm
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2019-05-12 14:29:03 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2019-05-12 14:29:03 +0000
commit57e0911ae50816f80af023d3c95d32cb6a3da109 (patch)
treee5d227ba89a29dcb480dde1b1a0301f6ae1f54a6 /compiler/jvm
parent8fd82e3cd06e06a857681d7d6d28c0b0e9bfa2ff (diff)
downloadfpc-57e0911ae50816f80af023d3c95d32cb6a3da109.tar.gz
* fix case completeness and unreachable code warnings in compiler that would
be introduced by the next commit git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@42046 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/jvm')
-rw-r--r--compiler/jvm/agjasmin.pas8
-rw-r--r--compiler/jvm/aoptcpu.pas2
-rw-r--r--compiler/jvm/cpupara.pas2
-rw-r--r--compiler/jvm/dbgjasm.pas4
-rw-r--r--compiler/jvm/hlcgcpu.pas16
-rw-r--r--compiler/jvm/jvmdef.pas12
-rw-r--r--compiler/jvm/njvmcnv.pas2
-rw-r--r--compiler/jvm/njvmcon.pas2
-rw-r--r--compiler/jvm/njvminl.pas2
-rw-r--r--compiler/jvm/rgcpu.pas8
-rw-r--r--compiler/jvm/tgcpu.pas4
11 files changed, 52 insertions, 10 deletions
diff --git a/compiler/jvm/agjasmin.pas b/compiler/jvm/agjasmin.pas
index a3755cb328..12b51ad688 100644
--- a/compiler/jvm/agjasmin.pas
+++ b/compiler/jvm/agjasmin.pas
@@ -624,6 +624,8 @@ implementation
internalerror(2011010906);
end;
end;
+ else
+ ;
end;
{ superclass }
if assigned(superclass) then
@@ -1014,6 +1016,8 @@ implementation
if not(df_generic in tprocdef(tprocsym(sym).procdeflist[j]).defoptions) then
WriteSymtableVarSyms(tprocdef(tprocsym(sym).procdeflist[j]).localst);
end;
+ else
+ ;
end;
end;
end;
@@ -1044,6 +1048,8 @@ implementation
WriteSymtableProcdefs(tprocdef(def).localst);
end;
end;
+ else
+ ;
end;
end;
end;
@@ -1069,6 +1075,8 @@ implementation
nestedstructs.add(def);
recorddef:
nestedstructs.add(def);
+ else
+ ;
end;
end;
for i:=0 to nestedstructs.count-1 do
diff --git a/compiler/jvm/aoptcpu.pas b/compiler/jvm/aoptcpu.pas
index c447ca33d3..877f2b196c 100644
--- a/compiler/jvm/aoptcpu.pas
+++ b/compiler/jvm/aoptcpu.pas
@@ -135,6 +135,8 @@ Implementation
RemoveCommutativeSwap(p) then
exit(true)
end;
+ else
+ ;
end;
end;
diff --git a/compiler/jvm/cpupara.pas b/compiler/jvm/cpupara.pas
index e12a1a143b..1cfc1c9266 100644
--- a/compiler/jvm/cpupara.pas
+++ b/compiler/jvm/cpupara.pas
@@ -291,6 +291,8 @@ implementation
paraloc^.loc:=LOC_REFERENCE;
paraloc^.reference.index:=NR_STACK_POINTER_REG;
end;
+ else
+ ;
end;
{ 2 slots for 64 bit integers and floats, 1 slot for the rest }
if not(is_64bit(paradef) or
diff --git a/compiler/jvm/dbgjasm.pas b/compiler/jvm/dbgjasm.pas
index 40c971ad74..7186661093 100644
--- a/compiler/jvm/dbgjasm.pas
+++ b/compiler/jvm/dbgjasm.pas
@@ -193,8 +193,12 @@ implementation
inc(nolineinfolevel);
mark_NoLineInfoEnd:
dec(nolineinfolevel);
+ else
+ ;
end;
end;
+ else
+ ;
end;
{ Java does not support multiple source files }
diff --git a/compiler/jvm/hlcgcpu.pas b/compiler/jvm/hlcgcpu.pas
index 487588d92b..ec4dbd93d6 100644
--- a/compiler/jvm/hlcgcpu.pas
+++ b/compiler/jvm/hlcgcpu.pas
@@ -348,6 +348,8 @@ implementation
a:=shortint(a);
u16bit:
a:=smallint(a);
+ else
+ ;
end;
end;
a_load_const_stack(list,size,a,typ);
@@ -643,6 +645,8 @@ implementation
(fromloc.reference.indexbase<>NR_STACK_POINTER_REG) then
g_allocload_reg_reg(list,voidpointertype,fromloc.reference.indexbase,toloc.reference.indexbase,R_ADDRESSREGISTER);
end;
+ else
+ ;
end;
end;
else
@@ -726,6 +730,8 @@ implementation
end;
procvardef:
g_call_system_proc(list,'fpc_initialize_array_procvar',[],nil);
+ else
+ internalerror(2019051025);
end;
tg.ungettemp(list,recref);
end;
@@ -856,6 +862,8 @@ implementation
a_op_const_stack(list,OP_XOR,size,cardinal($80000000));
OS_64,OS_S64:
a_op_const_stack(list,OP_XOR,size,tcgint($8000000000000000));
+ else
+ ;
end;
end;
@@ -871,7 +879,11 @@ implementation
OS_32,OS_S32:
result:=a xor cardinal($80000000);
OS_64,OS_S64:
+{$push}{$r-}
result:=a xor tcgint($8000000000000000);
+{$pop}
+ else
+ ;
end;
end;
@@ -1520,6 +1532,8 @@ implementation
handled:=true;
end;
end;
+ else
+ ;
end;
if not handled then
inherited;
@@ -2237,6 +2251,8 @@ implementation
a_op_const_stack(list,OP_AND,s32inttype,65535);
OS_S16:
list.concat(taicpu.op_none(a_i2s));
+ else
+ ;
end;
end;
diff --git a/compiler/jvm/jvmdef.pas b/compiler/jvm/jvmdef.pas
index c5c18eefc4..5f712c7752 100644
--- a/compiler/jvm/jvmdef.pas
+++ b/compiler/jvm/jvmdef.pas
@@ -302,8 +302,6 @@ implementation
ft_typed,
ft_untyped:
result:=jvmaddencodedtype(search_system_type('FILEREC').typedef,false,encodedstr,forcesignature,founderror);
- else
- internalerror(2015091406);
end;
end;
recorddef :
@@ -768,8 +766,12 @@ implementation
if torddef(def).high>127 then
result:=s8inttype;
u16bit:
- if torddef(def).high>32767 then
- result:=s16inttype;
+ begin
+ if torddef(def).high>32767 then
+ result:=s16inttype;
+ end
+ else
+ ;
end;
end;
@@ -900,6 +902,8 @@ implementation
usedef:=s16inttype;
u16bit:
usedef:=s32inttype;
+ else
+ ;
end;
end;
result:=jvmencodetype(usedef,false);
diff --git a/compiler/jvm/njvmcnv.pas b/compiler/jvm/njvmcnv.pas
index 9044ceb538..c4522dc197 100644
--- a/compiler/jvm/njvmcnv.pas
+++ b/compiler/jvm/njvmcnv.pas
@@ -1147,8 +1147,6 @@ implementation
ft_typed,
ft_untyped:
result:=def2=search_system_type('FILEREC').typedef;
- else
- internalerror(2015091401);
end
else
result:=false;
diff --git a/compiler/jvm/njvmcon.pas b/compiler/jvm/njvmcon.pas
index b52c4211c1..8b98c7670b 100644
--- a/compiler/jvm/njvmcon.pas
+++ b/compiler/jvm/njvmcon.pas
@@ -400,8 +400,6 @@ implementation
inserttypeconv_explicit(result,cpointerdef.getreusable(resultdef));
result:=cderefnode.create(result);
end;
- else
- internalerror(2011060301);
end;
end;
diff --git a/compiler/jvm/njvminl.pas b/compiler/jvm/njvminl.pas
index 866fbd01af..34af3952a8 100644
--- a/compiler/jvm/njvminl.pas
+++ b/compiler/jvm/njvminl.pas
@@ -311,6 +311,8 @@ implementation
if left.resultdef.typ in [objectdef,classrefdef] then
Message(parser_e_illegal_expression);
end;
+ else
+ ;
end;
if not handled then
result:=inherited pass_typecheck;
diff --git a/compiler/jvm/rgcpu.pas b/compiler/jvm/rgcpu.pas
index cc8dc32d28..41606cf263 100644
--- a/compiler/jvm/rgcpu.pas
+++ b/compiler/jvm/rgcpu.pas
@@ -164,6 +164,8 @@ implementation
if (getsupreg(taicpu(p).oper[0]^.ref^.indexbase)=sr) then
exit(true);
end;
+ else
+ ;
end;
end;
@@ -313,6 +315,8 @@ implementation
continue;
end;
end;
+ else
+ ;
end;
p:=tai(p.next);
end;
@@ -385,6 +389,8 @@ implementation
{ don't invalidate the temp reference, may still be used one instruction
later }
end;
+ else
+ ;
end;
{ insert the tempallocation/free at the right place }
list.insertlistbefore(p,templist);
@@ -398,6 +404,8 @@ implementation
end;
ait_instruction:
do_spill_replace_all(list,taicpu(p),spill_temps);
+ else
+ ;
end;
p:=Tai(p.next);
end;
diff --git a/compiler/jvm/tgcpu.pas b/compiler/jvm/tgcpu.pas
index 7c888b0616..fa2b6103a6 100644
--- a/compiler/jvm/tgcpu.pas
+++ b/compiler/jvm/tgcpu.pas
@@ -219,10 +219,10 @@ unit tgcpu;
ft_typed,
ft_untyped:
result:=getifspecialtemp(list,search_system_type('FILEREC').typedef,forcesize,temptype,ref);
- else
- internalerror(2015091405);
end;
end;
+ else
+ ;
end;
end;