mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-07 17:50:18 +02:00
* also write definitions for abstract methods
* write "abstract" modifier for abstract classes git-svn-id: branches/jvmbackend@18634 -
This commit is contained in:
parent
390bf35b52
commit
92fbbcff88
@ -570,6 +570,8 @@ implementation
|
|||||||
AsmWrite('.class ');
|
AsmWrite('.class ');
|
||||||
if oo_is_sealed in tobjectdef(obj).objectoptions then
|
if oo_is_sealed in tobjectdef(obj).objectoptions then
|
||||||
AsmWrite('final ');
|
AsmWrite('final ');
|
||||||
|
if oo_is_abstract in tobjectdef(obj).objectoptions then
|
||||||
|
AsmWrite('abstract ');
|
||||||
if toplevelowner.symtabletype=globalsymtable then
|
if toplevelowner.symtabletype=globalsymtable then
|
||||||
AsmWrite('public ');
|
AsmWrite('public ');
|
||||||
if (oo_is_enum_class in tobjectdef(obj).objectoptions) then
|
if (oo_is_enum_class in tobjectdef(obj).objectoptions) then
|
||||||
@ -714,7 +716,8 @@ implementation
|
|||||||
if (pd.procsym.owner.symtabletype in [globalsymtable,staticsymtable,localsymtable]) or
|
if (pd.procsym.owner.symtabletype in [globalsymtable,staticsymtable,localsymtable]) or
|
||||||
(po_classmethod in pd.procoptions) then
|
(po_classmethod in pd.procoptions) then
|
||||||
result:=result+'static ';
|
result:=result+'static ';
|
||||||
if is_javainterface(tdef(pd.owner.defowner)) then
|
if (po_abstractmethod in pd.procoptions) or
|
||||||
|
is_javainterface(tdef(pd.owner.defowner)) then
|
||||||
result:=result+'abstract ';
|
result:=result+'abstract ';
|
||||||
if (pd.procsym.owner.symtabletype in [globalsymtable,staticsymtable,localsymtable]) or
|
if (pd.procsym.owner.symtabletype in [globalsymtable,staticsymtable,localsymtable]) or
|
||||||
(po_finalmethod in pd.procoptions) or
|
(po_finalmethod in pd.procoptions) or
|
||||||
@ -900,6 +903,7 @@ implementation
|
|||||||
procedure TJasminAssembler.WriteProcDef(pd: tprocdef);
|
procedure TJasminAssembler.WriteProcDef(pd: tprocdef);
|
||||||
begin
|
begin
|
||||||
if not assigned(pd.exprasmlist) and
|
if not assigned(pd.exprasmlist) and
|
||||||
|
not(po_abstractmethod in pd.procoptions) and
|
||||||
(not is_javainterface(pd.struct) or
|
(not is_javainterface(pd.struct) or
|
||||||
(pd.proctypeoption in [potype_unitinit,potype_unitfinalize])) then
|
(pd.proctypeoption in [potype_unitinit,potype_unitfinalize])) then
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user