Skip to content

Commit 60c26ab

Browse files
committed
Add support for inline for assembler procedure without parameters
Signed-off-by: Matias Ezequiel Vara Larsen <matiasevara@torokernel.io>
1 parent ed05682 commit 60c26ab

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

compiler/psub.pas

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,6 @@ implementation
148148
ppu file }
149149
if df_generic in current_procinfo.procdef.defoptions then
150150
exit;
151-
if pi_has_assembler_block in current_procinfo.flags then
152-
begin
153-
Message1(parser_h_not_supported_for_inline,'assembler');
154-
Message(parser_h_inlining_disabled);
155-
exit;
156-
end;
157151
if pi_has_global_goto in current_procinfo.flags then
158152
begin
159153
Message1(parser_h_not_supported_for_inline,'global goto');

compiler/symdef.pas

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5743,8 +5743,11 @@ if (tstoreddef(tfieldvarsym(symtable.symlist[i]).vardef).typ=rec
57435743
(tf_need_export in target_info.flags) and
57445744
(po_exports in procoptions) then
57455745
deffile.AddExport(mangledname);
5746-
{ Disable po_has_inlining until the derefimpl is done }
5747-
has_inlininginfo:=false;
5746+
{ Disable po_has_inlining until the derefimpl is done.
5747+
Assembler procedures don't need derefimpl since
5748+
their asm nodes have no Pascal symbol references }
5749+
if not(po_assembler in procoptions) then
5750+
has_inlininginfo:=false;
57485751
end;
57495752

57505753

0 commit comments

Comments
 (0)