Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Heptagon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
17
Issues
17
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
synchrone
Heptagon
Commits
bb6b9868
Commit
bb6b9868
authored
Jul 05, 2011
by
Cédric Pasteur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the variable type to add or not an indirection
parent
f45e30d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
compiler/obc/c/cgen.ml
compiler/obc/c/cgen.ml
+4
-8
No files found.
compiler/obc/c/cgen.ml
View file @
bb6b9868
...
...
@@ -229,15 +229,11 @@ and create_affect_stm dest src ty =
(** Returns the expression to use e as an argument of
a function expecting a pointer as argument. *)
let
address_of
e
=
(* try *)
let
address_of
ty
e
=
let
lhs
=
lhs_of_exp
e
in
match
lhs
with
|
Carray
_
->
Clhs
lhs
|
Cderef
lhs
->
Clhs
lhs
match
ty
with
|
Tarray
_
->
Clhs
lhs
|
_
->
Caddrof
lhs
(* with _ ->
e *)
let
rec
cexpr_of_static_exp
se
=
match
se
.
se_desc
with
...
...
@@ -369,7 +365,7 @@ let step_fun_call var_env sig_info objn out args =
|
[]
,
[]
->
[]
|
e
::
l
,
ad
::
ads
->
(*this arg is targeted, use a pointer*)
let
e
=
if
Linearity
.
is_linear
ad
.
a_linearity
then
address_of
e
else
e
in
let
e
=
if
Linearity
.
is_linear
ad
.
a_linearity
then
address_of
ad
.
a_type
e
else
e
in
e
::
(
add_targeting
l
ads
)
|
_
,
_
->
assert
false
in
...
...
Write
Preview
Markdown
is supported
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