1157 Commits

Author SHA1 Message Date
Vadim Godunko
d81adbfd19 T825-011 Use Unchecked_Access to prevent fail of accessibility level checks
... in user's code.

Change-Id: Ifb9757f7f1e2ba1275e5e4d1594130252e9e3244
2020-09-01 17:17:02 +03:00
Vadim Godunko
81abc61a2d T816-068 Increase max number of character in file of predefined units 2020-08-14 16:27:57 -04:00
Thomas Quinot
1fb1ba89d5 Minor reformatting 2019-11-18 12:29:19 +01:00
Dmitriy Anisimkov
9fcf611a25 Minor comments and formatting improvement 2019-10-29 09:36:06 +01:00
Bob Duff
9f1fd57d25 Disable new warning on allocators with anonymous access type
We might want to fix this in a "better" way someday (moving to named
access types).

Fixes S325-042
2019-06-06 16:41:36 +02:00
Thomas Quinot
8630a90f08 Add support for relocatable starter
Allow partition location to be specified as a relative directory
and resolved at run time relative to the location of the starter.
This allows the starter and partition binaries to be moved around.

RA26-001
2018-11-20 10:17:02 +01:00
Oliver Kellogg
fba4400ec8 Merge remote-tracking branch 'upstream/master' 2018-07-14 01:57:32 +02:00
Thomas Quinot
36fd19d14c Fix regression caused by annotation application change
Skip_Annapp_Scan_Token must delegate error reporting to Scan_Token
for the error location to be properly displayed.
2018-07-11 11:06:26 +02:00
Oliver Kellogg
93153c2cd3 https://github.com/AdaCore/PolyORB/pull/1
- Move handling of annotation applications from lexer to parser:

compilers/iac/lexer.adb
- In procedure Scan_Token (Fatal : Boolean) case-statement decoding
  Buffer (Token_Location.Scan), reduce handling of '@' to just assign
  T_At to Token, i.e. do not advance the scan location over the
  annotation application.

compilers/iac/parser.adb
- New procedure Skip_Annapp_Scan_Token (T : Token_Type := T_Error) is
  similar to Scan_Token but skips any annotation applications that may
  exist at the scanner's current location.
  The optional parameter T is the expected token type.
  If left at its default (T_Error), no specific token type is expected.
- New procedure Skip_Annapp_Scan_Token (State : in out Location) is
  similar to the above but updates the given scanner state on skipping
  annotation applications.
- New function Skip_Annapp_Next_Token return Token_Type is similar to
  Next_Token but skip any annotation applications that may exist at the
  scanner's current location, advancing the scan location while this is
  the case.
- In function P_Attribute_Declaration replace initial Scan_Token call
  by Skip_Annapp_Scan_Token.
- In function P_Constant_Expression fix comment in loop `while not
  Is_Expression_Completed'.
- In function P_Definition replace initial Scan_Token call by
  Skip_Annapp_Scan_Token (State).
- In function P_Identifier replace call to Scan_Token (T_Identifier) by
  Skip_Annapp_Scan_Token (T_Identifier).
- In function P_Operation_Declaration replace initial calls to
  Scan_Token by calls to Skip_Annapp_Scan_Token (State).
- In function P_Simple_Type_Spec replace initial Next_Token call by
  Skip_Annapp_Next_Token.
- In function P_State_Member replace initial Scan_Token call by
  Skip_Annapp_Scan_Token (State).

testsuite/idls/annapp01/tin.idl
testsuite/idls/annapp01/test.out
testsuite/idls/MANIFEST
- Start testing annotation applications.
2018-06-18 10:22:09 +02:00
Thomas Quinot
034c14a9f1 Switch to Ada 2012 mode for compatibility with GNAT Community 2018 2018-06-14 12:04:05 +02:00
Oliver Kellogg
0df933e21d Followup to commit 2b691e0 (make IAC ignore IDL4 annotations):
Address review comment at https://github.com/AdaCore/PolyORB/pull/1,
> [...] the part between parentheses in an annotation application is a
> <const_expr>, which may itself contain nested parentheses.

compilers/iac/lexer.adb
- In procedure Scan_Token (Fatal : Boolean) case-statement decoding
  Buffer (Token_Location.Scan), at handling of '@' followed by '(',
  new counter `Parentheses' keeps track of opening/closing parentheses
  to account for embedded parentheses in the loop which skips to the
  ending ')' of the annotation application.
2018-05-31 11:47:48 +02:00
Oliver Kellogg
2b691e0b96 Make IAC ignore IDL4 annotation applications:
compilers/iac/lexer.ads
- In Token_Type add T_At.

