|
@@ -69,6 +69,7 @@ interface
|
|
procedure parse_parameter_dec(pd:tabstractprocdef);
|
|
procedure parse_parameter_dec(pd:tabstractprocdef);
|
|
procedure parse_proc_directives(pd:tabstractprocdef;var pdflags:tpdflags);
|
|
procedure parse_proc_directives(pd:tabstractprocdef;var pdflags:tpdflags);
|
|
procedure parse_var_proc_directives(sym:tsym);
|
|
procedure parse_var_proc_directives(sym:tsym);
|
|
|
|
+ procedure parse_proctype_directives(pd:tprocvardef);
|
|
procedure parse_object_proc_directives(pd:tabstractprocdef);
|
|
procedure parse_object_proc_directives(pd:tabstractprocdef);
|
|
procedure parse_record_proc_directives(pd:tabstractprocdef);
|
|
procedure parse_record_proc_directives(pd:tabstractprocdef);
|
|
function parse_proc_head(astruct:tabstractrecorddef;potype:tproctypeoption;flags:tparse_proc_flags;genericdef:tdef;generictypelist:tfphashobjectlist;out pd:tprocdef):boolean;
|
|
function parse_proc_head(astruct:tabstractrecorddef;potype:tproctypeoption;flags:tparse_proc_flags;genericdef:tdef;generictypelist:tfphashobjectlist;out pd:tprocdef):boolean;
|
|
@@ -218,7 +219,6 @@ implementation
|
|
parseprocvar : tppv;
|
|
parseprocvar : tppv;
|
|
locationstr : string;
|
|
locationstr : string;
|
|
paranr : integer;
|
|
paranr : integer;
|
|
- dummytype : ttypesym;
|
|
|
|
explicit_paraloc,
|
|
explicit_paraloc,
|
|
need_array,
|
|
need_array,
|
|
is_univ: boolean;
|
|
is_univ: boolean;
|
|
@@ -352,22 +352,16 @@ implementation
|
|
single_type(pv.returndef,[]);
|
|
single_type(pv.returndef,[]);
|
|
block_type:=bt_var;
|
|
block_type:=bt_var;
|
|
end;
|
|
end;
|
|
- hdef:=pv;
|
|
|
|
{ possible proc directives }
|
|
{ possible proc directives }
|
|
if check_proc_directive(true) then
|
|
if check_proc_directive(true) then
|
|
- begin
|
|
|
|
- dummytype:=ctypesym.create('unnamed',hdef);
|
|
|
|
- parse_var_proc_directives(tsym(dummytype));
|
|
|
|
- dummytype.typedef:=nil;
|
|
|
|
- hdef.typesym:=nil;
|
|
|
|
- dummytype.free;
|
|
|
|
- end;
|
|
|
|
|
|
+ parse_proctype_directives(pv);
|
|
{ Add implicit hidden parameters and function result }
|
|
{ Add implicit hidden parameters and function result }
|
|
handle_calling_convention(pv,hcc_default_actions_intf);
|
|
handle_calling_convention(pv,hcc_default_actions_intf);
|
|
{$ifdef jvm}
|
|
{$ifdef jvm}
|
|
{ anonymous -> no name }
|
|
{ anonymous -> no name }
|
|
jvm_create_procvar_class('',pv);
|
|
jvm_create_procvar_class('',pv);
|
|
{$endif}
|
|
{$endif}
|
|
|
|
+ hdef:=pv;
|
|
end
|
|
end
|
|
else
|
|
else
|
|
{ read type declaration, force reading for value paras }
|
|
{ read type declaration, force reading for value paras }
|
|
@@ -3440,25 +3434,30 @@ const
|
|
|
|
|
|
procedure parse_var_proc_directives(sym:tsym);
|
|
procedure parse_var_proc_directives(sym:tsym);
|
|
var
|
|
var
|
|
- pdflags : tpdflags;
|
|
|
|
- pd : tabstractprocdef;
|
|
|
|
|
|
+ pd : tprocvardef;
|
|
begin
|
|
begin
|
|
- pdflags:=[pd_procvar];
|
|
|
|
- pd:=nil;
|
|
|
|
case sym.typ of
|
|
case sym.typ of
|
|
fieldvarsym,
|
|
fieldvarsym,
|
|
staticvarsym,
|
|
staticvarsym,
|
|
localvarsym,
|
|
localvarsym,
|
|
paravarsym :
|
|
paravarsym :
|
|
- pd:=tabstractprocdef(tabstractvarsym(sym).vardef);
|
|
|
|
|
|
+ pd:=tprocvardef(tabstractvarsym(sym).vardef);
|
|
typesym :
|
|
typesym :
|
|
- pd:=tabstractprocdef(ttypesym(sym).typedef);
|
|
|
|
|
|
+ pd:=tprocvardef(ttypesym(sym).typedef);
|
|
else
|
|
else
|
|
internalerror(2003042617);
|
|
internalerror(2003042617);
|
|
end;
|
|
end;
|
|
if pd.typ<>procvardef then
|
|
if pd.typ<>procvardef then
|
|
internalerror(2003042618);
|
|
internalerror(2003042618);
|
|
- { names should never be used anyway }
|
|
|
|
|
|
+ parse_proctype_directives(pd);
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ procedure parse_proctype_directives(pd:tprocvardef);
|
|
|
|
+ var
|
|
|
|
+ pdflags : tpdflags;
|
|
|
|
+ begin
|
|
|
|
+ pdflags:=[pd_procvar];
|
|
parse_proc_directives(pd,pdflags);
|
|
parse_proc_directives(pd,pdflags);
|
|
end;
|
|
end;
|
|
|
|
|