Go to the first, previous, next, last section, table of contents.


Access Control

The function compute_access returns one of three values:

access_public
means that the field can be accessed by the current lexical scope.
access_protected
means that the field cannot be accessed by the current lexical scope because it is protected.
access_private
means that the field cannot be accessed by the current lexical scope because it is private.

DECL_ACCESS is used for access declarations; alter_access creates a list of types and accesses for a given decl.

Formerly, DECL_{PUBLIC,PROTECTED,PRIVATE} corresponded to the return codes of compute_access and were used as a cache for compute_access. Now they are not used at all.

TREE_PROTECTED and TREE_PRIVATE are used to record the access levels granted by the containing class. BEWARE: TREE_PUBLIC means something completely unrelated to access control!


Go to the first, previous, next, last section, table of contents.