Skip to content

Commit 912a96f

Browse files
committed
Correct the order of "bind formals to actuals", which has been rather mixed until now
1 parent 8ed26d9 commit 912a96f

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

specification/dartLangSpec.tex

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -301,17 +301,17 @@
301301
% - Specify that it is an error for a concrete class with no non-trivial
302302
% \code{noSuchMethod} to not have a concrete declaration for some member
303303
% in its interface, or to have one which is not a correct override.
304-
% - Use \ref{bindingActualsToFormals} in 3 locations, eliminating 2 extra
304+
% - Use \ref{bindingFormalsToActuals} in 3 locations, eliminating 2 extra
305305
% copies of nearly the same text.
306-
% - Add figure in \ref{bindingActualsToFormals} for improved readability.
306+
% - Add figure in \ref{bindingFormalsToActuals} for improved readability.
307307
% - Introduce a notion of lookup which is needed for superinvocations.
308308
% - Use new lookup concept to simplify specification of getter, setter, method
309309
% lookup.
310310
% - Introduce several `Case<SomeTopic>` markers in order to improve
311311
% readability.
312312
% - Reorganize several sections to specify static analysis first and then
313313
% dynamic semantics; clarify many details along the way. The sections are:
314-
% \ref{variables}, \ref{new}, \ref{const}, \ref{bindingActualsToFormals},
314+
% \ref{variables}, \ref{new}, \ref{const}, \ref{bindingFormalsToActuals},
315315
% \ref{unqualifiedInvocation}, \ref{functionExpressionInvocation},
316316
% \ref{superInvocations}, \ref{assignment}, \ref{compoundAssignment},
317317
% \ref{localVariableDeclaration}, and \ref{return}.
@@ -1751,7 +1751,7 @@ \subsection{Implicitly Induced Getters and Setters}
17511751
and in which environment
17521752
(p.\,\pageref{executionOfGenerativeConstructors},
17531753
\ref{localVariableDeclaration},
1754-
\ref{bindingActualsToFormals}).%
1754+
\ref{bindingFormalsToActuals}).%
17551755
}
17561756

17571757
\commentary{%
@@ -3490,7 +3490,7 @@ \subsubsection{The Method \code{noSuchMethod}}
34903490
because the actual argument fails to satisfy a type check,
34913491
but that situation will give rise to a dynamic type error
34923492
rather than a repeated attempt to invoke \code{noSuchMethod}
3493-
(\ref{bindingActualsToFormals}).
3493+
(\ref{bindingFormalsToActuals}).
34943494
Here is an example where a dynamic type error occurs because
34953495
an attempt is made to pass an \code{Invocation},
34963496
and the type of the parameter is \code{Never}:%
@@ -4485,7 +4485,7 @@ \subsubsection{Generative Constructors}
44854485
It is a \Error{compile-time error} if class $S$ does not declare
44864486
a generative constructor named $S$ (respectively \code{$S$.\id}).
44874487
Otherwise, the static analysis of $s$ is performed
4488-
as specified in Section~\ref{bindingActualsToFormals},
4488+
as specified in Section~\ref{bindingFormalsToActuals},
44894489
as if \code{\SUPER} respectively \code{\SUPER.\id}
44904490
had had the function type of the denoted constructor,
44914491
%% TODO(eernst): The following is very imprecise, it just serves to remember
@@ -6749,8 +6749,8 @@ \subsection{Explicit Invocation of an Instance Member of an Extension}
67496749
Let $m$ be the member of $E$ that has the name $n$.
67506750
Evaluation of $i$ proceeds by evaluating
67516751
$e$ to an object $o$,
6752-
evaluating and binding the actual arguments to the formal parameters
6753-
(\ref{bindingActualsToFormals}),
6752+
evaluating the actual arguments and binding the formal parameters to them
6753+
(\ref{bindingFormalsToActuals}),
67546754
and finally executing $m$
67556755
in a binding environment where \List{X}{1}{k} are bound to \List{t}{1}{k},
67566756
\THIS{} is bound to $o$,
@@ -13433,8 +13433,8 @@ \subsubsection{Actual Argument List Evaluation}
1343313433
}
1343413434

