diff --git a/src/compiler/OptTree-Drive.ref b/src/compiler/OptTree-Drive.ref index d866f958..db8dea51 100644 --- a/src/compiler/OptTree-Drive.ref +++ b/src/compiler/OptTree-Drive.ref @@ -445,9 +445,18 @@ OptFunction { (t.OptInfo (/*sentences*/) (/*functions*/)) e.Sentences > - : (t.OptInfo^ (e.Sentences^) (e.NewFunctions)) - = t.OptInfo - (Function s.ScopeClass (e.Name) Sentences e.Sentences) e.NewFunctions; + : { + (t.OptInfo^ (e.Sentences /* SAME */) (/* пусто */)) + = t.OptInfo + (ColdFunction DRIVE + s.ScopeClass (e.Name) Sentences + ); + + (t.OptInfo^ (e.Sentences^) (e.NewFunctions)) + = t.OptInfo + (Function s.ScopeClass (e.Name) Sentences e.Sentences) + e.NewFunctions; + } } /* diff --git a/src/compiler/OptTree.ref b/src/compiler/OptTree.ref index acc3c7c0..6943f962 100644 --- a/src/compiler/OptTree.ref +++ b/src/compiler/OptTree.ref @@ -78,11 +78,12 @@ $ENTRY OptTree { (define DriveLoop (if (or s.OptDrive s.OptIntrinsic) (begin - (loop-for-fix-point + (loop-for-warm-functions (pass (trace 'before Drive') (call &ExpandClosures) (call &OptTree-Drive t.OptDrive))) + (call &WarmColdFunctions DRIVE) (call &OptTree-Drive-CleanupColdCalls)) (call &ExpandClosures))) @@ -200,7 +201,6 @@ ExpandClosures-ResultTerm { $SPEC Int-Code e.arg; $SPEC Int-Command e.arg; $SPEC Int-LoopForWarmFunctions e.arg; -$SPEC Int-FixPoint e.arg; Int { @@ -264,9 +264,6 @@ Int-Command { loop-for-warm-functions e.Code = ; - loop-for-fix-point e.Code - = ; - s.Proc = : e.Code = ; @@ -320,21 +317,6 @@ Int-LoopForWarmFunctions { (e.Defines) e.Code s.Cycles (e.AST) = s.Cycles e.AST; } -Int-FixPoint { - (e.Defines) e.Code 0 (e.AST) = 0 e.AST; - - (e.Defines) e.Code s.Cycles (e.AST) - = e.AST : e.OriginAST - - = : s.Cycles^ e.AST^ - - = e.AST - : { - e.OriginAST = s.Cycles e.OriginAST; - e.AST^ = ; - }; -} - $INLINE Int-Lookup; Int-Lookup {