Skip to content

Commit 397e79d

Browse files
committed
Correct the order of "bind formals to actuals", which has been rather mixed until now
1 parent 7a49dd4 commit 397e79d

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
@@ -306,17 +306,17 @@
306306
% - Specify that it is an error for a concrete class with no non-trivial
307307
% \code{noSuchMethod} to not have a concrete declaration for some member
308308
% in its interface, or to have one which is not a correct override.
309-
% - Use \ref{bindingActualsToFormals} in 3 locations, eliminating 2 extra
309+
% - Use \ref{bindingFormalsToActuals} in 3 locations, eliminating 2 extra
310310
% copies of nearly the same text.
311-
% - Add figure in \ref{bindingActualsToFormals} for improved readability.
311+
% - Add figure in \ref{bindingFormalsToActuals} for improved readability.
312312
% - Introduce a notion of lookup which is needed for superinvocations.
313313
% - Use new lookup concept to simplify specification of getter, setter, method
314314
% lookup.
315315
% - Introduce several `Case<SomeTopic>` markers in order to improve
316316
% readability.
317317
% - Reorganize several sections to specify static analysis first and then
318318
% dynamic semantics; clarify many details along the way. The sections are:
319-
% \ref{variables}, \ref{new}, \ref{const}, \ref{bindingActualsToFormals},
319+
% \ref{variables}, \ref{new}, \ref{const}, \ref{bindingFormalsToActuals},
320320
% \ref{unqualifiedInvocation}, \ref{functionExpressionInvocation},
321321
% \ref{superInvocations}, \ref{assignment}, \ref{compoundAssignment},
322322
% \ref{localVariableDeclaration}, and \ref{return}.
@@ -1756,7 +1756,7 @@ \subsection{Implicitly Induced Getters and Setters}
17561756
and in which environment
17571757
(p.\,\pageref{executionOfGenerativeConstructors},
17581758
\ref{localVariableDeclaration},
1759-
\ref{bindingActualsToFormals}).%
1759+
\ref{bindingFormalsToActuals}).%
17601760
}
17611761

17621762
\commentary{%
@@ -3497,7 +3497,7 @@ \subsubsection{The Method \code{noSuchMethod}}
34973497
because the actual argument fails to satisfy a type check,
34983498
but that situation will give rise to a dynamic type error
34993499
rather than a repeated attempt to invoke \code{noSuchMethod}
3500-
(\ref{bindingActualsToFormals}).
3500+
(\ref{bindingFormalsToActuals}).
35013501
Here is an example where a dynamic type error occurs because
35023502
an attempt is made to pass an \code{Invocation},
35033503
and the type of the parameter is \code{Never}:%
@@ -4492,7 +4492,7 @@ \subsubsection{Generative Constructors}
44924492
It is a \Error{compile-time error} if class $S$ does not declare
44934493
a generative constructor named $S$ (respectively \code{$S$.\id}).
44944494
Otherwise, the static analysis of $s$ is performed
4495-
as specified in Section~\ref{bindingActualsToFormals},
4495+
as specified in Section~\ref{bindingFormalsToActuals},
44964496
as if \code{\SUPER} respectively \code{\SUPER.\id}
44974497
had had the function type of the denoted constructor,
44984498
%% TODO(eernst): The following is very imprecise, it just serves to remember
@@ -6756,8 +6756,8 @@ \subsection{Explicit Invocation of an Instance Member of an Extension}
67566756
Let $m$ be the member of $E$ that has the name $n$.
67576757
Evaluation of $i$ proceeds by evaluating
67586758
$e$ to an object $o$,
6759-
evaluating and binding the actual arguments to the formal parameters
6760-
(\ref{bindingActualsToFormals}),
6759+
evaluating the actual arguments and binding the formal parameters to them
6760+
(\ref{bindingFormalsToActuals}),
67616761
and finally executing $m$
67626762
in a binding environment where \List{X}{1}{k} are bound to \List{t}{1}{k},
67636763
\THIS{} is bound to $o$,
@@ -13440,8 +13440,8 @@ \subsubsection{Actual Argument List Evaluation}
1344013440
}
1344113441

1344213442

13443-
\subsubsection{Binding Actuals to Formals}
13444-
\LMLabel{bindingActualsToFormals}
13443+
\subsubsection{Binding Formals to Actuals}
13444+
\LMLabel{bindingFormalsToActuals}
1344513445

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

1366213662
\LMHash{}%
13663-
An evaluated actual argument part
13663+
With a given evaluated actual argument part
1366413664

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

1367413674
\noindent
13675-
is bound to the formal type parameters and formal parameters of $f$ as follows:
13675+
the formal type parameters and formal parameters of $f$ are bound as follows:
1367613676

1367713677
\LMHash{}%
1367813678
% Passing a wrong number of actual type arguments.
@@ -13929,7 +13929,7 @@ \subsubsection{Function Expression Invocation}
1392913929

1393013930
\LMHash{}%
1393113931
Otherwise, the static analysis of $i$ is performed as specified
13932-
in Section~\ref{bindingActualsToFormals},
13932+
in Section~\ref{bindingFormalsToActuals},
1393313933
using $F$ as the static type of the invoked function,
1393413934
and the static type of $i$ is as specified there.
1393513935

@@ -13948,8 +13948,8 @@ \subsubsection{Function Expression Invocation}
1394813948
\code{$f$<\TypeArgumentListStd>(\ArgumentListStd)}
1394913949