1343513435

13436-
\subsubsection{Binding Actuals to Formals}
13437-
\LMLabel{bindingActualsToFormals}
13436+
\subsubsection{Binding Formals to Actuals}
13437+
\LMLabel{bindingFormalsToActuals}
1343813438

1343913439
\commentary{%
1344013440
In the following, the non-generic case is covered implicitly:
@@ -13653,7 +13653,7 @@ \subsubsection{Binding Actuals to Formals}
1365313653
and let $p_{h+1}, \ldots, p_{h+k}$ be the optional parameters declared by $f$.
1365413654

1365513655
\LMHash{}%
13656-
An evaluated actual argument part
13656+
With a given evaluated actual argument part
1365713657

1365813658
\noindent
1365913659
\code{<\List{t}{1}{r}>(\ArgumentList{o}{m}{q}{l})}
@@ -13665,7 +13665,7 @@ \subsubsection{Binding Actuals to Formals}
1366513665
\code{<\TypeArgumentListStd>(\ArgumentList{a}{m}{q}{l})}
1366613666

1366713667
\noindent
13668-
is bound to the formal type parameters and formal parameters of $f$ as follows:
13668+
the formal type parameters and formal parameters of $f$ are bound as follows:
1366913669

1367013670
\LMHash{}%
1367113671
% Passing a wrong number of actual type arguments.
@@ -13922,7 +13922,7 @@ \subsubsection{Function Expression Invocation}
1392213922

1392313923
\LMHash{}%
1392413924
Otherwise, the static analysis of $i$ is performed as specified
13925-
in Section~\ref{bindingActualsToFormals},
13925+
in Section~\ref{bindingFormalsToActuals},
1392613926
using $F$ as the static type of the invoked function,
1392713927
and the static type of $i$ is as specified there.
1392813928

@@ -13941,8 +13941,8 @@ \subsubsection{Function Expression Invocation}
1394113941
\code{$f$<\TypeArgumentListStd>(\ArgumentListStd)}
1394213942

1394313943
\noindent
13944-
is evaluated by binding actuals to formals
13945-
as specified in Section~\ref{bindingActualsToFormals},
13944+
is evaluated by binding formals to actuals
13945+
as specified in Section~\ref{bindingFormalsToActuals},
1394613946
and executing the body of $f$ with those bindings;
1394713947
the returned result is then the result of evaluating $i$.
1394813948

@@ -14045,9 +14045,9 @@ \subsection{Function Closurization}
1404514045
}
1404614046

1404714047
\LMHash{}%
14048-
An invocation of $o$ with a given argument list will bind actuals to formals
14048+
An invocation of $o$ with a given argument list will bind formals to actuals
1404914049
in the same way as an invocation of $f$
14050-
(\ref{bindingActualsToFormals}),
14050+
(\ref{bindingFormalsToActuals}),
1405114051
and then execute the body of $f$
1405214052
in the captured scope amended with the bound parameter scope,
1405314053
yielding the same completion
@@ -14142,7 +14142,7 @@ \subsection{Generic Function Instantiation}
1414214142
\ref{initializerLists},
1414314143
\ref{new},
1414414144
\ref{const},
14145-
\ref{bindingActualsToFormals},
14145+
\ref{bindingFormalsToActuals},
1414614146
\ref{assignment},
1414714147
\ref{localVariableDeclaration},
1414814148
\ref{switch},
@@ -14764,7 +14764,7 @@ \subsubsection{Ordinary Invocation}
1476414764

1476514765
\LMHash{}%
1476614766
The static analysis of $i$ is then performed
14767-
as specified in Section~\ref{bindingActualsToFormals},
14767+
as specified in Section~\ref{bindingFormalsToActuals},
1476814768
considering $F$ to be the static type of the function to call.
1476914769
The static type of $i$ is as specified there.
1477014770

