⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gxxint.texi

📁 gcc库的原代码,对编程有很大帮助.
💻 TEXI
📖 第 1 页 / 共 4 页
字号:
@item CLASSTYPE_TAGSCLASSTYPE_TAGS is a linked (via TREE_CHAIN) list of member classes of aclass. TREE_PURPOSE is the name, TREE_VALUE is the type (pushclass scansthese and calls pushtag on them.)finish_struct scans these to produce TYPE_DECLs to add to theTYPE_FIELDS of the type.It is expected that name found in the TREE_PURPOSE slot is unique,resolve_scope_to_name is one such place that depends upon thisuniqueness.@item CLASSTYPE_METHOD_VECThe following is true after finish_struct has been called (on theclass?) but not before.  Before finish_struct is called, things aredifferent to some extent.  Contains a TREE_VEC of methods of the class.The TREE_VEC_LENGTH is the number of differently named methods plus onefor the 0th entry.  The 0th entry is always allocated, and reserved forctors and dtors.  If there are none, TREE_VEC_ELT(N,0) == NULL_TREE.Each entry of the TREE_VEC is a FUNCTION_DECL.  For each FUNCTION_DECL,there is a DECL_CHAIN slot.  If the FUNCTION_DECL is the last one with agiven name, the DECL_CHAIN slot is NULL_TREE.  Otherwise it is the nextmethod that has the same name (but a different signature).  It wouldseem that it is not true that because the DECL_CHAIN slot is used inthis way, we cannot call pushdecl to put the method in the global scope(cause that would overwrite the TREE_CHAIN slot), because they usedifferent _CHAINs.  finish_struct_methods setups up one version of theTREE_CHAIN slots on the FUNCTION_DECLs.friends are kept in TREE_LISTs, so that there's no need to use theirTREE_CHAIN slot for anything.Has values of:	TREE_VECs	@item CLASSTYPE_VFIELDSeems to be in the process of being renamed TYPE_VFIELD.  Use on typesto get the main virtual function table pointer.  To get the virtualfunction table use BINFO_VTABLE (TYPE_BINFO ()).Has values of:	FIELD_DECLs that are virtual function table pointersWhat things can this be used on:	RECORD_TYPEs@item DECL_CLASS_CONTEXTIdentifies the context that the _DECL was found in.  For virtual functiontables, it points to the type associated with the virtual functiontable.  See also DECL_CONTEXT, DECL_FIELD_CONTEXT and DECL_FCONTEXT.The difference between this and DECL_CONTEXT, is that for virtualsfunctions like:@examplestruct A@{  virtual int f ();@};struct B : A@{  int f ();@};DECL_CONTEXT (A::f) == ADECL_CLASS_CONTEXT (A::f) == ADECL_CONTEXT (B::f) == ADECL_CLASS_CONTEXT (B::f) == B@end exampleHas values of:	RECORD_TYPEs, or UNION_TYPEsWhat things can this be used on:	TYPE_DECLs, _DECLs@item DECL_CONTEXTIdentifies the context that the _DECL was found in.  Can be used onvirtual function tables to find the type associated with the virtualfunction table, but since they are FIELD_DECLs, DECL_FIELD_CONTEXT is abetter access method.  Internally the same as DECL_FIELD_CONTEXT, sodon't us both.  See also DECL_FIELD_CONTEXT, DECL_FCONTEXT andDECL_CLASS_CONTEXT.Has values of:	RECORD_TYPEsWhat things can this be used on:@displayVAR_DECLs that are virtual function tables_DECLs@end display@item DECL_FIELD_CONTEXTIdentifies the context that the FIELD_DECL was found in.  Internally thesame as DECL_CONTEXT, so don't us both.  See also DECL_CONTEXT,DECL_FCONTEXT and DECL_CLASS_CONTEXT.Has values of:	RECORD_TYPEsWhat things can this be used on:@displayFIELD_DECLs that are virtual function pointersFIELD_DECLs@end display@item DECL_NESTED_TYPENAMEHolds the fully qualified type name.  Example, Base::Derived.Has values of:	IDENTIFIER_NODEsWhat things can this be used on:	TYPE_DECLs@item DECL_NAMEHas values of:@display0 for things that don't have namesIDENTIFIER_NODEs for TYPE_DECLs@end display@item DECL_IGNORED_PA bit that can be set to inform the debug information output routines inthe back-end that a certain _DECL node should be totally ignored.Used in cases where it is known that the debugging information will beoutput in another file, or where a sub-type is known not to be neededbecause the enclosing type is not needed.A compiler constructed virtual destructor in derived classes that do notdefine an explicit destructor that was defined explicit in a base classhas this bit set as well.  Also used on __FUNCTION__ and__PRETTY_FUNCTION__ to mark they are ``compiler generated.''  c-decl andc-lex.c both want DECL_IGNORED_P set for ``internally generated vars,''and ``user-invisible variable.''Functions built by the C++ front-end such as default destructors,virtual destructors and default constructors want to be marked thatthey are compiler generated, but unsure why.Currently, it is used in an absolute way in the C++ front-end, as anoptimization, to tell the debug information output routines to notgenerate debugging information that will be output by another separatelycompiled file.@item DECL_VIRTUAL_PA flag used on FIELD_DECLs and VAR_DECLs.  (Documentation in tree.h iswrong.)  Used in VAR_DECLs to indicate that the variable is a vtable.It is also used in FIELD_DECLs for vtable pointers.What things can this be used on:	FIELD_DECLs and VAR_DECLs@item DECL_VPARENTUsed to point to the parent type of the vtable if there is one, else itis just the type associated with the vtable.  Because of the sharing ofvirtual function tables that goes on, this slot is not very useful, andis in fact, not used in the compiler at all.  It can be removed.What things can this be used on:	VAR_DECLs that are virtual function tablesHas values of:	RECORD_TYPEs maybe UNION_TYPEs@item DECL_FCONTEXTUsed to find the first baseclass in which this FIELD_DECL is defined.See also DECL_CONTEXT, DECL_FIELD_CONTEXT and DECL_CLASS_CONTEXT.How it is used:	Used when writing out debugging information about vfield and	vbase decls.What things can this be used on:	FIELD_DECLs that are virtual function pointers	FIELD_DECLs@item DECL_REFERENCE_SLOTUsed to hold the initialize for the reference.What things can this be used on:	PARM_DECLs and VAR_DECLs that have a reference type@item DECL_VINDEXUsed for FUNCTION_DECLs in two different ways.  Before the structurecontaining the FUNCTION_DECL is laid out, DECL_VINDEX may point to aFUNCTION_DECL in a base class which is the FUNCTION_DECL which thisFUNCTION_DECL will replace as a virtual function.  When the class islaid out, this pointer is changed to an INTEGER_CST node which issuitable to find an index into the virtual function table.  Seeget_vtable_entry as to how one can find the right index into the virtualfunction table.  The first index 0, of a virtual function table it notused in the normal way, so the first real index is 1.DECL_VINDEX may be a TREE_LIST, that would seem to be a list ofoverridden FUNCTION_DECLs.  add_virtual_function has code to deal withthis when it uses the variable base_fndecl_list, but it would seem thatsomehow, it is possible for the TREE_LIST to pursist until method_call,and it should not.What things can this be used on:	FUNCTION_DECLs@item DECL_SOURCE_FILEIdentifies what source file a particular declaration was found in.Has values of:	"<built-in>" on TYPE_DECLs to mean the typedef is built in@item DECL_SOURCE_LINEIdentifies what source line number in the source file the declarationwas found at.Has values of:@display0 for an undefined label0 for TYPE_DECLs that are internally generated0 for FUNCTION_DECLs for functions generated by the compiler	(not yet, but should be)0 for ``magic'' arguments to functions, that the user has no	control over@end display@item TREE_USEDHas values of:	0 for unused labels@item TREE_ADDRESSABLEA flag that is set for any type that has a constructor.@item TREE_COMPLEXITYThey seem a kludge way to track recursion, poping, and pushing.  They onlyappear in cp-decl.c and cp-decl2.c, so the are a good candidate forproper fixing, and removal.@item TREE_PRIVATESet for FIELD_DECLs by finish_struct.  But not uniformly set.The following routines do something with PRIVATE access:build_method_call, alter_access, finish_struct_methods,finish_struct, convert_to_aggr, CWriteLanguageDecl, CWriteLanguageType,CWriteUseObject, compute_access, lookup_field, dfs_pushdecl,GNU_xref_member, dbxout_type_fields, dbxout_type_method_1@item TREE_PROTECTEDThe following routines do something with PROTECTED access:build_method_call, alter_access, finish_struct, convert_to_aggr,CWriteLanguageDecl, CWriteLanguageType, CWriteUseObject,compute_access, lookup_field, GNU_xref_member, dbxout_type_fields,dbxout_type_method_1@item TYPE_BINFOUsed to get the binfo for the type.Has values of:	TREE_VECs that are binfosWhat things can this be used on:	RECORD_TYPEs@item TYPE_BINFO_BASETYPESSee also BINFO_BASETYPES.@item TYPE_BINFO_VIRTUALSA unique list of functions for the virtual function table.  See alsoBINFO_VIRTUALS.What things can this be used on:	RECORD_TYPEs@item TYPE_BINFO_VTABLEPoints to the virtual function table associated with the given type.See also BINFO_VTABLE.What things can this be used on:	RECORD_TYPEsHas values of:	VAR_DECLs that are virtual function tables@item TYPE_NAMENames the type.Has values of:@display0 for things that don't have names.should be IDENTIFIER_NODE for RECORD_TYPEs UNION_TYPEs and         ENUM_TYPEs.TYPE_DECL for RECORD_TYPEs, UNION_TYPEs and ENUM_TYPEs, but         shouldn't be.TYPE_DECL for typedefs, unsure why.@end displayWhat things can one use this on:@displayTYPE_DECLsRECORD_TYPEsUNION_TYPEsENUM_TYPEs@end displayHistory:	It currently points to the TYPE_DECL for RECORD_TYPEs,	UNION_TYPEs and ENUM_TYPEs, but it should be history soon.@item TYPE_METHODSSynonym for @code{CLASSTYPE_METHOD_VEC}.  Chained together with@code{TREE_CHAIN}.  @file{dbxout.c} uses this to get at the methods of aclass.@item TYPE_DECLUsed to represent typedefs, and used to represent bindings layers.Components:	DECL_NAME is the name of the typedef.  For example, foo would	be found in the DECL_NAME slot when @code{typedef int foo;} is	seen.	DECL_SOURCE_LINE identifies what source line number in the	source file the declaration was found at.  A value of 0	indicates that this TYPE_DECL is just an internal binding layer	marker, and does not correspond to a user supplied typedef.	DECL_SOURCE_FILE@item TYPE_FIELDSA linked list (via @code{TREE_CHAIN}) of member types of a class.  Thelist can contain @code{TYPE_DECL}s, but there can also be other thingsin the list apparently.  See also @code{CLASSTYPE_TAGS}.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -