diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-06-12 13:09:10 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-06-12 13:09:10 +0200 |
commit | d3b00ce368f3d32a4db4dac4538a90920f6365ef (patch) | |
tree | 0e78ec06ef2f1c383b601d90512460153a20d376 /gcc/ada/stringt.adb | |
parent | 9b168a8bd3854341c48ad5aa1b30ea5bed06ba9e (diff) | |
download | gcc-d3b00ce368f3d32a4db4dac4538a90920f6365ef.zip gcc-d3b00ce368f3d32a4db4dac4538a90920f6365ef.tar.gz gcc-d3b00ce368f3d32a4db4dac4538a90920f6365ef.tar.bz2 |
[multiple changes]
2012-06-12 Robert Dewar <dewar@adacore.com>
* sem_dist.adb, exp_ch7.adb, sem_type.adb, exp_attr.adb,
sinfo.ads, sem_ch7.adb, exp_alfa.adb, sem_scil.adb, sem_ch12.adb,
sem_util.adb, sem_res.adb, sem_attr.adb, sem_elab.adb, exp_ch6.adb,
sem_ch4.adb, sem_warn.adb, scil_ll.adb, exp_cg.adb: Minor code
reorganization.
2012-06-12 Eric Botcazou <ebotcazou@adacore.com>
* s-tasini.ads: Minor fix in comment.
2012-06-12 Thomas Quinot <quinot@adacore.com>
* freeze.adb (Freeze_Record_Type): Warn on record with
Scalar_Storage_Order if there is no placed component.
2012-06-12 Thomas Quinot <quinot@adacore.com>
* sem_ch3.adb: Minor comment fix.
2012-06-12 Vincent Celier <celier@adacore.com>
* ali-util.adb (Time_Stamp_Mismatch): In minimal recompilation
mode, use Stringt Mark and Release to avoid growing the Stringt
internal tables uselessly.
* stringt.adb (Strings_Last): New global variable
(String_Chars_Last): New global variable.
(Mark, Release): New procedures.
* stringt.ads (Mark, Release) New procedures.
From-SVN: r188445
Diffstat (limited to 'gcc/ada/stringt.adb')
-rw-r--r-- | gcc/ada/stringt.adb | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/gcc/ada/stringt.adb b/gcc/ada/stringt.adb index 89dfe6e..8d3b2da 100644 --- a/gcc/ada/stringt.adb +++ b/gcc/ada/stringt.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2012, 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- -- @@ -70,6 +70,12 @@ package body Stringt is -- when Start_String is called with a parameter that is the last string -- currently allocated in the table. + Strings_Last : String_Id := First_String_Id; + String_Chars_Last : Int := 0; + -- Strings_Last and String_Chars_Last are used by procedure Mark and + -- Release to get a snapshot of the tables and to restore them to their + -- previous situation. + ------------------------------- -- Add_String_To_Name_Buffer -- ------------------------------- @@ -129,6 +135,26 @@ package body Stringt is Strings.Release; end Lock; + ---------- + -- Mark -- + ---------- + + procedure Mark is + begin + Strings_Last := Strings.Last; + String_Chars_Last := String_Chars.Last; + end Mark; + + ------------- + -- Release -- + ------------- + + procedure Release is + begin + Strings.Set_Last (Strings_Last); + String_Chars.Set_Last (String_Chars_Last); + end Release; + ------------------ -- Start_String -- ------------------ |