@@ -14782,8 +14782,8 @@ \subsubsection{Ordinary Invocation}
1478214782
\LMHash{}%
1478314783
If the denoted member of $i$ is a static method,
1478414784
let $f$ be the function declared by that member.
14785-
The binding of actual arguments to formal parameters is performed
14786-
as specified in Section~\ref{bindingActualsToFormals}.
14785+
The binding of formal parameters to actual arguments is performed
14786+
as specified in Section~\ref{bindingFormalsToActuals}.
1478714787
The body of $f$ is then executed with respect to the bindings
1478814788
that resulted from the evaluation of the argument part.
1478914789
The value of $i$ is the object returned by the execution of $f$'s body.
@@ -14915,7 +14915,7 @@ \subsubsection{Ordinary Invocation}
1491514915

1491614916
\LMHash{}%
1491714917
Otherwise, the static analysis of $i$ is performed
14918-
as specified in Section~\ref{bindingActualsToFormals},
14918+
as specified in Section~\ref{bindingFormalsToActuals},
1491914919
considering $F$ to be the static type of the function to call,
1492014920
and the static type of $i$ is as specified there,
1492114921
except that invocations of methods named \code{remainder}
@@ -15038,8 +15038,8 @@ \subsubsection{Ordinary Invocation}
1503815038

1503915039
\LMHash{}%
1504015040
If the method lookup succeeded,
15041-
the binding of actual arguments to formal parameters is performed
15042-
as specified in Section~\ref{bindingActualsToFormals}.
15041+
the binding of formal parameters to actual arguments is performed
15042+
as specified in Section~\ref{bindingFormalsToActuals}.
1504315043
The body of $f$ is then executed with respect to the bindings
1504415044
that resulted from the evaluation of the argument list,
1504515045
and with \THIS{} bound to $o$.
@@ -15278,7 +15278,7 @@ \subsubsection{Superinvocations}
1527815278
Otherwise
1527915279
\commentary{(when one of the lookups succeeded)},
1528015280
the static analysis of $i$ is performed
15281-
as specified in Section~\ref{bindingActualsToFormals},
15281+
as specified in Section~\ref{bindingFormalsToActuals},
1528215282
considering the function to have static type $F$,
1528315283
and the static type of $i$ is as specified there.
1528415284

@@ -15336,9 +15336,9 @@ \subsubsection{Superinvocations}
1533615336
}
1533715337

1533815338
\LMHash{}%
15339-
Otherwise perform the binding of actual arguments to formal parameters for
15339+
Otherwise perform the binding of formal parameters to actual arguments for
1534015340
\code{$f$<\TypeArgumentListStd>(\ArgumentListStd)}
15341-
as specified in Section~\ref{bindingActualsToFormals},
15341+
as specified in Section~\ref{bindingFormalsToActuals},
1534215342
and execute the body of $f$ with said bindings
1534315343
plus a binding of \THIS{} to $o$.
1534415344
The result returned by $f$ is then the result of evaluating $i$.
@@ -16075,7 +16075,7 @@ \subsubsection{Generic Method Instantiation}
1607516075
\ref{initializerLists},
1607616076
\ref{new},
1607716077
\ref{const},
16078-
\ref{bindingActualsToFormals},
16078+
\ref{bindingFormalsToActuals},
1607916079
\ref{assignment},
1608016080
\ref{localVariableDeclaration},
1608116081
\ref{switch},
@@ -22530,7 +22530,7 @@ \subsection{Dynamic Type System}
2253022530
\ref{redirectingFactoryConstructors},
2253122531
\ref{lists},
2253222532
\ref{new},
22533-
\ref{bindingActualsToFormals},
22533+
\ref{bindingFormalsToActuals},
2253422534
\ref{ordinaryInvocation},
2253522535
\ref{assignment},
2253622536
\ref{typeCast},

0 commit comments

Comments
 (0)