11.07.2015 Views

Advanced Programming Guide

Advanced Programming Guide

Advanced Programming Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

356 • Appendix A: Internal Representation and Manipulationinition is evaluated, the lexical-seq is updated by replacing each of thesecond pointers with a pointer to the actual object represented. The namepointers are not touched, so that the actual identifier names are still available.The lexical-seq for a module contains entries for any surroundingscopeidentifiers used by that module or by any procedures or modulescontained within it.The mod-name field points to the optional name of the module. Ifa module name was specified when the module was declared, the namewill appear there. If no module name was specified, this field will containNULL.Module InstanceMODULE ∧ export − seq ∧ mod − def ∧ local − seqMaple syntax: noneLength: 4Executing a module definition (MODDEF) results in a module instance.Each local or exported member of the module is instantiated and belongsto that instance of the module. The export-seq field points to anexpression sequence of names of the instantiated exports (as opposed tothe global names, as stored in the module definition). The mod-def fieldpoints back to the original module definition. The local-seq field pointsto an expression sequence of names of the instantiated local variables ofthe module.IdentifierNAME ∧ assigned− ∧ attrib− characters characters . . .expr exprMaple syntax: nameLength: 4 or moreThe assigned-expr field points to the assigned value of the name. Ifthe name has no assigned value, this field is a null pointer (not a pointerto NULL). The next field points to an expression sequence of attributesof the name. If there are no attributes, this field points to the emptyexpression sequence (NULL). The remaining fields contain the charactersmaking up the name, stored 4 or 8 per machine word (for 32-bit and 64-bitarchitectures respectively). The last character is followed by a zero-byte.Any unused bytes in the last machine word are also zero. The maximum

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!