compilers/iac/lexer.adb
- In procedure Process, in then-part of `if not Initialized' add call
    New_Token (T_At, "@");
- In procedure Scan_Token (Fatal : Boolean) case-statement decoding
  Buffer (Token_Location.Scan) add handling of '@':
  - If the following token is an identifier then skip the identifier
    and whitespace that may follow it; if the following token is '('
    then seek ')' and increment Token_Location.Scan to the index after
    the ')'.  Do not modify the value of Token.
  - Otherwise set Token to T_At.
2018-05-26 22:30:16 +02:00
Thomas Quinot
dfc0063cdb Remove useless "use type" clause in Helpers generated code
Followup on PA07-083

Subversion-branch: /trunk/polyorb
Subversion-revision: 259585
2018-01-03 11:39:12 +00:00
Bob Duff
64656024e2 fix warnings, no-tn-check
Subversion-branch: /trunk/polyorb
Subversion-revision: 257789
2017-09-18 20:51:56 +00:00
squirek
aa8c9b0259 Remove ineffective use clauses as per PA07-083 and disable some checks
for
unused entities (-gnatwu) due to generated code violating this warning.

Subversion-branch: /trunk/polyorb
Subversion-revision: 257360
2017-08-29 15:13:55 +00:00
Bob Duff
eac8338f79 The IDL-to-Ada compiler iac now ignores pragma javaPackage, as requested
by a customer. This is a convenience for those also using idlj
(idl-to-java), because idlj recognizes that pragma.

Fixes Q621-023

Subversion-branch: /trunk/polyorb
Subversion-revision: 257245
2017-08-11 21:00:17 +00:00
Thomas Quinot
f6b1d049af Remove unnecessary use-type and use-package clauses
These redundant clauses will be flagged by the compiler in the near
future (PA07-083).

Q725-034

Subversion-branch: /trunk/polyorb
Subversion-revision: 257110
2017-08-02 08:40:59 +00:00
Thomas Quinot
50d8c7118f (Compile): Do not attempt to normalize relative source file names
"gnat ls" used to provide full path to source files, but now instead
gives base names. This is fine because project files provide all the
information "gnat compile" needs to locate Ada source files. Gnatdist
should therefore not attempt to normalize such relative paths into
absolute ones (especially considering that it does not have visibility
on appropriate project attributes).

Fixes Q502-027 (residual regression on L521-016)

Subversion-branch: /trunk/polyorb
Subversion-revision: 255680
2017-05-09 15:22:29 +00:00
Thomas Quinot
11cea37a26 Remove unnecessary duplicated code blocks
One suspicious case remains in
compilers/iac/backend-be_corba_ada-common.adb.

Q210-015

Subversion-branch: /trunk/polyorb
Subversion-revision: 254360
2017-02-10 19:54:47 +00:00
Thomas Quinot
8112d0c69c (Initialize_Routine): Fix reference to wrong TypeCode object
For an interface, we generate two typecode objects: one in
the enclosing scope, and one in the interface's own scope.
When initializing the object in the enclosing scope, do not
erroneously reference that in the interface scope.

Fixes P921-037

Subversion-branch: /trunk/polyorb
Subversion-revision: 251246
2016-09-21 20:29:37 +00:00
Thomas Quinot
4564ea38e1 (Build, Compile): Generate -margs if needed
Make sure builder switches from the command line are passed to the
builder
in the correct command line section, even if Arguments specify -Xargs.

Followup on P120-017

Subversion-branch: /trunk/polyorb
Subversion-revision: 246314
2016-02-16 10:24:55 +00:00
Thomas Quinot
895156afbb * compilers/common_files/utils.adb, utils.ads
(Starts_With): New subprogram

* compilers/gnatdist/xe_utils.adb
  (Scan_Dist_Arg):
  Pass --unchecked-shared-lib-imports down to gnat ls

Fixes P120-017

Subversion-branch: /trunk/polyorb
Subversion-revision: 246124
2016-02-08 09:31:17 +00:00
Vincent Celier
b49a218943 Use ALI file name instead of source file name when invoking gprls
O528-046 and O528-048

Subversion-branch: /trunk/polyorb
Subversion-revision: 244264
2015-11-28 19:25:16 +00:00
Thomas Quinot
322f47e923 (XE_Back.PolyORB.Generate_Executable_File): Pass base name of
partition main unit to gprbuild instead of full path, to avoid
inconsistency on Windows.

Fix for O402-004 regression coming from changes for NC22-002

Subversion-branch: /trunk/polyorb
Subversion-revision: 237806
2015-04-03 14:59:53 +00:00
Thomas Quinot
084c616a9d Switch gnatdist's default builder to gprbuild
For NC22-002

Subversion-branch: /trunk/polyorb
Subversion-revision: 237253
2015-03-13 16:55:33 +00:00