summaryrefslogtreecommitdiff
path: root/compiler/jvm
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-21 23:24:37 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-21 23:24:37 +0000
commitad1141d52f8353457053b925cd674fe1d5c4eafc (patch)
treeaa541e18564c2876adf659a772b4cec2669a24dc /compiler/jvm
parent9a4ce580e758aec2235d58a1bfb10f981ba03c1b (diff)
downloadfpc-ad1141d52f8353457053b925cd674fe1d5c4eafc.tar.gz
- reverted partial commit of merge
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/blocks@29515 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/jvm')
-rw-r--r--compiler/jvm/cpuinfo.pas20
-rw-r--r--compiler/jvm/dbgjasm.pas44
-rw-r--r--compiler/jvm/njvmflw.pas6
-rw-r--r--compiler/jvm/njvminl.pas6
-rw-r--r--compiler/jvm/njvmmem.pas2
-rw-r--r--compiler/jvm/njvmutil.pas3
-rw-r--r--compiler/jvm/tgcpu.pas8
7 files changed, 12 insertions, 77 deletions
diff --git a/compiler/jvm/cpuinfo.pas b/compiler/jvm/cpuinfo.pas
index 62b89fcd1f..e4918dc954 100644
--- a/compiler/jvm/cpuinfo.pas
+++ b/compiler/jvm/cpuinfo.pas
@@ -21,9 +21,6 @@ Interface
Type
bestreal = double;
-{$if FPC_FULLVERSION>20700}
- bestrealrec = TDoubleRec;
-{$endif FPC_FULLVERSION>20700}
ts32real = single;
ts64real = double;
ts80real = extended;
@@ -47,25 +44,8 @@ Type
fpu_standard
);
- tcontrollertype =
- (ct_none
- );
-
Const
- { Is there support for dealing with multiple microcontrollers available }
- { for this platform? }
- ControllerSupport = false;
-
- { We know that there are fields after sramsize
- but we don't care about this warning }
- {$PUSH}
- {$WARN 3177 OFF}
- embedded_controllers : array [tcontrollertype] of tcontrollerdatatype =
- (
- (controllertypestr:''; controllerunitstr:''; flashbase:0; flashsize:0; srambase:0; sramsize:0));
- {$POP}
-
{ calling conventions supported by the code generator }
supported_calling_conventions : tproccalloptions = [
pocall_internproc
diff --git a/compiler/jvm/dbgjasm.pas b/compiler/jvm/dbgjasm.pas
index 40c971ad74..2b76bbc1ca 100644
--- a/compiler/jvm/dbgjasm.pas
+++ b/compiler/jvm/dbgjasm.pas
@@ -38,10 +38,9 @@ interface
TDebugInfoJasmin=class(TDebugInfo)
protected
fcurrprocstart,
- fcurrprocafterstart,
fcurrprocend: tasmsymbol;
- procedure appendsym_localsym(list: TAsmList; sym: tabstractnormalvarsym; startlab: tasmsymbol);
+ procedure appendsym_localsym(list: TAsmList; sym: tabstractnormalvarsym);
procedure appendsym_paravar(list:TAsmList;sym:tparavarsym);override;
procedure appendsym_localvar(list:TAsmList;sym:tlocalvarsym);override;
@@ -66,7 +65,7 @@ implementation
TDebugInfoJasmin
****************************************************************************}
- procedure TDebugInfoJasmin.appendsym_localsym(list: TAsmList; sym: tabstractnormalvarsym; startlab: tasmsymbol);
+ procedure TDebugInfoJasmin.appendsym_localsym(list: TAsmList; sym: tabstractnormalvarsym);
var
jvar: tai_jvar;
proc: tprocdef;
@@ -76,20 +75,20 @@ implementation
if not(sym.localloc.loc in [LOC_REFERENCE,LOC_CREFERENCE]) then
exit;
proc:=tprocdef(sym.owner.defowner);
- jvar:=tai_jvar.create(sym.localloc.reference.offset,jvmmangledbasename(sym,true),startlab,fcurrprocend);
+ jvar:=tai_jvar.create(sym.localloc.reference.offset,jvmmangledbasename(sym,true),fcurrprocstart,fcurrprocend);
tcpuprocdef(proc).exprasmlist.InsertAfter(jvar,proc.procstarttai);
end;
procedure TDebugInfoJasmin.appendsym_paravar(list: TAsmList; sym: tparavarsym);
begin
- appendsym_localsym(list,sym,fcurrprocstart);
+ appendsym_localsym(list,sym);
end;
procedure TDebugInfoJasmin.appendsym_localvar(list: TAsmList; sym: tlocalvarsym);
begin
- appendsym_localsym(list,sym,fcurrprocafterstart);
+ appendsym_localsym(list,sym);
end;
@@ -101,11 +100,7 @@ implementation
procedure TDebugInfoJasmin.appendprocdef(list: TAsmList; def: tprocdef);
var
procstartlabel,
- procendlabel,
- afterprocstartlabel : tasmlabel;
- hp,
- afterproccodestart : tai;
- instrcount : longint;
+ procendlabel : tasmlabel;
begin
{ insert debug information for local variables and parameters, but only
for routines implemented in the Pascal code }
@@ -118,33 +113,6 @@ implementation
tcpuprocdef(def).exprasmlist.insertbefore(tai_label.create(procendlabel),def.procendtai);
fcurrprocstart:=procstartlabel;
- { set the start label for local variables after the first instruction,
- because javac's code completion support assumes that all info at
- bytecode position 0 is for parameters }
- instrcount:=0;
- afterproccodestart:=def.procstarttai;
- while assigned(afterproccodestart.next) do
- begin
- afterproccodestart:=tai(afterproccodestart.next);
- if (afterproccodestart.typ=ait_instruction) then
- break;
- end;
- { must be followed by at least one more instruction }
- hp:=tai(afterproccodestart.next);
- while assigned(hp) do
- begin
- if hp.typ=ait_instruction then
- break;
- hp:=tai(hp.next);
- end;
- if assigned(hp) then
- begin
- current_asmdata.getlabel(afterprocstartlabel,alt_dbgtype);
- tcpuprocdef(def).exprasmlist.insertafter(tai_label.create(afterprocstartlabel),afterproccodestart);
- fcurrprocafterstart:=afterprocstartlabel;
- end
- else
- fcurrprocafterstart:=procstartlabel;
fcurrprocend:=procendlabel;
write_symtable_parasyms(list,def.paras);
diff --git a/compiler/jvm/njvmflw.pas b/compiler/jvm/njvmflw.pas
index 25f9d11fb0..966a57a23d 100644
--- a/compiler/jvm/njvmflw.pas
+++ b/compiler/jvm/njvmflw.pas
@@ -340,12 +340,6 @@ 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 3141b48016..e4176fc838 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,7 +101,6 @@ 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
@@ -121,7 +120,6 @@ 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;
@@ -152,6 +150,7 @@ implementation
para:=tcallparanode(para.right);
elemdef:=tarraydef(elemdef).elementdef;
end;
+ result:=nil;
resultdef:=left.resultdef;
handled:=true;
end;
@@ -290,7 +289,6 @@ 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 a65a070077..a93902a3f5 100644
--- a/compiler/jvm/njvmmem.pas
+++ b/compiler/jvm/njvmmem.pas
@@ -361,8 +361,6 @@ 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 ad61b5099c..72df2627b2 100644
--- a/compiler/jvm/njvmutil.pas
+++ b/compiler/jvm/njvmutil.pas
@@ -75,9 +75,6 @@ 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 12f163226b..012f90d80d 100644
--- a/compiler/jvm/tgcpu.pas
+++ b/compiler/jvm/tgcpu.pas
@@ -46,7 +46,7 @@ unit tgcpu;
public
procedure setfirsttemp(l : longint); override;
procedure getlocal(list: TAsmList; size: longint; alignment: shortint; def: tdef; var ref: treference); override;
- procedure gethltemp(list: TAsmList; def: tdef; forcesize: asizeint; temptype: ttemptype; out ref: treference); override;
+ procedure gethltemp(list: TAsmList; def: tdef; forcesize: aint; temptype: ttemptype; out ref: treference); override;
procedure gethltemptyped(list: TAsmList; def: tdef; temptype: ttemptype; out ref: treference); override;
end;
@@ -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 }
@@ -245,7 +245,7 @@ unit tgcpu;
end;
- procedure ttgjvm.gethltemp(list: TAsmList; def: tdef; forcesize: asizeint; temptype: ttemptype; out ref: treference);
+ procedure ttgjvm.gethltemp(list: TAsmList; def: tdef; forcesize: aint; temptype: ttemptype; out ref: treference);
begin
if not getifspecialtemp(list,def,forcesize,temptype,ref) then
inherited;