Skip to content

Commit 9e0a598

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

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
@@ -6733,8 +6733,8 @@ \subsection{Explicit Invocation of an Instance Member of an Extension}
67336733
Let $m$ be the member of $E$ that has the name $n$.
67346734
Evaluation of $i$ proceeds by evaluating
67356735
$e$ to an object $o$,
6736-
evaluating and binding the actual arguments to the formal parameters
6737-
(\ref{bindingActualsToFormals}),
6736+
evaluating the actual arguments and binding the formal parameters to them
6737+
(\ref{bindingFormalsToActuals}),
67386738
and finally executing $m$
67396739
in a binding environment where \List{X}{1}{k} are bound to \List{t}{1}{k},
67406740
\THIS{} is bound to $o$,
@@ -13417,8 +13417,8 @@ \subsubsection{Actual Argument List Evaluation}
1341713417
}
1341813418

1341913419

13420-
\subsubsection{Binding Actuals to Formals}
13421-
\LMLabel{bindingActualsToFormals}
13420+
\subsubsection{Binding Formals to Actuals}
13421+
\LMLabel{bindingFormalsToActuals}
1342213422

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

1363913639
\LMHash{}%
13640-
An evaluated actual argument part
13640+
With a given evaluated actual argument part
1364113641

1364213642
\noindent
1364313643
\code{<\List{t}{1}{r}>(\ArgumentList{o}{m}{q}{l})}
@@ -13649,7 +13649,7 @@ \subsubsection{Binding Actuals to Formals}
1364913649
\code{<\TypeArgumentListStd>(\ArgumentList{a}{m}{q}{l})}
1365013650

1365113651
\noindent
13652-
is bound to the formal type parameters and formal parameters of $f$ as follows:
13652+
the formal type parameters and formal parameters of $f$ are bound as follows:
1365313653

1365413654
\LMHash{}%
1365513655
% Passing a wrong number of actual type arguments.
@@ -13906,7 +13906,7 @@ \subsubsection{Function Expression Invocation}
1390613906

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

@@ -13925,8 +13925,8 @@ \subsubsection{Function Expression Invocation}
1392513925
\code{$f$<\TypeArgumentListStd>(\ArgumentListStd)}
1392613926

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

@@ -14029,9 +14029,9 @@ \subsection{Function Closurization}
1402914029
}
1403014030

1403114031
\LMHash{}%
14032-
An invocation of $o$ with a given argument list will bind actuals to formals
14032+
An invocation of $o$ with a given argument list will bind formals to actuals
1403314033
in the same way as an invocation of $f$
14034-
(\ref{bindingActualsToFormals}),
14034+
(\ref{bindingFormalsToActuals}),
1403514035
and then execute the body of $f$
1403614036
in the captured scope amended with the bound parameter scope,
1403714037
yielding the same completion
@@ -14126,7 +14126,7 @@ \subsection{Generic Function Instantiation}
1412614126
\ref{initializerLists},
1412714127
\ref{new},
1412814128
\ref{const},
14129-
\ref{bindingActualsToFormals},
14129+
\ref{bindingFormalsToActuals},
1413014130
\ref{assignment},
1413114131
\ref{localVariableDeclaration},
1413214132
\ref{switch},
@@ -14748,7 +14748,7 @@ \subsubsection{Ordinary Invocation}
1474814748

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

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

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

1502315023
\LMHash{}%
1502415024
If the method lookup succeeded,
15025-
the binding of actual arguments to formal parameters is performed
15026-
as specified in Section~\ref{bindingActualsToFormals}.
15025+
the binding of formal parameters to actual arguments is performed
15026+
as specified in Section~\ref{bindingFormalsToActuals}.
1502715027
The body of $f$ is then executed with respect to the bindings
1502815028
that resulted from the evaluation of the argument list,
1502915029
and with \THIS{} bound to $o$.
@@ -15262,7 +15262,7 @@ \subsubsection{Superinvocations}
1526215262
Otherwise
1526315263
\commentary{(when one of the lookups succeeded)},
1526415264
the static analysis of $i$ is performed
15265-
as specified in Section~\ref{bindingActualsToFormals},
15265+
as specified in Section~\ref{bindingFormalsToActuals},
1526615266
considering the function to have static type $F$,
1526715267
and the static type of $i$ is as specified there.
1526815268

@@ -15320,9 +15320,9 @@ \subsubsection{Superinvocations}
1532015320
}
1532115321

1532215322
\LMHash{}%
15323-
Otherwise perform the binding of actual arguments to formal parameters for
15323+
Otherwise perform the binding of formal parameters to actual arguments for
1532415324
\code{$f$<\TypeArgumentListStd>(\ArgumentListStd)}
15325-
as specified in Section~\ref{bindingActualsToFormals},
15325+
as specified in Section~\ref{bindingFormalsToActuals},
1532615326
and execute the body of $f$ with said bindings
1532715327
plus a binding of \THIS{} to $o$.
1532815328
The result returned by $f$ is then the result of evaluating $i$.
@@ -16059,7 +16059,7 @@ \subsubsection{Generic Method Instantiation}
1605916059
\ref{initializerLists},
1606016060
\ref{new},
1606116061
\ref{const},
16062-
\ref{bindingActualsToFormals},
16062+
\ref{bindingFormalsToActuals},
1606316063
\ref{assignment},
1606416064
\ref{localVariableDeclaration},
1606516065
\ref{switch},
@@ -22466,7 +22466,7 @@ \subsection{Dynamic Type System}
2246622466
\ref{redirectingFactoryConstructors},
2246722467
\ref{lists},
2246822468
\ref{new},
22469-
\ref{bindingActualsToFormals},
22469+
\ref{bindingFormalsToActuals},
2247022470
\ref{ordinaryInvocation},
2247122471
\ref{assignment},
2247222472
\ref{typeCast},

0 commit comments

Comments
 (0)