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
O
Ocarina
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
TASTE
Ocarina
Commits
866a2e9f
Commit
866a2e9f
authored
Aug 09, 2013
by
yoogx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Defends against empty destination list
parent
b8bc1a4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
15 deletions
+20
-15
src/backends/ocarina-backends-cheddar-mapping.adb
src/backends/ocarina-backends-cheddar-mapping.adb
+20
-15
No files found.
src/backends/ocarina-backends-cheddar-mapping.adb
View file @
866a2e9f
...
...
@@ -684,22 +684,27 @@ package body Ocarina.Backends.Cheddar.Mapping is
K
:=
Make_Defining_Identifier
(
Fully_Qualified_Instance_Name
(
E
));
Append_Node_To_List
(
K
,
XTN
.
Subitems
(
N
));
else
Append_Node_To_List
(
Make_Assignement
(
Make_Defining_Identifier
(
Get_String_Name
(
"to_type"
)),
Make_Defining_Identifier
(
Get_String_Name
(
"buffer"
))),
XTN
.
Items
(
N
));
K
:=
Make_Defining_Identifier
(
Fully_Qualified_Instance_Name
(
E
));
Append_Node_To_List
(
K
,
XTN
.
Subitems
(
N
));
K
:=
Make_Defining_Identifier
(
Map_Buffer_Name
(
Parent_Component
(
Item
(
AIN
.
First_Node
(
Get_Destination_Ports
(
P
)))),
Item
(
AIN
.
First_Node
(
Get_Destination_Ports
(
P
)))));
Append_Node_To_List
(
K
,
XTN
.
Subitems
(
N
));
else
if
Present
(
AIN
.
First_Node
(
Get_Destination_Ports
(
P
)))
then
-- We have to defends against the destination being an empty list.
Append_Node_To_List
(
Make_Assignement
(
Make_Defining_Identifier
(
Get_String_Name
(
"to_type"
)),
Make_Defining_Identifier
(
Get_String_Name
(
"buffer"
))),
XTN
.
Items
(
N
));
K
:=
Make_Defining_Identifier
(
Fully_Qualified_Instance_Name
(
E
));
Append_Node_To_List
(
K
,
XTN
.
Subitems
(
N
));
K
:=
Make_Defining_Identifier
(
Map_Buffer_Name
(
Parent_Component
(
Item
(
AIN
.
First_Node
(
Get_Destination_Ports
(
P
)))),
Item
(
AIN
.
First_Node
(
Get_Destination_Ports
(
P
)))));
Append_Node_To_List
(
K
,
XTN
.
Subitems
(
N
));
end
if
;
end
if
;
return
N
;
...
...
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