Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Side by Side Diff: docs/language/dartLangSpec.tex

Issue 2690553002: Added generic method syntax to language specification.
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 \documentclass{article} 1 \documentclass{article}
2 \usepackage{epsfig} 2 \usepackage{epsfig}
3 \usepackage{color} 3 \usepackage{color}
4 \usepackage{dart} 4 \usepackage{dart}
5 \usepackage{bnf} 5 \usepackage{bnf}
6 \usepackage{hyperref} 6 \usepackage{hyperref}
7 \usepackage{lmodern} 7 \usepackage{lmodern}
8 \usepackage[T1]{fontenc} 8 \usepackage[T1]{fontenc}
9 \newcommand{\code}[1]{{\sf #1}} 9 \newcommand{\code}[1]{{\sf #1}}
10 \title{Dart Programming Language Specification \\ 10 \title{Dart Programming Language Specification \\
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 587
588 588
589 \section{Functions} 589 \section{Functions}
590 \LMLabel{functions} 590 \LMLabel{functions}
591 591
592 \LMHash{} 592 \LMHash{}
593 Functions abstract over executable actions. 593 Functions abstract over executable actions.
594 594
595 \begin{grammar} 595 \begin{grammar}
596 {\bf functionSignature:} 596 {\bf functionSignature:}
597 metadata returnType? identifier formalParameterList 597 metadata returnType? identifier formalParameterPart
598 .
599
600 {\bf formalParameterPart:}
601 typeParameters? formalParameterList
598 . 602 .
599 603
600 {\bf returnType:} 604 {\bf returnType:}
601 \VOID{}; 605 \VOID{};
602 type 606 type
603 . 607 .
604 608
605 {\bf functionBody:} \ASYNC{}? `={\escapegrammar \gt}' expression `{\escapegramm ar ;}'; 609 {\bf functionBody:} \ASYNC{}? `={\escapegrammar \gt}' expression `{\escapegramm ar ;}';
606 (\ASYNC{} $|$ \ASYNC* $|$ \SYNC*)? block 610 (\ASYNC{} $|$ \ASYNC* $|$ \SYNC*)? block
607 . 611 .
608 612
609 {\bf block:} 613 {\bf block:}
610 `\{' statements `\}' 614 `\{' statements `\}'
611 . 615 .
612 616
613 \end{grammar} 617 \end{grammar}
614 618
615 \LMHash{} 619 \LMHash{}
616 Functions include function declarations (\ref{functionDeclarations}), methods ( \ref{instanceMethods}, \ref{staticMethods}), getters (\ref{getters}), setters (\ref{setters}), constructors (\ref{constructors}) and function literals (\re f{functionExpressions}). 620 Functions include function declarations (\ref{functionDeclarations}), methods (\ ref{instanceMethods}, \ref{staticMethods}), getters (\ref{getters}), setters (\r ef{setters}), constructors (\ref{constructors}) and function literals (\ref{func tionExpressions}).
Lasse Reichstein Nielsen 2017/02/13 10:26:31 Does "function" refer to the syntactic declaration
eernst 2017/02/14 11:26:44 This is one of several cases where I've removed sp
617 621
618 \LMHash{} 622 \LMHash{}
619 All functions have a signature and a body. The signature describes the formal pa rameters of the function, and possibly its name and return type. A function bod y is either: 623 All functions have a signature and a body.
Lasse Reichstein Nielsen 2017/02/13 10:26:32 ... except abstract and external methods have no b
eernst 2017/02/14 11:26:44 Maintaining the focus on syntax, and allowing for
624 The signature describes the formal parameter part of the function, its name, and possibly its return type.
Lasse Reichstein Nielsen 2017/02/13 10:26:31 ... except that function expressions do not have a
eernst 2017/02/14 11:26:44 Adjusted to mention the exceptions (getter, litera
625 The formal parameter part optionally specifies the formal type parameter list of the function, and it specifies its formal parameter list.
Lasse Reichstein Nielsen 2017/02/13 10:26:32 formal parameter list, if any. (Getters have no f
eernst 2017/02/14 11:26:44 I've mentioned the exception for getters above, so
626 The effect of a declaration $D$ of a function that includes a formal type parame ter list is the same as the effect of the declaration obtained by the generic fu nction erasure of $D$ (\ref{genericFunctionErasure}).
627 A function body is either:
620 \begin{itemize} 628 \begin{itemize}
621 \item A block statement (\ref{blocks}) containing the statements (\ref{stateme nts}) executed by the function, optionally marked with one of the modifiers: \AS YNC, \ASYNC* or \SYNC*. In this case, if the last statement of a function is not a return statement (\ref{return}), the statement \code{\RETURN{};} is implicitl y appended to the function body. 629 \item A block statement (\ref{blocks}) containing the statements (\ref{stateme nts}) executed by the function, optionally marked with one of the modifiers: \AS YNC, \ASYNC* or \SYNC*. In this case, if the last statement of a function is not a return statement (\ref{return}), the statement \code{\RETURN{};} is implicitl y appended to the function body.
622 630
623 \rationale{ 631 \rationale{
624 Because Dart is optionally typed, we cannot guarantee that a function that does not return a value will not be used in the context of an expression. Therefore, every function must return a value. A \RETURN{} without an expression returns \N ULL{}. For generator functions, the situation is more subtle. See further discus sion in section \ref{return}. 632 Because Dart is optionally typed, we cannot guarantee that a function that does not return a value will not be used in the context of an expression. Therefore, every function must return a value. A \RETURN{} without an expression returns \N ULL{}. For generator functions, the situation is more subtle. See further discus sion in section \ref{return}.
625 } 633 }
626 634
627 OR 635 OR
628 \item of the form \code{=> $e$} which is equivalent to a body of the form \cod e{\{\RETURN{} $e$;\}} or the form \code{\ASYNC{} => $e$} which is equivalent to a body of the form \code{\ASYNC{} \{\RETURN{} $e$;\}}. \rationale{The other modi fiers do not apply here, because they apply only to generators, discussed below, and generators do not allow the form \code{\RETURN{} $e$}; values are added to the generated stream or iterable using \YIELD{} instead.} 636 \item of the form \code{=> $e$} which is equivalent to a body of the form \cod e{\{\RETURN{} $e$;\}} or the form \code{\ASYNC{} => $e$} which is equivalent to a body of the form \code{\ASYNC{} \{\RETURN{} $e$;\}}. \rationale{The other modi fiers do not apply here, because they apply only to generators, discussed below, and generators do not allow the form \code{\RETURN{} $e$}; values are added to the generated stream or iterable using \YIELD{} instead.}
629 637
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 When we say that a function $f_1$ {\em forwards} to another function $f_2$, we m ean that invoking $f_1$ causes $f_2$ to be executed with the same arguments an d/or receiver as $f_1$, and returns the result of executing $f_2$ to the caller of $f_1$, unless $f_2$ throws an exception, in which case $f_1$ throws the same exception. Furthermore, we only use the term for synthetic functions introduced by the specification. 698 When we say that a function $f_1$ {\em forwards} to another function $f_2$, we m ean that invoking $f_1$ causes $f_2$ to be executed with the same arguments an d/or receiver as $f_1$, and returns the result of executing $f_2$ to the caller of $f_1$, unless $f_2$ throws an exception, in which case $f_1$ throws the same exception. Furthermore, we only use the term for synthetic functions introduced by the specification.
691 699
692 700
693 \subsection{Formal Parameters} 701 \subsection{Formal Parameters}
694 \LMLabel{formalParameters} 702 \LMLabel{formalParameters}
695 703
696 \LMHash{} 704 \LMHash{}
697 Every function includes a {\em formal parameter list}, which consists of a list of required positional parameters (\ref{requiredFormals}), followed by any optio nal parameters (\ref{optionalFormals}). The optional parameters may be specified either as a set of named parameters or as a list of positional parameters, but not both. 705 Every function includes a {\em formal parameter list}, which consists of a list of required positional parameters (\ref{requiredFormals}), followed by any optio nal parameters (\ref{optionalFormals}). The optional parameters may be specified either as a set of named parameters or as a list of positional parameters, but not both.
698 706
699 \LMHash{} 707 \LMHash{}
700 The formal parameter list of a function introduces a new scope known as the func tion's {\em formal parameter scope}. The formal parameter scope of a function $f $ is enclosed in the scope where $f$ is declared. Every formal parameter intr oduces a local variable into the formal parameter scope. However, the scope of a function's signature is the function's enclosing scope, not the formal paramete r scope. 708 The formal parameter list of a function introduces a new scope known as the func tion's {\em formal parameter scope}.
709 The formal parameter scope of a non-generic function $f$ is enclosed in the scop e where $f$ is declared.
710 The formal parameter scope of a generic function $f$ is enclosed in the formal t ype parameter scope of $f$ (\ref{genericFunctionErasure}).
711 Every formal parameter introduces a local variable into the formal parameter sco pe.
712 However, the scope of a function's signature is the function's enclosing scope, not the formal parameter scope.
Lasse Reichstein Nielsen 2017/02/13 10:26:32 What *is* a "signature"?
eernst 2017/02/14 11:26:44 Line 712 is again something that I did not touch (
701 713
702 \LMHash{} 714 \LMHash{}
703 The body of a function introduces a new scope known as the function's {\em body scope}. The body scope of a function $f$ is enclosed in the scope introduced by the formal parameter scope of $f$. 715 The body of a function introduces a new scope known as the function's {\em body scope}. The body scope of a function $f$ is enclosed in the scope introduced by the formal parameter scope of $f$.
704 716
705 717
706 %The formal parameter scope of a function maps the name of each formal parameter $p$ to the value $p$ is bound to. 718 %The formal parameter scope of a function maps the name of each formal parameter $p$ to the value $p$ is bound to.
707 719
708 % The formal parameters of a function are processed in the enclosing scope of th e function. 720 % The formal parameters of a function are processed in the enclosing scope of th e function.
709 % \commentary{this means that the parameters themselves may not be referenced wi thin the formal parameter list.} 721 % \commentary{this means that the parameters themselves may not be referenced wi thin the formal parameter list.}
710 722
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 {\bf normalFormalParameter:}functionSignature; 779 {\bf normalFormalParameter:}functionSignature;
768 fieldFormalParameter; 780 fieldFormalParameter;
769 simpleFormalParameter 781 simpleFormalParameter
770 . 782 .
771 783
772 {\bf simpleFormalParameter:}declaredIdentifier; 784 {\bf simpleFormalParameter:}declaredIdentifier;
773 metadata identifier 785 metadata identifier
774 . 786 .
775 787
776 {\bf fieldFormalParameter:} 788 {\bf fieldFormalParameter:}
777 metadata finalConstVarOrType? \THIS{} `{\escapegrammar .}' identifier formalP arameterList? 789 metadata finalConstVarOrType? \THIS{} `{\escapegrammar .}' identifier form alParameterPart?
778 . 790 .
779 \end{grammar} 791 \end{grammar}
780 792
781 %\subsubsection{Rest Formals} 793 %\subsubsection{Rest Formals}
782 %\LMLabel{restFormals} 794 %\LMLabel{restFormals}
783 795
784 %A rest formal $R$ must be the last parameter in a formal parameter list. If a type $T$ is specified for $R$, it signifies that the type of $R$ is $T[]$. 796 %A rest formal $R$ must be the last parameter in a formal parameter list. If a type $T$ is specified for $R$, it signifies that the type of $R$ is $T[]$.
785 797
786 %\begin{grammar} 798 %\begin{grammar}
787 %restFormalParameter: 799 %restFormalParameter:
788 % finalConstVarOrType? '{\escapegrammar ...}' identifier 800 % finalConstVarOrType? '{\escapegrammar ...}' identifier
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 If we allowed named parameters to begin with an underscore, they would be consid ered private and inaccessible to callers from outside the library where it was d efined. If a method outside the library overrode a method with a private optiona l name, it would not be a subtype of the original method. The static checker wou ld of course flag such situations, but the consequence would be that adding a pr ivate named formal would break clients outside the library in a way they could n ot easily correct. 838 If we allowed named parameters to begin with an underscore, they would be consid ered private and inaccessible to callers from outside the library where it was d efined. If a method outside the library overrode a method with a private optiona l name, it would not be a subtype of the original method. The static checker wou ld of course flag such situations, but the consequence would be that adding a pr ivate named formal would break clients outside the library in a way they could n ot easily correct.
827 } 839 }
828 840
829 \subsection{Type of a Function} 841 \subsection{Type of a Function}
830 \LMLabel{typeOfAFunction} 842 \LMLabel{typeOfAFunction}
831 843
832 \LMHash{} 844 \LMHash{}
833 If a function does not declare a return type explicitly, its return type is \DYN AMIC{} (\ref{typeDynamic}), unless it is a constructor function, in which case i ts return type is the immediately enclosing class. 845 If a function does not declare a return type explicitly, its return type is \DYN AMIC{} (\ref{typeDynamic}), unless it is a constructor function, in which case i ts return type is the immediately enclosing class.
834 846
835 \LMHash{} 847 \LMHash{}
848 A function may declare formal type parameters.
849 The type of the function is the type of the corresponding function obtained by g eneric function erasure (\ref{genericFunctionErasure}).
850
851 \commentary{
852 Hence, formal type parameters are not mentioned in the following, but they are a llowed to exist.
853 }
854
855 \LMHash{}
836 Let $F$ be a function with required formal parameters $T_1$ $p_1 \ldots, T_n$ $p _n$, return type $T_0$ and no optional parameters. Then the type of $F$ is $(T_1 ,\ldots, T_n) \rightarrow T_0$. 856 Let $F$ be a function with required formal parameters $T_1$ $p_1 \ldots, T_n$ $p _n$, return type $T_0$ and no optional parameters. Then the type of $F$ is $(T_1 ,\ldots, T_n) \rightarrow T_0$.
837 857
838 \LMHash{} 858 \LMHash{}
839 Let $F$ be a function with required formal parameters $T_1$ $p_1 \ldots, T_n$ $p _n$, return type $T_0$ and positional optional parameters $T_{n+1}$ $p_{n+1}, \l dots, T_{n+k}$ $ p_{n+k}$. Then the type of $F$ is $(T_1 ,\ldots, T_n, [T_{n+1}$ $p_{n+1}, \ldots, T_{n+k}$ $p_{n+k}]) \rightarrow T_0$. 859 Let $F$ be a function with required formal parameters $T_1$ $p_1 \ldots, T_n$ $p _n$, return type $T_0$ and positional optional parameters $T_{n+1}$ $p_{n+1}, \l dots, T_{n+k}$ $ p_{n+k}$. Then the type of $F$ is $(T_1 ,\ldots, T_n, [T_{n+1}$ $p_{n+1}, \ldots, T_{n+k}$ $p_{n+k}]) \rightarrow T_0$.
840 860
841 \LMHash{} 861 \LMHash{}
842 Let $F$ be a function with required formal parameters $T_1$ $p_1 \ldots, T_n$ $p _n$, return type $T_0$ and named optional parameters $T_{n+1}$ $p_{n+1}, \ldots, T_{n+k}$ $ p_{n+k}$. Then the type of $F$ is $(T_1 ,\ldots, T_n, \{T_{n+1}$ $p_ {n+1}, \ldots, T_{n+k}$ $p_{n+k}\}) \rightarrow T_0$. 862 Let $F$ be a function with required formal parameters $T_1$ $p_1 \ldots, T_n$ $p _n$, return type $T_0$ and named optional parameters $T_{n+1}$ $p_{n+1}, \ldots, T_{n+k}$ $ p_{n+k}$. Then the type of $F$ is $(T_1 ,\ldots, T_n, \{T_{n+1}$ $p_ {n+1}, \ldots, T_{n+k}$ $p_{n+k}\}) \rightarrow T_0$.
843 863
844 \LMHash{} 864 \LMHash{}
845 The run time type of a function object always implements the class \cd{Function} . 865 The run time type of a function object always implements the class \cd{Function} .
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after
2281 \end{dartCode} 2301 \end{dartCode}
2282 2302
2283 \commentary { 2303 \commentary {
2284 It is also a compile-time error to subclass, mix-in or implement an enum or to e xplicitly instantiate an enum. These restrictions are given in normative form i n sections \ref{superclasses}, \ref{superinterfaces}, \ref{mixinApplication} and \ref{instanceCreation} as appropriate. 2304 It is also a compile-time error to subclass, mix-in or implement an enum or to e xplicitly instantiate an enum. These restrictions are given in normative form i n sections \ref{superclasses}, \ref{superinterfaces}, \ref{mixinApplication} and \ref{instanceCreation} as appropriate.
2285 } 2305 }
2286 2306
2287 \section{Generics} 2307 \section{Generics}
2288 \LMLabel{generics} 2308 \LMLabel{generics}
2289 2309
2290 \LMHash{} 2310 \LMHash{}
2291 A class declaration (\ref{classes}) or type alias (\ref{typedef}) 2311 A class declaration (\ref{classes}), type alias (\ref{typedef}), or function (\r ef{functions}) $G$ may be {\em generic}, that is, $G$ may have formal type param eters declared.
2292 $G$ may be {\em generic}, that is, $G$ may have formal type parameters declared. A generic declaration induces a family of declarations, one for each set of act ual type parameters provided in the program. 2312 A declaration of a generic class or a generic type alias induces a family of dec larations, one for each actual type argument list provided in the program.
2313 The effect of a declaration $D$ of a generic function is the same as the effect of the declaration obtained by generic function erasure of $D$ (\ref{genericFunc tionErasure}).
2293 2314
2294 \begin{grammar} 2315 \begin{grammar}
2295 {\bf typeParameter:} 2316 {\bf typeParameter:}
2296 metadata identifier (\EXTENDS{} type)? 2317 metadata identifier (\EXTENDS{} type)?
2297 . 2318 .
2298 {\bf typeParameters:} 2319 {\bf typeParameters:}
2299 `<' typeParameter (`,' typeParameter)* `>' 2320 `<' typeParameter (`,' typeParameter)* `>'
2300 . 2321 .
2301 \end{grammar} 2322 \end{grammar}
2302 2323
2303 \LMHash{} 2324 \LMHash{}
2304 A type parameter $T$ may be suffixed with an \EXTENDS{} clause that specifies th e {\em upper bound} for $T$. If no \EXTENDS{} clause is present, the upper boun d is \code{Object}. It is a static type warning if a type parameter is a supert ype of its upper bound. The bounds of type variables are a form of type annotati on and have no effect on execution in production mode. 2325 A type parameter $T$ may be suffixed with an \EXTENDS{} clause that specifies th e {\em upper bound} for $T$.
2326 If no \EXTENDS{} clause is present, the upper bound is \code{Object}.
2327 It is a static type warning if an actual type argument to a class or a type alia s is not a subtype of its upper bound.
2328 The bounds of type variables are a form of type annotation and have no effect on execution in production mode.
2305 2329
2306 \LMHash{} 2330 \LMHash{}
2307 Type parameters are declared in the type-parameter scope of a class. 2331 Type parameters are declared in the type-parameter scope of a class.
2308 The type parameters of a generic $G$ are in scope in the bounds of all of the ty pe parameters of $G$. The type parameters of a generic class declaration $G$ are also in scope in the \EXTENDS{} and \IMPLEMENTS{} clauses of $G$ (if these exis t) and in the body of $G$. However, a type parameter is considered to be a mal formed type when referenced by a static member. 2332 The type parameters of a generic $G$ are in scope in the bounds of all of the ty pe parameters of $G$. The type parameters of a generic class declaration $G$ are also in scope in the \EXTENDS{} and \IMPLEMENTS{} clauses of $G$ (if these exis t) and in the body of $G$. However, a type parameter is considered to be a mal formed type when referenced by a static member.
2309 2333
2310 \rationale{ 2334 \rationale{
2311 The restriction is necessary since a type variable has no meaning in the context of a static member, because statics are shared among all instantiations of a ge neric. However, a type variable may be referenced from an instance initializer, even though \THIS{} is not available. 2335 The restriction is necessary since a type variable has no meaning in the context of a static member, because statics are shared among all instantiations of a ge neric. However, a type variable may be referenced from an instance initializer, even though \THIS{} is not available.
2312 } 2336 }
2313 2337
2314 \commentary{ 2338 \commentary{
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
2401 2425
2402 %\Q{When does an interface injection take effect? When the containing library is loaded? 2426 %\Q{When does an interface injection take effect? When the containing library is loaded?
2403 %What is the scope of such a declaration? Is it global, or only in the scope of the containing library? The scope of such a declaration is global. 2427 %What is the scope of such a declaration? Is it global, or only in the scope of the containing library? The scope of such a declaration is global.
2404 %An injection must be at top level. Who has the right to inject an interface $I$ into another class $C$? Anybody? But since this affects dynamic behavior, is th is a weird security issue? 2428 %An injection must be at top level. Who has the right to inject an interface $I$ into another class $C$? Anybody? But since this affects dynamic behavior, is th is a weird security issue?
2405 %The current theory is that there is no security within an isolate, and one can never refer to a type from another isolate, so supposedly not an issue. This ass umption (no mutually suspicious code in the same isolate) is suspect but it seem s there is nothing to be done at this point. 2429 %The current theory is that there is no security within an isolate, and one can never refer to a type from another isolate, so supposedly not an issue. This ass umption (no mutually suspicious code in the same isolate) is suspect but it seem s there is nothing to be done at this point.
2406 %If libs are first class, they get created dynamically in order, and new libs mi ght modify the type relations among other libs types - but then it is clear when that happened and order is ok. 2430 %If libs are first class, they get created dynamically in order, and new libs mi ght modify the type relations among other libs types - but then it is clear when that happened and order is ok.
2407 %} 2431 %}
2408 2432
2409 %It is a compile-time error if a type $T$ appears more than once in the implemen ts or eextends clause of an interface injection. 2433 %It is a compile-time error if a type $T$ appears more than once in the implemen ts or eextends clause of an interface injection.
2410 2434
2435 \subsection{Generic Function Erasure}
2436 \LMLabel{genericFunctionErasure}
2437
2438 \commentary{
2439 Generic functions will be fully supported in a future version of the language.
2440 The current level of support allows programs using generic functions to be writt en, compiled, and executed.
2441 The type checks and dynamic semantics essentially erase the formal type paramete rs and actual type arguments.
2442 With some extra care, the same source code can be used both in this language and in a version of the language with full support for generic functions.
2443 Type checking with full support for generic functions may then ensure some consi stency properties which remain valid also in this context.
2444 This section explains how generic function erasure works.
2445 }
2446
2447 \LMHash{}
2448 Many function declarations may include a {\em formal type parameter list} (\ref{ functions}), in which case we say that it is a {\em generic function}.
Lasse Reichstein Nielsen 2017/02/13 10:26:31 "Many" -> "Some".
eernst 2017/02/14 11:26:44 Done.
2449 A {\em non-generic function} is a function which is not generic.
2450
2451 \commentary{
2452 The exceptions are getter, setter, operator, and constructor declarations.
Lasse Reichstein Nielsen 2017/02/13 10:26:31 "... , which cannot be generic." (Didn't say what
eernst 2017/02/14 11:26:44 Done.
2453 }
2454
2455 \LMHash{}
2456 The formal type parameter list of a function introduces a new scope known as the function's {\em formal type parameter scope}.
2457 The formal type parameter scope of a generic function $f$ is enclosed in the sco pe where $f$ is declared.
2458 Every formal type parameter introduces a type into the formal type parameter sco pe.
2459
2460 \LMHash{}
2461 The formal type parameter scope of a function $f$ is the current scope for the r eturn type of $f$, if any, and for the formal type parameter list itself.
Lasse Reichstein Nielsen 2017/02/13 10:26:31 The type parameter list is in its own scope. What
eernst 2017/02/14 11:26:44 The declaring occurrence of a type parameter ident
2462
2463 \commentary{
2464 This enables the use of F-bounded type parameters (if you don't know what that i s, see~\ref{generics}).
Lasse Reichstein Nielsen 2017/02/13 10:26:32 Drop this enitre sentence. It doesn't say anything
eernst 2017/02/14 11:26:44 It was a stupid joke (referring to \ref{generics}:
2465 The formal type parameter scope is the enclosing scope for the formal parameter scope (\ref{formalParameters}), which enables usage of the type parameters in ty pe annotations in the parameter list, and in the body of the function.
2466 }
2467
2468 \LMHash{}
2469 {\em Generic function erasure} takes as input a generic function declaration $D$ and either yields a non-generic function declaration $D^{\prime}$ or terminates with a compile-time error.
Lasse Reichstein Nielsen 2017/02/13 10:26:32 Do you need to super-script the \prime? Consider u
eernst 2017/02/14 11:26:44 As far as I can see, we have 54 occurrences of `\p
2470 $D^{\prime}$ is identical to $D$ except for the following replacements:
2471 \begin{itemize}
2472 \item The formalParameterPart of $D^{\prime}$ is identical to the formalParamete rList of $D$.
Lasse Reichstein Nielsen 2017/02/13 10:26:32 Should "formalParameterPart" be styled in some way
eernst 2017/02/14 11:26:44 The grammar rules in text actually do not have any
2473 \commentary{That is, the type parameter list is erased.}
Lasse Reichstein Nielsen 2017/02/13 10:26:32 erased -> omitted "erase" is a destructive operat
eernst 2017/02/14 11:26:44 True. I actually wrote `omitted` first because tha
2474 \item Each occurrence in $D$ of an identifier $id$ which denotes a formal type p arameter is processed as follows:
2475 \begin{itemize}
2476 \item If $id$ occurs as \code{$e$ \IS{} $id$} or \code{$e$ \IS{}! $id$} for so me expression $e$, or if $id$ occurs as a type literal, a compile-time error occ urs.
2477 \item In all other cases, the location corresponding to $id$ in $D^{\prime}$ c ontains \DYNAMIC{}.
Lasse Reichstein Nielsen 2017/02/13 10:26:31 ... all other cases, the occurrence of $id$ in $D$
eernst 2017/02/14 11:26:44 Frem og tilbage er lige langt. ;-D In this case,
2478 \end{itemize}
2479 \end{itemize}
2480
2481 \commentary{
2482 This means that formal type parameters in a generic function work like \DYNAMIC{ } when used as type annotations.
2483 This is also the case when they are used as type arguments, both in type annotat ions and in instance creation expressions.
2484 For example, \code{\RETURN{} <T>[];} will return a \code{List<\DYNAMIC{}>}.
2485 Finally, \code{$e$ \AS{} $id$} will work like \code{$e$ \AS{} \DYNAMIC{}}, i.e., the dynamic check associated with a cast is omitted, and the static type of the expression will be \DYMAMIC{}.
2486 }
2487
2488 \rationale{
2489 The check associated with a cast to a type parameter of a generic function is om itted because such checks are almost always expected to succeed.
2490 This may introduce bugs in failure handling, so a more defensive style of progra mming may be needed around such casts.
2491 In contrast, an is-expression may yield \TRUE{} as well as \FALSE{} during norma l processing, and it could silently introduce bugs into correct programs if we h ad chosen to always evaluate these is-expressions to a fixed value like \TRUE{}.
2492 Finally, it could silently introduce bugs into correct programs if we had chosen to let type literals evaluate to a fixed value, e.g., \DYNAMIC{}.
2493 }
2411 2494
2412 \section{Metadata} 2495 \section{Metadata}
2413 \LMLabel{metadata} 2496 \LMLabel{metadata}
2414 2497
2415 \LMHash{} 2498 \LMHash{}
2416 Dart supports metadata which is used to attach user defined annotations to progr am structures. 2499 Dart supports metadata which is used to attach user defined annotations to progr am structures.
2417 2500
2418 \begin{grammar} 2501 \begin{grammar}
2419 {\bf metadata:} 2502 {\bf metadata:}
2420 (`@' qualified ({\escapegrammar `.'} identifier)? (arguments)?)* 2503 (`@' qualified ({\escapegrammar `.'} identifier)? (arguments)?)*
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
3224 3307
3225 3308
3226 \subsection{ Function Expressions} 3309 \subsection{ Function Expressions}
3227 \LMLabel{functionExpressions} 3310 \LMLabel{functionExpressions}
3228 3311
3229 \LMHash{} 3312 \LMHash{}
3230 A {\em function literal} is an object that encapsulates an executable unit of co de. 3313 A {\em function literal} is an object that encapsulates an executable unit of co de.
3231 3314
3232 \begin{grammar} 3315 \begin{grammar}
3233 {\bf functionExpression:} 3316 {\bf functionExpression:}
3234 formalParameterList functionBody 3317 formalParameterPart functionBody
3235 . 3318 .
3236 \end{grammar} 3319 \end{grammar}
3237 3320
3238 \LMHash{} 3321 \LMHash{}
3239 The class of a function literal implements the built-in class \code{Function}. 3322 The class of a function literal implements the built-in class \code{Function}.
3240 %Invoking the getter \code{runtimeType} on a function literal returns the \code{ Type} object that is the value of the expression \code{Function}. 3323 %Invoking the getter \code{runtimeType} on a function literal returns the \code{ Type} object that is the value of the expression \code{Function}.
3241 % not necessarily 3324 % not necessarily
3242 3325
3243
3244 %Q{Can anyone implement it? Then we should define things via call} 3326 %Q{Can anyone implement it? Then we should define things via call}
3245 3327
3246 \LMHash{} 3328 \LMHash{}
3247 The static type of a function literal of the form 3329 The static type of a function literal of the form
3248 3330
3249 $(T_1$ $a_1, \ldots, T_n$ $a_n, [T_{n+1}$ $x_{n+1} = d_1, \ldots, T_{n+k}$ $x_{ n+k} = d_k]) => e$ 3331 $(T_1$ $a_1, \ldots, T_n$ $a_n, [T_{n+1}$ $x_{n+1} = d_1, \ldots, T_{n+k}$ $x_{ n+k} = d_k]) => e$
3250 is 3332 is
3251 3333
3252 $(T_1 \ldots, T_n, [T_{n+1}$ $x_{n+1}, \ldots, T_{n+k}$ $x_{n+k}]) \rightarrow T _0$, where $T_0$ is the static type of $e$. 3334 $(T_1 \ldots, T_n, [T_{n+1}$ $x_{n+1}, \ldots, T_{n+k}$ $x_{n+k}]) \rightarrow T _0$, where $T_0$ is the static type of $e$.
3253 3335
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
3674 \commentary{ 3756 \commentary{
3675 As discussed in section \ref{errorsAndWarnings}, the handling of a suspended iso late is the responsibility of the embedder. 3757 As discussed in section \ref{errorsAndWarnings}, the handling of a suspended iso late is the responsibility of the embedder.
3676 } 3758 }
3677 3759
3678 3760
3679 3761
3680 \subsection{ Function Invocation} 3762 \subsection{ Function Invocation}
3681 \LMLabel{functionInvocation} 3763 \LMLabel{functionInvocation}
3682 3764
3683 \LMHash{} 3765 \LMHash{}
3684 Function invocation occurs in the following cases: when a function expression ( \ref{functionExpressions}) is invoked (\ref{functionExpressionInvocation}), when a method (\ref{methodInvocation}), getter (\ref{topLevelGetterInvocation}, \ref {propertyExtraction}) or setter (\ref{assignment}) is invoked or when a construc tor is invoked (either via instance creation (\ref{instanceCreation}), construct or redirection (\ref{redirectingConstructors}) or super initialization). The var ious kinds of function invocation differ as to how the function to be invoked, $ f$, is determined, as well as whether \THIS{} (\ref{this}) is bound. Once $f$ h as been determined, the formal parameters of $f$ are bound to corresponding actu al arguments. When the body of $f$ is executed it will be executed with the afor ementioned bindings. 3766 Function invocation occurs in the following cases: when a function expression (\ ref{functionExpressions}) is invoked (\ref{functionExpressionInvocation}), when a method (\ref{methodInvocation}), getter (\ref{topLevelGetterInvocation}, \ref{ propertyExtraction}) or setter (\ref{assignment}) is invoked or when a construct or is invoked (either via instance creation (\ref{instanceCreation}), constructo r redirection (\ref{redirectingConstructors}) or super initialization).
3767 The various kinds of function invocation differ as to how the function to be inv oked, $f$, is determined, as well as whether \THIS{} (\ref{this}) is bound.
3768 Once $f$ has been determined, the formal parameters of $f$ are bound to correspo nding actual arguments.
3769 The actual type arguments passed to $f$, if any, have no effect.
3770 When the body of $f$ is executed it will be executed with the aforementioned bin dings.
3685 3771
3686 \LMHash{} 3772 \LMHash{}
3687 If $f$ is synchronous and is not a generator (\ref{functions}) then execution of the body of $f$ begins immediately. 3773 If $f$ is synchronous and is not a generator (\ref{functions}) then execution of the body of $f$ begins immediately.
3688 If the execution of the body of $f$ returns a value, $v$, (\ref{completion}), th e invocation evaluates to $v$. 3774 If the execution of the body of $f$ returns a value, $v$, (\ref{completion}), th e invocation evaluates to $v$.
3689 If the execution completes normally or it returns without a value, the invocatio n evaluates to \NULL (\ref{null}). 3775 If the execution completes normally or it returns without a value, the invocatio n evaluates to \NULL (\ref{null}).
3690 If the execution throws an exception object and stack trace, the invocation thro ws the same exception object and stack trace (\ref{evaluation}). 3776 If the execution throws an exception object and stack trace, the invocation thro ws the same exception object and stack trace (\ref{evaluation}).
3691 3777
3692 \commentary{ 3778 \commentary{
3693 A complete function body can never break or contine (\ref{completion}) 3779 A complete function body can never break or contine (\ref{completion})
3694 because a \BREAK{} or \CONTINUE{} statement must always occur inside the stateme nt that is the target of the \BREAK{} or \CONTINUE{}. 3780 because a \BREAK{} or \CONTINUE{} statement must always occur inside the stateme nt that is the target of the \BREAK{} or \CONTINUE{}.
3695 This means that a function body can only either complete normally, throw, or ret urn. Completing normally or returning without a value is treated the same as ret urning \NULL, so the result of executing a function body can always be used as t he result of evaluating an expression, either by evaluating to a value or by the evaluation throwing. 3781 This means that a function body can only either complete normally, throw, or ret urn. Completing normally or returning without a value is treated the same as ret urning \NULL, so the result of executing a function body can always be used as t he result of evaluating an expression, either by evaluating to a value or by the evaluation throwing.
3696 } 3782 }
3697 3783
3698 3784
3699 \LMHash{} 3785 \LMHash{}
3700 If $f$ is marked \SYNC* (\ref{functions}), then a fresh instance $i$ implementin g the built-in class \code{Iterable} is associated with the invocation and immed iately returned. 3786 If $f$ is marked \SYNC* (\ref{functions}), then a fresh instance $i$ implementin g the built-in class \code{Iterable} is associated with the invocation and immed iately returned.
3701 3787
3702 \commentary{ 3788 \commentary{
3703 A Dart implementation will need to provide a specific implementation of \code{It erable} that will be returned by \SYNC* methods. A typical strategy would be to produce an instance of a subclass of class \code{IterableBase} defined in \code{ dart:core}. The only method that needs to be added by the Dart implementation in that case is \code{iterator}. 3789 A Dart implementation will need to provide a specific implementation of \code{It erable} that will be returned by \SYNC* methods. A typical strategy would be to produce an instance of a subclass of class \code{IterableBase} defined in \code{ dart:core}. The only method that needs to be added by the Dart implementation in that case is \code{iterator}.
3704 } 3790 }
3705 3791
3706 \LMHash{} 3792 \LMHash{}
3707 The iterable implementation must comply with the contract of \code{Iterable} and should not take any steps identified as exceptionally efficient in that contrac t. 3793 The iterable implementation must comply with the contract of \code{Iterable} and should not take any steps identified as exceptionally efficient in that contrac t.
3708 3794
3709 \commentary { 3795 \commentary {
3710 The contract explicitly mentions a number of situations where certain iterables could be more efficient than normal. For example, by precomputing their length. Normal iterables must iterate over their elements to determine their length. Thi s is certainly true in the case of a synchronous generator, where each element i s computed by a function. It would not be acceptable to pre-compute the results of the generator and cache them, for example. 3796 The contract explicitly mentions a number of situations where certain iterables could be more efficient than normal. For example, by precomputing their length. Normal iterables must iterate over their elements to determine their length. Thi s is certainly true in the case of a synchronous generator, where each element i s computed by a function. It would not be acceptable to pre-compute the results of the generator and cache them, for example.
3711 } 3797 }
3712 3798
3713 \LMHash{} 3799 \LMHash{}
3714 When iteration over the iterable is started, by getting an iterator $j$ from the iterable and calling \code{moveNext()}, execution of the body of $f$ will begin . When execution of the body of $f$ completes (\ref{completion}, 3800 When iteration over the iterable is started, by getting an iterator $j$ from the iterable and calling \code{moveNext()}, execution of the body of $f$ will begin . When execution of the body of $f$ completes (\ref{completion}),
3715 \begin{itemize} 3801 \begin{itemize}
3716 \item If it returns without a value or it completes normally (\ref{completion}), $j$ is positioned after its last element, so that its current value is \code{nu ll} and the current call to \code{moveNext()} on $j$ returns false, as must all further calls. 3802 \item If it returns without a value or it completes normally (\ref{completion}), $j$ is positioned after its last element, so that its current value is \code{nu ll} and the current call to \code{moveNext()} on $j$ returns false, as must all further calls.
3717 \item If it throws an exception object $e$ and stack trace $t$ then the current value of $j$ is \NULL and the current call to \code{moveNext()} throws $e$ and $ t$ as well. Further calls to \code{moveNext()} must return false. 3803 \item If it throws an exception object $e$ and stack trace $t$ then the current value of $j$ is \NULL and the current call to \code{moveNext()} throws $e$ and $ t$ as well. Further calls to \code{moveNext()} must return false.
3718 \end{itemize} 3804 \end{itemize}
3719 3805
3720 Each iterator starts a separate computation. If the \SYNC* function is impure, t he sequence of values yielded by each iterator may differ. 3806 Each iterator starts a separate computation. If the \SYNC* function is impure, t he sequence of values yielded by each iterator may differ.
3721 3807
3722 \commentary{ 3808 \commentary{
3723 One can derive more than one iterator from a given iterable. Note that operati ons on the iterable itself can create distinct iterators. An example would be \c ode{length}. It is conceivable that different iterators might yield sequences o f different length. The same care needs to be taken when writing \SYNC* function s as when 3809 One can derive more than one iterator from a given iterable. Note that operati ons on the iterable itself can create distinct iterators. An example would be \c ode{length}. It is conceivable that different iterators might yield sequences o f different length. The same care needs to be taken when writing \SYNC* function s as when
3724 writing an \code{Iterator} class. In particular, it should handle multiple 3810 writing an \code{Iterator} class. In particular, it should handle multiple
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
3776 % expressionList ',' spreadArgument; 3862 % expressionList ',' spreadArgument;
3777 expressionList (`,' namedArgument)* 3863 expressionList (`,' namedArgument)*
3778 % spreadArgument 3864 % spreadArgument
3779 . 3865 .
3780 3866
3781 {\bf namedArgument:} 3867 {\bf namedArgument:}
3782 label expression % could be top level expression? 3868 label expression % could be top level expression?
3783 . 3869 .
3784 \end{grammar} 3870 \end{grammar}
3785 3871
3786 Argument lists allow an optional trailing comma after the last argument ($`,'?$) . An argument list with such a trailing comma is equivalent in all ways to the s ame parameter list without the trailing comma. All argument lists in this specif ication are shown without a trailing comma, but the rules and semantics apply eq ually to the corresponding argument list with a trailing comma. 3872 \LMHash{}
3873 Argument lists allow an optional trailing comma after the last argument ($`,'?$) .
3874 An argument list with such a trailing comma is equivalent in all ways to the sam e argument list without the trailing comma.
3875 All argument lists in this specification are shown without a trailing comma, but the rules and semantics apply equally to the corresponding argument list with a trailing comma.
3876
3877 \LMHash{}
3878 When parsing an argument list, an ambiguity may arise because the same source co de could be one generic function invocation, and it could be two or more relatio nal expressions and/or shift expressions.
3879 In this situation, the parse as a generic function invocation is chosen.
Lasse Reichstein Nielsen 2017/02/13 10:26:32 -> In this situation, the expression is always par
eernst 2017/02/14 11:26:44 Done.
3880
3881 % Should we specify the precise disambiguation rule here?:
3882 % We have seen 'a', '<', a matching '>', and '(', where
3883 % 'a' is tricky because we can have things like 'new Foo().m<...>(...',
3884 % 'x..y(...).m<...>(...', etc, basically everything that can precede
3885 % argumentPart in the grammar.
3886
3887 \commentary{
3888 An example is \code{f(a<B, C>($d$))}, which may be an invocation of \code{f} pas sing two actual arguments of type \code{bool}, or an invocation of \code{f} pass ing the result returned by an invocation of the generic function \code{a}.
Lasse Reichstein Nielsen 2017/02/13 10:26:32 Why is $d$ in code, but not a, B or C? I can see t
eernst 2017/02/14 11:26:44 Right, but this is commentary and we just need a s
3889 Note that the ambiguity may be eliminated by omitting the parentheses around the expression $d$, or adding parentheses around one of the relational expressions.
Lasse Reichstein Nielsen 2017/02/13 10:26:31 Or around \code{B} or \code{C}.
eernst 2017/02/14 11:26:44 That wouldn't actually work, because we did not re
3890 }
3891
3892 \rationale{
3893 When the intention is to pass several relational or shift expressions as actual arguments and there is an ambiguity, the source code can easily be adjusted to a form which is unambiguous.
3894 Also, we expect that it will be more common to have generic function invocations as actual arguments than having relational or shift expressions that happen to match up and have parentheses at the end, such that the ambiguity arises.
3895 }
3787 3896
3788 \LMHash{} 3897 \LMHash{}
3789 Evaluation of an actual argument list of the form 3898 Evaluation of an actual argument list of the form
3790 3899
3791 $(a_1, \ldots, a_m, q_1: a_{m+1}, \ldots, q_l: a_{m+l})$ 3900 $(a_1, \ldots, a_m, q_1: a_{m+1}, \ldots, q_l: a_{m+l})$
3792 3901
3793 proceeds as follows: 3902 proceeds as follows:
3794 3903
3795 \LMHash{} 3904 \LMHash{}
3796 The arguments $a_1, \ldots, a_{m+l}$ are evaluated in the order they appear in t he program, producing objects $o_1, \ldots, o_{m+l}$. 3905 The arguments $a_1, \ldots, a_{m+l}$ are evaluated in the order they appear in t he program, producing objects $o_1, \ldots, o_{m+l}$.
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
4076 4185
4077 \subsubsection{Cascaded Invocations} 4186 \subsubsection{Cascaded Invocations}
4078 \LMLabel{cascadedInvocations} 4187 \LMLabel{cascadedInvocations}
4079 4188
4080 \LMHash{} 4189 \LMHash{}
4081 A {\em cascaded method invocation} has the form \code{$e$..\metavar{suffix}} 4190 A {\em cascaded method invocation} has the form \code{$e$..\metavar{suffix}}
4082 where $e$ is an expression and \metavar{suffix} is a sequence of operator, metho d, getter or setter invocations. 4191 where $e$ is an expression and \metavar{suffix} is a sequence of operator, metho d, getter or setter invocations.
4083 4192
4084 \begin{grammar} 4193 \begin{grammar}
4085 {\bf cascadeSection:} 4194 {\bf cascadeSection:}
4086 `{\escapegrammar ..}' (cascadeSelector arguments*) (assignableSelector arg uments*)* (assignmentOperator expressionWithoutCascade)? 4195 `{\escapegrammar ..}' (cascadeSelector argumentPart*) (assignableSelector argumentPart*)* (assignmentOperator expressionWithoutCascade)?
4087 . 4196 .
4088 4197
4089 {\bf cascadeSelector:}`[' expression `]'; 4198 {\bf cascadeSelector:}`[' expression `]';
4090 identifier 4199 identifier
4091 . 4200 .
4201
4202 {\bf argumentPart:}
4203 typeArguments? arguments
4204 .
4092 \end{grammar} 4205 \end{grammar}
4093 4206
4094 \LMHash{} 4207 \LMHash{}
4095 Evaluation of a cascaded method invocation expression $e$ of the form \code{$e$. .\metavar{suffix}} proceeds as follows: 4208 Evaluation of a cascaded method invocation expression $e$ of the form \code{$e$. .\metavar{suffix}} proceeds as follows:
4096 4209
4097 Evaluate $e$ to an object $o$. 4210 Evaluate $e$ to an object $o$.
4098 Let $t$ be a fresh variable bound to $o$. 4211 Let $t$ be a fresh variable bound to $o$.
4099 Evaluate \code{$t$.\metavar{suffix}} to an object. 4212 Evaluate \code{$t$.\metavar{suffix}} to an object.
4100 Then $e$ evaluates to $o$. 4213 Then $e$ evaluates to $o$.
4101 4214
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
5109 \begin{grammar} 5222 \begin{grammar}
5110 {\bf postfixExpression:}assignableExpression postfixOperator; 5223 {\bf postfixExpression:}assignableExpression postfixOperator;
5111 primary selector* 5224 primary selector*
5112 . 5225 .
5113 5226
5114 {\bf postfixOperator:} 5227 {\bf postfixOperator:}
5115 incrementOperator 5228 incrementOperator
5116 . 5229 .
5117 5230
5118 {\bf selector:}assignableSelector; 5231 {\bf selector:}assignableSelector;
5119 arguments 5232 argumentPart
5120 . 5233 .
5121 5234
5122 {\bf incrementOperator:}`++'; 5235 {\bf incrementOperator:}`++';
5123 `-{}-' 5236 `-{}-'
5124 . 5237 .
5125 5238
5126 \end{grammar} 5239 \end{grammar}
5127 5240
5128 \LMHash{} 5241 \LMHash{}
5129 A {\em postfix expression} is either a primary expression, a function, method o r getter invocation, or an invocation of a postfix operator on an expression $e$ . 5242 A {\em postfix expression} is either a primary expression, a function, method o r getter invocation, or an invocation of a postfix operator on an expression $e$ .
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
5289 This section describes how to evaluate these expressions when they do not consti tute the complete left hand side of an assignment. 5402 This section describes how to evaluate these expressions when they do not consti tute the complete left hand side of an assignment.
5290 5403
5291 \rationale{ 5404 \rationale{
5292 Of course, if assignable expressions always appeared {\em as} the left hand side , one would have no need for their value, and the rules for evaluating them woul d be unnecessary. However, assignable expressions can be subexpressions of othe r expressions and therefore must be evaluated. 5405 Of course, if assignable expressions always appeared {\em as} the left hand side , one would have no need for their value, and the rules for evaluating them woul d be unnecessary. However, assignable expressions can be subexpressions of othe r expressions and therefore must be evaluated.
5293 } 5406 }
5294 5407
5295 5408
5296 5409
5297 \begin{grammar} 5410 \begin{grammar}
5298 5411
5299 {\bf assignableExpression:}primary (arguments* assignableSelector)+; 5412 {\bf assignableExpression:}primary (argumentPart* assignableSelector)+;
5300 \SUPER{} unconditionalAssignableSelector; 5413 \SUPER{} unconditionalAssignableSelector;
5301 identifier 5414 identifier
5302 . 5415 .
5303 5416
5304 {\bf unconditionalAssignableSelector:}`[' expression `]'; % again, could be top level 5417 {\bf unconditionalAssignableSelector:}`[' expression `]'; % again, could be top level
5305 `{\escapegrammar .}' identifier 5418 `{\escapegrammar .}' identifier
5306 . 5419 .
5307 5420
5308 {\bf assignableSelector:} 5421 {\bf assignableSelector:}
5309 unconditionalAssignableSelector; 5422 unconditionalAssignableSelector;
5310 `{\escapegrammar ?.}' identifier 5423 `{\escapegrammar ?.}' identifier
5311 . 5424 .
5312
5313 \end{grammar} 5425 \end{grammar}
5314 5426
5315 5427
5316 \LMHash{} 5428 \LMHash{}
5317 An {\em assignable expression} is either: 5429 An {\em assignable expression} is either:
5318 \begin{itemize} 5430 \begin{itemize}
5319 \item An identifier. 5431 \item An identifier.
5320 \item An invocation (possibly conditional) of a getter (\ref{getters}) or list a ccess operator on an expression $e$. 5432 \item An invocation (possibly conditional) of a getter (\ref{getters}) or list a ccess operator on an expression $e$.
5321 \item An invocation of a getter or list access operator on \SUPER{}. 5433 \item An invocation of a getter or list access operator on \SUPER{}.
5322 \end{itemize} 5434 \end{itemize}
(...skipping 2790 matching lines...) Expand 10 before | Expand all | Expand 10 after
8113 8225
8114 The invariant that each normative paragraph is associated with a line 8226 The invariant that each normative paragraph is associated with a line
8115 containing the text \LMHash{} should be maintained. Extra occurrences 8227 containing the text \LMHash{} should be maintained. Extra occurrences
8116 of \LMHash{} can be added if needed, e.g., in order to make 8228 of \LMHash{} can be added if needed, e.g., in order to make
8117 individual \item{}s in itemized lists addressable. Each \LM.. command 8229 individual \item{}s in itemized lists addressable. Each \LM.. command
8118 must occur on a separate line. \LMHash{} must occur immediately 8230 must occur on a separate line. \LMHash{} must occur immediately
8119 before the associated paragraph, and \LMLabel must occur immediately 8231 before the associated paragraph, and \LMLabel must occur immediately
8120 after the associated \section{}, \subsection{} etc. 8232 after the associated \section{}, \subsection{} etc.
8121 8233
8122 ---------------------------------------------------------------------- 8234 ----------------------------------------------------------------------
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698