Declaration DescriptorsVariable and Field Name DescriptorsFunction Name Descriptors

Function Name Descriptors

The only remaining form of declaration descriptor is that used to represent names defined as functions. The type used for such descriptors is named funcdesc and is shown in figure *.

The formallist component of a funcdesc structure points to a list of declaration descriptors stored as structures of type formaldesc. This list should contain the declaration descriptors for all of the formal parameters associated with the function. This list will be used to type check calls made to the function. The paramcount field should be set equal to the number of parameters the function expects.

The isfunc field is a Boolean set to true if the name is declared as a function returning an int (rather than void). The number of memory units required for local variables and temporary storage is stored in localsize. Finally, the entrylbl field is used by the code generator to generate jumps to the function's entry point.


Computer Science 434
Department of Computer Science
Williams College

Declaration DescriptorsVariable and Field Name DescriptorsFunction Name Descriptors