Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-compiler-and-rts
compiler
Commits
eee9cb91
Commit
eee9cb91
authored
Feb 28, 2002
by
John van Groningen
Browse files
convert record updates of multiple records into one update node
parent
3d41fb40
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/backendconvert.icl
View file @
eee9cb91
...
...
@@ -1858,19 +1858,18 @@ where
addKinds
_
[]
=
[]
convertExpr
(
RecordUpdate
_
expr
updates
)
=
foldl
(
convertUpdate
)
(
convertExpr
expr
)
updates
=
beUpdateNode
(
beArgs
(
convertExpr
expr
)
(
convertUpdates
updates
))
where
convertUpdate
expr
{
bind_src
=
NoBind
_}
=
expr
convertUpdate
expr
{
bind_src
,
bind_dst
=
bind_dst
=:{
glob_module
,
glob_object
={
fs_index
}}}
=
beUpdateNode
(
beArgs
expr
(
beArgs
(
beSelectorNode
BESelector
(
beFieldSymbol
fs_index
glob_module
)
(
beArgs
(
convertExpr
bind_src
)
beNoArgs
))
beNoArgs
))
convertUpdates
[]
=
beNoArgs
convertUpdates
[{
bind_src
=
NoBind
_}:
updates
]
=
convertUpdates
updates
convertUpdates
[{
bind_src
,
bind_dst
=
bind_dst
=:{
glob_module
,
glob_object
={
fs_index
}}}:
updates
]
=
(
beArgs
(
beSelectorNode
BESelector
(
beFieldSymbol
fs_index
glob_module
)
(
beArgs
(
convertExpr
bind_src
)
beNoArgs
))
(
convertUpdates
updates
))
convertExpr
(
Update
expr1
[
singleSelection
]
expr2
)
=
case
singleSelection
of
RecordSelection
_
_
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment