Skip to content

Commit

Permalink
Отложенное копирование тел функций в OptTree-Drive (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mazdaywik committed Jul 25, 2019
1 parent 96e1262 commit 1f47f3a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/compiler/OptTree-Drive.ref
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ GetDrivenFunctions {
(Function s.ScopeClass (e.Name) e.Body)
, e.OptNames : e.B (s.Label e.Name) e.E
, e.Body : Sentences e.Sentences
= ((e.OptFunctions (s.Label s.ScopeClass (e.Name) e.Body))
= ((e.OptFunctions (s.Label s.ScopeClass (e.Name) { = e.Body}))
(e.RemNames <GenRemainderFuncNames (e.Name) (e.Sentences)>))
(Function s.ScopeClass (e.Name) e.Body);

Expand Down Expand Up @@ -466,8 +466,8 @@ DropLeft {
FindInlineInfo {
t.InlineInfo e.Name
, t.InlineInfo
: ((e.B1 (e.Name) e.E1) e.B2 (Inline s.ScopeClass (e.Name) e.Body) e.E2)
= Success (Inline s.ScopeClass (e.Name) e.Body);
: ((e.B1 (e.Name) e.E1) e.B2 (Inline s.ScopeClass (e.Name) s.Body) e.E2)
= Success (Inline s.ScopeClass (e.Name) <s.Body>);

t.InlineInfo e.Name = Failure;
}
Expand All @@ -485,18 +485,19 @@ FindDriveInfo {
, t.DriveInfo
: (
(e.B1 (e.Prefix) e.E1)
e.B2 (Drive s.ScopeClass (e.Prefix) Sentences e.Sentences) e.E2
e.B2 (Drive s.ScopeClass (e.Prefix) s.Body) e.E2
)
= <s.Body> : Sentences e.Sentences
= Success
(Drive s.ScopeClass (e.Name) Sentences <DropLeft e.Sentences s.N>);

t.DriveInfo e.Name
, t.DriveInfo
: (
(e.B1 (e.Name) e.E1)
e.B2 (Drive s.ScopeClass (e.Name) e.Body) e.E2
e.B2 (Drive s.ScopeClass (e.Name) s.Body) e.E2
)
= Success (Drive s.ScopeClass (e.Name) e.Body);
= Success (Drive s.ScopeClass (e.Name) <s.Body>);

t.DriveInfo e.Name = Failure;
}
Expand Down

0 comments on commit 1f47f3a

Please sign in to comment.