Skip to content

Commit d6885f4

Browse files
committed
Correct the order of "bind formals to actuals", which has been rather mixed until now
1 parent 72028b0 commit d6885f4

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
@@ -293,17 +293,17 @@
293293
% - Specify that it is an error for a concrete class with no non-trivial
294294
% \code{noSuchMethod} to not have a concrete declaration for some member
295295
% in its interface, or to have one which is not a correct override.
296-
% - Use \ref{bindingActualsToFormals} in 3 locations, eliminating 2 extra
296+
% - Use \ref{bindingFormalsToActuals} in 3 locations, eliminating 2 extra
297297
% copies of nearly the same text.
298-
% - Add figure in \ref{bindingActualsToFormals} for improved readability.
298+
% - Add figure in \ref{bindingFormalsToActuals} for improved readability.
299299
% - Introduce a notion of lookup which is needed for superinvocations.
300300
% - Use new lookup concept to simplify specification of getter, setter, method
301301
% lookup.
302302
% - Introduce several `Case<SomeTopic>` markers in order to improve
303303
% readability.
304304
% - Reorganize several sections to specify static analysis first and then
305305
% dynamic semantics; clarify many details along the way. The sections are:
306-
% \ref{variables}, \ref{new}, \ref{const}, \ref{bindingActualsToFormals},
306+
% \ref{variables}, \ref{new}, \ref{const}, \ref{bindingFormalsToActuals},
307307
% \ref{unqualifiedInvocation}, \ref{functionExpressionInvocation},
308308
% \ref{superInvocations}, \ref{assignment}, \ref{compoundAssignment},
309309
% \ref{localVariableDeclaration}, and \ref{return}.
@@ -1743,7 +1743,7 @@ \subsection{Implicitly Induced Getters and Setters}
17431743
and in which environment
17441744
(p.\,\pageref{executionOfGenerativeConstructors},
17451745
\ref{localVariableDeclaration},
1746-
\ref{bindingActualsToFormals}).%
1746+
\ref{bindingFormalsToActuals}).%
17471747
}
17481748

17491749
\commentary{%
@@ -3482,7 +3482,7 @@ \subsubsection{The Method \code{noSuchMethod}}
34823482
because the actual argument fails to satisfy a type check,
34833483
but that situation will give rise to a dynamic type error
34843484
rather than a repeated attempt to invoke \code{noSuchMethod}
3485-
(\ref{bindingActualsToFormals}).
3485+
(\ref{bindingFormalsToActuals}).
34863486
Here is an example where a dynamic type error occurs because
34873487
an attempt is made to pass an \code{Invocation},
34883488
and the type of the parameter is \code{Never}:%
@@ -4477,7 +4477,7 @@ \subsubsection{Generative Constructors}
44774477
It is a \Error{compile-time error} if class $S$ does not declare
44784478
a generative constructor named $S$ (respectively \code{$S$.\id}).
44794479
Otherwise, the static analysis of $s$ is performed
4480-
as specified in Section~\ref{bindingActualsToFormals},
4480+
as specified in Section~\ref{bindingFormalsToActuals},
44814481
as if \code{\SUPER} respectively \code{\SUPER.\id}
44824482
had had the function type of the denoted constructor,
44834483
%% TODO(eernst): The following is very imprecise, it just serves to remember
@@ -6729,8 +6729,8 @@ \subsection{Explicit Invocation of an Instance Member of an Extension}
67296729
Let $m$ be the member of $E$ that has the name $n$.
67306730
Evaluation of $i$ proceeds by evaluating
67316731
$e$ to an object $o$,
6732-
evaluating and binding the actual arguments to the formal parameters
6733-
(\ref{bindingActualsToFormals}),
6732+
evaluating the actual arguments and binding the formal parameters to them
6733+
(\ref{bindingFormalsToActuals}),
67346734
and finally executing $m$
67356735
in a binding environment where \List{X}{1}{k} are bound to \List{t}{1}{k},
67366736
\THIS{} is bound to $o$,
@@ -13413,8 +13413,8 @@ \subsubsection{Actual Argument List Evaluation}
1341313413
}
1341413414

1341513415

13416-
\subsubsection{Binding Actuals to Formals}
13417-
\LMLabel{bindingActualsToFormals}
13416+
\subsubsection{Binding Formals to Actuals}
13417+
\LMLabel{bindingFormalsToActuals}
1341813418

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

1363513635
\LMHash{}%
13636-
An evaluated actual argument part
13636+
With a given evaluated actual argument part
1363713637

1363813638
\noindent
1363913639
\code{<\List{t}{1}{r}>(\ArgumentList{o}{m}{q}{l})}
@@ -13645,7 +13645,7 @@ \subsubsection{Binding Actuals to Formals}
1364513645
\code{<\TypeArgumentListStd>(\ArgumentList{a}{m}{q}{l})}
1364613646

1364713647
\noindent
13648-
is bound to the formal type parameters and formal parameters of $f$ as follows:
13648+
the formal type parameters and formal parameters of $f$ are bound as follows:
1364913649

1365013650
\LMHash{}%
1365113651
% Passing a wrong number of actual type arguments.
@@ -13902,7 +13902,7 @@ \subsubsection{Function Expression Invocation}
1390213902

1390313903
\LMHash{}%
1390413904
Otherwise, the static analysis of $i$ is performed as specified
13905-
in Section~\ref{bindingActualsToFormals},
13905+
in Section~\ref{bindingFormalsToActuals},
1390613906
using $F$ as the static type of the invoked function,
1390713907
and the static type of $i$ is as specified there.
1390813908

@@ -13921,8 +13921,8 @@ \subsubsection{Function Expression Invocation}
1392113921
\code{$f$<\TypeArgumentListStd>(\ArgumentListStd)}
1392213922

