From e9c1b81eac1e36b8e99b243144e841be106fe59f Mon Sep 17 00:00:00 2001 From: Erik Ernst Date: Thu, 17 Jun 2021 16:25:43 +0200 Subject: [PATCH] Add two paragraphs (and a bit of commentary) about canonicalization of constant functions --- specification/dartLangSpec.tex | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/specification/dartLangSpec.tex b/specification/dartLangSpec.tex index 618c85a1a0..4bc5883137 100644 --- a/specification/dartLangSpec.tex +++ b/specification/dartLangSpec.tex @@ -12844,6 +12844,17 @@ \subsection{Function Closurization} (\ref{statementCompletion}) as the invocation of $f$ would have yielded. +\LMHash{}% +Let $e_1$ and $e_2$ be two constant expressions that both +evaluate to a function object which is obtained by function closurization +of the same function declaration. +In this case \code{identical($e_1$, $e_2$)} shall evaluate to true. + +\commentary{% +That is, constant expressions whose evaluation is a function closurization +are canonicalized.% +} + \subsubsection{Generic Function Instantiation} \LMLabel{genericFunctionInstantiation} @@ -13056,6 +13067,20 @@ \subsubsection{Generic Function Instantiation} } \EndCase +\LMHash{}% +Let $e_1$ and $e_2$ be two constant expressions that both +evaluate to a function object +which is obtained by generic function instantiation +of the same function declaration +and with the same type arguments. +In this case \code{identical($e_1$, $e_2$)} shall evaluate to true. + +\commentary{% +That is, constant expressions whose evaluation is +a generic function instantiation +are canonicalized.% +} + \subsection{Lookup} \LMLabel{lookup}