2015-11-12 Steve Baird <baird@adacore.com>
* sem_ch6.adb (Analyze_Procedure_Call) If CodePeer_Mode is True, do not analyze the expression of a machine code insertion. * sem_ch13.adb (Analyze_Code_Statement) If CodePeer_Mode is True, mark the N_Code_Statement node as analyzed and do nothing else. From-SVN: r230225
This commit is contained in:
parent
b420ba79de
commit
0fe797c584
@ -1,3 +1,10 @@
|
||||
2015-11-12 Steve Baird <baird@adacore.com>
|
||||
|
||||
* sem_ch6.adb (Analyze_Procedure_Call) If CodePeer_Mode is True,
|
||||
do not analyze the expression of a machine code insertion.
|
||||
* sem_ch13.adb (Analyze_Code_Statement) If CodePeer_Mode is True,
|
||||
mark the N_Code_Statement node as analyzed and do nothing else.
|
||||
|
||||
2015-11-12 Ed Schonberg <schonberg@adacore.com>
|
||||
|
||||
* sem_ch6.adb (Check_Limited_Return): Make global to package
|
||||
|
@ -6043,9 +6043,17 @@ package body Sem_Ch13 is
|
||||
DeclO : Node_Id;
|
||||
|
||||
begin
|
||||
-- Accept foreign code statements for CodePeer. The analysis is skipped
|
||||
-- to avoid rejecting unrecognized constructs.
|
||||
|
||||
if CodePeer_Mode then
|
||||
Set_Analyzed (N);
|
||||
return;
|
||||
end if;
|
||||
|
||||
-- Analyze and check we get right type, note that this implements the
|
||||
-- requirement (RM 13.8(1)) that Machine_Code be with'ed, since that
|
||||
-- is the only way that Asm_Insn could possibly be visible.
|
||||
-- requirement (RM 13.8(1)) that Machine_Code be with'ed, since that is
|
||||
-- the only way that Asm_Insn could possibly be visible.
|
||||
|
||||
Analyze_And_Resolve (Expression (N));
|
||||
|
||||
@ -6058,8 +6066,8 @@ package body Sem_Ch13 is
|
||||
|
||||
Check_Code_Statement (N);
|
||||
|
||||
-- Make sure we appear in the handled statement sequence of a
|
||||
-- subprogram (RM 13.8(3)).
|
||||
-- Make sure we appear in the handled statement sequence of a subprogram
|
||||
-- (RM 13.8(3)).
|
||||
|
||||
if Nkind (HSS) /= N_Handled_Sequence_Of_Statements
|
||||
or else Nkind (SBody) /= N_Subprogram_Body
|
||||
@ -6112,7 +6120,7 @@ package body Sem_Ch13 is
|
||||
while Present (Stmt) loop
|
||||
StmtO := Original_Node (Stmt);
|
||||
|
||||
-- A procedure call transformed into a code statement is OK.
|
||||
-- A procedure call transformed into a code statement is OK
|
||||
|
||||
if Ada_Version >= Ada_2012
|
||||
and then Nkind (StmtO) = N_Procedure_Call_Statement
|
||||
|
@ -1559,11 +1559,17 @@ package body Sem_Ch6 is
|
||||
-- parameterless member of an entry family. Resolution of these various
|
||||
-- interpretations is delicate.
|
||||
|
||||
Analyze (P);
|
||||
-- Do not analyze machine code statements to avoid rejecting them in
|
||||
-- CodePeer mode.
|
||||
|
||||
-- If this is a call of the form Obj.Op, the call may have been
|
||||
-- analyzed and possibly rewritten into a block, in which case
|
||||
-- we are done.
|
||||
if CodePeer_Mode and then Nkind (P) = N_Qualified_Expression then
|
||||
Set_Etype (P, Standard_Void_Type);
|
||||
else
|
||||
Analyze (P);
|
||||
end if;
|
||||
|
||||
-- If this is a call of the form Obj.Op, the call may have been analyzed
|
||||
-- and possibly rewritten into a block, in which case we are done.
|
||||
|
||||
if Analyzed (N) then
|
||||
return;
|
||||
@ -1632,8 +1638,8 @@ package body Sem_Ch6 is
|
||||
|
||||
Analyze_Call_And_Resolve;
|
||||
|
||||
-- If the prefix is the simple name of an entry family, this is
|
||||
-- a parameterless call from within the task body itself.
|
||||
-- If the prefix is the simple name of an entry family, this is a
|
||||
-- parameterless call from within the task body itself.
|
||||
|
||||
elsif Is_Entity_Name (P)
|
||||
and then Nkind (P) = N_Identifier
|
||||
|
Loading…
Reference in New Issue
Block a user