Topic: concurrency control by sequencers
Topic: curried functions
Topic: evaluate operator
Topic: function application
Topic: function results
Topic: function syntax definition
Topic: in-line code
Topic: monitored statements and events
Topic: notation for operations
Topic: procedure valued variables
Topic: remote procedure call
Topic: replacement as a procedure call
Topic: return from procedure
Topic: type conversion
Topic: variable as function that accesses an object's value
| |
Summary
A function call consists of a function reference and arguments. The arguments are a list, a message for the function to process, or a parameter record. Functions are called by binding arguments to function parameters, and transferring to the function's environment. Hanson in SL5 treats function calls as 'create function environment', 'bind arguments to parameters', and 'resume function's environment'. In Trac a function call replaces segment gaps with actual arguments. In Cobol several functions can be called as a group. In all languages, functions of no arguments need to be differentiated from variables, unless variables are themselves accessing functions. If the function is denoted by an object, the object may be an argument during a function call. (cbb 5/80)
Subtopic: function call with args
Quote: C-- procedure names are expressions of native code-pointer type; multiple results, tail call, and fixed argument list [»joneSP9_1999]
| Quote: to call a function, a programmer gives its name, assumes an implementation, and uses arguments of the correct type [»coxBJ7_1983]
| Quote: the basic TOPD statement is a procedure call v.p (v1,...,vn); v is both the first argument and indicates the class by its type [»hendP9_1975]
| QuoteRef: hehnEC7_1975 ;;28 reference to a labeled statement means do that statement
| QuoteRef: hogbD10_1971 ;;3 command format: key-word number-list (any other interspersed symbols for documentation ok)
| Subtopic: activation record
Quote: an activation record holds all information relevant to one activation of an executable unit [»maclBJ_1987]
| Quote: allocate one activation record for a cluster of procedure calls that have a single entry point [»murtTP7_1991]
| Note: local variables are fields of the local activation record [»cbb_2000, OK]
| Subtopic: calling sequence
Note: a call is a stylized use of rules, like a list is a stylized use of objects; allows many kinds of calls [»cbb_1990, OK]
| Quote: a calling convention is a contract between caller, callee, run-time system, and operating system; must agree on parameters, results, space allocation, reserved stack, stack inspection/modification; hard to get right [»olinR1_2006]
| Quote: specify a calling convention with staged allocation; composes tiny allocators called stages; precise, formal semantics for compiler implementation and testing [»olinR1_2006]
| Quote: calling sequences must be compact
| Quote: always keep the powers-of-two table and the routine changing sequence (PERM) in memory; the later simplifies call and return from a routine [»turiA3_1951]
| Quote: UNIX programs tend to use many small functions; 20% of time and space can be in function prologue, epilogue and calling sequence [»johnSC7_1978a]
| Quote: SL5 procedure invocation is decomposed into create environment, bind arguments, resume execution [»hansDR5_1978]
| Quote: SL5 function calls are abbreviations for resume(create f with arg_list) [»hansDR5_1978]
| Quote: final assembly generates function prologs and epilogs; handles stack frame, preserved registers [»auslM6_1982]
| Subtopic: function as temporary task
Quote: a DELTA procedure is a partial task, connected to the prime task or partial task; discarded when finished [»handP_1981]
| Subtopic: function call as message exchange
Quote: a procedure call can be viewed as an exchange of messages
| Subtopic: load on demand
Quote: Oberon allocates imported modules but does not load them; delayed loading on first call by paging; supports larger systems [»wirtN9_1989]
| Subtopic: call procedures in sequence
QuoteRef: sammJE5_1962 ;;150 procedures are ordered so can say perform gross-pay-sale through next-pay-day
| Subtopic: call syntax
QuoteRef: sammJE_1969 ;;452 #(cl, n, z) calls string n from current location to next segment gap. if n is empty has value of z
| QuoteRef: wessBD_1965 ;;CL,X,yl, y2,... where x is a form (string) and yl-yn replaces segment gaps 1@-n@
| QuoteRef: wulfWA12_1971 ;;785 no parameter by z()
| QuoteRef: cbb_1973 ;;rt1-2 proc() for no arguments
| Subtopic: terminating call
Quote: the stop statement either terminates execution or is a subroutine call [»kherL9_1978]
| Subtopic: copy/invoke vs. define/call
Quote: user-defined functions in Excel avoid the definition/invocation distinction; live data at each invocation site [»joneSP8_2003]
| Quote: create new Subtext nodes by copying from a prototype; instantiates data structures and calls functions [»edwaJ10_2005]
|
Related Topics
Topic: concurrency control by sequencers (27 items)
Topic: curried functions (14 items)
Topic: evaluate operator (7 items)
Topic: function application (18 items)
Topic: function results (7 items)
Topic: function syntax definition (17 items)
Topic: in-line code (7 items)
Topic: monitored statements and events (16 items)
Topic: notation for operations (18 items)
Topic: procedure valued variables (34 items)
Topic: remote procedure call (44 items)
Topic: replacement as a procedure call (10 items)
Topic: return from procedure (9 items)
Topic: type conversion (33 items)
Topic: variable as function that accesses an object's value (21 items)
|