Skip to content

Commit a2bebf3

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

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

17531753
\commentary{%
@@ -3486,7 +3486,7 @@ \subsubsection{The Method \code{noSuchMethod}}
34863486
because the actual argument fails to satisfy a type check,
34873487
but that situation will give rise to a dynamic type error
34883488
rather than a repeated attempt to invoke \code{noSuchMethod}
3489-
(\ref{bindingActualsToFormals}).
3489+
(\ref{bindingFormalsToActuals}).
34903490
Here is an example where a dynamic type error occurs because
34913491
an attempt is made to pass an \code{Invocation},
34923492
and the type of the parameter is \code{Never}:%
@@ -4481,7 +4481,7 @@ \subsubsection{Generative Constructors}
44814481
It is a \Error{compile-time error} if class $S$ does not declare
44824482
a generative constructor named $S$ (respectively \code{$S$.\id}).
44834483
Otherwise, the static analysis of $s$ is performed
4484-
as specified in Section~\ref{bindingActualsToFormals},
4484+
as specified in Section~\ref{bindingFormalsToActuals},
44854485
as if \code{\SUPER} respectively \code{\SUPER.\id}
44864486
had had the function type of the denoted constructor,
44874487
%% TODO(eernst): The following is very imprecise, it just serves to remember
@@ -6745,8 +6745,8 @@ \subsection{Explicit Invocation of an Instance Member of an Extension}
67456745
Let $m$ be the member of $E$ that has the name $n$.
67466746
Evaluation of $i$ proceeds by evaluating
67476747
$e$ to an object $o$,
6748-
evaluating and binding the actual arguments to the formal parameters
6749-
(\ref{bindingActualsToFormals}),
6748+
evaluating the actual arguments and binding the formal parameters to them
6749+
(\ref{bindingFormalsToActuals}),
67506750
and finally executing $m$
67516751
in a binding environment where \List{X}{1}{k} are bound to \List{t}{1}{k},
67526752
\THIS{} is bound to $o$,
@@ -13429,8 +13429,8 @@ \subsubsection{Actual Argument List Evaluation}
1342913429
}
1343013430

1343113431

13432-
\subsubsection{Binding Actuals to Formals}
13433-
\LMLabel{bindingActualsToFormals}
13432+
\subsubsection{Binding Formals to Actuals}
13433+
\LMLabel{bindingFormalsToActuals}
1343413434

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

1365113651
\LMHash{}%
13652-
An evaluated actual argument part
13652+
With a given evaluated actual argument part
1365313653

1365413654
\noindent
1365513655
\code{<\List{t}{1}{r}>(\ArgumentList{o}{m}{q}{l})}
@@ -13661,7 +13661,7 @@ \subsubsection{Binding Actuals to Formals}
1366113661
\code{<\TypeArgumentListStd>(\ArgumentList{a}{m}{q}{l})}
1366213662

1366313663
\noindent
13664-
is bound to the formal type parameters and formal parameters of $f$ as follows:
13664+
the formal type parameters and formal parameters of $f$ are bound as follows:
1366513665

1366613666
\LMHash{}%
1366713667
% Passing a wrong number of actual type arguments.
@@ -13918,7 +13918,7 @@ \subsubsection{Function Expression Invocation}
1391813918

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

@@ -13937,8 +13937,8 @@ \subsubsection{Function Expression Invocation}
1393713937
\code{$f$<\TypeArgumentListStd>(\ArgumentListStd)}
1393813938

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

@@ -14041,9 +14041,9 @@ \subsection{Function Closurization}
1404114041
}
1404214042

1404314043
\LMHash{}%
14044-
An invocation of $o$ with a given argument list will bind actuals to formals
14044+
An invocation of $o$ with a given argument list will bind formals to actuals
1404514045
in the same way as an invocation of $f$
14046-
(\ref{bindingActualsToFormals}),
14046+
(\ref{bindingFormalsToActuals}),
1404714047
and then execute the body of $f$
1404814048
in the captured scope amended with the bound parameter scope,
1404914049
yielding the same completion
@@ -14138,7 +14138,7 @@ \subsection{Generic Function Instantiation}
1413814138
\ref{initializerLists},
1413914139
\ref{new},
1414014140
\ref{const},
14141-
\ref{bindingActualsToFormals},
14141+
\ref{bindingFormalsToActuals},
1414214142
\ref{assignment},
1414314143
\ref{localVariableDeclaration},
1414414144
\ref{switch},
@@ -14760,7 +14760,7 @@ \subsubsection{Ordinary Invocation}
1476014760

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

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

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

1503515035
\LMHash{}%
1503615036
If the method lookup succeeded,
15037-
the binding of actual arguments to formal parameters is performed
15038-
as specified in Section~\ref{bindingActualsToFormals}.
15037+
the binding of formal parameters to actual arguments is performed
15038+
as specified in Section~\ref{bindingFormalsToActuals}.
1503915039
The body of $f$ is then executed with respect to the bindings
1504015040
that resulted from the evaluation of the argument list,
1504115041
and with \THIS{} bound to $o$.
@@ -15274,7 +15274,7 @@ \subsubsection{Superinvocations}
1527415274
Otherwise
1527515275
\commentary{(when one of the lookups succeeded)},
1527615276
the static analysis of $i$ is performed
15277-
as specified in Section~\ref{bindingActualsToFormals},
15277+
as specified in Section~\ref{bindingFormalsToActuals},
1527815278
considering the function to have static type $F$,
1527915279
and the static type of $i$ is as specified there.
1528015280

@@ -15332,9 +15332,9 @@ \subsubsection{Superinvocations}
1533215332
}
1533315333

1533415334
\LMHash{}%
15335-
Otherwise perform the binding of actual arguments to formal parameters for
15335+
Otherwise perform the binding of formal parameters to actual arguments for
1533615336
\code{$f$<\TypeArgumentListStd>(\ArgumentListStd)}
15337-
as specified in Section~\ref{bindingActualsToFormals},
15337+
as specified in Section~\ref{bindingFormalsToActuals},
1533815338
and execute the body of $f$ with said bindings
1533915339
plus a binding of \THIS{} to $o$.
1534015340
The result returned by $f$ is then the result of evaluating $i$.
@@ -16071,7 +16071,7 @@ \subsubsection{Generic Method Instantiation}
1607116071
\ref{initializerLists},
1607216072
\ref{new},
1607316073
\ref{const},
16074-
\ref{bindingActualsToFormals},
16074+
\ref{bindingFormalsToActuals},
1607516075
\ref{assignment},
1607616076
\ref{localVariableDeclaration},
1607716077
\ref{switch},
@@ -22478,7 +22478,7 @@ \subsection{Dynamic Type System}
2247822478
\ref{redirectingFactoryConstructors},
2247922479
\ref{lists},
2248022480
\ref{new},
22481-
\ref{bindingActualsToFormals},
22481+
\ref{bindingFormalsToActuals},
2248222482
\ref{ordinaryInvocation},
2248322483
\ref{assignment},
2248422484
\ref{typeCast},

0 commit comments

Comments
 (0)