Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
Ocarina
Commits
ad81d4f3
Commit
ad81d4f3
authored
Jan 16, 2016
by
yoogx
Browse files
* Use Get_Destination_Ports/Get_Source_Ports in place of
direct AST accessors
parent
d40f3e4e
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/backends/ocarina-backends-c_common-types.adb
View file @
ad81d4f3
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
6
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
...
...
@@ -847,7 +847,7 @@ package body Ocarina.Backends.C_Common.Types is
end
if
;
end
case
;
-- Mark the data type as being handled an append it to
-- Mark the data type as being handled an
d
append it to
-- the handled list.
Set_Handling
(
E
,
By_Name
,
H_C_Type_Spec
,
N
);
...
...
@@ -1030,9 +1030,7 @@ package body Ocarina.Backends.C_Common.Types is
if
not
AINU
.
Is_Empty
(
Subcomponents
(
Remote_Process
))
then
S
:=
First_Node
(
Subcomponents
(
Remote_Process
));
while
Present
(
S
)
loop
Visit
(
Corresponding_Instance
(
S
));
S
:=
Next_Node
(
S
);
end
loop
;
end
if
;
...
...
@@ -1042,7 +1040,8 @@ package body Ocarina.Backends.C_Common.Types is
and
then
Kind
(
I
)
=
K_Port_Spec_Instance
and
then
not
AINU
.
Is_Empty
(
Destinations
(
I
))
then
F
:=
First_Node
(
Destinations
(
I
));
F
:=
First_Node
(
Get_Destination_Ports
(
I
));
while
Present
(
F
)
loop
J
:=
Item
(
F
);
...
...
@@ -1064,7 +1063,7 @@ package body Ocarina.Backends.C_Common.Types is
if
Kind
(
C
)
=
K_Port_Spec_Instance
and
then
not
AINU
.
Is_Empty
(
Sources
(
C
))
then
D
:=
First_Node
(
Sources
(
C
));
D
:=
First_Node
(
Get_
Source
_Port
s
(
C
));
I
:=
Item
(
D
);
if
Get_Category_Of_Component
(
Parent_Component
(
I
))
=
...
...
@@ -1074,10 +1073,9 @@ package body Ocarina.Backends.C_Common.Types is
if
not
AINU
.
Is_Empty
(
Subcomponents
(
Remote_Process
))
then
S
:=
First_Node
(
Subcomponents
(
Remote_Process
));
while
Present
(
S
)
loop
while
Present
(
S
)
loop
Visit
(
Corresponding_Instance
(
S
));
S
:=
Next_Node
(
S
);
end
loop
;
end
if
;
...
...
@@ -1085,15 +1083,15 @@ package body Ocarina.Backends.C_Common.Types is
if
Present
(
I
)
and
then
Kind
(
I
)
=
K_Port_Spec_Instance
and
then
not
AINU
.
Is_Empty
(
Sources
(
I
))
and
then
not
AINU
.
Is_Empty
(
Get_
Source
_Port
s
(
I
))
then
F
:=
First_Node
(
Sources
(
I
));
while
Present
(
F
)
loop
J
:=
Item
(
F
);
if
Present
(
J
)
then
Visit
(
Parent_Component
(
J
));
end
if
;
F
:=
Next_Node
(
F
);
end
loop
;
end
if
;
...
...
@@ -1112,15 +1110,15 @@ package body Ocarina.Backends.C_Common.Types is
while
Present
(
Feature
)
loop
if
not
AINU
.
Is_Empty
(
Sources
(
Feature
))
then
Src
:=
First_Node
(
Sources
(
Feature
));
Src
:=
First_Node
(
Get_
Source
_Port
s
(
Feature
));
while
Present
(
Src
)
loop
Parent
:=
Parent_Component
(
Item
(
Src
));
if
AINU
.
Is_Process
(
Parent
)
and
then
Parent
/=
E
then
if
Get_Provided_Virtual_Bus_Class
(
Extra_Item
(
Src
))
/=
No_Node
if
Present
(
Extra_Item
(
Src
))
and
then
Present
(
Get_Provided_Virtual_Bus_Class
(
Extra_Item
(
Src
)))
then
Visit
(
Get_Provided_Virtual_Bus_Class
...
...
@@ -1135,7 +1133,7 @@ package body Ocarina.Backends.C_Common.Types is
-- The destinations of F
if
not
AINU
.
Is_Empty
(
Destinations
(
Feature
))
then
Dst
:=
First_Node
(
Destinations
(
Feature
));
Dst
:=
First_Node
(
Get_
Destination
_Port
s
(
Feature
));
while
Present
(
Dst
)
loop
Parent
:=
Parent_Component
(
Item
(
Dst
));
...
...
src/backends/ocarina-backends-po_hi_c-marshallers.adb
View file @
ad81d4f3
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
6
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
...
...
@@ -1194,7 +1194,7 @@ package body Ocarina.Backends.PO_HI_C.Marshallers is
and
then
Kind
(
I
)
=
K_Port_Spec_Instance
and
then
not
AAU
.
Is_Empty
(
Destinations
(
I
))
then
F
:=
First_Node
(
Destinations
(
I
));
F
:=
First_Node
(
Get_
Destination
_Port
s
(
I
));
while
Present
(
F
)
loop
J
:=
Item
(
F
);
...
...
src/backends/ocarina-backends-po_hi_c-request.adb
View file @
ad81d4f3
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
6
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
...
...
@@ -199,7 +199,7 @@ package body Ocarina.Backends.PO_HI_C.Request is
and
then
Is_Out
(
C
)
and
then
not
AINU
.
Is_Empty
(
Destinations
(
C
))
then
D
:=
First_Node
(
Destinations
(
C
));
D
:=
First_Node
(
Get_
Destination
_Port
s
(
C
));
while
Present
(
D
)
loop
I
:=
Item
(
D
);
...
...
@@ -207,7 +207,7 @@ package body Ocarina.Backends.PO_HI_C.Request is
and
then
Kind
(
I
)
=
K_Port_Spec_Instance
and
then
not
AINU
.
Is_Empty
(
Destinations
(
I
))
then
F
:=
First_Node
(
Destinations
(
I
));
F
:=
First_Node
(
Get_
Destination
_Port
s
(
I
));
while
Present
(
F
)
loop
J
:=
Item
(
F
);
...
...
@@ -495,7 +495,7 @@ package body Ocarina.Backends.PO_HI_C.Request is
and
then
Kind
(
I
)
=
K_Port_Spec_Instance
and
then
not
AINU
.
Is_Empty
(
Destinations
(
I
))
then
F
:=
First_Node
(
Destinations
(
I
));
F
:=
First_Node
(
Get_
Destination
_Port
s
(
I
));
while
Present
(
F
)
loop
J
:=
Item
(
F
);
...
...
@@ -528,7 +528,6 @@ package body Ocarina.Backends.PO_HI_C.Request is
if
Present
(
Backend_Node
(
Identifier
(
E
)))
and
then
Present
(
CTN
.
Request_Node
(
Backend_Node
(
Identifier
(
E
))))
then
N
:=
Make_Expression
(
Left_Expr
=>
...
...
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