|
@@ -1821,8 +1821,13 @@ implementation
|
|
potype_destructor,potype_class_constructor,potype_class_destructor]) and
|
|
potype_destructor,potype_class_constructor,potype_class_destructor]) and
|
|
((procdef.procoptions*[po_exports,po_external,po_interrupt,po_virtualmethod,po_iocheck])=[]) and
|
|
((procdef.procoptions*[po_exports,po_external,po_interrupt,po_virtualmethod,po_iocheck])=[]) and
|
|
(not(procdef.proccalloption in [pocall_safecall])) and
|
|
(not(procdef.proccalloption in [pocall_safecall])) and
|
|
- { rough approximation if we should auto inline }
|
|
|
|
- (node_count(code)<=10) then
|
|
|
|
|
|
+ { rough approximation if we should auto inline:
|
|
|
|
+ - if the tree is simple enough
|
|
|
|
+ - if the tree is not too big
|
|
|
|
+ A bigger tree which is simpler might be autoinlined otoh
|
|
|
|
+ a smaller and complexer tree as well: so we use the sum of
|
|
|
|
+ both measures here }
|
|
|
|
+ (node_count(code)+node_complexity(code)<=25) then
|
|
begin
|
|
begin
|
|
{ Can we inline this procedure? }
|
|
{ Can we inline this procedure? }
|
|
if checknodeinlining(procdef) then
|
|
if checknodeinlining(procdef) then
|