Project 45: Fortran as an assembler language Madison 1982: ============= Feldman summarized the characteristics of an assembly language as simplicity, approximately equal execution cost per instruction, low level, simple data types, use of addresses and registers. It is unsuitable for human users except as a last resort but is suitable as a target for computer generation. Fortran has most of these characteristics and the great advantage of wide availability. By using preprocessors, it is easy to provide more convenient syntax, general loop constructs and more general operators (e.g. COMPLEX, array operators); it is more difficult to provide new data types, inhomogeneous data structures, different i/o mechanisms, simple internal procedures (because of problems with array arguments); it is very difficult to provide recursion, pointer variables. Fortran 8x looks as if it will help by providing better floating-point facilities including the equivalent of DOUBLE COMPLEX, name hiding in libraries, humane calling sequences, data structures, bit strings, stack allocation of dynamic storage but does not look as if it will provide pointers. Gentleman felt that it was helpful to know to what a pointer points. Feldman asked how a heap allocator could be implemented with typed pointers. Feldman went on to discuss list processing, whose characteristics are frequent and dynamic storage allocation, objects of differing sizes, objects containing other objects, dynamic determination of sizes and structures and the need to manipulate references and atoms. Rice remarked that the advantages of aiming only for a target language for preprocessors would be a small Fortran 8x language and efficient compilation. Smith remarked that X3J3 has always been concerned about the efficiency of the object code. Feldman said that the size of the present language must mean some loss in execution speed (say by 5- 10%), a much more expensive compiler (perhaps by ten times) and a slower-running compiler (perhaps by three times). Gentleman saw a need for exception handling, concurrency, parameter passing and scooping rules. Smith saw the need for array processing. Dekker felt that some parallel mechanism is needed, e.g. the parallel do. Feldman said that this would be good for preprocessors.