Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
3603fa5c
Commit
3603fa5c
authored
Jan 13, 2017
by
Arnaud Charlet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanups.
From-SVN: r244412
parent
3abbc5c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
gcc/ada/contracts.adb
+27
-2
gcc/ada/contracts.ads
+3
-2
No files found.
gcc/ada/contracts.adb
View file @
3603fa5c
...
...
@@ -1085,8 +1085,10 @@ package body Contracts is
--------------------------------
procedure
Analyze_Previous_Contracts
(
Body_Decl
:
Node_Id
)
is
Body_Id
:
constant
Entity_Id
:=
Defining_Entity
(
Body_Decl
);
Par
:
Node_Id
;
Body_Id
:
constant
Entity_Id
:=
Defining_Entity
(
Body_Decl
);
Orig_Decl
:
constant
Node_Id
:=
Original_Node
(
Body_Decl
);
Par
:
Node_Id
;
begin
--
A
body
that
is
in
the
process
of
being
inlined
appears
from
source
,
...
...
@@ -1109,6 +1111,29 @@ package body Contracts is
Freeze_Id
=>
Defining_Entity
(
Body_Decl
));
exit
;
--
Do
not
look
for
an
enclosing
package
body
when
the
construct
which
--
causes
freezing
is
a
body
generated
for
an
expression
function
and
--
it
appears
within
a
package
spec
.
This
ensures
that
the
traversal
--
will
not
reach
too
far
up
the
parent
chain
and
attempt
to
freeze
a
--
package
body
which
should
not
be
frozen
.
--
package
body
Enclosing_Body
--
with
Refined_State
=>
(
State
=>
Var
)
--
is
--
package
Nested
is
--
type
Some_Type
is
...;
--
function
Cause_Freezing
return
...;
--
private
--
function
Cause_Freezing
is
(...);
--
end
Nested
;
--
--
Var
:
Nested
.
Some_Type
;
elsif
Nkind
(
Par
)
=
N_Package_Declaration
and
then
Nkind
(
Orig_Decl
)
=
N_Expression_Function
then
exit
;
end
if
;
Par
:=
Parent
(
Par
);
...
...
gcc/ada/contracts.ads
View file @
3603fa5c
...
...
@@ -6,7 +6,7 @@
--
--
--
S
p
e
c
--
--
--
--
Copyright
(
C
)
2015
,
Free
Software
Foundation
,
Inc
.
--
--
Copyright
(
C
)
2015
-
2016
,
Free
Software
Foundation
,
Inc
.
--
--
--
--
GNAT
is
free
software
;
you
can
redistribute
it
and
/
or
modify
it
under
--
--
terms
of
the
GNU
General
Public
License
as
published
by
the
Free
Soft
-
--
...
...
@@ -131,7 +131,8 @@ package Contracts is
procedure
Analyze_Previous_Contracts
(
Body_Decl
:
Node_Id
);
--
Analyze
the
contracts
of
all
source
constructs
found
in
the
declarative
--
list
which
contains
entry
,
package
,
protected
,
subprogram
,
or
task
body
--
denoted
by
Body_Decl
.
The
analysis
stops
once
Body_Decl
is
reached
.
--
denoted
by
Body_Decl
.
The
analysis
stops
once
Body_Decl
is
reached
.
In
--
addition
,
analyze
the
contract
of
the
nearest
enclosing
package
body
.
procedure
Analyze_Protected_Contract
(
Prot_Id
:
Entity_Id
);
--
Analyze
all
delayed
pragmas
chained
on
the
contract
of
protected
unit
...
...
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