1395013950
\noindent
13951-
is evaluated by binding actuals to formals
13952-
as specified in Section~\ref{bindingActualsToFormals},
13951+
is evaluated by binding formals to actuals
13952+
as specified in Section~\ref{bindingFormalsToActuals},
1395313953
and executing the body of $f$ with those bindings;
1395413954
the returned result is then the result of evaluating $i$.
1395513955

@@ -14052,9 +14052,9 @@ \subsection{Function Closurization}
1405214052
}
1405314053

1405414054
\LMHash{}%
14055-
An invocation of $o$ with a given argument list will bind actuals to formals
14055+
An invocation of $o$ with a given argument list will bind formals to actuals
1405614056
in the same way as an invocation of $f$
14057-
(\ref{bindingActualsToFormals}),
14057+
(\ref{bindingFormalsToActuals}),
1405814058
and then execute the body of $f$
1405914059
in the captured scope amended with the bound parameter scope,
1406014060
yielding the same completion
@@ -14149,7 +14149,7 @@ \subsection{Generic Function Instantiation}
1414914149
\ref{initializerLists},
1415014150
\ref{new},
1415114151
\ref{const},
14152-
\ref{bindingActualsToFormals},
14152+
\ref{bindingFormalsToActuals},
1415314153
\ref{assignment},
1415414154
\ref{localVariableDeclaration},
1415514155
\ref{switch},
@@ -14771,7 +14771,7 @@ \subsubsection{Ordinary Invocation}
1477114771

1477214772
\LMHash{}%
1477314773
The static analysis of $i$ is then performed
14774-
as specified in Section~\ref{bindingActualsToFormals},
14774+
as specified in Section~\ref{bindingFormalsToActuals},
1477514775
considering $F$ to be the static type of the function to call.
1477614776
The static type of $i$ is as specified there.
1477714777

@@ -14789,8 +14789,8 @@ \subsubsection{Ordinary Invocation}
1478914789
\LMHash{}%
1479014790
If the denoted member of $i$ is a static method,
1479114791
let $f$ be the function declared by that member.
14792-
The binding of actual arguments to formal parameters is performed
14793-
as specified in Section~\ref{bindingActualsToFormals}.
14792+
The binding of formal parameters to actual arguments is performed
14793+
as specified in Section~\ref{bindingFormalsToActuals}.
1479414794
The body of $f$ is then executed with respect to the bindings
1479514795
that resulted from the evaluation of the argument part.
1479614796
The value of $i$ is the object returned by the execution of $f$'s body.
@@ -14922,7 +14922,7 @@ \subsubsection{Ordinary Invocation}
1492214922

1492314923
\LMHash{}%
1492414924
Otherwise, the static analysis of $i$ is performed
14925-
as specified in Section~\ref{bindingActualsToFormals},
14925+
as specified in Section~\ref{bindingFormalsToActuals},
1492614926
considering $F$ to be the static type of the function to call,
1492714927
and the static type of $i$ is as specified there,
1492814928
except that invocations of methods named \code{remainder}
@@ -15045,8 +15045,8 @@ \subsubsection{Ordinary Invocation}
1504515045

1504615046
\LMHash{}%
1504715047
If the method lookup succeeded,
15048-
the binding of actual arguments to formal parameters is performed
15049-
as specified in Section~\ref{bindingActualsToFormals}.
15048+
the binding of formal parameters to actual arguments is performed
15049+
as specified in Section~\ref{bindingFormalsToActuals}.
1505015050
The body of $f$ is then executed with respect to the bindings
1505115051
that resulted from the evaluation of the argument list,
1505215052
and with \THIS{} bound to $o$.
@@ -15285,7 +15285,7 @@ \subsubsection{Superinvocations}
1528515285
Otherwise
1528615286
\commentary{(when one of the lookups succeeded)},
1528715287
the static analysis of $i$ is performed
15288-
as specified in Section~\ref{bindingActualsToFormals},
15288+
as specified in Section~\ref{bindingFormalsToActuals},
1528915289
considering the function to have static type $F$,
1529015290
and the static type of $i$ is as specified there.
1529115291

@@ -15343,9 +15343,9 @@ \subsubsection{Superinvocations}
1534315343
}
1534415344

1534515345
\LMHash{}%
15346-
Otherwise perform the binding of actual arguments to formal parameters for
15346+
Otherwise perform the binding of formal parameters to actual arguments for
1534715347
\code{$f$<\TypeArgumentListStd>(\ArgumentListStd)}
15348-
as specified in Section~\ref{bindingActualsToFormals},
15348+
as specified in Section~\ref{bindingFormalsToActuals},
1534915349
and execute the body of $f$ with said bindings
1535015350
plus a binding of \THIS{} to $o$.
1535115351
The result returned by $f$ is then the result of evaluating $i$.
@@ -16082,7 +16082,7 @@ \subsubsection{Generic Method Instantiation}
1608216082
\ref{initializerLists},
1608316083
\ref{new},
1608416084
\ref{const},
16085-
\ref{bindingActualsToFormals},
16085+
\ref{bindingFormalsToActuals},
1608616086
\ref{assignment},
1608716087
\ref{localVariableDeclaration},
1608816088
\ref{switch},
@@ -22537,7 +22537,7 @@ \subsection{Dynamic Type System}
2253722537
\ref{redirectingFactoryConstructors},
2253822538
\ref{lists},
2253922539
\ref{new},
22540-
\ref{bindingActualsToFormals},
22540+
\ref{bindingFormalsToActuals},
2254122541
\ref{ordinaryInvocation},
2254222542
\ref{assignment},
2254322543
\ref{typeCast},

0 commit comments

Comments
 (0)