Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lustre-v6
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
verimag
synchrone
lustre-v6
Commits
4a11df0a
Commit
4a11df0a
authored
16 years ago
by
Erwan Jahier
Browse files
Options
Downloads
Patches
Plain Diff
fixing the ec backend (cont): unfold operators on tuples.
i.e., transform x,y = (0,1) -> (a,b); into x = 0 -> a; y = 1 -> b;
parent
8b2170c1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/structArrayExpand.ml
+17
-3
17 additions, 3 deletions
src/structArrayExpand.ml
with
17 additions
and
3 deletions
src/structArrayExpand.ml
+
17
−
3
View file @
4a11df0a
...
...
@@ -290,13 +290,27 @@ and (break_tuple : Lxm.t -> left list -> val_exp -> Eff.eq_info srcflagged list)
if
not
!
Global
.
ec
then
[{
src
=
lxm
;
it
=
(
left_list
,
ve
)
}]
else
(* we only need to break tuple in this mode ...
(* we only need to break tuple
s
in this mode ...
Note that this work only if the node expansion has already been done!
(otherwise, we would not have the same number of items in the left and
in the rigth part)
*)
let
rec
aux
ve
=
(* flatten val exp*)
match
ve
with
|
CallByPosEff
({
it
=
TUPLE
}
,
OperEff
vel
)
->
List
.
flatten
(
List
.
map
aux
vel
)
|
_
->
[
ve
]
|
CallByPosEff
({
it
=
TUPLE
}
,
OperEff
vel
)
->
List
.
flatten
(
List
.
map
aux
vel
)
|
CallByPosEff
(
unop
,
OperEff
[
ve1
])
->
let
ve1l
=
aux
ve1
in
List
.
map
(
fun
ve1
->
CallByPosEff
(
unop
,
OperEff
[
ve1
]))
ve1l
|
CallByPosEff
(
binop
,
OperEff
[
ve1
;
ve2
])
->
let
ve1l
,
ve2l
=
aux
ve1
,
aux
ve2
in
List
.
map2
(
fun
ve1
ve2
->
CallByPosEff
(
binop
,
OperEff
[
ve1
;
ve2
]))
ve1l
ve2l
|
_
->
[
ve
]
in
let
vel
=
aux
ve
in
if
(
List
.
length
vel
<>
List
.
length
left_list
)
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment