aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/alloc.ads
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-07-11 08:01:35 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-07-11 08:01:35 +0000
commit6c1657116a2c9cf7c0c14b6dfa7f8bbb7672d3c8 (patch)
tree572be91ebc39f65aecaf91662cfea4f628aef40b /gcc/ada/alloc.ads
parentccf173059688499749a30b3252cc3c4ea4ab0d0c (diff)
downloadgcc-6c1657116a2c9cf7c0c14b6dfa7f8bbb7672d3c8.zip
gcc-6c1657116a2c9cf7c0c14b6dfa7f8bbb7672d3c8.tar.gz
gcc-6c1657116a2c9cf7c0c14b6dfa7f8bbb7672d3c8.tar.bz2
[Ada] New Repinfo.Input unit to read back JSON representation info.
For some time the Repinfo unit has been able to output the representation information in the JSON data interchange format in addition to the usual text and binary formats. The new Repinfo.Input unit makes it possible to read back this information under this format and make it available to clients, the main one being ASIS. The big advantage of using this approach over manipulating a binary blob is that the writer and the reader of the JSON representation need not be binary compatible, i.e. in practice need not be the same version of the compiler or ASIS for the same target. The patch also adds a -gnatd_j switch to read back the information in the compiler itself, which makes it easy to keep the writer and the reader in sync using only one tool, namely the compiler. The typical usage is: gcc -c p.ads -gnatR4js gcc -c p.ads -gnatd_j to exercise respectively the writer and the reader from the compiler. 2019-07-11 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * alloc.ads (Rep_JSON_Table_Initial): New constant. (Rep_JSON_Table_Increment): Likewise. * debug.adb: Document -gnatd_j switch. * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Add repinfo-input.o. * gnat1drv.adb: Add with clause for Repinfo.Input. Add with and use clauses for Sinput. (Read_JSON_Files_For_Repinfo): New procedure. (Gnat1drv1): Deal with -gnatd_j switch. * repinfo-input.ad[sb]: New unit. * snames.ads-tmpl (Name_Discriminant): New constant. (Name_Operands): Likewise. From-SVN: r273382
Diffstat (limited to 'gcc/ada/alloc.ads')
-rw-r--r--gcc/ada/alloc.ads3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ada/alloc.ads b/gcc/ada/alloc.ads
index 18bf1e4a..f5faecb 100644
--- a/gcc/ada/alloc.ads
+++ b/gcc/ada/alloc.ads
@@ -116,6 +116,9 @@ package Alloc is
Rep_Table_Initial : constant := 1000; -- Repinfo
Rep_Table_Increment : constant := 200;
+ Rep_JSON_Table_Initial : constant := 10; -- Repinfo
+ Rep_JSON_Table_Increment : constant := 200;
+
Scope_Stack_Initial : constant := 10; -- Sem
Scope_Stack_Increment : constant := 200;