1392313923
\noindent
13924-
is evaluated by binding actuals to formals
13925-
as specified in Section~\ref{bindingActualsToFormals},
13924+
is evaluated by binding formals to actuals
13925+
as specified in Section~\ref{bindingFormalsToActuals},
1392613926
and executing the body of $f$ with those bindings;
1392713927
the returned result is then the result of evaluating $i$.
1392813928

@@ -14025,9 +14025,9 @@ \subsection{Function Closurization}
1402514025
}
1402614026

1402714027
\LMHash{}%
14028-
An invocation of $o$ with a given argument list will bind actuals to formals
14028+
An invocation of $o$ with a given argument list will bind formals to actuals
1402914029
in the same way as an invocation of $f$
14030-
(\ref{bindingActualsToFormals}),
14030+
(\ref{bindingFormalsToActuals}),
1403114031
and then execute the body of $f$
1403214032
in the captured scope amended with the bound parameter scope,
1403314033
yielding the same completion
@@ -14122,7 +14122,7 @@ \subsection{Generic Function Instantiation}
1412214122
\ref{initializerLists},
1412314123
\ref{new},
1412414124
\ref{const},
14125-
\ref{bindingActualsToFormals},
14125+
\ref{bindingFormalsToActuals},
1412614126
\ref{assignment},
1412714127
\ref{localVariableDeclaration},
1412814128
\ref{switch},
@@ -14744,7 +14744,7 @@ \subsubsection{Ordinary Invocation}
1474414744

1474514745
\LMHash{}%
1474614746
The static analysis of $i$ is then performed
14747-
as specified in Section~\ref{bindingActualsToFormals},
14747+
as specified in Section~\ref{bindingFormalsToActuals},
1474814748
considering $F$ to be the static type of the function to call.
1474914749
The static type of $i$ is as specified there.
1475014750

@@ -14762,8 +14762,8 @@ \subsubsection{Ordinary Invocation}
1476214762
\LMHash{}%
1476314763
If the denoted member of $i$ is a static method,
1476414764
let $f$ be the function declared by that member.
14765-
The binding of actual arguments to formal parameters is performed
14766-
as specified in Section~\ref{bindingActualsToFormals}.
14765+
The binding of formal parameters to actual arguments is performed
14766+
as specified in Section~\ref{bindingFormalsToActuals}.
1476714767
The body of $f$ is then executed with respect to the bindings
1476814768
that resulted from the evaluation of the argument part.
1476914769
The value of $i$ is the object returned by the execution of $f$'s body.
@@ -14895,7 +14895,7 @@ \subsubsection{Ordinary Invocation}
1489514895

1489614896
\LMHash{}%
1489714897
Otherwise, the static analysis of $i$ is performed
14898-
as specified in Section~\ref{bindingActualsToFormals},
14898+
as specified in Section~\ref{bindingFormalsToActuals},
1489914899
considering $F$ to be the static type of the function to call,
1490014900
and the static type of $i$ is as specified there,
1490114901
except that invocations of methods named \code{remainder}
@@ -15018,8 +15018,8 @@ \subsubsection{Ordinary Invocation}
1501815018

1501915019
\LMHash{}%
1502015020
If the method lookup succeeded,
15021-
the binding of actual arguments to formal parameters is performed
15022-
as specified in Section~\ref{bindingActualsToFormals}.
15021+
the binding of formal parameters to actual arguments is performed
15022+
as specified in Section~\ref{bindingFormalsToActuals}.
1502315023
The body of $f$ is then executed with respect to the bindings
1502415024
that resulted from the evaluation of the argument list,
1502515025
and with \THIS{} bound to $o$.
@@ -15258,7 +15258,7 @@ \subsubsection{Superinvocations}
1525815258
Otherwise
1525915259
\commentary{(when one of the lookups succeeded)},
1526015260
the static analysis of $i$ is performed
15261-
as specified in Section~\ref{bindingActualsToFormals},
15261+
as specified in Section~\ref{bindingFormalsToActuals},
1526215262
considering the function to have static type $F$,
1526315263
and the static type of $i$ is as specified there.
1526415264

@@ -15316,9 +15316,9 @@ \subsubsection{Superinvocations}
1531615316
}
1531715317

1531815318
\LMHash{}%
15319-
Otherwise perform the binding of actual arguments to formal parameters for
15319+
Otherwise perform the binding of formal parameters to actual arguments for
1532015320
\code{$f$<\TypeArgumentListStd>(\ArgumentListStd)}
15321-
as specified in Section~\ref{bindingActualsToFormals},
15321+
as specified in Section~\ref{bindingFormalsToActuals},
1532215322
and execute the body of $f$ with said bindings
1532315323
plus a binding of \THIS{} to $o$.
1532415324
The result returned by $f$ is then the result of evaluating $i$.
@@ -16055,7 +16055,7 @@ \subsubsection{Generic Method Instantiation}
1605516055
\ref{initializerLists},
1605616056
\ref{new},
1605716057
\ref{const},
16058-
\ref{bindingActualsToFormals},
16058+
\ref{bindingFormalsToActuals},
1605916059
\ref{assignment},
1606016060
\ref{localVariableDeclaration},
1606116061
\ref{switch},
@@ -22462,7 +22462,7 @@ \subsection{Dynamic Type System}
2246222462
\ref{redirectingFactoryConstructors},
2246322463
\ref{lists},
2246422464
\ref{new},
22465-
\ref{bindingActualsToFormals},
22465+
\ref{bindingFormalsToActuals},
2246622466
\ref{ordinaryInvocation},
2246722467
\ref{assignment},
2246822468
\ref{typeCast},

0 commit comments

Comments
 (0)