Commit b16ffa33 by Arnaud Charlet

[multiple changes]

2014-07-17  Robert Dewar  <dewar@adacore.com>

	* sprint.adb (Write_Itype): Print proper header for string
	literal subtype.

2014-07-17  Steve Baird  <baird@adacore.com>

	* sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.

From-SVN: r212731
parent 7b966a95
2014-07-17 Robert Dewar <dewar@adacore.com>
* sprint.adb (Write_Itype): Print proper header for string
literal subtype.
2014-07-17 Steve Baird <baird@adacore.com>
* sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
2014-07-17 Vincent Celier <celier@adacore.com> 2014-07-17 Vincent Celier <celier@adacore.com>
* gnatbind.adb: Change in message "try ... for more information". * gnatbind.adb: Change in message "try ... for more information".
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2009-2010, Free Software Foundation, Inc. -- -- Copyright (C) 2009-2014, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -31,7 +31,20 @@ with Types; use Types; ...@@ -31,7 +31,20 @@ with Types; use Types;
package Sem_SCIL is package Sem_SCIL is
-- Here would be a good place to document what SCIL is all about ??? -- SCIL (Statically Checkable Intermediate Language) is produced by the
-- CodePeer back end (aka gnat2scil). For some constructs (tagged type
-- declarations, dispatching calls, classwide membership tests), the
-- CodePeer back end needs to locate certain nodes in the tree. To allow
-- CodePeer to do this without introducing unwanted dependencies on the
-- details of the FE's expansion strategies, SCIL_Nodes are generated.
-- For example, a dispatching call in the Ada source will, if CodePeer mode
-- is enabled, result in the FE's generation of an N_Scil_Dispatching_Call
-- node decorated with semantic attributes which identify the call itself,
-- the primitive operation being called, the tagged type to which the
-- operation belongs, and the controlling tag value of the call. If the FE
-- implements some new expansion strategy for dispatching calls but this
-- interface is preserved, the CodePeer back end should be unaffected.
function Check_SCIL_Node (N : Node_Id) return Traverse_Result; function Check_SCIL_Node (N : Node_Id) return Traverse_Result;
-- Process a single node during the tree traversal. Done to verify that -- Process a single node during the tree traversal. Done to verify that
......
...@@ -1959,20 +1959,27 @@ package Sinfo is ...@@ -1959,20 +1959,27 @@ package Sinfo is
-- and multiplication operations. -- and multiplication operations.
-- SCIL_Entity (Node4-Sem) -- SCIL_Entity (Node4-Sem)
-- Present in SCIL nodes. Used to reference the tagged type associated -- Present in SCIL nodes. References the specific tagged type associated
-- with the SCIL node. -- with the SCIL node (for an N_SCIL_Dispatching_Call node, this is
-- the controlling type of the call; for an N_SCIL_Membership_Test node
-- generated as part of testing membership in T'Class, this is T; for an
-- N_SCIL_Dispatch_Table_Tag_Init node, this is the type being declared).
-- SCIL_Controlling_Tag (Node5-Sem) -- SCIL_Controlling_Tag (Node5-Sem)
-- Present in N_SCIL_Dispatching_Call nodes. Used to reference the -- Present in N_SCIL_Dispatching_Call nodes. References the
-- controlling tag of a dispatching call. -- controlling tag of a dispatching call. This is usually an
-- N_Selected_Component node (for a _tag component), but may
-- be an N_Object_Declaration or N_Parameter_Specification node
-- in some cases (e.g., for a call to a classwide streaming operation
-- or to an instance of Ada.Tags.Generic_Dispatching_Constructor).
-- SCIL_Tag_Value (Node5-Sem) -- SCIL_Tag_Value (Node5-Sem)
-- Present in N_SCIL_Membership_Test nodes. Used to reference the tag -- Present in N_SCIL_Membership_Test nodes. Used to reference the tag
-- value that is being tested. -- of the value that is being tested.
-- SCIL_Target_Prim (Node2-Sem) -- SCIL_Target_Prim (Node2-Sem)
-- Present in N_SCIL_Dispatching_Call nodes. Used to reference the tagged -- Present in N_SCIL_Dispatching_Call nodes. References the primitive
-- type primitive associated with the SCIL node. -- operation named (statically) in a dispatching call.
-- Scope (Node3-Sem) -- Scope (Node3-Sem)
-- Present in defining identifiers, defining character literals and -- Present in defining identifiers, defining character literals and
...@@ -7834,16 +7841,19 @@ package Sinfo is ...@@ -7834,16 +7841,19 @@ package Sinfo is
-- Note: in the case where a debug source file is generated, the Sloc -- Note: in the case where a debug source file is generated, the Sloc
-- for this node points to the quote in the Sprint file output. -- for this node points to the quote in the Sprint file output.
----------------- ----------------
-- SCIL Nodes -- -- SCIL Nodes --
----------------- ----------------
-- SCIL nodes are special nodes added to the tree when the CodePeer mode
-- is active. They are only generated if SCIL generation is enabled.
-- A standard tree-walk will not encounter these nodes even if they
-- are present; these nodes are only accessible via the function
-- SCIL_LL.Get_SCIL_Node. These nodes have no associated dynamic
-- semantics.
-- SCIL nodes are special nodes added to the tree when the CodePeer -- Sprint syntax: [ <node kind> ]
-- mode is active. They help the CodePeer backend to locate nodes that -- No semantic field values are displayed.
-- require special processing. They are only generated if SCIL
-- generation is enabled. A standard tree-walk will not encounter
-- these nodes even if they are present; these nodes are only
-- accessible via the function SCIL_LL.Get_SCIL_Node.
-- N_SCIL_Dispatch_Table_Tag_Init -- N_SCIL_Dispatch_Table_Tag_Init
-- Sloc references a node for a tag initialization -- Sloc references a node for a tag initialization
......
...@@ -4322,6 +4322,7 @@ package body Sprint is ...@@ -4322,6 +4322,7 @@ package body Sprint is
Len : constant Uint := Len : constant Uint :=
String_Literal_Length (Typ); String_Literal_Length (Typ);
begin begin
Write_Header (False);
Write_Str ("String ("); Write_Str ("String (");
Write_Int (UI_To_Int (LB)); Write_Int (UI_To_Int (LB));
Write_Str (" .. "); Write_Str (" .. ");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment